blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 264 | content_id stringlengths 40 40 | detected_licenses listlengths 0 85 | license_type stringclasses 2 values | repo_name stringlengths 5 140 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 986 values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 3.89k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 145 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 3 10.4M | extension stringclasses 122 values | content stringlengths 3 10.4M | authors listlengths 1 1 | author_id stringlengths 0 158 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7914be7a61118e0244b339b7202275bbb0460599 | b16e618b507fdeb9a0f672ef1a6a32a965b1eae6 | /FPSProject/Source/FPSProject/FPSGameMode.cpp | e9d3f46b73b40c51789b082566c2309cc4701556 | [] | no_license | Blasterdude/imgd-4000-projects | c79a4b71befdca298d2ef36d1f24093d810a360e | 9d1340c48d9ed4e18ac8de60beb900427bf2a8f0 | refs/heads/master | 2020-04-01T15:28:10.876325 | 2018-10-16T19:07:34 | 2018-10-16T19:07:34 | 153,338,330 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,093 | cpp | // Thomas J. Meehan
#include "FPSProject.h"
#include "FPSGameMode.h"
#include "FPSCharacter.h"
//#include "FPSHUD.h"
#include "Engine.h" //for version 4.4+
// Note that this may no longer be necessary as this file will likely already include [ProjectName].h, which, by default, will include "Engine.h" itself
AFPSGameMode::AFPSGameMode(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
// set default pawn class to our Blueprinted character
static ConstructorHelpers::FClassFinder<APawn> PlayerPawnObject(TEXT("Pawn'/Game/Blueprints/BP_FPSCharacter.BP_FPSCharacter_C'"));
if (PlayerPawnObject.Class != NULL)
{
DefaultPawnClass = PlayerPawnObject.Class;
}
}
// Note that engine version 4.3 changed the method's name to StartPlay(), because of this engine versions before 4.3, or older tutorials, use BeginPlay()
void AFPSGameMode::StartPlay()
{
Super::StartPlay();
StartMatch();
if (GEngine)
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Yellow, TEXT("HELLO WORLD"));
}
} | [
"tom.meehan8@gmail.com"
] | tom.meehan8@gmail.com |
24754f2ba59cfde0a83736c62b85476b0b494985 | 5645587f7880546b7f815426bf5c2253af64bd27 | /src/TaskProcess.h | 88fc07fab464d619f11a9883bb8611b039ec3634 | [] | no_license | hiplayer/HPComp_Linux | 82878093a6e122d96b9f4106d04e0f7f7854b21f | 298708d74631f8fffc5be292ddcf70e1b18dd413 | refs/heads/master | 2020-12-25T16:13:55.936966 | 2015-02-10T09:36:03 | 2015-02-10T09:36:03 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,771 | h | #ifndef TASKPROCESS_H_
#define TASKPROCESS_H_
#include "stdafx.h"
#include "AUDEC/AUDEC_Header.h"
#include "AUDEC/AUDEC_CodecID.h"
#include "VIDEC/VIDEC_Header.h"
#include "VIDEC/VIDEC_CodecDef.h"
#include "MSDKVideo/CompEngine.h"
#include "ChanSender.h"
#include "HPCompositeDefine.h"
#include "H264FrameParser.h"
#include "HPATC_Mixer.h"
#include "TMInfo.h"
typedef struct {
int streamIndex;
unsigned long ulWndIndex;
} StreamInfo;
class TaskProcessNotify
{
public:
virtual void OnReceiveStream(const TASK_STREAM& stTaskStream, const std::string& strTaskID) = 0;
virtual void OnReleaseStream(const std::string& strStreamID, const std::string& strTaskID) = 0;
};
class TaskProcess
:public KThread
,public ChanSenderNotify
,public HPATC_MixerCallback
,public MSDKCodecNotify
{
public:
TaskProcess(TaskProcessNotify& rNotify);
~TaskProcess() {}
public:
bool StartTask(const COMP_TASKINFO& stTaskInfo, const VEC_STREAM& vTaskStream);
void ModifyTask(const COMP_TASKINFO& stTaskInfo, const VEC_STREAM& vTaskStream);
void StopTask();
void InputAudioPacket(const std::string& strStreamID, unsigned char* pData, int nLen);
void InputVideoPacket(const std::string& strStreamID, unsigned char* pData, int nLen);
void OnResolutionChanged(const std::string& strStreamID, unsigned int width, unsigned int height);
private:
void ThreadProcMain();
bool SetDestRect(int uTmid);
void ReceiveStream(const VEC_STREAM& vTaskStream);
void AdjustPlayerRect(unsigned int width, unsigned int height, unsigned int& wnd_x, unsigned int& wnd_y, unsigned int& wnd_w, unsigned int& wnd_h);
void OnGetMSDKCodecData(unsigned char* pData, int nLen, bool bKeyFrame, int nIndex);
void OnHPATC_MixerCallbackPacketData(HPATC_Mixer* pMixer, void* pPacketData, int nPacketLen, unsigned long ulTimestamp);
void OnRequestRealPlay(int nStatus, unsigned int nLogicIndex);
void OnRequestKeyFrame(unsigned int nLogicIndex);
private:
COMP_TASKINFO m_taskInfo;
std::vector<RECT> m_vPosArray;
std::map<std::string, StreamInfo> m_mapStream;
bool m_bWantToStop;
bool m_bWantToRecvAudio[MAX_OUTPUT_NUM];
bool m_bWantToRecvVideo[MAX_OUTPUT_NUM];
unsigned int m_width[MAX_OUTPUT_NUM], m_height[MAX_OUTPUT_NUM];
ChanSender m_StreamSender[MAX_OUTPUT_NUM];
HPATC_Mixer* m_pAudioMixer;
CompEngine* m_pCompEngine;
char* m_pStubBuf[MAX_OUTPUT_NUM];
unsigned char* m_pAudioPacket;
unsigned char* m_pVideoPacket[MAX_OUTPUT_NUM];
int m_nAudioFrameBufferLength;
int m_nVideoFrameBufferLength[MAX_OUTPUT_NUM];
unsigned short m_usAudioSequence;
unsigned short m_usVideoSequence[MAX_OUTPUT_NUM];
TaskProcessNotify& m_rNotify;
FILE* m_pFile;
};
#endif //TASKPROCESS_H_
| [
"1158359135@qq.com"
] | 1158359135@qq.com |
03f8dda37c72177c8faba38c12b960cdff436215 | 11b1c11a907e05e9079ed1ccb42a53719aa36cba | /MyFrameWork/MyFrameWork/KeyBoard.h | 9968db3f72696696a45ae02f8df9e3690db64b85 | [] | no_license | loctho1995/DirectX-Contra | e5068575ce89df101cdaa9337470f3920573cf28 | 4a9aff748458e18110de970da356f49aee100bb4 | refs/heads/master | 2021-01-10T08:13:36.681909 | 2016-01-04T14:21:59 | 2016-01-04T14:21:59 | 43,313,122 | 3 | 3 | null | null | null | null | UTF-8 | C++ | false | false | 649 | h | #pragma once
#include <queue>
class KeyEvent
{
public:
enum EventType
{
Press,
Release,
NULLKey
};
KeyEvent(EventType type, unsigned char keycode);
unsigned char getCode();
bool isPress();
bool isRelease();
private:
EventType type;
unsigned char keyCode;
};
class KeyBoard
{
public:
static KeyBoard* getInstace();
void onKeyPressed( unsigned char keycode );
void onKeyReleased( unsigned char keycode );
KeyEvent peekKey();
KeyEvent readKey();
bool isPress(unsigned char keyCode);
void flush();
bool isEmpty();
private:
KeyBoard();
bool keyState[256];
std::queue < KeyEvent > keyBuffer;
static KeyBoard* sInstance;
};
| [
"ttakte00@gmail.com"
] | ttakte00@gmail.com |
af42397dcf264855c9318bfed238ac9b33d8b2b3 | 1d0b642683814c1369dbb0d84d897783d6c06f00 | /06-16.cpp | 2e2d65b88df96e67f021df7ee3ad205f0f3700fb | [] | no_license | MisaghTavanpour/cppPrimer5thEdition | 78ed72382ef45a698de34e49220132884371b65a | a3516a9e126c84d2aead9205be77e51468da7a4d | refs/heads/main | 2023-01-29T20:34:21.137177 | 2020-12-08T03:29:46 | 2020-12-08T03:29:46 | 319,513,509 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 371 | cpp | #include <iostream>
#include <string>
using std::cout;
using std::endl;
using std::string;
bool is_empty(const string& s) {
return s.empty();
}
int main() {
string str = "2";
cout << str.size() << endl;
if (is_empty(str)) {
cout << "str is empty" << endl;
} else {
cout << "str is not empty" << endl;
}
return 0;
}
| [
"misagh_tavanpour@yahoo.com"
] | misagh_tavanpour@yahoo.com |
5632ff20e49d80462dec6e79a4b7f3ce3317ca07 | 9a0212c703d39ade3f6efadc7aff6d8227b52cd6 | /sslserver.cpp | f6c6c6fff8b1423fb0b74fa67f0167a2c34c76a4 | [
"MIT"
] | permissive | pavolmarak/openfinger-gateway | e5afa28e3cdee2bcfa72da6c30fa6c0cc330c970 | faa688912fb5df0fa100bd1a4dbf1fd9c6e9df9c | refs/heads/main | 2023-05-27T11:27:27.724886 | 2021-06-11T17:35:09 | 2021-06-11T17:35:09 | 368,262,767 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,918 | cpp | #include "sslserver.h"
#include <QDebug>
quint16 SslServer::getPort() const
{
return port;
}
void SslServer::setPort(quint16 newPort)
{
port = newPort;
}
const QString &SslServer::getIp() const
{
return ip;
}
void SslServer::setIp(const QString &newIp)
{
ip = newIp;
}
SslServer::SslServer(QObject *parent) : QTcpServer(parent)
{
}
void SslServer::startListening()
{
if(!this->listen(QHostAddress(this->ip), this->port)){
qDebug() << "Server failed to listen on IP:" << this->ip << "and port:" << this->port ;
exit(EXIT_FAILURE);
}
else{
qDebug() << "Server is listening on IP:" << this->ip << "and port:" << this->port;
}
}
void SslServer::incomingConnection(qintptr socketDescriptor)
{
QSslSocket* ssl_socket= new QSslSocket;
QMap<QSslSocket*,QByteArray>::iterator i_ssl = this->server_ssl_sockets.insert(ssl_socket,{});
connect( i_ssl.key(),
&QSslSocket::encrypted,
this,
&SslServer::encryptedSlot);
connect( i_ssl.key(),
&QSslSocket::readyRead,
this,
&SslServer::readyReadSslSlot);
connect( i_ssl.key(),
&QSslSocket::disconnected,
this,
&SslServer::disconnectedSslSlot);
connect( i_ssl.key(),
&QSslSocket::errorOccurred,
this,
&SslServer::errorOccurredSslSlot);
connect( i_ssl.key(),
qOverload<const QList<QSslError>&>(&QSslSocket::sslErrors),
this,
qOverload<const QList<QSslError>&>(&SslServer::sslErrorsSlot));
if(this->ip == "147.175.106.8"){
ssl_socket->setPrivateKey("cert/server_key.key");
ssl_socket->setLocalCertificate("cert/server_cert.crt");
}
else{
ssl_socket->setPrivateKey("cert/client_key.key");
ssl_socket->setLocalCertificate("cert/client_cert.crt");
}
if (ssl_socket->setSocketDescriptor(socketDescriptor)) {
addPendingConnection(ssl_socket);
ssl_socket->startServerEncryption();
} else {
ssl_socket->close();
this->server_ssl_sockets.remove(ssl_socket);
delete ssl_socket;
}
qDebug() << "\n[SSL Server: NEW CONNECTION] from"
<< i_ssl.key()->peerAddress()
<< ", socket descriptor:" << i_ssl.key()->socketDescriptor();
qDebug() << "SSL Server: number of connected SSL sockets is" << this->server_ssl_sockets.size();
}
void SslServer::newConnectionSlot()
{
}
void SslServer::encryptedSlot()
{
QSslSocket * socket = qobject_cast<QSslSocket*>(sender());
qDebug() << "Server SSL socket" << socket->socketDescriptor()
<< ": entered the encrypted state.";
}
void SslServer::sslErrorsSlot(const QList<QSslError> &errors)
{
qDebug() << "SSL Server error:";
QSslSocket *sender_socket = qobject_cast<QSslSocket*>(sender());
sender_socket->ignoreSslErrors();
foreach (const QSslError& e, errors) {
qDebug() << e.errorString();
}
}
void SslServer::disconnectedSslSlot()
{
QSslSocket * socket = qobject_cast<QSslSocket*>(sender());
qDebug() << "Server SSL socket" << socket->socketDescriptor()
<< ": disconnected.";
this->server_ssl_sockets.remove(socket);
qDebug() << "SSL Server: number of connected SSL sockets is" << this->server_ssl_sockets.size();
}
void SslServer::errorOccurredSslSlot(QAbstractSocket::SocketError error)
{
QSslSocket * sender_socket = qobject_cast<QSslSocket*>(sender());
qDebug() << "SSL Server" << sender_socket
<< ": socket error occured "
<< error;
}
void SslServer::readyReadSslSlot()
{
QSslSocket *sender_socket = qobject_cast<QSslSocket*>(sender());
QByteArray& data = this->server_ssl_sockets[sender_socket];
emit serverReadyReadSsl(sender_socket, &data);
}
| [
"pavol.marak@gmail.com"
] | pavol.marak@gmail.com |
53e08c1fe8bc5b5e07144f829cf86a4a1a7b2339 | b4052809a4a08eb9ddc4551b6fc34ef61b90a24c | /frameworks/vtk.framework/Headers/vtkRearrangeFields.h | 0448925b58b0e31961014108f322b29b3a6dc0ae | [] | no_license | 9gel/hellopcl | 548687167b0b17bd393b55f37e99d05207971a9e | 19c39b39ad169c0a79b42cd72232d51b419f4f3d | refs/heads/master | 2020-02-26T17:05:09.470167 | 2014-02-27T07:59:52 | 2014-02-27T07:59:52 | 17,192,517 | 21 | 5 | null | null | null | null | UTF-8 | C++ | false | false | 7,687 | h | /*=========================================================================
Program: Visualization Toolkit
Module: vtkRearrangeFields.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkRearrangeFields - Move/copy fields between field data, point data and cell data
// .SECTION Description
// vtkRearrangeFields is used to copy/move fields (vtkDataArrays) between
// data object's field data, point data and cell data. To specify which
// fields are copied/moved, the user adds operations. There are two types
// of operations: 1. the type which copies/moves an attribute's data
// (i.e. the field will be copied but will not be an attribute in the
// target), 2. the type which copies/moves fields by name. For example:
// @verbatim
// rf->AddOperation(vtkRearrangeFields::COPY, "foo",
// vtkRearrangeFields::DATA_OBJECT,
// vtkRearrangeFields::POINT_DATA);
// @endverbatim
// adds an operation which copies a field (data array) called foo from
// the data object's field data to point data.
// From Tcl, the same operation can be added as follows:
// @verbatim
// rf AddOperation COPY foo DATA_OBJECT POINT_DATA
// @endverbatim
// The same can be done using Python and Java bindings by passing
// strings as arguments.
// @verbatim
// Operation types: COPY, MOVE
// AttributeTypes: SCALARS, VECTORS, NORMALS, TCOORDS, TENSORS
// Field data locations: DATA_OBJECT, POINT_DATA, CELL_DATA
// @endverbatim
// .SECTION Caveats
// When using Tcl, Java, Python or Visual Basic bindings, the array name
// can not be one of the AttributeTypes when calling AddOperation() which
// takes strings as arguments. The Tcl (Java etc.) command will
// always assume the string corresponds to an attribute type when
// the argument is one of the AttributeTypes. In this situation,
// use the AddOperation() which takes enums.
// .SECTION See Also
// vtkFieldData vtkDataSet vtkDataObjectToDataSetFilter
// vtkDataSetAttributes vtkDataArray vtkAssignAttribute
// vtkSplitField vtkMergeFields
#ifndef __vtkRearrangeFields_h
#define __vtkRearrangeFields_h
#include "vtkFiltersCoreModule.h" // For export macro
#include "vtkDataSetAlgorithm.h"
#include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
class vtkFieldData;
class VTKFILTERSCORE_EXPORT vtkRearrangeFields : public vtkDataSetAlgorithm
{
public:
vtkTypeMacro(vtkRearrangeFields,vtkDataSetAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Create a new vtkRearrangeFields with an empty operation list.
static vtkRearrangeFields *New();
//BTX
enum OperationType
{
COPY=0,
MOVE=1
};
enum FieldLocation
{
DATA_OBJECT=0,
POINT_DATA=1,
CELL_DATA=2
};
//ETX
// Description:
// Add an operation which copies an attribute's field (data array) from
// one field data to another. Returns an operation id which can later
// be used to remove the operation.
int AddOperation(int operationType, int attributeType, int fromFieldLoc,
int toFieldLoc);
// Description:
// Add an operation which copies a field (data array) from one field
// data to another. Returns an operation id which can later
// be used to remove the operation.
int AddOperation(int operationType, const char* name, int fromFieldLoc,
int toFieldLoc);
// Description:
// Helper method used by other language bindings. Allows the caller to
// specify arguments as strings instead of enums.Returns an operation id
// which can later be used to remove the operation.
int AddOperation(const char* operationType, const char* attributeType,
const char* fromFieldLoc, const char* toFieldLoc);
// Description:
// Remove an operation with the given id.
int RemoveOperation(int operationId);
// Description:
// Remove an operation with the given signature. See AddOperation
// for details.
int RemoveOperation(int operationType, int attributeType, int fromFieldLoc,
int toFieldLoc);
// Description:
// Remove an operation with the given signature. See AddOperation
// for details.
int RemoveOperation(int operationType, const char* name, int fromFieldLoc,
int toFieldLoc);
// Description:
// Remove an operation with the given signature. See AddOperation
// for details.
int RemoveOperation(const char* operationType, const char* attributeType,
const char* fromFieldLoc, const char* toFieldLoc);
// Description:
// Remove all operations.
void RemoveAllOperations()
{
this->Modified();
this->LastId = 0;
this->DeleteAllOperations();
}
//BTX
enum FieldType
{
NAME,
ATTRIBUTE
};
struct Operation
{
int OperationType; // COPY or MOVE
int FieldType; // NAME or ATTRIBUTE
char* FieldName;
int AttributeType;
int FromFieldLoc; // fd, pd or do
int ToFieldLoc; // fd, pd or do
int Id; // assigned during creation
Operation* Next; // linked list
Operation() { FieldName = 0; }
~Operation() { delete[] FieldName; }
};
//ETX
protected:
vtkRearrangeFields();
virtual ~vtkRearrangeFields();
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
// Operations are stored as a linked list.
Operation* Head;
Operation* Tail;
// This is incremented whenever a new operation is created.
// It is not decremented when an operation is deleted.
int LastId;
// Methods to browse/modify the linked list.
Operation* GetNextOperation(Operation* op)
{ return op->Next; }
Operation* GetFirst()
{ return this->Head; }
void AddOperation(Operation* op);
void DeleteOperation(Operation* op, Operation* before);
Operation* FindOperation(int id, Operation*& before);
Operation* FindOperation(const char* name, Operation*& before);
Operation* FindOperation(int operationType, const char* name,
int fromFieldLoc, int toFieldLoc,
Operation*& before);
Operation* FindOperation(int operationType, int attributeType,
int fromFieldLoc, int toFieldLoc,
Operation*& before);
// Used when finding/deleting an operation given a signature.
int CompareOperationsByType(const Operation* op1, const Operation* op2);
int CompareOperationsByName(const Operation* op1, const Operation* op2);
void DeleteAllOperations();
void ApplyOperation(Operation* op, vtkDataSet* input, vtkDataSet* output);
// Given location (DATA_OBJECT, CELL_DATA, POINT_DATA) return the
// pointer to the corresponding field data.
vtkFieldData* GetFieldDataFromLocation(vtkDataSet* ds, int fieldLoc);
// Used by AddOperation() and RemoveOperation() designed to be used
// from other language bindings.
static char OperationTypeNames[2][5];
static char FieldLocationNames[3][12];
static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10];
void PrintAllOperations(ostream& os, vtkIndent indent);
void PrintOperation(Operation* op, ostream& os, vtkIndent indent);
private:
vtkRearrangeFields(const vtkRearrangeFields&); // Not implemented.
void operator=(const vtkRearrangeFields&); // Not implemented.
};
#endif
| [
"nigel@vannevartech.com"
] | nigel@vannevartech.com |
deeafef63937486d05cd1f443fa03fb0203d5dd9 | 63f9cad34d5c3a34297450c401013819596d8c06 | /C++_GAME/Ranking.cpp | 00a74ee2f67b6c8c8c3a1b26a0772a7beebd23b6 | [] | no_license | LunaJang/2017_C.A.P.S_EXHIBITION | 28f0a0e2b26f5a2360b5ebae941f9162396e9539 | ea9579a42d4ea0cd595a8ed95a7e45dd296bb1c5 | refs/heads/master | 2021-05-14T03:57:03.563684 | 2018-11-06T07:40:36 | 2018-11-06T07:40:36 | 116,631,070 | 1 | 0 | null | null | null | null | UHC | C++ | false | false | 5,558 | cpp | #pragma once
#include "headers.h"
/*일반엔딩: 기본, 아싸, 과대, 과탑, 연인, 솔로, 휴학, 평화, 찍힘 (총 9개)
중도엔딩: 이별, 열반, 학고, 노벨상, 데뷔, 돌연사 (총6개)
일반엔딩 1개당 점수 10 (연애만 -10)
중도엔딩중 이별100, 노벨상80/ 열반60, 학고60, 데뷔60/ 돌연사0
스텟(학점, 스트레스, 인기도)*/
/*학점
1점대: 1점
2점대: 2점
3점대: 3점
4점대: 4점
4.5: 5점*/
/*스트레스
5 : 0점
4-5: 1점
3-4: 2점
2-3: 3점
1-2: 4점
0-1: 5점
0 : 6점*/
/*인기도
0: 0점
1-20 : 1점
20-40: 2점
40-60: 3점
60-80: 4점
80-99: 5점
100: 6점
*/
using namespace std;
// 스페셜 엔딩 점수 계산
void Scoring::setScore(State& currentState, string endName)
{
int score = 0;
//학점 점수
{
if (currentState.getGrade() < 2)
score += 1;
else if (currentState.getGrade() == 4.5)
score += 5;
else
score += currentState.getGrade();
}
//스트레스 점수
{
if (currentState.getStress() >= 4 && currentState.getStress() < 5)
score = score + 1;
else if (currentState.getStress() >= 3 && currentState.getStress() < 4)
score = score + 2;
else if (currentState.getStress() >= 2 && currentState.getStress() < 3)
score = score + 3;
else if (currentState.getStress() >= 1 && currentState.getStress() < 2)
score = score + 4;
else if (currentState.getStress() > 0 && currentState.getStress() < 1)
score = score + 5;
else
score = score + 6;
}
//인기도점수
{
if (currentState.getPopularity() >= 1 && currentState.getPopularity() < 20)
score = score + 1;
else if (currentState.getPopularity() >= 20 && currentState.getPopularity() < 40)
score = score + 2;
else if (currentState.getPopularity() >= 40 && currentState.getPopularity() < 60)
score = score + 3;
else if (currentState.getPopularity() >= 60 && currentState.getPopularity() < 80)
score = score + 4;
else if (currentState.getPopularity() >= 80 && currentState.getPopularity() < 100)
score = score + 5;
else
score = score + 6;
}
//스폐셜엔딩(돌연사는 0점)
{
if (endName == "Breaklove")
score += 100;
else if (endName == "Nobelprize")
score += 80;
else if (endName == "Monk" || endName == "ManyF" || endName == "Celeb")
score += 60;
}
currentState.setScore(score);
}
// 노말 엔딩 점수 계산
void Scoring::setScore(State& currentState, int endNum)
{
int score = 0;
//학점 점수
{
if (currentState.getGrade() < 2)
score = score + 1;
else if (currentState.getGrade() >= 2 && currentState.getGrade() < 3)
score = score + 2;
else if (currentState.getGrade() >= 3 && currentState.getGrade() < 4)
score = score + 3;
else if (currentState.getGrade() >= 4 && currentState.getGrade() < 4.5)
score = score + 4;
else
score = score + 5;
}
//스트레스 점수
{
if (currentState.getStress() >= 4 && currentState.getStress() < 5)
score += 1;
else if (currentState.getStress() >= 3 && currentState.getStress() < 4)
score += 2;
else if (currentState.getStress() >= 2 && currentState.getStress() < 3)
score += 3;
else if (currentState.getStress() >= 1 && currentState.getStress() < 2)
score += 4;
else if (currentState.getStress() > 0 && currentState.getStress() < 1)
score += 5;
else
score += 6;
}
//인기도점수
{
if (currentState.getPopularity() >= 1 && currentState.getPopularity() < 20)
score = score + 1;
else if (currentState.getPopularity() >= 20 && currentState.getPopularity() < 40)
score = score + 2;
else if (currentState.getPopularity() >= 40 && currentState.getPopularity() < 60)
score = score + 3;
else if (currentState.getPopularity() >= 60 && currentState.getPopularity() < 80)
score = score + 4;
else if (currentState.getPopularity() >= 80 && currentState.getPopularity() < 100)
score = score + 5;
else
score = score + 6;
}
//일반엔딩
{
score = score + endNum * 10;
}
currentState.setScore(score);
}
Data::Data(string name, int score)
{
this->name = name;
this->score = score;
}
string Data::getName()
{
return name;
}
int Data::getScore()
{
return score;
}
bool Data::operator<(Data& a) {
return this->score < a.score;
}
bool Data::operator>(Data& a) {
return this->score > a.score;
}
bool Data::cmp_Data(Data a, Data b)
{
return a.getScore() > b.getScore();
}
void Ranking::readRank(vector<Data>& dRanking)
{
ifstream readFile("rank.txt");
string iname;
string iscore;
int count = 1;
if (readFile.is_open())
{
while (!readFile.eof())
{
if (count % 2 == 1)
{
getline(readFile, iname);
count++;
}
else
{
getline(readFile, iscore);
count++;
Data info(iname, stoi(iscore));
dRanking.push_back(info);
}
}
readFile.close();
}
}
void Ranking::writeRank(vector<Data>& dRanking)
{
ofstream writeFile("rank.txt");
if (writeFile.is_open()) {
for (int i = 0; i < dRanking.size(); i++) {
string filesave = dRanking[i].getName() + "\n" + to_string(dRanking[i].getScore()) + "\n";
writeFile << filesave;
}
}
writeFile.close();
}
void Ranking::getRank(vector<string>& sRanking, string name, int score)
{
vector<Data> dRanking;
Data UserInfo(name, score);
readRank(dRanking);
dRanking.push_back(UserInfo);
writeRank(dRanking);
sort(dRanking.begin(), dRanking.end(), Data::cmp_Data);
for (int i = dRanking.size() - 1; i >=0 ; --i)
{
string line;
line.append( i + "등 " + dRanking[i].getName() + " " + to_string(dRanking[i].getScore()) + " 점 \n");
sRanking.push_back(line);
}
return;
} | [
"jase9512@naver.com"
] | jase9512@naver.com |
76c4931e42d468f2473d1f9b9ad07c5b29d579d0 | b619d7537f6ba6800766d3ef4446483008c99816 | /TESReloaded/Core/RenderManager.cpp | c464ff62132215ffa5aea12c5a561d18d4c030aa | [] | no_license | hellozyemlya/TESReloaded | d3c70aa18a26f34af351b9c63152a008237400ea | 5ec8efcd08464988f6f3a7fa04577119855796f3 | refs/heads/master | 2023-04-08T15:49:46.163948 | 2021-02-12T17:16:36 | 2021-02-12T17:16:36 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,646 | cpp | #if defined(NEWVEGAS)
#define kCameraWorldTranslate 0x011F474C
#elif defined(OBLIVION)
#define kCameraWorldTranslate 0x00B3F92C
#elif defined(SKYRIM)
#define kCameraWorldTranslate 0x01B913FC
#endif
#define RESZ_CODE 0x7FA05000
void RenderManager::GetSceneCameraData() {
NiCamera* Camera = WorldSceneGraph->camera;
if (Camera) {
NiMatrix33* WorldRotate = &Camera->m_worldTransform.rot;
NiPoint3* WorldTranslate = &Camera->m_worldTransform.pos;
CameraForward.x = WorldRotate->data[0][0];
CameraForward.y = WorldRotate->data[1][0];
CameraForward.z = WorldRotate->data[2][0];
CameraPosition.x = WorldTranslate->x;
CameraPosition.y = WorldTranslate->y;
CameraPosition.z = WorldTranslate->z;
}
}
void RenderManager::SetupSceneCamera() {
NiCamera* Camera = WorldSceneGraph->camera;
if (Camera) {
NiPoint3 Forward = { 0.0f, 0.0f, 0.0f };
NiPoint3 Up = { 0.0f, 0.0f, 0.0f };
NiPoint3 Right = { 0.0f, 0.0f, 0.0f };
NiPoint3* CameraWorldTranslate = (NiPoint3*)kCameraWorldTranslate;
D3DMATRIX* World = &TheRenderManager->worldMatrix;
D3DMATRIX* View = &TheRenderManager->viewMatrix;
D3DMATRIX* InvView = &TheRenderManager->invViewMatrix;
D3DMATRIX* Proj = &TheRenderManager->projMatrix;
D3DXMATRIX InvProj;
NiMatrix33* WorldRotate = &Camera->m_worldTransform.rot;
NiPoint3* WorldTranslate = &Camera->m_worldTransform.pos;
NiFrustum* Frustum = &Camera->Frustum;
float RmL = Frustum->Right - Frustum->Left;
float RpL = Frustum->Right + Frustum->Left;
float TmB = Frustum->Top - Frustum->Bottom;
float TpB = Frustum->Top + Frustum->Bottom;
float InvFmN = 1.0f / (Frustum->Far - Frustum->Near);
memcpy(CameraWorldTranslate, WorldTranslate, 0x0C);
Forward.x = WorldRotate->data[0][0];
Forward.y = WorldRotate->data[1][0];
Forward.z = WorldRotate->data[2][0];
Up.x = WorldRotate->data[0][1];
Up.y = WorldRotate->data[1][1];
Up.z = WorldRotate->data[2][1];
Right.x = WorldRotate->data[0][2];
Right.y = WorldRotate->data[1][2];
Right.z = WorldRotate->data[2][2];
// We set up the world matrix always to default (image space) because we use it only in image space shaders
World->_11 = 1.0f;
World->_12 = 0.0f;
World->_13 = 0.0f;
World->_14 = 0.0f;
World->_21 = 0.0f;
World->_22 = 1.0f;
World->_23 = 0.0f;
World->_24 = 0.0f;
World->_31 = 0.0f;
World->_32 = 0.0f;
World->_33 = 1.0f;
World->_34 = 0.0f;
World->_41 = -WorldTranslate->x;
World->_42 = -WorldTranslate->y;
World->_43 = -WorldTranslate->z;
World->_44 = 1.0f;
View->_11 = Right.x;
View->_12 = Up.x;
View->_13 = Forward.x;
View->_14 = 0.0f;
View->_21 = Right.y;
View->_22 = Up.y;
View->_23 = Forward.y;
View->_24 = 0.0f;
View->_31 = Right.z;
View->_32 = Up.z;
View->_33 = Forward.z;
View->_34 = 0.0f;
View->_41 = 0.0f;
View->_42 = 0.0f;
View->_43 = 0.0f;
View->_44 = 1.0f;
InvView->_11 = Right.x;
InvView->_12 = Right.y;
InvView->_13 = Right.z;
InvView->_14 = 0.0f;
InvView->_21 = Up.x;
InvView->_22 = Up.y;
InvView->_23 = Up.z;
InvView->_24 = 0.0f;
InvView->_31 = Forward.x;
InvView->_32 = Forward.y;
InvView->_33 = Forward.z;
InvView->_34 = 0.0f;
InvView->_41 = 0.0f;
InvView->_42 = 0.0f;
InvView->_43 = 0.0f;
InvView->_44 = 1.0f;
Proj->_11 = 2.0f / RmL;
Proj->_12 = 0.0f;
Proj->_13 = 0.0f;
Proj->_14 = 0.0f;
Proj->_21 = 0.0f;
Proj->_22 = 2.0f / TmB;
Proj->_23 = 0.0f;
Proj->_24 = 0.0f;
Proj->_31 = -RpL / RmL;
Proj->_32 = -TpB / TmB;
Proj->_33 = Frustum->Far * InvFmN;
Proj->_34 = 1.0f;
Proj->_41 = 0.0f;
Proj->_42 = 0.0f;
Proj->_43 = -(Frustum->Near * Frustum->Far * InvFmN);
Proj->_44 = 0.0f;
D3DXMatrixInverse(&InvProj, NULL, (D3DXMATRIX*)Proj);
InvViewProjMatrix = InvProj * invViewMatrix;
WorldViewProjMatrix = worldMatrix * viewMatrix * projMatrix;
CameraForward.x = Forward.x;
CameraForward.y = Forward.y;
CameraForward.z = Forward.z;
CameraPosition.x = WorldTranslate->x;
CameraPosition.y = WorldTranslate->y;
CameraPosition.z = WorldTranslate->z;
}
}
void RenderManager::SetSceneGraph() {
SettingsMainStruct::CameraModeStruct* CameraMode = &TheSettingManager->SettingsMain.CameraMode;
float FoV = CameraMode->FoV;
FirstPersonView = !Player->IsThirdPersonView(CameraMode->Enabled, FirstPersonView);
if (CameraMode->Enabled) {
*SettingNearDistance = 2.5f;
if (FoV != WorldSceneGraph->cameraFOV && !Player->IsAiming() && MenuManager->IsActive(Menu::MenuType::kMenuType_None)) Player->SetFoV(WorldSceneGraph, SettingWorldFoV, Setting1stPersonFoV, FoV);
}
TheShaderManager->ShaderConst.ReciprocalResolution.w = Player->GetFoV(0);
}
void RenderManager::Initialize() {
IDirect3D9* D3D = NULL;
D3DDISPLAYMODE currentDisplayMode;
Logger::Log("Extending the render manager...");
CameraForward.x = CameraForward.y = CameraForward.z = CameraForward.w = 0.0f;
CameraPosition.x = CameraPosition.y = CameraPosition.z = CameraPosition.w = 0.0f;
BackBuffer = NULL;
DepthSurface = NULL;
DepthTexture = NULL;
DepthTextureINTZ = NULL;
SaveGameScreenShotRECT = { 0, 0, 256, 144 };
IsSaveGameScreenShot = false;
FirstPersonView = false;
device->CreateTexture(width, height, 1, D3DUSAGE_DEPTHSTENCIL, (D3DFORMAT)MAKEFOURCC('I','N','T','Z'), D3DPOOL_DEFAULT, &DepthTexture, NULL);
device->GetDirect3D(&D3D);
D3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, ¤tDisplayMode);
RESZ = D3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, currentDisplayMode.Format, D3DUSAGE_RENDERTARGET, D3DRTYPE_SURFACE, (D3DFORMAT)MAKEFOURCC('R','E','S','Z')) == D3D_OK;
if (RESZ)
Logger::Log("AMD/Intel detected: RESZ supported.");
else if (NvAPI_Initialize() == NVAPI_OK)
Logger::Log("NVIDIA detected: NVAPI supported.");
else
Logger::Log("ERROR: Cannot initialize the render manager. Graphics device not supported.");
if (TheSettingManager->SettingsMain.Main.AnisotropicFilter >= 2) device->SetSamplerState(0, D3DSAMP_MAXANISOTROPY, TheSettingManager->SettingsMain.Main.AnisotropicFilter);
#if defined(OBLIVION)
if (*SettingHDR == 1 && *SettingMultiSample >= 2) {
Ni2DBuffer* Buffer = (Ni2DBuffer*)MemoryAlloc(0x14); *(void**)Buffer = (void*)0x00A8098C; Buffer->m_uiRefCount = 1;
NiDX92DBufferData* BufferData = (NiDX92DBufferData*)MemoryAlloc(0x10); *(void**)BufferData = (void*)0x00A89818; BufferData->m_uiRefCount = 1; BufferData->ParentData = Buffer;
Buffer->width = width;
Buffer->height = height;
Buffer->data = BufferData;
device->CreateRenderTarget(width, height, D3DFMT_A16B16G16R16F, (D3DMULTISAMPLE_TYPE)(*SettingMultiSample), 0, false, &BufferData->Surface, NULL);
defaultRTGroup->RenderTargets[1] = Buffer;
BackBuffer = defaultRTGroup->RenderTargets[0]->data->Surface;
}
#endif
}
void RenderManager::ResolveDepthBuffer() {
if (RESZ) {
IDirect3DBaseTexture9 *pCurrTX = NULL;
IDirect3DVertexShader9 *pCurrVS = NULL;
IDirect3DPixelShader9 *pCurrPS = NULL;
IDirect3DVertexBuffer9 *pCurrVX = NULL;
UINT32 dCurrVO;
UINT32 dCurrVS;
DWORD dCurrZE;
DWORD dCurrZW;
DWORD dCurrCW;
D3DXVECTOR3 vDummyPoint(0.0f, 0.0f, 0.0f);
device->GetTexture(0, &pCurrTX);
device->GetVertexShader(&pCurrVS);
device->GetPixelShader(&pCurrPS);
device->GetStreamSource(0, &pCurrVX, &dCurrVO, &dCurrVS);
device->GetRenderState(D3DRS_ZENABLE, &dCurrZE);
device->GetRenderState(D3DRS_ZWRITEENABLE, &dCurrZW);
device->GetRenderState(D3DRS_COLORWRITEENABLE, &dCurrCW);
device->SetVertexShader(NULL);
device->SetPixelShader(NULL);
device->SetFVF(D3DFVF_XYZ);
device->SetTexture(0, DepthTexture);
device->SetRenderState(D3DRS_ZENABLE, FALSE);
device->SetRenderState(D3DRS_ZWRITEENABLE, FALSE);
device->SetRenderState(D3DRS_COLORWRITEENABLE, NULL);
device->DrawPrimitiveUP(D3DPT_POINTLIST, 1, vDummyPoint, sizeof(D3DXVECTOR3));
device->SetRenderState(D3DRS_ZENABLE, dCurrZE);
device->SetRenderState(D3DRS_ZWRITEENABLE, dCurrZW);
device->SetRenderState(D3DRS_COLORWRITEENABLE, dCurrCW);
device->SetRenderState(D3DRS_POINTSIZE, RESZ_CODE);
device->SetRenderState(D3DRS_POINTSIZE, NULL);
device->SetTexture(0, pCurrTX);
device->SetVertexShader(pCurrVS);
device->SetPixelShader(pCurrPS);
device->SetStreamSource(0, pCurrVX, dCurrVO, dCurrVS);
if (pCurrTX) pCurrTX->Release();
if (pCurrVX) pCurrVX->Release();
}
else {
if (!DepthSurface) {
D3DSURFACE_DESC desc;
device->GetDepthStencilSurface(&DepthSurface);
DepthSurface->GetDesc(&desc);
if (desc.Format == (D3DFORMAT)MAKEFOURCC('I','N','T','Z')) {
void *Container = NULL;
DepthSurface->GetContainer(IID_IDirect3DTexture9, &Container);
DepthTextureINTZ = (IDirect3DTexture9*)Container;
NvAPI_D3D9_RegisterResource(DepthTextureINTZ);
}
else
NvAPI_D3D9_RegisterResource(DepthSurface);
NvAPI_D3D9_RegisterResource(DepthTexture);
}
if (!DepthTextureINTZ)
NvAPI_D3D9_StretchRectEx(device, DepthSurface, NULL, DepthTexture, NULL, D3DTEXF_NONE);
else
NvAPI_D3D9_StretchRectEx(device, DepthTextureINTZ, NULL, DepthTexture, NULL, D3DTEXF_NONE);
}
}
void DWNode::Create() {
DWNode* Node = (DWNode*)MemoryAlloc(sizeof(DWNode));
Node->New(2048);
Node->SetName("Passes...");
*(DWNode**)kDetectorWindowNode = Node;
}
DWNode* DWNode::Get() {
return *(DWNode**)kDetectorWindowNode;
}
void DWNode::AddNode(char* Name, NiAVObject* Child0, NiAVObject* Child1) {
NiNode* Node = (NiNode*)MemoryAlloc(sizeof(NiNode));
Node->New(2);
Node->SetName(Name);
Node->m_children.Add(&Child0); // We do not use the AddObject to avoid to alter the original object
Node->m_children.Add(&Child1); // Same as above
(*(DWNode**)kDetectorWindowNode)->AddObject(Node, 1);
} | [
"aletamburini78@gmail.com"
] | aletamburini78@gmail.com |
d51daa8909c9ee1b22728ed0a31fee708bcffc25 | 5d0ed2cdd3c1e1225979ea9908f8dbf61808bfb5 | /P2P/Sync/HeaderSyncer.h | c76b4e7f519c64cd513022aac282679036d26c40 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | emoji-king/GrinPlusPlus | 15b400a4306ab4eee42e103ca744a872f65998db | 4fe992626f9daf89528a92ed343d8af304113b4c | refs/heads/master | 2020-04-13T01:54:53.016676 | 2018-12-22T05:51:14 | 2018-12-22T05:51:14 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 513 | h | #pragma once
#include <chrono>
// Forward Declarations
class ConnectionManager;
class IBlockChainServer;
class HeaderSyncer
{
public:
HeaderSyncer(ConnectionManager& connectionManager, IBlockChainServer& blockChainServer);
bool SyncHeaders();
private:
bool IsHeaderSyncDue() const;
bool RequestHeaders();
ConnectionManager & m_connectionManager;
IBlockChainServer& m_blockChainServer;
std::chrono::time_point<std::chrono::system_clock> m_timeout;
uint64_t m_lastHeight;
uint64_t m_connectionId;
}; | [
"davidburkett38@gmail.com"
] | davidburkett38@gmail.com |
9a235a3a60e4c203a462d8f3d045c241e8af9461 | 79cd409b4b12f8ab76a31130750753e147c5dd4e | /wiselib.testing/algorithms/block_memory/virtual_sd.h | 2f2a701abb9f467823a3b8550ff628802a211562 | [] | no_license | bjoerke/wiselib | d28eb39e9095c9bfcec6b4c635b773f5fcaf87fa | 183726cbf744be9d65f12dd01bece0f7fd842541 | refs/heads/master | 2020-12-28T20:30:40.829538 | 2014-08-18T14:10:42 | 2014-08-18T14:10:42 | 19,933,324 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,739 | h | #ifndef __VIRTSDCARD_H__
#define __VIRTSDCARD_H__
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "pc_os_model.h"
namespace wiselib {
/*
* @brief A virtual bock memory for the PC os model. It implements the block memory interface.
* @author Dominik Krupke
* @author Maximilian Ernestus
* @author Marco Nikander
*
* This is an implementation of a virtual block device for testing of external memory algorithms and
* applications. The data is stored in a array in ram; though inefficient this is acceptable for test purposes.
* The stats (in milliseconds) are calculated using test-data collected during testing of various SD-Cards on
* Arduino µCs over SPI.
*
* @tparam OsModel_P specifies the os model to use
* @tparam nrOfBlocks specifies the number of blocks we want to use (default 1000)
* @tparam blocksize the size of the blocks you want to use (deault 512)
*/
//TODO: use memcopy in read, write erase instead of for loops to clean up code a bit
/*TODO: Redo IO & IO-time calculations. Make an enum for the seperate times and values, and use the enum
to calc the stats*/
template<typename OsModel_P, int nrOfBlocks = 1000, int blocksize = 512>
class VirtualSD {
public:
typedef OsModel_P OsModel;
typedef VirtualSD self_type;
typedef self_type* self_pointer_t;
typedef typename OsModel::block_data_t block_data_t;
typedef typename OsModel::size_t address_t;
enum {
BLOCK_SIZE = blocksize, ///< size of block in byte (usable payload)
};
enum {
NO_ADDRESS = (address_t)(-1), ///< address_t value denoting an invalid address
};
enum {
SUCCESS = OsModel::SUCCESS,
ERR_IO = OsModel::ERR_IO,
ERR_NOMEM = OsModel::ERR_NOMEM,
ERR_UNSPEC = OsModel::ERR_UNSPEC,
};
//BLOCK MEMORY CONCEPT
int init(){
static bool initialized = false;
if(initialized == false) {
memset(isWritten, false, nrOfBlocks);
memset(memory, 0, sizeof(memory[0][0]) * nrOfBlocks * blocksize);
initialized = true;
}
resetStats();
return SUCCESS;
}
int init(typename OsModel::AppMainParameter& value){
return init();
}
int read(block_data_t* buffer, address_t addr, address_t blocks = 1) {
++ios_;
duration_ += 2;
for (address_t i = 0; i < blocks; i++) {
//read(buffer + blocksize * i, addr + i);
if (addr + i < 0 || addr + i >= nrOfBlocks || addr + i == NO_ADDRESS) {
printf("OVERFLOW VIRTUAL SD. Attempted to access block %ju\n", (uintmax_t) (addr + i));
return ERR_UNSPEC;
}
++ios_;
++blocksRead_;
duration_ += 4;
//else if(!isWritten[block]) std::cerr << "READING EMPTY BLOCK" << std::endl;
for (int j = 0; j < blocksize; j++)
(buffer + blocksize * i)[j] = memory[addr+i][j];
//return SUCCESS;
duration_ -= 2;
--ios_;
}
return SUCCESS;
}
int write(block_data_t* buffer, address_t addr, address_t blocks = 1) {
++ios_;
duration_ += 4;
for (address_t i = 0; i < blocks; i++) {
//write(buffer + blocksize * i, addr + i);
++ios_;
++blocksWritten_;
duration_ += 8;
if (addr + i < 0 || addr + i >= nrOfBlocks || addr + i == NO_ADDRESS) {
printf("OVERFLOW VIRTUAL SD. Attempted to access block %ju\n", (uintmax_t) (addr + i));
return ERR_UNSPEC;
}
for (int j = 0; j < blocksize; j++)
{
memory[addr + i][j] = (buffer + blocksize * i)[j];
isWritten[addr + i] = true;
}
//return SUCCESS;
duration_ -= 6;
--ios_;
}
return SUCCESS;
}
int erase(address_t addr, address_t blocks = 1) {
for(address_t i = 0; i < blocks; i++)
{
if ( addr + i >= nrOfBlocks ) {
printf("OVERFLOW VIRTUAL SD. Attempted to access block %ju\n", (uintmax_t) (addr + i));
return ERR_UNSPEC;
}
for(address_t j = 0; j < blocksize; j++)
memory[i + addr][j] = 0;
}
return SUCCESS;
}
address_t size() {
return nrOfBlocks;
}
//EXTRA FUNCTIONALITY
/*
* Resets all the counters that keep track of the IO's
*/
void resetStats() {
blocksWritten_ = 0;
blocksRead_ = 0;
ios_ = 0;
duration_ = 0;
}
/*
* Prints usage statistics about the virtual sd card to the console.
*/
void printStats() {
printf("Blocks Written: %d \n", blocksWritten_);
printf("Blocks Read: %d\n", blocksRead_ );
printf("IOs: %d\n", ios_);
printf("Duration: %d\n", duration_);
printf("AvgIO: %d\n", duration_ / ios_);
}
/*
* Prints out a graphviz graph displaying every single byte.
* Non-null bytes are colored red so it is easier to see what parts are used.
* @param fromBlock The number of the block where to start displaying.
* @param toBlock The number of the block where to stop displaying.
*/
void printGraphBytes(int fromBlock, int toBlock, FILE* f)
{
if(fromBlock < 0 || toBlock > nrOfBlocks) return;
fprintf(f, "digraph BM { \n\t node [shape=none, margin=0]; \n");
fprintf(f, "\t sdcard [label=<");
printHTMLTableBytes(fromBlock, toBlock, f);
fprintf(f, ">];\n");
fprintf(f, "}\n");
}
/*
* Prints out a graphiz graph displaying the specified blocks.
* Used blocks are marked red.
* @param fromBlock The number of the block where to start displaying.
* @param toBlock The number of the block where to stop displaying.
*/
void printGraphBlocks(int fromBlock, int toBlock, FILE* f)
{
if(fromBlock < 0 || toBlock > nrOfBlocks) return;
fprintf(f, "digraph BM {\n\t node [shape=none, margin=0];\n");
fprintf(f, "\t sdcard [label=<");
printHTMLTableBlocks(fromBlock, toBlock, f);
fprintf(f, ">]\n");
fprintf(f, "}\n");
}
/*
* Helper for printGraphBytes
*/
void printHTMLTableBytes(int fromBlock, int toBlock, FILE* f)
{
if(fromBlock < 0 || toBlock > nrOfBlocks) return;
fprintf(f, "<table border=\"0\" cellborder=\"1\" cellspacing=\"0\">");
for(int block = fromBlock; block <= toBlock; block++)
{
fprintf(f, "\n\t\t<tr>\n");
for(int j = 0; j < blocksize; j++)
{
fprintf(f, "\t\t\t<td bgcolor=\"%s\">%3d</td>\n", ((int)memory[block][j] == 0 ? "#FFFFFF" : "#FF0000"), (int)memory[block][j]);
//std::cout << "\t\t\t<td bgcolor=\"" << ((int)memory[block][j] == 0 ? "#FFFFFF" : "#FF0000") << "\">" << " " << "</td>\n";
}
fprintf(f, "\t\t</tr>\n");
}
fprintf(f, "</table>");
}
/*
* Helper for printGraphBlocks
*/
void printHTMLTableBlocks(int fromBlock, int toBlock, FILE* f)
{
if(fromBlock < 0 || toBlock > nrOfBlocks) return;
fprintf(f, "<table border=\"0\" cellborder=\"1\" cellspacing=\"0\">");
fprintf(f, "\n\t\t<tr>\n");
for(int block = fromBlock; block <= toBlock; block++)
{
fprintf(f, "\t\t\t<td bgcolor=\"%s\">%d</td>\n", (!isWritten[block] ? "#FFFFFF" : "#FF0000"), isWritten[block]);
//std::cout << "\t\t\t<td bgcolor=\"" << ((int)memory[block][j] == 0 ? "#FFFFFF" : "#FF0000") << "\">" << " " << "</td>\n";
}
fprintf(f, "\t\t</tr>\n");
fprintf(f, "</table>");
}
void printASCIIOutputBytes(int fromBlock, int toBlock)
{
if(fromBlock < 0 || toBlock > nrOfBlocks) return;
for(int block = fromBlock; block <= toBlock; block++)
{
for(int j = 0; j < 20; j++)
{
printf("%3d|", ((int)memory[block][j]));
}
printf("\n");
}
}
void printASCIIOutputBlocks(int fromBlock, int toBlock)
{
if(fromBlock < 0 || toBlock > nrOfBlocks) return;
for(int block = fromBlock; block <= toBlock; block++)
{
printf("|%s", isWritten[block] ? "1" : " ");
}
printf("|\n");
}
void printGNUPLOTOutputBytes(address_t fromBlock, address_t toBlock, FILE* f)
{
if(fromBlock < 0 || toBlock > nrOfBlocks) return;
for(address_t block = fromBlock; block < toBlock; ++block)
{
for(int j = 0; j < blocksize; j++)
{
// fprintf(f, "%s ", ((int)memory[block][j] == 0 ? "1" : "0"));
fprintf(f, "%d ", ((int)memory[block][j]));
}
fprintf(f, "\n");
}
}
typedef int (*colorfunc)(address_t, int, int);
void printGNUPLOTOutputBytes(address_t fromBlock, address_t toBlock, FILE* f, colorfunc colorize)
{
if(fromBlock < 0 || toBlock > nrOfBlocks) return;
for(address_t block = fromBlock; block < toBlock; ++block)
{
for(int j = 0; j < blocksize; j++)
{
// fprintf(f, "%s ", ((int)memory[block][j] == 0 ? "1" : "0"));
fprintf(f, "%d ", colorize(block, j, (int)memory[block][j]));
}
fprintf(f, "\n");
}
}
void reset()
{
for (address_t i = 0; i < nrOfBlocks; i++)
isWritten[i] = false;
resetStats();
erase(0, nrOfBlocks);
}
void dumpToFile(FILE* f)
{
for(int i = 0; i < nrOfBlocks; ++i)
{
fwrite(memory[i], blocksize, 1, f);
}
}
private:
block_data_t memory[nrOfBlocks][blocksize];
bool isWritten[nrOfBlocks];
int blocksWritten_;
int blocksRead_;
int ios_;
int duration_;
};
} //NAMESPACE
#endif // __VIRTSDCARD_H__
| [
"henning@leetless.de"
] | henning@leetless.de |
b62f4a45d539a3168e840ba1756bbb7050106067 | 9b48ac2884fb28e188bca0644c3ef48482d43825 | /vcmap/ch09/SdiMfcDocViewTest/SdiMfcDocViewTestDoc.h | d9a5b0065d3a1d63223ecda4c57ee7f1cb2c698f | [] | no_license | skyformat99/mybooks | 3a4f6cc37cd10624d21693bc22d1d0be93c03509 | d0a04f3b1ba271225b6fc23cf8e6d06a88828c09 | refs/heads/master | 2020-03-19T03:58:35.895559 | 2018-05-31T05:49:18 | 2018-05-31T05:49:18 | null | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 600 | h | // SdiMfcDocViewTestDoc.h : CSdiMfcDocViewTestDoc 类的接口
//
#pragma once
class CSdiMfcDocViewTestDoc : public CDocument
{
protected: // 仅从序列化创建
CSdiMfcDocViewTestDoc();
DECLARE_DYNCREATE(CSdiMfcDocViewTestDoc)
// 属性
public:
// 操作
public:
// 重写
public:
virtual BOOL OnNewDocument();
virtual void Serialize(CArchive& ar);
// 实现
public:
virtual ~CSdiMfcDocViewTestDoc();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// 生成的消息映射函数
protected:
DECLARE_MESSAGE_MAP()
};
| [
"bluejoe2008@gmail.com"
] | bluejoe2008@gmail.com |
8304d9ba395e158557c3ba57cd3ab18fc2cbdd12 | dcb108bc87ac42c9072597dca4a938bbed669a45 | /FPS.cpp | d7b4c860cd9e79768fb4e44664245a9bb12f66ec | [] | no_license | TM-020222/0426_DxLibSample | 290c6bc448d3ae43f222946e76122a4ac28d3556 | 0dec5983c6fb26cdb58d7504ecdbfa8c06a64d2b | refs/heads/master | 2023-05-30T23:35:40.315331 | 2021-06-16T06:01:29 | 2021-06-16T06:01:29 | 361,605,255 | 0 | 0 | null | null | null | null | SHIFT_JIS | C++ | false | false | 3,001 | cpp | //FPSのソースファイル
#include"FPS.h"
#include"game.h"
//グローバル変数
FPS fps;
//関数
/// <summary>
/// FPS値を計測し、値を更新する
/// </summary>
/// <param name=""></param>
VOID FPSUpdate(VOID)
{
//一番最初の処理
if (fps.IsInitFlg == FALSE)
{
//測定開始時刻をマイクロ秒単位で取得
fps.StartTime = GetNowHiPerformanceCount(); //windowsが起動してから経過した時間(マイクロ秒)
fps.IsInitFlg = TRUE; //フラグを建てる
}
//現在の時刻をマイクロ秒単位で取得
fps.NowTime = GetNowHiPerformanceCount();
//前回取得した時間からの経過時間を秒(小数)に変換してからセット
fps.DeltaTime = (fps.NowTime - fps.OldTime) / 1000000.0f; //1,000,000
//今回取得した時間を保存
fps.OldTime = fps.NowTime;
//1フレーム目〜FPS設定値までは、カウントアップ
if (fps.Count < fps.SampleRate)
{
//カウンタを増やす
fps.Count++;
}
else
{
//FPS設定値のフレームで、平均FPSを計算
//現在の時刻から、0フレーム目の時間を引き、FPSの数値で割る
//現在の平均FPS値が出る
fps.DrawValue = 1000000.0f / ((fps.NowTime - fps.StartTime) / (float)fps.SampleRate);
//測定開始時刻をマイクロ秒単位で取得
fps.StartTime = GetNowHiPerformanceCount(); //windowsが起動してから経過した時間(マイクロ秒)
//カウンタ初期化
fps.Count = 1;
}
return;
}
/// <summary>
/// 平均FPS値を描画する
/// </summary>
/// <param name=""></param>
VOID FPSDraw(VOID)
{
if (GAME_DEBUG == TRUE)
{
//文字列を描画
DrawFormatString(0, GAME_HEIGHT - 20, GetColor(0, 255, 0), "FPS:%.1f", fps.DrawValue);
}
return;
}
/// <summary>
/// FPSで処理を待つ
/// </summary>
/// <param name=""></param>
VOID FPSWait(VOID)
{
//現在の時刻 - 最初の時刻で、現在かかっている時刻を取得する
LONGLONG resultTime = fps.NowTime - fps.StartTime;
//待つべきミリ秒数(1秒 / FPS値 * 現在のフレーム数)から、現在かかっている時刻を引く
LONGLONG waitTime = 1000000.0f / fps.Value * fps.Count - resultTime;
//マイクロ秒からミリ秒に変換
waitTime /= 1000.0f;
//処理が早かったら、処理を待つ
if (waitTime > 0)
{
WaitTimer(waitTime); //因数ミリ秒待つ
}
//垂直同期をOFFにしているか?
if (GetWaitVSyncFlag() == FALSE)
{
//FPS最大値ではないとき
if (fps.Value < GAME_FPS_MAX)
{
//1秒毎のFPS値よりも、待つ時間が小さいときは、もっとFPS値を上げてもいい
//待つ時間 10ミリ <= 1秒 / 60FPS = 16.6666ミリ、もう少し早くできる
if (waitTime > 0
&& waitTime <= 1000.0f / fps.Value)
{
//fps.Count++;
fps.Value++;
}
else
{
//FPS値が追いついておらず、遅いときは、FPS値を下げる
if (fps.Value > GAME_FPS_MIN)
{
fps.Value--;
}
}
}
}
} | [
"hj-g20017@sist.ac.jp"
] | hj-g20017@sist.ac.jp |
257cf6025c145365058708dc551c19cdd8b866ed | e779a9d5f88dc9dd8e2e334624cfc0182598bb4e | /parser.h | ec0070ab4e5f2641e0c1fccd766f3c3308ef5140 | [] | no_license | mwill3324/TypeCheckerP3 | df5fe73df8e5e78fbdad48b9283241f13828138d | 1f9b2723e57738b4fc5e1a8eab42889d316eb7a7 | refs/heads/master | 2021-05-14T02:54:10.623348 | 2018-01-07T23:32:37 | 2018-01-07T23:32:37 | 116,607,444 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,042 | h |
#ifndef __PARSER_H__
#define __PARSER_H__
#include <string>
#include "lexer.h"
///////////////////
//#include "lexer.cc"
//#include "inputbuf.cc"
class Parser {
private:
LexicalAnalyzer lexer;
void syntax_error();
Token expect(TokenType expected_type);
Token peek();
void parse_new();
void parse_program();
void parse_decl();
void parse_type_decl_section();
void parse_type_decl_list();
void parse_type_decl();
void parse_type_name();
void parse_var_decl_section();
void parse_var_decl_list();
void parse_var_decl();
void parse_id_list();
void parse_body();
void parse_stmt_list();
void parse_stmt();
void parse_assign_stmt();
void parse_while_stmt();
void parse_do_stmt();
void parse_switch_stmt();
void parse_case_list();
void parse_case();
void parse_expr();
void parse_term();
void parse_factor();
void parse_condition();
void parse_primary();
void parse_relop();
public:
void ParseInput();
};
#endif
| [
"MarcusWilliams.School@yahoo.com"
] | MarcusWilliams.School@yahoo.com |
06179da9e5331e41a6ab64cbd6644b6238a28ec2 | 4bab98acf65c4625a8b3c757327a8a386f90dd32 | /ros2-windows/include/geometry_msgs/msg/detail/twist_with_covariance__traits.hpp | de89741f3d0c4ebe1054fc7241dcc7050d144f1c | [] | no_license | maojoejoe/Peach-Thinning-GTRI-Agricultural-Robotics-VIP | e2afb08b8d7b3ac075e071e063229f76b25f883a | 8ed707edb72692698f270317113eb215b57ae9f9 | refs/heads/master | 2023-01-15T06:00:22.844468 | 2020-11-25T04:16:15 | 2020-11-25T04:16:15 | 289,108,482 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,308 | hpp | // generated from rosidl_generator_cpp/resource/idl__traits.hpp.em
// with input from geometry_msgs:msg\TwistWithCovariance.idl
// generated code does not contain a copyright notice
#ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__TRAITS_HPP_
#define GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__TRAITS_HPP_
#include "geometry_msgs/msg/detail/twist_with_covariance__struct.hpp"
#include <rosidl_runtime_cpp/traits.hpp>
#include <stdint.h>
#include <type_traits>
// Include directives for member types
// Member 'twist'
#include "geometry_msgs/msg/detail/twist__traits.hpp"
namespace rosidl_generator_traits
{
template<>
inline const char * data_type<geometry_msgs::msg::TwistWithCovariance>()
{
return "geometry_msgs::msg::TwistWithCovariance";
}
template<>
struct has_fixed_size<geometry_msgs::msg::TwistWithCovariance>
: std::integral_constant<bool, has_fixed_size<geometry_msgs::msg::Twist>::value> {};
template<>
struct has_bounded_size<geometry_msgs::msg::TwistWithCovariance>
: std::integral_constant<bool, has_bounded_size<geometry_msgs::msg::Twist>::value> {};
template<>
struct is_message<geometry_msgs::msg::TwistWithCovariance>
: std::true_type {};
} // namespace rosidl_generator_traits
#endif // GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__TRAITS_HPP_
| [
"aidencfarrar@gmail.com"
] | aidencfarrar@gmail.com |
76a14435230dbef5bd1fab938f668ca14752551b | ef2f697fdbba6585b8bd0cd82daf38451795e3df | /samples/toolbox_sample.cpp | 292ec84ee8fd6ace5ca6b69881c9770cd1a7f0ea | [
"MIT"
] | permissive | lineCode/v8toolkit | de7174f660e04a97380138363638e289747bb7ea | 1578b8b9bf96e67a00fbc7f5b6a4e501b375e66c | refs/heads/master | 2021-01-17T21:04:16.124459 | 2017-02-19T11:47:26 | 2017-02-19T11:47:26 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,526 | cpp | #include <string>
#include <fstream>
#include "v8toolkit.h"
using namespace v8toolkit;
void check_maybe_value(v8::MaybeLocal<v8::Value> maybe_value)
{
assert(!maybe_value.IsEmpty());
auto local = maybe_value.ToLocalChecked();
v8::String::Utf8Value utf8(local);
assert(!strcmp(*utf8, "yay"));
}
class Point {
public:
Point(){instance_count++;}
~Point(){instance_count--;}
static int get_instance_count(){
return instance_count;
}
static int instance_count;
};
int Point::instance_count = 0;
int foo(int i){return i;}
void bar(){}
int main(int argc, char* argv[])
{
// parse out any v8-specific command line flags
// process_v8_flags(argc, argv);
// expose_gc(); // force garbage collection to be exposed even if no command line parameter for it
// Initialize V8. q
v8::V8::InitializeICU();
#ifdef USE_SNAPSHOTS
v8::V8::InitializeExternalStartupData(argv[0]);
#endif
v8::Platform* platform = v8::platform::CreateDefaultPlatform();
v8::V8::InitializePlatform(platform);
v8::V8::Initialize();
// Create a new Isolate and make it the current one.
ArrayBufferAllocator allocator;
v8::Isolate::CreateParams create_params;
create_params.array_buffer_allocator = &allocator;
v8::Isolate* isolate = v8::Isolate::New(create_params);
// runs the following code in an isolate and handle scope (no context created yet)
scoped_run(isolate, [isolate](){
v8::Local<v8::ObjectTemplate> global_templ = v8::ObjectTemplate::New(isolate);
v8toolkit::add_assert(isolate, global_templ);
add_print(isolate, global_templ);
std::vector<std::string> paths = {"./"};
add_require(isolate, global_templ, paths);
add_module_list(isolate, global_templ);
add_function(isolate, global_templ, "foo", &foo);
add_function(isolate, global_templ, "bar", &bar);
Point p;
add_function(isolate, global_templ, "point_instance_count", &Point::get_instance_count);
int i = 42;
expose_variable(isolate, global_templ, "exposed_variable", i);
expose_variable_readonly(isolate, global_templ, "exposed_variable_readonly", i);
int lambda_function_int = 1;
add_function(isolate, global_templ, "lambda_function", [lambda_function_int](int j)->int{return lambda_function_int + j;});
v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global_templ);
// runs the following code in an isolate, handle, and context scope
scoped_run(isolate, context, [isolate, context](){
// Create a string containing the JavaScript source code.
std::string js_code;
if(!get_file_contents("toolbox_sample.js", js_code)) {
assert(false);
}
v8::Local<v8::String> source =
v8::String::NewFromUtf8(isolate, js_code.c_str(),
v8::NewStringType::kNormal).ToLocalChecked();
// Compile the source code.
v8::Local<v8::Script> script = v8::Script::Compile(context, source).ToLocalChecked();
auto result = script->Run(context);
check_maybe_value(result);
});
});
// Dispose the isolate and tear down V8.
delete_require_cache_for_isolate(isolate);
isolate->Dispose();
v8::V8::Dispose();
v8::V8::ShutdownPlatform();
delete platform;
return 0;
}
| [
"xaxxon@gmail.com"
] | xaxxon@gmail.com |
5351e7f680aad2aef5f57cc2fba3886b6c6d8803 | 2b93e4f8eac9017364a87fc71baa924d02534c5a | /Alhythm/src/Game_Object_Gauge.h | d896ccd876a2557bf021e6b95af6d908904bb4c5 | [
"MIT"
] | permissive | shota-kawatuji/Siv3D_Alhythm | 92ad3d06b13e0800136ef1fa65396723d20df44f | d602832e535831a07d0e7c3fb589caa5d356aaf2 | refs/heads/master | 2022-01-14T15:44:21.124452 | 2019-04-12T03:58:54 | 2019-04-12T03:58:54 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 931 | h | #pragma once
#define NO_S3D_USING
#include <Siv3D.hpp>
namespace Game{
namespace Object{
// ゲームプレイ画面のクリアゲージ(縦棒)
class Gauge{
public:
Gauge();
// パーセンテージを加減算
void Update( double persentDiff );
void Draw() const;
// ゲージがクリアライン(70%)以上か
bool IsOverClearPersent() const noexcept;
private:
// 増減するゲージの高さと位置
int height;
int posY;
// 現在のクリアゲージの値(0.0~100.0)
double persentage;
// クリアゲージの値の表示
s3d::Font persentText;
s3d::String persentStr;
// クリアゲージの70%ライン
s3d::Line clearLine;
// ゲージ本体の表示 枠(不変)と増減する方
s3d::RoundRect backGaugeRect;
s3d::RoundRect frontGaugeRect;
// 増減ゲージの色
s3d::Color frontColor;
};
}// namespace Object
}// namespace Game | [
"albus0sh@gmail.com"
] | albus0sh@gmail.com |
0f2e13f0ca1da033a40e8cbebbc3f1c14682b9e9 | 0a6d345da918fb8e3cbb5efed78e6a38b7e32dce | /src/AlgModule/ObjDetect/Yolov3/MTCNN.cpp | bff219725683178c2894e47caec3258923455b68 | [] | no_license | Morgan-Gan/VisionAlg_CPP | 889e6f0eaac3dd9b45c06682204b22a7f8c00ddd | 7059097427487f6dbc768560ccb88d445ee6bd60 | refs/heads/master | 2022-11-23T01:31:38.208615 | 2020-07-28T12:11:21 | 2020-07-28T12:11:21 | 277,686,122 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 15,323 | cpp | #include "MTCNN.h"
#include <numeric>
#include <utility>
#include <future>
#include "eigen/Eigen/Eigen"
#define PNET_IMAGE_SIZE 12
#define RNET_IMAGE_SIZE 24
#define ONET_IMAGE_SIZE 48
#ifndef PNET_THREAD_NUM
#define PNET_THREAD_NUM 2
#endif
using namespace YOLOV3_ALG;
using namespace Eigen;
int MTCNN::InitDetector(PTModelParam pparam)
{
//0. 判断输入参数是否合法(暂时不检查,后面补上);
mtParam = *pparam;
//1, 初始化各网络
#ifdef USE_PNET_MULTI_THREAD
//thread pool
mWorker.reset(new BThreadPool(PNET_THREAD_NUM));
#endif
//pnet
mpPNET = torch::jit::load(pparam->model_path[0]);
//rnet
mpRNET = torch::jit::load(pparam->model_path[1]);
//onet
mpONET = torch::jit::load(pparam->model_path[2]);
//2. to device
mpPNET.to(torch::Device(pparam->device_type, pparam->gpu_id));
mpRNET.to(torch::Device(pparam->device_type, pparam->gpu_id));
mpONET.to(torch::Device(pparam->device_type, pparam->gpu_id));
return 0;
}
int MTCNN::UnInitDetector()
{
return 0;
}
int MTCNN::DetectFace(cv::Mat & src, std::vector<cv::Rect>& outFaces)
{
BTimer t;
outFaces.clear();
t.reset();
int ret = PNET(src, outFaces);
if (ret < 0)
{
return ret;
}
LOGI("Pnet time cost: {}", t.elapsed());
t.reset();
ret = RNET(src, outFaces);
if (ret < 0)
{
return ret;
}
LOGI("Rnet time cost: {}", t.elapsed());
t.reset();
ret = ONET(src, outFaces);
LOGI("Onet time cost: {}", t.elapsed());
return ret;
}
int MTCNN::PNET(cv::Mat & src, std::vector<cv::Rect>& outFaces)
{
//1. 计算金字塔
BTimer t;
GetPyrScalors(src.cols, src.rows, mtParam.alg_param.scale_factor, mtParam.alg_param.min_face);
LOGI("pyramid time cost: {}", t.elapsed());
//2. 分层计算
LOGI("pyramid total num: {}", mvScales.size());
if (mvScales.size() <= 0)
{
return -1;
}
std::vector<std::vector<float>> layerBoxes;
std::vector<std::vector<float>> layerScores;
layerBoxes.resize(mvScales.size());
layerScores.resize(mvScales.size());
#ifdef USE_PNET_MULTI_THREAD //多线程处理
std::vector<std::future<int>> res;
//2.1 pre
std::vector<std::vector<torch::jit::IValue>> inputs;
inputs.resize(mvScales.size());
for (int i = 0; i < mvScales.size(); i++)
{
res.emplace_back(mWorker->AddTask(&MTCNN::PrePNET, this, std::ref(src), mvScales[i], std::ref(inputs[i])));
}
for (auto&& i : res)
{
i.get();
}
res.clear();
//2.2 forward
std::vector<torch::jit::IValue> outputs;
for (int i = 0; i < inputs.size(); i++)
{
outputs.emplace_back(mpPNET.forward(inputs[i]));
}
//2.3 post
for (int i = 0; i < mvScales.size(); i++)
{
res.emplace_back(mWorker->AddTask(&MTCNN::PostPNET, this, std::ref(outputs[i]),
mvScales[i], std::ref(layerBoxes[i]), std::ref(layerScores[i])));
}
for (auto&& i : res)
{
i.get();
}
#else //单线程处理
for (int i = 0; i < mvScales.size(); i++)
{
RunPNetLayer(src, i, layerBoxes[i], layerScores[i]);
}
#endif
//3. NMS
std::vector<float> bboxes;
std::vector<float> score;
for (int i = 0; i < layerBoxes.size(); i++)
{
bboxes.insert(bboxes.end(), layerBoxes[i].begin(), layerBoxes[i].end());
score.insert(score.end(), layerScores[i].begin(), layerScores[i].end());
}
t.reset();
NMS(bboxes, score, 0.7, 0);
LOGI("Pnet NMS time cost: {}", t.elapsed());
//4. 组合结果
for (int i = 0; i < bboxes.size() / 4; i++)
{
cv::Rect r = cv::Rect(bboxes[4 * i], bboxes[4 * i + 1], bboxes[4 * i + 2], bboxes[4 * i + 3]);
outFaces.push_back(r);
}
return 0;
}
int MTCNN::PrePNET(cv::Mat& src, float scalor, std::vector<torch::jit::IValue>& ti)
{
//1. 这一层的Image
BTimer t;
int nw = src.cols * scalor;
int nh = src.rows * scalor;
cv::Mat image;
t.reset();
cv::resize(src, image, { nw, nh });
LOGI("pnet layer resize : {} us", t.elapsed_micro());
//Image to Tensor
cv::Mat img_float;
image.convertTo(img_float, CV_32F);
img_float -= mtParam.mean_value[0];
if (std::abs(1.0f - mtParam.scale_factor[0]) > 0.001)
{
img_float *= mtParam.scale_factor[0];
}
torch::Tensor input = torch::zeros({ image.rows, image.cols, image.channels() });
memcpy(input.data_ptr(), img_float.data, input.numel() * sizeof(float));
input = input.to(torch::Device(mtParam.device_type, mtParam.gpu_id));
input = input.permute({ 2, 0, 1 });
input.unsqueeze_(0);
ti.clear();
ti.emplace_back(std::move(input));
return 0;
}
int MTCNN::PostPNET(torch::jit::IValue& to, float scalor, std::vector<float>& outBoxes, std::vector<float>& outScores)
{
BTimer t;
t.reset();
auto ot = to.toTuple();
std::vector<torch::jit::IValue> inputs = ot->elements();
auto cls = inputs[0].toTensor().cpu();
auto reg = inputs[1].toTensor().cpu();
auto cls_map_h = cls.size(2);
auto cls_map_w = cls.size(3);
auto cls_viewer = cls.accessor<float, 4>();
auto reg_viewer = reg.accessor<float, 4>();
std::vector<float> bboxes; //M * 4
std::vector<float> score; //M * 1
std::vector<int> pos; //M * 2
for (int y = 0; y < cls_map_h; y++)
{
for (int x = 0; x < cls_map_w; x++)
{
if (cls_viewer[0][1][y][x] > mtParam.alg_param.cls_thre[0])
{
score.push_back(cls_viewer[0][1][y][x]);
pos.push_back(x);
pos.push_back(y);
bboxes.push_back(reg_viewer[0][0][y][x]);
bboxes.push_back(reg_viewer[0][1][y][x]);
bboxes.push_back(reg_viewer[0][2][y][x]);
bboxes.push_back(reg_viewer[0][3][y][x]);
}
}
}
LOGI("pnet layer feature map extract time: {}", t.elapsed());
if (bboxes.size() <= 0)
{
return 0;
}
//5. 坐标映射回原图
t.reset();
GenerateBBox(bboxes, pos, scalor);
LOGI("pnet GenerateBBox time: {}", t.elapsed());
//6. NMS
t.reset();
NMS(bboxes, score, 0.5, 0);
LOGI("pnet NMS time: {}", t.elapsed());
//7. 填充输出
outBoxes = std::move(bboxes);
outScores = std::move(score);
return 0;
}
int MTCNN::RunPNetLayer(cv::Mat& src, int scale_idx, std::vector<float>& outBoxes, std::vector<float>& outScores)
{
float scalor = mvScales[scale_idx];
std::vector<torch::jit::IValue> inputs;
//预处理
PrePNET(src, scalor, inputs);
//网络前向计算
auto&& to = mpPNET.forward(inputs);
//预测结果处理
PostPNET(to, scalor, outBoxes, outScores);
return 0;
}
int MTCNN::NMS(std::vector<float>& bbox, std::vector<float>& score, float thre, int type) const
{
typedef struct TBBox
{
int x1;
int y1;
int x2;
int y2;
int order;
float score;
float area;
bool exist;
}TBBox;
std::vector<TBBox> tbox;
for (int i = 0; i < score.size(); i++)
{
TBBox b;
b.x1 = bbox[i * 4 + 0];
b.y1 = bbox[i * 4 + 1];
b.x2 = bbox[i * 4 + 2] + b.x1;
b.y2 = bbox[i * 4 + 3] + b.y1;
b.order = i;
b.score = score[i];
b.exist = true;
b.area = bbox[i * 4 + 2] * bbox[i * 4 + 3];
tbox.push_back(b);
}
//升序
std::sort(tbox.begin(), tbox.end(), [](const TBBox& left, const TBBox& right) {
return left.score < right.score;
});
std::vector<int> heros;
int order = 0;
float IOU = 0;
float maxX = 0;
float maxY = 0;
float minX = 0;
float minY = 0;
while (tbox.size() > 0)
{
//最后的score是最大的
TBBox tb = tbox.back();
order = tb.order;
tbox.pop_back();
if (order < 0)
continue;
//保存当前box的索引
heros.push_back(order);
//遍历时忽略掉
tb.exist = false;
for (auto &i : tbox)
{
if (!i.exist)
continue;
//计算当前box与tb的交并比
auto& ti = i;
maxX = ti.x1 > tb.x1 ? ti.x1 : tb.x1;
maxY = ti.y1 > tb.y1 ? ti.y1 : tb.y1;
minX = ti.x2 < tb.x2 ? ti.x2 : tb.x2;
minY = ti.y2 < tb.y2 ? ti.y2 : tb.y2;
maxX = ((minX - maxX + 1) > 0) ? (minX - maxX + 1) : 0;
maxY = ((minY - maxY + 1)>0) ? (minY - maxY + 1) : 0;
//IOU reuse for the area of two bbox
IOU = maxX * maxY;
if (type == 0)
{
//IOU
IOU = IOU / (tb.area + ti.area - IOU);
}
else
{
//IOM
IOU = IOU / (tb.area > ti.area ? ti.area : tb.area);
}
//compare
if (IOU > thre)
{
ti.exist = false;
ti.order = -1;
}
}
}
//结果
std::vector<float> outbox;
std::vector<float> outscore;
for (auto& i : heros)
{
outscore.push_back(score[i]);
outbox.push_back(bbox[4 * i]);
outbox.push_back(bbox[4 * i + 1]);
outbox.push_back(bbox[4 * i + 2]);
outbox.push_back(bbox[4 * i + 3]);
}
bbox.clear();
bbox = std::move(outbox);
score.clear();
score = std::move(outscore);
return 0;
}
//生成bbox
int MTCNN::GenerateBBox(std::vector<float>& bbox, std::vector<int>& pos, float scalor) const
{
//0.
static const int stride = 2;
static const int cellsize = PNET_IMAGE_SIZE;
//1. 转换成cv::Mat(后续可考虑使用eigen)
int w = 4;
int h = bbox.size() / w; //h = pos.size() / 2;
float gx;
float gy;
float* ptr;
if (h != pos.size() / 2)
{
bbox.clear();
return -1;
}
//h*w的矩阵,标识偏移量
Map<Matrix<float, Eigen::Dynamic, Eigen::Dynamic, RowMajor> > reg(bbox.data(), h, w);
//h*2的矩阵,标识Patch with height
Map<Matrix<int, Eigen::Dynamic, Eigen::Dynamic, RowMajor> > gp(pos.data(), h, 2);
MatrixXf Gstart = gp.cast<float>();
Gstart.array() *= (stride / scalor);
//reg 缩放回原图尺寸
reg.col(0) *= (cellsize / scalor);
reg.col(1) *= (cellsize / scalor);
reg.col(2).array() = reg.col(2).array().exp();
reg.col(3).array() = reg.col(3).array().exp();
reg.col(2).array() *= (cellsize / scalor);
reg.col(3).array() *= (cellsize / scalor);
//reg加上起点及终点偏移量
reg.col(0) += Gstart.col(0);
reg.col(1) += Gstart.col(1);
//
return 0;
}
int MTCNN::SquareBBox(std::vector<cv::Rect>& rect)
{
int size;
cv::Rect r;
for (auto& i : rect)
{
size = std::max(i.width, i.height);
r.x = i.x + i.width * 0.5 - size * 0.5;
r.y = i.y + i.height * 0.5 - size * 0.5;
r.width = size;
r.height = size;
i = r;
}
return 0;
}
int MTCNN::PadBBox(cv::Rect rect, cv::Rect & rdst, cv::Rect & rsrc, int W, int H)
{
//original
int x0 = rect.x;
int y0 = rect.y;
int x1 = rect.width + x0;
int y1 = rect.height + y0;
//src, dst
int sx0, sy0, sx1, sy1;
int dx0, dy0, dx1, dy1;
int minx, miny;
sx0 = x0;
dx0 = 0;
sy0 = y0;
dy0 = 0;
sx1 = x1;
dx1 = rect.width;
sy1 = y1;
dy1 = rect.height;
//边界判断
if (x0 < 0)
{
sx0 = 0;
dx0 = -x0;
}
if (y0 < 0)
{
sy0 = 0;
dy0 = -y0;
}
if (x1 > W - 1)
{
sx1 = W - 1;
dx1 = sx1 - sx0;
}
if (y1 > H - 1)
{
sy1 = H - 1;
dy1 = sy1 - sy0;
}
//src,dst的shape要一致
miny = std::min(dy1 - dy0, sy1 - sy0);
dy1 = dy0 + miny;
sy1 = sy0 + miny;
minx = std::min(dx1 - dx0, sx1 - sx0);
dx1 = dx0 + minx;
sx1 = sx0 + minx;
//填充输出
rsrc = { sx0, sy0, sx1 - sx0, sy1 - sy0 };
rdst = { dx0, dy0, dx1 - dx0, dy1 - dy0 };
return 0;
}
int MTCNN::ReProjectBBox(std::vector<float>& origin, std::vector<float>& bbox)
{
//wrap to matrix
int N = bbox.size() / 4;
//
Map<Matrix<float, Eigen::Dynamic, Eigen::Dynamic, RowMajor>> mo(origin.data(), N, 4);
Map<Matrix<float, Eigen::Dynamic, Eigen::Dynamic, RowMajor>> mb(bbox.data(), N, 4);
//scale
mb.col(0).array() *= mo.col(2).array();
mb.col(1).array() *= mo.col(3).array();
mb.col(0) += mo.col(0);
mb.col(1) += mo.col(1);
//w,h
mb.col(2).array() = mb.col(2).array().exp();
mb.col(3).array() = mb.col(3).array().exp();
mb.col(2).array() *= mo.col(2).array();
mb.col(3).array() *= mo.col(3).array();
return 0;
}
int MTCNN::RunRONet(torch::jit::script::Module& net,
cv::Mat & src,
std::vector<cv::Rect>& outFaces,
int IMAGE_SIZE)
{
int stage = 1;
if (IMAGE_SIZE == 48)
stage = 2;
cv::Scalar mean = mtParam.mean_value[stage];
float scalor = mtParam.scale_factor[stage];
float cls_thre = mtParam.alg_param.cls_thre[stage];
//0.
if (outFaces.size() <= 0)
{
return 0;
}
int W = src.cols;
int H = src.rows;
//1. 生成bbox
SquareBBox(outFaces);
//2. pad
cv::Rect rdst, rsrc;
int size;
std::vector<cv::Mat> imgs;
std::vector<float> bboxOriginal;
for (int i = 0; i < outFaces.size(); i++)
{
size = outFaces[i].width;
cv::Mat crop = cv::Mat::zeros(cv::Size(size, size), CV_8UC3);
PadBBox(outFaces[i], rdst, rsrc, W, H);
if (rdst.x < 0 || rdst.y < 0 || rsrc.x < 0 || rsrc.y < 0 ||
rdst.width > size || rdst.height > size ||
rsrc.width > W || rsrc.height > H)
{
continue;
}
//copy
src(rsrc).copyTo((cv::Mat)crop(rdst));
//
cv::resize(crop, crop, cv::Size(IMAGE_SIZE, IMAGE_SIZE));
cv::Mat crop_float;
crop.convertTo(crop_float, CV_32F);
crop_float -= mean;
if (std::abs(1.0f - scalor) > 0.001)
crop_float *= scalor;
imgs.emplace_back(crop_float);
bboxOriginal.push_back(outFaces[i].x);
bboxOriginal.push_back(outFaces[i].y);
bboxOriginal.push_back(outFaces[i].width);
bboxOriginal.push_back(outFaces[i].height);
}
//3. predict
int N = imgs.size();
torch::Tensor input = torch::zeros({ N, IMAGE_SIZE, IMAGE_SIZE, 3 });
float* head = input.data<float>();
for (int i = 0; i < imgs.size(); i++)
{
memcpy(head, imgs[i].data, sizeof(float) * 3 * IMAGE_SIZE * IMAGE_SIZE);
head += 3 * IMAGE_SIZE * IMAGE_SIZE;
}
input = input.to(torch::Device(mtParam.device_type, mtParam.gpu_id));
input = input.permute({ 0, 3, 1, 2 });
std::vector<torch::jit::IValue> inputs = { input };
auto&& out = net.forward(inputs);
auto ot = out.toTuple();
inputs = ot->elements();
auto cls = inputs[0].toTensor().cpu();
auto reg = inputs[1].toTensor().cpu();
std::vector<float> bboxes; //用于标识回归框
std::vector<float> score; //分数
std::vector<int> keep_index; //位置
std::vector<float> resBBoxes; // 原框及最终框(复用)
auto cls_viewer = cls.accessor<float, 2>();//N * 2
auto reg_viewer = reg.accessor<float, 2>();//N * 4
for (int i = 0; i < N; i++)
{
if (cls_viewer[i][1] > cls_thre)
{
score.push_back(cls_viewer[i][1]);
keep_index.push_back(i);
bboxes.push_back(reg_viewer[i][0]);
bboxes.push_back(reg_viewer[i][1]);
bboxes.push_back(reg_viewer[i][2]);
bboxes.push_back(reg_viewer[i][3]);
}
}
outFaces.clear();
if (score.size() <= 0)
return 0;
// reproject to original
for (auto& i : keep_index)
{
resBBoxes.push_back(bboxOriginal[4 * i]);
resBBoxes.push_back(bboxOriginal[4 * i + 1]);
resBBoxes.push_back(bboxOriginal[4 * i + 2]);
resBBoxes.push_back(bboxOriginal[4 * i + 3]);
}
bboxOriginal = std::move(resBBoxes);
keep_index.clear();
ReProjectBBox(bboxOriginal, bboxes);
//NMS
if (IMAGE_SIZE == 24)
NMS(bboxes, score, 0.6, 0);
else
NMS(bboxes, score, 0.6, 1);
//7. output
outFaces.clear();
for (int i = 0; i < bboxes.size() / 4; i++)
{
cv::Rect r = cv::Rect(bboxes[4 * i], bboxes[4 * i + 1], bboxes[4 * i + 2], bboxes[4 * i + 3]);
outFaces.push_back(r);
}
return 0;
}
int MTCNN::RNET(cv::Mat & src, std::vector<cv::Rect>& outFaces)
{
return RunRONet(mpRNET, src, outFaces, RNET_IMAGE_SIZE);
}
int MTCNN::ONET(cv::Mat & src, std::vector<cv::Rect>& outFaces)
{
return RunRONet(mpONET, src, outFaces, ONET_IMAGE_SIZE);
return 0;
}
int MTCNN::GetPyrScalors(int W, int H, float scale_factor, int min_face_size)
{
//0, 准备金字塔层数
mvScales.clear();
float minl = H > W ? W : H;
float base_scale = float(PNET_IMAGE_SIZE) / float(min_face_size);
int face_count = 0;
while (true)
{
float s = base_scale * (float)pow(double(scale_factor), double(face_count));
if (floor(double(minl * s)) < PNET_IMAGE_SIZE)
break;
mvScales.push_back(s);
face_count++;
}
return 0;
} | [
"2545732723@qq.com"
] | 2545732723@qq.com |
a7ed0404bf21ce615eda098057029f67bbb0dd4e | 1d085c881bb592adcfaf14ad26370bf2befc92cc | /src/basis/pkt.cpp | 6694a1c350c7e0cabb21fafa222df26a9edad6c6 | [] | no_license | Young-Geo/Ros_Car | 2b87c3d67186a26d36c0e0a837aaeaecd1c82f05 | fe03f291c78c7dc6a437cbead908051045dd4330 | refs/heads/master | 2020-03-06T22:29:40.267059 | 2018-06-20T04:04:34 | 2018-06-20T04:04:34 | 127,104,521 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,526 | cpp | #include "pkt.h"
#include "xchain.h"
int pkt_check_sum(unsigned char * buf , int size , unsigned char checksum )
{
int i ;
unsigned char sum = 0 ;
for ( i = 0 ; i < size ; i ++ )
{
sum ^= buf[i] ;
}
if ( checksum != sum )
{
return 0;
}
return 1 ;
}
unsigned char pkt_build_check_sum(unsigned char * buf , int size )
{
int i ;
unsigned char sum = 0 ;
for ( i = 0 ; i < size ; i ++ )
{
sum ^= buf[i] ;
}
return sum ;
}
unsigned short pkt_build_short_check_sum(unsigned char * buf , int size )
{
int i ;
unsigned short sum = 0 ;
for ( i = 0 ; i < size ; i ++ )
{
sum ^= buf[i] ;
}
return sum ;
}
unsigned char * pkt_build_byte_tag(unsigned char * buf, unsigned char tag)
{
if (!buf) {
return NULL;
}
*buf = tag;
return ++buf;
}
unsigned char * pkt_build_short_tag(unsigned char * buf, unsigned short tag)
{
if (!buf) {
return NULL;
}
*((unsigned short *)buf) = tag;
return (buf += 2);
}
unsigned char * pkt_match_head(unsigned char *buf, int len, unsigned char tag)
{
int i = 0;
if (!buf) {
return NULL;
}
for (i = 0; i < len; ++i)
{
if (*buf == tag) {
return buf;
}
++buf;
}
/*
while (1)
{
if (*buf == '\0')
break;
if (*buf == tag) {
return buf;
}
++buf;
}*/
return NULL;
}
int pkt_match_short_tag ( xchain * data , unsigned short tag )
{
static unsigned char buf [BUFFER_SIZE] ;
int size , i , match = 0 ;
//find the s
while (1)
{
//get data
size = xchain_size(data) ;
size = XXMIN(size, (int)sizeof(buf)) ;
if ( size <= 0 )
{
//data chain is empty
break ;
}
xchain_get(data, buf, size) ;
//get the START tag
for (i = 0; i < size; i+=2)
{
if ( *((unsigned short *)(buf+i)) == tag )
{
match = 1 ;
break ;
}
}
if ( match )
{
//got start tag
xchain_delete(data, i) ;
break ;
}
//can not find start tag
xchain_delete(data, size) ;
}
return match ;
}
int pkt_match_tag ( xchain * data , unsigned char tag )
{
static unsigned char buf [BUFFER_SIZE] ;
int size , i , match = 0 ;
//find the s
while (1)
{
//get data
size = xchain_size(data) ;
size = XXMIN(size, (int)sizeof(buf)) ;
if ( size <= 0 )
{
//data chain is empty
break ;
}
xchain_get(data, buf, size) ;
//get the START tag
for ( i = 0 ; i < size ; i ++ )
{
if ( buf[i] == tag )
{
match = 1 ;
break ;
}
}
if ( match )
{
//got start tag
xchain_delete(data, i) ;
break ;
}
//can not find start tag
xchain_delete(data, size) ;
}
return match ;
}
unsigned char * pkt_match_short_head(unsigned char *buf, int len, unsigned short tag)
{
int i = 0;
if (!buf) {
return NULL;
}
for (i = 0; i < len; i+=2)
{
if (*buf == tag) {
return buf;
}
buf+=2;
}
return NULL;
}
int pkt_make_client(unsigned char *buf, int len, unsigned char **out_data, int *out_len)
{
unsigned char *data = NULL, *pack = NULL, xor_cc;
XXNULL(buf, -1);
XXNULL(out_data, -1);
XXNULL(out_len, -1);
pack = (unsigned char *)xmalloc((len+PKT_YS_HEADLEN+PKT_YS_ENDLEN));
XXNULL(pack, -1);
data = pack;
OUT8(pack, PKT_YS_START_TAG);
OUT8(pack, 0);
OUT8(pack, PKT_YS_FRAME_TYPE);
OUT16_BE(pack, (len+PKT_YS_HEADLEN+PKT_YS_ENDLEN));
xmemcpy(pack, buf, len);
pack += len;
OUT8(pack, PKT_YS_END_TAG);
xor_cc = pkt_build_check_sum(data, (len+PKT_YS_HEADLEN+PKT_YS_ENDLEN));
pack = data + 1;
OUT8(pack, xor_cc);
*out_data = data;
*out_len = (len+PKT_YS_HEADLEN+PKT_YS_ENDLEN);
return 0;
}
int pkt_parse_data(unsigned char *buf, int len, unsigned char **out_data, int *out_len)
{
unsigned short v = 0;
unsigned char *data = NULL, *tdata = NULL, xor_cc;
if (!buf || !out_data) {
xerror("error par");
return -1;
}
if (!(data = pkt_match_head(buf, len, PKT_YS_START_TAG))) {
xerror("match head PKT_YS_START_TAG error");
return -1;
}
tdata = data;
++data;
IN8(data, xor_cc);//Òì»òУÑéÂë
xzero((data - 1), sizeof(unsigned char));
IN8(data, v);
assert(v == PKT_YS_FRAME_TYPE);//ÀàÐÍ
IN16_BE(data, v);//´óС Êý¾Ý´óС = v - 6;
if (!pkt_check_sum(tdata, v, xor_cc)) {
xerror("match head pkt_check_sum error");
return -1;
}
len = v - 6;
tdata = (unsigned char *)xmalloc(len + 1);
xassert(tdata);
xzero(tdata, (len + 1));
xmemcpy(tdata, data, len);
*out_data = tdata;
*out_len = len;
return 0;
}
int pkt_parse_frame(unsigned char *buf, int len, unsigned char *out_data, int out_len)
{
unsigned short v = 0;
unsigned char *data = NULL, *tdata = NULL, xor_cc;
if (!buf || !out_data) {
xerror("error par");
return -1;
}
if (!(data = pkt_match_head(buf, len, PKT_YS_START_TAG))) {
xerror("match head PKT_YS_START_TAG error");
return -1;
}
tdata = data;
++data;
IN8(data, xor_cc);//Òì»òУÑéÂë
xzero((data - 1), sizeof(unsigned char));
IN8(data, v);
assert(v == PKT_YS_FRAME_TYPE);//ÀàÐÍ
IN16_BE(data, v);//´óС Êý¾Ý´óС = v - 6;
if (!pkt_check_sum(tdata, v, xor_cc)) {
xerror("match head pkt_check_sum error");
return -1;
}
len = v - 6;
if (len > out_len) {
xerror("buf small\n");
return -1;
}
xmemcpy(out_data, data, len);
return len;
}
int pkt_make_frame(unsigned char *buf, int len, unsigned char *out_data, int out_len)
{
unsigned char *data = NULL, *pack = NULL, xor_cc;
XXNULL(buf, -1);
XXNULL(out_data, -1);
if ((len+PKT_YS_HEADLEN+PKT_YS_ENDLEN) > out_len) {
xerror("out_data small\n");
return -1;
}
pack = out_data;
XXNULL(pack, -1);
data = pack;
OUT8(pack, PKT_YS_START_TAG);
OUT8(pack, 0);
OUT8(pack, PKT_YS_FRAME_TYPE);
OUT16_BE(pack, (len+PKT_YS_HEADLEN+PKT_YS_ENDLEN));
xmemcpy(pack, buf, len);
pack += len;
OUT8(pack, PKT_YS_END_TAG);
xor_cc = pkt_build_check_sum(data, (len+PKT_YS_HEADLEN+PKT_YS_ENDLEN));
pack = data + 1;
OUT8(pack, xor_cc);
return (len+PKT_YS_HEADLEN+PKT_YS_ENDLEN);
}
| [
"anxan@Young.Geo"
] | anxan@Young.Geo |
77815d33f36c536052c010b782bb4685b2e5e623 | 8196febc813503c086f5b45a937bb8504991d01c | /DIPS/dips/pdu/data/packet/usr/pdudevusr.h | 69d7abd538910adcae3a9c2d834c4d6ef2308146 | [] | no_license | luozhiyong131/ZPDU | 03b4d7baa8f795840d5b61347b326bb27ee93a64 | 707518bc8c930a09928a32fc00e4da99fca8b43d | refs/heads/master | 2021-01-01T06:35:12.206553 | 2019-08-15T06:05:26 | 2019-08-15T06:05:26 | 97,457,855 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 387 | h | #ifndef PDUDEVUSR_H
#define PDUDEVUSR_H
#include "pdustrbase.h"
class PduDevUsr
{
public:
PduDevUsr();
~PduDevUsr();
PduStrBase *usr; // 用户
PduStrBase *pwd; // 密码
PduStrBase *emil; // 邮件
PduStrBase *emil2; // 邮件
PduStrBase *emil3; // 邮件
PduStrBase *phone; // 电话
PduStrBase *group; // 用户组
};
#endif // PDUDEVUSR_H
| [
"luozhiyong131@qq.com"
] | luozhiyong131@qq.com |
3865ecf5bafde4bfe224c022eca2dbeae2acfcce | 4e8c86fc1eb47ed8037d419487f9503df22c7083 | /Filtering/KalmanFilter/KFTest-OpenCV-VS10/KFTest/CVWnd.cpp | d5753b8764920ef10bad4b3b8126130c54df00a4 | [
"MIT"
] | permissive | dalek7/Algorithms | c993f6d922a5574e54c2d8ece70bd0f9dd281a26 | 657275472d116f3b117c67e366a7e45de8e9c0e7 | refs/heads/master | 2020-04-12T01:40:56.502302 | 2019-09-07T16:46:09 | 2019-09-07T16:46:09 | 51,481,437 | 4 | 2 | MIT | 2019-07-09T10:58:28 | 2016-02-10T23:39:20 | C | UTF-8 | C++ | false | false | 4,487 | cpp | // CVWnd.cpp : implementation file
//
#include "stdafx.h"
#include "KFTest.h"
#include "CVWnd.h"
#include "KFTestDoc.h"
#include "KFTestView.h"
extern CKFTestView *pv;
// CVWnd
// plot points
#define drawCross( center, color, d ) \
line( img, Point( center.x - d, center.y - d ), \
Point( center.x + d, center.y + d ), color, 2, CV_AA, 0); \
line( img, Point( center.x + d, center.y - d ), \
Point( center.x - d, center.y + d ), color, 2, CV_AA, 0 )
struct mouse_info_struct { int x,y; };
struct mouse_info_struct mouse_info = {-1,-1}, last_mouse;
vector<Point> mousev,kalmanv;
KalmanFilter KF(4, 2, 0);
Mat_<float> measurement(2,1);
//vector<Point> mousev,kalmanv;
IMPLEMENT_DYNAMIC(CVWnd, CWnd)
CVWnd::CVWnd()
{
bRun = FALSE;
gcnt = 0;
vc=1 ;
}
CVWnd::~CVWnd()
{
}
BEGIN_MESSAGE_MAP(CVWnd, CWnd)
ON_WM_ERASEBKGND()
ON_WM_TIMER()
ON_WM_DESTROY()
END_MESSAGE_MAP()
void CVWnd::Create( CWnd *p, CRect rc)
{
CWnd::Create( NULL,"",WS_CHILD|WS_VISIBLE,CRect(rc.TopLeft().x,rc.TopLeft().y,rc.Width(),rc.Height()),p,0);
RedirectIOToConsole();
Init();
SetTimer(0,10,NULL);
}
void CVWnd::InitKF(BOOL bForceResetData, float vc_)
{
img.setTo(cv::Scalar(0,0,0));
//float v1 = pv->m_sld_vel.GetPos() * 0.1;
vc = vc_;
KF.transitionMatrix = *(Mat_<float>(4, 4) << 1,0,vc,0, 0,1,0,vc, 0,0,1,0, 0,0,0,1);
//KF.transitionMatrix = *(Mat_<float>(4, 4) << 1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1); //Roy
measurement.setTo(Scalar(0));
KF.statePre.at<float>(0) = pt.x;
KF.statePre.at<float>(1) = pt.y;
KF.statePre.at<float>(2) = 0;
KF.statePre.at<float>(3) = 0;
setIdentity(KF.measurementMatrix);
setIdentity(KF.processNoiseCov, Scalar::all(1e-4));
setIdentity(KF.measurementNoiseCov, Scalar::all(10));
setIdentity(KF.errorCovPost, Scalar::all(.1));
// Image to show mouse tracking
Mat img(480, 640, CV_8UC3);
if(bForceResetData)
{
mousev.clear();
kalmanv.clear();
}
gcnt = 0;
}
void CVWnd::Init()
{
string str;
img = Mat::zeros(480,640, CV_8UC3);
if ( img.empty() )
{
cout << "Error loading the image" << endl;
return;
}
else
{
printf("loaded an image %dx%d\n", img.rows, img.cols);
}
}
// CVWnd message handlers
BOOL CVWnd::OnEraseBkgnd(CDC* pDC)
{
CString buf;
buf.Format("%d %d", pt.x, pt.y);
/*
pDC->Rectangle(CRect(0,0,640,480));
pDC->TextOutA(10,10,buf);
*/
if ( img.empty() ) return 1;
IplImage copy = img;
cimg.CopyOf(©);
cimg.DrawToHDC(pDC->GetSafeHdc(), CRect(0,0,640,480));
return 1;
//return CWnd::OnEraseBkgnd(pDC);
}
void CVWnd::OnTimer(UINT_PTR nIDEvent)
{
// TODO: Add your message handler code here and/or call default
//if(bRun)
if(pv->m_chk_run.GetCheck())
if(nIDEvent==0)
{
GetCursorPos(&pt);
ScreenToClient(&pt);
mouse_info.x = pt.x;
mouse_info.y = pt.y;
if(pt.x>=0 && pt.x<640 && pt.y >=0 && pt.y<480)
{
if(gcnt==0)
{
InitKF();
}
else
{
float v1 = pv->m_sld_vel.GetPos() * 0.1;
if(v1 != vc)
{
CString buf1;
buf1.Format("%.2f", v1);
pv->m_info1.SetWindowTextA(buf1);
InitKF(FALSE, v1);
}
img.setTo(cv::Scalar(0,0,0));
// First predict, to update the internal statePre variable
Mat prediction = KF.predict();
Point predictPt(prediction.at<float>(0),prediction.at<float>(1));
// Get mouse point
measurement(0) = pt.x;
measurement(1) = pt.y;
// The update phase
Mat estimated = KF.correct(measurement);
Point statePt(estimated.at<float>(0),estimated.at<float>(1));
Point measPt(measurement(0),measurement(1));
mousev.push_back(measPt);
kalmanv.push_back(statePt);
drawCross( statePt, Scalar(255,255,255), 5 );
drawCross( measPt, Scalar(0,0,255), 5 );
int i;
for ( i = 0; i < mousev.size()-1; i++)
line(img, mousev[i], mousev[i+1], Scalar(255,255,0), 1);
for (i = 0; i < kalmanv.size()-1; i++)
line(img, kalmanv[i], kalmanv[i+1], Scalar(0,255,255), 1);
}
gcnt++;
}
Invalidate();
}
CWnd::OnTimer(nIDEvent);
}
void CVWnd::OnDestroy()
{
CWnd::OnDestroy();
// TODO: Add your message handler code here
}
| [
"dalek@kaist.ac.kr"
] | dalek@kaist.ac.kr |
961e3ffa686e175f0ed5499df57ad7d58cf0eee7 | fe2362eda423bb3574b651c21ebacbd6a1a9ac2a | /VTK-7.1.1/Views/Infovis/vtkTanglegramItem.h | 86b2a574de0248e9adfb6f69f49825ca69fa5c8f | [
"BSD-3-Clause"
] | permissive | likewatchk/python-pcl | 1c09c6b3e9de0acbe2f88ac36a858fe4b27cfaaf | 2a66797719f1b5af7d6a0d0893f697b3786db461 | refs/heads/master | 2023-01-04T06:17:19.652585 | 2020-10-15T21:26:58 | 2020-10-15T21:26:58 | 262,235,188 | 0 | 0 | NOASSERTION | 2020-05-08T05:29:02 | 2020-05-08T05:29:01 | null | UTF-8 | C++ | false | false | 6,366 | h | /*=========================================================================
Program: Visualization Toolkit
Module: TestDiagram.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkTanglegramItem
* @brief Display two related trees
*
*
* This item draws two trees with connections between their leaf nodes.
* Use SetTable() to specify what leaf nodes correspond to one another
* between the two trees. See the documentation for this function for
* more details on how this table should be formatted.
*
* .SEE ALSO
* vtkTree vtkTable vtkDendrogramItem vtkNewickTreeReader
*/
#ifndef vtkTanglegramItem_h
#define vtkTanglegramItem_h
#include "vtkViewsInfovisModule.h" // For export macro
#include "vtkContextItem.h"
#include "vtkSmartPointer.h" // For SmartPointer ivars
#include "vtkTable.h" // For get/set
class vtkDendrogramItem;
class vtkLookupTable;
class vtkStringArray;
class vtkTree;
class VTKVIEWSINFOVIS_EXPORT vtkTanglegramItem : public vtkContextItem
{
public:
static vtkTanglegramItem *New();
vtkTypeMacro(vtkTanglegramItem, vtkContextItem);
virtual void PrintSelf(ostream &os, vtkIndent indent);
/**
* Set the first tree
*/
virtual void SetTree1(vtkTree *tree);
/**
* Set the second tree
*/
virtual void SetTree2(vtkTree *tree);
//@{
/**
* Get/Set the table that describes the correspondences between the
* two trees. The first column should contain the names of the leaf
* nodes from tree #1. The columns of this table should be named
* after the leaf nodes of tree #2. A non-zero cell should be used
* to create a connection between the two trees. Different numbers
* in the table will result in connections being drawn in different
* colors.
*/
vtkTable * GetTable();
void SetTable(vtkTable *table);
//@}
//@{
/**
* Get/Set the label for tree #1.
*/
vtkGetStringMacro(Tree1Label);
vtkSetStringMacro(Tree1Label);
//@}
//@{
/**
* Get/Set the label for tree #2.
*/
vtkGetStringMacro(Tree2Label);
vtkSetStringMacro(Tree2Label);
//@}
/**
* Set which way the tanglegram should face within the visualization.
* The default is for tree #1 to be drawn left to right.
*/
void SetOrientation(int orientation);
/**
* Get the current orientation.
*/
int GetOrientation();
//@{
/**
* Get/Set the smallest font size that is still considered legible.
* If the current zoom level requires our vertex labels to be smaller
* than this size the labels will not be drawn at all. Default value
* is 8 pt.
*/
vtkGetMacro(MinimumVisibleFontSize, int);
vtkSetMacro(MinimumVisibleFontSize, int);
//@}
//@{
/**
* Get/Set how much larger the dendrogram labels should be compared to the
* vertex labels. Because the vertex labels automatically resize based
* on zoom levels, this is a relative (not absolute) size. Default value
* is 4 pts larger than the vertex labels.
*/
vtkGetMacro(LabelSizeDifference, int);
vtkSetMacro(LabelSizeDifference, int);
//@}
//@{
/**
* Get/Set how wide the correspondence lines should be. Default is two pixels.
*/
vtkGetMacro(CorrespondenceLineWidth, float);
vtkSetMacro(CorrespondenceLineWidth, float);
//@}
//@{
/**
* Get/Set how wide the edges of the trees should be. Default is one pixel.
*/
float GetTreeLineWidth();
void SetTreeLineWidth(float width);
//@}
/**
* Returns true if the transform is interactive, false otherwise.
*/
virtual bool Hit(const vtkContextMouseEvent &mouse);
/**
* Propagate any double click onto the dendrograms to check if any
* subtrees should be collapsed or expanded.
*/
virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &event);
protected:
vtkTanglegramItem();
~vtkTanglegramItem();
/**
* Update the bounds of our two dendrograms.
*/
void RefreshBuffers(vtkContext2D *painter);
/**
* Calculate and set an appropriate position for our second dendrogram.
*/
void PositionTree2();
/**
* Draw the lines between the corresponding vertices of our two dendrograms.
*/
void PaintCorrespondenceLines(vtkContext2D *painter);
/**
* Draw the labels of our two dendrograms.
*/
void PaintTreeLabels(vtkContext2D *painter);
/**
* Reorder the children of tree #2 to minimize the amount of crossings
* in our tanglegram.
*/
void ReorderTree();
/**
* Helper function used by ReorderTree.
* Rearrange the children of the specified parent vertex in order to minimize
* tanglegram crossings.
*/
void ReorderTreeAtVertex(vtkIdType parent, vtkTree *tree);
/**
* Helper function used by ReorderTreeAtVertex. Get the average height of
* the vertices that correspond to the vertex parameter. This information
* is used to determine what order sibling vertices should have within the
* tree.
*/
double GetPositionScoreForVertex(vtkIdType vertex, vtkTree *tree);
/**
* Initialize the lookup table used to color the lines between the two
* dendrograms.
*/
void GenerateLookupTable();
/**
* Paints the tree & associated table as a heatmap.
*/
virtual bool Paint(vtkContext2D *painter);
private:
vtkSmartPointer<vtkDendrogramItem> Dendrogram1;
vtkSmartPointer<vtkDendrogramItem> Dendrogram2;
vtkSmartPointer<vtkLookupTable> LookupTable;
vtkSmartPointer<vtkTable> Table;
vtkStringArray *Tree1Names;
vtkStringArray *Tree2Names;
vtkStringArray *SourceNames;
double Tree1Bounds[4];
double Tree2Bounds[4];
double Spacing;
double LabelWidth1;
double LabelWidth2;
bool PositionSet;
bool TreeReordered;
char* Tree1Label;
char* Tree2Label;
int Orientation;
int MinimumVisibleFontSize;
int LabelSizeDifference;
float CorrespondenceLineWidth;
vtkTanglegramItem(const vtkTanglegramItem&) VTK_DELETE_FUNCTION;
void operator=(const vtkTanglegramItem&) VTK_DELETE_FUNCTION;
};
#endif
| [
"likewatchk@gmail.com"
] | likewatchk@gmail.com |
de8943deff9e78af44edd0eb3c421faa244f5111 | 1c0486a94d6631c6184014f9a5d709ceb008d320 | /offer_interview/src/sort/excise/threeColor.cpp | 2d29b4444c84acba75c1e97b4d128c44f46f047e | [] | no_license | JonyFaker/Daily-Coding | 89b70f462aee4af84dba8a93eb673075133113ae | aa1aaa24550447900ffebafde1b842bf387e77f7 | refs/heads/master | 2020-03-11T08:06:06.405862 | 2018-06-12T07:53:29 | 2018-06-12T07:53:29 | 129,874,910 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,071 | cpp | #include<iostream>
#include<algorithm>
using namespace std;
//time:O(n) space:O(1) quicksort
class threeColor
{
public:
threeColor(){} //如果只声明了默认构造函数没有实现的话会报错
~threeColor(){}
int* threecolor(int* A, int length){
int left = 0;
int right = length-1;
for (int i = 0; i <= right ; ++i)
{
if(A[i] == 0)
{
swap(A[i], A[left]);
left++;
}
if (A[i] == 2)
{
swap(A[i], A[right]);
right--;
i--; //这里的后退一步至关重要,防止从右边交换过来的还是2
}
}
return A;
}
};
int main(int argc, char const *argv[])
{
int a[]={1,2,0,1,2};
int length = sizeof(a)/sizeof(int);
threeColor t;
int* result = t.threecolor(a, length);
for (int i = 0; i < length; ++i)
{
cout<<result[i]<<" ";
}
cout<<endl;
return 0;
} | [
"352815247@qq.com"
] | 352815247@qq.com |
7058007cdd8a7a51c6463e128be92381743ce958 | 771a5f9d99fdd2431b8883cee39cf82d5e2c9b59 | /SDK/BP_PromptActor_EmissarySunk_RB_parameters.h | 2d47203de8d1003da488019e86325fcc0985e8f3 | [
"MIT"
] | permissive | zanzo420/Sea-Of-Thieves-SDK | 6305accd032cc95478ede67d28981e041c154dce | f56a0340eb33726c98fc53eb0678fa2d59aa8294 | refs/heads/master | 2023-03-25T22:25:21.800004 | 2021-03-20T00:51:04 | 2021-03-20T00:51:04 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,457 | h | #pragma once
// Name: SeaOfThieves, Version: 2.0.23
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Parameters
//---------------------------------------------------------------------------
// Function BP_PromptActor_EmissarySunk_RB.BP_PromptActor_EmissarySunk_RB_C.UserConstructionScript
struct ABP_PromptActor_EmissarySunk_RB_C_UserConstructionScript_Params
{
};
// Function BP_PromptActor_EmissarySunk_RB.BP_PromptActor_EmissarySunk_RB_C.ReceiveBeginPlay
struct ABP_PromptActor_EmissarySunk_RB_C_ReceiveBeginPlay_Params
{
};
// Function BP_PromptActor_EmissarySunk_RB.BP_PromptActor_EmissarySunk_RB_C.ReceiveEndPlay
struct ABP_PromptActor_EmissarySunk_RB_C_ReceiveEndPlay_Params
{
TEnumAsByte<Engine_EEndPlayReason> EndPlayReason; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor)
};
// Function BP_PromptActor_EmissarySunk_RB.BP_PromptActor_EmissarySunk_RB_C.ExecuteUbergraph_BP_PromptActor_EmissarySunk_RB
struct ABP_PromptActor_EmissarySunk_RB_C_ExecuteUbergraph_BP_PromptActor_EmissarySunk_RB_Params
{
int EntryPoint; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor)
};
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| [
"40242723+alxalx14@users.noreply.github.com"
] | 40242723+alxalx14@users.noreply.github.com |
874234ea26991676e632d99dd4d4f92f93949f3b | 446eb80e93ea239593ad9ae823946a29f2deff99 | /win_convnet/include/tt.h | e60b08bcc180935167cfc8ddf1340581b49461a9 | [] | no_license | s271/convnet_rw | 731ccc56b5639d68d4bff37a25eea2b8525d044f | e1fb05db7fe281f1e5d428be38370281d526b522 | refs/heads/master | 2016-08-03T08:32:31.341006 | 2015-01-29T11:39:35 | 2015-01-29T11:39:35 | 15,833,755 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 4,138 | h | /*
* Copyright (c) 2014, Sergey Ten
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef TENSOR_TEMPLATE_H
#define TENSOR_TEMPLATE_H
#include <assert.h>
#ifdef __CUDACC__
#define DEVICE __device__ inline
#define DEVICE_ __device__
#else
#define DEVICE
#define DEVICE_
#endif
DEVICE void Split(const int t_ind, const int t_split, int& x, int& y)
{
y = t_ind/t_split;
x = t_ind%t_split;
}
#define SPLIT(src, split) int src##_##split##_x; int src##_##split##_y; Split(src, split, src##_##split##_x, src##_##split##_y);
#define LOOP(i, loopBlock) for (int i = 0; i < loopBlock._idx[i##_]._size; i += loopBlock._idx[i##_]._step)
#define OFFSET(i, indBlock) (i*indBlock._loop_step[i##_l])
#define OFFSETN(i, indBlock) (i*indBlock._loop_step[i##_##indBlock])
#define OFFSET_(i, l, indBlock) (i*indBlock._loop_step[l])
struct Index
{
int _step;
int _ind;
DEVICE Index(const int step, const int ind){_step = step; _ind = ind;};
DEVICE Index(const int ind){_step = 1; _ind = ind;};
};
struct LoopIndex
{
int _step;
int _size;
int _start;
int _pos;
DEVICE LoopIndex(){};
DEVICE LoopIndex(const int step){_step = step;};
DEVICE LoopIndex(const int step, const int size){_step = step; _size = size;};
};
template <int loops>
struct LoopBlock
{
int _nloops;
LoopIndex _idx[loops];
DEVICE LoopBlock(){_nloops = 0;};
DEVICE LoopBlock<loops>& operator<(LoopIndex& indx)
{
_idx[_nloops] = indx;
_nloops++;
return *this;
}
DEVICE LoopBlock<loops>& operator>(int& name)
{
name = _nloops;
return *this;
}
};
struct Ref
{
int _pos;
DEVICE Ref(int pos){_pos =pos;};
};
struct Offset
{
int _offset;
DEVICE Offset(){_offset = 0;}
DEVICE void Insert(const Index indx)
{
_offset += indx._step*indx._ind;
}
DEVICE Offset& operator<<(const Index indx)
{
Insert(indx);
return *this;
}
DEVICE Offset& operator << (int shift)
{
_offset *= shift;
return *this;
}
};
template <int loop_dims>
struct BaseIndex : Offset
{
int _n_loop_dims;
int _loop_step[loop_dims];
DEVICE BaseIndex() : Offset() {_n_loop_dims = 0;}
DEVICE int GetLoopStep(int pos)
{
return _loop_step[pos];
}
DEVICE BaseIndex& operator<<(const Index indx)
{
Offset::Insert(indx);
return *this;
}
DEVICE void Insert(const Ref ref_indx)
{
_loop_step[_n_loop_dims] = 1;
_n_loop_dims++;
}
DEVICE BaseIndex& operator<<(Ref ref_indx)
{
Insert(ref_indx);
return *this;
}
DEVICE void Insert (int shift)
{
_offset <<= shift;
#ifdef __CUDACC__
#pragma unroll
#endif
for (int k = 0; k < _n_loop_dims; k++)
{
_loop_step[k] <<= shift;
}
}
DEVICE BaseIndex& operator << (int shift)
{
Insert(shift);
return *this;
}
DEVICE void Out(int& pos)
{
pos =_n_loop_dims;
}
DEVICE BaseIndex& operator >>(int& pos)
{
Out(pos);
return *this;
}
};
//---------
#endif /* TENSOR_TEMPLATE_H */
| [
"serg271@gmail.com"
] | serg271@gmail.com |
e723a377194d9364e09b7733e92af05c31a290c6 | 0a3a009fa93539a2b45b5642341f4cb0c5c62df5 | /Axis.Mint/services/language/syntax/evaluation/NullValue.cpp | af37ec68be37026a635d4e22c2f0afc0a4be409a | [
"MIT"
] | permissive | renato-yuzup/axis-fem | 5bdb610457013d78a9f62496d4a0ba5e68a5a966 | 2e8d325eb9c8e99285f513b4c1218ef53eb0ab22 | refs/heads/master | 2020-04-28T19:54:21.273024 | 2019-03-31T22:04:22 | 2019-03-31T22:04:22 | 175,526,004 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 664 | cpp | #include "NullValue.hpp"
namespace aslse = axis::services::language::syntax::evaluation;
aslse::NullValue::NullValue( void )
{
/* nothing to do here */
}
aslse::NullValue::~NullValue( void )
{
/* nothing to do here */
}
bool aslse::NullValue::IsAssignment( void ) const
{
return false;
}
bool aslse::NullValue::IsAtomic( void ) const
{
return false;
}
bool aslse::NullValue::IsNull( void ) const
{
return true;
}
bool aslse::NullValue::IsArray( void ) const
{
return false;
}
axis::String aslse::NullValue::ToString( void ) const
{
return axis::String();
}
aslse::ParameterValue& aslse::NullValue::Clone( void ) const
{
return *new NullValue();
}
| [
"renato@yuzu-project.com"
] | renato@yuzu-project.com |
d19520d768aa6f69ce9996bc6a1f4650dd372a15 | e45a7d395c884806d3657b6a2fa7c8411d83af35 | /olc_origin/Cartridge.h | 73deb743e42e1060fd52caf180a86dce2af89981 | [] | no_license | huhuang03/nes_emulator | a5cdc43bb704ebd7e8d06d320167aabcb6b4ea3b | 4c48a48004c4c04ff2d65c2df366543eec7b13a9 | refs/heads/master | 2023-06-16T01:49:18.034890 | 2021-07-06T13:23:39 | 2021-07-06T13:23:39 | 370,105,989 | 0 | 0 | null | null | null | null | ISO-8859-2 | C++ | false | false | 3,081 | h | /*
olc::NES - Cartridge
"Thanks Dad for believing computers were gonna be a big deal..." - javidx9
License (OLC-3)
~~~~~~~~~~~~~~~
Copyright 2018-2019 OneLoneCoder.com
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions or derivations of source code must retain the above
copyright notice, this list of conditions and the following disclaimer.
2. Redistributions or derivative works in binary form must reproduce
the above copyright notice. This list of conditions and the following
disclaimer must be reproduced in the documentation and/or other
materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Relevant Video: https://youtu.be/-THeUXqR3zY
Links
~~~~~
YouTube: https://www.youtube.com/javidx9
https://www.youtube.com/javidx9extra
Discord: https://discord.gg/WhwHUMV
Twitter: https://www.twitter.com/javidx9
Twitch: https://www.twitch.tv/javidx9
GitHub: https://www.github.com/onelonecoder
Patreon: https://www.patreon.com/javidx9
Homepage: https://www.onelonecoder.com
Author
~~~~~~
David Barr, aka javidx9, ŠOneLoneCoder 2019
*/
#pragma once
#include <cstdint>
#include <string>
#include <fstream>
#include <vector>
#include "Mapper_000.h"
//#include "Mapper_002.h"
//#include "Mapper_003.h"
//#include "Mapper_066.h"
class Cartridge
{
public:
Cartridge(const std::string& sFileName);
~Cartridge();
public:
bool ImageValid();
enum MIRROR
{
HORIZONTAL,
VERTICAL,
ONESCREEN_LO,
ONESCREEN_HI,
} mirror = HORIZONTAL;
private:
bool bImageValid = false;
uint8_t nMapperID = 0;
uint8_t nPRGBanks = 0;
uint8_t nCHRBanks = 0;
std::vector<uint8_t> vPRGMemory;
std::vector<uint8_t> vCHRMemory;
std::shared_ptr<Mapper> pMapper;
public:
// Communication with Main Bus
bool cpuRead(uint16_t addr, uint8_t &data);
bool cpuWrite(uint16_t addr, uint8_t data);
// Communication with PPU Bus
bool ppuRead(uint16_t addr, uint8_t &data);
bool ppuWrite(uint16_t addr, uint8_t data);
// Permits system rest of mapper to know state
void reset();
};
| [
"york@duomai.com"
] | york@duomai.com |
5704de108314128929d3fc7b3f36c3af347852f4 | d39a17665c5690737c0739148a86836613847d04 | /Game-Of-Live/Game-Of-Live/cell.h | 605cd9320cd60cff4c7ecf3d30af2953795ee831 | [] | no_license | przemo539/Game-Of-Live | 6ef822f57949bbd7c2026f227bf27672e1e80493 | 9a0938110059a23b8571d17b5b615f6a0d8b762d | refs/heads/master | 2020-04-30T10:35:15.760155 | 2019-06-14T13:25:39 | 2019-06-14T13:25:39 | 176,781,016 | 0 | 0 | null | 2019-04-04T09:12:29 | 2019-03-20T17:09:20 | C++ | UTF-8 | C++ | false | false | 597 | h | #include <SFML/Graphics.hpp>
#pragma once
class cell : public sf::Drawable, sf::Transformable
{
bool is_alive;
bool changed;
public:
static unsigned int marg;
static unsigned int size;
sf::RectangleShape shape;
virtual void draw(sf::RenderTarget &target, sf::RenderStates states) const;
bool get_state();
void set_state(bool);
void set_changed(bool);
void set_position(int, int);
void set_click();
bool isChanged();
bool getBounds(sf::Vector2f &m);
static void setMarg(unsigned int m);
static void setSize(unsigned int s);
cell();
cell(unsigned int, unsigned int);
~cell();
};
| [
"przemo5391@gmail.com"
] | przemo5391@gmail.com |
4335d8c0989527eb8ed2ae828cd7864268cdf4cc | 5c0cde9516179e199beda1104a329b252c7684b7 | /Graphics/Middleware/QT/include/QtGui/5.0.2/QtGui/private/qdrawhelper_p.h | 258f130efc44c9f911071addfc8517d45e9fb508 | [] | no_license | herocrx/OpenGLMatrices | 3f8ff924e7160e76464d9480af7cf5652954622b | ca532ebba199945813a563fe2fbadc2f408e9f4b | refs/heads/master | 2021-05-07T08:28:21.614604 | 2017-12-17T19:45:40 | 2017-12-17T19:45:40 | 109,338,861 | 0 | 0 | null | 2017-12-17T19:45:41 | 2017-11-03T01:47:27 | HTML | UTF-8 | C++ | false | false | 38,638 | h | /****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QDRAWHELPER_P_H
#define QDRAWHELPER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "QtCore/qglobal.h"
#include "QtGui/qcolor.h"
#include "QtGui/qpainter.h"
#include "QtGui/qimage.h"
#ifndef QT_FT_BEGIN_HEADER
#define QT_FT_BEGIN_HEADER
#define QT_FT_END_HEADER
#endif
#include "private/qrasterdefs_p.h"
#include <private/qsimd_p.h>
#include <private/qmath_p.h>
QT_BEGIN_NAMESPACE
#if defined(Q_CC_RVCT)
// RVCT doesn't like static template functions
# define Q_STATIC_TEMPLATE_FUNCTION
# define Q_STATIC_INLINE_FUNCTION static __forceinline
# define Q_DECL_RESTRICT
#elif defined(Q_CC_GNU)
# define Q_STATIC_TEMPLATE_FUNCTION static __attribute__((always_inline))
# define Q_STATIC_INLINE_FUNCTION static inline __attribute__((always_inline))
# define Q_DECL_RESTRICT __restrict__
#else
# define Q_STATIC_TEMPLATE_FUNCTION static
# define Q_STATIC_INLINE_FUNCTION static inline
# define Q_DECL_RESTRICT
#endif
static const uint AMASK = 0xff000000;
static const uint RMASK = 0x00ff0000;
static const uint GMASK = 0x0000ff00;
static const uint BMASK = 0x000000ff;
/*******************************************************************************
* QSpan
*
* duplicate definition of FT_Span
*/
typedef QT_FT_Span QSpan;
struct QSolidData;
struct QTextureData;
struct QGradientData;
struct QLinearGradientData;
struct QRadialGradientData;
struct QConicalGradientData;
struct QSpanData;
class QGradient;
class QRasterBuffer;
class QClipData;
class QRasterPaintEngineState;
typedef QT_FT_SpanFunc ProcessSpans;
typedef void (*BitmapBlitFunc)(QRasterBuffer *rasterBuffer,
int x, int y, quint32 color,
const uchar *bitmap,
int mapWidth, int mapHeight, int mapStride);
typedef void (*AlphamapBlitFunc)(QRasterBuffer *rasterBuffer,
int x, int y, quint32 color,
const uchar *bitmap,
int mapWidth, int mapHeight, int mapStride,
const QClipData *clip);
typedef void (*AlphaRGBBlitFunc)(QRasterBuffer *rasterBuffer,
int x, int y, quint32 color,
const uint *rgbmask,
int mapWidth, int mapHeight, int mapStride,
const QClipData *clip);
typedef void (*RectFillFunc)(QRasterBuffer *rasterBuffer,
int x, int y, int width, int height,
quint32 color);
typedef void (*SrcOverBlendFunc)(uchar *destPixels, int dbpl,
const uchar *src, int spbl,
int w, int h,
int const_alpha);
typedef void (*SrcOverScaleFunc)(uchar *destPixels, int dbpl,
const uchar *src, int spbl,
const QRectF &targetRect,
const QRectF &sourceRect,
const QRect &clipRect,
int const_alpha);
typedef void (*SrcOverTransformFunc)(uchar *destPixels, int dbpl,
const uchar *src, int spbl,
const QRectF &targetRect,
const QRectF &sourceRect,
const QRect &clipRect,
const QTransform &targetRectTransform,
int const_alpha);
typedef void (*MemRotateFunc)(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl);
struct DrawHelper {
ProcessSpans blendColor;
ProcessSpans blendGradient;
BitmapBlitFunc bitmapBlit;
AlphamapBlitFunc alphamapBlit;
AlphaRGBBlitFunc alphaRGBBlit;
RectFillFunc fillRect;
};
extern SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats];
extern SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats];
extern SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFormats];
extern MemRotateFunc qMemRotateFunctions[QImage::NImageFormats][3];
extern DrawHelper qDrawHelper[QImage::NImageFormats];
void qBlendTexture(int count, const QSpan *spans, void *userData);
typedef void (QT_FASTCALL *CompositionFunction)(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha);
typedef void (QT_FASTCALL *CompositionFunctionSolid)(uint *dest, int length, uint color, uint const_alpha);
struct LinearGradientValues
{
qreal dx;
qreal dy;
qreal l;
qreal off;
};
struct RadialGradientValues
{
qreal dx;
qreal dy;
qreal dr;
qreal sqrfr;
qreal a;
qreal inv2a;
bool extended;
};
struct Operator;
typedef uint* (QT_FASTCALL *DestFetchProc)(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length);
typedef void (QT_FASTCALL *DestStoreProc)(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length);
typedef const uint* (QT_FASTCALL *SourceFetchProc)(uint *buffer, const Operator *o, const QSpanData *data, int y, int x, int length);
struct Operator
{
QPainter::CompositionMode mode;
DestFetchProc dest_fetch;
DestStoreProc dest_store;
SourceFetchProc src_fetch;
CompositionFunctionSolid funcSolid;
CompositionFunction func;
union {
LinearGradientValues linear;
RadialGradientValues radial;
};
};
void qInitDrawhelperAsm();
class QRasterPaintEngine;
struct QSolidData
{
uint color;
};
struct QLinearGradientData
{
struct {
qreal x;
qreal y;
} origin;
struct {
qreal x;
qreal y;
} end;
};
struct QRadialGradientData
{
struct {
qreal x;
qreal y;
qreal radius;
} center;
struct {
qreal x;
qreal y;
qreal radius;
} focal;
};
struct QConicalGradientData
{
struct {
qreal x;
qreal y;
} center;
qreal angle;
};
struct QGradientData
{
QGradient::Spread spread;
union {
QLinearGradientData linear;
QRadialGradientData radial;
QConicalGradientData conical;
};
#define GRADIENT_STOPTABLE_SIZE 1024
#define GRADIENT_STOPTABLE_SIZE_SHIFT 10
uint* colorTable; //[GRADIENT_STOPTABLE_SIZE];
uint alphaColor : 1;
};
struct QTextureData
{
const uchar *imageData;
const uchar *scanLine(int y) const { return imageData + y*bytesPerLine; }
int width;
int height;
// clip rect
int x1;
int y1;
int x2;
int y2;
int bytesPerLine;
QImage::Format format;
const QVector<QRgb> *colorTable;
bool hasAlpha;
enum Type {
Plain,
Tiled
};
Type type;
int const_alpha;
};
struct QSpanData
{
QSpanData() : tempImage(0) {}
~QSpanData() { delete tempImage; }
QRasterBuffer *rasterBuffer;
ProcessSpans blend;
ProcessSpans unclipped_blend;
BitmapBlitFunc bitmapBlit;
AlphamapBlitFunc alphamapBlit;
AlphaRGBBlitFunc alphaRGBBlit;
RectFillFunc fillRect;
qreal m11, m12, m13, m21, m22, m23, m33, dx, dy; // inverse xform matrix
const QClipData *clip;
enum Type {
None,
Solid,
LinearGradient,
RadialGradient,
ConicalGradient,
Texture
} type : 8;
int txop : 8;
int fast_matrix : 1;
bool bilinear;
QImage *tempImage;
union {
QSolidData solid;
QGradientData gradient;
QTextureData texture;
};
void init(QRasterBuffer *rb, const QRasterPaintEngine *pe);
void setup(const QBrush &brush, int alpha, QPainter::CompositionMode compositionMode);
void setupMatrix(const QTransform &matrix, int bilinear);
void initTexture(const QImage *image, int alpha, QTextureData::Type = QTextureData::Plain, const QRect &sourceRect = QRect());
void adjustSpanMethods();
};
struct QDrawHelperGammaTables
{
explicit QDrawHelperGammaTables(qreal smoothing);
void refresh(qreal smoothing);
uchar qt_pow_rgb_gamma[256];
uchar qt_pow_rgb_invgamma[256];
uint qt_pow_gamma[256];
uchar qt_pow_invgamma[2048];
};
static inline uint qt_gradient_clamp(const QGradientData *data, int ipos)
{
if (ipos < 0 || ipos >= GRADIENT_STOPTABLE_SIZE) {
if (data->spread == QGradient::RepeatSpread) {
ipos = ipos % GRADIENT_STOPTABLE_SIZE;
ipos = ipos < 0 ? GRADIENT_STOPTABLE_SIZE + ipos : ipos;
} else if (data->spread == QGradient::ReflectSpread) {
const int limit = GRADIENT_STOPTABLE_SIZE * 2;
ipos = ipos % limit;
ipos = ipos < 0 ? limit + ipos : ipos;
ipos = ipos >= GRADIENT_STOPTABLE_SIZE ? limit - 1 - ipos : ipos;
} else {
if (ipos < 0)
ipos = 0;
else if (ipos >= GRADIENT_STOPTABLE_SIZE)
ipos = GRADIENT_STOPTABLE_SIZE-1;
}
}
Q_ASSERT(ipos >= 0);
Q_ASSERT(ipos < GRADIENT_STOPTABLE_SIZE);
return ipos;
}
static inline uint qt_gradient_pixel(const QGradientData *data, qreal pos)
{
int ipos = int(pos * (GRADIENT_STOPTABLE_SIZE - 1) + qreal(0.5));
return data->colorTable[qt_gradient_clamp(data, ipos)];
}
static inline qreal qRadialDeterminant(qreal a, qreal b, qreal c)
{
return (b * b) - (4 * a * c);
}
template <class RadialFetchFunc>
const uint * QT_FASTCALL qt_fetch_radial_gradient_template(uint *buffer, const Operator *op, const QSpanData *data,
int y, int x, int length)
{
// avoid division by zero
if (qFuzzyIsNull(op->radial.a)) {
extern void (*qt_memfill32)(quint32 *dest, quint32 value, int count);
qt_memfill32(buffer, 0, length);
return buffer;
}
const uint *b = buffer;
qreal rx = data->m21 * (y + qreal(0.5))
+ data->dx + data->m11 * (x + qreal(0.5));
qreal ry = data->m22 * (y + qreal(0.5))
+ data->dy + data->m12 * (x + qreal(0.5));
bool affine = !data->m13 && !data->m23;
uint *end = buffer + length;
if (affine) {
rx -= data->gradient.radial.focal.x;
ry -= data->gradient.radial.focal.y;
qreal inv_a = 1 / qreal(2 * op->radial.a);
const qreal delta_rx = data->m11;
const qreal delta_ry = data->m12;
qreal b = 2*(op->radial.dr*data->gradient.radial.focal.radius + rx * op->radial.dx + ry * op->radial.dy);
qreal delta_b = 2*(delta_rx * op->radial.dx + delta_ry * op->radial.dy);
const qreal b_delta_b = 2 * b * delta_b;
const qreal delta_b_delta_b = 2 * delta_b * delta_b;
const qreal bb = b * b;
const qreal delta_bb = delta_b * delta_b;
b *= inv_a;
delta_b *= inv_a;
const qreal rxrxryry = rx * rx + ry * ry;
const qreal delta_rxrxryry = delta_rx * delta_rx + delta_ry * delta_ry;
const qreal rx_plus_ry = 2*(rx * delta_rx + ry * delta_ry);
const qreal delta_rx_plus_ry = 2 * delta_rxrxryry;
inv_a *= inv_a;
qreal det = (bb - 4 * op->radial.a * (op->radial.sqrfr - rxrxryry)) * inv_a;
qreal delta_det = (b_delta_b + delta_bb + 4 * op->radial.a * (rx_plus_ry + delta_rxrxryry)) * inv_a;
const qreal delta_delta_det = (delta_b_delta_b + 4 * op->radial.a * delta_rx_plus_ry) * inv_a;
RadialFetchFunc::fetch(buffer, end, op, data, det, delta_det, delta_delta_det, b, delta_b);
} else {
qreal rw = data->m23 * (y + qreal(0.5))
+ data->m33 + data->m13 * (x + qreal(0.5));
while (buffer < end) {
if (rw == 0) {
*buffer = 0;
} else {
qreal invRw = 1 / rw;
qreal gx = rx * invRw - data->gradient.radial.focal.x;
qreal gy = ry * invRw - data->gradient.radial.focal.y;
qreal b = 2*(op->radial.dr*data->gradient.radial.focal.radius + gx*op->radial.dx + gy*op->radial.dy);
qreal det = qRadialDeterminant(op->radial.a, b, op->radial.sqrfr - (gx*gx + gy*gy));
quint32 result = 0;
if (det >= 0) {
qreal detSqrt = qSqrt(det);
qreal s0 = (-b - detSqrt) * op->radial.inv2a;
qreal s1 = (-b + detSqrt) * op->radial.inv2a;
qreal s = qMax(s0, s1);
if (data->gradient.radial.focal.radius + op->radial.dr * s >= 0)
result = qt_gradient_pixel(&data->gradient, s);
}
*buffer = result;
}
rx += data->m11;
ry += data->m12;
rw += data->m13;
++buffer;
}
}
return b;
}
template <class Simd>
class QRadialFetchSimd
{
public:
static void fetch(uint *buffer, uint *end, const Operator *op, const QSpanData *data, qreal det,
qreal delta_det, qreal delta_delta_det, qreal b, qreal delta_b)
{
typename Simd::Vect_buffer_f det_vec;
typename Simd::Vect_buffer_f delta_det4_vec;
typename Simd::Vect_buffer_f b_vec;
for (int i = 0; i < 4; ++i) {
det_vec.f[i] = det;
delta_det4_vec.f[i] = 4 * delta_det;
b_vec.f[i] = b;
det += delta_det;
delta_det += delta_delta_det;
b += delta_b;
}
const typename Simd::Float32x4 v_delta_delta_det16 = Simd::v_dup(16 * delta_delta_det);
const typename Simd::Float32x4 v_delta_delta_det6 = Simd::v_dup(6 * delta_delta_det);
const typename Simd::Float32x4 v_delta_b4 = Simd::v_dup(4 * delta_b);
const typename Simd::Float32x4 v_r0 = Simd::v_dup(data->gradient.radial.focal.radius);
const typename Simd::Float32x4 v_dr = Simd::v_dup(op->radial.dr);
const typename Simd::Float32x4 v_min = Simd::v_dup(0.0f);
const typename Simd::Float32x4 v_max = Simd::v_dup(float(GRADIENT_STOPTABLE_SIZE-1));
const typename Simd::Float32x4 v_half = Simd::v_dup(0.5f);
const typename Simd::Int32x4 v_repeat_mask = Simd::v_dup(~(uint(0xffffff) << GRADIENT_STOPTABLE_SIZE_SHIFT));
const typename Simd::Int32x4 v_reflect_mask = Simd::v_dup(~(uint(0xffffff) << (GRADIENT_STOPTABLE_SIZE_SHIFT+1)));
const typename Simd::Int32x4 v_reflect_limit = Simd::v_dup(2 * GRADIENT_STOPTABLE_SIZE - 1);
const int extended_mask = op->radial.extended ? 0x0 : ~0x0;
#define FETCH_RADIAL_LOOP_PROLOGUE \
while (buffer < end) { \
typename Simd::Vect_buffer_i v_buffer_mask; \
v_buffer_mask.v = Simd::v_greaterOrEqual(det_vec.v, v_min); \
const typename Simd::Float32x4 v_index_local = Simd::v_sub(Simd::v_sqrt(Simd::v_max(v_min, det_vec.v)), b_vec.v); \
const typename Simd::Float32x4 v_index = Simd::v_add(Simd::v_mul(v_index_local, v_max), v_half); \
v_buffer_mask.v = Simd::v_and(v_buffer_mask.v, Simd::v_greaterOrEqual(Simd::v_add(v_r0, Simd::v_mul(v_dr, v_index_local)), v_min)); \
typename Simd::Vect_buffer_i index_vec;
#define FETCH_RADIAL_LOOP_CLAMP_REPEAT \
index_vec.v = Simd::v_and(v_repeat_mask, Simd::v_toInt(v_index));
#define FETCH_RADIAL_LOOP_CLAMP_REFLECT \
const typename Simd::Int32x4 v_index_i = Simd::v_and(v_reflect_mask, Simd::v_toInt(v_index)); \
const typename Simd::Int32x4 v_index_i_inv = Simd::v_sub(v_reflect_limit, v_index_i); \
index_vec.v = Simd::v_min_16(v_index_i, v_index_i_inv);
#define FETCH_RADIAL_LOOP_CLAMP_PAD \
index_vec.v = Simd::v_toInt(Simd::v_min(v_max, Simd::v_max(v_min, v_index)));
#define FETCH_RADIAL_LOOP_EPILOGUE \
det_vec.v = Simd::v_add(Simd::v_add(det_vec.v, delta_det4_vec.v), v_delta_delta_det6); \
delta_det4_vec.v = Simd::v_add(delta_det4_vec.v, v_delta_delta_det16); \
b_vec.v = Simd::v_add(b_vec.v, v_delta_b4); \
for (int i = 0; i < 4; ++i) \
*buffer++ = (extended_mask | v_buffer_mask.i[i]) & data->gradient.colorTable[index_vec.i[i]]; \
}
#define FETCH_RADIAL_LOOP(FETCH_RADIAL_LOOP_CLAMP) \
FETCH_RADIAL_LOOP_PROLOGUE \
FETCH_RADIAL_LOOP_CLAMP \
FETCH_RADIAL_LOOP_EPILOGUE
switch (data->gradient.spread) {
case QGradient::RepeatSpread:
FETCH_RADIAL_LOOP(FETCH_RADIAL_LOOP_CLAMP_REPEAT)
break;
case QGradient::ReflectSpread:
FETCH_RADIAL_LOOP(FETCH_RADIAL_LOOP_CLAMP_REFLECT)
break;
case QGradient::PadSpread:
FETCH_RADIAL_LOOP(FETCH_RADIAL_LOOP_CLAMP_PAD)
break;
default:
Q_ASSERT(false);
}
}
};
#if defined(Q_CC_RVCT)
# pragma push
# pragma arm
#endif
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b) {
uint t = (x & 0xff00ff) * a + (y & 0xff00ff) * b;
t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8;
t &= 0xff00ff;
x = ((x >> 8) & 0xff00ff) * a + ((y >> 8) & 0xff00ff) * b;
x = (x + ((x >> 8) & 0xff00ff) + 0x800080);
x &= 0xff00ff00;
x |= t;
return x;
}
#if defined(Q_CC_RVCT)
# pragma pop
#endif
#if QT_POINTER_SIZE == 8 // 64-bit versions
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b) {
quint64 t = (((quint64(x)) | ((quint64(x)) << 24)) & 0x00ff00ff00ff00ff) * a;
t += (((quint64(y)) | ((quint64(y)) << 24)) & 0x00ff00ff00ff00ff) * b;
t >>= 8;
t &= 0x00ff00ff00ff00ff;
return (uint(t)) | (uint(t >> 24));
}
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a) {
quint64 t = (((quint64(x)) | ((quint64(x)) << 24)) & 0x00ff00ff00ff00ff) * a;
t = (t + ((t >> 8) & 0xff00ff00ff00ff) + 0x80008000800080) >> 8;
t &= 0x00ff00ff00ff00ff;
return (uint(t)) | (uint(t >> 24));
}
Q_STATIC_INLINE_FUNCTION uint PREMUL(uint x) {
uint a = x >> 24;
quint64 t = (((quint64(x)) | ((quint64(x)) << 24)) & 0x00ff00ff00ff00ff) * a;
t = (t + ((t >> 8) & 0xff00ff00ff00ff) + 0x80008000800080) >> 8;
t &= 0x000000ff00ff00ff;
return (uint(t)) | (uint(t >> 24)) | (a << 24);
}
#else // 32-bit versions
Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b) {
uint t = (x & 0xff00ff) * a + (y & 0xff00ff) * b;
t >>= 8;
t &= 0xff00ff;
x = ((x >> 8) & 0xff00ff) * a + ((y >> 8) & 0xff00ff) * b;
x &= 0xff00ff00;
x |= t;
return x;
}
#if defined(Q_CC_RVCT)
# pragma push
# pragma arm
#endif
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a) {
uint t = (x & 0xff00ff) * a;
t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8;
t &= 0xff00ff;
x = ((x >> 8) & 0xff00ff) * a;
x = (x + ((x >> 8) & 0xff00ff) + 0x800080);
x &= 0xff00ff00;
x |= t;
return x;
}
#if defined(Q_CC_RVCT)
# pragma pop
#endif
Q_STATIC_INLINE_FUNCTION uint PREMUL(uint x) {
uint a = x >> 24;
uint t = (x & 0xff00ff) * a;
t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8;
t &= 0xff00ff;
x = ((x >> 8) & 0xff) * a;
x = (x + ((x >> 8) & 0xff) + 0x80);
x &= 0xff00;
x |= t | (a << 24);
return x;
}
#endif
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL_RGB16(uint x, uint a) {
a += 1;
uint t = (((x & 0x07e0)*a) >> 8) & 0x07e0;
t |= (((x & 0xf81f)*(a>>2)) >> 6) & 0xf81f;
return t;
}
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL_RGB16_32(uint x, uint a) {
uint t = (((x & 0xf81f07e0) >> 5)*a) & 0xf81f07e0;
t |= (((x & 0x07e0f81f)*a) >> 5) & 0x07e0f81f;
return t;
}
#define INV_PREMUL(p) \
(qAlpha(p) == 0 ? 0 : \
((qAlpha(p) << 24) \
| (((255*qRed(p))/ qAlpha(p)) << 16) \
| (((255*qGreen(p)) / qAlpha(p)) << 8) \
| ((255*qBlue(p)) / qAlpha(p))))
struct quint24 {
quint24(uint value);
operator uint() const;
uchar data[3];
} Q_PACKED;
inline quint24::quint24(uint value)
{
data[0] = uchar(value >> 16);
data[1] = uchar(value >> 8);
data[2] = uchar(value);
}
inline quint24::operator uint() const
{
return data[2] | (data[1] << 8) | (data[0] << 16);
}
template <class T>
void qt_memfill(T *dest, T value, int count);
template<> inline void qt_memfill(quint32 *dest, quint32 color, int count)
{
extern void (*qt_memfill32)(quint32 *dest, quint32 value, int count);
qt_memfill32(dest, color, count);
}
template<> inline void qt_memfill(quint16 *dest, quint16 color, int count)
{
extern void (*qt_memfill16)(quint16 *dest, quint16 value, int count);
qt_memfill16(dest, color, count);
}
template<> inline void qt_memfill(quint8 *dest, quint8 color, int count)
{
memset(dest, color, count);
}
template <class T>
inline void qt_memfill(T *dest, T value, int count)
{
if (!count)
return;
int n = (count + 7) / 8;
switch (count & 0x07)
{
case 0: do { *dest++ = value;
case 7: *dest++ = value;
case 6: *dest++ = value;
case 5: *dest++ = value;
case 4: *dest++ = value;
case 3: *dest++ = value;
case 2: *dest++ = value;
case 1: *dest++ = value;
} while (--n > 0);
}
}
template <class T>
inline void qt_rectfill(T *dest, T value,
int x, int y, int width, int height, int stride)
{
char *d = reinterpret_cast<char*>(dest + x) + y * stride;
if (uint(stride) == (width * sizeof(T))) {
qt_memfill(reinterpret_cast<T*>(d), value, width * height);
} else {
for (int j = 0; j < height; ++j) {
dest = reinterpret_cast<T*>(d);
qt_memfill(dest, value, width);
d += stride;
}
}
}
#define QT_MEMFILL_UINT(dest, length, color) \
qt_memfill<quint32>(dest, color, length);
#define QT_MEMFILL_USHORT(dest, length, color) \
qt_memfill<quint16>(dest, color, length);
#define QT_MEMCPY_REV_UINT(dest, src, length) \
do { \
/* Duff's device */ \
uint *_d = (uint*)(dest) + length; \
const uint *_s = (uint*)(src) + length; \
register int n = ((length) + 7) / 8; \
switch ((length) & 0x07) \
{ \
case 0: do { *--_d = *--_s; \
case 7: *--_d = *--_s; \
case 6: *--_d = *--_s; \
case 5: *--_d = *--_s; \
case 4: *--_d = *--_s; \
case 3: *--_d = *--_s; \
case 2: *--_d = *--_s; \
case 1: *--_d = *--_s; \
} while (--n > 0); \
} \
} while (0)
#define QT_MEMCPY_USHORT(dest, src, length) \
do { \
/* Duff's device */ \
ushort *_d = (ushort*)(dest); \
const ushort *_s = (ushort*)(src); \
register int n = ((length) + 7) / 8; \
switch ((length) & 0x07) \
{ \
case 0: do { *_d++ = *_s++; \
case 7: *_d++ = *_s++; \
case 6: *_d++ = *_s++; \
case 5: *_d++ = *_s++; \
case 4: *_d++ = *_s++; \
case 3: *_d++ = *_s++; \
case 2: *_d++ = *_s++; \
case 1: *_d++ = *_s++; \
} while (--n > 0); \
} \
} while (0)
#if defined(Q_CC_RVCT)
# pragma push
# pragma arm
#endif
Q_STATIC_INLINE_FUNCTION int qt_div_255(int x) { return (x + (x>>8) + 0x80) >> 8; }
#if defined(Q_CC_RVCT)
# pragma pop
#endif
inline ushort qConvertRgb32To16(uint c)
{
return (((c) >> 3) & 0x001f)
| (((c) >> 5) & 0x07e0)
| (((c) >> 8) & 0xf800);
}
inline QRgb qConvertRgb16To32(uint c)
{
return 0xff000000
| ((((c) << 3) & 0xf8) | (((c) >> 2) & 0x7))
| ((((c) << 5) & 0xfc00) | (((c) >> 1) & 0x300))
| ((((c) << 8) & 0xf80000) | (((c) << 3) & 0x70000));
}
inline int qRed565(quint16 rgb) {
const int r = (rgb & 0xf800);
return (r >> 8) | (r >> 13);
}
inline int qGreen565(quint16 rgb) {
const int g = (rgb & 0x07e0);
return (g >> 3) | (g >> 9);
}
inline int qBlue565(quint16 rgb) {
const int b = (rgb & 0x001f);
return (b << 3) | (b >> 2);
}
const uint qt_bayer_matrix[16][16] = {
{ 0x1, 0xc0, 0x30, 0xf0, 0xc, 0xcc, 0x3c, 0xfc,
0x3, 0xc3, 0x33, 0xf3, 0xf, 0xcf, 0x3f, 0xff},
{ 0x80, 0x40, 0xb0, 0x70, 0x8c, 0x4c, 0xbc, 0x7c,
0x83, 0x43, 0xb3, 0x73, 0x8f, 0x4f, 0xbf, 0x7f},
{ 0x20, 0xe0, 0x10, 0xd0, 0x2c, 0xec, 0x1c, 0xdc,
0x23, 0xe3, 0x13, 0xd3, 0x2f, 0xef, 0x1f, 0xdf},
{ 0xa0, 0x60, 0x90, 0x50, 0xac, 0x6c, 0x9c, 0x5c,
0xa3, 0x63, 0x93, 0x53, 0xaf, 0x6f, 0x9f, 0x5f},
{ 0x8, 0xc8, 0x38, 0xf8, 0x4, 0xc4, 0x34, 0xf4,
0xb, 0xcb, 0x3b, 0xfb, 0x7, 0xc7, 0x37, 0xf7},
{ 0x88, 0x48, 0xb8, 0x78, 0x84, 0x44, 0xb4, 0x74,
0x8b, 0x4b, 0xbb, 0x7b, 0x87, 0x47, 0xb7, 0x77},
{ 0x28, 0xe8, 0x18, 0xd8, 0x24, 0xe4, 0x14, 0xd4,
0x2b, 0xeb, 0x1b, 0xdb, 0x27, 0xe7, 0x17, 0xd7},
{ 0xa8, 0x68, 0x98, 0x58, 0xa4, 0x64, 0x94, 0x54,
0xab, 0x6b, 0x9b, 0x5b, 0xa7, 0x67, 0x97, 0x57},
{ 0x2, 0xc2, 0x32, 0xf2, 0xe, 0xce, 0x3e, 0xfe,
0x1, 0xc1, 0x31, 0xf1, 0xd, 0xcd, 0x3d, 0xfd},
{ 0x82, 0x42, 0xb2, 0x72, 0x8e, 0x4e, 0xbe, 0x7e,
0x81, 0x41, 0xb1, 0x71, 0x8d, 0x4d, 0xbd, 0x7d},
{ 0x22, 0xe2, 0x12, 0xd2, 0x2e, 0xee, 0x1e, 0xde,
0x21, 0xe1, 0x11, 0xd1, 0x2d, 0xed, 0x1d, 0xdd},
{ 0xa2, 0x62, 0x92, 0x52, 0xae, 0x6e, 0x9e, 0x5e,
0xa1, 0x61, 0x91, 0x51, 0xad, 0x6d, 0x9d, 0x5d},
{ 0xa, 0xca, 0x3a, 0xfa, 0x6, 0xc6, 0x36, 0xf6,
0x9, 0xc9, 0x39, 0xf9, 0x5, 0xc5, 0x35, 0xf5},
{ 0x8a, 0x4a, 0xba, 0x7a, 0x86, 0x46, 0xb6, 0x76,
0x89, 0x49, 0xb9, 0x79, 0x85, 0x45, 0xb5, 0x75},
{ 0x2a, 0xea, 0x1a, 0xda, 0x26, 0xe6, 0x16, 0xd6,
0x29, 0xe9, 0x19, 0xd9, 0x25, 0xe5, 0x15, 0xd5},
{ 0xaa, 0x6a, 0x9a, 0x5a, 0xa6, 0x66, 0x96, 0x56,
0xa9, 0x69, 0x99, 0x59, 0xa5, 0x65, 0x95, 0x55}
};
#define ARGB_COMBINE_ALPHA(argb, alpha) \
((((argb >> 24) * alpha) >> 8) << 24) | (argb & 0x00ffffff)
#if QT_POINTER_SIZE == 8 // 64-bit versions
#define AMIX(mask) (qMin(((qint64(s)&mask) + (qint64(d)&mask)), qint64(mask)))
#define MIX(mask) (qMin(((qint64(s)&mask) + (qint64(d)&mask)), qint64(mask)))
#else // 32 bits
// The mask for alpha can overflow over 32 bits
#define AMIX(mask) quint32(qMin(((qint64(s)&mask) + (qint64(d)&mask)), qint64(mask)))
#define MIX(mask) (qMin(((quint32(s)&mask) + (quint32(d)&mask)), quint32(mask)))
#endif
inline int comp_func_Plus_one_pixel_const_alpha(uint d, const uint s, const uint const_alpha, const uint one_minus_const_alpha)
{
const int result = (AMIX(AMASK) | MIX(RMASK) | MIX(GMASK) | MIX(BMASK));
return INTERPOLATE_PIXEL_255(result, const_alpha, d, one_minus_const_alpha);
}
inline int comp_func_Plus_one_pixel(uint d, const uint s)
{
const int result = (AMIX(AMASK) | MIX(RMASK) | MIX(GMASK) | MIX(BMASK));
return result;
}
#undef MIX
#undef AMIX
// prototypes of all the composition functions
void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_DestinationOver(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha);
void QT_FASTCALL comp_func_Source(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_Destination(uint *, const uint *, int, uint);
void QT_FASTCALL comp_func_SourceIn(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_DestinationIn(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_SourceOut(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_DestinationOut(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_SourceAtop(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_DestinationAtop(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_XOR(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_Plus(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_Multiply(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_Screen(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_Overlay(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_Darken(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_Lighten(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_ColorDodge(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_ColorBurn(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_HardLight(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_SoftLight(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_Difference(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL comp_func_Exclusion(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL rasterop_SourceOrDestination(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL rasterop_SourceAndDestination(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL rasterop_SourceXorDestination(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL rasterop_NotSourceOrNotDestination(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL rasterop_NotSourceXorDestination(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL rasterop_NotSource(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL rasterop_NotSourceAndDestination(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL rasterop_SourceAndNotDestination(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL rasterop_NotSourceOrDestination(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL rasterop_SourceOrNotDestination(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL rasterop_ClearDestination(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL rasterop_SetDestination(uint *dest, const uint *src, int length, uint const_alpha);
void QT_FASTCALL rasterop_NotDestination(uint *dest, const uint *src, int length, uint const_alpha);
// prototypes of all the solid composition functions
void QT_FASTCALL comp_func_solid_SourceOver(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_DestinationOver(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_Source(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_Destination(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_SourceIn(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_DestinationIn(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_SourceOut(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_DestinationOut(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_SourceAtop(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_DestinationAtop(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_XOR(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_Plus(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_Multiply(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_Screen(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_Overlay(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_Darken(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_Lighten(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_ColorDodge(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_ColorBurn(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_HardLight(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_SoftLight(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_Difference(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL comp_func_solid_Exclusion(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL rasterop_solid_SourceAndDestination(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL rasterop_solid_SourceXorDestination(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL rasterop_solid_NotSourceAndNotDestination(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL rasterop_solid_NotSourceOrNotDestination(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL rasterop_solid_NotSourceXorDestination(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL rasterop_solid_NotSource(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL rasterop_solid_NotSourceAndDestination(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL rasterop_solid_SourceAndNotDestination(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL rasterop_solid_NotSourceOrDestination(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL rasterop_solid_SourceOrNotDestination(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL rasterop_solid_ClearDestination(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL rasterop_solid_SetDestination(uint *dest, int length, uint color, uint const_alpha);
void QT_FASTCALL rasterop_solid_NotDestination(uint *dest, int length, uint color, uint const_alpha);
struct QPixelLayout;
typedef const uint *(QT_FASTCALL *ConvertFunc)(uint *buffer, const uint *src, int count,
const QPixelLayout *layout, const QRgb *clut);
struct QPixelLayout
{
// Bits per pixel
enum BPP {
BPPNone,
BPP1MSB,
BPP1LSB,
BPP8,
BPP16,
BPP24,
BPP32,
BPPCount
};
// All numbers in bits.
uchar redWidth;
uchar redShift;
uchar greenWidth;
uchar greenShift;
uchar blueWidth;
uchar blueShift;
uchar alphaWidth;
uchar alphaShift;
bool premultiplied;
BPP bpp;
ConvertFunc convertToARGB32PM;
ConvertFunc convertFromARGB32PM;
};
typedef const uint *(QT_FASTCALL *FetchPixelsFunc)(uint *buffer, const uchar *src, int index, int count);
typedef void (QT_FASTCALL *StorePixelsFunc)(uchar *dest, const uint *src, int index, int count);
extern QPixelLayout qPixelLayouts[QImage::NImageFormats];
extern FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount];
extern StorePixelsFunc qStorePixels[QPixelLayout::BPPCount];
QT_END_NAMESPACE
#endif // QDRAWHELPER_P_H
| [
"hubertkuc13@gmail.com"
] | hubertkuc13@gmail.com |
26a8130f145d9873255b6d750b622c4fcbd18bf2 | 4010fee785c0f7e142f877b75f8b7f56640de887 | /trunk/suicore/src/System/Windows/Environment.cpp | 5702a246cc67120a962b88d505349e619269ab32 | [
"MIT"
] | permissive | hioscar/MPFUI | 5faa42d304978f4fa1053980c1353c464cab0704 | 0657f410ac6d5df85f9b2d8af3ee2b92611509cb | refs/heads/master | 2021-01-22T22:45:48.263933 | 2017-09-05T00:27:19 | 2017-09-05T00:27:19 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,029 | cpp | /////////////////////////////////////////////////////////////////////////
// uienv.cpp
#include <System/Windows/Environment.h>
#include <System/Windows/SystemParameters.h>
#include <time.h>
namespace suic
{
static OSType g_s_ostype = OSType::osUnknown;
OSType Environment::GetOSType()
{
if (g_s_ostype != OSType::osUnknown)
{
return g_s_ostype;
}
OSVERSIONINFO osver;
osver.dwOSVersionInfoSize = sizeof(osver);
if (GetVersionEx(&osver))
{
switch (osver.dwPlatformId)
{
case VER_PLATFORM_WIN32s:
break;
case VER_PLATFORM_WIN32_WINDOWS:
break;
case VER_PLATFORM_WIN32_NT:
{
if (osver.dwMajorVersion == 5)
{
if (osver.dwMinorVersion == 1)
{
g_s_ostype = OSType::osXP;
}
else if (osver.dwMinorVersion == 1)
{
g_s_ostype = OSType::osWin2003;
}
}
else if (osver.dwMajorVersion == 6)
{
if (osver.dwMinorVersion == 0)
{
g_s_ostype = OSType::osVista;
}
else if (osver.dwMinorVersion == 1)
{
g_s_ostype = OSType::osWin7;
}
}
}
break;
}
}
return g_s_ostype;
}
Size Environment::GetScreenClient()
{
Size size;
size.cx = GetSystemMetrics(SM_CXSCREEN);
size.cy = GetSystemMetrics(SM_CYSCREEN);
return size;
}
Size Environment::GetScreenBound()
{
Size size;
size.cx = GetSystemMetrics(SM_CXFULLSCREEN);
size.cy = GetSystemMetrics(SM_CYFULLSCREEN);
return size;
}
Time_t Environment::GetSystemTick()
{
return (Time_t)::GetTickCount();
}
Time_t Environment::GetSystemTime()
{
return (Time_t)time(NULL);
}
}
| [
"china0851@foxmail.com"
] | china0851@foxmail.com |
0ba4888412c85f50b3e1d6b33eb9f0801f3a3c28 | 6ffbcbe941b7223dd2da17ce1a6e344cdf7f400d | /src/misc/misc.h | 61c69f99ebb31ba11e23f2fcb45c6787864dfbe9 | [] | no_license | venkatarajasekhar/cms | c92ba2fcdc23aec066c54ce68d126e9d546094c0 | 9ce6005b2a105bd60ec8135ab9cc2b1deb2cc90d | refs/heads/master | 2021-01-11T07:16:59.559217 | 2015-06-16T04:27:25 | 2015-06-16T04:27:25 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 176 | h | #include <string>
#include <vector>
namespace misc {
std::vector<std::string> split_on_white(std::string s);
std::string strip_trailing_newline(std::string str);
};
| [
"jarvis01123@gmail.com"
] | jarvis01123@gmail.com |
d30a27a7ddcfa9407bef61cde090d48ef6fccaa0 | 08b8cf38e1936e8cec27f84af0d3727321cec9c4 | /data/crawl/git/new_hunk_3044.cpp | afddb600dfa8ce0ddd3bbe7c79fb8d28113300d3 | [] | no_license | ccdxc/logSurvey | eaf28e9c2d6307140b17986d5c05106d1fd8e943 | 6b80226e1667c1e0760ab39160893ee19b0e9fb1 | refs/heads/master | 2022-01-07T21:31:55.446839 | 2018-04-21T14:12:43 | 2018-04-21T14:12:43 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 520 | cpp | head_ref = resolve_ref_unsafe("HEAD", RESOLVE_REF_READING,
head_sha1, &head_flag);
if (head_ref && (head_flag & REF_ISSYMREF) &&
!strcmp(head_ref, lock->ref_name)) {
struct strbuf log_err = STRBUF_INIT;
if (log_ref_write("HEAD", lock->old_oid.hash, sha1,
logmsg, &log_err)) {
error("%s", log_err.buf);
strbuf_release(&log_err);
}
}
}
if (commit_ref(lock)) {
error("Couldn't set %s", lock->ref_name);
unlock_ref(lock);
return -1;
}
unlock_ref(lock);
return 0;
}
| [
"993273596@qq.com"
] | 993273596@qq.com |
dfa8faec1ba4e81e6ab9f672424cbde9488bf7f1 | fdb15135cf3036e63efd6d23a20e898a832e89e3 | /src/basic/_platform/TaskQueueDefault.cpp | 21b9c795d720d7095f7456621e6128d7bee31025 | [] | no_license | thelongestusernameofall/polarphp | 9ca882d26c3ad0b7b63328fdee2534946fbe410a | 31012ff7e6c0f72ee587546c296b06013c98cf9a | refs/heads/master | 2022-04-02T12:40:39.677475 | 2020-02-20T12:43:03 | 2020-02-20T12:43:03 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,511 | cpp | //===--- TaskQueue.inc - Default serial TaskQueue ---------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
///
/// \file
/// This file contains a platform-agnostic implementation of TaskQueue
/// using the functions from llvm/Support/Program.h.
///
/// \note The default implementation of TaskQueue does not support parallel
/// execution, nor does it support output buffering. As a result,
/// platform-specific implementations should be preferred.
///
//===----------------------------------------------------------------------===//
#include "polarphp/basic/TaskQueue.h"
#include "polarphp/basic/internal/_platform/TaskQueueImplDefault.h"
#include "polarphp/basic/LLVM.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Signals.h"
#if defined(_WIN32)
#define NOMINMAX
#include <Windows.h>
#include <psapi.h>
#endif
using namespace llvm::sys;
using namespace polar::sys;
bool TaskQueue::supportsBufferingOutput() {
// The default implementation supports buffering output.
return true;
}
bool TaskQueue::supportsParallelExecution() {
// The default implementation does not support parallel execution.
return false;
}
unsigned TaskQueue::getNumberOfParallelTasks() const {
// The default implementation does not support parallel execution.
return 1;
}
void TaskQueue::addTask(const char *ExecPath, ArrayRef<const char *> Args,
ArrayRef<const char *> Env, void *Context,
bool SeparateErrors) {
auto T = std::make_unique<Task>(ExecPath, Args, Env, Context, SeparateErrors);
QueuedTasks.push(std::move(T));
}
bool TaskQueue::execute(TaskBeganCallback Began, TaskFinishedCallback Finished,
TaskSignalledCallback Signalled) {
bool ContinueExecution = true;
// This implementation of TaskQueue doesn't support parallel execution.
// We need to reference NumberOfParallelTasks to avoid warnings, though.
(void)NumberOfParallelTasks;
while (!QueuedTasks.empty() && ContinueExecution) {
std::unique_ptr<Task> T(QueuedTasks.front().release());
QueuedTasks.pop();
bool ExecutionFailed = T->execute();
if (ExecutionFailed) {
return true;
}
if (Began) {
Began(T->PI.Pid, T->Context);
}
std::string ErrMsg;
T->PI = Wait(T->PI, 0, true, &ErrMsg);
int ReturnCode = T->PI.ReturnCode;
auto StdoutBuffer = llvm::MemoryBuffer::getFile(T->StdoutPath);
StringRef StdoutContents = StdoutBuffer.get()->getBuffer();
StringRef StderrContents;
if (T->SeparateErrors) {
auto StderrBuffer = llvm::MemoryBuffer::getFile(T->StderrPath);
StderrContents = StderrBuffer.get()->getBuffer();
}
#if defined(_WIN32)
// Wait() sets the upper two bits of the return code to indicate warnings
// (10) and errors (11).
//
// This isn't a true signal on Windows, but we'll treat it as such so that
// we clean up after it properly
bool Crashed = ReturnCode & 0xC0000000;
FILETIME CreationTime;
FILETIME ExitTime;
FILETIME UtimeTicks;
FILETIME StimeTicks;
PROCESS_MEMORY_COUNTERS Counters = {};
GetProcessTimes(T->PI.Process, &CreationTime, &ExitTime, &StimeTicks,
&UtimeTicks);
// Each tick is 100ns
uint64_t Utime =
((uint64_t)UtimeTicks.dwHighDateTime << 32 | UtimeTicks.dwLowDateTime) /
10;
uint64_t Stime =
((uint64_t)StimeTicks.dwHighDateTime << 32 | StimeTicks.dwLowDateTime) /
10;
GetProcessMemoryInfo(T->PI.Process, &Counters, sizeof(Counters));
TaskProcessInformation TPI(T->PI.Pid, Utime, Stime,
Counters.PeakWorkingSetSize);
#else
// Wait() returning a return code of -2 indicates the process received
// a signal during execution.
bool Crashed = ReturnCode == -2;
TaskProcessInformation TPI(T->PI.Pid);
#endif
if (Crashed) {
if (Signalled) {
TaskFinishedResponse Response =
Signalled(T->PI.Pid, ErrMsg, StdoutContents, StderrContents,
T->Context, ReturnCode, TPI);
ContinueExecution = Response != TaskFinishedResponse::StopExecution;
} else {
// If we don't have a Signalled callback, unconditionally stop.
ContinueExecution = false;
}
} else {
// Wait() returned a normal return code, so just indicate that the task
// finished.
if (Finished) {
TaskFinishedResponse Response =
Finished(T->PI.Pid, T->PI.ReturnCode, StdoutContents,
StderrContents, TPI, T->Context);
ContinueExecution = Response != TaskFinishedResponse::StopExecution;
} else if (T->PI.ReturnCode != 0) {
ContinueExecution = false;
}
}
llvm::sys::fs::remove(T->StdoutPath);
if (T->SeparateErrors)
llvm::sys::fs::remove(T->StderrPath);
}
return !ContinueExecution;
}
| [
"zzu_softboy@163.com"
] | zzu_softboy@163.com |
213e179ccf3c6f8cfb33c2972ccd96a6abcd8b3d | fc20252e43465c944f30c86c00372b5ad1f972bd | /Trapezoidal Method.cpp | f9ca8ec0e4d2bbd31296e3a8ad10546af796500b | [] | no_license | FariaTabassum/Numerical-Method | 0b625771463b0518cada5e26235f3ad0d4cc04f5 | 3acaf469cfcd928aee7243e959f9c4ef18bfa57a | refs/heads/master | 2023-05-12T16:23:28.567681 | 2021-05-29T19:01:17 | 2021-05-29T19:01:17 | 340,272,796 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 593 | cpp | #include<stdio.h>
#include<math.h>
float f(float x)
{
float a;
a=x/(1+x);
return a;
}
int main()
{
int n,i;
float a,b,h,sum=0,I,y0,yn;
printf("\n Enter the upper limit: ");
scanf ("%f",&b);
printf("\n Enter the lower limit: ");
scanf ("%f",&a);
printf("\n Enter the interval: ");
scanf ("%d",&n);
h=(b-a)/n;
y0=f(a+0*h);
yn=f(a+n*h);
i=1;
while(i<n)
{
sum=sum+f(a+i*h);
i++;
}
I=(h/2)*(y0 + yn + 2*sum);
printf("\n The integral of the equation using Trapezoidal Rule is %.3f:\n",I);
return 0;
}
| [
"tabassumfaria70@gmail.com"
] | tabassumfaria70@gmail.com |
d823acd6c3b608697e1d82bc6d7b8e07a6f96b9d | a28af655fbfcd2939fe50e30f8f5294f07c106d2 | /Source/AudiusClient/Gui/Welcome/WelcomeComponent.cpp | 8e2a3a9224d6062581de81256fae95fa9fecd60f | [] | no_license | cnsuhao/Audius | d365dac2f0be7fcc844c913901013d3a8b47ca1e | 22c3c61af6efdeb0ac92cc8fbad571e1694d4887 | refs/heads/master | 2021-05-26T16:59:25.928600 | 2012-10-06T14:51:20 | 2012-10-06T14:51:20 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,333 | cpp | /*
==============================================================================
This is an automatically generated file created by the Jucer!
Creation date: 4 Jan 2010 2:58:41 pm
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
Jucer version: 1.12
------------------------------------------------------------------------------
The Jucer is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-6 by Raw Material Software ltd.
==============================================================================
*/
//[Headers] You can add your own extra header files here...
#include "Precompiled.h"
//[/Headers]
#include "WelcomeComponent.h"
//[MiscUserDefs] You can add your own user definitions and misc code here...
//[/MiscUserDefs]
//==============================================================================
WelcomeComponent::WelcomeComponent ()
: label (0),
label2 (0),
toggleYes (0),
toggleRemind (0),
toggleNo (0),
textButton (0)
{
addAndMakeVisible (label = new Label (String::empty,
"Would you like to add your music to Clodder?"));
label->setFont (Font (15.0000f, Font::plain));
label->setJustificationType (Justification::centred);
label->setEditable (false, false, false);
label->setColour (TextEditor::textColourId, Colours::black);
label->setColour (TextEditor::backgroundColourId, Colour (0x0));
addAndMakeVisible (label2 = new Label (String::empty,
"Welcome to Audius\nmusic player for Clodder"));
label2->setFont (Font (25.1000f, Font::bold));
label2->setJustificationType (Justification::centred);
label2->setEditable (false, false, false);
label2->setColour (TextEditor::textColourId, Colours::black);
label2->setColour (TextEditor::backgroundColourId, Colour (0x0));
addAndMakeVisible (toggleYes = new ToggleButton ("Yes"));
toggleYes->setButtonText ("Yes (recommended)");
toggleYes->setRadioGroupId (1);
toggleYes->addListener(this);
addAndMakeVisible (toggleRemind = new ToggleButton ("Remind"));
toggleRemind->setButtonText ("Remind me later");
toggleRemind->setRadioGroupId (1);
toggleRemind->addListener(this);
addAndMakeVisible (toggleNo = new ToggleButton ("No"));
toggleNo->setRadioGroupId (1);
toggleNo->addListener(this);
addAndMakeVisible (textButton = new TextButton ("new button"));
textButton->setButtonText ("Next ->");
textButton->addListener(this);
//[UserPreSize]
//[/UserPreSize]
setSize (380, 280);
//[Constructor] You can add your own custom stuff here..
//[/Constructor]
}
WelcomeComponent::~WelcomeComponent()
{
//[Destructor_pre]. You can add your own custom destruction code here..
//[/Destructor_pre]
deleteAndZero (label);
deleteAndZero (label2);
deleteAndZero (toggleYes);
deleteAndZero (toggleRemind);
deleteAndZero (toggleNo);
deleteAndZero (textButton);
//[Destructor]. You can add your own custom destruction code here..
//[/Destructor]
}
//==============================================================================
void WelcomeComponent::paint (Graphics& g)
{
//[UserPrePaint] Add your own custom painting code here..
//[/UserPrePaint]
g.fillAll (Colours::white);
ColourGradient gradient_1 (Colours::white,
152.0f, 24.0f,
Colour (0xffbee6c8),
240.0f, 280.0f,
false);
g.setGradientFill(gradient_1);
g.fillRect (0, 0, proportionOfWidth (1.0000f), proportionOfHeight (1.0000f));
g.setColour (Colour (0xff2aa581));
g.fillEllipse ((float) (-28), (float) (-28), 100.0f, 100.0f);
//[UserPaint] Add your own custom painting code here..
//[/UserPaint]
}
void WelcomeComponent::resized()
{
label->setBounds (8, 88, 368, 24);
label2->setBounds (8, 8, 368, 64);
toggleYes->setBounds (120, 128, 150, 24);
toggleRemind->setBounds (120, 152, 150, 24);
toggleNo->setBounds (120, 176, 150, 24);
textButton->setBounds (216, 232, 150, 24);
//[UserResized] Add your own custom resize handling here..
//[/UserResized]
}
void WelcomeComponent::buttonClicked (Button* buttonThatWasClicked)
{
//[UserbuttonClicked_Pre]
//[/UserbuttonClicked_Pre]
if (buttonThatWasClicked == toggleYes)
{
//[UserButtonCode_toggleYes] -- add your button handler code here..
//[/UserButtonCode_toggleYes]
}
else if (buttonThatWasClicked == toggleRemind)
{
//[UserButtonCode_toggleRemind] -- add your button handler code here..
//[/UserButtonCode_toggleRemind]
}
else if (buttonThatWasClicked == toggleNo)
{
//[UserButtonCode_toggleNo] -- add your button handler code here..
//[/UserButtonCode_toggleNo]
}
else if (buttonThatWasClicked == textButton)
{
//[UserButtonCode_textButton] -- add your button handler code here..
//[/UserButtonCode_textButton]
}
//[UserbuttonClicked_Post]
//[/UserbuttonClicked_Post]
}
//[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
//[/MiscUserCode]
//==============================================================================
#if 0
/* -- Jucer information section --
This is where the Jucer puts all of its metadata, so don't change anything in here!
BEGIN_JUCER_METADATA
<JUCER_COMPONENT documentType="Component" className="WelcomeComponent" componentName=""
parentClasses="public Component" constructorParams="" variableInitialisers=""
snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330000013"
fixedSize="0" initialWidth="380" initialHeight="280">
<BACKGROUND backgroundColour="ffffffff">
<RECT pos="0 0 100% 100%" fill="linear: 152 24, 240 280, 0=ffffffff, 1=ffbee6c8"
hasStroke="0"/>
<ELLIPSE pos="-28 -28 100 100" fill="solid: ff2aa581" hasStroke="0"/>
</BACKGROUND>
<LABEL name="" id="78e526e81f48e65" memberName="label" virtualName=""
explicitFocusOrder="0" pos="8 88 368 24" edTextCol="ff000000"
edBkgCol="0" labelText="Would you like to add your music to Clodder?"
editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="36"/>
<LABEL name="" id="4610de6778e61a4a" memberName="label2" virtualName=""
explicitFocusOrder="0" pos="8 8 368 64" edTextCol="ff000000"
edBkgCol="0" labelText="Welcome to Audius music player for Clodder"
editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
fontname="Default font" fontsize="25.1" bold="1" italic="0" justification="36"/>
<TOGGLEBUTTON name="Yes" id="86f3025b7c502d7e" memberName="toggleYes" virtualName=""
explicitFocusOrder="0" pos="120 128 150 24" buttonText="Yes (recommended)"
connectedEdges="0" needsCallback="1" radioGroupId="1" state="0"/>
<TOGGLEBUTTON name="Remind" id="ccd6cb374536e552" memberName="toggleRemind"
virtualName="" explicitFocusOrder="0" pos="120 152 150 24" buttonText="Remind me later"
connectedEdges="0" needsCallback="1" radioGroupId="1" state="0"/>
<TOGGLEBUTTON name="No" id="e1b119a17130d8a0" memberName="toggleNo" virtualName=""
explicitFocusOrder="0" pos="120 176 150 24" buttonText="No" connectedEdges="0"
needsCallback="1" radioGroupId="1" state="0"/>
<TEXTBUTTON name="new button" id="b386e30f8cf1410f" memberName="textButton"
virtualName="" explicitFocusOrder="0" pos="216 232 150 24" buttonText="Next ->"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
</JUCER_COMPONENT>
END_JUCER_METADATA
*/
#endif
| [
"pontus.munck@gmail.com"
] | pontus.munck@gmail.com |
1069df8af3d28fe85b7e0efd0f9251bc084375e9 | 7c1dc9907f6b009a87abb5a8a50e771a56b86bf4 | /DataStructure/codeforces/706_1.cpp | 2c1fa357a8f5d6a3fc4d1c2d186de20ba68c9700 | [] | no_license | TarunSaini063/Coding | 4b6a022a23488bbf5a4a1a746d865388095707ab | cd0abd63b469ab7f3be52eca0b5305a49c3f25b6 | refs/heads/master | 2021-08-22T17:41:58.152521 | 2021-05-22T08:58:28 | 2021-05-22T08:58:28 | 252,940,387 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 783 | cpp | #include <bits/stdc++.h>
using namespace std;
#define ld double
#define ll long long
#define pb emplace_back
#define mk make_pair
#define mod 1000000007
#define ff first
#define sz(v) (int)v.size();
#define ss second
#define FIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define all(x) x.begin(),x.end()
ll power(ll a, ll b){ll res=1;a=a%mod; while(b){if(b&1)res=(res*a)%mod; a=(a*a)%mod;b/=2;}return res;}
ll invmod(ll a){return power(a,mod-2);}
int main(void)
{
FIO
int t;
cin>>t;
while(t--){
int n,k;
cin >> n>> k;
string s;
cin>>s;
if(n<2*k+1) cout<<"NO\n";
else{
string start = s.substr(0,k);
string end = s.substr(n-k,k);
reverse(all(end));
if(start == end ){
cout<<"YES\n";
}else cout<<"NO\n";
}
}
return 0;
} | [
"tsaini063@outlook.com"
] | tsaini063@outlook.com |
396eee27335a6b36de1b6ff78fb6fa9eff2fd431 | 8f1290aa98cc5214dcfbe4f5706b5b7a63b8e87b | /src/store/Removing_Elements_7.cpp | 89b0dfa69c13f81f7b79f1fe73a308836e55b0b8 | [] | no_license | RamazanDemirci/cppAdvancedSTL | 2b9e5805da3c5c36829b9c0bea77086f7b6b949e | 571ff7edfe3c2d2e0225cf1c812e6b2fc5ae8036 | refs/heads/main | 2023-01-31T04:06:22.660155 | 2020-12-16T18:43:34 | 2020-12-16T18:43:34 | 315,716,164 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,699 | cpp | #include <iterator>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
#include <list>
#include <set>
#include <unordered_set>
//Print contents or container
template <class T>
void print(T t, std::string msg)
{
std::cout << msg << " { ";
for (typename T::iterator it = t.begin(); it != t.end(); it++)
{
std::cout << *it << ", ";
}
std::cout << "}" << std::endl;
}
int main()
{
// Print a message whenever an item is removed
std::multiset<int> c = {1, 4, 6, 1, 1, 1, 1, 12, 18, 16}; //Remove 1's
for (std::multiset<int>::iterator itr = c.begin(); itr != c.end(); itr++)
{
if (*itr == 1)
{
c.erase(itr);
std::cout << "Erase one item of " << *itr << std::endl;
}
}
/*
it prints out erased one item of one and then the program crashed so the first element of one is erased and then the
program crashed or happened in the first loop of the for loop itr is equal to c.begin() which is the element of one
since this element is equal to 1 it is erased successfully and then something bad happened after the code of c.begin()
erase itr is finished the element that itr was pointing to is erased and every time an element is erased the
iterator that was pointing to that element is invalidated so itr is invalidated it is no longer a valid
iterator anymore and this is true for all containers iterators of erased elements are always invalidated so when
we go to the second run of the for loop and check if it equal to c.end() the result is undefined behavior and in this
case the undefined behavior is the program crashed!
*/
return 0;
}
| [
"radem18@gmail.com"
] | radem18@gmail.com |
868adbff0fe4324ba3898dfddea63421af8a9da1 | 9463bd91cea097f41c2a3b4adc34838267d17170 | /easy/conditional_statements.cpp | 43d436137605029547a9d3f63c2807aad9b6e6a5 | [] | no_license | DolotovEvgeniy/cpp-practice-hackerrank | e6cff0a06aba15da0839abf1ff0b77ff80e5ea64 | 5a958095be76e1032830201df37de12c0f2810e8 | refs/heads/master | 2022-12-28T04:34:38.233135 | 2020-09-19T23:23:11 | 2020-09-19T23:23:11 | 296,870,365 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 650 | cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
cin.ignore(numeric_limits<streamsize>::max(), '\n');
if (n == 1) {
cout << "one";
} else if (n == 2) {
cout << "two";
} else if (n == 3) {
cout << "three";
} else if (n == 4) {
cout << "four";
} else if (n == 5) {
cout << "five";
} else if (n == 6) {
cout << "six";
} else if (n == 7) {
cout << "seven";
} else if (n == 8) {
cout << "eight";
} else if (n == 9) {
cout << "nine";
} else {
cout << "Greater than 9";
}
return 0;
}
| [
"dolotov.evgeniy@gmail.com"
] | dolotov.evgeniy@gmail.com |
823e232cc47a9279d39cea13db9f1d3b89e584bd | dfd2eb796494fdd129800b066f4e624523f45a03 | /include/errc.ht | 426872f50bed2c3c4870d59deb265a4ab07c2e0d | [] | no_license | Dr-XX/pandore-bug-injected | 81d099d6a890a2c5be1617df254a96c7a2addcf9 | a3cf01cec67d04581ec20eeaa6bf8cabd016e826 | refs/heads/master | 2022-03-28T21:50:05.001637 | 2020-01-16T08:27:29 | 2020-01-16T08:27:29 | 230,410,981 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,773 | ht | /* -*- mode: c++; c-basic-offset: 3 -*-
*
* Copyright (c), GREYC.
* All rights reserved
*
* You may use this file under the terms of the BSD license as follows:
*
* "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 GREYC, nor the name of its
* contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
*
*
* For more information, refer to:
* https://clouard.users.greyc.fr/Pandore
*/
/**
* @file errc.h
* @brief The definition of the type Errc which holds any primitive
* type value.
*/
#ifndef __PERRCH__
#define __PERRCH__
#include <memory.h>
#ifdef _WIN32
#define HOME "USERPROFILE"
#else
#define HOME "HOME"
#endif
#define PANDORE_TMP "PANDORE_TMP"
namespace pandore {
/** @enum FS_t Enumeration of predefined values for error codes. */
typedef enum { FAILURE = 0, SUCCESS } FS_t;
class Errc;
/**
* Terminates the current execution and returns the specified
* value as the error code.
* Overloads the C-function exit().
* <br>The value is stored in the USEHOME/.pandore file.
* This allows to handle Errc values, while the C exit() command
* can only store a char value.
* The error code can then be read with the
* Pandore operator: @b pstatus.
* @param e the error code.
*/
void Exit( const Errc &e );
/**
* Terminates the current execution and returns the specified
* value as the error code.
* Overloads the C-function exit().
* <br>This value is stored in the USERHOME/.pandore file.
* This allows to handle Errc values, while the C exit() command
* can only store a char value.
* The error code can then be read with the
* Pandore operator: @b pstatus.
* @param v the error code.
*/
void Exit( FS_t v );
/**
* Terminates the current execution and returns the specified
* value as the error code.
* Overloads the C-function exit().
* <br>This value is stored in the USERHOME/.pandore file.
* This allows to handle Errc values, while the C exit() command
* can only store a char value.
* The error code can then be read with the
* Pandore operator: @b pstatus.
* @param v an integer value.
*/
void Exit( int v );
##begin Exit TYPE
/**
* Terminates the current execution and returns the specified
* value as the error code.
* Overloads the C-function exit().
* <br>This value is stored in the USERHOME/.pandore file.
* This allows to handle Errc values, while the C exit() command
* can only store a char value.
* The error code can then be read with the
* Pandore operator: @b pstatus.
* @param v the error code.
*/
void Exit( TYPE v );
##end
##forallbase(Exit, /./)
/** @brief A type that contains any primitive type value.
*
* The class Errc defines a type of any value type.
* It can be set with any primitive type value
* (Uchar, Slong, Float, bool, ... - Except int)
* or one of the predefined values: SUCCESS or FAILURE.
*
* The actual type of Errc is defined by setting.
* <br>For example, the following lines set the variable a to the
* integer 12 and then change it to the predefined value SUCCESS
* or to the float value 12.5:
* @code
* Errc a; a=12;
* if (a==12) then a=SUCCESS else a=12.5;
* @endcode
*
* This type mainly used for the return type of the operator functions:
* @code Errc function(<parameters>*) {
* < instruction >*;
* return SUCCESS;
* } @endcode
*/
class Errc {
private:
enum { FS_RET
##begin enum TYPE
, TYPE$_RET
##end
##forallbase(enum, /./)
} _ret;
public :
/*
* Creates a value from the specified predefined error code.
* The type <code>FS_t</code> allows only two predefined
* values : {SUCCESS, FAILURE}
* @param value the specified error code between {SUCCESS, FAILURE}.
*/
Errc( const FS_t value = SUCCESS ) {
_ret = FS_RET;
_val.fs = value;
}
/*
* Creates a value from the specified boolean value.
* @param value the specified boolean value.
*/
Errc( bool value ) {
_ret = FS_RET;
_val.fs = (value) ? SUCCESS : FAILURE;
}
##begin cons TYPE
/*
* Creates a value from the specified TYPE value.
* @param value the specified TYPE value.
*/
Errc( TYPE value ) {
_ret = TYPE$_RET;
_val.v_$TYPE = value;
}
##end
##forallbase(cons, /./)
/*
* Creates a value from the specified Errc.
* @param error the specified Errc.
*/
Errc( const Errc &error ) {
_ret = error._ret;
memcpy(&_val, &error._val, sizeof(_val));
}
/**
* Sets the error value with the specified value.
* @param error the specified value
*/
Errc& operator =( const Errc &error ) {
_ret = error._ret;
memcpy(&_val, &error._val, sizeof(_val));
return *this;
}
/*
* Converts the value to a boolean value.
* @return true if the current value is SUCCESS or a numerical value !=0.
*/
operator bool() {
switch(_ret) {
case FS_RET: return _val.fs == SUCCESS;
##begin enum TYPE
case TYPE$_RET: return 1;
##end
##forallbase(enum, /./)
default: return false;
}
}
/*
* Converts the current value to an error code value;
* i.e., a value in the predefined set {SUCCESS, FAILURE}.
* @return FAILURE if the current value is any form of 0, SUCCESS otherwise.
*/
operator FS_t() { return _val.fs; }
##begin cons TYPE
/*
* Converts the value to a TYPE value.
* @return the related value.
*/
operator TYPE() {
switch(_ret) {
case FS_RET: return (TYPE)(_val.fs == SUCCESS);
case Char_RET: return (TYPE)_val.v_Char;
case Uchar_RET: return (TYPE)_val.v_Uchar;
case Short_RET: return (TYPE)_val.v_Short;
case Ushort_RET: return (TYPE)_val.v_Ushort;
case Long_RET: return (TYPE)_val.v_Long;
case Ulong_RET: return (TYPE)_val.v_Ulong;
case Float_RET: return (TYPE)_val.v_Float;
case Double_RET : return (TYPE)_val.v_Double;
case Llong_RET : return (TYPE)_val.v_Double;
case Ullong_RET : return (TYPE)_val.v_Double;
default: return 0;
}
}
##end
##forallbase(cons, /./)
/**
* Returns the logical negation of the current value.
*/
bool operator !() {
bool b = *this;
return !b;
}
/**
* Terminates the current execution and returns the
* current value as the error code.
* Overloads the C-function exit().
* The error code can then be read with the
* Pandore operator: @b pstatus.
*/
void Exit() const;
friend bool operator !=( Errc &e1, FS_t value ) ;
friend bool operator !=( FS_t value, Errc &e1 ) ;
friend bool operator ==( Errc &e1, FS_t value ) ;
friend bool operator ==( FS_t value, Errc &e1 ) ;
friend bool operator &&( Errc &e1, Errc &e2 ) ;
friend bool operator &&( Errc &e, bool b ) ;
friend bool operator &&( bool b, Errc &e );
friend bool operator ||( Errc &e1, Errc &e2 ) ;
friend bool operator ||( Errc &e, bool b ) ;
friend bool operator ||( bool b, Errc &e );
private:
/** The current value. */
union {
FS_t fs;
##begin struct TYPE
TYPE v_$TYPE;
##end
##forallbase(struct, /./)
} _val;
};
inline bool operator ==( Errc &e, FS_t value ) {
if (e._ret == Errc::FS_RET) {
return e._val.fs == value;
} else {
return false;
}
}
inline bool operator ==( FS_t value, Errc &e ) {
if (e._ret == Errc::FS_RET) {
return e._val.fs == value;
} else {
return false;
}
}
inline bool operator !=( Errc &e, FS_t value ) {
if (e._ret == Errc::FS_RET) {
return e._val.fs != value;
} else {
return true;
}
}
inline bool operator !=( FS_t value, Errc &e ) {
if (e._ret == Errc::FS_RET) {
return e._val.fs != value;
} else {
return true;
}
}
/**
* Performs logical et between 2 errc.
* @param e1 the first operand.
* @param e2 the second operand.
*/
inline bool operator &&( Errc &e1, Errc &e2 ) {
bool b1 = e1;
bool b2 = e2;
return b1 && b2;
}
/**
* Performs logical et between an errc and a boolean.
* @param e an errc.
* @param b a boolean
*/
inline bool operator &&( Errc &e, bool b ) {
bool b1 = e;
return b1 && b;
}
/**
* Performs logical et between an errc and a boolean.
* @param b a boolean
* @param e an errc.
*/
inline bool operator &&( bool b, Errc &e ) {
bool b1 = e;
return b && b1;
}
/**
* Performs logical or between 2 errc.
* @param e1 the first operand.
* @param e2 the second operand.
*/
inline bool operator ||( Errc &e1, Errc &e2 ) {
bool b1 = e1;
bool b2 = e2;
return b1 || b2;
}
/**
* Performs logical or between an errc and a boolean.
* @param e an errc.
* @param b a boolean
*/
inline bool operator ||( Errc &e, bool b ) {
bool b1 = e;
return b1 || b;
}
/**
* Performs logical or between an errc and a boolean.
* @param b a boolean
* @param e an errc.
*/
inline bool operator ||( bool b, Errc &e ) {
bool b1 = e;
return b || b1;
}
} //End of pandore:: namespace
#endif // __PERRCH__
| [
"jordan0801@163.com"
] | jordan0801@163.com |
6cc5a6bcd54c27237ab972af6ed4fb5c0e60637c | 4c4b6039cb9d603f8baa0f749e408391f445de79 | /BAB 7/inisialisasi-array-2-dimensi.cpp | c79f231d01724cda08ff4fe52e0e1311cc614eef | [] | no_license | agungzero/UTS-DASAR-PEMROGRAMAN | 8f81c34a060ed218d51aac75b1135961c30d0d81 | 322cb53d9b2620e5c9b10fde5e4dcf76078d08e6 | refs/heads/master | 2020-08-27T04:55:13.636248 | 2019-10-24T08:48:56 | 2019-10-24T08:48:56 | 217,250,108 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 503 | cpp | #include <iostream>
using namespace std;
int main()
{
cout << "Nama : Agung Gummelar " << endl;
cout << "NIM : A2.1900006 " << endl;
int A [2] [4] = {1,2,3,4,5,6,7,8};
int i,j;
cout << "Aplikasi Matriks Ordo 2 x 4" << endl;
for (i=0; i<2; i++)
{
for (j=0; j<4; j++)
{
//menampilkan hasil dari indeks i dan j
cout << "A [" << i << "] [" << j << "] = " << A [i][j] << endl;
}
cout << endl;
}
return 0;
}
| [
"agungucup00@gmail.com"
] | agungucup00@gmail.com |
418b545d12994139be1e07bc04336a9f53071d0c | 69784e105ddc2aca3699b6b07dbcb1834d7c242c | /Classes/Native/AssemblyU2DCSharp_Vuforia_VuMarkBehaviour2060629989.h | 858948d5537154c77d2530620dbbe0c354c2ca4d | [] | no_license | ryanmcgrail95/CRHC-iOS | 7e72139100b2140143deb424d21fdc69b2959ed1 | 1b00260e6c59f552d9a8b94e42fcae5e657a6c46 | refs/heads/master | 2021-06-12T11:21:33.461817 | 2017-03-04T01:08:34 | 2017-03-04T01:08:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 575 | h | #pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
#include "Vuforia_UnityExtensions_Vuforia_VuMarkAbstractBeha1830666997.h"
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Vuforia.VuMarkBehaviour
struct VuMarkBehaviour_t2060629989 : public VuMarkAbstractBehaviour_t1830666997
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
| [
"rmcgrai1@nd.edu"
] | rmcgrai1@nd.edu |
22124f68b2e50895fc126992dbaf24dd476abc17 | 2736f482c60c65faeb7528c8aed73564582e383e | /Src/Modules/Sensing/GroundContactDetector.h | a0eefd44881e7c37472470e8c262074cdd4abbef | [] | no_license | LukeLu1263/WrightOcean2012 | 1de6348d980e88e90e921af64e38e97a694333cd | 7e48a2e782561653888e739eb9f7b62cdfb9d948 | refs/heads/master | 2021-01-25T05:16:22.624010 | 2013-08-08T16:58:56 | 2013-08-08T16:58:56 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,087 | h | /**
* @file GroundContactDetector.h
*
* Declaration of module GroundContactDetector.
*
* @author <a href="mailto:fynn@informatik.uni-bremen.de">Fynn Feldpausch</a>
*/
#pragma once
#include "Tools/Module/Module.h"
#include "Tools/RingBufferWithSum.h"
#include "Representations/Infrastructure/SensorData.h"
#include "Representations/Infrastructure/FrameInfo.h"
#include "Representations/Infrastructure/RobotInfo.h"
#include "Representations/Sensing/GroundContactState.h"
#include "Representations/MotionControl/MotionInfo.h"
#include "Representations/MotionControl/MotionRequest.h"
MODULE(GroundContactDetector)
REQUIRES(SensorData)
REQUIRES(FrameInfo)
REQUIRES(MotionRequest)
USES(MotionInfo)
PROVIDES_WITH_MODIFY(GroundContactState)
END_MODULE
/**
* @class GroundContactDetector
* A module for sensor data filtering.
*/
class GroundContactDetector : public GroundContactDetectorBase
{
public:
/** Default constructor. */
GroundContactDetector();
private:
/**
* A collection of parameters for the ground contact detector.
*/
class Parameters : public Streamable
{
public:
bool forceContact; // true -> always ground contact
float fsrLimit; // higher fsr values will be ignored
float fsrThreshold; // threshold for fsr contact
float loadThreshold; // threshold for load contact
float contactThreshold; // threshold for safe ground contact
float noContactThreshold; // threshold for safe no ground contact
int safeContactTime; // minimum continuous contact to be safe in ms
int safeNoContactTime; // minimum continuous non-contact to be safely lifted up in ms
private:
/**
* The method makes the object streamable.
* @param in The stream from which the object is read.
* @param out The stream to which the object is written.
*/
virtual void serialize(In* in, Out* out)
{
STREAM_REGISTER_BEGIN();
STREAM(forceContact);
STREAM(fsrLimit);
STREAM(fsrThreshold);
STREAM(loadThreshold);
STREAM(contactThreshold);
STREAM(noContactThreshold);
STREAM(safeContactTime);
STREAM(safeNoContactTime);
STREAM_REGISTER_FINISH();
}
};
Parameters p;
bool contact;
bool lastContact;
unsigned int contactStartTime;
unsigned int noContactStartTime;
static const int BUFFER_SIZE = 25;
RingBufferWithSum<float, BUFFER_SIZE> confidenceContactBuffer;
RingBufferWithSum<float, BUFFER_SIZE> confidenceNoContactBuffer;
struct ContactState
{
bool contact;
float confidence;
};
void init();
/**
* Checks the loads in respect of the ground contact.
*/
struct ContactState checkLoad();
/**
* Checks the FSRs in respect of the ground contact.
* @param left Check the FSRs of the left or right foot?
*/
struct ContactState checkFsr(bool left);
/**
* Updates the GroundContactState representation.
* @param groundContactState The ground contact representation which is updated by this module.
*/
void update(GroundContactState& groundContactState);
};
| [
"lzf824446@163.com"
] | lzf824446@163.com |
6292e85cdf479fd99e163e781f3de068c4ca8fb2 | a7aa20b665f77bb2d78183eea9cc353011cab982 | /acm/uva/1727.cpp | aafc11db37dae75bb47537692457b36bb970c6b4 | [] | no_license | tanny411/Competitive-Programming | 96addd4d83e483d95581c7258875d7c685b074cc | 775810825ad08bdb78e214ee2a713576677a6346 | refs/heads/master | 2021-06-28T07:51:51.432442 | 2020-09-16T18:43:10 | 2020-09-16T18:43:10 | 143,970,535 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 870 | cpp | #include<stdio.h>
#include<map>
#include<string>
using namespace std;
int main()
{
map<string,int>month,day;
month["JAN"]=31;month["FEB"]=28;month["MAR"]=31;month["APR"]=30;
month["MAY"]=31;month["JUN"]=30;month["JUL"]=31;month["AUG"]=31;
month["SEP"]=30;month["OCT"]=31;month["NOV"]=30;month["DEC"]=31;
day["SUN"]=0;day["MON"]=1;day["TUE"]=2;day["WED"]=3;day["THU"]=4;
day["FRI"]=5;day["SAT"]=6;
char m[13],d[8];
int test,a,date,sat,fri;
scanf("%d",&test);
while(test--)
{
scanf("%s %s", m, d);
a=day[d];date=1,sat=fri=0;
if(a==6) sat++;
while(a!=5){
a=(a+1)%7;
date++;
}
while(date<=month[m])
{
fri++;
if((date+1)<=month[m]) sat++;
date+=7;
}
printf("%d\n",fri+sat);
}
return 0;
}
| [
"aysha.kamal7@gmail.com"
] | aysha.kamal7@gmail.com |
3426a32c1dcce1c92261cce70442b6ffb00a1f87 | 09aff9efb28ab414036a21be3b757437cd4f473b | /src/flags/values.h | f4ab576e4a036e71f80dc12b95395739cdec0039 | [
"MIT"
] | permissive | tomocy/cpp-flags | 407d386d5727ce4643eb3d977239ae727c68ba32 | e3018f41293c37dc9a3256983945db31e0d1152d | refs/heads/master | 2022-10-21T02:29:31.690528 | 2020-06-11T14:23:11 | 2020-06-11T14:23:11 | 268,300,198 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,597 | h | #ifndef TOMOCY_CPP_FLAGS_FLAGS_VALUES_H
#define TOMOCY_CPP_FLAGS_FLAGS_VALUES_H
#include <memory>
#include <string>
namespace flags {
class Value {
public:
virtual ~Value() {}
virtual Value& operator=(const std::string& value) = 0;
virtual std::string Type() const noexcept = 0;
virtual std::string ToString() const noexcept = 0;
};
} // namespace flags
namespace flags {
class String : public Value {
public:
static std::unique_ptr<String> Make(const std::string& value) noexcept;
explicit String(const std::string& value) noexcept;
Value& operator=(const std::string& value) noexcept override;
std::string Type() const noexcept override;
std::string ToString() const noexcept override;
const std::string& Value() const noexcept;
private:
std::string value;
};
} // namespace flags
namespace flags {
class Int : public Value {
public:
static std::unique_ptr<Int> Make(int value) noexcept;
explicit Int(int value) noexcept;
Value& operator=(const std::string& value) override;
std::string Type() const noexcept override;
std::string ToString() const noexcept override;
int Value() const noexcept;
private:
int value;
};
} // namespace flags
namespace flags {
class Bool : public Value {
public:
static std::unique_ptr<Bool> Make(bool value) noexcept;
explicit Bool(bool value) noexcept;
Value& operator=(const std::string& value) override;
std::string Type() const noexcept override;
std::string ToString() const noexcept override;
bool Value() const noexcept;
private:
bool value;
};
} // namespace flags
#endif | [
"tomocy.dev@gmail.com"
] | tomocy.dev@gmail.com |
e3ddb07f79df299c0ec019f81607f4462eaaf5a8 | ef3824cf7c72c40661cb11ea339654b788b75286 | /Ex-2/Reactor/AlarmEvent.cpp | 471f2ca68b276a9a82db9959cfbd13748d1f66df | [] | no_license | itfenom/POSA2Patterns | d7150b8b98d5d3f0cb0f04d647b93920ba71bad6 | 7db7c2cfac6c8529e22a29a01a52f13ffba1d974 | refs/heads/master | 2021-06-25T11:39:23.919265 | 2017-08-31T12:05:04 | 2017-08-31T12:05:04 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,151 | cpp | #include "AlarmEvent.h"
ReactorPattern::AlarmEvent::AlarmEvent()
{
alarmText = "";
priority = "";
}
ReactorPattern::AlarmEvent::AlarmEvent(char * alarmtext, char * prioritytext)
{
alarmText = alarmtext;
priority = prioritytext;
}
char * ReactorPattern::AlarmEvent::timeStamp()
{
return nullptr;
}
char * ReactorPattern::AlarmEvent::getAlarmText()
{
return alarmText;
}
char * ReactorPattern::AlarmEvent::getPriority()
{
return priority;
}
char* ReactorPattern::AlarmEvent::appendCharToCharArray(char* array, char a)
{
size_t len = strlen(array);
char* ret = new char[len + 2];
strcpy_s(ret, len + 2, array);
ret[len] = a;
ret[len + 1] = '\0';
return ret;
}
ReactorPattern::AlarmEvent ReactorPattern::AlarmEvent::charsToAlarmEvent(char * buffer)
{
int i = 0;
int n = strlen(buffer);
for (i ; i < n; i++)
{
if (buffer[i] != ';')
{
char * c = appendCharToCharArray(priority, buffer[i]);
priority = c;
}
else break;
}
for (i=i+1; i < n; i++)
{
if (buffer[i] != '$')
{
char * c = appendCharToCharArray(alarmText, buffer[i]);
alarmText = c;
}
else break;
}
return AlarmEvent(alarmText, priority);
}
| [
"popovicidanielai@gmail.com"
] | popovicidanielai@gmail.com |
aabdfb838983000659315cb1da570daea3f08798 | ef6ef195ecff4a349d7cb2611bd67ba2ab92f34b | /hdu.cpp/杭电1716.cpp | ca1cdabb6e9edeae140474058a06c95ca92bb95c | [] | no_license | GDDXH/First-year-of-University | 2f721ca182c02c8dde3fe957dc69bd825969ac43 | 67ec100de6bc03cb538f8db5babcd32c1ab3e992 | refs/heads/master | 2020-12-10T09:09:43.968893 | 2020-01-13T09:32:47 | 2020-01-13T09:32:47 | 233,552,368 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 623 | cpp | #include<iostream>
#include<cstring>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
int a[4],t,flag,amout=0;
while(scanf("%d %d %d %d",&a[0],&a[1],&a[2],&a[3]))
{
if(a[0]==0&&a[1]==0&&a[2]==0&&a[3]==0)
{
break;
}
if(amout==1)
cout<<endl;
flag=1;
amout=1;
sort(a,a+4);
t=a[3];
do
{
if(a[0]==0)
continue;
if(flag)
{
cout<<a[0]<<a[1]<<a[2]<<a[3];
flag=0;
}
else if(t!=a[0])
{
cout<<endl<<a[0]<<a[1]<<a[2]<<a[3];
}
else
{
cout<<" "<<a[0]<<a[1]<<a[2]<<a[3];
}
t=a[0];
}while(next_permutation(a,a+4));
cout<<endl;
}
}
| [
"911594111@qq.com"
] | 911594111@qq.com |
91ed28eefe19aeb691aeb562e9a1fca5e4946355 | 747b6c40610d6a69dcdd2d12fa042a54bdb91a25 | /uiframe/qpurecolorbutton.h | f2a56345a54ed1941838bfac64b55d2f01f60bab | [
"Unlicense"
] | permissive | spyhooky/QtDeskTop | 0cf22f649cc019d5fdbfc92e85adeeb959909dff | e189615bc0359256ad5770ca7fbc718f20604397 | refs/heads/master | 2023-05-25T18:40:01.428282 | 2015-12-08T01:03:03 | 2015-12-08T01:03:03 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,579 | h | #ifndef QPURECOLORBUTTON_H
#define QPURECOLORBUTTON_H
#include <QWidget>
#include <QPushButton>
#include <QLabel>
class QPureColorButton : public QWidget
{
Q_OBJECT
public:
explicit QPureColorButton(QWidget *parent = 0);
~QPureColorButton() {}
void setColors(const QColor &pres,const QColor &release
, const QColor &enter,const QColor &leave);
void setPressColor( const QColor &c) { m_pressColor = c;}
void setReleaseColor(const QColor &c) { m_releaseColor = c;}
void setEnterColor ( const QColor &c) { m_enterColor = c;}
void setLeaveColor(const QColor &c) { m_leaveColor = c;}
void setButtonText(const QString &txt)
{
if (m_lbtitle )
m_lbtitle->setText(txt);
}
void setTextStyle(const QString &st)
{
if ( m_lbtitle )
m_lbtitle->setStyleSheet(st);
}
void setIndex(const int &id) { m_index = id; }
int getIndex() const { return m_index; }
QString getButtonText()const {;}
signals:
void clicked();
void clicked(int);
protected:
void enterEvent(QEvent *);
void leaveEvent(QEvent *);
void mousePressEvent(QMouseEvent *);
void mouseReleaseEvent(QMouseEvent *);
void paintEvent(QPaintEvent *);
public slots:
private:
bool m_pressed;
bool m_entered;
int m_index;
QColor m_currentColor;
QColor m_releaseColor;
QColor m_enterColor;
QColor m_leaveColor;
QColor m_pressColor;
QLabel *m_lbtitle;
};
#endif // QPURECOLORBUTTON_H
| [
"xd.yang@nf-3.com"
] | xd.yang@nf-3.com |
475d0aab5956b6971f0dbd12a32af1f71394ca23 | 4d50d5c8f6f8975f3b97e2de42a3b1e79ed0c171 | /socks_lib1.cpp | a465b84c74ebc502b2c5a3ff0d3ba277106eac31 | [] | no_license | AndrewK225/Sockslib | 9161b485c71e3cccd23df57f614299473c4888d7 | fe2df4bb35a179ef6b778c41aff68e897d6d9dc9 | refs/heads/master | 2020-12-25T18:52:56.986250 | 2017-07-04T15:46:11 | 2017-07-04T15:46:11 | 94,009,055 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,101 | cpp | #include <sys/epoll.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <unistd.h>
#include <iostream>
#include <errno.h>
#include <string>
#include <cstring>
#include <vector>
#include <unordered_map>
#include <stdio.h>
typedef struct _params {
int local_port, dest_port;
std::string dest_ip = "0";
std::string local_ip = "0";
std::string proto;
} Params;
/* this fcn should handles all the socket stuff so user just has to call
* create_socket
*/
int create_socket(Params *pm) {
struct sockaddr_in addr;
int sock,set_opt_on,res;
/* setup the sockaddr struct */
memset((char*) &addr,0,sizeof(addr));
addr.sin_family = AF_INET;
if(pm -> local_ip.compare("0") == 0) {
addr.sin_addr.s_addr = htonl(INADDR_ANY);
}
addr.sin_port = htons(pm -> local_port);
/*if UDP socket */
if(pm -> proto.compare("udp") == 0) {
sock = socket(AF_INET, SOCK_DGRAM, 0);
if(sock < 0) {
perror("UDP Socket Creation Error");
exit(1);
}
set_opt_on = 1;
res = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
(char*) &set_opt_on, sizeof(set_opt_on));
fcntl(sock, F_SETFL, O_NONBLOCK);
if(bind(sock,(struct sockaddr *)&addr, sizeof(addr))< 0) {
perror("Error Binding socket");
exit(1);
}
return sock;
}
}
/*
else if (proto.compare("tcp") == 0){
sock = socket(AF_INET, SOCK_STREAM,0);
if(sock < 0) {
perror("TCP Socket Creation Error");
exit(1);
}
set_opt_on = 1;
res = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
(char*) &set_opt_on, sizeof(set_opt_on));
fcntl(sock,F_SETFL, O_NONBLOCK);
if(bind(sock,(struct sockaddr *) &addr, sizeof(addr)) < 0) {
perror("Error Binding socket");
exit(1);
}
}
*/
/* In the next step, want a generic handle_event that will call other fcns. This way, when tcp is implemented, will handle connection request as well as data*/
int use_polling(std::string method, int (*create_sock)(Params *pm),bool (*handle_event)(int)) {
int data;
unsigned char buf[100];
/* Would need multiple of these structs for multiple sockets */
Params pm1;
pm1.proto = "udp";
pm1.local_port = 1234;
/* hashtable of socket fds */
std::unordered_map<int,int> sockets;
int sock_fd = create_sock(&pm1); //use socket creation callback
sockets[sock_fd] = 1;
if(method.compare("epoll") == 0) {
bool cont = true;
struct epoll_event ev, events[10];
int epollfd = epoll_create1(0);
if(epollfd < 0) {
perror("Error with epoll_create1");
exit(1);
}
/* Look for input events */
ev.events = EPOLLIN;
for(auto it = sockets.begin(); it != sockets.end(); ++it) {
ev.data.fd = it -> first;
if(epoll_ctl(epollfd, EPOLL_CTL_ADD, it->first, &ev) == -1) {
perror("epoll_ctl error");
}
}
while(cont) {
int nfds = epoll_wait(epollfd, events, 10 , -1);
if(nfds == -1) {
perror("epoll_wait");
exit(1);
}
for(int n = 0; n < nfds; ++n) {
if(sockets[events[n].data.fd]) {
cont = handle_event(events[n].data.fd); //handle event callback
} else {
std::cout << events[n].events << std::endl;
}
}
}
}
}
/* In the future, want a generic event handler that would call this if appropriate */
bool handle_data(int fd) {
unsigned char buf[100];
int data = read(fd,buf,100);
if(data < 0 ) {
perror("error with read");
exit(1);
}
write(1,buf,data);
std::string str(buf,buf +sizeof(buf)/sizeof(buf[0]));
if(str.compare("quit") == 0) {
return false;
}
return true;
}
int main() {
use_polling("epoll",&create_socket,&handle_data);
}
| [
"andrew.koe315@gmail.com"
] | andrew.koe315@gmail.com |
79786aaf8203378f94c1f3b0b90a1b123a49de37 | b7f3edb5b7c62174bed808079c3b21fb9ea51d52 | /components/signin/internal/identity_manager/accounts_mutator_impl.h | 70dcb00fc290cd067c24f77bfee7af63b05573ac | [
"BSD-3-Clause"
] | permissive | otcshare/chromium-src | 26a7372773b53b236784c51677c566dc0ad839e4 | 64bee65c921db7e78e25d08f1e98da2668b57be5 | refs/heads/webml | 2023-03-21T03:20:15.377034 | 2020-11-16T01:40:14 | 2020-11-16T01:40:14 | 209,262,645 | 18 | 21 | BSD-3-Clause | 2023-03-23T06:20:07 | 2019-09-18T08:52:07 | null | UTF-8 | C++ | false | false | 2,516 | h | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_ACCOUNTS_MUTATOR_IMPL_H_
#define COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_ACCOUNTS_MUTATOR_IMPL_H_
#include <string>
#include "base/macros.h"
#include "components/signin/public/base/signin_buildflags.h"
#include "components/signin/public/identity_manager/accounts_mutator.h"
namespace signin_metrics {
enum class SourceForRefreshTokenOperation;
}
class AccountTrackerService;
struct CoreAccountId;
class PrefService;
class PrimaryAccountManager;
class ProfileOAuth2TokenService;
namespace signin {
// Concrete implementation of the AccountsMutatorImpl interface.
class AccountsMutatorImpl : public AccountsMutator {
public:
explicit AccountsMutatorImpl(ProfileOAuth2TokenService* token_service,
AccountTrackerService* account_tracker_service,
PrimaryAccountManager* primary_account_manager,
PrefService* pref_service);
~AccountsMutatorImpl() override;
// AccountsMutator:
CoreAccountId AddOrUpdateAccount(
const std::string& gaia_id,
const std::string& email,
const std::string& refresh_token,
bool is_under_advanced_protection,
signin_metrics::SourceForRefreshTokenOperation source) override;
void UpdateAccountInfo(
const CoreAccountId& account_id,
base::Optional<bool> is_child_account,
base::Optional<bool> is_under_advanced_protection) override;
void RemoveAccount(
const CoreAccountId& account_id,
signin_metrics::SourceForRefreshTokenOperation source) override;
void RemoveAllAccounts(
signin_metrics::SourceForRefreshTokenOperation source) override;
void InvalidateRefreshTokenForPrimaryAccount(
signin_metrics::SourceForRefreshTokenOperation source) override;
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
void MoveAccount(AccountsMutator* target,
const CoreAccountId& account_id) override;
#endif
private:
ProfileOAuth2TokenService* token_service_;
AccountTrackerService* account_tracker_service_;
PrimaryAccountManager* primary_account_manager_;
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
PrefService* pref_service_;
#endif
DISALLOW_COPY_AND_ASSIGN(AccountsMutatorImpl);
};
} // namespace signin
#endif // COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_ACCOUNTS_MUTATOR_IMPL_H_
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
cd3d8336fb972640ce643de19e841b89d70f6b81 | 6305066938db84cf4a04dbd1fc5d46520e51f5a1 | /networking/FIFOserver.cpp | 964b13d8f42ede232b5379595df2fb5355d80160 | [
"MIT"
] | permissive | elenno/playground | d70ef4503a721d391d419c2e526f7824a6a3e5e1 | 4870be119c443a7056da245a90f160d2c1386ac3 | refs/heads/master | 2021-01-10T12:34:26.328171 | 2016-05-07T08:59:14 | 2016-05-07T08:59:14 | 45,241,256 | 1 | 0 | null | null | null | null | GB18030 | C++ | false | false | 580 | cpp | //FIFOs 有名管道
#include<stdio.h>
#include<stdlib.h>
#include<sys/stat.h>
#include<unistd.h>
#include<linux/stat.h>
#define FIFO_FILE "sampleFIFO"
int main()
{
FILE *fp;
char readbuf[80];
//create FIFO if it does not exist
umask(0);
//在文件系统中创建有名管道
mknod(FIFO_FILE, S_IFIFO|0666, 0);
while(1)
{
//打开有名管道
fp = fopen(FIFO_FILE, "r");
//从有名管道中读取数据
fgets(readbuf, 80, fp); //有名管道支持进程自动阻塞
printf("received: %s\n", readbuf);
//关闭有名管道
fclose(fp);
}
return 0;
} | [
"elenno.chen@gmail.com"
] | elenno.chen@gmail.com |
3be2bf7cefbcf558657dd2b5281aa0b3052843ba | 93c9499a60687ca615bda7469f18480a1480763a | /baekjoon/greedy/11399.cpp | 8079a42b58c22d6af20aaf16116287decc2af34e | [] | no_license | chin0/everydayalgo | 93257812a758fbdf4bd02d121a9057166e6a3bca | f6d2b5e58f15b1f2c7e41d1a2b5cf4051b6d2bc8 | refs/heads/master | 2022-09-26T23:14:21.566812 | 2022-08-25T09:15:17 | 2022-08-25T09:15:17 | 96,144,716 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 510 | cpp | ///오름차순으로 정렬하고 누적합 ㄱ
// 증명 정말 쉬우니 꼭 복습해볼것.
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
int main(void)
{
int n,temp;
vector<int> v;
scanf("%d",&n);
for(int i = 0; i < n; i++) {
scanf("%d",&temp);
v.push_back(temp);
}
sort(v.begin(), v.end());
int sum=0;
int ans=0;
for(int i = 0; i < n; i++) {
sum += v[i];
ans += sum;
}
printf("%d\n",ans);
}
| [
"jeonggyeongbin@Jeongui-MacBookPro.local"
] | jeonggyeongbin@Jeongui-MacBookPro.local |
9fec7db8652f02b540b109cb3ce8c5a406208633 | 0eff74b05b60098333ad66cf801bdd93becc9ea4 | /second/download/CMake/CMake-gumtree/Kitware_CMake_old_new_block_592.cpp | 8b0b66fd5c582037392695c5c551c5de016590d1 | [] | no_license | niuxu18/logTracker-old | 97543445ea7e414ed40bdc681239365d33418975 | f2b060f13a0295387fe02187543db124916eb446 | refs/heads/master | 2021-09-13T21:39:37.686481 | 2017-12-11T03:36:34 | 2017-12-11T03:36:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 820 | cpp | {
OM_uint32 maj_stat, min_stat;
OM_uint32 msg_ctx = 0;
gss_buffer_desc status_string;
char buf[1024];
size_t len;
snprintf(buf, sizeof(buf), "%s", prefix);
len = strlen(buf);
do {
maj_stat = gss_display_status(&min_stat,
error_status,
GSS_C_MECH_CODE,
GSS_C_NO_OID,
&msg_ctx,
&status_string);
if(sizeof(buf) > len + status_string.length + 1) {
snprintf(buf + len, sizeof(buf) - len,
": %s", (char*) status_string.value);
len += status_string.length;
}
gss_release_buffer(&min_stat, &status_string);
} while(!GSS_ERROR(maj_stat) && msg_ctx != 0);
infof(conn->data, "%s\n", buf);
} | [
"993273596@qq.com"
] | 993273596@qq.com |
f4903f054311afc271f442da3a556fa715c25742 | 92fc5841a69d1dcd6e3fb943d3c837eca3c8abb9 | /Sources/ceuserlib/ceuserlib.cpp | 40c5239a1e7a510884b94d62d9f3e5ccb29133ab | [] | no_license | killvxk/WDD | 1112af00029b389a8a522e2e68e05b847e2d5193 | 35e32c22144916837686007e676aa741e041fd83 | refs/heads/master | 2020-03-16T15:03:04.472561 | 2017-06-22T11:23:23 | 2017-06-22T11:23:23 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,585 | cpp | #include "ceuserlib.h"
#include "client.h"
#include "restore.h"
CRestore* g_pRestore;
CBackupClient* g_pService = NULL;
tstring g_strLastError;
bool g_LogInitialize = false;
static void __cdecl InitializeLog()
{
if( ! g_LogInitialize )
{
CLog::instance().Init( _T("ceuserlib.log") );
g_LogInitialize = true;
}
}
ServerBackupCallback g_BackupEvent = NULL;
ServerCleanupCallback g_CleanupEvent = NULL;
static TCHAR* __cdecl AllocateCSharpString( const tstring& str )
{
ULONG ulSize = (str.size() + 1 ) * sizeof(TCHAR);
TCHAR* pszReturn = (TCHAR*)::CoTaskMemAlloc( ulSize );
_tcscpy_s( pszReturn, str.size() + 1, str.c_str() );
return pszReturn;
}
CEUSERLIB_API const wchar_t* __cdecl GetLastErrorString()
{
return AllocateCSharpString( g_strLastError );
}
CEUSERLIB_API CeUserLib_Retval __cdecl Init()
{
InitializeLog();
if( g_pService )
{
g_strLastError = _T("Already initialized");
return CEUSERLIB_AlreadyInitialized;
}
if( CBackupClient::IsAlreadyRunning() )
{
g_strLastError = _T("One instance of driver client is already initialized");
return CEUSERLIB_OneInstanceOnly;
}
g_pService = new CBackupClient();
if( ! g_pService )
{
g_strLastError = _T("Out of memory");
return CEUSERLIB_OutOfMemory;
}
if( ! g_pService->LockAccess() )
{
g_strLastError = _T("One instance of driver client is already initialized");
delete g_pService;
g_pService = NULL;
return CEUSERLIB_OneInstanceOnly;
}
return CEUSERLIB_OK;
}
CEUSERLIB_API CeUserLib_Retval __cdecl Uninit()
{
if( ! g_pService )
{
g_strLastError = _T("Not Initialized");
return CEUSERLIB_NotInitialized;
}
if( g_pService->IsStarted() )
g_pService->Stop();
delete g_pService;
g_pService = NULL;
return CEUSERLIB_OK;
}
CEUSERLIB_API int __cdecl IsDriverStarted()
{
return CBackupClient::IsDriverStarted();
}
CEUSERLIB_API int __cdecl IsBackupStarted()
{
if( ! g_pService )
return 0;
return g_pService->IsStarted();
}
CEUSERLIB_API CeUserLib_Retval __cdecl Start( const wchar_t* IniPath )
{
if( ! g_pService )
{
g_strLastError = _T("Not Initialized");
return CEUSERLIB_NotInitialized;
}
tstring strError, strIniPath;
if( IniPath )
strIniPath = IniPath;
else
strIniPath = _T("cebackup.ini");
g_pService->SetBackupCallback( g_BackupEvent );
g_pService->SetCleanupCallback( g_CleanupEvent );
if( ! g_pService->Start( strIniPath, strError, true ) )
{
g_strLastError = strError;
return CEUSERLIB_BackupIsNotStarted;
}
return CEUSERLIB_OK;
}
CEUSERLIB_API CeUserLib_Retval __cdecl Stop()
{
if( ! g_pService )
{
g_strLastError = _T("Not Initialized");
return CEUSERLIB_NotInitialized;
}
if( ! g_pService->IsStarted() )
{
g_strLastError = _T("Not Started");
return CEUSERLIB_DriverIsNotStarted;
}
if( ! g_pService->Stop() )
{
g_strLastError = _T("Failed to stop");
return CEUSERLIB_Failed;
}
return CEUSERLIB_OK;
}
CEUSERLIB_API CeUserLib_Retval __cdecl ReloadConfig( const wchar_t* IniPath )
{
if( ! g_pService )
{
g_strLastError = _T("Not Initialized");
return CEUSERLIB_NotInitialized;
}
if( ! g_pService->IsStarted() )
{
g_strLastError = _T("Not Started");
return CEUSERLIB_DriverIsNotStarted;
}
tstring strError;
if( ! g_pService->ReloadConfig( IniPath, strError ) )
{
g_strLastError = strError;
return CEUSERLIB_ConfigurationError;
}
return CEUSERLIB_OK;
}
CEUSERLIB_API CeUserLib_Retval __cdecl SubscribeForBackupEvents( ServerBackupCallback CallBack )
{
if( g_BackupEvent )
{
g_strLastError = _T("One BackupEvent is already subscribed. Unsubscribe first");
return CEUSERLIB_AlreadySubscribed;
}
g_BackupEvent = CallBack;
if( g_pService )
g_pService->SetBackupCallback( g_BackupEvent );
return CEUSERLIB_OK;
}
CEUSERLIB_API CeUserLib_Retval __cdecl UnsubscribeFromBackupEvents()
{
g_BackupEvent = NULL;
g_pService->SetBackupCallback( NULL );
return CEUSERLIB_OK;
}
CEUSERLIB_API CeUserLib_Retval __cdecl SubscribeForCleanupEvents( ServerCleanupCallback CallBack )
{
if( g_CleanupEvent )
{
g_strLastError = _T("One ClenupEvent is already subscribed. Unsubscribe first");
return CEUSERLIB_AlreadySubscribed;
}
g_CleanupEvent = CallBack;
if( g_pService )
g_pService->SetCleanupCallback( g_CleanupEvent );
return CEUSERLIB_OK;
}
CEUSERLIB_API CeUserLib_Retval __cdecl UnsubscribeFromCleanupEvents()
{
g_CleanupEvent = NULL;
g_pService->SetCleanupCallback( NULL );
return CEUSERLIB_OK;
}
CEUSERLIB_API CeUserLib_Retval __cdecl Restore_Init( const wchar_t* IniPath )
{
InitializeLog();
if( g_pRestore )
{
g_strLastError = _T("Already initialized");
return CEUSERLIB_AlreadyInitialized;
}
if( CRestore::IsAlreadyRunning() )
{
g_strLastError = _T("One instance of driver client is already initialized");
return CEUSERLIB_OneInstanceOnly;
}
g_pRestore = new CRestore();
if( ! g_pRestore )
{
g_strLastError = _T("Out of memory");
return CEUSERLIB_OutOfMemory;
}
if( ! g_pRestore->LockAccess() )
{
g_strLastError = _T("One instance of restore is already initialized");
delete g_pRestore;
g_pRestore = NULL;
return CEUSERLIB_OneInstanceOnly;
}
tstring strIniPath, strError;
if( IniPath )
strIniPath = IniPath;
else
strIniPath = _T("cebackup.ini");
if( ! g_pRestore->Init( strIniPath, strError ) )
{
g_strLastError = strError;
return CEUSERLIB_ConfigurationError;
}
return CEUSERLIB_OK;
}
CEUSERLIB_API CeUserLib_Retval __cdecl Restore_Uninit()
{
if( ! g_pRestore )
{
g_strLastError = _T("Not Initialized");
return CEUSERLIB_NotInitialized;
}
delete g_pRestore;
g_pRestore = NULL;
return CEUSERLIB_OK;
}
CEUSERLIB_API CeUserLib_Retval __cdecl Restore_ListAll( wchar_t*** ppRestorePath, unsigned int* PathCount )
{
if( ! g_pRestore )
{
g_strLastError = _T("Not Initialized");
return CEUSERLIB_NotInitialized;
}
if( ! PathCount )
{
g_strLastError = _T("PathCount is NULL");
return CEUSERLIB_InvalidParameter;
}
if( ! ppRestorePath )
{
g_strLastError = _T("ppRestorePath is NULL");
return CEUSERLIB_InvalidParameter;
}
*PathCount = 0;
*ppRestorePath = NULL;
std::vector<tstring> arrFiles;
bool ret = g_pRestore->ListFiles( true, _T(""), false, arrFiles );
if( ! ret )
{
g_strLastError = _T("ListFiles failed");
return CEUSERLIB_Failed;
}
*PathCount = arrFiles.size();
size_t stSizeOfArray = sizeof(wchar_t*) * arrFiles.size();
*ppRestorePath = (wchar_t**)::CoTaskMemAlloc( stSizeOfArray );
memset (*ppRestorePath, 0, stSizeOfArray);
for( size_t i=0; i < arrFiles.size(); i++ )
{
(*ppRestorePath)[i] = AllocateCSharpString( arrFiles[i] );
}
return CEUSERLIB_OK;
}
CEUSERLIB_API CeUserLib_Retval __cdecl Restore_Restore( const wchar_t* BackupPath )
{
if( ! g_pRestore )
{
g_strLastError = _T("Not Initialized");
return CEUSERLIB_NotInitialized;
}
if( ! IsDriverStarted() )
{
g_strLastError = _T("Driver is not running");
return CEUSERLIB_DriverIsNotStarted;
}
tstring strError;
bool ret = g_pRestore->Restore( BackupPath, strError );
if( ! ret )
{
g_strLastError = strError;
return CEUSERLIB_Failed;
}
return CEUSERLIB_OK;
}
CEUSERLIB_API CeUserLib_Retval __cdecl Restore_RestoreTo( const wchar_t* BackupPath, const wchar_t* ToDirectory )
{
if( ! g_pRestore )
{
g_strLastError = _T("Not Initialized");
return CEUSERLIB_NotInitialized;
}
if( ! IsDriverStarted() )
{
g_strLastError = _T("Driver is not running");
return CEUSERLIB_DriverIsNotStarted;
}
tstring strError;
bool ret = g_pRestore->Restore( BackupPath, strError, ToDirectory );
if( ! ret )
{
g_strLastError = strError;
return CEUSERLIB_Failed;
}
return CEUSERLIB_OK;
}
| [
"maxl@takemypc.com"
] | maxl@takemypc.com |
817c9745b780e4cbbcd5985cf13460d291473d3d | 47648f2fe49e9034afb4d5d378967dd0592f9014 | /tests/ma_lockable_wrapper_test/src/lockable_wrapper_test.cpp | 92b0e6596edcb5e27276e65f34a818b77fffadb6 | [
"BSL-1.0"
] | permissive | PunkLi/asio_samples | eb87d51512dd84bfc8386de07a3e5696db018d88 | 52dd1d1691d6b1c84d0900435303f7970178ef67 | refs/heads/master | 2021-10-16T07:55:06.231038 | 2019-02-09T06:09:41 | 2019-02-09T06:09:41 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,897 | cpp | //
// Copyright (c) 2010-2016 Marat Abrarov (abrarov@gmail.com)
//
// 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)
//
#include <cstddef>
#include <boost/asio.hpp>
#include <gtest/gtest.h>
#include <ma/lockable_wrapped_handler.hpp>
#include <ma/io_context_helpers.hpp>
#include <ma/detail/functional.hpp>
#include <ma/detail/latch.hpp>
#include <ma/detail/thread.hpp>
#include <ma/detail/utility.hpp>
#include <ma/test/io_service_pool.hpp>
namespace ma {
namespace test {
void count_down(detail::latch& latch)
{
latch.count_down();
}
namespace lockable_wrapper {
typedef std::string data_type;
typedef detail::function<void(void)> continuation;
void mutating_func1(data_type& d, const continuation& cont)
{
d += " 1 ";
cont();
}
TEST(lockable_wrapper, simple)
{
typedef detail::mutex mutex_type;
typedef detail::lock_guard<mutex_type> lock_guard_type;
std::size_t cpu_count = detail::thread::hardware_concurrency();
std::size_t work_thread_count = cpu_count > 1 ? cpu_count : 2;
boost::asio::io_service io_service(
ma::to_io_context_concurrency_hint(work_thread_count));
io_service_pool work_threads(io_service, work_thread_count);
mutex_type mutex;
std::string data;
{
lock_guard_type lock_guard(mutex);
data = "0";
}
detail::latch done_latch(1);
{
lock_guard_type data_guard(mutex);
io_service.post(ma::make_lockable_wrapped_handler(mutex, detail::bind(
mutating_func1, detail::ref(data), continuation(
detail::bind(count_down, detail::ref(done_latch))))));
data = "Zero";
}
done_latch.wait();
{
lock_guard_type lock_guard(mutex);
ASSERT_EQ("Zero 1 ", data);
}
} // TEST(lockable_wrapper, simple)
} // namespace lockable_wrapper
} // namespace test
} // namespace ma
| [
"abrarov@gmail.com"
] | abrarov@gmail.com |
cfa950967e4d1d4715a186c62e7433a5b8a15b56 | 9f65b341f176aead0aa6f3de881db793ced46a9d | /cpp/sangnt2.cpp | 516f3d40d20c761926659b73e76aecb7ea102361 | [] | no_license | itsjustwinds/study-path | 2e66c0d85a431983e60ffde126131cb3dd8e865b | 5bfd3cc1c4d3f0b20c2bbc852f43dfbf3d726507 | refs/heads/master | 2020-05-30T07:51:30.320218 | 2020-04-05T11:29:02 | 2020-04-05T11:29:02 | 189,585,900 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 383 | cpp | #include<bits/stdc++.h>
#define maxn 10000007
using namespace std;
int a[2*maxn];
long long res;
int main()
{
ios::sync_with_stdio(0);
cout.tie(0);
for (int i=2;i<=int(sqrt(2*maxn));i++)
if (a[i]==0)
{
int j=i*i;
while (j<=2*maxn)
{
a[j]=1;
j+=i;
}
}
for (int i=maxn+1;i<2*maxn;i++)
{
if (a[i]==0) res++;
}
cout<<res;
return 0;
}
| [
"hminhhuy2000@gmail.com"
] | hminhhuy2000@gmail.com |
1cc1f3aca235b123a88ec57b61a295460a0f7951 | 4491a810f77d635620442c6ef5e70ade50eecbe8 | /exam/2017.10.17/T3.cpp | 0f2e79ac3df2a08ef6dacde5e985d45f4bedbab8 | [] | no_license | cooook/OI_Code | 15473a3b7deafa365d20ae36820f3281884209bf | 45d46b69f2d02b31dcc42d1cd5a5593a343d89af | refs/heads/master | 2023-04-03T21:35:57.365441 | 2021-04-15T14:36:02 | 2021-04-15T14:36:02 | 358,290,530 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 3,394 | cpp | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
typedef long long ll;
const int MAXN = 300005, mod = 1e9 + 7;
int n, size[MAXN], first[MAXN], b[MAXN], e = 1, son[MAXN], len;
int du[MAXN], tree[MAXN], back[MAXN], id[MAXN];
bool flag = false;
ll fac[MAXN], f[MAXN], Ans;
std::set<int> G[MAXN];
template <typename _t>
inline _t read()
{
_t x = 0, f = 1;
char ch = getchar();
for (; !isdigit(ch); ch = getchar())
if (ch == '-')
f = -f;
for (; isdigit(ch); ch = getchar())
x = x * 10 + (ch ^ 48);
return x * f;
}
#define lowbit(x) ((x) & (-x))
inline void Update(int x, int val)
{
for (; x <= n; x += lowbit(x))
tree[x] += val;
}
inline int Query(int x)
{
int Ans = 0;
for (; x; x -= lowbit(x))
Ans += tree[x];
return Ans;
}
struct edge
{
int u, v, next;
} a[MAXN << 1];
inline void push(int u, int v)
{
a[e].u = u;
a[e].v = v;
a[e].next = first[u];
first[u] = e++;
}
inline ll qpow(ll x, ll k)
{
ll Ans = 1;
for (; k; k >>= 1, x = x * x % mod)
if (k & 1)
Ans = Ans * x % mod;
return Ans;
}
inline void dfs(int u, int fa)
{
son[u] = 0;
size[u] = 1;
f[u] = 1;
for (int i = first[u]; i; i = a[i].next)
if (a[i].v != fa)
{
dfs(a[i].v, u);
f[u] = f[u] * f[a[i].v] % mod;
G[u].insert(a[i].v);
son[u]++;
size[u] += size[a[i].v];
}
f[u] = f[u] * fac[son[u]] % mod;
if (size[u] == 1)
return;
std::set<int>::iterator it = G[u].begin();
while (it != G[u].end())
id[*it] = ++len, Update(len, 1), ++it;
Update(len + 1, -G[u].size());
back[u] = len + 1;
}
inline void dp(int u, ll last, int x)
{
if (flag)
return;
ll tmp = 1;
std::set<int>::iterator it = G[u].begin();
while (it != G[u].end())
tmp = tmp * f[*it] % mod, ++it;
while (!G[u].empty())
{
if (flag)
return;
it = G[u].lower_bound(b[x]);
if (it == G[u].end())
{
(Ans += tmp * fac[G[u].size()] % mod * last % mod) %= mod;
return flag = true, void();
}
if (*it > b[x])
{
(Ans += tmp * fac[G[u].size() - 1] % mod * last % mod * (Query(id[*it]) - 1) % mod) %= mod;
return flag = true, void();
}
(Ans += tmp * fac[G[u].size() - 1] % mod * last % mod * (Query(id[*it]) - 1) % mod) %= mod;
tmp = tmp * qpow(f[*it], mod - 2) % mod;
dp(*it, tmp * fac[G[u].size() - 1] % mod * last % mod, x + 1);
if (flag)
return;
x += size[*it];
Update(id[*it], -1);
Update(back[u], 1);
G[u].erase(it);
}
}
int main()
{
n = read<int>();
fac[0] = 1;
for (int i = 1; i <= n; i++)
fac[i] = fac[i - 1] * i % mod;
for (int i = 1; i <= n; i++)
b[i] = read<int>();
for (int i = 1; i < n; i++)
{
register int u = read<int>(), v = read<int>();
push(u, v);
push(v, u);
du[u]++;
du[v]++;
}
ll Pre_Ans = 1;
for (int i = 1; i <= n; i++)
Pre_Ans = Pre_Ans * fac[du[i] - 1] % mod;
for (int i = 1; i < b[1]; i++)
(Ans += Pre_Ans * du[i] % mod) %= mod;
dfs(b[1], 0);
dp(b[1], 1, 2);
printf("%lld\n", Ans);
// for (;;);
return 0;
} | [
"zyfan020305@gmail.com"
] | zyfan020305@gmail.com |
b482bca8e3d0200d2045442ca98098ccb4a0623e | 965bc66c4472f0a417e5f56722273e7d85bdcea3 | /pi_thermocouple_client.ino | 194dc6cb73c81461780ab333dd443db1647b8f3c | [] | no_license | jigokufactory/thermocouplelogger | d54e6236c5d83b95c7d43285bdeb63a83c5caf78 | 8f01b51fa9fb74422a4d92cbfd829134f2ed7112 | refs/heads/master | 2023-04-07T14:48:29.063865 | 2021-04-12T04:39:34 | 2021-04-12T04:39:34 | 357,064,033 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 11,690 | ino | #include <ESP8266HTTPClient.h>
#include <ESP8266WiFi.h>
#include <Wire.h>
#include <Ethernet.h>
#include <SPI.h>
#include "Adafruit_MAX31855.h"
#define BME280_ADDRESS 0x76
unsigned long int hum_raw, temp_raw, pres_raw;
signed long int t_fine;
unsigned int timeout_count;
unsigned int timeout;
unsigned long int sleep_timeout;
uint32_t offset = 0;
uint32_t sleep_count;
uint16_t dig_T1;
int16_t dig_T2;
int16_t dig_T3;
uint16_t dig_P1;
int16_t dig_P2;
int16_t dig_P3;
int16_t dig_P4;
int16_t dig_P5;
int16_t dig_P6;
int16_t dig_P7;
int16_t dig_P8;
int16_t dig_P9;
int8_t dig_H1;
int16_t dig_H2;
int8_t dig_H3;
int16_t dig_H4;
int16_t dig_H5;
int8_t dig_H6;
byte MAC[] = { 0x5e, 0xcf, 0x7f, 0xb4, 0x05, 0x09, };
byte IP[] = { 169, 254, 4, 1 };
/************************* WiFi Access Point *********************************/
//#define WLAN_SSID "test_server"
//#define WLAN_PASS "morisoba2"
#define WLAN_SSID "Buffalo-G-A140"
#define WLAN_PASS "sncxskf4bnbkx"
// Example creating a thermocouple instance with software SPI on any three
// digital IO pins.
#define MAXDO 3
#define MAXCS 4
#define MAXCLK 5
// initialize the Thermocouple
Adafruit_MAX31855 thermocouple(MAXCLK, MAXCS, MAXDO);
// Create an ESP8266 WiFiClient class to connect to the MQTT server.
WiFiClient client;
EthernetServer server = EthernetServer(8080);
//
void setupWiFi() {
sleep_timeout = (4000);
Serial.println(sleep_count);
sleep_count ++;
// if (sleep_count <= 10) {
// Serial.println("まだ眠い");
// Serial.println("ZZZ");
// ESP.deepSleep(sleep_timeout * 1000 * 1000 , WAKE_RF_DEFAULT);
// delay(750);
// }
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(WLAN_SSID);
Serial.println(WLAN_SSID);
WiFi.mode(WIFI_STA);
WiFi.begin(WLAN_SSID, WLAN_PASS);
timeout_count == 0;
sleep_count == 0;
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
timeout_count ++;
Serial.print(".");
//↓↓約10秒以内でつながらないときはtimeoutして指定時間スリープ
if (timeout_count >= 10) {
Serial.println("接続がタイム・アウトしました");
Serial.println("指定時間後に再試行...");
Serial.println("sleep mode...");
delay(1000);
ESP.deepSleep(sleep_timeout * 1000 * 1000 , WAKE_RF_DEFAULT);
delay(1000);
}
}
Serial.println();
Serial.println("WiFi connected");
delay(1000);
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
void setup() {
// uint8_t osrs_t = 1; //Temperature oversampling x 1
// uint8_t osrs_p = 1; //Pressure oversampling x 1
// uint8_t osrs_h = 1; //Humidity oversampling x 1
// uint8_t mode = 3; //Normal mode
// uint8_t t_sb = 5; //Tstandby 1000ms
// uint8_t filter = 0; //Filter off
// uint8_t spi3w_en = 0; //3-wire SPI Disable
// uint8_t ctrl_meas_reg = (osrs_t << 5) | (osrs_p << 2) | mode;
// uint8_t config_reg = (t_sb << 5) | (filter << 2) | spi3w_en;
// uint8_t ctrl_hum_reg = osrs_h;
Serial.begin(9600);
Wire.begin();
HTTPClient http;
//String address = "http://192.168.22.21/index_php.php";
//String address = "http://192.168.22.21/formtest.html";
String address = "http://192.168.44.100/formtest.html";
//いらんかもしれないdelay
delay(500);
Serial.println(address);
while (!Serial) delay(1); // wait for Serial on Leonardo/Zero, etc
Serial.println("MAX31855 test");
// wait for MAX chip to stabilize
delay(500);
Serial.print("Initializing sensor...");
if (!thermocouple.begin()) {
Serial.println("ERROR.");
while (1) delay(10);
}
Serial.println("DONE.");
// writeReg(0xF2, ctrl_hum_reg);
// writeReg(0xF4, ctrl_meas_reg);
// writeReg(0xF5, config_reg);
// readTrim(); //
delay(100);
Serial.println("pi_client_test");
setupWiFi();
Ethernet.begin(MAC, IP);
server.begin();
Serial.println(Ethernet.localIP());
// Serial.println( milkcocoa.on(MILKCOCOA_DATASTORE, "push", onpush) );
};
void loop() {
double temp_act = 0.0, press_act = 0.0, hum_act = 0.0;
signed long int temp_cal;
unsigned long int sleep, sec, msec; //int型だけだとマイクロ秒で1時間できない
unsigned long int press_cal, hum_cal;
//String address = "http://192.168.22.21/index_php.php";
//↓入力フォームと同じ動作で、直接test1.phpを動作させる
String address = "http://192.168.44.100/filerw.php";
//String address = "http://192.168.22.21/test1.php";
// 熱電対の動作
// basic readout test, just print the current temp
Serial.print("Internal Temp = ");
Serial.println(thermocouple.readInternal());
double c = thermocouple.readCelsius();
if (isnan(c)) {
Serial.println("Something wrong with thermocouple!");
} else {
Serial.print("C = ");
Serial.println(c);
}
//Serial.print("F = ");
//Serial.println(thermocouple.readFahrenheit());
delay(1000);
//ここまで熱電対の場合
readData();
// 温度取得
temp_cal = calibration_T(temp_raw);
// 気圧取得
press_cal = calibration_P(pres_raw);
// 湿度取得
hum_cal = calibration_H(hum_raw);
temp_act = (double)temp_cal / 100.0;
press_act = (double)press_cal / 100.0;
hum_act = (double)hum_cal / 1024.0;
Serial.print("TEMP : ");
Serial.print(temp_act);
Serial.print(" DegC PRESS : ");
Serial.print(press_act);
Serial.print(" hPa HUM : ");
Serial.print(hum_act);
Serial.println(" %");
// DataElement elem = DataElement();
// elem.setValue("TEMP", temp_act);
// elem.setValue("PRESS", press_act);
// elem.setValue("HUM", hum_act);
// milkcocoa.push(MILKCOCOA_DATASTORE, &elem);
delay(1000);
//####httpclientでデータ送信()###
const char* host = "192.168.44.99";
// const char* host = "192.168.22.21";
address += "?temp=";
address += String(temp_act);
address += "&hum=";
address += String(hum_act);
address += "&press=";
address += String(press_act);
char buf[100];
int len = address.length();
address.toCharArray(buf,len);
// getpage(buf); よくわからんので外す
Serial.println(" send URL");
Serial.println(address);
Serial.println ("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
String getpage(char host[]);
HTTPClient http;
http.begin(address);
int httpadd = http.GET();
String result = "";
if (httpadd < 0) {
result = http.errorToString(httpadd);
} else if (http.getSize() < 0) {
result = "size is invalid";
} else {
result = http.getString();
}
Serial.println(result);
Serial.println("ここまでhttp");
http.end();
//return result;
delay(500);
EthernetClient client = server.available();
if (client == true) {
// 受信した1バイトを送り返す
Serial.println(client.read());
}
delay(500);
//DEEP SLEEPモード突入命令
Serial.println("DEEP SLEEP START!!");
//1:μ秒での復帰までのタイマー時間設定 2:復帰するきっかけの設定(モード設定)
//int型だけだと(2^32-1μ秒)で最大21分くらいしか設定できない
//unsigned int でも42分
sec = (1000);
msec = (1000);
sleep = (4000);
ESP.deepSleep(sleep * sec * msec , WAKE_RF_DEFAULT);
//deepsleepモード移行までのダミー命令
delay(1000);
}
void readTrim()
{
uint8_t data[32],i=0;
Wire.beginTransmission(BME280_ADDRESS);
Wire.write(0x88);
Wire.endTransmission();
Wire.requestFrom(BME280_ADDRESS,24);
while(Wire.available()){
data[i] = Wire.read();
i++;
}
Wire.beginTransmission(BME280_ADDRESS);
Wire.write(0xA1);
Wire.endTransmission();
Wire.requestFrom(BME280_ADDRESS,1);
data[i] = Wire.read();
i++;
Wire.beginTransmission(BME280_ADDRESS);
Wire.write(0xE1);
Wire.endTransmission();
Wire.requestFrom(BME280_ADDRESS,7);
while(Wire.available()){
data[i] = Wire.read();
i++;
}
dig_T1 = (data[1] << 8) | data[0];
dig_T2 = (data[3] << 8) | data[2];
dig_T3 = (data[5] << 8) | data[4];
dig_P1 = (data[7] << 8) | data[6];
dig_P2 = (data[9] << 8) | data[8];
dig_P3 = (data[11]<< 8) | data[10];
dig_P4 = (data[13]<< 8) | data[12];
dig_P5 = (data[15]<< 8) | data[14];
dig_P6 = (data[17]<< 8) | data[16];
dig_P7 = (data[19]<< 8) | data[18];
dig_P8 = (data[21]<< 8) | data[20];
dig_P9 = (data[23]<< 8) | data[22];
dig_H1 = data[24];
dig_H2 = (data[26]<< 8) | data[25];
dig_H3 = data[27];
dig_H4 = (data[28]<< 4) | (0x0F & data[29]);
dig_H5 = (data[30] << 4) | ((data[29] >> 4) & 0x0F);
dig_H6 = data[31];
}
void writeReg(uint8_t reg_address, uint8_t data)
{
Wire.beginTransmission(BME280_ADDRESS);
Wire.write(reg_address);
Wire.write(data);
Wire.endTransmission();
}
void readData()
{
int i = 0;
uint32_t data[8];
Wire.beginTransmission(BME280_ADDRESS);
Wire.write(0xF7);
Wire.endTransmission();
Wire.requestFrom(BME280_ADDRESS,8);
while(Wire.available()){
data[i] = Wire.read();
i++;
}
pres_raw = (data[0] << 12) | (data[1] << 4) | (data[2] >> 4);
temp_raw = (data[3] << 12) | (data[4] << 4) | (data[5] >> 4);
hum_raw = (data[6] << 8) | data[7];
}
signed long int calibration_T(signed long int adc_T)
{
signed long int var1, var2, T;
var1 = ((((adc_T >> 3) - ((signed long int)dig_T1<<1))) * ((signed long int)dig_T2)) >> 11;
var2 = (((((adc_T >> 4) - ((signed long int)dig_T1)) * ((adc_T>>4) - ((signed long int)dig_T1))) >> 12) * ((signed long int)dig_T3)) >> 14;
t_fine = var1 + var2;
T = (t_fine * 5 + 128) >> 8;
return T;
}
unsigned long int calibration_P(signed long int adc_P)
{
signed long int var1, var2;
unsigned long int P;
var1 = (((signed long int)t_fine)>>1) - (signed long int)64000;
var2 = (((var1>>2) * (var1>>2)) >> 11) * ((signed long int)dig_P6);
var2 = var2 + ((var1*((signed long int)dig_P5))<<1);
var2 = (var2>>2)+(((signed long int)dig_P4)<<16);
var1 = (((dig_P3 * (((var1>>2)*(var1>>2)) >> 13)) >>3) + ((((signed long int)dig_P2) * var1)>>1))>>18;
var1 = ((((32768+var1))*((signed long int)dig_P1))>>15);
if (var1 == 0)
{
return 0;
}
P = (((unsigned long int)(((signed long int)1048576)-adc_P)-(var2>>12)))*3125;
if(P<0x80000000)
{
P = (P << 1) / ((unsigned long int) var1);
}
else
{
P = (P / (unsigned long int)var1) * 2;
}
var1 = (((signed long int)dig_P9) * ((signed long int)(((P>>3) * (P>>3))>>13)))>>12;
var2 = (((signed long int)(P>>2)) * ((signed long int)dig_P8))>>13;
P = (unsigned long int)((signed long int)P + ((var1 + var2 + dig_P7) >> 4));
return P;
}
unsigned long int calibration_H(signed long int adc_H)
{
signed long int v_x1;
v_x1 = (t_fine - ((signed long int)76800));
v_x1 = (((((adc_H << 14) -(((signed long int)dig_H4) << 20) - (((signed long int)dig_H5) * v_x1)) +
((signed long int)16384)) >> 15) * (((((((v_x1 * ((signed long int)dig_H6)) >> 10) *
(((v_x1 * ((signed long int)dig_H3)) >> 11) + ((signed long int) 32768))) >> 10) + (( signed long int)2097152)) *
((signed long int) dig_H2) + 8192) >> 14));
v_x1 = (v_x1 - (((((v_x1 >> 15) * (v_x1 >> 15)) >> 7) * ((signed long int)dig_H1)) >> 4));
v_x1 = (v_x1 < 0 ? 0 : v_x1);
v_x1 = (v_x1 > 419430400 ? 419430400 : v_x1);
return (unsigned long int)(v_x1 >> 12);
}
| [
"jigokumfg@gmail.com"
] | jigokumfg@gmail.com |
6e15bf2062778d33824380443c264ab912a06a34 | a6ab6749bfc143b592cdbda3c795bfbe2da65d29 | /src/Common/KeyValueJson.cpp | e90efdd7cea6ad1bcdcaf0cc04cbb29af91eb221 | [
"MIT"
] | permissive | mizbit/esp-rgb-led-matrix | 52502dac21044179f12180ffe8228ce733870ea7 | 7ee5cf7d0c3bfc4d4d236a33fda7aa0dca2ab802 | refs/heads/master | 2021-03-02T20:48:13.453460 | 2020-03-08T21:50:57 | 2020-03-08T21:50:57 | 245,904,451 | 1 | 1 | null | 2020-03-08T23:24:58 | 2020-03-08T23:24:58 | null | UTF-8 | C++ | false | false | 3,131 | cpp | /* MIT License
*
* Copyright (c) 2019 - 2020 Andreas Merkle <web@blue-andi.de>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/*******************************************************************************
DESCRIPTION
*******************************************************************************/
/**
* @brief Key value pair with JSON type
* @author Andreas Merkle <web@blue-andi.de>
*/
/******************************************************************************
* Includes
*****************************************************************************/
#include "KeyValueJson.h"
/******************************************************************************
* Compiler Switches
*****************************************************************************/
/******************************************************************************
* Macros
*****************************************************************************/
/******************************************************************************
* Types and classes
*****************************************************************************/
/******************************************************************************
* Prototypes
*****************************************************************************/
/******************************************************************************
* Local Variables
*****************************************************************************/
/******************************************************************************
* Public Methods
*****************************************************************************/
/******************************************************************************
* External Functions
*****************************************************************************/
/******************************************************************************
* Local Functions
*****************************************************************************/
| [
"web@blue-andi.de"
] | web@blue-andi.de |
1c954368303c737312c85859768c92460d98ee67 | 97b096647d98c1d0a840aede1ccb5a8c72e34d49 | /sender/src/Coordinate/CoordinateData3D.h | 8aa831e1a4279ce60e73e98f05d37c0ebb353db9 | [] | no_license | rdodesigns/esoma_2011 | 024ebfaee3d42a380061d391413f14b28973bc73 | 39e44ee619b8d9c87864cb4c68cfbe9ca1066b84 | refs/heads/master | 2021-03-12T19:36:13.466777 | 2011-04-18T06:24:21 | 2011-04-18T06:24:21 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,478 | h | /**
* @file
* @author Ryan Orendorff <ryan@rdodesigns.com>
* @version 106 [complete_skel] (Mon Mar 28 20:14:40 EDT 2011)
* @parent 5af5a331fa4bb1e7b44b87ff7dbf570e3835be5a
*
* @section DESCRIPTION
*
* Holding coordinate data and allowing it to be easily translated to other
* coordinate systems.
*
* This is licensed under GPLv3.
*
* This work was conceptualized and created by Ryan Orendorff, Jan 2011.
*
* Contact
* email: esoma@rdodesigns.com
* www: http://www.rdodesigns.com
* github: https://github.com/rdodesigns
*/
//-----------------------------------------------------------------------------
// NOTE: ALL ROTATIONS ARE SUSCEPTIBLE TO GIMBEL LOCK!
//-----------------------------------------------------------------------------
// Also note that rotations and translations do commute (and hence to reset
// to the original data the resetTranslation and resetRotation can be done in
// any order).
#ifndef __ESOMA__COORDINATEDATA__
#define __ESOMA__COORDINATEDATA__
#include <XnOpenNI.h>
#include <XnCppWrapper.h>
#include <vector>
using std::vector;
#include "CoordinateSystem3D.h"
class CoordinateData3D
{
public:
CoordinateData3D() : coor_sys(data) {}
~CoordinateData3D(){}
struct XnVector3D operator[](int index) {
return data[index];
}
struct XnVector3D at(int index){data.at(index);}
void addXnVector3D(XnVector3D vector);
void removeFromBegin(){remove(0);}
void removeFromEnd(){data.pop_back();}
void remove(int index);
void remove(int from, int to);
void clear();
int size() {return data.size();}
// CoordinateSystem3D related calls
// NOTE: These only work in Cartesian coordinates (they make less sense in
// other coordinate systems).
void translate(XnVector3D trans){coor_sys.translate(trans);}
void rotate(XnMatrix3X3 rot){coor_sys.rotate(rot);}
// Get back to original data.
void resetTranslation(){coor_sys.resetTranslation();}
void resetRotation(){coor_sys.resetRotation();}
void reset(){coor_sys.resetTranslation();
coor_sys.resetRotation();}
// Convert to various coordinate systems
void convertToCartesian(){coor_sys.convertToCoordinateSystem(0);}
void convertToSpherical(){coor_sys.convertToCoordinateSystem(1);}
void convertToCylindrical(){coor_sys.convertToCoordinateSystem(2);}
private:
vector<XnVector3D> data;
CoordinateSystem3D coor_sys;
};
#endif // End header lock.
| [
"ryan@rdodesigns.com"
] | ryan@rdodesigns.com |
8fe4f1e2046f15cba06fc74a0639b4619f1c3f16 | 1525009b676640b0f59539f56dfc7571e8a1a786 | /tests/wx-style-header-dependency/library/cib/__zz_cib_vector-iterator.h.cpp | 441069d90748193d5dc9f94d54b331b7760af8e7 | [
"MIT"
] | permissive | satya-das/cib | d402236aa59ff70d28cb61c3860e14f321cbf366 | 369333ea58b0530b8789a340e21096ba7d159d0e | refs/heads/master | 2023-06-08T05:56:47.354269 | 2021-12-05T20:18:38 | 2021-12-05T20:18:38 | 20,096,881 | 42 | 5 | null | 2019-02-15T05:18:56 | 2014-05-23T11:16:13 | C++ | UTF-8 | C++ | false | false | 502 | cpp | #include "__zz_cib_stl-helpers/__zz_cib_vector-iterator.h"
#include "__zz_cib_wxStyleHeaderDependencyTests-class-down-cast.h"
#include "__zz_cib_wxStyleHeaderDependencyTests-delegate-helper.h"
#include "__zz_cib_wxStyleHeaderDependencyTests-generic.h"
#include "__zz_cib_wxStyleHeaderDependencyTests-ids.h"
#include "__zz_cib_wxStyleHeaderDependencyTests-type-converters.h"
#include "__zz_cib_wxStyleHeaderDependencyTests-mtable-helper.h"
#include "__zz_cib_wxStyleHeaderDependencyTests-proxy-mgr.h"
| [
"beingsatyadas@gmail.com"
] | beingsatyadas@gmail.com |
ab4817fab774b2163f9c2fbd9ae27a9f082a34cc | e3eedfa50de78154e3f7f08aadb2619dd20bd89c | /src/simple_reader.cpp | 794c10afa4e1ef2bfd80ddc42e8880d684190ec0 | [
"Apache-2.0"
] | permissive | maspadaru/poseidon | f0835e1ff1fac994237f90f5f1980b765b6a7c0f | 692930269ed190eed3aafeae6663325fa52341dc | refs/heads/master | 2022-11-30T06:34:08.142525 | 2020-07-27T07:57:59 | 2020-07-27T07:57:59 | 274,116,065 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,889 | cpp | #include "simple_reader.h"
SimpleReader::SimpleReader(std::string const &stream_path)
: stream_path(stream_path) {}
bool SimpleReader::has_metadata() const { return has_metadata_m; }
bool SimpleReader::fetch_metadata() {
// if (!has_metadata_m) {
// std::string nothing;
// source >> start_time;
// source >> end_time;
// std::getline(source, nothing, '\n');
// has_metadata_m = true;
//}
return has_metadata_m;
}
uint64_t SimpleReader::get_stream_start_time() const {
return this->start_time;
}
uint64_t SimpleReader::get_stream_end_time() const { return this->end_time; }
std::vector<std::string> SimpleReader::read_all_data() {
std::ifstream source;
source.open(stream_path);
std::vector<std::string> fact_vector;
bool keep_going = true;
while (keep_going) {
std::string line;
std::getline(source, line);
if (line.length() > 0) {
fact_vector.push_back(line);
}
keep_going = source.good();
}
source.close();
return fact_vector;
}
std::vector<std::string>
SimpleReader::read_next_data(uint64_t request_time_point) {
std::cout << "SimpleReader:" << request_time_point <<
" >> attempting to read pipe" << std::endl;
std::ifstream source;
std::vector<std::string> fact_vector;
source.open(stream_path);
bool keep_going = true;
while (keep_going) {
std::string line;
std::getline(source, line);
if (line.length() == 0) {
keep_going = false;
} else {
std::cout << "SimpleReader:" << request_time_point <<
" >> read line: " << line << std::endl;
fact_vector.push_back(line);
}
}
std::cout << "SimpleReader:" << request_time_point <<
" >> done reading pipe" << std::endl;
return fact_vector;
source.close();
}
| [
"maspadaru@tutanota.com"
] | maspadaru@tutanota.com |
1071c500b19af5821db8fb21f1ad11aaa0eeebb5 | b3c2a5165d9eff249053844e538b561a25b96d89 | /customer_cone/client/checker.hpp | fd98ee1fd47aa1c341f98e0cbc7be6df51269bbd | [] | no_license | inetrg/reproducibility-study-ixp-spoofing | 65ed9b160e919f75ee8ce247501f7f65e854dae5 | 1bca84de1ea4299952f7e3411b4d4c29c9a551f1 | refs/heads/master | 2020-09-08T15:42:23.954133 | 2019-11-15T13:50:58 | 2019-11-15T13:50:58 | 221,174,692 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 964 | hpp | #pragma once
#include "Packet.h"
#include "caf/all.hpp"
#include "caf/io/all.hpp"
#include "customer_cone/client/client.hpp"
#include "customer_cone/sample.hpp"
#include "customer_cone/server/server.hpp"
namespace customer_cone {
namespace client {
constexpr uint_fast32_t dyn_port_lower_bound = 49152;
using check_sample_atom = caf::atom_constant<caf::atom("check_samp")>;
struct checker_state {
std::unordered_map<std::string, uint32_t> asn_mac_mapping;
caf::actor server;
caf::actor client;
};
caf::behavior
check_behav(caf::stateful_actor<checker_state>* self, const caf::actor& server,
const caf::actor& client,
std::unordered_map<std::string, uint32_t> asn_mac_mapping);
struct checker {
static void
check_sample(const std::shared_ptr<sample>& s,
const std::shared_ptr<std::unordered_map<std::string, uint32_t>>&
asn_mac_mapping);
};
} // namespace client
} // namespace customer_cone | [
"git@jasper-eumann.de"
] | git@jasper-eumann.de |
f8d5afeaac939fcc19e78336ba549d58aeca98f5 | 2af943fbfff74744b29e4a899a6e62e19dc63256 | /JHU-CIS-ComputationalAnatomy/StatisticalPipeline/Source/vnl_index_sort.h | 02f1b263347c426236601b2ca36ee35ee54b7793 | [] | no_license | lheckemann/namic-sandbox | c308ec3ebb80021020f98cf06ee4c3e62f125ad9 | 0c7307061f58c9d915ae678b7a453876466d8bf8 | refs/heads/master | 2021-08-24T12:40:01.331229 | 2014-02-07T21:59:29 | 2014-02-07T21:59:29 | 113,701,721 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 4,215 | h |
#ifndef vnl_index_sort_h_
#define vnl_index_sort_h_
#ifdef VCL_NEEDS_PRAGMA_INTERFACE
#pragma interface
#endif
//:
// \file
// \author Michael R. Bowers
//
#include <vnl/vnl_vector.h>
#include <vcl_algorithm.h>
#include <vcl_utility.h>
#include <vcl_vector.h>
template<class TValue, class TIndex>
class vnl_index_sort
{
public:
//: typedefs for vector sorting
typedef vnl_vector<TValue> SortVectorType;
typedef vnl_vector<TIndex> SortVectorIndexType;
//: typedefs for matrix sorting
typedef vnl_matrix<TValue> SortMatrixType;
typedef vnl_matrix<TIndex> SortMatrixIndexType;
//: matrix sort along rows or columns?
enum DirectionType {ByRow, ByColumn} Direction;
//: just sort indices
void vector_sort(
const SortVectorType& values,
SortVectorIndexType& indices)
{
sortIndices(values, indices);
}
//: sort indices and values
void vector_sort(
const SortVectorType& values,
SortVectorType& sorted_values,
SortVectorIndexType& indices)
{
vector_sort(values, indices);
// gets values from sorted indices
reindexValues(values, indices, sorted_values);
}
//: sort indices, return sorted values in place
void vector_sort_in_place(
SortVectorType& values,
SortVectorIndexType& indices)
{
vector_sort(values, indices);
SortVectorType tmpValues(values);
// gets values and indices from sorted indices
reindexValues(tmpValues, indices, values);
}
//: matrix sort
// specify along rows or columns
void matrix_sort(
DirectionType direction,
const SortMatrixType& values,
SortMatrixType& sorted_values,
SortMatrixIndexType& indices)
{
sorted_values.set_size(values.rows(), values.cols());
indices.set_size(values.rows(), values.cols());
SortVectorType valVect;
SortVectorType sortedValVect;
SortVectorIndexType indVect;
for (unsigned int vIx = 0;
vIx < (direction == ByRow ? values.rows() : values.cols()); vIx++)
{
getVector(values, direction, vIx, valVect);
vector_sort(valVect, sortedValVect, indVect);
putVector(sortedValVect, direction, vIx, sorted_values);
putVector(indVect, direction, vIx, indices);
}
}
private:
//: Implementation class - Do Not Use.
//: Author - Ian Scott
template <class T, class I>
struct sort_index_compare_functor
{
const T *data;
bool operator () (const I &a, const I &b)
{
return data[a] < data[b];
}
};
//: sort the indices of a vector
//: Author - Ian Scott
void sortIndices(const SortVectorType& v, SortVectorIndexType& s)
{
sort_index_compare_functor<TValue, TIndex> c;
c.data = v.data_block();
s.set_size(v.size());
for (TIndex ix = 0; ix < (TIndex) v.size(); ix++) s[ix] = ix;
vcl_sort(s.begin(), s.end(), c);
}
//: reorder values from sorted indices
void reindexValues(
const SortVectorType& values,
const SortVectorIndexType& indices,
SortVectorType& sorted_values)
{
sorted_values.set_size(values.size());
for (TIndex ix = 0; ix < (TIndex) values.size(); ix++)
sorted_values[ix] = values[indices[ix]];
}
//: get specified vector from matrix depending on direction
template<class T>
void getVector(
const vnl_matrix<T>& fromMat,
DirectionType direction,
int whichVect,
vnl_vector<T>& toVect)
{
switch (direction)
{
case ByRow:
toVect = fromMat.get_row(whichVect);
break;
case ByColumn:
toVect = fromMat.get_column(whichVect);
break;
default:
toVect.clear();
break;
}
}
//: put specified vector to matrix depending on direction
template<class T>
void putVector(
const vnl_vector<T>& fromVect,
DirectionType direction,
int whichVect,
vnl_matrix<T>& toMat)
{
switch (direction)
{
case ByRow:
toMat.set_row(whichVect, fromVect);
break;
case ByColumn:
toMat.set_column(whichVect, fromVect);
break;
default:
break;
}
}
};
#endif
| [
"mbowers@5e132c66-7cf4-0310-b4ca-cd4a7079c2d8"
] | mbowers@5e132c66-7cf4-0310-b4ca-cd4a7079c2d8 |
70c543aa1ab114e1a6382fe980dc86b7e3383790 | 1d16fdcbd5fbd91d8325170cb74115a045cf24bb | /CSCommon/Source/MUID.cpp | 545558b3c00be52311f095a2cfc49c4530e51905 | [] | no_license | kooksGame/life-marvelous | fc06a3c4e987dc5fbdb5275664e06f2934409b90 | 82b6dcb107346e980d5df31daf4bb14452e3450d | refs/heads/master | 2021-01-10T08:32:53.353758 | 2013-07-28T18:15:09 | 2013-07-28T18:15:09 | 35,994,219 | 1 | 1 | null | null | null | null | UHC | C++ | false | false | 2,007 | cpp | #include "stdafx.h"
#include "MUID.h"
#include <windows.h>
MUID MUID::Invalid(void)
{
return MUID(0,0);
}
MUIDRefMap::MUIDRefMap(void)
{
m_CurrentMUID.SetZero();
}
MUIDRefMap::~MUIDRefMap(void)
{
}
MUID MUIDRefMap::Generate(void* pRef)
{
m_CurrentMUID.Increase();
insert(value_type(m_CurrentMUID, pRef));
return m_CurrentMUID;
}
void* MUIDRefMap::GetRef(MUID& uid)
{
iterator i = find(uid);
if(i==end()) return NULL;
return (*i).second;
}
void* MUIDRefMap::Remove(MUID& uid)
{
iterator i = find(uid);
if(i==end()) return NULL;
void* pRef = (*i).second;
erase(i);
return pRef;
}
MUIDRANGE MUIDRefMap::Reserve(int nSize)
{
MUIDRANGE r;
r.Start = m_CurrentMUID.Increase();
r.End = m_CurrentMUID.Increase(nSize-1);
return r;
}
MUIDRANGE MUIDRefMap::GetReservedCount(void)
{
MUIDRANGE r;
r.Start = MUID(0, 2);
r.End = m_CurrentMUID;
return r;
}
/*
MUIDRefArray::MUIDRefArray(void)
{
m_CurrentMUID.SetZero();
push_back(NULL);
}
MUIDRefArray::~MUIDRefArray(void)
{
}
MUID MUIDRefArray::Generate(void* pRef)
{
_ASSERT(size()==m_CurrentMUID.Low);
_ASSERT(1000*1000<m_CurrentMUID.Low); // 1M 보다 작게 설정한다.
m_CurrentMUID.Increase();
push_back(pRef);
return m_CurrentMUID;
}
void* MUIDRefArray::GetRef(MUID& uid)
{
if(uid.Low<0 || uid.Low>=size()) return NULL;
return at(uid.Low);
}
*/
MUIDRefCache::MUIDRefCache(void)
{
}
MUIDRefCache::~MUIDRefCache(void)
{
}
void MUIDRefCache::Insert(const MUID& uid, void* pRef)
{
#ifdef _DEBUG
if (GetRef(uid)) {
_ASSERT(0);
OutputDebugString("MUIDRefCache DUPLICATED Data. \n");
}
#endif
insert(value_type(uid, pRef));
}
void* MUIDRefCache::GetRef(const MUID& uid)
{
iterator i = find(uid);
if(i==end()) return NULL;
return (*i).second;
}
void* MUIDRefCache::Remove(const MUID& uid)
{
iterator i = find(uid);
if(i==end()) return NULL;
void* pRef = (*i).second;
erase(i);
return pRef;
}
| [
"alexis.ddr@gmail.com@86145bcc-2932-641b-40bf-8db704073500"
] | alexis.ddr@gmail.com@86145bcc-2932-641b-40bf-8db704073500 |
74bd335b3e182fa1b421bb809e15e22ca94b80e9 | 29245f9ece2d594f3292b10601095a9962afaf09 | /lib/MicroSpeech/model.cpp | bd0e8d8550ce7feecad7b54fd1e65cc3b731a3d6 | [] | no_license | duducosmos/microspeechesp32omnidirectional | c441872432d4616dfa056515543716dd3790151c | 3fa7e062ef23494b968ab4aef6d0f0efc0d8869a | refs/heads/main | 2023-06-19T04:34:29.844237 | 2021-07-11T16:20:54 | 2021-07-11T16:20:54 | 384,690,577 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 113,254 | cpp | #include <model.h>
// We need to keep the data array aligned on some architectures.
#ifdef __has_attribute
#define HAVE_ATTRIBUTE(x) __has_attribute(x)
#else
#define HAVE_ATTRIBUTE(x) 0
#endif
#if HAVE_ATTRIBUTE(aligned) || (defined(__GNUC__) && !defined(__clang__))
#define DATA_ALIGN_ATTRIBUTE __attribute__((aligned(4)))
#else
#define DATA_ALIGN_ATTRIBUTE
#endif
extern const unsigned char g_model[] DATA_ALIGN_ATTRIBUTE = {
0x1c, 0x00, 0x00, 0x00, 0x54, 0x46, 0x4c, 0x33, 0x00, 0x00, 0x12, 0x00,
0x1c, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x10, 0x00, 0x14, 0x00,
0x00, 0x00, 0x18, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x1c, 0x47, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
0x2c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0xc0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00,
0x0f, 0x00, 0x00, 0x00, 0x54, 0x4f, 0x43, 0x4f, 0x20, 0x43, 0x6f, 0x6e,
0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x2e, 0x00, 0x0a, 0x00, 0x00, 0x00,
0x60, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
0x3c, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x0e, 0xba, 0xff, 0xff, 0x38, 0x00, 0x00, 0x00,
0xbc, 0xb9, 0xff, 0xff, 0xc0, 0xb9, 0xff, 0xff, 0x1e, 0xba, 0xff, 0xff,
0xe0, 0x01, 0x00, 0x00, 0xcc, 0xb9, 0xff, 0xff, 0xd0, 0xb9, 0xff, 0xff,
0x2e, 0xba, 0xff, 0xff, 0x60, 0x03, 0x00, 0x00, 0x36, 0xba, 0xff, 0xff,
0x7c, 0x06, 0x00, 0x00, 0x3e, 0xba, 0xff, 0xff, 0x68, 0x45, 0x00, 0x00,
0xec, 0xb9, 0xff, 0xff, 0x05, 0x00, 0x00, 0x00, 0x31, 0x2e, 0x35, 0x2e,
0x30, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x04, 0x00, 0x08, 0x00,
0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
0x13, 0x00, 0x00, 0x00, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x75, 0x6e, 0x74,
0x69, 0x6d, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00,
0x10, 0xfa, 0xff, 0xff, 0x20, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x2c, 0x45, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x9c, 0x44, 0x00, 0x00,
0x8c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00,
0x68, 0x01, 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00,
0x8e, 0xbb, 0xff, 0xff, 0x00, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00,
0x28, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
0x52, 0x65, 0x73, 0x68, 0x61, 0x70, 0x65, 0x5f, 0x32, 0x00, 0x00, 0x00,
0x94, 0xfa, 0xff, 0xff, 0x2c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0xc6, 0xd0, 0xd0, 0x3d, 0x01, 0x00, 0x00, 0x00, 0xf5, 0xff, 0xcf, 0x41,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xbc, 0xff, 0xff,
0x00, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x1c, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x52, 0x65, 0x6c, 0x75,
0x00, 0x00, 0x00, 0x00, 0x04, 0xfb, 0xff, 0xff, 0x2c, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x35, 0xe4, 0x87, 0x3d, 0x01, 0x00, 0x00, 0x00,
0x51, 0x5c, 0x87, 0x41, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x72, 0xbc, 0xff, 0xff, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
0x43, 0x6f, 0x6e, 0x76, 0x32, 0x44, 0x5f, 0x62, 0x69, 0x61, 0x73, 0x00,
0x64, 0xbc, 0xff, 0xff, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x9d, 0x35, 0xaf, 0x38,
0x20, 0x00, 0x00, 0x00, 0xb1, 0xfe, 0xff, 0xff, 0x8c, 0x00, 0x00, 0x00,
0x81, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x59, 0xfc, 0xff, 0xff,
0xe2, 0xff, 0xff, 0xff, 0xd9, 0xfb, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
0xea, 0xbc, 0xff, 0xff, 0x00, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
0x05, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x0e, 0x00, 0x00, 0x00, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x5f, 0x73,
0x6f, 0x66, 0x74, 0x6d, 0x61, 0x78, 0x00, 0x00, 0xec, 0xfb, 0xff, 0xff,
0x2c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3b,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x3f, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5a, 0xbd, 0xff, 0xff, 0x00, 0x00, 0x00, 0x03,
0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x1c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x61, 0x64, 0x64, 0x5f,
0x31, 0x00, 0x00, 0x00, 0x54, 0xfc, 0xff, 0xff, 0x2c, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x58, 0x6f, 0xb5, 0x3d, 0x01, 0x00, 0x00, 0x00,
0x84, 0xad, 0x28, 0x41, 0x01, 0x00, 0x00, 0x00, 0x4e, 0xc6, 0x40, 0xc1,
0xc2, 0xbd, 0xff, 0xff, 0x00, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x5f, 0x71, 0x75, 0x61, 0x6e,
0x74, 0x2f, 0x46, 0x61, 0x6b, 0x65, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x57,
0x69, 0x74, 0x68, 0x4d, 0x69, 0x6e, 0x4d, 0x61, 0x78, 0x56, 0x61, 0x72,
0x73, 0x00, 0x00, 0x00, 0xe4, 0xfc, 0xff, 0xff, 0x30, 0x00, 0x00, 0x00,
0x24, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xda, 0xcc, 0x56, 0x3a,
0x01, 0x00, 0x00, 0x00, 0x95, 0x50, 0xe2, 0x3d, 0x01, 0x00, 0x00, 0x00,
0xeb, 0xed, 0xc7, 0xbd, 0x80, 0x02, 0x00, 0x00, 0x1d, 0xb2, 0x98, 0x6b,
0xed, 0x39, 0x45, 0x72, 0x7c, 0x7c, 0x86, 0x60, 0x7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0x53, 0xbe, 0x50, 0x4a, 0xe9, 0x53, 0x8e, 0x5a, 0x8b, 0x56, 0x6b,
0x56, 0xb5, 0x83, 0x73, 0xce, 0xb9, 0xd9, 0x98, 0x4b, 0xd0, 0x82, 0x9a,
0x66, 0xb0, 0x78, 0xbc, 0x99, 0xa1, 0xbd, 0x57, 0xf5, 0x88, 0xa3, 0xa2,
0x7c, 0xa4, 0x6f, 0x74, 0x44, 0x76, 0x65, 0x94, 0xd4, 0x8d, 0xa2, 0x84,
0xca, 0x19, 0x87, 0x19, 0xaa, 0x95, 0x4f, 0x9f, 0x31, 0x48, 0x44, 0x42,
0x34, 0x74, 0x52, 0x67, 0x35, 0x71, 0xe0, 0x55, 0x44, 0xd5, 0x4c, 0x9a,
0x54, 0xa2, 0x68, 0x86, 0x5a, 0xac, 0x90, 0x77, 0xb4, 0xb3, 0xd7, 0x8b,
0x4a, 0xc7, 0x81, 0xbb, 0x59, 0x9a, 0x65, 0xb4, 0x82, 0xa5, 0xa9, 0x55,
0xf6, 0x6d, 0x9d, 0xa2, 0x74, 0xaa, 0x76, 0x83, 0x4f, 0x70, 0x51, 0x91,
0xc1, 0x87, 0x90, 0x85, 0xff, 0x17, 0x7a, 0x05, 0xba, 0xa0, 0x44, 0x9f,
0x5c, 0x5c, 0x2f, 0x51, 0x40, 0x41, 0x3b, 0x6e, 0x1c, 0x7c, 0xe7, 0x43,
0x62, 0x83, 0x55, 0x8d, 0x42, 0x9e, 0x69, 0x85, 0x4d, 0x60, 0x8c, 0x68,
0xa2, 0xa5, 0xcb, 0x99, 0x48, 0x84, 0x70, 0x93, 0x57, 0x8c, 0x5f, 0xb4,
0x66, 0x69, 0x98, 0x43, 0xe0, 0x66, 0x87, 0x9c, 0x79, 0x86, 0x69, 0x65,
0x52, 0x63, 0x50, 0x83, 0xb1, 0x85, 0x73, 0x66, 0xf5, 0x3b, 0x70, 0x12,
0xbf, 0x7e, 0x58, 0x87, 0x72, 0x69, 0x25, 0x58, 0x4c, 0x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x90, 0x6f, 0x39, 0x6f, 0x65, 0x3f, 0x7a, 0x4f,
0x1b, 0x4d, 0xba, 0x3b, 0x87, 0x51, 0x7e, 0x67, 0x5d, 0x33, 0x82, 0x4b,
0x54, 0x37, 0x57, 0x56, 0x69, 0x30, 0x8f, 0x3e, 0x49, 0x40, 0x68, 0x9c,
0x6f, 0x2e, 0x5d, 0x3c, 0x42, 0x40, 0x49, 0x48, 0x94, 0x37, 0x27, 0x37,
0x47, 0x4e, 0x60, 0x77, 0x4b, 0x5c, 0x6f, 0x25, 0x46, 0x33, 0x51, 0x72,
0xa2, 0x5e, 0x2c, 0x4b, 0x6e, 0x39, 0x5b, 0x9f, 0x79, 0x6f, 0x4b, 0x60,
0xda, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xa0, 0x0f, 0x00, 0x00,
0x31, 0x00, 0x00, 0x00, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x5f,
0x71, 0x75, 0x61, 0x6e, 0x74, 0x5f, 0x31, 0x2f, 0x46, 0x61, 0x6b, 0x65,
0x51, 0x75, 0x61, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x69, 0x6e,
0x4d, 0x61, 0x78, 0x56, 0x61, 0x72, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e,
0x73, 0x70, 0x6f, 0x73, 0x65, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x14, 0x00,
0x04, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00,
0x2c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x1a, 0xcc, 0x39,
0x01, 0x00, 0x00, 0x00, 0x07, 0x13, 0x3f, 0x3d, 0x01, 0x00, 0x00, 0x00,
0x1f, 0xf1, 0x55, 0xbd, 0x80, 0x3e, 0x00, 0x00, 0x95, 0x83, 0xa7, 0x91,
0x76, 0x79, 0x8d, 0x74, 0xae, 0x6d, 0x72, 0x8d, 0x87, 0x8c, 0x76, 0x94,
0x88, 0x7b, 0x8b, 0x80, 0xb3, 0x91, 0xc5, 0x7f, 0x7a, 0x91, 0x75, 0x85,
0x90, 0xa8, 0x75, 0x8e, 0x8d, 0x74, 0x9d, 0x99, 0xb8, 0x8f, 0x82, 0x87,
0x79, 0x89, 0x85, 0x84, 0xc0, 0x98, 0x77, 0xae, 0x9f, 0x87, 0xac, 0x8f,
0x9f, 0x62, 0x68, 0x8e, 0x62, 0x6c, 0x72, 0x82, 0xa8, 0x9c, 0x9c, 0x7a,
0x66, 0x8f, 0x85, 0x7a, 0xa4, 0x94, 0x69, 0x70, 0x8c, 0x91, 0x72, 0x91,
0x90, 0x81, 0xa0, 0x51, 0x69, 0x68, 0x6a, 0x7a, 0x94, 0x88, 0x6c, 0x51,
0x9e, 0x9c, 0x5d, 0xaa, 0xb5, 0xa6, 0x99, 0x83, 0x71, 0x7d, 0x8c, 0x75,
0x7f, 0xa2, 0x7e, 0x95, 0x8d, 0x6e, 0x6d, 0xaa, 0xab, 0x57, 0x61, 0xaa,
0x61, 0x7c, 0x81, 0x78, 0xb8, 0x5e, 0x81, 0x71, 0x75, 0x6e, 0x6b, 0x89,
0xa5, 0x8e, 0x8a, 0xa5, 0x97, 0x63, 0x98, 0x83, 0xc9, 0x6f, 0x78, 0x94,
0x91, 0x5b, 0x93, 0x66, 0x6b, 0x73, 0x6f, 0x8f, 0x6e, 0xac, 0x97, 0xae,
0x92, 0x87, 0xa0, 0x5f, 0x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x37, 0x95, 0x60, 0x84, 0x85, 0xa8,
0x77, 0xa6, 0x4d, 0x6e, 0x69, 0xa8, 0x7c, 0x97, 0x82, 0x89, 0x5c, 0x8b,
0x9c, 0x7b, 0x71, 0x86, 0x6f, 0x6d, 0x55, 0x91, 0x8e, 0xad, 0x98, 0xa2,
0x6e, 0x5e, 0x32, 0x86, 0x95, 0x6c, 0x70, 0x79, 0x87, 0x66, 0x6a, 0x7a,
0x63, 0xa6, 0x54, 0x86, 0x8b, 0xa7, 0x77, 0x7c, 0x7d, 0x86, 0x58, 0x74,
0x79, 0xb1, 0x72, 0x8a, 0x99, 0x95, 0x68, 0x86, 0x8c, 0x98, 0x6e, 0xa2,
0x77, 0xaa, 0x96, 0x82, 0x92, 0xa8, 0x66, 0x74, 0x6c, 0x89, 0xa0, 0x81,
0x7c, 0x62, 0x48, 0x7e, 0x89, 0x70, 0xb2, 0x98, 0x6b, 0x73, 0x5a, 0x9f,
0x91, 0x97, 0x78, 0x5d, 0x6c, 0x86, 0x55, 0x94, 0x8d, 0x85, 0x8f, 0x73,
0x73, 0xa3, 0x89, 0xac, 0x8a, 0x91, 0xb6, 0x68, 0x77, 0xb7, 0x95, 0x77,
0x8f, 0x61, 0x6a, 0xa1, 0x5f, 0x8e, 0x8c, 0x6a, 0x82, 0xa7, 0x7d, 0x99,
0x56, 0x69, 0xa0, 0x95, 0x5e, 0x73, 0x76, 0x7b, 0x57, 0x62, 0x70, 0x5a,
0x79, 0xa2, 0x50, 0x89, 0x65, 0x79, 0x63, 0x8d, 0x3f, 0x94, 0x72, 0x8d,
0x4c, 0x78, 0x6f, 0x92, 0x77, 0x88, 0x76, 0xb0, 0x58, 0x52, 0x41, 0x93,
0x62, 0x9f, 0x8e, 0x7b, 0x69, 0x84, 0x6d, 0x78, 0x5f, 0x98, 0x63, 0xa0,
0x6a, 0xa1, 0x81, 0x6e, 0x49, 0xb0, 0x53, 0xb7, 0x91, 0x77, 0x7b, 0x64,
0x97, 0x8f, 0x78, 0xca, 0x9b, 0x6f, 0x57, 0xa9, 0x74, 0x96, 0x84, 0x83,
0x83, 0x70, 0x61, 0x62, 0x88, 0x80, 0x6f, 0xac, 0xa6, 0x8e, 0x57, 0x79,
0x9c, 0xb0, 0x89, 0xa7, 0x79, 0x95, 0x53, 0x71, 0x63, 0x92, 0x90, 0xa0,
0x82, 0x75, 0x6d, 0x82, 0x78, 0x86, 0xae, 0x9f, 0x80, 0x78, 0x80, 0x8d,
0x73, 0x75, 0xbb, 0xba, 0x82, 0x86, 0x44, 0x8d, 0x74, 0x84, 0x8e, 0x94,
0x7b, 0x98, 0x7a, 0x94, 0x89, 0xa1, 0x88, 0xb2, 0x45, 0x7f, 0x7c, 0x87,
0x72, 0x9c, 0x94, 0x8a, 0x96, 0x8e, 0x8b, 0xb5, 0xa7, 0xc1, 0xab, 0x88,
0x8b, 0xb7, 0x89, 0x72, 0x90, 0x85, 0x7d, 0x9f, 0x37, 0x8d, 0xb7, 0xaa,
0x89, 0xc3, 0xa7, 0x8b, 0x45, 0x75, 0x85, 0x76, 0x62, 0xa0, 0x6d, 0x71,
0x69, 0x64, 0x7b, 0x93, 0x4c, 0xa6, 0x4c, 0xaa, 0x59, 0x77, 0x3e, 0x6e,
0x64, 0xa8, 0x88, 0x8a, 0x7a, 0x45, 0x37, 0x94, 0x6f, 0xa1, 0x60, 0xc2,
0x4d, 0x7e, 0x58, 0x8f, 0x64, 0xc8, 0x6f, 0xa1, 0x53, 0x85, 0x77, 0x84,
0x76, 0xb9, 0xa6, 0x86, 0x74, 0xa2, 0x52, 0x66, 0x90, 0x8f, 0x7c, 0xa0,
0x94, 0x5f, 0x59, 0x84, 0x86, 0x8d, 0x6d, 0xa8, 0x7a, 0x8f, 0x60, 0x9b,
0x76, 0x87, 0x6e, 0x8f, 0xba, 0x5b, 0x71, 0x5f, 0x6f, 0x9e, 0x94, 0xaf,
0x86, 0x7a, 0x72, 0x7c, 0x91, 0x82, 0x59, 0xa5, 0x6a, 0x87, 0x6c,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xc9,
0x9d, 0xa5, 0x85, 0x7f, 0x76, 0x92, 0x7b, 0x96, 0x42, 0x6f, 0x7c, 0x92,
0x72, 0xb7, 0x73, 0x82, 0x2e, 0x43, 0x86, 0x91, 0x56, 0x88, 0x78, 0xb5,
0x60, 0x5f, 0x6a, 0x6b, 0x65, 0xbd, 0x7e, 0x9d, 0x4f, 0x58, 0x35, 0xa1,
0x3a, 0xb2, 0x96, 0x73, 0x60, 0x89, 0x42, 0x95, 0x6e, 0x8c, 0x7c, 0x9f,
0x6b, 0x4e, 0x44, 0x74, 0x66, 0xa2, 0xb1, 0x89, 0x78, 0x91, 0x6a, 0x70,
0x77, 0xaf, 0x80, 0x85, 0xa6, 0x9d, 0x7b, 0x6c, 0x6a, 0x8b, 0x71, 0x6f,
0x98, 0x9a, 0x52, 0x83, 0x89, 0xc9, 0x91, 0x81, 0x90, 0x7d, 0x6f, 0x85,
0xa0, 0xbf, 0xa2, 0x73, 0xa5, 0x87, 0x4e, 0x70, 0x8c, 0xc0, 0x7c, 0x73,
0x8e, 0x76, 0x63, 0xa4, 0x71, 0xa5, 0x94, 0x7d, 0x82, 0xb3, 0x6f, 0x5d,
0x9e, 0xb8, 0x77, 0x9b, 0x8d, 0x88, 0x7c, 0x81, 0x76, 0xbd, 0xa7, 0xa2,
0x63, 0x82, 0x78, 0x7a, 0x7f, 0xc3, 0x95, 0x81, 0x61, 0x9a, 0x56, 0x88,
0x54, 0x96, 0x75, 0x89, 0x77, 0x73, 0x73, 0x91, 0x81, 0xb1, 0x7b, 0x98,
0x7f, 0x91, 0x6b, 0x66, 0x76, 0xb1, 0x94, 0x8b, 0x82, 0x93, 0x7d, 0x95,
0x73, 0xa0, 0x89, 0xa8, 0x73, 0xaa, 0x76, 0x8a, 0x70, 0x96, 0x76, 0x8e,
0x34, 0x94, 0x85, 0x8b, 0x71, 0xb6, 0x84, 0x95, 0x11, 0x6a, 0x91, 0x90,
0x61, 0x7a, 0x81, 0x91, 0x5d, 0x70, 0x48, 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37, 0x49, 0x3a, 0x78,
0x26, 0xa3, 0x5e, 0xb3, 0x35, 0x6b, 0x51, 0xb5, 0x29, 0xae, 0x50, 0x9c,
0x90, 0x70, 0x64, 0xa0, 0x33, 0xae, 0x8b, 0x92, 0x55, 0x80, 0x5a, 0x7d,
0x79, 0xa4, 0x5f, 0x85, 0x77, 0x79, 0x6f, 0xb4, 0x86, 0x84, 0x82, 0x70,
0x9f, 0x5f, 0x5d, 0x51, 0x6c, 0x9f, 0x7f, 0x89, 0x8c, 0x8d, 0x7f, 0x90,
0x71, 0x7b, 0x9f, 0x88, 0x96, 0x74, 0x4b, 0x90, 0x5c, 0x94, 0x5c, 0x71,
0x8f, 0x8b, 0x6b, 0x79, 0x86, 0xa6, 0x68, 0x79, 0x73, 0x7e, 0x6b, 0x89,
0x6d, 0x9b, 0x7d, 0x91, 0x86, 0x80, 0x82, 0xa6, 0xaa, 0xb8, 0x92, 0x74,
0x7c, 0x93, 0xab, 0x8a, 0x68, 0x9b, 0xac, 0x84, 0x5f, 0x72, 0xa0, 0x73,
0x62, 0xae, 0x92, 0x80, 0x81, 0xab, 0x59, 0x77, 0x6a, 0xa7, 0xa9, 0x7f,
0x60, 0x94, 0x55, 0x70, 0x69, 0xd0, 0xa0, 0x8b, 0x5a, 0x8b, 0x98, 0x76,
0x82, 0x9c, 0x9f, 0x76, 0x73, 0x7f, 0x97, 0x70, 0x8b, 0x93, 0x7f, 0x85,
0x7b, 0x97, 0x95, 0x8a, 0x77, 0x85, 0x58, 0xb1, 0x33, 0x75, 0x7f, 0x87,
0x7d, 0x8e, 0x52, 0xb8, 0x27, 0x73, 0x62, 0x8a, 0x3a, 0x81, 0x94, 0xb9,
0x60, 0x55, 0x63, 0x62, 0x04, 0x85, 0x72, 0xcf, 0x3d, 0x7a, 0x30, 0x97,
0x41, 0xa6, 0x60, 0xaa, 0x48, 0x69, 0x57, 0x9e, 0x4e, 0xb4, 0x62, 0x90,
0x44, 0x8f, 0x5a, 0x92, 0x84, 0xb7, 0x8c, 0x8a, 0x87, 0x9d, 0x52, 0x98,
0x6e, 0x89, 0x8e, 0x8d, 0x77, 0x9b, 0x81, 0x55, 0x81, 0xb6, 0x80, 0x8f,
0x8c, 0x58, 0x4b, 0x72, 0x7c, 0xa9, 0x72, 0x86, 0x82, 0x8e, 0x67, 0xa5,
0x5d, 0x98, 0x9a, 0x7f, 0x83, 0x74, 0x8b, 0x68, 0x8f, 0x98, 0x71, 0x77,
0x90, 0x83, 0x58, 0x81, 0xaa, 0x94, 0x82, 0x7a, 0x6c, 0x92, 0x9c, 0xb0,
0x65, 0xa5, 0x9a, 0x89, 0x89, 0x68, 0x83, 0x7e, 0x9c, 0xb3, 0xb3, 0x77,
0x78, 0x9a, 0x7c, 0x72, 0x83, 0xc8, 0xa8, 0x74, 0x72, 0xb1, 0x4e, 0x70,
0x83, 0xb4, 0x5f, 0x80, 0x67, 0x80, 0x6b, 0x73, 0x6f, 0xb5, 0x92, 0x8b,
0x57, 0x7d, 0x61, 0x84, 0x67, 0x81, 0x7d, 0x5d, 0x61, 0xab, 0x82, 0x73,
0x7e, 0x7c, 0x70, 0x6f, 0x87, 0x9b, 0x8b, 0x95, 0x83, 0x79, 0x5c, 0xc9,
0x3d, 0x75, 0x71, 0x75, 0x53, 0x9b, 0x66, 0xb7, 0x13, 0x61, 0x84, 0x68,
0x45, 0x80, 0x6b, 0xc4, 0x40, 0x60, 0x53, 0x71, 0x0f, 0xae, 0x81, 0xc4,
0x50, 0x78, 0x48, 0xa5, 0x20, 0xa3, 0x78, 0x8e, 0x62, 0x71, 0x57, 0xae,
0x43, 0xad, 0x88, 0xae, 0x83, 0x4f, 0x54, 0x96, 0x5d, 0xb7, 0xa9, 0x88,
0x8f, 0x8c, 0x66, 0x67, 0x6f, 0x9e, 0x75, 0x8f, 0x55, 0x6a, 0x6b, 0x7a,
0x82, 0xa9, 0x64, 0x98, 0x86, 0x6b, 0x6a, 0x64, 0x74, 0xa1, 0x6a, 0x82,
0x99, 0x99,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, 0x82, 0x96, 0x99, 0x87,
0x7d, 0x81, 0x61, 0x8b, 0x76, 0xad, 0x85, 0x90, 0x85, 0x9f, 0x4b, 0x95,
0x4f, 0x9d, 0x86, 0x69, 0x7f, 0xab, 0x4d, 0x75, 0x83, 0xb0, 0x8f, 0x7d,
0x76, 0x83, 0x5d, 0x73, 0x8d, 0xbe, 0x8b, 0x8b, 0x88, 0x86, 0x6e, 0x92,
0x7f, 0x8c, 0x9c, 0x57, 0x3e, 0x82, 0x99, 0x81, 0xa0, 0x99, 0xab, 0x7a,
0x8f, 0x78, 0x9f, 0x9c, 0x80, 0xb8, 0x6b, 0xc4, 0x3a, 0x91, 0x5a, 0xb1,
0x64, 0xc8, 0x73, 0xb3, 0x20, 0x73, 0x89, 0xb1, 0x33, 0x68, 0x99, 0xd7,
0x58, 0x31, 0x60, 0x74, 0x23, 0x9b, 0x68, 0xc7, 0x57, 0x63, 0x33, 0xb6,
0x3d, 0x95, 0x57, 0xbb, 0x8d, 0x66, 0x3a, 0xd9, 0x54, 0xa0, 0x58, 0x89,
0x6d, 0x63, 0x4a, 0x8c, 0x57, 0xa2, 0x79, 0x83, 0x98, 0x8f, 0x56, 0x86,
0x72, 0xac, 0x9a, 0xa6, 0x5f, 0x7d, 0x44, 0x8d, 0x66, 0xb0, 0x86, 0x85,
0x77, 0x8a, 0x24, 0x8c, 0x88, 0xba, 0x8c, 0x90, 0xa7, 0x96, 0x55, 0x89,
0x8d, 0xa2, 0x78, 0x89, 0xb1, 0x78, 0x72, 0x87, 0x79, 0xaf, 0x7d, 0x82,
0x72, 0x5f, 0x52, 0x74, 0x81, 0x82, 0x87, 0x7e, 0x81, 0x77, 0x8b, 0xa9,
0x8f, 0x99, 0x63, 0x7a, 0x80, 0x7d, 0x8b, 0xa5, 0x9d, 0xb8, 0x91, 0x8b,
0x72, 0x87, 0x80, 0x55, 0x7c, 0x97, 0xa6, 0x95, 0x65, 0x63, 0x69, 0x87,
0x52, 0xa1, 0xa7, 0x63, 0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a, 0x92, 0x97,
0x82, 0xbe, 0x76, 0xeb, 0x1a, 0x8f, 0x6f, 0xb5, 0x75, 0x97, 0x67, 0xe1,
0x02, 0x3f, 0x74, 0xab, 0x5c, 0x86, 0x4a, 0xe4, 0x39, 0x64, 0x23, 0x96,
0x0f, 0x94, 0x6b, 0xe5, 0x55, 0x5b, 0x26, 0xcd, 0x24, 0xa8, 0x6f, 0xbd,
0x88, 0x61, 0x5d, 0xac, 0x54, 0x94, 0x72, 0xbf, 0x64, 0x75, 0x20, 0xa0,
0x37, 0x9e, 0x62, 0xaa, 0x74, 0x59, 0x5b, 0xa0, 0x56, 0x8a, 0x82, 0xb4,
0x8e, 0x4a, 0x4f, 0x8c, 0x3b, 0x6d, 0x69, 0x89, 0x81, 0x72, 0x37, 0x8e,
0x64, 0x97, 0x8c, 0xa7, 0x93, 0x55, 0x7c, 0x96, 0x74, 0xab, 0xa9, 0x85,
0x75, 0x80, 0x63, 0x83, 0x47, 0x88, 0x84, 0x77, 0x76, 0x8d, 0x74, 0x77,
0x8d, 0x97, 0x99, 0x9a, 0x7f, 0x7d, 0x83, 0x94, 0x8c, 0xa1, 0xa1, 0x95,
0xa3, 0x97, 0x85, 0x7a, 0x7f, 0xb6, 0x59, 0x89, 0x57, 0x80, 0x52, 0x5e,
0x5d, 0xa9, 0x84, 0x7d, 0x82, 0x78, 0x5f, 0x8f, 0x8e, 0xad, 0x86, 0x95,
0x91, 0x66, 0x7f, 0x63, 0x74, 0xcd, 0xa4, 0x8b, 0x70, 0x64, 0x7b, 0x62,
0x58, 0x8f, 0x71, 0x6a, 0x5d, 0x89, 0x6e, 0x99, 0x71, 0x9e, 0x9e, 0x6e,
0x8d, 0x7d, 0x86, 0x98, 0xa8, 0x8d, 0x89, 0xc1, 0x33, 0x81, 0x73, 0xd2,
0x97, 0xad, 0x56, 0xde, 0x1f, 0x9e, 0x71, 0xce, 0x80, 0x92, 0x55, 0xd1,
0x5d, 0xa7, 0x14, 0xc2, 0x2c, 0x90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6, 0xa2, 0x6b, 0xa7, 0x82,
0x75, 0x65, 0x93, 0x79, 0x8b, 0x82, 0x6b, 0x83, 0x6e, 0x94, 0x80, 0x8b,
0x75, 0x96, 0x77, 0xa1, 0x91, 0x80, 0x6a, 0x80, 0x6f, 0x8c, 0x8c, 0x88,
0xa3, 0x96, 0x5f, 0x76, 0x80, 0x62, 0x89, 0xa0, 0x8e, 0x88, 0x91, 0x76,
0x8c, 0x8f, 0x8a, 0x85, 0x82, 0x79, 0x6c, 0x97, 0x94, 0xa2, 0x98, 0x94,
0xa3, 0x7e, 0x7a, 0x96, 0x95, 0x85, 0x6f, 0x68, 0x87, 0x97, 0x68, 0x7b,
0xa5, 0x69, 0x85, 0x89, 0xa0, 0x93, 0x96, 0x7a, 0x71, 0x67, 0x82, 0x9c,
0xb5, 0x61, 0x95, 0x94, 0x87, 0x70, 0x75, 0x96, 0x92, 0x7a, 0xa6, 0x6c,
0x82, 0x92, 0x78, 0x8a, 0x91, 0x81, 0x9d, 0x7c, 0x86, 0x7b, 0x7f, 0xa0,
0x84, 0xa3, 0x56, 0x83, 0x7e, 0x78, 0x73, 0x8b, 0x6e, 0x8a, 0x69, 0x9e,
0x69, 0xa9, 0x79, 0x82, 0x97, 0x7c, 0x65, 0xa3, 0x8c, 0x9d, 0x95, 0x76,
0x92, 0x88, 0x78, 0x6a, 0x81, 0x7f, 0x5a, 0x96, 0x8f, 0x9c, 0x7a, 0x81,
0x86, 0x92, 0x9c, 0x91, 0x8b, 0x59, 0x6b, 0x88, 0xa3, 0x84, 0x8d, 0x88,
0x6c, 0x84, 0x69, 0x9b, 0x8a, 0x80, 0x64, 0x80, 0x67, 0x73, 0x7e, 0x8d,
0x8c, 0x8d, 0x8d, 0xac, 0x7c, 0x6e, 0x67, 0x79, 0xa7, 0x79, 0x8a, 0x76,
0x8c, 0x8b, 0x7c, 0x65, 0xad, 0x7b, 0x85, 0x7a, 0x95, 0x96, 0x62, 0xb3,
0x6a, 0x6e, 0xb2, 0x8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0x7c, 0x61,
0x85, 0x7e, 0x85, 0x74, 0x89, 0x92, 0x73, 0x73, 0x63, 0x94, 0x97, 0x85,
0x86, 0x85, 0x73, 0x7d, 0x7c, 0x93, 0x89, 0x8c, 0x7f, 0x7c, 0x8e, 0x8b,
0x96, 0x9f, 0x8d, 0x82, 0x97, 0x76, 0xb7, 0x80, 0x67, 0x99, 0x83, 0x82,
0xb1, 0x96, 0x9d, 0x8e, 0x50, 0x79, 0x7a, 0x7d, 0x6f, 0xa8, 0x99, 0x8e,
0x6f, 0x80, 0x87, 0x7f, 0x69, 0x9d, 0x96, 0x72, 0x77, 0x76, 0x86, 0x92,
0x69, 0xa4, 0x8d, 0x98, 0x79, 0x71, 0x7c, 0x7d, 0x9d, 0x73, 0x8d, 0x6f,
0x77, 0x70, 0x92, 0x7e, 0x9a, 0x8a, 0x8d, 0x84, 0x9b, 0x7c, 0x91, 0x7b,
0x96, 0x95, 0x96, 0x86, 0xa2, 0x82, 0x82, 0x7d, 0x77, 0x82, 0x98, 0x61,
0x97, 0x6b, 0xb7, 0x7b, 0x91, 0x51, 0x80, 0x9c, 0x95, 0x84, 0x88, 0x9d,
0x7f, 0x64, 0x94, 0x96, 0x88, 0xa3, 0x88, 0xa1, 0x88, 0xa4, 0x8d, 0x92,
0x9b, 0x6e, 0xa1, 0x84, 0x97, 0x92, 0x8c, 0x8d, 0x5d, 0x83, 0xad, 0x67,
0x94, 0xa5, 0x8e, 0x8a, 0x74, 0x79, 0x6d, 0x84, 0x7d, 0xad, 0x9c, 0x81,
0x7f, 0x64, 0x97, 0x8f, 0x85, 0xae, 0xa8, 0x81, 0x61, 0x9e, 0x85, 0x5b,
0x6c, 0xac, 0x94, 0x86, 0xa8, 0x68, 0x76, 0x77, 0x89, 0x96, 0x6a, 0x94,
0x8a, 0x7e, 0x7c, 0xa4, 0x7d, 0x83, 0x8d, 0x8e, 0xa2, 0x72, 0x93, 0x84,
0x7e, 0x82, 0x97, 0x6d, 0x9e, 0x7f, 0x9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
0x96, 0x53, 0x97, 0x9d, 0xb0, 0xc0, 0x8b, 0xae, 0x6c, 0x94, 0x90, 0x89,
0xa4, 0xa1, 0x7e, 0x97, 0x99, 0x7c, 0x50, 0x73, 0x49, 0xb8, 0xbe, 0x8c,
0xc3, 0x77, 0x85, 0x76, 0x78, 0x99, 0xde, 0x80, 0xc2, 0x80, 0x79, 0x56,
0x83, 0x96, 0x97, 0x95, 0x98, 0x7a, 0x6e, 0x69, 0x99, 0x76, 0x95, 0x7a,
0xb7, 0x65, 0x71, 0x56, 0xa3, 0x6c, 0x9e, 0x77, 0xbe, 0x82, 0x81, 0x5e,
0xad, 0x88, 0xc3, 0x8c, 0xc6, 0x8e, 0x63, 0x7e, 0xd2, 0x73, 0xa4, 0x7b,
0xa8, 0x8f, 0x58, 0x73, 0xb7, 0x7c, 0x80, 0x71, 0x8c, 0xad, 0x88, 0x84,
0xba, 0x6c, 0x7a, 0xa5, 0x99, 0x98, 0x7f, 0x98, 0x92, 0x78, 0x9b, 0x9c,
0x68, 0x99, 0x8a, 0x95, 0x83, 0x82, 0x7d, 0x88, 0x73, 0x8d, 0x62, 0xa0,
0x5f, 0x99, 0x7d, 0x84, 0x8a, 0x87, 0x90, 0x87, 0x99, 0x6e, 0x80, 0xa2,
0x87, 0x95, 0x71, 0x92, 0x91, 0x83, 0xa9, 0x96, 0x75, 0x81, 0x97, 0x9f,
0x92, 0x7f, 0xac, 0x80, 0x71, 0xa7, 0xb0, 0xa2, 0x74, 0xa1, 0x83, 0x83,
0x6f, 0x96, 0x72, 0xaa, 0x84, 0x9b, 0x8c, 0x87, 0x6a, 0x89, 0x7d, 0xa1,
0x96, 0x7d, 0x57, 0x7e, 0x9f, 0x73, 0x86, 0x91, 0xb2, 0x78, 0x72, 0x90,
0x75, 0x7c, 0x9a, 0x93, 0xb2, 0xa9, 0xa7, 0x96, 0x9d, 0x6f, 0x60, 0x7d,
0x55, 0xc9, 0xaa, 0xa7, 0xc3, 0x7a, 0x6f, 0x72, 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x8c, 0x95, 0x94, 0xa7, 0x79, 0x92, 0x64, 0x90,
0x80, 0xaf, 0xad, 0x95, 0x7a, 0x93, 0x99, 0x81, 0x9b, 0xa4, 0xbb, 0xb9,
0x79, 0x94, 0x93, 0x9b, 0x86, 0xa9, 0xab, 0x86, 0x71, 0xac, 0x86, 0x94,
0x7c, 0x9b, 0x70, 0x63, 0x96, 0x7d, 0x81, 0x96, 0x99, 0x8e, 0x83, 0xa1,
0x97, 0xa0, 0x7b, 0x9b, 0x8d, 0x78, 0x73, 0x80, 0x9c, 0x7f, 0xa0, 0x7f,
0xc6, 0x97, 0x79, 0x9f, 0x8f, 0x89, 0x90, 0x6e, 0x9a, 0x94, 0x7f, 0x90,
0x76, 0x77, 0x6f, 0x7c, 0x6a, 0x8c, 0xba, 0x77, 0xa9, 0x8b, 0x81, 0x8d,
0x78, 0x95, 0xa5, 0x64, 0x7f, 0x6d, 0x7a, 0x36, 0x6f, 0x6f, 0xc8, 0x46,
0x7c, 0x78, 0x93, 0x89, 0x78, 0x8e, 0x9c, 0x67, 0xa6, 0x82, 0x91, 0x50,
0x87, 0x5d, 0xb7, 0x64, 0xc6, 0x97, 0x80, 0x44, 0xc4, 0x64, 0xa7, 0x91,
0xbd, 0x7d, 0x77, 0x64, 0xaa, 0x8e, 0x9d, 0x65, 0x85, 0x87, 0x95, 0x78,
0x8e, 0x75, 0xab, 0x76, 0x8f, 0xa5, 0x87, 0x9b, 0xba, 0x83, 0x85, 0x8f,
0x9c, 0xa5, 0x85, 0x96, 0x7a, 0x82, 0x7b, 0x72, 0x77, 0x72, 0x9e, 0x73,
0x75, 0x6d, 0x89, 0x71, 0x87, 0x7d, 0x88, 0x83, 0x8a, 0x97, 0x87, 0x8c,
0x72, 0x86, 0x91, 0x9b, 0x76, 0x88, 0x8e, 0x96, 0x6f, 0x94, 0x88, 0x87,
0x5e, 0x94, 0x87, 0x95, 0x7c, 0x8d, 0x8b, 0x82, 0x7d, 0x8c, 0x85, 0x77,
0x7c,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x5c, 0xcf, 0x59, 0x87, 0x6a,
0x98, 0x78, 0x73, 0x90, 0x94, 0x5e, 0x95, 0x6c, 0x68, 0x92, 0x66, 0x84,
0xa4, 0x5b, 0x84, 0x8b, 0x84, 0x6d, 0x9f, 0x8d, 0x7e, 0x72, 0xab, 0x6e,
0x6c, 0x7b, 0x98, 0x93, 0x92, 0x94, 0x72, 0x59, 0xb7, 0x61, 0x8b, 0x6f,
0x8d, 0x22, 0x73, 0x60, 0xcf, 0x73, 0xad, 0x7d, 0xad, 0x81, 0x60, 0x3b,
0xb5, 0x92, 0xba, 0x6a, 0xba, 0x93, 0x8e, 0x5a, 0xab, 0x99, 0xa5, 0x85,
0xb3, 0x80, 0x61, 0x77, 0x95, 0xa3, 0xa0, 0x75, 0x82, 0x61, 0x46, 0x72,
0x96, 0xb1, 0x9a, 0x7a, 0x77, 0x8c, 0x35, 0x88, 0x75, 0x7e, 0xd0, 0x80,
0x64, 0xc2, 0x76, 0xa6, 0x70, 0x94, 0xae, 0x70, 0x5f, 0xb5, 0xa8, 0x9f,
0x88, 0x6a, 0x52, 0x77, 0x59, 0x9f, 0xcc, 0x76, 0xa9, 0x7f, 0x5b, 0xa4,
0x78, 0xa2, 0xbc, 0x88, 0x91, 0x57, 0x64, 0x8b, 0x67, 0x96, 0x88, 0x63,
0x9a, 0x52, 0x5e, 0x9e, 0x82, 0x49, 0xbd, 0x7b, 0x6f, 0x7f, 0x45, 0x94,
0xab, 0x4a, 0x93, 0x60, 0xa6, 0x7f, 0x4f, 0x7a, 0xb9, 0x58, 0x6b, 0x6d,
0x95, 0x8f, 0x9c, 0x74, 0xc5, 0x74, 0x79, 0x8a, 0x79, 0x81, 0x6c, 0x6d,
0xe1, 0x6e, 0x97, 0x6c, 0x7c, 0x74, 0x58, 0x89, 0x96, 0x7c, 0x8c, 0x6d,
0x98, 0x72, 0x6a, 0x83, 0x87, 0x4e, 0x7c, 0x8e, 0x87, 0x95, 0x93, 0x6d,
0x95, 0x83, 0x78, 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90, 0x8c, 0x73, 0x7e, 0x52, 0x61, 0x8e, 0x7a, 0x98, 0x99,
0x6c, 0xaf, 0x5b, 0xb1, 0x75, 0x44, 0x81, 0x84, 0x43, 0x9f, 0x9d, 0x8b,
0xa7, 0x4c, 0x59, 0x89, 0x50, 0x7c, 0xbf, 0x88, 0xb7, 0x6b, 0x56, 0xb4,
0x76, 0x7c, 0xa5, 0x9e, 0x94, 0x62, 0x71, 0xa1, 0x68, 0x90, 0xa6, 0x65,
0xac, 0x64, 0x69, 0x95, 0x78, 0x73, 0xab, 0x88, 0xa8, 0x5d, 0x5e, 0x72,
0xb6, 0x71, 0x88, 0x75, 0xbd, 0x67, 0x68, 0x65, 0xb0, 0x62, 0x7f, 0x72,
0xbe, 0x78, 0x5b, 0x77, 0xce, 0x67, 0x81, 0xb0, 0xa8, 0x6b, 0x83, 0x78,
0xcf, 0x96, 0x91, 0x93, 0xaf, 0x6e, 0x72, 0x5f, 0x8d, 0x71, 0x81, 0x75,
0x74, 0x7e, 0x66, 0x67, 0xa5, 0x70, 0x92, 0x8d, 0x65, 0x72, 0x9c, 0x61,
0x9c, 0x8f, 0x89, 0x5f, 0x85, 0x6c, 0x91, 0x7f, 0x99, 0x77, 0x40, 0x54,
0x93, 0xa2, 0x74, 0x93, 0xa7, 0x4d, 0x7f, 0x1b, 0xc5, 0x8a, 0xca, 0x7d,
0xce, 0x58, 0x77, 0x44, 0xbf, 0xad, 0xd6, 0x63, 0xb0, 0x98, 0x8c, 0x48,
0xc5, 0xa1, 0xc7, 0x93, 0xb3, 0x55, 0x80, 0x52, 0x6e, 0x96, 0x86, 0x8e,
0x78, 0x50, 0x39, 0x42, 0x6e, 0xba, 0xa4, 0x7e, 0x83, 0x5a, 0x2e, 0x76,
0x82, 0x85, 0xd9, 0x84, 0x5e, 0xb2, 0x6b, 0xb3, 0x8a, 0x57, 0xb8, 0x84,
0x31, 0xae, 0xba, 0x92, 0x9a, 0x39, 0x5b, 0x99, 0x24, 0x86, 0x9b,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67, 0x79, 0x67, 0xa7, 0x74, 0x8e, 0x6e,
0xa6, 0x71, 0x9b, 0x76, 0xae, 0x8b, 0x85, 0x86, 0x9e, 0x60, 0x77, 0x7e,
0xba, 0x70, 0x70, 0x80, 0x95, 0x57, 0x7e, 0x6f, 0xc2, 0x78, 0x8f, 0x5a,
0x9d, 0x67, 0x86, 0x53, 0xb9, 0x68, 0x8c, 0x79, 0x96, 0x82, 0x73, 0x62,
0x8d, 0x66, 0x9d, 0x8a, 0x7c, 0x93, 0x99, 0x6e, 0x90, 0x93, 0x77, 0x73,
0x83, 0x8e, 0x99, 0x86, 0x90, 0x9a, 0x75, 0x75, 0x94, 0x96, 0x88, 0x7a,
0xb1, 0x35, 0x55, 0x44, 0xbb, 0x9e, 0xbd, 0x9b, 0xb3, 0x63, 0x69, 0x4f,
0xd2, 0xd1, 0xb6, 0x88, 0xac, 0x76, 0x94, 0x5f, 0xb6, 0xb6, 0xb0, 0x95,
0x9e, 0x57, 0x4c, 0x49, 0x8a, 0xc4, 0xa6, 0x8b, 0x84, 0x4d, 0x40, 0x54,
0x60, 0xbd, 0xae, 0x91, 0x85, 0x58, 0x4e, 0x73, 0x57, 0x83, 0xc5, 0xa8,
0x69, 0xa0, 0x67, 0xc1, 0x8b, 0x62, 0xac, 0x6d, 0x5d, 0xb7, 0x8e, 0x86,
0x8d, 0x3a, 0x5b, 0x8a, 0x41, 0x5f, 0x9d, 0x77, 0x98, 0x59, 0x75, 0x99,
0x72, 0x5a, 0xbb, 0x7f, 0xb2, 0x51, 0x86, 0x91, 0x87, 0x84, 0xc1, 0x93,
0xb2, 0x54, 0x53, 0x6e, 0x7c, 0x58, 0x9a, 0x8f, 0xab, 0x75, 0x85, 0x7d,
0x9d, 0x70, 0x65, 0x6b, 0xa3, 0x5d, 0x57, 0x90, 0xa9, 0x64, 0x8b, 0x79,
0xaa, 0x69, 0x7d, 0x86, 0xc1, 0x7a, 0x60, 0x83, 0xad, 0x60, 0x80, 0x64,
0xa8, 0x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, 0x6a, 0x73, 0xa3, 0x70, 0xa5, 0x61, 0x5a, 0x87,
0xad, 0x68, 0x84, 0x6c, 0xab, 0x50, 0x98, 0x82, 0xa7, 0x6d, 0x94, 0x9f,
0xa9, 0x4d, 0x7e, 0x83, 0xa9, 0xa1, 0x86, 0x75, 0x93, 0x63, 0x69, 0x87,
0xa0, 0x9c, 0x69, 0x68, 0x8a, 0x76, 0x81, 0x58, 0xa8, 0x9b, 0x9b, 0x8a,
0x86, 0x7c, 0x87, 0x4f, 0x93, 0x7c, 0x78, 0x85, 0x95, 0x92, 0x93, 0x53,
0xb3, 0x65, 0x8c, 0x8d, 0x85, 0x88, 0x89, 0x74, 0xc0, 0x90, 0x65, 0x73,
0xaa, 0xae, 0xac, 0x72, 0xbd, 0x4a, 0x71, 0x2a, 0xc9, 0xb6, 0xa1, 0x6d,
0xce, 0x74, 0x78, 0x43, 0xd5, 0xaa, 0xcb, 0x73, 0xbb, 0x7f, 0x82, 0x6e,
0xd4, 0x9d, 0x85, 0x7c, 0xa5, 0x74, 0xa5, 0x4f, 0x89, 0x96, 0x88, 0x8c,
0x59, 0x3d, 0x81, 0x63, 0x45, 0xbf, 0x70, 0x99, 0x65, 0x45, 0x37, 0xa5,
0x52, 0x95, 0xae, 0x8f, 0x69, 0x88, 0x5a, 0xb1, 0x79, 0x6e, 0xa5, 0x73,
0x64, 0xa2, 0x90, 0x91, 0x89, 0x29, 0x90, 0x79, 0x5f, 0xa7, 0xa9, 0x4b,
0xb8, 0x5b, 0x92, 0x8f, 0x60, 0x60, 0xc5, 0x58, 0x9e, 0x67, 0x7c, 0x86,
0x65, 0x73, 0xbc, 0x8e, 0xa1, 0x63, 0x63, 0x91, 0x88, 0x9f, 0xab, 0x64,
0xa2, 0x43, 0x80, 0x80, 0xaa, 0x98, 0x8d, 0x70, 0xb1, 0x62, 0x69, 0x64,
0xb6, 0x6b, 0x7f, 0xb0, 0xa6, 0x48, 0x6c, 0x75, 0xa1, 0x74, 0x9d, 0x7f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 0x8c, 0x7f, 0x6e, 0x6f, 0x88, 0x84, 0x7d, 0x89,
0x92, 0x84, 0x7d, 0x89, 0x7f, 0xa6, 0x9a, 0x73, 0x7e, 0x70, 0xae, 0x5c,
0x85, 0x68, 0x8a, 0x57, 0x71, 0x86, 0x8a, 0x77, 0x8b, 0x83, 0x95, 0xb2,
0xae, 0x85, 0x62, 0x50, 0x76, 0x76, 0xa9, 0x7d, 0x97, 0x73, 0xa2, 0x72,
0x72, 0xa6, 0x8a, 0x9e, 0x7f, 0x7d, 0xb0, 0x85, 0x91, 0x72, 0x94, 0x61,
0x7f, 0x81, 0x95, 0x9b, 0x95, 0x9d, 0x81, 0xac, 0x91, 0x98, 0xa5, 0x87,
0x93, 0x7c, 0x80, 0x75, 0x9c, 0x8e, 0x84, 0x9c, 0x72, 0x79, 0xa6, 0x7d,
0x7d, 0x8a, 0x81, 0x97, 0x58, 0x7a, 0xb1, 0x6a, 0xaf, 0x9d, 0x8e, 0x84,
0x7e, 0x8d, 0x92, 0x5b, 0x86, 0x9e, 0x90, 0x77, 0x7b, 0x88, 0xc6, 0x6d,
0x91, 0x81, 0xa7, 0x9b, 0x79, 0x8b, 0xbc, 0xa4, 0x99, 0x96, 0x88, 0x7f,
0x74, 0x7b, 0xb2, 0x96, 0x7f, 0x8f, 0x9a, 0x95, 0x62, 0x7d, 0xaa, 0x81,
0x53, 0x84, 0x89, 0x85, 0x55, 0x89, 0xb8, 0x64, 0xb1, 0x95, 0xa5, 0xb4,
0x74, 0x59, 0x92, 0x62, 0x8f, 0x76, 0x8f, 0x85, 0x76, 0x69, 0x8f, 0x91,
0x73, 0x83, 0x90, 0x7d, 0x82, 0xa3, 0x8c, 0x84, 0x73, 0x6e, 0xb6, 0x81,
0x6e, 0xb8, 0x97, 0x92, 0x90, 0x94, 0xa3, 0x84, 0x79, 0xaa, 0x8f, 0x96,
0x7f, 0x81, 0x6c, 0x93, 0x85, 0x73, 0x98, 0x86, 0x5e, 0x97, 0x9c, 0x7d,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 0xa9, 0x7f, 0x99, 0x7b, 0x6f,
0x9c, 0x7c, 0x74, 0xab, 0x6f, 0x75, 0x65, 0x78, 0x8b, 0x75, 0x97, 0x77,
0x96, 0x6b, 0x83, 0x25, 0xb2, 0x65, 0x9b, 0x5c, 0xba, 0x50, 0xa7, 0x55,
0x8e, 0x7d, 0xaa, 0x6f, 0xcd, 0xaf, 0xb3, 0x71, 0x65, 0x7d, 0x69, 0x6c,
0xad, 0x79, 0xbd, 0x7e, 0x84, 0x8d, 0x76, 0x6f, 0x92, 0x78, 0x9a, 0x7b,
0x95, 0x77, 0x9f, 0x6b, 0x96, 0x93, 0xae, 0xa6, 0x9b, 0x5a, 0x9b, 0x8c,
0x87, 0xa1, 0xb8, 0x7c, 0x63, 0x7c, 0x78, 0x93, 0x73, 0xa6, 0xc8, 0x76,
0x94, 0x6c, 0x94, 0x88, 0x5d, 0x77, 0xad, 0x54, 0x90, 0x86, 0x8c, 0x86,
0x73, 0x5c, 0x87, 0x84, 0x7f, 0xac, 0x83, 0x86, 0xa9, 0x9d, 0x76, 0x8c,
0x6b, 0x83, 0x9c, 0x73, 0x93, 0xa9, 0x9b, 0xa7, 0x7b, 0x94, 0x76, 0x72,
0x83, 0x80, 0x8c, 0x70, 0x6e, 0x91, 0x92, 0x7b, 0xbb, 0x6e, 0x9a, 0x62,
0x74, 0x73, 0x87, 0x5d, 0x92, 0x86, 0x78, 0x93, 0x62, 0x87, 0x88, 0x82,
0x6d, 0x89, 0x96, 0x77, 0x68, 0x8a, 0x73, 0x9e, 0x85, 0x94, 0x84, 0x95,
0x6a, 0x8d, 0x88, 0x9f, 0x7e, 0x86, 0x76, 0x85, 0x5c, 0x86, 0x8b, 0xad,
0x76, 0x80, 0x6f, 0x75, 0x9c, 0x7d, 0x7c, 0xa7, 0x6e, 0x8c, 0x68, 0x76,
0x00, 0x00, 0x0e, 0x00, 0x18, 0x00, 0x08, 0x00, 0x07, 0x00, 0x0c, 0x00,
0x10, 0x00, 0x14, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
0x28, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x0b, 0x00, 0x00, 0x00, 0x4d, 0x61, 0x74, 0x4d, 0x75, 0x6c, 0x5f, 0x62,
0x69, 0x61, 0x73, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x9b, 0xaf, 0xd8, 0x37, 0x10, 0x00, 0x00, 0x00, 0x4a, 0x03, 0x00, 0x00,
0x6d, 0xfd, 0xff, 0xff, 0xf5, 0xfd, 0xff, 0xff, 0x2e, 0x01, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x09,
0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x24, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x08, 0x00, 0x04, 0x00,
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x14, 0x00, 0x1c, 0x00,
0x08, 0x00, 0x0c, 0x00, 0x10, 0x00, 0x07, 0x00, 0x14, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
0x28, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x18, 0x00,
0x00, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x10, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
0x1c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x10, 0x00,
0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0xfa, 0xff, 0xff, 0xff, 0x00, 0x19, 0x06, 0x00,
0x06, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0x00,
0x08, 0x00, 0x07, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04
};
extern const unsigned int g_model_len = 18288;
| [
"pereira.somoza@gmail.com"
] | pereira.somoza@gmail.com |
a565d380b5ab9b0b730b39fa52050117baf0342e | 73ee941896043f9b3e2ab40028d24ddd202f695f | /external/chromium_org/chrome_frame/test/util_unittests.cc | e6dbd652abd30a6faa677266fe93e7c703a8cad2 | [
"BSD-3-Clause"
] | permissive | CyFI-Lab-Public/RetroScope | d441ea28b33aceeb9888c330a54b033cd7d48b05 | 276b5b03d63f49235db74f2c501057abb9e79d89 | refs/heads/master | 2022-04-08T23:11:44.482107 | 2016-09-22T20:15:43 | 2016-09-22T20:15:43 | 58,890,600 | 5 | 3 | null | null | null | null | UTF-8 | C++ | false | false | 19,713 | cc | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/file_version_info.h"
#include "base/file_version_info_win.h"
#include "base/files/file_path.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/win/registry.h"
#include "chrome_frame/navigation_constraints.h"
#include "chrome_frame/registry_list_preferences_holder.h"
#include "chrome_frame/test/chrome_frame_test_utils.h"
#include "chrome_frame/utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::win::RegKey;
const wchar_t kChannelName[] = L"-dev";
const wchar_t kSuffix[] = L"-fix";
// Registry override in the UtilsTest will cause shell APIs to fail
// So separate this test from the rest
TEST(SimpleUtilTests, GetTempInternetFiles) {
base::FilePath path = GetIETemporaryFilesFolder();
EXPECT_FALSE(path.empty());
}
class UtilTests : public testing::Test {
protected:
void SetUp() {
DeleteAllSingletons();
}
void TearDown() {
registry_virtualization_.RemoveAllOverrides();
}
// This is used to manage life cycle of PolicySettings singleton.
// base::ShadowingAtExitManager at_exit_manager_;
chrome_frame_test::ScopedVirtualizeHklmAndHkcu registry_virtualization_;
};
TEST_F(UtilTests, GetModuleVersionTest) {
HMODULE mod = GetModuleHandle(L"kernel32.dll");
EXPECT_NE(mod, static_cast<HMODULE>(NULL));
wchar_t path[MAX_PATH] = {0};
GetModuleFileName(mod, path, arraysize(path));
// Use the method that goes to disk
scoped_ptr<FileVersionInfo> base_info(
FileVersionInfo::CreateFileVersionInfo(base::FilePath(path)));
EXPECT_TRUE(base_info.get() != NULL);
// Use the method that doesn't go to disk
uint32 low = 0, high = 0;
EXPECT_TRUE(GetModuleVersion(mod, &high, &low));
EXPECT_NE(high, 0u);
EXPECT_NE(low, 0u);
// Make sure they give the same results.
FileVersionInfoWin* base_info_win =
static_cast<FileVersionInfoWin*>(base_info.get());
VS_FIXEDFILEINFO* fixed_info = base_info_win->fixed_file_info();
EXPECT_TRUE(fixed_info != NULL);
EXPECT_EQ(fixed_info->dwFileVersionMS, static_cast<DWORD>(high));
EXPECT_EQ(fixed_info->dwFileVersionLS, static_cast<DWORD>(low));
}
TEST_F(UtilTests, HaveSameOrigin) {
struct OriginCompare {
const char* a;
const char* b;
bool same_origin;
} test_cases[] = {
{ "", "", true },
{ "*", "*", true },
{ "*", "+", false },
{ "http://www.google.com/", "http://www.google.com/", true },
{ "http://www.google.com", "http://www.google.com/", true },
{ "http://www.google.com:80/", "http://www.google.com/", true },
{ "http://www.google.com:8080/", "http://www.google.com/", false },
{ "https://www.google.com/", "http://www.google.com/", false },
{ "http://docs.google.com/", "http://www.google.com/", false },
{ "https://www.google.com/", "https://www.google.com:443/", true },
{ "https://www.google.com/", "https://www.google.com:443", true },
};
for (int i = 0; i < arraysize(test_cases); ++i) {
const OriginCompare& test = test_cases[i];
EXPECT_EQ(test.same_origin, HaveSameOrigin(test.a, test.b));
}
}
TEST_F(UtilTests, IsValidUrlScheme) {
struct Cases {
const wchar_t* url;
bool is_privileged;
bool expected;
} test_cases[] = {
// non-privileged test cases
{ L"http://www.google.ca", false, true },
{ L"https://www.google.ca", false, true },
{ L"about:config", false, true },
{ L"view-source:http://www.google.ca", false, true },
{ L"chrome-extension://aaaaaaaaaaaaaaaaaaa/monkey.html", false, false },
{ L"ftp://www.google.ca", false, false },
{ L"file://www.google.ca", false, false },
{ L"file://C:\boot.ini", false, false },
// privileged test cases
{ L"http://www.google.ca", true, true },
{ L"https://www.google.ca", true, true },
{ L"about:config", true, true },
{ L"view-source:http://www.google.ca", true, true },
{ L"chrome-extension://aaaaaaaaaaaaaaaaaaa/monkey.html", true, true },
{ L"ftp://www.google.ca", true, false },
{ L"file://www.google.ca", true, false },
{ L"file://C:\boot.ini", true, false },
};
for (int i = 0; i < arraysize(test_cases); ++i) {
const Cases& test = test_cases[i];
EXPECT_EQ(test.expected, IsValidUrlScheme(GURL(test.url),
test.is_privileged));
}
}
TEST_F(UtilTests, GuidToString) {
// {3C5E2125-35BA-48df-A841-5F669B9D69FC}
const GUID test_guid = { 0x3c5e2125, 0x35ba, 0x48df,
{ 0xa8, 0x41, 0x5f, 0x66, 0x9b, 0x9d, 0x69, 0xfc } };
wchar_t compare[64] = {0};
::StringFromGUID2(test_guid, compare, arraysize(compare));
std::wstring str_guid(GuidToString(test_guid));
EXPECT_EQ(0, str_guid.compare(compare));
EXPECT_EQ(static_cast<size_t>(lstrlenW(compare)), str_guid.length());
}
TEST_F(UtilTests, ParseAttachTabUrlTest) {
ChromeFrameUrl cf_url;
static const std::string kProfileName("iexplore");
EXPECT_TRUE(cf_url.Parse(
L"http://f/?attach_external_tab&10&1&2&3&123&321&iexplore"));
EXPECT_TRUE(cf_url.attach_to_external_tab());
EXPECT_FALSE(cf_url.is_chrome_protocol());
EXPECT_EQ(10, cf_url.cookie());
EXPECT_EQ(1, cf_url.disposition());
EXPECT_EQ(gfx::Rect(2, 3, 123, 321), cf_url.dimensions());
EXPECT_EQ(kProfileName, cf_url.profile_name());
EXPECT_TRUE(cf_url.Parse(
L"http://www.foobar.com?&10&1&2&3&123&321&iexplore"));
EXPECT_FALSE(cf_url.attach_to_external_tab());
EXPECT_FALSE(cf_url.is_chrome_protocol());
EXPECT_EQ(0, cf_url.cookie());
EXPECT_EQ(0, cf_url.disposition());
EXPECT_EQ(gfx::Rect(0, 0, 0, 0), cf_url.dimensions());
EXPECT_TRUE(cf_url.profile_name().empty());
EXPECT_FALSE(cf_url.Parse(L"attach_external_tab&10&1"));
EXPECT_FALSE(cf_url.attach_to_external_tab());
EXPECT_FALSE(cf_url.is_chrome_protocol());
EXPECT_EQ(0, cf_url.cookie());
EXPECT_EQ(0, cf_url.disposition());
EXPECT_EQ(gfx::Rect(0, 0, 0, 0), cf_url.dimensions());
EXPECT_TRUE(cf_url.profile_name().empty());
EXPECT_TRUE(cf_url.Parse(
L"gcf:http://f/?attach_tab&10&1&2&3&123&321&iexplore"));
EXPECT_FALSE(cf_url.attach_to_external_tab());
EXPECT_TRUE(cf_url.is_chrome_protocol());
EXPECT_EQ(0, cf_url.cookie());
EXPECT_EQ(0, cf_url.disposition());
EXPECT_EQ(gfx::Rect(0, 0, 0, 0), cf_url.dimensions());
EXPECT_TRUE(cf_url.profile_name().empty());
EXPECT_TRUE(cf_url.Parse(L"gcf:http://google.com"));
EXPECT_FALSE(cf_url.attach_to_external_tab());
EXPECT_TRUE(cf_url.is_chrome_protocol());
EXPECT_EQ(0, cf_url.cookie());
EXPECT_EQ(0, cf_url.disposition());
EXPECT_EQ(gfx::Rect(0, 0, 0, 0), cf_url.dimensions());
EXPECT_EQ(cf_url.gurl(), GURL("http://google.com"));
EXPECT_TRUE(cf_url.profile_name().empty());
}
// Mock for the IInternetSecurityManager interface
class MockIInternetSecurityManager : public IInternetSecurityManager {
public:
MOCK_METHOD2_WITH_CALLTYPE(__stdcall, QueryInterface,
HRESULT(REFIID iid, void** object));
MOCK_METHOD0_WITH_CALLTYPE(__stdcall, AddRef, ULONG());
MOCK_METHOD0_WITH_CALLTYPE(__stdcall, Release, ULONG());
MOCK_METHOD1_WITH_CALLTYPE(__stdcall, SetSecuritySite,
HRESULT(IInternetSecurityMgrSite* site));
MOCK_METHOD1_WITH_CALLTYPE(__stdcall, GetSecuritySite,
HRESULT(IInternetSecurityMgrSite** site));
MOCK_METHOD3_WITH_CALLTYPE(__stdcall, MapUrlToZone,
HRESULT(LPCWSTR url, DWORD* zone, DWORD flags));
MOCK_METHOD4_WITH_CALLTYPE(__stdcall, GetSecurityId,
HRESULT(LPCWSTR url, BYTE* security_id, DWORD* security_size,
DWORD_PTR reserved));
MOCK_METHOD8_WITH_CALLTYPE(__stdcall, ProcessUrlAction,
HRESULT(LPCWSTR url, DWORD action, BYTE* policy, DWORD cb_policy,
BYTE* context, DWORD context_size, DWORD flags,
DWORD reserved));
MOCK_METHOD7_WITH_CALLTYPE(__stdcall, QueryCustomPolicy,
HRESULT(LPCWSTR url, REFGUID guid, BYTE** policy, DWORD* cb_policy,
BYTE* context, DWORD cb_context, DWORD reserved));
MOCK_METHOD3_WITH_CALLTYPE(__stdcall, SetZoneMapping,
HRESULT(DWORD zone, LPCWSTR pattern, DWORD flags));
MOCK_METHOD3_WITH_CALLTYPE(__stdcall, GetZoneMappings,
HRESULT(DWORD zone, IEnumString** enum_string, DWORD flags));
};
// This class provides a partial mock for the NavigationConstraints
// interface by providing specialized zone overrides.
class MockNavigationConstraintsZoneOverride
: public NavigationConstraintsImpl {
public:
MOCK_METHOD1(IsZoneAllowed, bool(const GURL&url));
};
// Mock NavigationConstraints
class MockNavigationConstraints : public NavigationConstraints {
public:
MOCK_METHOD0(AllowUnsafeUrls, bool());
MOCK_METHOD1(IsSchemeAllowed, bool(const GURL& url));
MOCK_METHOD1(IsZoneAllowed, bool(const GURL& url));
};
// Matcher which returns true if the URL passed in starts with the prefix
// specified.
MATCHER_P(UrlPathStartsWith, url_prefix, "url starts with prefix") {
return StartsWith(UTF8ToWide(arg.spec()), url_prefix, false);
}
ACTION_P3(HandleZone, mock, url_prefix, zone) {
if (StartsWith(UTF8ToWide(arg0.spec()), url_prefix, false))
return zone != URLZONE_UNTRUSTED;
return false;
}
TEST_F(UtilTests, CanNavigateTest) {
MockNavigationConstraintsZoneOverride mock;
struct Zones {
const wchar_t* url_prefix;
URLZONE zone;
} test_zones[] = {
{ L"http://blah", URLZONE_INTERNET },
{ L"http://untrusted", URLZONE_UNTRUSTED },
{ L"about:", URLZONE_TRUSTED },
{ L"view-source:", URLZONE_TRUSTED },
{ L"chrome-extension:", URLZONE_TRUSTED },
{ L"data:", URLZONE_INTERNET },
{ L"ftp:", URLZONE_UNTRUSTED },
{ L"file:", URLZONE_LOCAL_MACHINE },
{ L"sip:", URLZONE_UNTRUSTED },
};
for (int i = 0; i < arraysize(test_zones); ++i) {
const Zones& zone = test_zones[i];
EXPECT_CALL(mock, IsZoneAllowed(UrlPathStartsWith(zone.url_prefix)))
.WillRepeatedly(testing::Return(zone.zone != URLZONE_UNTRUSTED));
}
struct Cases {
const char* url;
bool default_expected;
bool unsafe_expected;
bool is_privileged;
} test_cases[] = {
// Invalid URL
{ " ", false, false, false },
{ "foo bar", false, false, false },
// non-privileged test cases
{ "http://blah/?attach_external_tab&10&1&0&0&100&100&iexplore", true,
true, false },
{ "http://untrusted/bar.html", false, true, false },
{ "http://blah/?attach_external_tab&10&1&0&0&100&100&iexplore", true,
true, false },
{ "view-source:http://www.google.ca", true, true, false },
{ "view-source:javascript:alert('foo');", false, true, false },
{ "about:blank", true, true, false },
{ "About:Version", true, true, false },
{ "about:config", false, true, false },
{ "chrome-extension://aaaaaaaaaaaaaaaaaaa/monkey.html", false, true,
false },
{ "ftp://www.google.ca", false, true, false },
{ "file://www.google.ca", false, true, false },
{ "file://C:\boot.ini", false, true, false },
{ "SIP:someone@10.1.2.3", false, true, false },
// privileged test cases
{ "chrome-extension://aaaaaaaaaaaaaaaaaaa/monkey.html", true, true,
true },
{ "data://aaaaaaaaaaaaaaaaaaa/monkey.html", true, true, true },
};
for (int i = 0; i < arraysize(test_cases); ++i) {
const Cases& test = test_cases[i];
mock.set_is_privileged(test.is_privileged);
bool actual = CanNavigate(GURL(test.url), &mock);
EXPECT_EQ(test.default_expected, actual) << "Failure url: " << test.url;
}
}
TEST_F(UtilTests, CanNavigateTestDenyAll) {
MockNavigationConstraints mock;
EXPECT_CALL(mock, IsZoneAllowed(testing::_))
.Times(testing::AnyNumber())
.WillRepeatedly(testing::Return(false));
EXPECT_CALL(mock, IsSchemeAllowed(testing::_))
.Times(testing::AnyNumber())
.WillRepeatedly(testing::Return(false));
EXPECT_CALL(mock, AllowUnsafeUrls())
.Times(testing::AnyNumber())
.WillRepeatedly(testing::Return(false));
char *urls[] = {
{ " "},
{ "foo bar"},
// non-privileged test cases
{ "http://blah/?attach_external_tab&10&1&0&0&100&100&iexplore"},
{ "http://untrusted/bar.html"},
{ "http://blah/?attach_external_tab&10&1&0&0&100&100&iexplore"},
{ "view-source:http://www.google.ca"},
{ "view-source:javascript:alert('foo');"},
{ "about:blank"},
{ "About:Version"},
{ "about:config"},
{ "chrome-extension://aaaaaaaaaaaaaaaaaaa/monkey.html"},
{ "ftp://www.google.ca"},
{ "file://www.google.ca"},
{ "file://C:\boot.ini"},
{ "SIP:someone@10.1.2.3"},
};
for (int i = 0; i < arraysize(urls); ++i) {
EXPECT_FALSE(CanNavigate(GURL(urls[i]), &mock));
}
}
TEST_F(UtilTests, CanNavigateTestAllowAll) {
MockNavigationConstraints mock;
EXPECT_CALL(mock, AllowUnsafeUrls())
.Times(testing::AnyNumber())
.WillRepeatedly(testing::Return(false));
EXPECT_CALL(mock, IsSchemeAllowed(testing::_))
.Times(testing::AnyNumber())
.WillRepeatedly(testing::Return(true));
EXPECT_CALL(mock, IsZoneAllowed(testing::_))
.Times(testing::AnyNumber())
.WillRepeatedly(testing::Return(true));
char *urls[] = {
// non-privileged test cases
{ "http://blah/?attach_external_tab&10&1&0&0&100&100&iexplore"},
{ "http://untrusted/bar.html"},
{ "http://blah/?attach_external_tab&10&1&0&0&100&100&iexplore"},
{ "view-source:http://www.google.ca"},
{ "view-source:javascript:alert('foo');"},
{ "about:blank"},
{ "About:Version"},
{ "about:config"},
{ "chrome-extension://aaaaaaaaaaaaaaaaaaa/monkey.html"},
{ "ftp://www.google.ca"},
{ "file://www.google.ca"},
{ "file://C:\boot.ini"},
{ "SIP:someone@10.1.2.3"},
{ "gcf:about:cache"},
{ "gcf:about:plugins"},
};
for (int i = 0; i < arraysize(urls); ++i) {
EXPECT_TRUE(CanNavigate(GURL(urls[i]), &mock));
}
}
TEST_F(UtilTests, CanNavigateTestAllowAllUnsafeUrls) {
MockNavigationConstraints mock;
EXPECT_CALL(mock, AllowUnsafeUrls())
.Times(testing::AnyNumber())
.WillRepeatedly(testing::Return(true));
char *urls[] = {
{"gcf:about:cache"},
{"gcf:http://www.google.com"},
{"view-source:javascript:alert('foo');"},
{"http://www.google.com"},
};
for (int i = 0; i < arraysize(urls); ++i) {
EXPECT_TRUE(CanNavigate(GURL(urls[i]), &mock));
}
}
TEST_F(UtilTests, IsDefaultRendererTest) {
RegKey config_key(HKEY_CURRENT_USER, kChromeFrameConfigKey, KEY_ALL_ACCESS);
EXPECT_TRUE(config_key.Valid());
DWORD saved_default_renderer = 0; // NOLINT
config_key.ReadValueDW(kEnableGCFRendererByDefault, &saved_default_renderer);
config_key.DeleteValue(kEnableGCFRendererByDefault);
EXPECT_FALSE(IsGcfDefaultRenderer());
config_key.WriteValue(kEnableGCFRendererByDefault, static_cast<DWORD>(0));
EXPECT_FALSE(IsGcfDefaultRenderer());
config_key.WriteValue(kEnableGCFRendererByDefault, static_cast<DWORD>(1));
EXPECT_TRUE(IsGcfDefaultRenderer());
config_key.WriteValue(kEnableGCFRendererByDefault, saved_default_renderer);
}
TEST_F(UtilTests, RendererTypeForUrlTest) {
// Open all the keys we need.
RegKey config_key(HKEY_CURRENT_USER, kChromeFrameConfigKey, KEY_ALL_ACCESS);
EXPECT_TRUE(config_key.Valid());
RegKey opt_for_gcf(config_key.Handle(), kRenderInGCFUrlList, KEY_ALL_ACCESS);
EXPECT_TRUE(opt_for_gcf.Valid());
RegKey opt_for_host(config_key.Handle(), kRenderInHostUrlList,
KEY_ALL_ACCESS);
EXPECT_TRUE(opt_for_host.Valid());
if (!config_key.Valid() || !opt_for_gcf.Valid() || !opt_for_host.Valid())
return;
const wchar_t kTestFilter[] = L"*.testing.chromium.org";
const wchar_t kTestUrl[] = L"www.testing.chromium.org";
// Save the current state of the registry.
DWORD saved_default_renderer = 0;
config_key.ReadValueDW(kEnableGCFRendererByDefault, &saved_default_renderer);
// We need to manually reset the holder between checks.
// TODO(robertshield): Remove this when the RegistryWatcher is wired up.
RegistryListPreferencesHolder& renderer_type_preferences_holder =
GetRendererTypePreferencesHolderForTesting();
// Make sure the host is the default renderer.
config_key.WriteValue(kEnableGCFRendererByDefault, static_cast<DWORD>(0));
EXPECT_FALSE(IsGcfDefaultRenderer());
opt_for_gcf.DeleteValue(kTestFilter); // Just in case this exists
EXPECT_EQ(RENDERER_TYPE_UNDETERMINED, RendererTypeForUrl(kTestUrl));
opt_for_gcf.WriteValue(kTestFilter, L"");
renderer_type_preferences_holder.ResetForTesting();
EXPECT_EQ(RENDERER_TYPE_CHROME_OPT_IN_URL, RendererTypeForUrl(kTestUrl));
// Now set GCF as the default renderer.
config_key.WriteValue(kEnableGCFRendererByDefault, static_cast<DWORD>(1));
EXPECT_TRUE(IsGcfDefaultRenderer());
opt_for_host.DeleteValue(kTestFilter); // Just in case this exists
renderer_type_preferences_holder.ResetForTesting();
EXPECT_EQ(RENDERER_TYPE_CHROME_DEFAULT_RENDERER,
RendererTypeForUrl(kTestUrl));
opt_for_host.WriteValue(kTestFilter, L"");
renderer_type_preferences_holder.ResetForTesting();
EXPECT_EQ(RENDERER_TYPE_UNDETERMINED, RendererTypeForUrl(kTestUrl));
// Cleanup.
opt_for_gcf.DeleteValue(kTestFilter);
opt_for_host.DeleteValue(kTestFilter);
config_key.WriteValue(kEnableGCFRendererByDefault, saved_default_renderer);
renderer_type_preferences_holder.ResetForTesting();
RendererTypeForUrl(L"");
}
TEST_F(UtilTests, XUaCompatibleDirectiveTest) {
int all_versions[] = {0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 99, 100, 101, 1000};
struct Cases {
const char* header_value;
int max_version;
} test_cases[] = {
// Negative cases
{ "", -1 },
{ "chrome=", -1 },
{ "chrome", -1 },
{ "chrome=X", -1 },
{ "chrome=IE", -1 },
{ "chrome=IE-7", -1 },
{ "chrome=IE+7", -1 },
{ "chrome=IE 7", -1 },
{ "chrome=IE7.0", -1 },
{ "chrome=FF7", -1 },
{ "chrome=IE7+", -1 },
{ "chrome=IE99999999999999999999", -1 },
{ "chrome=IE0", -1 },
// Always on
{ "chrome=1", INT_MAX },
// Basic positive cases
{ "chrome=IE1", 1 },
{ "CHROME=IE6", 6 },
{ "Chrome=IE10", 10 },
{ "ChRoMe=IE100", 100 },
// Positive formatting variations
{ " chrome=IE6 ", 6 },
{ " chrome=IE6; ", 6 },
{ " chrome=IE6; IE=8 ", 6 },
{ " IE=8;chrome=IE6;", 6 },
{ " IE=8;chrome=IE6;", 6 },
{ " IE=8 ; chrome = IE6 ;", 6 },
// Ignore unrecognized values
{ " IE=8 ; chrome = IE7.1; chrome = IE6;", 6 },
// First valid wins
{ " IE=8 ; chrome = IE6; chrome = IE8;", 6 },
// Comma delimiter
{ " IE=8,chrome=IE6;", -1 },
{ " IE=8,chrome=IE6", 6 },
{ " IE=8,chrome=IE6, Something=Else;Why;Not", 6 },
{ " IE=8,chrome=1,Something=Else", INT_MAX },
{ " IE=8(a;b;c),chrome=IE7,Something=Else", 7 }
};
for (int case_index = 0; case_index < arraysize(test_cases); ++case_index) {
const Cases& test = test_cases[case_index];
// Check that all versions <= max_version are matched
for (size_t version_index = 0;
version_index < arraysize(all_versions);
++version_index) {
bool expect_match = (all_versions[version_index] <= test.max_version);
ASSERT_EQ(expect_match,
CheckXUaCompatibleDirective(test.header_value,
all_versions[version_index]))
<< "Expect '" << test.header_value << "' to "
<< (expect_match ? "match" : "not match") << " IE major version "
<< all_versions[version_index];
}
}
}
| [
"ProjectRetroScope@gmail.com"
] | ProjectRetroScope@gmail.com |
32906826c886244debed3cfd1d7a51a7f697a2e7 | 33035c05aad9bca0b0cefd67529bdd70399a9e04 | /src/boost_regex_v4_c_regex_traits.hpp | 6a78b058809efc265accf044144e92416743f067 | [
"LicenseRef-scancode-unknown-license-reference",
"BSL-1.0"
] | permissive | elvisbugs/BoostForArduino | 7e2427ded5fd030231918524f6a91554085a8e64 | b8c912bf671868e2182aa703ed34076c59acf474 | refs/heads/master | 2023-03-25T13:11:58.527671 | 2021-03-27T02:37:29 | 2021-03-27T02:37:29 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 45 | hpp | #include <boost/regex/v4/c_regex_traits.hpp>
| [
"k@kekyo.net"
] | k@kekyo.net |
52a363def04e92bf7b89d509b7e7a69716333d78 | 0637909f5b230f9d2907dd8a3031d648cc6cbce1 | /mex/armadillo_bits/fn_inv.hpp | bfbbc1127a589523d32c0e6efcae7cf52f3a6fee | [
"Apache-2.0"
] | permissive | davidakelley/MFSS | ebcbad0b29e22ed6cffa604fbd8a80ac261616dc | 3f7718f6403db69575adff997a05d21d452acbf9 | refs/heads/master | 2022-11-06T14:57:33.449813 | 2022-10-31T17:41:42 | 2022-10-31T17:41:42 | 165,262,685 | 12 | 10 | NOASSERTION | 2020-05-28T05:25:40 | 2019-01-11T15:08:34 | MATLAB | UTF-8 | C++ | false | false | 6,884 | hpp | // Copyright (C) 2008-2016 National ICT Australia (NICTA)
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// -------------------------------------------------------------------
//
// Written by Conrad Sanderson - http://conradsanderson.id.au
//! \addtogroup fn_inv
//! @{
template<typename T1>
arma_warn_unused
arma_inline
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, const Op<T1, op_inv> >::result
inv
(
const Base<typename T1::elem_type,T1>& X
)
{
arma_extra_debug_sigprint();
return Op<T1, op_inv>(X.get_ref());
}
template<typename T1>
arma_deprecated
inline
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, const Op<T1, op_inv> >::result
inv
(
const Base<typename T1::elem_type,T1>& X,
const bool // argument kept only for compatibility with old user code
)
{
arma_extra_debug_sigprint();
// arma_debug_warn("inv(X,bool) is deprecated and will be removed; change to inv(X)");
return Op<T1, op_inv>(X.get_ref());
}
template<typename T1>
arma_deprecated
inline
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, const Op<T1, op_inv> >::result
inv
(
const Base<typename T1::elem_type,T1>& X,
const char* // argument kept only for compatibility with old user code
)
{
arma_extra_debug_sigprint();
// arma_debug_warn("inv(X,char*) is deprecated and will be removed; change to inv(X)");
return Op<T1, op_inv>(X.get_ref());
}
template<typename T1>
arma_warn_unused
arma_inline
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, const Op<T1, op_inv_tr> >::result
inv
(
const Op<T1, op_trimat>& X
)
{
arma_extra_debug_sigprint();
return Op<T1, op_inv_tr>(X.m, X.aux_uword_a, 0);
}
template<typename T1>
arma_deprecated
inline
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, const Op<T1, op_inv_tr> >::result
inv
(
const Op<T1, op_trimat>& X,
const bool // argument kept only for compatibility with old user code
)
{
arma_extra_debug_sigprint();
// arma_debug_warn("inv(X,bool) is deprecated and will be removed; change to inv(X)");
return Op<T1, op_inv_tr>(X.m, X.aux_uword_a, 0);
}
template<typename T1>
arma_deprecated
inline
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, const Op<T1, op_inv_tr> >::result
inv
(
const Op<T1, op_trimat>& X,
const char* // argument kept only for compatibility with old user code
)
{
arma_extra_debug_sigprint();
// arma_debug_warn("inv(X,char*) is deprecated and will be removed; change to inv(X)");
return Op<T1, op_inv_tr>(X.m, X.aux_uword_a, 0);
}
template<typename T1>
inline
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, bool >::result
inv
(
Mat<typename T1::elem_type>& out,
const Base<typename T1::elem_type,T1>& X
)
{
arma_extra_debug_sigprint();
try
{
out = inv(X);
}
catch(std::runtime_error&)
{
return false;
}
return true;
}
template<typename T1>
arma_deprecated
inline
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, bool >::result
inv
(
Mat<typename T1::elem_type>& out,
const Base<typename T1::elem_type,T1>& X,
const bool // argument kept only for compatibility with old user code
)
{
arma_extra_debug_sigprint();
// arma_debug_warn("inv(Y,X,bool) is deprecated and will be removed; change to inv(Y,X)");
return inv(out,X);
}
template<typename T1>
arma_deprecated
inline
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, bool >::result
inv
(
Mat<typename T1::elem_type>& out,
const Base<typename T1::elem_type,T1>& X,
const char* // argument kept only for compatibility with old user code
)
{
arma_extra_debug_sigprint();
// arma_debug_warn("inv(Y,X,char*) is deprecated and will be removed; change to inv(Y,X)");
return inv(out,X);
}
template<typename T1>
arma_warn_unused
arma_inline
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, const Op<T1, op_inv_sympd> >::result
inv_sympd
(
const Base<typename T1::elem_type, T1>& X
)
{
arma_extra_debug_sigprint();
return Op<T1, op_inv_sympd>(X.get_ref());
}
template<typename T1>
arma_deprecated
inline
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, const Op<T1, op_inv_sympd> >::result
inv_sympd
(
const Base<typename T1::elem_type, T1>& X,
const bool // argument kept only for compatibility with old user code
)
{
arma_extra_debug_sigprint();
// arma_debug_warn("inv_sympd(X,bool) is deprecated and will be removed; change to inv_sympd(X)");
return Op<T1, op_inv_sympd>(X.get_ref());
}
template<typename T1>
arma_deprecated
inline
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, const Op<T1, op_inv_sympd> >::result
inv_sympd
(
const Base<typename T1::elem_type, T1>& X,
const char* // argument kept only for compatibility with old user code
)
{
arma_extra_debug_sigprint();
// arma_debug_warn("inv_sympd(X,char*) is deprecated and will be removed; change to inv_sympd(X)");
return Op<T1, op_inv_sympd>(X.get_ref());
}
template<typename T1>
inline
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, bool >::result
inv_sympd
(
Mat<typename T1::elem_type>& out,
const Base<typename T1::elem_type,T1>& X
)
{
arma_extra_debug_sigprint();
try
{
out = inv_sympd(X);
}
catch(std::runtime_error&)
{
return false;
}
return true;
}
template<typename T1>
arma_deprecated
inline
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, bool >::result
inv_sympd
(
Mat<typename T1::elem_type>& out,
const Base<typename T1::elem_type,T1>& X,
const bool // argument kept only for compatibility with old user code
)
{
arma_extra_debug_sigprint();
// arma_debug_warn("inv_sympd(Y,X,bool) is deprecated and will be removed; change to inv_sympd(Y,X)");
return inv_sympd(out,X);
}
template<typename T1>
arma_deprecated
inline
typename enable_if2< is_supported_blas_type<typename T1::elem_type>::value, bool >::result
inv_sympd
(
Mat<typename T1::elem_type>& out,
const Base<typename T1::elem_type,T1>& X,
const char* // argument kept only for compatibility with old user code
)
{
arma_extra_debug_sigprint();
// arma_debug_warn("inv_sympd(Y,X,char*) is deprecated and will be removed; change to inv_sympd(Y,X)");
return inv_sympd(out,X);
}
//! @}
| [
"dkelley@frbchi.org"
] | dkelley@frbchi.org |
146a7eafd327fcdaf39f4ced26eb681f46c27873 | c1376a6f7e1df705a43b023ca86ba026ddffbc11 | /getIntFunction.cpp | 026c2d2fcb6da1034a271209fd131f652f7f768c | [] | no_license | Lunodzo/crypto-lab | e2ffcc5836212e63977b855b807ae90b133dd84e | f87dfd7390db2d3ce4a8ab61cce0cc15dfb90392 | refs/heads/master | 2022-08-28T12:59:26.080993 | 2020-05-25T10:37:21 | 2020-05-25T10:37:21 | 266,746,582 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 691 | cpp | int getch(void);
void ungetch(int);
//getint: get next integer from input to *pn
int getint(int *pn){
int c, sign;
while (isspace(c = getch()));//Skip white space
if (!isDigit(c) && c!= EOF && c != '+' && c != '-')
{
ungetch(c); //It is not a number
return 0;
}
sign = (c == '-') ? -1:1;
if (c == '+' || c == '-')
{
c = getch();
for (*pn = 0; isDigit(c);; c = getch())
{
*pn = 10 * *pn + (c - '0');
}
*pn *= sign;
if (c != EOF)
{
ungetch(c);
}
return c;
}
}
int main(int argc, char const *argv[])
{
/* code */
return 0;
}
| [
"lunomwinuka@gmail.com"
] | lunomwinuka@gmail.com |
9cc566551c37b2499ab335d311797c21aa877a74 | 77b6007ea48e23a1ce7f74a0ac379405262894cd | /GeneratedFiles/Debug/moc_openvideo.cpp | 5daab1694ce26e4c22211c10941040576a9cf6f1 | [] | no_license | pingcuang/yolov3video | 7cd46eaf6f31192df81b4bcb0f64b2a21be9034a | 44a165323f819fbe0645ec634287fb738c6bfe93 | refs/heads/master | 2020-04-09T11:06:41.819740 | 2018-12-04T08:09:10 | 2018-12-04T08:09:10 | 160,295,764 | 6 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,195 | cpp | /****************************************************************************
** Meta object code from reading C++ file 'openvideo.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../../openvideo.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'openvideo.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.8.0. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_openvideo_t {
QByteArrayData data[8];
char stringdata0[96];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_openvideo_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_openvideo_t qt_meta_stringdata_openvideo = {
{
QT_MOC_LITERAL(0, 0, 9), // "openvideo"
QT_MOC_LITERAL(1, 10, 15), // "on_play_clicked"
QT_MOC_LITERAL(2, 26, 0), // ""
QT_MOC_LITERAL(3, 27, 19), // "on_detector_clicked"
QT_MOC_LITERAL(4, 47, 11), // "RecvmodelID"
QT_MOC_LITERAL(5, 59, 2), // "id"
QT_MOC_LITERAL(6, 62, 16), // "on_ratio_clicked"
QT_MOC_LITERAL(7, 79, 16) // "on_rect1_clicked"
},
"openvideo\0on_play_clicked\0\0"
"on_detector_clicked\0RecvmodelID\0id\0"
"on_ratio_clicked\0on_rect1_clicked"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_openvideo[] = {
// content:
7, // revision
0, // classname
0, 0, // classinfo
5, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: name, argc, parameters, tag, flags
1, 0, 39, 2, 0x08 /* Private */,
3, 0, 40, 2, 0x08 /* Private */,
4, 1, 41, 2, 0x08 /* Private */,
6, 0, 44, 2, 0x08 /* Private */,
7, 0, 45, 2, 0x08 /* Private */,
// slots: parameters
QMetaType::Void,
QMetaType::Void,
QMetaType::Void, QMetaType::Int, 5,
QMetaType::Void,
QMetaType::Void,
0 // eod
};
void openvideo::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
openvideo *_t = static_cast<openvideo *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->on_play_clicked(); break;
case 1: _t->on_detector_clicked(); break;
case 2: _t->RecvmodelID((*reinterpret_cast< int(*)>(_a[1]))); break;
case 3: _t->on_ratio_clicked(); break;
case 4: _t->on_rect1_clicked(); break;
default: ;
}
}
}
const QMetaObject openvideo::staticMetaObject = {
{ &QMainWindow::staticMetaObject, qt_meta_stringdata_openvideo.data,
qt_meta_data_openvideo, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
};
const QMetaObject *openvideo::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *openvideo::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!strcmp(_clname, qt_meta_stringdata_openvideo.stringdata0))
return static_cast<void*>(const_cast< openvideo*>(this));
return QMainWindow::qt_metacast(_clname);
}
int openvideo::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QMainWindow::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 5)
qt_static_metacall(this, _c, _id, _a);
_id -= 5;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 5)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 5;
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE
| [
"763262068@qq.com"
] | 763262068@qq.com |
d863f88388408866dcc4bad14b49e097045a2804 | c279a2fcb56de70f5cac2c8e890f155e177e676e | /Source/BladeFramework/header/interface/IMediaLibrary.h | d1b1a619e795c4d566d9c9e0988ff2934b045d87 | [
"MIT"
] | permissive | crazii/blade | b4abacdf36677e41382e95f0eec27d3d3baa20b5 | 7670a6bdf48b91c5e2dd2acd09fb644587407f03 | refs/heads/master | 2021-06-06T08:41:55.603532 | 2021-05-20T11:50:11 | 2021-05-20T11:50:11 | 160,147,322 | 161 | 34 | NOASSERTION | 2019-01-18T03:36:11 | 2018-12-03T07:07:28 | C++ | UTF-8 | C++ | false | false | 6,129 | h | /********************************************************************
created: 2011/08/22
filename: IMediaLibrary.h
author: Crazii
purpose: framework built in media library interface, holding data only
*********************************************************************/
#ifndef __Blade_IMediaLibrary_h__
#define __Blade_IMediaLibrary_h__
#include <BladeFramework.h>
#include <interface/InterfaceSingleton.h>
#include <utility/String.h>
#include <utility/StringList.h>
#include <interface/public/window/IWindow.h>
#include <interface/public/graphics/IImage.h>
namespace Blade
{
class IMediaLibrary : public InterfaceSingleton<IMediaLibrary>
{
public:
//////////////////////////////////////////////////////////////////////////
class MediaFile
{
public:
TString mName;
TString mSchemePath;
TString mRawPath;
index_t mIndex; //set by the media library
HIMAGE mPreview;
/** @brief */
bool operator<(const MediaFile& rhs) const
{
//FnTStringFastLess less;
//return less(mName,rhs.mName);
//note: use alphabet order
return mName < rhs.mName;
}
/** @brief */
bool operator==(const MediaFile& rhs) const
{
return mName == rhs.mName;
}
};
//////////////////////////////////////////////////////////////////////////
class BLADE_FRAMEWORK_API ISelectionReceiver
{
public:
virtual ~ISelectionReceiver() {}
/** @brief */
virtual void setSelectedTarget(index_t mediaIndex, const MediaFile& media) = 0;
/** @brief */
virtual void canceled() {};
};
//////////////////////////////////////////////////////////////////////////
class BLADE_FRAMEWORK_API IMediaPreviewer
{
public:
virtual ~IMediaPreviewer() {}
/** @brief called for generating icon, or large image preview if it is not playable*/
/** @brief if size == -1, then there is no scale, will use the original size */
virtual HIMAGE generatePreview(const TString& mediaFile,size_t size, IMAGE_POOL pool) = 0;
/** @brief */
virtual bool isPlayable() const { return false; }
/** @brief start play the preview if it is playable */
virtual void play(IWindow* targetWindow,const TString& mediaFile) = 0;
/** @brief */
virtual void updatePlay() = 0;
/** @brief */
virtual void stop() = 0;
};
typedef Handle<IMediaPreviewer> HMEDIAPREVIEWER;
//////////////////////////////////////////////////////////////////////////
class BLADE_FRAMEWORK_API IMediaFilter
{
public:
virtual ~IMediaFilter() {}
/** @brief filter for media files */
/* @remark return true means the input file is valid */
virtual bool filterFile(const TString& file) const = 0;
};
typedef Handle<IMediaFilter> HMEDIAFILTER;
//////////////////////////////////////////////////////////////////////////
typedef struct SMediaType
{
public:
TString mType;
TStringList mExtensions;
index_t mIndex; //index filled by MediaLibrary
HMEDIAPREVIEWER mPreviewer;
HMEDIAFILTER mFilter; //this member can be NULL
//all media files shares one icon(i.e. sounds may use one same icon like a speaker)
bool mSharedIcon;
bool mIsPlayable;
inline bool operator<(const SMediaType& rhs) const
{return FnTStringFastLess::compare(mType,rhs.mType);}
inline bool operator==(const SMediaType& rhs) const {return mType == rhs.mType;}
}MEDIA_TYPE;
public:
virtual ~IMediaLibrary() {}
/**
@describe
@param
@return
*/
virtual bool initialize() = 0;
/**
@describe
@param
@return
*/
virtual bool shutdown() = 0;
/**
@describe actually types supported
@param
@return
*/
virtual size_t getMediaTypesCount() const = 0;
/**
@describe
@param
@return
*/
virtual const MEDIA_TYPE& getMediaTypeByIndex(index_t index) const = 0;
/**
@describe
@param
@return
*/
virtual const MEDIA_TYPE& getMediaType(const TString& type) const = 0;
/**
@describe
@param
@return
*/
virtual size_t getMediaPaths(index_t mediaTypeIndex,TStringParam& outPathList) const = 0;
/**
@describe
@param
@return
*/
virtual size_t getMediaFileCount(index_t mediaTypeIndex) const = 0;
/**
@describe
@param
@return
*/
virtual const MediaFile* getMediaFile(index_t mediaTypeIndex,index_t index) const = 0;
inline const MediaFile* getMediaFile(const TString& type, index_t index) const
{
const MEDIA_TYPE& MediaType = this->getMediaType(type);
return this->getMediaFile(MediaType.mIndex, index);
}
/**
@describe
@param
@return
*/
virtual const MediaFile* getMediaFile(index_t mediaTypeIndex, const TString& mediaFileName) const = 0;
inline const MediaFile* getMediaFile(const TString& type, const TString& mediaFileName) const
{
const MEDIA_TYPE& MediaType = this->getMediaType(type);
return this->getMediaFile(MediaType.mIndex, mediaFileName);
}
/**
@describe
@param
@return the media type's index filled by MediaLibrary, same as MediaType::mIndex
@note you should register you media type at plugin installing time, before IMediaLibrary::initialize
*/
virtual index_t registerMediaType(const MEDIA_TYPE& mediaType,const TString& path = TString::EMPTY) = 0;
/**
@describe
@param
@return
@note you should add custom media type/file paths at your plug-in installing time
*/
virtual bool addMediaFilePath(index_t mediaTypeIndex,const TString& path) = 0;
inline bool addMediaFilePath(const TString& type,const TString& path)
{
const MEDIA_TYPE& mt = this->getMediaType(type);
return this->addMediaFilePath(mt.mIndex,path);
}
/**
@describe
@param
@return
*/
virtual bool clearImageCaches() = 0;
/**
@describe
@param
@return
*/
virtual bool getMediaFileInfo(const TString& type, const TString& mediaFileName,
ISelectionReceiver& receiver) = 0;
};//class IMediaLibrary
extern template class BLADE_FRAMEWORK_API Factory<IMediaLibrary>;
extern template class BLADE_FRAMEWORK_API Factory<IMediaLibrary::IMediaPreviewer>;
}//namespace Blade
#endif // __Blade_IMediaLibrary_h__ | [
"xiaofeng.he@mihoyo.com"
] | xiaofeng.he@mihoyo.com |
413fda64c0e12e75538429c716c7c25b645c1c59 | df4ed4df19a463c32bbad9af14f5004a450fb39c | /src/structures/texture.h | 31f00a299f53d58e4d958d52d89d3dfc633b7a8a | [] | no_license | Staco78/game.node | 0705ecb7ef96b581b2375e547419d4ee5ebf3215 | af1b1c144cec66dbb683202c02c71f69e3dbc3db | refs/heads/main | 2023-07-24T17:11:54.620346 | 2021-09-08T19:05:44 | 2021-09-08T19:05:44 | 401,399,468 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 502 | h | #pragma once
#include "napi.h"
#include "SFML/Graphics.hpp"
#include "./image.h"
namespace game_node
{
class Texture : public Napi::ObjectWrap<Texture>
{
public:
static Napi::Object init(Napi::Env env, Napi::Object exports);
Texture(const Napi::CallbackInfo &infos);
static Napi::FunctionReference *getConstructorRef();
sf::Texture* getSfTexture()
{
return &m_texture;
}
private:
sf::Texture m_texture;
};
} | [
"maxime@fbsc.fr"
] | maxime@fbsc.fr |
e676d9b080e8f6360737853da060d201c8b20763 | cad22516e394162c194abe7ad4c99ca673549921 | /raytracer/raytracer.cpp | 539a8c2cec7fe403a4ca981885e597ed35888b89 | [] | no_license | freneticmonkey/raytracer | cd596d8daf6e0a6196a61faf457ff0223af12bc9 | bbccfc007006b355253622cbae56ad9b9644e144 | refs/heads/master | 2021-01-15T14:32:01.295679 | 2016-01-08T16:14:53 | 2016-01-08T16:14:53 | 32,612,205 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,478 | cpp | //
// raytracer.cpp
// SDL2Test
//
// Created by Scott Porter on 21/09/13.
//
#include <iostream>
#include "raytracer.h"
void Raytracer::setupScene(ScenePtr scene, int width, int height)
{
scene->moveTo(camPos);
scene->addLight(vec3(0.0f, -10.0f, -10.0f));
//scene->addLight(vec3(0.0f, 10.f, 10.0f));
scene->lookAt(vec3(0.0f, 4.0f, 0.0f));
ObjectPtr firstSphere( new Sphere(vec3(-2.5f, 3.0f, 0.0f), 1.0f));
firstSphere->material()->setColour(vec3(1.0f, 0.0f, 0.0f))->setTurbulance(0.5)->setBump(10.0);
scene->addObject( firstSphere );
//scene->addObject( ObjectPtr( new Sphere(vec3(1.25f, 3.0f, 0.0f), 1.0f, new Material(vec3(0.0f, 1.0f, 0.0f)))) );
scene->addObject( ObjectPtr( new Sphere(vec3(2.5f, 3.0f, 0.0f),
1.0f,
new CheckerboardMaterial(vec3(0.0f, 0.0f, 1.0f),
vec3(1.0f, 0.5f, 0.0f),
3.0f,
0.2f,
0.7f
)
) ));
ObjectPtr newSphere( new Sphere(vec3(0.0f, 3.0f, 0.0f), 1.0f ) );
newSphere->material()->setColour( vec3(0.0f, 1.0f, 0.0f) )
->setOtherColour( vec3(0.0f) )
->setMarble(0.5);
//->setTurbulance(0.5);
scene->addObject( newSphere );
//scene->addObject( ObjectPtr( new HalfSpace(vec3(0.0f), vec3(0.0f, 1.0f, 0.0f), new Material(vec3(1.0f, 0.0f, 0.0f)) )) );
scene->addObject( ObjectPtr( new HalfSpace(vec3(0.0f), vec3(0.0f, 1.0f, 0.0f), new CheckerboardMaterial())) );
// Walls
//scene->addObject( ObjectPtr( new HalfSpace(vec3(-4.0f, 2.0f, 0.0f), vec3(1.0f, 0.0f, 0.0f), new Material(vec3(1.0f, 0.0f, 0.0f)) )) );
//scene->addObject( ObjectPtr( new HalfSpace(vec3(4.0f, 2.0f, 0.0f), vec3(-1.0f, 0.0f, 0.0f), new Material(vec3(0.0f, 1.0f, 0.0f)) )) );
scene->setupRender(width, height);
}
void Raytracer::run(int width, int height, int threads)
{
// Render
if ( threads == 1 )
{
ScenePtr scene(new Scene(0, height));
setupScene(scene, width, height);
m_pixels = scene->getPixels();
}
else
{
m_pixels = PixelsPtr(new Pixels());
int sectionSize = height / threads;
std::vector<ThreadPtr> threadList;
std::vector<ScenePtr> threadScenes;
// Configure the thread objects
for ( int i = 0; i < threads; i++ )
{
int from = i * sectionSize;
int to = from + sectionSize;
ScenePtr newScene = ScenePtr(new Scene(from, to) );
setupScene(newScene, width, height);
threadScenes.push_back(newScene);
}
// Kick off rendering
for ( int i = 0; i < threads; i++ )
{
ThreadPtr renderThread = ThreadPtr(new std::thread(&Scene::renderArea, threadScenes[i]) );
threadList.push_back( renderThread );
}
// Join the render threads
for ( auto &thread : threadList )
{
thread->join();
}
// build the pixel result.
int sectionCount = 0;
for ( std::vector<ScenePtr>::iterator aScene = threadScenes.begin(); aScene != threadScenes.end(); aScene++ )
{
ScenePtr scene = *aScene;
PixelsPtr pixels = scene->getPixels();
std::cout << "Length Section: "<< sectionCount << " # lines: " << pixels->size() << std::endl;
for (auto &line : *pixels)
{
m_pixels->push_back(line);
}
sectionCount++;
}
}
}
void Raytracer::WriteToSurface(SDL_Surface * surface, int width, int height)
{
std::cout << "height: " << m_pixels->size() << std::endl;
int y = 0;
if ( m_pixels->size() == height )
{
//for ( auto & line : m_pixels )
for ( int y = 0; y < height; y++ )
{
PixelLinePtr line = m_pixels->at(y);
if ( y == 0 )
{
std::cout << "width: " << line->size() << std::endl;
if ( line->size() != width )
{
std::cout << "ERROR: Invalid number of x pixels: " << line->size() << std::endl;
std::cout << "ERROR: Stopping...\n";
}
}
int x = 0;
//for ( auto & pixel : line)
for ( int x = 0; x < width; x++ )
{
vec3 pixel = line->at(x);
//std::cout << "r: " << pixel.x << " g: " << pixel.y << " z: " << pixel.z << std::endl;
Uint8 r = std::min(255.0f, (pixel.x * 255));
//Uint8 r = std::min(255.0f, (x/640.0f * 255));
Uint8 g = std::min(255.0f, (pixel.y * 255));
//Uint8 g = std::min(255.0f, (y/480.0f * 255));
Uint8 b = std::min(255.0f, (pixel.z * 255));
PutPixel32(surface, x, y, SDL_MapRGB(surface->format, r, g, b) );
//x++;
}
//y++;
}
}
else
{
std::cout << "ERROR: Invalid number of y pixels: " << m_pixels->size() << std::endl;
}
} | [
"scottporter@neuroticstudios.com"
] | scottporter@neuroticstudios.com |
02d0110fba53a8a09085437336e0c50877dbc1b3 | 092a77fcb058cf02cad482a4f430233975016c3c | /CSocket_TCP/CSeries.h | c513951a8283291ef0de97b3addcab2b2c10ca56 | [] | no_license | Tsin-yt/FPGA | 33e5653ee1fddf255e92d41e185076e8421edaa1 | cb207989de61682217376b6e9945121c9986354b | refs/heads/main | 2023-01-20T08:15:55.906301 | 2020-11-15T09:33:43 | 2020-11-15T09:33:43 | 312,955,519 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 21,558 | h | // Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard
#import "C:\\Program Files (x86)\\TeeChart Pro v5 ActiveX Control\\TeeChart5.ocx" no_namespace
// CSeries wrapper class
class CSeries : public COleDispatchDriver
{
public:
CSeries(){} // Calls COleDispatchDriver default constructor
CSeries(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
CSeries(const CSeries& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// Attributes
public:
// Operations
public:
// ISeries methods
public:
BOOL get_Active()
{
BOOL result;
InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
return result;
}
void put_Active(BOOL newValue)
{
static BYTE parms[] = VTS_BOOL ;
InvokeHelper(0x1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
LPDISPATCH get_asArea()
{
LPDISPATCH result;
InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asArrow()
{
LPDISPATCH result;
InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asBar()
{
LPDISPATCH result;
InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asBubble()
{
LPDISPATCH result;
InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asCandle()
{
LPDISPATCH result;
InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asErrorBar()
{
LPDISPATCH result;
InvokeHelper(0x9, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asFastLine()
{
LPDISPATCH result;
InvokeHelper(0xa, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asGantt()
{
LPDISPATCH result;
InvokeHelper(0xb, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asHorizBar()
{
LPDISPATCH result;
InvokeHelper(0xc, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asLine()
{
LPDISPATCH result;
InvokeHelper(0xd, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asPie()
{
LPDISPATCH result;
InvokeHelper(0xe, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asPoint()
{
LPDISPATCH result;
InvokeHelper(0xf, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asPolar()
{
LPDISPATCH result;
InvokeHelper(0x10, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asShape()
{
LPDISPATCH result;
InvokeHelper(0x11, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asSurface()
{
LPDISPATCH result;
InvokeHelper(0x12, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asVolume()
{
LPDISPATCH result;
InvokeHelper(0x13, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
unsigned long get_Color()
{
unsigned long result;
InvokeHelper(0x14, DISPATCH_PROPERTYGET, VT_UI4, (void*)&result, NULL);
return result;
}
void put_Color(unsigned long newValue)
{
static BYTE parms[] = VTS_UI4 ;
InvokeHelper(0x14, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
BOOL get_ColorEachPoint()
{
BOOL result;
InvokeHelper(0x15, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
return result;
}
void put_ColorEachPoint(BOOL newValue)
{
static BYTE parms[] = VTS_BOOL ;
InvokeHelper(0x15, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
long get_Count()
{
long result;
InvokeHelper(0x16, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
short get_Cursor()
{
short result;
InvokeHelper(0x17, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
return result;
}
void put_Cursor(short newValue)
{
static BYTE parms[] = VTS_I2 ;
InvokeHelper(0x17, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
VARIANT get_DataSource()
{
VARIANT result;
InvokeHelper(0x18, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL);
return result;
}
void put_DataSource(VARIANT& newValue)
{
static BYTE parms[] = VTS_VARIANT ;
InvokeHelper(0x18, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, &newValue);
}
long get_FirstValueIndex()
{
long result;
InvokeHelper(0x19, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
LPDISPATCH get_FunctionType()
{
LPDISPATCH result;
InvokeHelper(0x1a, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
long get_HorizontalAxis()
{
long result;
InvokeHelper(0x1b, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
void put_HorizontalAxis(long newValue)
{
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x1b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
CString get_LabelsSource()
{
CString result;
InvokeHelper(0x1c, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
void put_LabelsSource(LPCTSTR newValue)
{
static BYTE parms[] = VTS_BSTR ;
InvokeHelper(0x1c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
long get_LastValueIndex()
{
long result;
InvokeHelper(0x1d, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
LPDISPATCH get_Marks()
{
LPDISPATCH result;
InvokeHelper(0x1e, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
CString get_Name()
{
CString result;
InvokeHelper(0x1f, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
void put_Name(LPCTSTR newValue)
{
static BYTE parms[] = VTS_BSTR ;
InvokeHelper(0x1f, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
CString get_PercentFormat()
{
CString result;
InvokeHelper(0x21, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
void put_PercentFormat(LPCTSTR newValue)
{
static BYTE parms[] = VTS_BSTR ;
InvokeHelper(0x21, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
unsigned long get_PointColor(long Index)
{
unsigned long result;
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x22, DISPATCH_PROPERTYGET, VT_UI4, (void*)&result, parms, Index);
return result;
}
void put_PointColor(long Index, unsigned long newValue)
{
static BYTE parms[] = VTS_I4 VTS_UI4 ;
InvokeHelper(0x22, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, Index, newValue);
}
CString get_PointLabel(long Index)
{
CString result;
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x23, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, parms, Index);
return result;
}
void put_PointLabel(long Index, LPCTSTR newValue)
{
static BYTE parms[] = VTS_I4 VTS_BSTR ;
InvokeHelper(0x23, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, Index, newValue);
}
double get_PointValue(long Index)
{
double result;
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x24, DISPATCH_PROPERTYGET, VT_R8, (void*)&result, parms, Index);
return result;
}
void put_PointValue(long Index, double newValue)
{
static BYTE parms[] = VTS_I4 VTS_R8 ;
InvokeHelper(0x24, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, Index, newValue);
}
long get_SeriesType()
{
long result;
InvokeHelper(0x25, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
BOOL get_ShowInLegend()
{
BOOL result;
InvokeHelper(0x26, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
return result;
}
void put_ShowInLegend(BOOL newValue)
{
static BYTE parms[] = VTS_BOOL ;
InvokeHelper(0x26, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
CString get_Title()
{
CString result;
InvokeHelper(0x27, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
void put_Title(LPCTSTR newValue)
{
static BYTE parms[] = VTS_BSTR ;
InvokeHelper(0x27, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
CString get_ValueFormat()
{
CString result;
InvokeHelper(0x28, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
return result;
}
void put_ValueFormat(LPCTSTR newValue)
{
static BYTE parms[] = VTS_BSTR ;
InvokeHelper(0x28, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
CString get_ValueMarkText(long ValueIndex)
{
CString result;
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x29, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, parms, ValueIndex);
return result;
}
long get_VerticalAxis()
{
long result;
InvokeHelper(0x2a, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
void put_VerticalAxis(long newValue)
{
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x2a, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
LPDISPATCH get_XValues()
{
LPDISPATCH result;
InvokeHelper(0x2b, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_YValues()
{
LPDISPATCH result;
InvokeHelper(0x2c, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
long get_ZOrder()
{
long result;
InvokeHelper(0x2d, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
long Add(double AValue, LPCTSTR ALabel, unsigned long Value)
{
long result;
static BYTE parms[] = VTS_R8 VTS_BSTR VTS_UI4 ;
InvokeHelper(0x2e, DISPATCH_METHOD, VT_I4, (void*)&result, parms, AValue, ALabel, Value);
return result;
}
long AddNull(LPCTSTR SomeLabel)
{
long result;
static BYTE parms[] = VTS_BSTR ;
InvokeHelper(0x2f, DISPATCH_METHOD, VT_I4, (void*)&result, parms, SomeLabel);
return result;
}
long AddXY(double AX, double AY, LPCTSTR ALabel, unsigned long Value)
{
long result;
static BYTE parms[] = VTS_R8 VTS_R8 VTS_BSTR VTS_UI4 ;
InvokeHelper(0x30, DISPATCH_METHOD, VT_I4, (void*)&result, parms, AX, AY, ALabel, Value);
return result;
}
long CalcXPos(long SomeValueIndex)
{
long result;
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x31, DISPATCH_METHOD, VT_I4, (void*)&result, parms, SomeValueIndex);
return result;
}
long CalcXPosValue(double SomeValue)
{
long result;
static BYTE parms[] = VTS_R8 ;
InvokeHelper(0x32, DISPATCH_METHOD, VT_I4, (void*)&result, parms, SomeValue);
return result;
}
long CalcXSizeValue(double SomeValue)
{
long result;
static BYTE parms[] = VTS_R8 ;
InvokeHelper(0x33, DISPATCH_METHOD, VT_I4, (void*)&result, parms, SomeValue);
return result;
}
long CalcYPos(long SomeValueIndex)
{
long result;
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x34, DISPATCH_METHOD, VT_I4, (void*)&result, parms, SomeValueIndex);
return result;
}
long CalcYPosValue(double SomeValue)
{
long result;
static BYTE parms[] = VTS_R8 ;
InvokeHelper(0x35, DISPATCH_METHOD, VT_I4, (void*)&result, parms, SomeValue);
return result;
}
long CalcYSizeValue(double SomeValue)
{
long result;
static BYTE parms[] = VTS_R8 ;
InvokeHelper(0x36, DISPATCH_METHOD, VT_I4, (void*)&result, parms, SomeValue);
return result;
}
void CheckDataSource()
{
InvokeHelper(0x37, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void Clear()
{
InvokeHelper(0x38, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
long Clicked(long XCoord, long YCoord)
{
long result;
static BYTE parms[] = VTS_I4 VTS_I4 ;
InvokeHelper(0x39, DISPATCH_METHOD, VT_I4, (void*)&result, parms, XCoord, YCoord);
return result;
}
void Delete(long Index)
{
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x3a, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Index);
}
void FillSampleValues(long NumValues)
{
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x3b, DISPATCH_METHOD, VT_EMPTY, NULL, parms, NumValues);
}
long GetMousePoint()
{
long result;
InvokeHelper(0x3c, DISPATCH_METHOD, VT_I4, (void*)&result, NULL);
return result;
}
BOOL IsNull(long ValueIndex)
{
BOOL result;
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x3d, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, ValueIndex);
return result;
}
void RefreshSeries()
{
InvokeHelper(0x3e, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void SetFunction(long AFunction)
{
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x3f, DISPATCH_METHOD, VT_EMPTY, NULL, parms, AFunction);
}
void SwapValues(long a, long b)
{
static BYTE parms[] = VTS_I4 VTS_I4 ;
InvokeHelper(0x40, DISPATCH_METHOD, VT_EMPTY, NULL, parms, a, b);
}
double XScreenToValue(long ScreenCoord)
{
double result;
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x41, DISPATCH_METHOD, VT_R8, (void*)&result, parms, ScreenCoord);
return result;
}
CString XValueToText(double SomeValue)
{
CString result;
static BYTE parms[] = VTS_R8 ;
InvokeHelper(0x42, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, SomeValue);
return result;
}
double YScreenToValue(long ScreenCoord)
{
double result;
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x43, DISPATCH_METHOD, VT_R8, (void*)&result, parms, ScreenCoord);
return result;
}
CString YValueToText(double SomeValue)
{
CString result;
static BYTE parms[] = VTS_R8 ;
InvokeHelper(0x44, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, SomeValue);
return result;
}
LPDISPATCH get_asBezier()
{
LPDISPATCH result;
InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asContour()
{
LPDISPATCH result;
InvokeHelper(0x8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asError()
{
LPDISPATCH result;
InvokeHelper(0x45, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asPoint3D()
{
LPDISPATCH result;
InvokeHelper(0x46, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asRadar()
{
LPDISPATCH result;
InvokeHelper(0x47, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
long AddNullXY(double X, double Y, LPCTSTR ALabel)
{
long result;
static BYTE parms[] = VTS_R8 VTS_R8 VTS_BSTR ;
InvokeHelper(0x48, DISPATCH_METHOD, VT_I4, (void*)&result, parms, X, Y, ALabel);
return result;
}
CString LegendString(long LegendIndex, long LegendTextStyle)
{
CString result;
static BYTE parms[] = VTS_I4 VTS_I4 ;
InvokeHelper(0x49, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, LegendIndex, LegendTextStyle);
return result;
}
unsigned long LegendItemColor(long LegendIndex)
{
unsigned long result;
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x4a, DISPATCH_METHOD, VT_UI4, (void*)&result, parms, LegendIndex);
return result;
}
long CountLegendItems()
{
long result;
InvokeHelper(0x4b, DISPATCH_METHOD, VT_I4, (void*)&result, NULL);
return result;
}
long LegendToValueIndex(long LegendIndex)
{
long result;
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x4c, DISPATCH_METHOD, VT_I4, (void*)&result, parms, LegendIndex);
return result;
}
long VisibleCount()
{
long result;
InvokeHelper(0x4d, DISPATCH_METHOD, VT_I4, (void*)&result, NULL);
return result;
}
void AssignValues(long SeriesIndex)
{
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x4f, DISPATCH_METHOD, VT_EMPTY, NULL, parms, SeriesIndex);
}
long get_HorizontalAxisCustom()
{
long result;
InvokeHelper(0x20, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
void put_HorizontalAxisCustom(long newValue)
{
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x20, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
long get_VerticalAxisCustom()
{
long result;
InvokeHelper(0x4e, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
void put_VerticalAxisCustom(long newValue)
{
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x4e, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
LPDISPATCH get_asClock()
{
LPDISPATCH result;
InvokeHelper(0x50, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asWindRose()
{
LPDISPATCH result;
InvokeHelper(0x51, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asBar3D()
{
LPDISPATCH result;
InvokeHelper(0x52, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asImageBar()
{
LPDISPATCH result;
InvokeHelper(0x53, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
void DisconnectAxisCustom(BOOL IsHorizontal)
{
static BYTE parms[] = VTS_BOOL ;
InvokeHelper(0x54, DISPATCH_METHOD, VT_EMPTY, NULL, parms, IsHorizontal);
}
LPDISPATCH get_MouseValues()
{
LPDISPATCH result;
InvokeHelper(0x56, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
void AddArray(long ArraySize, VARIANT& YArray, VARIANT& XArray)
{
static BYTE parms[] = VTS_I4 VTS_VARIANT VTS_VARIANT ;
InvokeHelper(0x55, DISPATCH_METHOD, VT_EMPTY, NULL, parms, ArraySize, &YArray, &XArray);
}
long get_Depth()
{
long result;
InvokeHelper(0x57, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
void put_Depth(long newValue)
{
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x57, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
LPDISPATCH get_asDonut()
{
LPDISPATCH result;
InvokeHelper(0x59, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asTriSurface()
{
LPDISPATCH result;
InvokeHelper(0x5a, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asBoxPlot()
{
LPDISPATCH result;
InvokeHelper(0x5b, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asHorizBoxPlot()
{
LPDISPATCH result;
InvokeHelper(0x5c, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asHistogram()
{
LPDISPATCH result;
InvokeHelper(0x5d, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asColorGrid()
{
LPDISPATCH result;
InvokeHelper(0x5e, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asHorizLine()
{
LPDISPATCH result;
InvokeHelper(0x5f, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asBarJoin()
{
LPDISPATCH result;
InvokeHelper(0x60, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asHighLow()
{
LPDISPATCH result;
InvokeHelper(0x61, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asWaterfall()
{
LPDISPATCH result;
InvokeHelper(0x62, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asSmith()
{
LPDISPATCH result;
InvokeHelper(0x63, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asPyramid()
{
LPDISPATCH result;
InvokeHelper(0x64, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asMap()
{
LPDISPATCH result;
InvokeHelper(0x65, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asFunnel()
{
LPDISPATCH result;
InvokeHelper(0x58, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
LPDISPATCH get_asCalendar()
{
LPDISPATCH result;
InvokeHelper(0x66, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
void FreeDatasource(BOOL SurePrompt)
{
static BYTE parms[] = VTS_BOOL ;
InvokeHelper(0x67, DISPATCH_METHOD, VT_EMPTY, NULL, parms, SurePrompt);
}
long get_SeriesLink()
{
long result;
InvokeHelper(0x68, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
long get_DatasourceType()
{
long result;
InvokeHelper(0x69, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
return result;
}
void put_DatasourceType(long newValue)
{
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x69, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}
LPDISPATCH get_ValueLists()
{
LPDISPATCH result;
InvokeHelper(0x6a, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
return result;
}
BOOL IsNan(double Value)
{
BOOL result;
static BYTE parms[] = VTS_R8 ;
InvokeHelper(0x6b, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms, Value);
return result;
}
void DeleteRange(long Start, long Quantity)
{
static BYTE parms[] = VTS_I4 VTS_I4 ;
InvokeHelper(0x6c, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Start, Quantity);
}
// ISeries properties
public:
};
| [
"noreply@github.com"
] | Tsin-yt.noreply@github.com |
e5106775f41aa163c7d412b5c9cf2e84e5f6db4f | 243b35c4130f8e12a130ac3fb8cb501e0e4521f2 | /10258/main.cpp | f57143b08e23d81a887fc08bab23fa2d0548f571 | [] | no_license | jsmera/UVaSolvers | 9235151f1d07673fe3e60826335daef22cace904 | 4f85bc976db5d3cb2d07e451641456be1f4a4a5d | refs/heads/master | 2020-03-28T06:34:14.034770 | 2018-10-22T00:20:29 | 2018-10-22T00:20:29 | 147,844,830 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,708 | cpp | #include <iostream>
#include <algorithm>
#include <sstream>
#include <string>
using namespace std;
struct User{
int id;
int problems_solved;
int time_penality;
User() {
id = 0;
problems_solved = 0;
time_penality = 0;
}
};
bool comp(const User& a, const User& b) {
if (a.id == 0)
return false;
if (b.id == 0)
return true;
if (a.problems_solved == b.problems_solved && a.time_penality == b.time_penality)
return a.id < b.id;
if (a.problems_solved > b.problems_solved)
return true;
if (a.time_penality < b.time_penality)
return true;
return false;
}
User users[102];
int main() {
int T;
cin >> T;
stringstream ss;
string line;
getline(cin, line);
getline(cin, line);
while(T--) {
int ID, P, time;
char L;
int last = 0;
while (getline(cin, line)) {
ss.clear();
if ( line.empty() ) break;
ss << line;
ss >> ID >> P >> time >> L;
if (users[ID].id <= 0 || users[ID].id > 100) users[ID].id = ID;
if (L == 'C') {
users[ID].time_penality += time;
users[ID].problems_solved += 1;
}
if(L == 'I') {
users[ID].time_penality += 20;
}
last = last < ID ? ID : last;
}
sort(users+1, users+last+1, comp);
for (int i = 1; i <= last; i++) {
cout << users[i].id << " " << users[i].problems_solved << " " << users[i].time_penality << endl;
// cout << users[i].id << " " << users[i].problems_solved << " " << users[i].time_penality << endl;
/*if ( users[i].id ) {
/*users[i].id = 0;
users[i].problems_solved = 0;
users[i].time_penality = 0;
}*/
}
if (T) cout << endl;
}
return 0;
} | [
"merac1999@gmail.com"
] | merac1999@gmail.com |
5d8a55dd64dc30dbc5cbc2b04e9e04f27a7f4878 | 7caee8acd6cf8547e6d8ddbabd46588f476ef3e3 | /SimpleV-SLAM/src/visual_odometry.cpp | 5c608ee6c2c6f216381c6068127a17539d92647f | [] | no_license | sypark0720/Visual-SLAM | cf85ad101fdf9bf3e3979c035c4e03c9d574e256 | 21438f6774e83c817aaa99a0632fd6e198ed34a6 | refs/heads/master | 2020-03-21T19:50:01.413528 | 2017-10-19T03:27:11 | 2017-10-19T03:27:11 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,162 | cpp | /*************************************************************************
> File Name: src/visual_odometry.cpp
> Author: ll.pan
> Mail: ll.pan931204@gmail.com
> Created Time: Mon 17 Jul 2017 11:56:42 PM CST
************************************************************************/
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <algorithm>
#include <boost/timer.hpp>
#include "myslam/config.h"
#include "myslam/visual_odometry.h"
namespace myslam
{
VisualOdometry::VisualOdometry() : state_(INITIALIZING), ref_(nullptr),
curr_(nullptr), map_(new Map), num_lost_(0), num_inliers_(0)
{
num_of_features_ = Config::get<int>("number_of_features");
scale_factor_ = Config::get<double>("scale_factor");
level_pyramid_ = Config::get<int>("level_pyramid");
match_ratio_ = Config::get<float>("match_ratio");
max_num_lost_ = Config::get<float>("max_num_lost");
min_inliers_ = Config::get<int>("min_inliners");
keyframe_min_rot = Config::get<double>("keyframe_rotation");
keyframe_min_trans= Config::get<double>("keyframe_translation");
orb_ = cv::ORB::create(num_of_features_, scale_factor_, level_pyramid_);
}
VisualOdometry::~VisualOdometry(){}
bool VisualOdometry::addFrame(Frame::Ptr frame)
{
switch(state_)
{
case INITIALIZING:
{
state_ = OK;
curr_ = ref_ = frame;
map_->insertKeyFrame(frame);
extractKeyPoints();
computeDescriptors();
setRef3DPoints();
break;
}
case OK:
{
curr_ = frame;
extractKeyPoints();
computeDescriptors();
featureMatching();
poseEstimationPnP();
// add MapPoints;
addMapPoints();
if(checkEstimatedPose() == true)
{
curr_->T_cw_ = T_cr_estimated_ * ref_->T_cw_;
ref_ =curr_;
setRef3DPoints();
num_lost_ = 0;
if(checkKeyFrame() == true )
addKeyFrame();
}
else // bad estimation
{
num_lost_++;
if(num_lost_ > max_num_lost_)
state_ = LOST;
return false;
}
break;
}
case LOST:
{
cout << "vo has lost."<< endl;
break;
}
}
return true;
}
void VisualOdometry::extractKeyPoints()
{
orb_->detect (curr_->color_,keypoints_curr_);
}
void VisualOdometry::computeDescriptors()
{
orb_->compute(curr_->color_, keypoints_curr_, descriptors_curr_);
}
void VisualOdometry::featureMatching()
{
vector<cv::DMatch> matches;
cv::BFMatcher matcher;
cv::BFMatcher matcher (cv::NORM_HAMMING);
matcher.match(descriptors_ref_, descriptors_curr_, matches);
// Select the best matches
float min_dis = 1000;
for(cv::DMatch& m:matches){
if(m.distance < min_dis)
min_dis = m.distance;
}
feature_matches_.clear();
for(cv::DMatch& m: matches)
{
if(m.distance < max<float> (min_dis * match_ratio_, 30.0))
feature_matches_.push_back(m);
}
cout << "Good matches: " << feature_matches_.size() << endl;
}
void VisualOdometry::setRef3DPoints()
{
pts_3d_ref_.clear();
pts_3d_world_ref_.clear();
descriptors_ref_ = Mat();
for(size_t i = 0; i < keypoints_curr_.size(); i++)
{
double d = ref_->findDepth(keypoints_curr_[i]);
if(d > 0)
{
Vector3d p_cam = ref_->camera_->pixel2camera ( Vector2d (keypoints_curr_[i].pt.x, keypoints_curr_[i].pt.y),d );
pts_3d_ref_.push_back(cv::Point3f( p_cam(0,0), p_cam(1,0), p_cam(2,0 )));
descriptors_ref_.push_back(descriptors_curr_.row(i));
}
}
}
void VisualOdometry::poseEstimationPnP()
{
// construct 2d 3d observations;
vector<cv::Point3f> pts3d;
vector<cv::Point2f> pts2d;
for(cv::DMatch m : feature_matches_)
{
pts3d.push_back(pts_3d_ref_[m.queryIdx]);
pts2d.push_back(keypoints_curr_[m.trainIdx].pt);
}
Mat K = (cv::Mat_<double>(3,3)<<
ref_->camera_->fx_, 0, ref_->camera_->cx_,
0, ref_->camera_->fy_, ref_->camera_->cy_,
0, 0, 1 );
Mat rvec, tvec, inliers;
cv::solvePnPRansac(pts3d, pts2d, K, Mat(), rvec, tvec, false, 100, 4.0, 0.99, inliers );
num_inliers_ = inliers.rows;
cout << "PnP inliers: "<< num_inliers_ << endl;
T_cr_estimated_ = SE3(
SO3(rvec.at<double>(0,0), rvec.at<double>(1,0), rvec.at<double>(2,0)),
Vector3d( tvec.at<double>(0,0), tvec.at<double>(1,0), tvec.at<double>(2,0))
);
}
bool VisualOdometry::checkEstimatedPose()
{
if ( num_inliers_ < min_inliers_ )
{
cout << "Reject because inlier is too small: "<< num_inliers_ << endl;
return false;
}
// if the motion is too large, it is probably wrong
Sophus::Vector6d d = T_cr_estimated_.log();
if ( d.norm() > 5.0 )
{
cout<<"reject because motion is too large: "<<d.norm()<<endl;
return false;
}
return true;
}
bool VisualOdometry::checkKeyFrame()
{
Sophus::Vector6d d = T_cr_estimated_.log();
Vector3d trans = d.head<3>();
Vector3d rot = d.tail<3>();
if ( rot.norm() >key_frame_min_rot || trans.norm() >key_frame_min_trans )
return true;
return false;
}
void VisualOdometry::addKeyFrame()
{
cout<<"adding a key-frame"<<endl;
map_->insertKeyFrame ( curr_ );
}
}
| [
"778143187@qq.com"
] | 778143187@qq.com |
bb8e58479c9b667ffdecda52e4caaa6253895886 | 95bb00ee31d1218693485bddaef26109c96fc65c | /ABC/006/a.cpp | 00df555493aebb6289be1c86a05b0dff60e588d6 | [] | no_license | ojjiy/contests | 2f0b9ef4d52e45d5432b899e1fa83b006b6e2c66 | 2bf337f8768e57f7afdbe47be95160dd2d448e9d | refs/heads/master | 2021-07-13T04:43:10.726614 | 2020-07-10T07:28:34 | 2020-07-10T07:28:34 | 181,046,329 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 472 | cpp | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(), (x).end()
using namespace std;
template <typename T> T &chmin(T &a, const T &b) {return a = min(a, b);}
template <typename T> T &chmax(T &a, const T &b) {return a = max(a, b);}
using ll = long long;
using ld = long double;
const int INF = 1e9;
const ld eps = 1e-9, pi = acos(-1.0);
int main(){
int n;
cin >> n;
cout << (n%3 ? "NO" : "YES") << endl;
return 0;
} | [
"yuta@Yuta-mbp.local"
] | yuta@Yuta-mbp.local |
f0e34fbe636dca9faad43aeb69ac8081b10e39ca | c06392fe44e252fc393adc994d6fda8b5882f1de | /Assignment7B/SortedLinkedListTests.cpp | 6aa59c8fc9b46d481886b64c08f8f0fe3f7bac33 | [] | no_license | kkaran27/Data-Structures-and-Algorithms-CMPE-180-92 | 040b7e2d713e9c3837757d7b81c75da70e57e9e1 | 9cc8bde292dcc8649cb31860a69850df6a350c83 | refs/heads/master | 2020-07-03T07:52:42.677501 | 2016-11-19T06:00:28 | 2016-11-19T06:00:28 | 74,190,074 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,319 | cpp | /*
* SortedLinkedListTests.cpp
*
* Created on: Oct 12, 2016
* Author: Karan
*/
#include <iostream>
#include <iomanip>
#include <string>
/***** Modify this file to test both integers
***** and strings in the linked list. */
#include "SortedLinkedList.h"
using namespace std;
template<typename T>
void dump(SortedLinkedList<T> *list)
{
Node<T> *p = list->get_head();
if (p == nullptr)
{
cout << " <empty>" << endl;
return;
}
while (p != nullptr)
{
cout << " " << p->data;
p = p->next;
}
cout << endl;
}
void test_integer()
{
SortedLinkedList<int> *list = new SortedLinkedList<int>();
cout << endl << "Integer test" << endl << endl;
const int INSERT[] = {50, 20, 70, 10, 100, 80, 90, 30, 40, 60};
const int INSERT_LENGTH = sizeof(INSERT)/sizeof(INSERT[0]);
for (int i = 0; i < INSERT_LENGTH; i++) {
int value = INSERT[i];
cout << "Inserting " << setw(3) << value << ":";
list->insert(value);
dump(list);
}
const int SEARCH[] = {70, 15, 100, 80, 95, 110, 60};
const int SEARCH_LENGTH = sizeof(SEARCH)/sizeof(SEARCH[0]);
for (int i = 0; i < SEARCH_LENGTH; i++)
{
int value = SEARCH[i];
cout << setw(3) << value << " ";
Node<int> *p = list->find(value);
if (p != nullptr) cout << "found";
else cout << "not found";
cout << endl;
}
const int REMOVE[] = {40, 90, 10, 115, 20, 80, 50, 70, 50, 100, 30, 60, 20};
const int REMOVE_LENGTH = sizeof(REMOVE)/sizeof(REMOVE[0]);
for (int i = 0; i < REMOVE_LENGTH; i++)
{
int value = REMOVE[i];
cout << "Removing " << setw(3) << value << ":";
list->remove(value);
dump(list);
}
delete list;
}
void test_string()
{
SortedLinkedList<string> *list = new SortedLinkedList<string>();
cout << endl << "String test" << endl << endl;
const string INSERT[] = {"science", "math", "physics", "chemistry",
"english", "history", "tennis"};
const int INSERT_LENGTH = sizeof(INSERT)/sizeof(INSERT[0]);
for (int i = 0; i < INSERT_LENGTH; i++) {
string value = INSERT[i];
cout << "Inserting " << setw(9) << value << ":";
list->insert(value);
dump(list);
}
const string SEARCH[] = {"physics", "astronomy", "history", "math", "art"};
const int SEARCH_LENGTH = sizeof(SEARCH)/sizeof(SEARCH[0]);
for (int i = 0; i < SEARCH_LENGTH; i++)
{
string value = SEARCH[i];
cout << setw(9) << value << " ";
Node<string> *p = list->find(value);
if (p != nullptr) cout << "found";
else cout << "not found";
cout << endl;
}
const string REMOVE[] = {"science", "history", "tennis", "chemistry",
"math", "history", "physics", "art", "english"};
const int REMOVE_LENGTH = sizeof(REMOVE)/sizeof(REMOVE[0]);
for (int i = 0; i < REMOVE_LENGTH; i++)
{
string value = REMOVE[i];
cout << "Removing " << setw(9) << value << ":";
list->remove(value);
dump(list);
}
delete list;
}
int main()
{
test_integer();
test_string();
cout << endl << "Done!" << endl;
}
| [
"kkaran.thakkar@gmail.com"
] | kkaran.thakkar@gmail.com |
443142504ddd24bef2b398da8da9b8fbf181eb7f | 656243ae84ca3a2280cc9cc3aad95afca8e10565 | /Code/Sandbox/Plugins/EditorAudioControlsEditor/EditorSDLMixer/AudioSystemControl_sdlmixer.h | 510251e181ed6f2686b2add0af721858247d1fc3 | [] | no_license | NightOwlsEntertainment/PetBox_A_Journey_to_Conquer_Elementary_Algebra | 914ff61bb210862401acb4d3a2eb19d323b00548 | 8383c5c1162d02310f460a1359f04891e5e85bff | refs/heads/master | 2021-01-22T09:48:55.961703 | 2015-11-11T11:26:27 | 2015-11-11T11:26:27 | 45,846,131 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 538 | h | // CryEngine Header File.
// Copyright (C), Crytek, 1999-2014.
#pragma once
#include <IAudioConnection.h>
#include <IAudioSystemControl.h>
namespace AudioControls
{
enum ESDLMixerTypes
{
eSDLMT_INVALID = 0,
eSDLMT_EVENT = 1,
eSDLMT_SAMPLE_FILE = 2,
};
class IAudioSystemControl_sdlmixer : public IAudioSystemControl
{
public:
IAudioSystemControl_sdlmixer() {}
IAudioSystemControl_sdlmixer(const string& name, CID id, TImplControlType type);
virtual ~IAudioSystemControl_sdlmixer() {}
};
} | [
"jonathan.v.mendoza@gmail.com"
] | jonathan.v.mendoza@gmail.com |
d53ade7e07ac8b3a891724d0d67740163b1c4ce0 | aadbdd69feb5b7fdbf6f57d5ebfc56477b452b04 | /1341_f.cpp | c5bf8fcfa1d39eb3748675cc99803bcdf2933593 | [] | no_license | aryandosaj/CompetetiveProgramming | 16c5dd0d7800288078d250973a9b1d5cb884ebf1 | e1be46316f4d14eaaffa54b3f36728e8be1f2b1a | refs/heads/master | 2021-06-05T12:37:13.868842 | 2020-07-20T10:24:26 | 2020-07-20T10:24:26 | 145,744,715 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,771 | cpp | #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
using namespace std;
#define ll long long
#define ull unsigned long long
#define MOD 1000000007
#define pb push_back
#define pl pair<ll, ll>
#define vll vector<ll>
#define pll vector<pair<ll, ll>>
#define ld long double
#define f(a, b) for (ll i = a; i < b; i++)
#define fr(a, b) for (ll j = a; j >= b; j--)
#define fi(a, b) for (ll j = a; j < b; j++)
#define fii(a, b) for (ll k = a; k < b; k++)
ll d[200005];
vll adj[200005];
pll ans;
ll T;
void rec(ll u, ll p, ll t)
{
ans.pb({u, t});
ll ti = t;
ll f = 0;
for (auto i : adj[u])
{
if (i != p)
{
ti++;
if (ti % (T + 1) == 0)
{
if (d[u] - 1 - f < t - 1)
ti = t - d[u] + f;
else
ti = ti % (T + 1);
ans.pb({u, ti});
ti++;
}
rec(i, u, ti);
f++;
}
}
//came at t, leave at t-1 to p,t
if (u == 1)
return;
if (ti != (t - 1 + T + 1) % (T + 1))
ans.pb({u, (t - 1 + T + 1) % (T + 1)});
ans.pb({p, t});
}
int main()
{
#ifndef ONLINE_JUDGE
freopen("input.txt", "rt", stdin);
freopen("output.txt", "wt", stdout);
#endif
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll n;
cin >> n;
f(0, n - 1)
{
ll u, v;
cin >> u >> v;
adj[u].pb(v);
adj[v].pb(u);
d[u]++, d[v]++;
T = max(T, d[u]);
T = max(T, d[v]);
}
rec(1, 0, 0);
cout << ans.size() << "\n";
for (auto i : ans)
cout << i.first << " " << i.second << "\n";
} | [
"aaryandosaj@gmail.com"
] | aaryandosaj@gmail.com |
7e655494ff27c99b5cc0c3376f5b146654a9d49a | 08b8cf38e1936e8cec27f84af0d3727321cec9c4 | /data/crawl/squid/new_hunk_1656.cpp | 07fd98513eea0775dff9b79ee8bce92e8d3cf14e | [] | no_license | ccdxc/logSurvey | eaf28e9c2d6307140b17986d5c05106d1fd8e943 | 6b80226e1667c1e0760ab39160893ee19b0e9fb1 | refs/heads/master | 2022-01-07T21:31:55.446839 | 2018-04-21T14:12:43 | 2018-04-21T14:12:43 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 325 | cpp | debugs(29, 2, HERE << "user '" << username() << "' has been seen at a new IP address (" << ipaddr << ")");
}
SBuf
Auth::User::BuildUserKey(const char *username, const char *realm)
{
SBuf key;
key.Printf("%s:%s", username, realm);
return key;
}
/**
* Add the Auth::User structure to the username cache.
*/
| [
"993273596@qq.com"
] | 993273596@qq.com |
530571f104923baa480091e3854bc1ae6419cd12 | 2f814827ffab9d8d9cc23cb4c3622feb45fa5770 | /PWGCF/FEMTOSCOPY/FemtoDream/AliAnalysisTaskThreeBodyFemtoAOD.h | e39b4a71f9850a4833f2af81ede87519949f5d8b | [] | permissive | urasantonio/AliPhysics | dd3a851f84674846e45f4b1fdea65700dee80223 | 8ca4a9abc72a6b94e75048d08748a1debf41873e | refs/heads/master | 2022-12-17T21:54:22.246566 | 2020-09-11T14:04:20 | 2020-09-11T14:04:20 | 268,796,481 | 1 | 0 | BSD-3-Clause | 2020-09-11T13:50:03 | 2020-06-02T12:35:23 | C++ | UTF-8 | C++ | false | false | 8,075 | h | /*
* AliAnalysisTaskThreeBodyFemtoAOD.h
*
* Created on: May 13, 2019
* Author: Laura Serksnyte
*/
#ifndef PWGCF_FEMTOSCOPY_FEMTODREAM_ALIANALYSISTASKTHREEBODYFEMTOAOD_H_
#define PWGCF_FEMTOSCOPY_FEMTODREAM_ALIANALYSISTASKTHREEBODYFEMTOAOD_H_
#include "AliAnalysisTaskSE.h"
#include "AliFemtoDreamEventCuts.h"
#include "AliFemtoDreamEvent.h"
#include "AliFemtoDreamTrackCuts.h"
#include "AliFemtoDreamTrack.h"
#include "AliFemtoDreamv0.h"
#include "AliFemtoDreamv0Cuts.h"
#include "AliFemtoDreamCollConfig.h"
#include "AliFemtoDreamPairCleaner.h"
#include "AliFemtoDreamPartCollection.h"
#include "AliFemtoDreamControlSample.h"
class AliAnalysisTaskThreeBodyFemtoAOD : public AliAnalysisTaskSE {
public:
AliAnalysisTaskThreeBodyFemtoAOD();
AliAnalysisTaskThreeBodyFemtoAOD(const char* name, bool isMC, bool triggerOn);
virtual ~AliAnalysisTaskThreeBodyFemtoAOD();
virtual void UserCreateOutputObjects();
virtual void UserExec(Option_t *option);
void ResetGlobalTrackReference();
void StoreGlobalTrackReference(AliAODTrack *track);
void FillTripletDistribution(std::vector<std::vector<AliFemtoDreamBasePart>> &ParticleVector, int firstSpecies,int secondSpecies,int thirdSpecies, TH1F* hist, std::vector<int> PDGCodes, int mult, TH2F* hist2d, TH2F **fEventTripletPhiThetaArray, int phiEtaHistNo, AliFemtoDreamCollConfig Config);
void FillPairDistributionPL(std::vector<std::vector<AliFemtoDreamBasePart>> &ParticleVector, TH1F* sameEventDistributionPL, int mult, TH2F* hist2d);
void FillPairDistributionPP(std::vector<std::vector<AliFemtoDreamBasePart>> &ParticleVector, TH1F* sameEventDistributionPP, TH2F **fEventTripletPhiThetaArray, AliFemtoDreamCollConfig Config);
void SetMixedEvent(std::vector<std::vector<AliFemtoDreamBasePart>> &ParticleVector, std::vector<AliFemtoDreamPartContainer> *fPartContainer);
void FillTripletDistributionMEPP(std::vector<std::vector<AliFemtoDreamBasePart>> &ParticleVector, std::vector<AliFemtoDreamPartContainer> &fPartContainer, int speciesSE, int speciesME1, int speciesME2, TH1F* hist, std::vector<int> PDGCodes, int mult, TH2F* hist2d, TH2F **fEventTripletPhiThetaArray, int phiEtaHistNo, AliFemtoDreamCollConfig Config);
// test different mixing
void SetMixedEventOnlyPLambdaTEST(std::vector<std::vector<AliFemtoDreamBasePart>> &ParticleVector, std::vector<AliFemtoDreamPartContainer>*fPartContainer);
void FillTripletDistributionMEPPTEST(std::vector<std::vector<AliFemtoDreamBasePart>> &ParticleVector, std::vector<AliFemtoDreamPartContainer> &fPartContainer, int speciesSE, int speciesME1, int speciesME2, TH1F* hist, std::vector<int> PDGCodes, int mult, TH2F* hist2d, TH2F **fEventTripletPhiThetaArray, int phiEtaHistNo, AliFemtoDreamCollConfig Config);
void FillPairDistributionME(std::vector<std::vector<AliFemtoDreamBasePart>> &ParticleVector, std::vector<AliFemtoDreamPartContainer> &fPartContainer, int speciesSE, int speciesME1, TH1F* hist, std::vector<int> PDGCodes, int mult, TH2F* hist2d, TH2F **fEventTripletPhiThetaArray, AliFemtoDreamCollConfig Config);
// test different mixing 2
void SetMixedEventOnlyPPLambdaTEST(std::vector<std::vector<AliFemtoDreamBasePart>> &ParticleVector, std::vector<AliFemtoDreamPartContainer>*fPartContainer);
// Create triplets like (pp)l (lp)p
void FillTripletDistributionSE2ME1(std::vector<std::vector<AliFemtoDreamBasePart>> &ParticleVector, std::vector<AliFemtoDreamPartContainer> &fPartContainer, int speciesSE1, int speciesSE2, int speciesME, TH1F* hist, std::vector<int> PDGCodes, int mult, TH2F* hist2d, TH2F **fEventTripletPhiThetaArray, int phiEtaHistNo, AliFemtoDreamCollConfig Config);
// Add the close pair cut
bool DeltaEtaDeltaPhi(AliFemtoDreamBasePart &part1,AliFemtoDreamBasePart &part2, bool SEorME, unsigned int DoThisPair, TH2F* beforeHist,TH2F* afterHist, AliFemtoDreamCollConfig Config);
bool MyLovely3BodyTrigger(AliAODEvent *evt , bool isMC, std::vector<int> PDGCodes);
double CalculatePPLTriggerQ3Min(std::vector<std::vector<AliFemtoDreamBasePart>> &ParticleVector, int firstSpecies,int secondSpecies,int thirdSpecies, std::vector<int> PDGCodes );
void SetRunTaskLightWeight(bool light) {
fisLightWeight = light;
}
void SetEventCuts(AliFemtoDreamEventCuts* evtCuts) {
fEventCuts = evtCuts;
}
void SetProtonCuts(AliFemtoDreamTrackCuts* trkCuts) {
fProton = trkCuts;
}
void SetAntiProtonCuts(AliFemtoDreamTrackCuts* trkCuts) {
fAntiProton = trkCuts;
}
void Setv0Cuts(AliFemtoDreamv0Cuts* v0Cuts) {
fLambda = v0Cuts;
}
void SetAntiv0Cuts(AliFemtoDreamv0Cuts* v0Cuts) {
fAntiLambda = v0Cuts;
}
void SetEventCutsTrigger(AliFemtoDreamEventCuts* evtCutsTrigger) {
fEventCutsTrigger = evtCutsTrigger;
}
void SetProtonCutsTrigger(AliFemtoDreamTrackCuts* trkCutsTrigger) {
fTrackCutsTrigger = trkCutsTrigger;
}
void SetAntiProtonCutsTrigger(AliFemtoDreamTrackCuts* trkCutsTrigger) {
fAntiTrackCutTrigger = trkCutsTrigger;
}
void Setv0CutsTrigger(AliFemtoDreamv0Cuts* v0CutsTrigger) {
fv0CutsTrigger = v0CutsTrigger;
}
void SetAntiv0CutsTrigger(AliFemtoDreamv0Cuts* v0CutsTrigger) {
fAntiv0CutsTrigger = v0CutsTrigger;
}
void SetCorrelationConfig(AliFemtoDreamCollConfig* config) {
fConfig=config;
}
void SetRunThreeBodyHistograms(bool RunThreeBodyHistos) {
fRunThreeBody=RunThreeBodyHistos;
}
void SetTriggerOn(bool triggerOn) {
fTriggerOn=triggerOn;
}
void SetIsMC(bool isMCLocal) {
fIsMC=isMCLocal;
}
void SetQ3Limit(float Q3Limit) {
fQ3Limit = Q3Limit;
}
static TLorentzVector RelativePairMomentum(TLorentzVector &PartOne, TLorentzVector &PartTwo);
private:
AliAnalysisTaskThreeBodyFemtoAOD(const AliAnalysisTaskThreeBodyFemtoAOD &task);
AliAnalysisTaskThreeBodyFemtoAOD &operator=(const AliAnalysisTaskThreeBodyFemtoAOD &task);
bool fisLightWeight;//
AliFemtoDreamEvent* fEvent;//!
AliFemtoDreamEventCuts* fEventCuts;//
TList* fEvtList;//!
AliFemtoDreamTrack* fTrack;//!
AliFemtoDreamTrackCuts* fProton;//
TList* fProtonList;//!
TList* fProtonMCList;//!
AliFemtoDreamTrackCuts* fAntiProton;//
TList* fAntiProtonList;//!
TList* fAntiProtonMCList;//!
AliFemtoDreamv0* fv0;//!
AliFemtoDreamv0Cuts* fLambda;//
TList* fLambdaList;
TList* fLambdaMCList;
AliFemtoDreamv0Cuts* fAntiLambda;//
TList* fAntiLambdaList;
TList* fAntiLambdaMCList;
AliFemtoDreamCollConfig *fConfig; //
AliFemtoDreamPairCleaner *fPairCleaner; //!
AliFemtoDreamPartCollection *fPartColl; //!
TList *fResults;//!
// Three particles same event
TList *fResultsThreeBody;//!
bool fRunThreeBody;
TH1F **fSameEventTripletArray;
TH2F **fSameEventTripletMultArray;
TH2F **fSameEventTripletPhiThetaArray;
// Three particles mixed events
std::vector<std::vector<std::vector<AliFemtoDreamPartContainer>>> fPartContainer;
std::vector<std::vector<std::vector<AliFemtoDreamPartContainer>>> fPartContainerTEST;
std::vector<std::vector<std::vector<AliFemtoDreamPartContainer>>> fPartContainerTESTppL;
TH1F **fMixedEventTripletArray;
TH2F **fMixedEventTripletMultArray;
TH2F **fMixedEventTripletPhiThetaArray;
// Three particles trigger studies
bool fTriggerOn;
bool fIsMC;
float fQ3Limit;
TH1F* fRejectedParticles;
TH1F* fAcceptedParticles;
TH1F* fAcceptedParticlesButNoPPL;
AliFemtoDreamEventCuts* fEventCutsTrigger;//
TList* fEventCutsTriggerList;//!
AliFemtoDreamTrackCuts* fTrackCutsTrigger;//
TList* fTrackCutsTriggerList;//!
AliFemtoDreamTrackCuts* fAntiTrackCutTrigger;//
TList* fAntiTrackCutTriggerList;//!
AliFemtoDreamv0Cuts* fv0CutsTrigger;//
TList* fv0CutsTriggerList;
AliFemtoDreamv0Cuts* fAntiv0CutsTrigger;//
TList* fAntiv0CutsTriggerList;
////////////////////////77
TList *fResultsQA;//!
AliFemtoDreamControlSample *fSample; //!
TList *fResultsSample;//!
TList *fResultsSampleQA;//!
int fTrackBufferSize;//
AliAODTrack **fGTI; //!
ClassDef(AliAnalysisTaskThreeBodyFemtoAOD,2)
};
#endif /* PWGCF_FEMTOSCOPY_FEMTODREAM_AliAnalysisTaskThreeBodyFemtoAOD_H_ */
| [
"lauraserksnyte@gmail.com"
] | lauraserksnyte@gmail.com |
1ba3a6f2f8406887fbc135c3b679c0996b2c295c | 6b0b6f4b75f5495f4901ee247b455665c98c295f | /Tests/IncludeTest/src/DiligentCore/GraphicsEngine/ShaderResourceBindingH_test.cpp | 4aba9cd90da45dd63c011a9cc7646e692ec598fe | [
"Apache-2.0"
] | permissive | Romanovich1311/DEngine-pcsx4 | 8308865f2f422051b7c4a4cab98b328afad3b341 | 65d28b15e9428d77963de95412aaceeb5930d29d | refs/heads/master | 2022-04-21T08:53:12.107307 | 2020-04-14T10:58:41 | 2020-04-14T10:58:41 | 255,579,312 | 0 | 0 | Apache-2.0 | 2020-04-14T10:31:49 | 2020-04-14T10:31:48 | null | UTF-8 | C++ | false | false | 1,334 | cpp | /* Copyright 2015-2019 Egor Yusov
*
* 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
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
*
* In no event and under no legal theory, whether in tort (including negligence),
* contract, or otherwise, unless required by applicable law (such as deliberate
* and grossly negligent acts) or agreed to in writing, shall any Contributor be
* liable for any damages, including any direct, indirect, special, incidental,
* or consequential damages of any character arising as a result of this License or
* out of the use or inability to use the software (including but not limited to damages
* for loss of goodwill, work stoppage, computer failure or malfunction, or any and
* all other commercial damages or losses), even if such Contributor has been advised
* of the possibility of such damages.
*/
#include "DiligentCore/Graphics/GraphicsEngine/interface/ShaderResourceBinding.h"
| [
"pcsx4emu2@gmail.com"
] | pcsx4emu2@gmail.com |
17f1524fb16019566960c2f2a8b4452d2ce36970 | 73c8a3179b944b63b2a798542896e4cdf0937b6e | /Aizu/TrafficAnalysis.cpp | f40f8fb27dcbc8480638dcaf85a4d4becc3d002f | [
"Apache-2.0"
] | permissive | aajjbb/contest-files | c151f1ab9b562ca91d2f8f4070cb0aac126a188d | 71de602a798b598b0365c570dd5db539fecf5b8c | refs/heads/master | 2023-07-23T19:34:12.565296 | 2023-07-16T00:57:55 | 2023-07-16T00:57:59 | 52,963,297 | 2 | 4 | null | 2017-08-03T20:12:19 | 2016-03-02T13:05:25 | C++ | UTF-8 | C++ | false | false | 752 | cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
using namespace std;
int n, m, t;
int main(void) {
while(cin >> n >> m) {
if(n == 0 && m == 0) break;
vector<int> a;
a.push_back(0);
for(int i = 0; i < n; i++) {
cin >> t; a.push_back(t);
}
for(int i = 0; i < m; i++) {
cin >> t; a.push_back(t);
}
sort(a.begin(), a.end());
int ans = 0;
for(int i = 0; i + 1 < a.size(); i++) {
if(fabs(a[i + 1] - a[i]) > ans) {
ans = fabs(a[i + 1] - a[i]);
}
}
cout << ans << endl;
}
return 0;
}
| [
"jefersonlsiq@gmail.com"
] | jefersonlsiq@gmail.com |
2726820d6615d09ec9787018bdc8cd4602c1b456 | b0119c3e2abfe63b57588268c218175ae35569f3 | /src/qt/qvaluecombobox.h | 8ee67e252d9e72b86a978ac1f87201fd202dc86b | [
"MIT"
] | permissive | kvargha/memecoin | 6bab56b789d90c2eaada6d643a808e3d60710ce1 | 07fba0f43bf7a5e3534b36eb0dcb15495bb48879 | refs/heads/master | 2020-03-27T05:35:42.952023 | 2018-08-29T06:35:41 | 2018-08-29T06:35:41 | 144,773,758 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 913 | h | // Copyright (c) 2018-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef QVALUECOMBOBOX_H
#define QVALUECOMBOBOX_H
#include <QComboBox>
#include <QVariant>
/* QComboBox that can be used with QDataWidgetMapper to select ordinal values from a model. */
class QValueComboBox : public QComboBox
{
Q_OBJECT
Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged USER true)
public:
explicit QValueComboBox(QWidget *parent = 0);
QVariant value() const;
void setValue(const QVariant &value);
/** Specify model role to use as ordinal value (defaults to Qt::UserRole) */
void setRole(int role);
signals:
void valueChanged();
private:
int role;
private slots:
void handleSelectionChanged(int idx);
};
#endif // QVALUECOMBOBOX_H
| [
"bob174d@gmail.com"
] | bob174d@gmail.com |
cd4f07f9897627f74e2cd42f1478575b14e6706e | 1286c5b3d37b0785e99073c8234b44df47561f5a | /201510_201609/1024_KUPC2015/H2.cpp | 8beaea34c619515a9e66242ce91eecb9de15b176 | [
"MIT"
] | permissive | kazunetakahashi/atcoder | 930cb5a0f4378914cc643de2f0596a5de7e4a417 | 16ce65829ccc180260b19316e276c2fcf6606c53 | refs/heads/master | 2022-02-15T19:12:10.224368 | 2022-01-29T06:38:42 | 2022-01-29T06:38:42 | 26,685,318 | 7 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,940 | cpp | #include <iostream>
using namespace std;
typedef long long ll;
ll N;
ll solve() {
int a[64];
int b[64];
int c[64];
int renzoku = 0;
for (auto i=0; i<64; i++) {
a[i] = ((N >> i) & 1);
b[i] = a[i];
if (renzoku > 0) {
if (b[i] == 1) {
b[i] = 0;
renzoku++;
} else {
renzoku = 0;
}
} else {
if (b[i] == 1) {
renzoku++;
}
}
c[i] = b[i];
}
for (auto i=63; i>=0; i--) {
if (b[i] == 1) {
int ones = 0;
for (auto j=0; i+j<64; j++) {
if (a[i+j] == 1) {
ones++;
} else {
break;
}
}
for (auto j=1; j<i; j++) {
if (b[j] == 0 && c[j] == 0 && c[j-1] == 1) {
int zeros = 0;
for (auto k=0; k+j<i; k++) {
if (a[k+j] == 0) {
zeros++;
} else {
break;
}
}
if (ones+1 <= zeros) {
c[i] = 0;
for (auto k=0; k<ones; k++) {
c[j+k] = 1;
}
break;
}
}
}
}
}
ll one = 1;
ll ans = 0;
for (auto i=0; i<64; i++) {
if (c[i] == 1) {
ans += (one << i);
}
}
return ans;
}
int countone(ll x) {
int ans = 0;
while (x > 0) {
ans += (x & 1);
x = (x >> 1);
}
return ans;
}
int main() {
for (auto i=0; i<100; i++) {
N = i;
int s = solve();
if (countone(s) != countone(s + N)) {
cout << N << endl;
cout << "solve wrong = " << s << endl;
} else {
int t = -1;
for (auto j=0; j<=i; j++) {
if (countone(j) == countone(j+N)) {
t = j;
break;
}
}
if (t != s) {
cout << N << endl;
cout << "s = " << s << ", t = " << t << endl;
}
}
}
}
/*
int main() {
int T;
cin >> T;
for (auto i=0; i<T; i++) {
cin >> N;
cout << solve() << endl;
}
}
*/
| [
"kazunetakahashi@gmail.com"
] | kazunetakahashi@gmail.com |
2b0be703af76b726d6580f40717cb7ab3aebcdee | 3187dd3c1186cf97781987e455f5d11244f90aec | /examples/tlm/lt_extension_mandatory/src/lt_target_extension_mandatory.cpp | b3e65215150f1b916c4f4d6ee7bd8e8f7119da75 | [
"Apache-2.0"
] | permissive | Muriukidavid/systemc-2.3.2 | fe5d9d57636025cfdc0dee7eb9c8114ca19628ad | c5d203ac014277b9d2c2af895edc43537a15674e | refs/heads/master | 2020-03-13T13:17:48.813825 | 2018-04-26T09:48:42 | 2018-04-26T09:48:42 | 131,135,420 | 0 | 1 | Apache-2.0 | 2018-06-28T15:17:19 | 2018-04-26T09:51:26 | C++ | UTF-8 | C++ | false | false | 7,485 | cpp | /*****************************************************************************
Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
more contributor license agreements. See the NOTICE file distributed
with this work for additional information regarding copyright ownership.
Accellera licenses this file to you 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 "lt_target_extension_mandatory.h"
using namespace sc_core;
static const char *filename = "lt_target_extension_mandatory.cpp"; /// filename for reporting
lt_target_extension_mandatory::lt_target_extension_mandatory ///< constructor
( sc_module_name name ///< instance name
, sc_time invalidate_dmi_time = sc_time(25, SC_NS) ///< DMI invalidation timeout
)
: sc_module ( name ) ///< module
, m_socket ( "LT_target_mandatory" ) ///< socket
, m_latency_read ( sc_time ( 100, SC_NS ) ) ///< read latency
, m_latency_write ( sc_time ( 10, SC_NS ) ) ///< write latency
{
// register interface methods
m_socket.register_nb_transport_fw ( this, <_target_extension_mandatory::nb_transport_fw );
m_socket.register_get_direct_mem_ptr ( this, <_target_extension_mandatory::get_dmi_ptr );
m_socket.register_transport_dbg ( this, <_target_extension_mandatory::transport_dbg );
// prime the DMI timeout mechanism
SC_METHOD ( invalidate_dmi_method );
sensitive << m_invalidate_dmi_event;
dont_initialize();
m_invalidate_dmi_time = invalidate_dmi_time;
}
tlm::tlm_sync_enum ///< response
lt_target_extension_mandatory::nb_transport_fw ///< non-blocking forward transport
( transaction_type &trans ///< transaction
, phase_type &phase ///< phase
, sc_time &t ///< time
)
{
ostringstream msg; ///< log message
assert ( phase == tlm::BEGIN_REQ );
// check for extension
extension_initiator_id *extension_ptr;
trans.get_extension ( extension_ptr );
msg.str("");
msg << "Extension ";
if ( extension_ptr == 0 )
{
msg << "not present - ERROR";
REPORT_FATAL ( filename, __FUNCTION__, msg.str () );
}
else
{
msg << "present, Data: " << extension_ptr->m_initiator_id;
REPORT_INFO ( filename, __FUNCTION__, msg.str () );
sc_dt::uint64 address = trans.get_address();
unsigned char * data = trans.get_data_ptr();
assert ( address <= m_max_address );
msg.str ( "" );
switch ( trans.get_command () )
{
case tlm::TLM_WRITE_COMMAND:
{
// write command
msg << "Write request - "
<< "Addr: 0x" << internal << setw ( sizeof(sc_dt::uint64) * 2 )
<< setfill( '0' ) << uppercase << hex << trans.get_address ();
memcpy( &m_memory [ address ], data, sizeof(unsigned int) );
t += sc_time(10, SC_NS);
break;
}
case tlm::TLM_READ_COMMAND:
{
// read command
msg << "Read request - "
<< "Addr: 0x" << internal << setw ( sizeof(sc_dt::uint64) * 2 )
<< setfill( '0' ) << uppercase << hex << trans.get_address ();
memcpy( data, &m_memory [ address ], sizeof(unsigned int) );
t += sc_time(100, SC_NS);
break;
}
default:
{
// unknown command
msg << "Unknown request";
REPORT_FATAL ( filename, __FUNCTION__, msg.str () );
break;
}
}
REPORT_INFO ( filename, __FUNCTION__, msg.str () );
trans.set_response_status ( tlm::TLM_OK_RESPONSE );
trans.set_dmi_allowed ( true );
}
// return completed, no phase update needed
return tlm::TLM_COMPLETED;
}
unsigned int ///< byte count
lt_target_extension_mandatory::transport_dbg ///< debug transport
( transaction_type &transaction_ref ///< transaction
)
{
unsigned int num_bytes = 0;
unsigned int address = (unsigned int) transaction_ref.get_address();
if ( address <= m_max_address )
{
num_bytes = transaction_ref.get_data_length ();
if ( ( address + num_bytes ) > m_max_address)
{
num_bytes = m_max_address - address + 1;
}
if ( transaction_ref.is_read () )
{
// read operation
memcpy ( transaction_ref.get_data_ptr(), &m_memory [ address ], num_bytes );
}
else
{
// write operation
memcpy ( &m_memory [ address ], transaction_ref.get_data_ptr(), num_bytes );
}
}
return num_bytes;
}
bool ///< DMI granted
lt_target_extension_mandatory::get_dmi_ptr ///< get DMI pointer
( transaction_type &trans ///< transaction
, tlm::tlm_dmi &dmi_properties ///< DMI properties
)
{
bool dmi_granted ( false ); ///< DMI granted flag
ostringstream msg; ///< log message
// setup a timed event to invalidate the DMI pointer
m_invalidate_dmi_event.notify ( m_invalidate_dmi_time );
// check for extension
extension_initiator_id *extension_ptr;
trans.get_extension ( extension_ptr );
msg.str ( "" );
msg << "Extension ";
if ( extension_ptr == 0 )
{
msg << "not present - ERROR";
REPORT_FATAL ( filename, __FUNCTION__, msg.str () );
}
else
{
msg << "present, Data: " << extension_ptr->m_initiator_id;
REPORT_INFO ( filename, __FUNCTION__, msg.str () );
if (trans.get_address() <= m_max_address)
{
dmi_properties.allow_read_write ( );
dmi_properties.set_start_address ( m_min_address );
dmi_properties.set_end_address ( m_max_address );
dmi_properties.set_dmi_ptr ( m_memory );
dmi_properties.set_read_latency ( m_latency_read );
dmi_properties.set_write_latency ( m_latency_write );
dmi_granted = true;
}
else
{
// should not happen
dmi_properties.set_start_address ( trans.get_address () );
dmi_properties.set_end_address ( trans.get_address () );
}
}
return dmi_granted;
}
void
lt_target_extension_mandatory::invalidate_dmi_method ///< invalidate DMI method
( void
)
{
m_socket->invalidate_direct_mem_ptr ( m_min_address, m_max_address );
}
| [
"karfes@gmail.com"
] | karfes@gmail.com |
bc7f47a33092f47300af5887ac099095670c2cec | e80157219506304ee15dc4d0c9b3cc7790eec837 | /visual-control/visual-control/cognition/detector/detailedfacedetector.h | 378a348b73721a57c975850bed4c7a7ba87fe392 | [] | no_license | Victor-Morvy/visual-control | 7325593264a79f8354cfdc34bab778516fbce8db | 6f32aa97e0af51ec62b8722b035f3a364586b560 | refs/heads/master | 2023-03-15T23:10:20.071853 | 2015-03-17T12:56:04 | 2015-03-17T12:56:04 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,462 | h | #ifndef COGNITION_DETAILEDFACEDETECTOR_H
#define COGNITION_DETAILEDFACEDETECTOR_H
#include "facedetector.h"
#include <map>
#include <boost/thread/mutex.hpp>
namespace cognition
{
/*!
* \brief
* Detects faces and the corresponding eyes nose and mouth that are part of that face.
*
* Always tries to detect a face first. On succesfull detection it will try
* to detect the eyes, nose and mouth too. These options can turned on/off
*
* \author Christophe Hesters
*/
class DetailedFaceDetector : public FaceDetector
{
public:
//Detection parameters to configure inner workings of this class
enum DetectParams
{
FACE = 0,
LEFT_EYE = 1, /* leftmost eye, when loading the cascade, only load EYES!*/
RIGHT_EYE = 2, /* rightmost eye, when loading the cascade, only load EYES!*/
EYES = 3,
NOSE = 4,
EYES_AND_NOSE = 7,
MOUTH = 8,
EYES_AND_MOUTH = 11,
NOSE_AND_MOUTH = 12,
ALL = 15
};
//functor needed forusing std::map
struct less_cvrect {
bool operator() (const cv::Rect& x, const cv::Rect& y) const{
if( (x.x < y.x) || (x.x == y.x && x.y < y.y) ) return true;
return false;
}
};
//maps the detected features to their rectangles
typedef std::map<DetectParams, cv::Rect> FaceDetails;
//maps the face to the more detailed features of that face
typedef std::map<cv::Rect, FaceDetails, less_cvrect> DetailedFaces;
/*!
* \brief Initializes this object. If you wish to detect more features
* than just the face, load the approrpriate classifiers trough
* loadCascade before starting detection! otherwise you can expect
* a crash!
*
* \param detectWhat needed to specify what to detect, use loadCascade to load required classifiers
* \param faceCascadePath the path to the haar cascade xml file, loads the classifier!
* \param captureDevice if 0, nothing else it will register itself as a frame receiver
* \param optimalSubregionDetect if true, only scan area's where a face was detected
* \param roiScaleFactor how far beyond the former face rect should be scanned?
* \param name an name for this object
*/
DetailedFaceDetector(DetectParams detectWhat,
const std::string& faceCascadePath,
FrameCapture* captureDevice = 0,
bool optimalSubregionDetect = false,
double roiScaleFactor = 1.16,
const std::string& name = "detailed face detector");
virtual ~DetailedFaceDetector(void);
/*!
* \brief Loads the specified internal classifier with the given cascade.
* this is required if these detection features are enabled. This
* has to be called before detection starts and it is NOT thread-safe!
*
* \param which the classifier to load possibilities are EYES, NOSE and MOUTH
* \param cascadePath the path at which the xml haar cascade resides
*
* \returns true on success, false on failure
*/
bool loadCascade(DetectParams which, const std::string& cascadePath);
/*!
* \brief configures this object to detect the specified features
* make sure all the corresponding classifiers are loaded before enabling this
*
* \param featuresToDetect configures what this object detects
*/
void setDetectParams(DetectParams featuresToDetect) {detectWhat = featuresToDetect;}
/*!
* \brief fetches the current frame and detects the selected features.
* this method is called by the client or the threading system.
*/
virtual void processFrame();
/*!
* \brief Returns most recent detection results (thread-safe)
*
* \returns A structure which maps detected face rectangles to the other features of that face
* \see definition of DetailedFaces
*/
DetailedFaces getDetailedFaceInfo();
/*!
* \brief Searches for the eyes in the FaceDetails structure and
* returns the angle in degrees. (0 means the face is straight ahead)
* a negative value means a rotation left, positive means a rotation right
*
* \param faceDetails The detailed features of a face
* \returns the angle that describes face rotation, negative is left, positive is right
*/
static float getFaceRotation(const FaceDetails& faceDetails);
protected:
//should only contain options from DetectParams
DetectParams detectWhat;
cv::CascadeClassifier eyeClassifier;
cv::CascadeClassifier noseClassifier;
cv::CascadeClassifier mouthClassifier;
/*!
* \brief initiates detection of the selected features on all the detected faces
*
* \param frame the current frame
*/
void detectFeatures(const cv::Mat &frame);
/*!
* \brief Tries to detect eyes at the most probable location inside the frame and
* stores the result in a FaceDetails structure
*
* \param frame the current complete frame(no subregion!)
* \param faceRect the rectangle of the current face
* \param results the structure to store the results in
*/
void detectEyes(const cv::Mat &frame, const cv::Rect& faceRect, FaceDetails &results);
/*!
* \brief Tries to detect the nose at the most probable location inside the frame and
* stores the result in a FaceDetails structure
*
* \param frame the current complete frame(no subregion!)
* \param faceRect the rectangle of the current face
* \param results the structure to store the results in
*/
void detectNose(const cv::Mat &frame, const cv::Rect& faceRect, FaceDetails &results);
/*!
* \brief Tries to detect the mouth at the most probable location inside the frame and
* stores the result in a FaceDetails structure
*
* \param frame the current complete frame(no subregion!)
* \param faceRect the rectangle of the current face
* \param results the structure to store the results in
*/
void detectMouth(const cv::Mat &frame, const cv::Rect& faceRect, FaceDetails &results);
/*!
* \brief Updates the latest detection result (thread-safe)
*
* \param facesDetails updates the latest detection result with facesDetails
*/
void setDetailedFaceInfo(const DetailedFaces& facesDetails);
private:
//a lock for reading/writing detailedFacesInfo
boost::mutex detailedFaceInfoLock;
//the latest detectin results
DetailedFaces detailedFacesInfo;
};
}
#endif //COGNITION_DETAILEDFACEDETECTOR_H | [
"toefel18@gmail.com@c51247d8-a6b2-c331-4319-f979498f3e55"
] | toefel18@gmail.com@c51247d8-a6b2-c331-4319-f979498f3e55 |
bb5c5a0dbd94dea3506721a8a89041b007dd8b24 | 0eff74b05b60098333ad66cf801bdd93becc9ea4 | /second/download/httpd/gumtree/httpd_new_hunk_804.cpp | eaf9ac1e87dd792568f3cd0c21281124ae1ee70b | [] | no_license | niuxu18/logTracker-old | 97543445ea7e414ed40bdc681239365d33418975 | f2b060f13a0295387fe02187543db124916eb446 | refs/heads/master | 2021-09-13T21:39:37.686481 | 2017-12-11T03:36:34 | 2017-12-11T03:36:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,703 | cpp | }
else {
if (type == REMOTE_HOST || type == REMOTE_DOUBLE_REV) {
return NULL;
}
else {
*str_is_ip = 1;
return conn->remote_ip;
}
}
}
/*
* Optional function coming from mod_ident, used for looking up ident user
*/
static APR_OPTIONAL_FN_TYPE(ap_ident_lookup) *ident_lookup;
AP_DECLARE(const char *) ap_get_remote_logname(request_rec *r)
{
if (r->connection->remote_logname != NULL) {
return r->connection->remote_logname;
}
if (ident_lookup) {
return ident_lookup(r);
}
return NULL;
}
/* There are two options regarding what the "name" of a server is. The
* "canonical" name as defined by ServerName and Port, or the "client's
* name" as supplied by a possible Host: header or full URI.
*
* The DNS option to UseCanonicalName causes this routine to do a
* reverse lookup on the local IP address of the connection and use
* that for the ServerName. This makes its value more reliable while
* at the same time allowing Demon's magic virtual hosting to work.
* The assumption is that DNS lookups are sufficiently quick...
* -- fanf 1998-10-03
*/
AP_DECLARE(const char *) ap_get_server_name(request_rec *r)
{
conn_rec *conn = r->connection;
core_dir_config *d;
const char *retval;
d = (core_dir_config *)ap_get_module_config(r->per_dir_config,
&core_module);
switch (d->use_canonical_name) {
case USE_CANONICAL_NAME_ON:
retval = r->server->server_hostname;
break;
case USE_CANONICAL_NAME_DNS:
if (conn->local_host == NULL) {
if (apr_getnameinfo(&conn->local_host,
conn->local_addr, 0) != APR_SUCCESS)
conn->local_host = apr_pstrdup(conn->pool,
r->server->server_hostname);
else {
ap_str_tolower(conn->local_host);
}
}
retval = conn->local_host;
break;
case USE_CANONICAL_NAME_OFF:
case USE_CANONICAL_NAME_UNSET:
retval = r->hostname ? r->hostname : r->server->server_hostname;
break;
default:
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"ap_get_server_name: Invalid UCN Option somehow");
retval = "localhost";
break;
}
return retval;
}
/*
* Get the current server name from the request for the purposes
* of using in a URL. If the server name is an IPv6 literal
* address, it will be returned in URL format (e.g., "[fe80::1]").
| [
"993273596@qq.com"
] | 993273596@qq.com |
175da65ede41abad7c36e0f4b127a015a4ac7d67 | 862c8bbe368e303e558b94d6e387c8c2c8f08e0d | /src/app/convo_screen.h | 581ed4bd7c237056e83f4b1fb6c8e000b1b3ea05 | [] | no_license | ShaheedLegion/chatthing | 54a5ed42c3c1637b575c7614749caedeb388ce35 | 196f10708827156b11753357b2d789ae5390dbaa | refs/heads/master | 2016-09-14T03:10:52.635302 | 2016-06-08T17:50:51 | 2016-06-08T17:50:51 | 59,675,660 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 375 | h | #ifndef _APP_GAME_SCREEN_
#define _APP_GAME_SCREEN_
#include "core/screen.h"
namespace app {
class ConvoScreen : public core::Screen {
public:
ConvoScreen(core::ISignalHelper *helper, tgui::Gui &g);
~ConvoScreen();
virtual void addWidgets() override;
virtual void hideWidgets() override;
virtual void handleCallbacks() override;
};
}
#endif // _APP_GAME_SCREEN_ | [
"shaheed.abdol@playsafesa.com"
] | shaheed.abdol@playsafesa.com |
891f8c03fdfedb9c7562afc4e8182a4fded700d9 | c8b39acfd4a857dc15ed3375e0d93e75fa3f1f64 | /Engine/Source/Editor/UnrealEd/Private/DragTool_BoxSelect.cpp | ff4d19b9d94036daf661b4a0741a501bc42bb615 | [
"MIT",
"LicenseRef-scancode-proprietary-license"
] | permissive | windystrife/UnrealEngine_NVIDIAGameWorks | c3c7863083653caf1bc67d3ef104fb4b9f302e2a | b50e6338a7c5b26374d66306ebc7807541ff815e | refs/heads/4.18-GameWorks | 2023-03-11T02:50:08.471040 | 2022-01-13T20:50:29 | 2022-01-13T20:50:29 | 124,100,479 | 262 | 179 | MIT | 2022-12-16T05:36:38 | 2018-03-06T15:44:09 | C++ | UTF-8 | C++ | false | false | 13,198 | cpp | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "DragTool_BoxSelect.h"
#include "Components/PrimitiveComponent.h"
#include "CanvasItem.h"
#include "Settings/LevelEditorViewportSettings.h"
#include "GameFramework/Volume.h"
#include "EngineUtils.h"
#include "EditorModeManager.h"
#include "EditorModes.h"
#include "ActorEditorUtils.h"
#include "ScopedTransaction.h"
#include "Engine/LevelStreaming.h"
#include "CanvasTypes.h"
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// FDragTool_BoxSelect
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Starts a mouse drag behavior. The start location is snapped to the editor constraints if bUseSnapping is true.
*
* @param InViewportClient The viewport client in which the drag event occurred.
* @param InStart Where the mouse was when the drag started.
*/
void FDragTool_ActorBoxSelect::StartDrag(FEditorViewportClient* InViewportClient, const FVector& InStart, const FVector2D& InStartScreen)
{
FDragTool::StartDrag(InViewportClient, InStart, InStartScreen);
FIntPoint MousePos;
InViewportClient->Viewport->GetMousePos(MousePos);
Start = FVector(MousePos);
End = EndWk = Start;
FLevelEditorViewportClient::ClearHoverFromObjects();
// Create a list of bsp models to check for intersection with the box
ModelsToCheck.Reset();
// Do not select BSP if its not visible
if( InViewportClient->EngineShowFlags.BSP)
{
UWorld* World = InViewportClient->GetWorld();
check(World);
// Add the persistent level always
ModelsToCheck.Add( World->PersistentLevel->Model );
// Add all streaming level models
for( int32 LevelIndex = 0; LevelIndex < World->StreamingLevels.Num(); ++LevelIndex )
{
ULevelStreaming* StreamingLevel = World->StreamingLevels[LevelIndex];
// Only add streaming level models if the level is visible
if( StreamingLevel != NULL && StreamingLevel->bShouldBeVisibleInEditor )
{
ULevel* Level = StreamingLevel->GetLoadedLevel();
if ( Level != NULL )
{
ModelsToCheck.Add( Level->Model );
}
}
}
}
}
void FDragTool_ActorBoxSelect::AddDelta( const FVector& InDelta )
{
FDragTool::AddDelta( InDelta );
FIntPoint MousePos;
LevelViewportClient->Viewport->GetMousePos(MousePos);
End = FVector(MousePos);
EndWk = End;
const bool bUseHoverFeedback = GEditor != NULL && GetDefault<ULevelEditorViewportSettings>()->bEnableViewportHoverFeedback;
if( bUseHoverFeedback )
{
const bool bStrictDragSelection = GetDefault<ULevelEditorViewportSettings>()->bStrictBoxSelection;
// If we are using over feedback calculate a new box from the one being dragged
FBox SelBBox;
CalculateBox( SelBBox );
// Check every actor to see if it intersects the frustum created by the box
// If it does, the actor will be selected and should be given a hover cue
bool bSelectionChanged = false;
UWorld* IteratorWorld = GWorld;
for( FActorIterator It(IteratorWorld); It; ++It )
{
AActor& Actor = **It;
const bool bActorHitByBox = IntersectsBox( Actor, SelBBox, bStrictDragSelection );
if( bActorHitByBox )
{
// Apply a hover effect to any actor that will be selected
AddHoverEffect( Actor );
}
else
{
// Remove any hover effect on this actor as it no longer will be selected by the current box
RemoveHoverEffect( Actor );
}
}
// Check each model to see if it will be selected
for( int32 ModelIndex = 0; ModelIndex < ModelsToCheck.Num(); ++ModelIndex )
{
UModel& Model = *ModelsToCheck[ModelIndex];
for (int32 NodeIndex = 0; NodeIndex < Model.Nodes.Num(); NodeIndex++)
{
if( IntersectsBox( Model, NodeIndex, SelBBox, bStrictDragSelection ) )
{
// Apply a hover effect to any bsp surface that will be selected
AddHoverEffect( Model, Model.Nodes[NodeIndex].iSurf );
}
else
{
// Remove any hover effect on this bsp surface as it no longer will be selected by the current box
RemoveHoverEffect( Model, Model.Nodes[NodeIndex].iSurf );
}
}
}
}
}
/**
* Ends a mouse drag behavior (the user has let go of the mouse button).
*/
void FDragTool_ActorBoxSelect::EndDrag()
{
const bool bGeometryMode = ModeTools->IsModeActive(FBuiltinEditorModes::EM_Geometry);
FScopedTransaction Transaction( NSLOCTEXT("ActorFrustumSelect", "MarqueeSelectTransation", "Marquee Select" ) );
bool bShouldSelect = true;
FBox SelBBox;
CalculateBox( SelBBox );
if( bControlDown )
{
// If control is down remove from selection
bShouldSelect = false;
}
else if( !bShiftDown )
{
// If the user is selecting, but isn't hold down SHIFT, remove all current selections.
ModeTools->SelectNone();
}
// Let the editor mode try to handle the box selection.
const bool bEditorModeHandledBoxSelection = ModeTools->BoxSelect(SelBBox, bLeftMouseButtonDown);
// If the edit mode didn't handle the selection, try normal actor box selection.
if ( !bEditorModeHandledBoxSelection )
{
const bool bStrictDragSelection = GetDefault<ULevelEditorViewportSettings>()->bStrictBoxSelection;
if( bControlDown )
{
// If control is down remove from selection
bShouldSelect = false;
}
else if( !bShiftDown )
{
// If the user is selecting, but isn't hold down SHIFT, remove all current selections.
GEditor->SelectNone( true, true );
}
// Select all actors that are within the selection box area. Be aware that certain modes do special processing below.
bool bSelectionChanged = false;
UWorld* IteratorWorld = GWorld;
const TArray<FName>& HiddenLayers = LevelViewportClient->ViewHiddenLayers;
for( FActorIterator It(IteratorWorld); It; ++It )
{
AActor* Actor = *It;
bool bActorIsVisible = true;
for ( auto Layer : Actor->Layers )
{
// Check the actor isn't in one of the layers hidden from this viewport.
if( HiddenLayers.Contains( Layer ) )
{
bActorIsVisible = false;
break;
}
}
// Select the actor if we need to
if( bActorIsVisible && IntersectsBox( *Actor, SelBBox, bStrictDragSelection ) )
{
GEditor->SelectActor( Actor, bShouldSelect, false );
bSelectionChanged = true;
}
}
// Check every model to see if its BSP surfaces should be selected
for( int32 ModelIndex = 0; ModelIndex < ModelsToCheck.Num(); ++ModelIndex )
{
UModel& Model = *ModelsToCheck[ModelIndex];
// Check every node in the model
for (int32 NodeIndex = 0; NodeIndex < Model.Nodes.Num(); NodeIndex++)
{
if( IntersectsBox( Model, NodeIndex, SelBBox, bStrictDragSelection ) )
{
// If the node intersected the frustum select the corresponding surface
GEditor->SelectBSPSurf( &Model, Model.Nodes[NodeIndex].iSurf, bShouldSelect, false );
bSelectionChanged = true;
}
}
}
if ( bSelectionChanged )
{
// If any selections were made. Notify that now.
GEditor->NoteSelectionChange();
}
}
// Clear any hovered objects that might have been created while dragging
FLevelEditorViewportClient::ClearHoverFromObjects();
// Clean up.
FDragTool::EndDrag();
}
void FDragTool_ActorBoxSelect::Render(const FSceneView* View, FCanvas* Canvas)
{
FCanvasBoxItem BoxItem(FVector2D(Start.X, Start.Y), FVector2D(End.X - Start.X, End.Y - Start.Y));
BoxItem.SetColor(FLinearColor::White);
Canvas->DrawItem(BoxItem);
}
void FDragTool_ActorBoxSelect::CalculateBox( FBox& OutBox )
{
FSceneViewFamilyContext ViewFamily(FSceneViewFamily::ConstructionValues(
LevelViewportClient->Viewport,
LevelViewportClient->GetScene(),
LevelViewportClient->EngineShowFlags)
.SetRealtimeUpdate(LevelViewportClient->IsRealtime()));
FSceneView* View = LevelViewportClient->CalcSceneView(&ViewFamily);
FVector4 StartScreenPos = View->PixelToScreen(Start.X, Start.Y, 0);
FVector4 EndScreenPos = View->PixelToScreen(End.X, End.Y, 0);
FVector TransformedStart = View->ScreenToWorld(View->PixelToScreen(Start.X, Start.Y, 0.5f));
FVector TransformedEnd = View->ScreenToWorld(View->PixelToScreen(End.X, End.Y, 0.5f));
// Create a bounding box based on the start/end points (normalizes the points).
OutBox.Init();
OutBox += TransformedStart;
OutBox += TransformedEnd;
switch(LevelViewportClient->ViewportType)
{
case LVT_OrthoXY:
case LVT_OrthoNegativeXY:
OutBox.Min.Z = -WORLD_MAX;
OutBox.Max.Z = WORLD_MAX;
break;
case LVT_OrthoXZ:
case LVT_OrthoNegativeXZ:
OutBox.Min.Y = -WORLD_MAX;
OutBox.Max.Y = WORLD_MAX;
break;
case LVT_OrthoYZ:
case LVT_OrthoNegativeYZ:
OutBox.Min.X = -WORLD_MAX;
OutBox.Max.X = WORLD_MAX;
break;
case LVT_OrthoFreelook:
case LVT_Perspective:
break;
}
}
/**
* Returns true if the passed in Actor intersects with the provided box
*
* @param InActor The actor to check
* @param InBox The box to check against
* @param bUseStrictSelection true if the actor must be entirely within the frustum
*/
bool FDragTool_ActorBoxSelect::IntersectsBox( AActor& InActor, const FBox& InBox, bool bUseStrictSelection )
{
bool bActorHitByBox = false;
const bool bGeometryMode = ModeTools->IsModeActive(FBuiltinEditorModes::EM_Geometry);
// Check for special cases (like certain show flags that might hide an actor)
bool bActorIsHiddenByShowFlags = false;
// Check to see that volume actors are visible in the viewport
if( InActor.IsA(AVolume::StaticClass()) && (!LevelViewportClient->EngineShowFlags.Volumes || !LevelViewportClient->IsVolumeVisibleInViewport(InActor) ) )
{
bActorIsHiddenByShowFlags = true;
}
// Never drag-select hidden actors or builder brushes. Also, don't consider actors which haven't been recently rendered.
//@TODO - replace with proper check for if this object was visible last frame. This is viewport dependent and viewports can use different concepts of time
//depending on if they are in "realtime" mode or not. See FLevelEditorViewportClient::Draw for the differing concepts of time.
const bool bActorRecentlyRendered = true;//Actor->LastRenderTime > ( GWorld->GetTimeSeconds() - 1.0f );
if( !bActorIsHiddenByShowFlags && !InActor.IsHiddenEd() && !FActorEditorUtils::IsABuilderBrush(&InActor) && bActorRecentlyRendered )
{
// Iterate over all actor components, selecting out primitive components
TInlineComponentArray<UPrimitiveComponent*> PrimitiveComponents;
InActor.GetComponents(PrimitiveComponents);
for (const UPrimitiveComponent* PrimitiveComponent : PrimitiveComponents)
{
check(PrimitiveComponent != nullptr);
if (PrimitiveComponent->IsRegistered() && PrimitiveComponent->IsVisibleInEditor())
{
if (PrimitiveComponent->ComponentIsTouchingSelectionBox(InBox, LevelViewportClient->EngineShowFlags, bGeometryMode, bUseStrictSelection))
{
bActorHitByBox = true;
break;
}
}
}
}
return bActorHitByBox;
}
/**
* Returns true if the provided BSP node intersects with the provided frustum
*
* @param InModel The model containing BSP nodes to check
* @param NodeIndex The index to a BSP node in the model. This node is used for the bounds check.
* @param InFrustum The frustum to check against.
* @param bUseStrictSelection true if the node must be entirely within the frustum
*/
bool FDragTool_ActorBoxSelect::IntersectsBox( const UModel& InModel, int32 NodeIndex, const FBox& InBox, bool bUseStrictSelection ) const
{
FBox NodeBB;
InModel.GetNodeBoundingBox( InModel.Nodes[NodeIndex], NodeBB );
bool bFullyContained = false;
bool bIntersects = false;
if( !bUseStrictSelection )
{
bIntersects = InBox.Intersect( NodeBB );
}
else
{
bIntersects = InBox.IsInside( NodeBB.Max ) && InBox.IsInside( NodeBB.Min );
}
return bIntersects;
}
/** Adds a hover effect to the passed in actor */
void FDragTool_ActorBoxSelect::AddHoverEffect( AActor& InActor )
{
FViewportHoverTarget HoverTarget( &InActor );
FLevelEditorViewportClient::AddHoverEffect( HoverTarget );
FLevelEditorViewportClient::HoveredObjects.Add( HoverTarget );
}
/** Removes a hover effect from the passed in actor */
void FDragTool_ActorBoxSelect::RemoveHoverEffect( AActor& InActor )
{
FViewportHoverTarget HoverTarget( &InActor );
FSetElementId Id = FLevelEditorViewportClient::HoveredObjects.FindId( HoverTarget );
if( Id.IsValidId() )
{
FLevelEditorViewportClient::RemoveHoverEffect( HoverTarget );
FLevelEditorViewportClient::HoveredObjects.Remove( Id );
}
}
/** Adds a hover effect to the passed in bsp surface */
void FDragTool_ActorBoxSelect::AddHoverEffect( UModel& InModel, int32 SurfIndex )
{
FViewportHoverTarget HoverTarget( &InModel, SurfIndex );
FLevelEditorViewportClient::AddHoverEffect( HoverTarget );
FLevelEditorViewportClient::HoveredObjects.Add( HoverTarget );
}
/** Removes a hover effect from the passed in bsp surface */
void FDragTool_ActorBoxSelect::RemoveHoverEffect( UModel& InModel, int32 SurfIndex )
{
FViewportHoverTarget HoverTarget( &InModel, SurfIndex );
FSetElementId Id = FLevelEditorViewportClient::HoveredObjects.FindId( HoverTarget );
if( Id.IsValidId() )
{
FLevelEditorViewportClient::RemoveHoverEffect( HoverTarget );
FLevelEditorViewportClient::HoveredObjects.Remove( Id );
}
}
| [
"tungnt.rec@gmail.com"
] | tungnt.rec@gmail.com |
9e08960b53caa0cc0cbb7f542437071f86ada705 | 3252706aa35a21822ddcaa7f1579a7bc8b67627b | /src/APICredential.cpp | 9c2743ca9ffd8d9e2833b295e009d4b7d3cd465e | [] | no_license | Livetubeio/server | b8016f08083ed6f1b6a1a061d741b9376727ff20 | 1a1b0e208cbb24d548a297c1d4d8e805d7b9cf26 | refs/heads/master | 2021-01-12T17:21:46.861006 | 2016-12-11T00:40:36 | 2016-12-11T00:40:36 | 69,486,092 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,157 | cpp | #include <string>
#include <iostream>
#include <googleapis/util/status.h>
#include <googleapis/client/data/data_reader.h>
#include <googleapis/client/transport/http_request.h>
#include <APICredential.h>
#include <cstdlib>
using namespace googleapis;
using client::DataReader;
using client::HttpRequest;
APICredential::APICredential() {
auto path = std::getenv("API_KEY");
if(path == NULL) return;
key = path;
}
const std::string APICredential::type() const {
return "Api";
}
util::Status APICredential::Refresh() {
return client::StatusOk();
}
util::Status APICredential::Load(DataReader *serialized_credential) {
return client::StatusOk();
}
DataReader* APICredential::MakeDataReader() const {
return nullptr;
}
util::Status APICredential::AuthorizeRequest(HttpRequest* request) {
if(key.empty()) {
return client::StatusInternalError("API_KEY not set");
}
std::stringstream ss;
ss << request->url() << "&key=" << key;
request->set_url(ss.str());
return client::StatusOk();
}
void APICredential::RefreshAsync(Callback1<util::Status> *callback) {
callback->Run(client::StatusOk());
}
| [
"stevijo.mayer@googlemail.com"
] | stevijo.mayer@googlemail.com |
c951af5e21d044b63ffc7a1bac94608903474aa7 | fc7ae4316b134b6a356d391f4376b629a1b0c005 | /Project 1 - Linked List/project1_program.cpp | 1d39bdd5d89896d2a55e17ec3a793f5e37b239ab | [] | no_license | Stirk91/Data-Structures-Exercises | fe73b821eec7164141f10588672714101a5dc3ba | 7ea849ac0579d5cf99d4d2cc5cae3c7c9c0af59d | refs/heads/master | 2021-08-23T21:46:23.298317 | 2017-12-06T17:54:24 | 2017-12-06T17:54:24 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,397 | cpp | #include "project1_program.hpp"
#include <fstream>
using namespace std;
void Program::Start()
{
LoadCustomers();
SaveCustomers();
}
void Program::LoadCustomers()
{
// load customers, sorting by card type
string filename = "../MOCK_DATA.txt";
ifstream input( filename );
if ( input.is_open() )
{
cout << "Found input file \"" << filename << "\"!" << endl;
}
else
{
cout << "Error: Couldn't find input file \"" << filename << "\"!" << endl;
}
CustomerData data;
// ignore header
string discard;
input >> discard >> discard >> discard >> discard >> discard;
// load all the data
while ( input >> data.id >> data.username >> data.ssn >> data.cardNumber >> data.cardType )
{
m_customers.PushBack( data ); // updated from STL list
data.Display();
}
input.close();
}
void Program::SaveCustomers()
{
// save customers back out to text file
string filename = "../data_output.txt";
ofstream output( filename );
// update me: activate the for-loop!
// *updated for-loop
for ( int i = 0; i < m_customers.Size(); i++ )
{
CustomerData cd = m_customers[i];
output
<< cd.ssn << "\t"
<< cd.cardNumber << "\t"
<< cd.cardType << "\t"
<< cd.username << "\t"
<< endl;
}
output.close();
}
| [
"linden.the.lionheart@gmail.com"
] | linden.the.lionheart@gmail.com |
29353997dda7e583cd69efc848cd3434521c3ff0 | a011c4b22f74697633f7f0a37dcf6516619ff02d | /src/Tiny_Websockets_Generic/internals/ws_common.hpp | f2d9d9135052130ff48f11f43f2e5d9ba8b3126b | [
"MIT"
] | permissive | robysanf/WebSockets2_Generic | 080f2d0b24f958145b4dfba8ecfaedd88d7a3530 | fe1765b62a93dfd63ddd06b2b8fa8928fbf07f57 | refs/heads/master | 2022-12-01T10:06:23.310553 | 2020-08-08T05:11:37 | 2020-08-08T05:11:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,475 | hpp | /****************************************************************************************************************************
ws_common.hpp
For WebSockets2_Generic Library
Based on and modified from Gil Maimon's ArduinoWebsockets library https://github.com/gilmaimon/ArduinoWebsockets
to support STM32F/L/H/G/WB/MP1, nRF52 and SAMD21/SAMD51 boards besides ESP8266 and ESP32
The library provides simple and easy interface for websockets (Client and Server).
Built by Khoi Hoang https://github.com/khoih-prog/Websockets2_Generic
Licensed under MIT license
Version: 1.0.6
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 14/07/2020 Initial coding/porting to support nRF52 and SAMD21/SAMD51 boards. Add SINRIC/Alexa support
1.0.1 K Hoang 16/07/2020 Add support to Ethernet W5x00 to nRF52, SAMD21/SAMD51 and SAM DUE boards
1.0.2 K Hoang 18/07/2020 Add support to Ethernet ENC28J60 to nRF52, SAMD21/SAMD51 and SAM DUE boards
1.0.3 K Hoang 18/07/2020 Add support to STM32F boards using Ethernet W5x00, ENC28J60 and LAN8742A
1.0.4 K Hoang 27/07/2020 Add support to STM32F/L/H/G/WB/MP1 and Seeeduino SAMD21/SAMD51 using
Ethernet W5x00, ENC28J60, LAN8742A and WiFiNINA. Add examples and Packages' Patches.
1.0.5 K Hoang 29/07/2020 Sync with ArduinoWebsockets v0.4.18 to fix ESP8266 SSL bug.
1.0.6 K Hoang 06/08/2020 Add non-blocking WebSocketsServer feature and non-blocking examples.
*****************************************************************************************************************************/
#pragma once
// KH
#include <WebSockets2_Generic.h>
#include <Tiny_Websockets_Generic/ws_config_defs.hpp>
#include <string>
#include <Arduino.h>
namespace websockets2_generic
{
typedef std::string WSString;
typedef String WSInterfaceString;
namespace internals2_generic
{
WSString fromInterfaceString(const WSInterfaceString& str);
WSString fromInterfaceString(const WSInterfaceString&& str);
WSInterfaceString fromInternalString(const WSString& str);
WSInterfaceString fromInternalString(const WSString&& str);
} // namespace internals2_generic
} // namespace websockets 2_generic
#ifdef ESP8266
// Using ESP8266 WiFi
#warning Using ESP8266 WiFi for ESP8266 in ws_common.hpp
#define PLATFORM_DOES_NOT_SUPPORT_BLOCKING_READ
#include <Tiny_Websockets_Generic/network/esp8266/esp8266_tcp.hpp>
#define WSDefaultTcpClient websockets2_generic::network2_generic::Esp8266TcpClient
#define WSDefaultTcpServer websockets2_generic::network2_generic::Esp8266TcpServer
#ifndef _WS_CONFIG_NO_SSL
// OpenSSL Dependent
#define WSDefaultSecuredTcpClient websockets2_generic::network2_generic::SecuredEsp8266TcpClient
#endif //_WS_CONFIG_NO_SSL
#elif defined(ESP32)
// Using ESP32 WiFi
#warning Using ESP32 WiFi for ESP32 in ws_common.hpp
#define PLATFORM_DOES_NOT_SUPPORT_BLOCKING_READ
#include <Tiny_Websockets_Generic/network/esp32/esp32_tcp.hpp>
#define WSDefaultTcpClient websockets2_generic::network2_generic::Esp32TcpClient
#define WSDefaultTcpServer websockets2_generic::network2_generic::Esp32TcpServer
#ifndef _WS_CONFIG_NO_SSL
// OpenSSL Dependent
#define WSDefaultSecuredTcpClient websockets2_generic::network2_generic::SecuredEsp32TcpClient
#endif //_WS_CONFIG_NO_SSL
#endif // ESP8266
| [
"noreply@github.com"
] | robysanf.noreply@github.com |
c824f8b895cb1d1f29c57d3b912b4690abc0328c | bd2139703c556050403c10857bde66f688cd9ee6 | /valhalla/119/webrev.00/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp | 2523f5ae21d1781b1aebba24d3702f9ca5396428 | [] | no_license | isabella232/cr-archive | d03427e6fbc708403dd5882d36371e1b660ec1ac | 8a3c9ddcfacb32d1a65d7ca084921478362ec2d1 | refs/heads/master | 2023-02-01T17:33:44.383410 | 2020-12-17T13:47:48 | 2020-12-17T13:47:48 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 115,169 | cpp | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "asm/assembler.hpp"
#include "c1/c1_CodeStubs.hpp"
#include "c1/c1_Compilation.hpp"
#include "c1/c1_LIRAssembler.hpp"
#include "c1/c1_MacroAssembler.hpp"
#include "c1/c1_Runtime1.hpp"
#include "c1/c1_ValueStack.hpp"
#include "ci/ciArrayKlass.hpp"
#include "ci/ciInstance.hpp"
#include "ci/ciValueKlass.hpp"
#include "code/compiledIC.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "nativeInst_aarch64.hpp"
#include "oops/objArrayKlass.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/sharedRuntime.hpp"
#include "utilities/powerOfTwo.hpp"
#include "vmreg_aarch64.inline.hpp"
#ifndef PRODUCT
#define COMMENT(x) do { __ block_comment(x); } while (0)
#else
#define COMMENT(x)
#endif
NEEDS_CLEANUP // remove this definitions ?
const Register IC_Klass = rscratch2; // where the IC klass is cached
const Register SYNC_header = r0; // synchronization header
const Register SHIFT_count = r0; // where count for shift operations must be
#define __ _masm->
static void select_different_registers(Register preserve,
Register extra,
Register &tmp1,
Register &tmp2) {
if (tmp1 == preserve) {
assert_different_registers(tmp1, tmp2, extra);
tmp1 = extra;
} else if (tmp2 == preserve) {
assert_different_registers(tmp1, tmp2, extra);
tmp2 = extra;
}
assert_different_registers(preserve, tmp1, tmp2);
}
static void select_different_registers(Register preserve,
Register extra,
Register &tmp1,
Register &tmp2,
Register &tmp3) {
if (tmp1 == preserve) {
assert_different_registers(tmp1, tmp2, tmp3, extra);
tmp1 = extra;
} else if (tmp2 == preserve) {
assert_different_registers(tmp1, tmp2, tmp3, extra);
tmp2 = extra;
} else if (tmp3 == preserve) {
assert_different_registers(tmp1, tmp2, tmp3, extra);
tmp3 = extra;
}
assert_different_registers(preserve, tmp1, tmp2, tmp3);
}
bool LIR_Assembler::is_small_constant(LIR_Opr opr) { Unimplemented(); return false; }
LIR_Opr LIR_Assembler::receiverOpr() {
return FrameMap::receiver_opr;
}
LIR_Opr LIR_Assembler::osrBufferPointer() {
return FrameMap::as_pointer_opr(receiverOpr()->as_register());
}
//--------------fpu register translations-----------------------
address LIR_Assembler::float_constant(float f) {
address const_addr = __ float_constant(f);
if (const_addr == NULL) {
bailout("const section overflow");
return __ code()->consts()->start();
} else {
return const_addr;
}
}
address LIR_Assembler::double_constant(double d) {
address const_addr = __ double_constant(d);
if (const_addr == NULL) {
bailout("const section overflow");
return __ code()->consts()->start();
} else {
return const_addr;
}
}
address LIR_Assembler::int_constant(jlong n) {
address const_addr = __ long_constant(n);
if (const_addr == NULL) {
bailout("const section overflow");
return __ code()->consts()->start();
} else {
return const_addr;
}
}
void LIR_Assembler::breakpoint() { Unimplemented(); }
void LIR_Assembler::push(LIR_Opr opr) { Unimplemented(); }
void LIR_Assembler::pop(LIR_Opr opr) { Unimplemented(); }
bool LIR_Assembler::is_literal_address(LIR_Address* addr) { Unimplemented(); return false; }
//-------------------------------------------
static Register as_reg(LIR_Opr op) {
return op->is_double_cpu() ? op->as_register_lo() : op->as_register();
}
static jlong as_long(LIR_Opr data) {
jlong result;
switch (data->type()) {
case T_INT:
result = (data->as_jint());
break;
case T_LONG:
result = (data->as_jlong());
break;
default:
ShouldNotReachHere();
result = 0; // unreachable
}
return result;
}
Address LIR_Assembler::as_Address(LIR_Address* addr, Register tmp) {
Register base = addr->base()->as_pointer_register();
LIR_Opr opr = addr->index();
if (opr->is_cpu_register()) {
Register index;
if (opr->is_single_cpu())
index = opr->as_register();
else
index = opr->as_register_lo();
assert(addr->disp() == 0, "must be");
switch(opr->type()) {
case T_INT:
return Address(base, index, Address::sxtw(addr->scale()));
case T_LONG:
return Address(base, index, Address::lsl(addr->scale()));
default:
ShouldNotReachHere();
}
} else {
intptr_t addr_offset = intptr_t(addr->disp());
if (Address::offset_ok_for_immed(addr_offset, addr->scale()))
return Address(base, addr_offset, Address::lsl(addr->scale()));
else {
__ mov(tmp, addr_offset);
return Address(base, tmp, Address::lsl(addr->scale()));
}
}
return Address();
}
Address LIR_Assembler::as_Address_hi(LIR_Address* addr) {
ShouldNotReachHere();
return Address();
}
Address LIR_Assembler::as_Address(LIR_Address* addr) {
return as_Address(addr, rscratch1);
}
Address LIR_Assembler::as_Address_lo(LIR_Address* addr) {
return as_Address(addr, rscratch1); // Ouch
// FIXME: This needs to be much more clever. See x86.
}
void LIR_Assembler::osr_entry() {
offsets()->set_value(CodeOffsets::OSR_Entry, code_offset());
BlockBegin* osr_entry = compilation()->hir()->osr_entry();
ValueStack* entry_state = osr_entry->state();
int number_of_locks = entry_state->locks_size();
// we jump here if osr happens with the interpreter
// state set up to continue at the beginning of the
// loop that triggered osr - in particular, we have
// the following registers setup:
//
// r2: osr buffer
//
// build frame
ciMethod* m = compilation()->method();
__ build_frame(initial_frame_size_in_bytes(), bang_size_in_bytes(), needs_stack_repair(), NULL);
// OSR buffer is
//
// locals[nlocals-1..0]
// monitors[0..number_of_locks]
//
// locals is a direct copy of the interpreter frame so in the osr buffer
// so first slot in the local array is the last local from the interpreter
// and last slot is local[0] (receiver) from the interpreter
//
// Similarly with locks. The first lock slot in the osr buffer is the nth lock
// from the interpreter frame, the nth lock slot in the osr buffer is 0th lock
// in the interpreter frame (the method lock if a sync method)
// Initialize monitors in the compiled activation.
// r2: pointer to osr buffer
//
// All other registers are dead at this point and the locals will be
// copied into place by code emitted in the IR.
Register OSR_buf = osrBufferPointer()->as_pointer_register();
{ assert(frame::interpreter_frame_monitor_size() == BasicObjectLock::size(), "adjust code below");
int monitor_offset = BytesPerWord * method()->max_locals() +
(2 * BytesPerWord) * (number_of_locks - 1);
// SharedRuntime::OSR_migration_begin() packs BasicObjectLocks in
// the OSR buffer using 2 word entries: first the lock and then
// the oop.
for (int i = 0; i < number_of_locks; i++) {
int slot_offset = monitor_offset - ((i * 2) * BytesPerWord);
#ifdef ASSERT
// verify the interpreter's monitor has a non-null object
{
Label L;
__ ldr(rscratch1, Address(OSR_buf, slot_offset + 1*BytesPerWord));
__ cbnz(rscratch1, L);
__ stop("locked object is NULL");
__ bind(L);
}
#endif
__ ldr(r19, Address(OSR_buf, slot_offset + 0));
__ str(r19, frame_map()->address_for_monitor_lock(i));
__ ldr(r19, Address(OSR_buf, slot_offset + 1*BytesPerWord));
__ str(r19, frame_map()->address_for_monitor_object(i));
}
}
}
// inline cache check; done before the frame is built.
int LIR_Assembler::check_icache() {
Register receiver = FrameMap::receiver_opr->as_register();
Register ic_klass = IC_Klass;
int start_offset = __ offset();
__ inline_cache_check(receiver, ic_klass);
// if icache check fails, then jump to runtime routine
// Note: RECEIVER must still contain the receiver!
Label dont;
__ br(Assembler::EQ, dont);
__ far_jump(RuntimeAddress(SharedRuntime::get_ic_miss_stub()));
// We align the verified entry point unless the method body
// (including its inline cache check) will fit in a single 64-byte
// icache line.
if (! method()->is_accessor() || __ offset() - start_offset > 4 * 4) {
// force alignment after the cache check.
__ align(CodeEntryAlignment);
}
__ bind(dont);
return start_offset;
}
void LIR_Assembler::clinit_barrier(ciMethod* method) {
assert(VM_Version::supports_fast_class_init_checks(), "sanity");
assert(!method->holder()->is_not_initialized(), "initialization should have been started");
Label L_skip_barrier;
__ mov_metadata(rscratch2, method->holder()->constant_encoding());
__ clinit_barrier(rscratch2, rscratch1, &L_skip_barrier /*L_fast_path*/);
__ far_jump(RuntimeAddress(SharedRuntime::get_handle_wrong_method_stub()));
__ bind(L_skip_barrier);
}
void LIR_Assembler::jobject2reg(jobject o, Register reg) {
if (o == NULL) {
__ mov(reg, zr);
} else {
__ movoop(reg, o, /*immediate*/true);
}
}
void LIR_Assembler::deoptimize_trap(CodeEmitInfo *info) {
address target = NULL;
relocInfo::relocType reloc_type = relocInfo::none;
switch (patching_id(info)) {
case PatchingStub::access_field_id:
target = Runtime1::entry_for(Runtime1::access_field_patching_id);
reloc_type = relocInfo::section_word_type;
break;
case PatchingStub::load_klass_id:
target = Runtime1::entry_for(Runtime1::load_klass_patching_id);
reloc_type = relocInfo::metadata_type;
break;
case PatchingStub::load_mirror_id:
target = Runtime1::entry_for(Runtime1::load_mirror_patching_id);
reloc_type = relocInfo::oop_type;
break;
case PatchingStub::load_appendix_id:
target = Runtime1::entry_for(Runtime1::load_appendix_patching_id);
reloc_type = relocInfo::oop_type;
break;
default: ShouldNotReachHere();
}
__ far_call(RuntimeAddress(target));
add_call_info_here(info);
}
void LIR_Assembler::jobject2reg_with_patching(Register reg, CodeEmitInfo *info) {
deoptimize_trap(info);
}
// This specifies the rsp decrement needed to build the frame
int LIR_Assembler::initial_frame_size_in_bytes() const {
// if rounding, must let FrameMap know!
// The frame_map records size in slots (32bit word)
// subtract two words to account for return address and link
return (frame_map()->framesize() - (2*VMRegImpl::slots_per_word)) * VMRegImpl::stack_slot_size;
}
int LIR_Assembler::emit_exception_handler() {
// if the last instruction is a call (typically to do a throw which
// is coming at the end after block reordering) the return address
// must still point into the code area in order to avoid assertion
// failures when searching for the corresponding bci => add a nop
// (was bug 5/14/1999 - gri)
__ nop();
// generate code for exception handler
address handler_base = __ start_a_stub(exception_handler_size());
if (handler_base == NULL) {
// not enough space left for the handler
bailout("exception handler overflow");
return -1;
}
int offset = code_offset();
// the exception oop and pc are in r0, and r3
// no other registers need to be preserved, so invalidate them
__ invalidate_registers(false, true, true, false, true, true);
// check that there is really an exception
__ verify_not_null_oop(r0);
// search an exception handler (r0: exception oop, r3: throwing pc)
__ far_call(RuntimeAddress(Runtime1::entry_for(Runtime1::handle_exception_from_callee_id))); __ should_not_reach_here();
guarantee(code_offset() - offset <= exception_handler_size(), "overflow");
__ end_a_stub();
return offset;
}
// Emit the code to remove the frame from the stack in the exception
// unwind path.
int LIR_Assembler::emit_unwind_handler() {
#ifndef PRODUCT
if (CommentedAssembly) {
_masm->block_comment("Unwind handler");
}
#endif
int offset = code_offset();
// Fetch the exception from TLS and clear out exception related thread state
__ ldr(r0, Address(rthread, JavaThread::exception_oop_offset()));
__ str(zr, Address(rthread, JavaThread::exception_oop_offset()));
__ str(zr, Address(rthread, JavaThread::exception_pc_offset()));
__ bind(_unwind_handler_entry);
__ verify_not_null_oop(r0);
if (method()->is_synchronized() || compilation()->env()->dtrace_method_probes()) {
__ mov(r19, r0); // Preserve the exception
}
// Preform needed unlocking
MonitorExitStub* stub = NULL;
if (method()->is_synchronized()) {
monitor_address(0, FrameMap::r0_opr);
stub = new MonitorExitStub(FrameMap::r0_opr, true, 0);
__ unlock_object(r5, r4, r0, *stub->entry());
__ bind(*stub->continuation());
}
if (compilation()->env()->dtrace_method_probes()) {
__ mov(c_rarg0, rthread);
__ mov_metadata(c_rarg1, method()->constant_encoding());
__ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), c_rarg0, c_rarg1);
}
if (method()->is_synchronized() || compilation()->env()->dtrace_method_probes()) {
__ mov(r0, r19); // Restore the exception
}
// remove the activation and dispatch to the unwind handler
__ block_comment("remove_frame and dispatch to the unwind handler");
__ remove_frame(initial_frame_size_in_bytes(), needs_stack_repair());
__ far_jump(RuntimeAddress(Runtime1::entry_for(Runtime1::unwind_exception_id)));
// Emit the slow path assembly
if (stub != NULL) {
stub->emit_code(this);
}
return offset;
}
int LIR_Assembler::emit_deopt_handler() {
// if the last instruction is a call (typically to do a throw which
// is coming at the end after block reordering) the return address
// must still point into the code area in order to avoid assertion
// failures when searching for the corresponding bci => add a nop
// (was bug 5/14/1999 - gri)
__ nop();
// generate code for exception handler
address handler_base = __ start_a_stub(deopt_handler_size());
if (handler_base == NULL) {
// not enough space left for the handler
bailout("deopt handler overflow");
return -1;
}
int offset = code_offset();
__ adr(lr, pc());
__ far_jump(RuntimeAddress(SharedRuntime::deopt_blob()->unpack()));
guarantee(code_offset() - offset <= deopt_handler_size(), "overflow");
__ end_a_stub();
return offset;
}
void LIR_Assembler::add_debug_info_for_branch(address adr, CodeEmitInfo* info) {
_masm->code_section()->relocate(adr, relocInfo::poll_type);
int pc_offset = code_offset();
flush_debug_info(pc_offset);
info->record_debug_info(compilation()->debug_info_recorder(), pc_offset);
if (info->exception_handlers() != NULL) {
compilation()->add_exception_handlers_for_pco(pc_offset, info->exception_handlers());
}
}
void LIR_Assembler::return_op(LIR_Opr result) {
assert(result->is_illegal() || !result->is_single_cpu() || result->as_register() == r0, "word returns are in r0,");
ciMethod* method = compilation()->method();
ciType* return_type = method->return_type();
if (InlineTypeReturnedAsFields && return_type->is_valuetype()) {
ciValueKlass* vk = return_type->as_value_klass();
if (vk->can_be_returned_as_fields()) {
address unpack_handler = vk->unpack_handler();
assert(unpack_handler != NULL, "must be");
__ far_call(RuntimeAddress(unpack_handler));
// At this point, rax points to the value object (for interpreter or C1 caller).
// The fields of the object are copied into registers (for C2 caller).
}
}
// Pop the stack before the safepoint code
__ remove_frame(initial_frame_size_in_bytes(), needs_stack_repair());
if (StackReservedPages > 0 && compilation()->has_reserved_stack_access()) {
__ reserved_stack_check();
}
__ fetch_and_read_polling_page(rscratch1, relocInfo::poll_return_type);
__ ret(lr);
}
int LIR_Assembler::store_value_type_fields_to_buf(ciValueKlass* vk) {
return (__ store_value_type_fields_to_buf(vk, false));
}
int LIR_Assembler::safepoint_poll(LIR_Opr tmp, CodeEmitInfo* info) {
guarantee(info != NULL, "Shouldn't be NULL");
__ get_polling_page(rscratch1, relocInfo::poll_type);
add_debug_info_for_branch(info); // This isn't just debug info:
// it's the oop map
__ read_polling_page(rscratch1, relocInfo::poll_type);
return __ offset();
}
void LIR_Assembler::move_regs(Register from_reg, Register to_reg) {
if (from_reg == r31_sp)
from_reg = sp;
if (to_reg == r31_sp)
to_reg = sp;
__ mov(to_reg, from_reg);
}
void LIR_Assembler::swap_reg(Register a, Register b) { Unimplemented(); }
void LIR_Assembler::const2reg(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_code, CodeEmitInfo* info) {
assert(src->is_constant(), "should not call otherwise");
assert(dest->is_register(), "should not call otherwise");
LIR_Const* c = src->as_constant_ptr();
switch (c->type()) {
case T_INT: {
assert(patch_code == lir_patch_none, "no patching handled here");
__ movw(dest->as_register(), c->as_jint());
break;
}
case T_ADDRESS: {
assert(patch_code == lir_patch_none, "no patching handled here");
__ mov(dest->as_register(), c->as_jint());
break;
}
case T_LONG: {
assert(patch_code == lir_patch_none, "no patching handled here");
__ mov(dest->as_register_lo(), (intptr_t)c->as_jlong());
break;
}
case T_INLINE_TYPE:
case T_OBJECT: {
if (patch_code != lir_patch_none) {
jobject2reg_with_patching(dest->as_register(), info);
} else {
jobject2reg(c->as_jobject(), dest->as_register());
}
break;
}
case T_METADATA: {
if (patch_code != lir_patch_none) {
klass2reg_with_patching(dest->as_register(), info);
} else {
__ mov_metadata(dest->as_register(), c->as_metadata());
}
break;
}
case T_FLOAT: {
if (__ operand_valid_for_float_immediate(c->as_jfloat())) {
__ fmovs(dest->as_float_reg(), (c->as_jfloat()));
} else {
__ adr(rscratch1, InternalAddress(float_constant(c->as_jfloat())));
__ ldrs(dest->as_float_reg(), Address(rscratch1));
}
break;
}
case T_DOUBLE: {
if (__ operand_valid_for_float_immediate(c->as_jdouble())) {
__ fmovd(dest->as_double_reg(), (c->as_jdouble()));
} else {
__ adr(rscratch1, InternalAddress(double_constant(c->as_jdouble())));
__ ldrd(dest->as_double_reg(), Address(rscratch1));
}
break;
}
default:
ShouldNotReachHere();
}
}
void LIR_Assembler::const2stack(LIR_Opr src, LIR_Opr dest) {
LIR_Const* c = src->as_constant_ptr();
switch (c->type()) {
case T_INLINE_TYPE:
case T_OBJECT:
{
if (! c->as_jobject())
__ str(zr, frame_map()->address_for_slot(dest->single_stack_ix()));
else {
const2reg(src, FrameMap::rscratch1_opr, lir_patch_none, NULL);
reg2stack(FrameMap::rscratch1_opr, dest, c->type(), false);
}
}
break;
case T_ADDRESS:
{
const2reg(src, FrameMap::rscratch1_opr, lir_patch_none, NULL);
reg2stack(FrameMap::rscratch1_opr, dest, c->type(), false);
}
case T_INT:
case T_FLOAT:
{
Register reg = zr;
if (c->as_jint_bits() == 0)
__ strw(zr, frame_map()->address_for_slot(dest->single_stack_ix()));
else {
__ movw(rscratch1, c->as_jint_bits());
__ strw(rscratch1, frame_map()->address_for_slot(dest->single_stack_ix()));
}
}
break;
case T_LONG:
case T_DOUBLE:
{
Register reg = zr;
if (c->as_jlong_bits() == 0)
__ str(zr, frame_map()->address_for_slot(dest->double_stack_ix(),
lo_word_offset_in_bytes));
else {
__ mov(rscratch1, (intptr_t)c->as_jlong_bits());
__ str(rscratch1, frame_map()->address_for_slot(dest->double_stack_ix(),
lo_word_offset_in_bytes));
}
}
break;
default:
ShouldNotReachHere();
}
}
void LIR_Assembler::const2mem(LIR_Opr src, LIR_Opr dest, BasicType type, CodeEmitInfo* info, bool wide) {
assert(src->is_constant(), "should not call otherwise");
LIR_Const* c = src->as_constant_ptr();
LIR_Address* to_addr = dest->as_address_ptr();
void (Assembler::* insn)(Register Rt, const Address &adr);
switch (type) {
case T_ADDRESS:
assert(c->as_jint() == 0, "should be");
insn = &Assembler::str;
break;
case T_LONG:
assert(c->as_jlong() == 0, "should be");
insn = &Assembler::str;
break;
case T_INT:
assert(c->as_jint() == 0, "should be");
insn = &Assembler::strw;
break;
case T_INLINE_TYPE:
case T_OBJECT:
case T_ARRAY:
// Non-null case is not handled on aarch64 but handled on x86
// FIXME: do we need to add it here?
assert(c->as_jobject() == 0, "should be");
if (UseCompressedOops && !wide) {
insn = &Assembler::strw;
} else {
insn = &Assembler::str;
}
break;
case T_CHAR:
case T_SHORT:
assert(c->as_jint() == 0, "should be");
insn = &Assembler::strh;
break;
case T_BOOLEAN:
case T_BYTE:
assert(c->as_jint() == 0, "should be");
insn = &Assembler::strb;
break;
default:
ShouldNotReachHere();
insn = &Assembler::str; // unreachable
}
if (info) add_debug_info_for_null_check_here(info);
(_masm->*insn)(zr, as_Address(to_addr, rscratch1));
}
void LIR_Assembler::reg2reg(LIR_Opr src, LIR_Opr dest) {
assert(src->is_register(), "should not call otherwise");
assert(dest->is_register(), "should not call otherwise");
// move between cpu-registers
if (dest->is_single_cpu()) {
if (src->type() == T_LONG) {
// Can do LONG -> OBJECT
move_regs(src->as_register_lo(), dest->as_register());
return;
}
assert(src->is_single_cpu(), "must match");
if (src->type() == T_OBJECT || src->type() == T_INLINE_TYPE) {
__ verify_oop(src->as_register());
}
move_regs(src->as_register(), dest->as_register());
} else if (dest->is_double_cpu()) {
if (is_reference_type(src->type())) {
// Surprising to me but we can see move of a long to t_object
__ verify_oop(src->as_register());
move_regs(src->as_register(), dest->as_register_lo());
return;
}
assert(src->is_double_cpu(), "must match");
Register f_lo = src->as_register_lo();
Register f_hi = src->as_register_hi();
Register t_lo = dest->as_register_lo();
Register t_hi = dest->as_register_hi();
assert(f_hi == f_lo, "must be same");
assert(t_hi == t_lo, "must be same");
move_regs(f_lo, t_lo);
} else if (dest->is_single_fpu()) {
__ fmovs(dest->as_float_reg(), src->as_float_reg());
} else if (dest->is_double_fpu()) {
__ fmovd(dest->as_double_reg(), src->as_double_reg());
} else {
ShouldNotReachHere();
}
}
void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type, bool pop_fpu_stack) {
if (src->is_single_cpu()) {
if (is_reference_type(type)) {
__ str(src->as_register(), frame_map()->address_for_slot(dest->single_stack_ix()));
__ verify_oop(src->as_register());
} else if (type == T_METADATA || type == T_DOUBLE || type == T_ADDRESS) {
__ str(src->as_register(), frame_map()->address_for_slot(dest->single_stack_ix()));
} else {
__ strw(src->as_register(), frame_map()->address_for_slot(dest->single_stack_ix()));
}
} else if (src->is_double_cpu()) {
Address dest_addr_LO = frame_map()->address_for_slot(dest->double_stack_ix(), lo_word_offset_in_bytes);
__ str(src->as_register_lo(), dest_addr_LO);
} else if (src->is_single_fpu()) {
Address dest_addr = frame_map()->address_for_slot(dest->single_stack_ix());
__ strs(src->as_float_reg(), dest_addr);
} else if (src->is_double_fpu()) {
Address dest_addr = frame_map()->address_for_slot(dest->double_stack_ix());
__ strd(src->as_double_reg(), dest_addr);
} else {
ShouldNotReachHere();
}
}
void LIR_Assembler::reg2mem(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool pop_fpu_stack, bool wide, bool /* unaligned */) {
LIR_Address* to_addr = dest->as_address_ptr();
PatchingStub* patch = NULL;
Register compressed_src = rscratch1;
if (patch_code != lir_patch_none) {
deoptimize_trap(info);
return;
}
if (is_reference_type(type)) {
__ verify_oop(src->as_register());
if (UseCompressedOops && !wide) {
__ encode_heap_oop(compressed_src, src->as_register());
} else {
compressed_src = src->as_register();
}
}
int null_check_here = code_offset();
switch (type) {
case T_FLOAT: {
__ strs(src->as_float_reg(), as_Address(to_addr));
break;
}
case T_DOUBLE: {
__ strd(src->as_double_reg(), as_Address(to_addr));
break;
}
case T_INLINE_TYPE: // fall through
case T_ARRAY: // fall through
case T_OBJECT: // fall through
if (UseCompressedOops && !wide) {
__ strw(compressed_src, as_Address(to_addr, rscratch2));
} else {
__ str(compressed_src, as_Address(to_addr));
}
break;
case T_METADATA:
// We get here to store a method pointer to the stack to pass to
// a dtrace runtime call. This can't work on 64 bit with
// compressed klass ptrs: T_METADATA can be a compressed klass
// ptr or a 64 bit method pointer.
ShouldNotReachHere();
__ str(src->as_register(), as_Address(to_addr));
break;
case T_ADDRESS:
__ str(src->as_register(), as_Address(to_addr));
break;
case T_INT:
__ strw(src->as_register(), as_Address(to_addr));
break;
case T_LONG: {
__ str(src->as_register_lo(), as_Address_lo(to_addr));
break;
}
case T_BYTE: // fall through
case T_BOOLEAN: {
__ strb(src->as_register(), as_Address(to_addr));
break;
}
case T_CHAR: // fall through
case T_SHORT:
__ strh(src->as_register(), as_Address(to_addr));
break;
default:
ShouldNotReachHere();
}
if (info != NULL) {
add_debug_info_for_null_check(null_check_here, info);
}
}
void LIR_Assembler::stack2reg(LIR_Opr src, LIR_Opr dest, BasicType type) {
assert(src->is_stack(), "should not call otherwise");
assert(dest->is_register(), "should not call otherwise");
if (dest->is_single_cpu()) {
if (is_reference_type(type)) {
__ ldr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
__ verify_oop(dest->as_register());
} else if (type == T_METADATA || type == T_ADDRESS) {
__ ldr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
} else {
__ ldrw(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
}
} else if (dest->is_double_cpu()) {
Address src_addr_LO = frame_map()->address_for_slot(src->double_stack_ix(), lo_word_offset_in_bytes);
__ ldr(dest->as_register_lo(), src_addr_LO);
} else if (dest->is_single_fpu()) {
Address src_addr = frame_map()->address_for_slot(src->single_stack_ix());
__ ldrs(dest->as_float_reg(), src_addr);
} else if (dest->is_double_fpu()) {
Address src_addr = frame_map()->address_for_slot(src->double_stack_ix());
__ ldrd(dest->as_double_reg(), src_addr);
} else {
ShouldNotReachHere();
}
}
void LIR_Assembler::klass2reg_with_patching(Register reg, CodeEmitInfo* info) {
address target = NULL;
relocInfo::relocType reloc_type = relocInfo::none;
switch (patching_id(info)) {
case PatchingStub::access_field_id:
target = Runtime1::entry_for(Runtime1::access_field_patching_id);
reloc_type = relocInfo::section_word_type;
break;
case PatchingStub::load_klass_id:
target = Runtime1::entry_for(Runtime1::load_klass_patching_id);
reloc_type = relocInfo::metadata_type;
break;
case PatchingStub::load_mirror_id:
target = Runtime1::entry_for(Runtime1::load_mirror_patching_id);
reloc_type = relocInfo::oop_type;
break;
case PatchingStub::load_appendix_id:
target = Runtime1::entry_for(Runtime1::load_appendix_patching_id);
reloc_type = relocInfo::oop_type;
break;
default: ShouldNotReachHere();
}
__ far_call(RuntimeAddress(target));
add_call_info_here(info);
}
void LIR_Assembler::stack2stack(LIR_Opr src, LIR_Opr dest, BasicType type) {
LIR_Opr temp;
if (type == T_LONG || type == T_DOUBLE)
temp = FrameMap::rscratch1_long_opr;
else
temp = FrameMap::rscratch1_opr;
stack2reg(src, temp, src->type());
reg2stack(temp, dest, dest->type(), false);
}
void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool wide, bool /* unaligned */) {
LIR_Address* addr = src->as_address_ptr();
LIR_Address* from_addr = src->as_address_ptr();
if (addr->base()->type() == T_OBJECT || addr->base()->type() == T_INLINE_TYPE) {
__ verify_oop(addr->base()->as_pointer_register());
}
if (patch_code != lir_patch_none) {
deoptimize_trap(info);
return;
}
if (info != NULL) {
add_debug_info_for_null_check_here(info);
}
int null_check_here = code_offset();
switch (type) {
case T_FLOAT: {
__ ldrs(dest->as_float_reg(), as_Address(from_addr));
break;
}
case T_DOUBLE: {
__ ldrd(dest->as_double_reg(), as_Address(from_addr));
break;
}
case T_INLINE_TYPE: // fall through
case T_ARRAY: // fall through
case T_OBJECT: // fall through
if (UseCompressedOops && !wide) {
__ ldrw(dest->as_register(), as_Address(from_addr));
} else {
__ ldr(dest->as_register(), as_Address(from_addr));
}
break;
case T_METADATA:
// We get here to store a method pointer to the stack to pass to
// a dtrace runtime call. This can't work on 64 bit with
// compressed klass ptrs: T_METADATA can be a compressed klass
// ptr or a 64 bit method pointer.
ShouldNotReachHere();
__ ldr(dest->as_register(), as_Address(from_addr));
break;
case T_ADDRESS:
// FIXME: OMG this is a horrible kludge. Any offset from an
// address that matches klass_offset_in_bytes() will be loaded
// as a word, not a long.
if (UseCompressedClassPointers && addr->disp() == oopDesc::klass_offset_in_bytes()) {
__ ldrw(dest->as_register(), as_Address(from_addr));
} else {
__ ldr(dest->as_register(), as_Address(from_addr));
}
break;
case T_INT:
__ ldrw(dest->as_register(), as_Address(from_addr));
break;
case T_LONG: {
__ ldr(dest->as_register_lo(), as_Address_lo(from_addr));
break;
}
case T_BYTE:
__ ldrsb(dest->as_register(), as_Address(from_addr));
break;
case T_BOOLEAN: {
__ ldrb(dest->as_register(), as_Address(from_addr));
break;
}
case T_CHAR:
__ ldrh(dest->as_register(), as_Address(from_addr));
break;
case T_SHORT:
__ ldrsh(dest->as_register(), as_Address(from_addr));
break;
default:
ShouldNotReachHere();
}
if (is_reference_type(type)) {
if (UseCompressedOops && !wide) {
__ decode_heap_oop(dest->as_register());
}
if (!UseZGC) {
// Load barrier has not yet been applied, so ZGC can't verify the oop here
__ verify_oop(dest->as_register());
}
} else if (type == T_ADDRESS && addr->disp() == oopDesc::klass_offset_in_bytes()) {
if (UseCompressedClassPointers) {
__ andr(dest->as_register(), dest->as_register(), oopDesc::compressed_klass_mask());
__ decode_klass_not_null(dest->as_register());
} else {
__ ubfm(dest->as_register(), dest->as_register(), 0, 63 - oopDesc::storage_props_nof_bits);
}
}
}
void LIR_Assembler::move(LIR_Opr src, LIR_Opr dst) {
assert(dst->is_cpu_register(), "must be");
assert(dst->type() == src->type(), "must be");
if (src->is_cpu_register()) {
reg2reg(src, dst);
} else if (src->is_stack()) {
stack2reg(src, dst, dst->type());
} else if (src->is_constant()) {
const2reg(src, dst, lir_patch_none, NULL);
} else {
ShouldNotReachHere();
}
}
int LIR_Assembler::array_element_size(BasicType type) const {
int elem_size = type2aelembytes(type);
return exact_log2(elem_size);
}
void LIR_Assembler::emit_op3(LIR_Op3* op) {
switch (op->code()) {
case lir_idiv:
case lir_irem:
arithmetic_idiv(op->code(),
op->in_opr1(),
op->in_opr2(),
op->in_opr3(),
op->result_opr(),
op->info());
break;
case lir_fmad:
__ fmaddd(op->result_opr()->as_double_reg(),
op->in_opr1()->as_double_reg(),
op->in_opr2()->as_double_reg(),
op->in_opr3()->as_double_reg());
break;
case lir_fmaf:
__ fmadds(op->result_opr()->as_float_reg(),
op->in_opr1()->as_float_reg(),
op->in_opr2()->as_float_reg(),
op->in_opr3()->as_float_reg());
break;
default: ShouldNotReachHere(); break;
}
}
void LIR_Assembler::emit_opBranch(LIR_OpBranch* op) {
#ifdef ASSERT
assert(op->block() == NULL || op->block()->label() == op->label(), "wrong label");
if (op->block() != NULL) _branch_target_blocks.append(op->block());
if (op->ublock() != NULL) _branch_target_blocks.append(op->ublock());
#endif
if (op->cond() == lir_cond_always) {
if (op->info() != NULL) add_debug_info_for_branch(op->info());
__ b(*(op->label()));
} else {
Assembler::Condition acond;
if (op->code() == lir_cond_float_branch) {
bool is_unordered = (op->ublock() == op->block());
// Assembler::EQ does not permit unordered branches, so we add
// another branch here. Likewise, Assembler::NE does not permit
// ordered branches.
if ((is_unordered && op->cond() == lir_cond_equal)
|| (!is_unordered && op->cond() == lir_cond_notEqual))
__ br(Assembler::VS, *(op->ublock()->label()));
switch(op->cond()) {
case lir_cond_equal: acond = Assembler::EQ; break;
case lir_cond_notEqual: acond = Assembler::NE; break;
case lir_cond_less: acond = (is_unordered ? Assembler::LT : Assembler::LO); break;
case lir_cond_lessEqual: acond = (is_unordered ? Assembler::LE : Assembler::LS); break;
case lir_cond_greaterEqual: acond = (is_unordered ? Assembler::HS : Assembler::GE); break;
case lir_cond_greater: acond = (is_unordered ? Assembler::HI : Assembler::GT); break;
default: ShouldNotReachHere();
acond = Assembler::EQ; // unreachable
}
} else {
switch (op->cond()) {
case lir_cond_equal: acond = Assembler::EQ; break;
case lir_cond_notEqual: acond = Assembler::NE; break;
case lir_cond_less: acond = Assembler::LT; break;
case lir_cond_lessEqual: acond = Assembler::LE; break;
case lir_cond_greaterEqual: acond = Assembler::GE; break;
case lir_cond_greater: acond = Assembler::GT; break;
case lir_cond_belowEqual: acond = Assembler::LS; break;
case lir_cond_aboveEqual: acond = Assembler::HS; break;
default: ShouldNotReachHere();
acond = Assembler::EQ; // unreachable
}
}
__ br(acond,*(op->label()));
}
}
void LIR_Assembler::emit_opConvert(LIR_OpConvert* op) {
LIR_Opr src = op->in_opr();
LIR_Opr dest = op->result_opr();
switch (op->bytecode()) {
case Bytecodes::_i2f:
{
__ scvtfws(dest->as_float_reg(), src->as_register());
break;
}
case Bytecodes::_i2d:
{
__ scvtfwd(dest->as_double_reg(), src->as_register());
break;
}
case Bytecodes::_l2d:
{
__ scvtfd(dest->as_double_reg(), src->as_register_lo());
break;
}
case Bytecodes::_l2f:
{
__ scvtfs(dest->as_float_reg(), src->as_register_lo());
break;
}
case Bytecodes::_f2d:
{
__ fcvts(dest->as_double_reg(), src->as_float_reg());
break;
}
case Bytecodes::_d2f:
{
__ fcvtd(dest->as_float_reg(), src->as_double_reg());
break;
}
case Bytecodes::_i2c:
{
__ ubfx(dest->as_register(), src->as_register(), 0, 16);
break;
}
case Bytecodes::_i2l:
{
__ sxtw(dest->as_register_lo(), src->as_register());
break;
}
case Bytecodes::_i2s:
{
__ sxth(dest->as_register(), src->as_register());
break;
}
case Bytecodes::_i2b:
{
__ sxtb(dest->as_register(), src->as_register());
break;
}
case Bytecodes::_l2i:
{
_masm->block_comment("FIXME: This could be a no-op");
__ uxtw(dest->as_register(), src->as_register_lo());
break;
}
case Bytecodes::_d2l:
{
__ fcvtzd(dest->as_register_lo(), src->as_double_reg());
break;
}
case Bytecodes::_f2i:
{
__ fcvtzsw(dest->as_register(), src->as_float_reg());
break;
}
case Bytecodes::_f2l:
{
__ fcvtzs(dest->as_register_lo(), src->as_float_reg());
break;
}
case Bytecodes::_d2i:
{
__ fcvtzdw(dest->as_register(), src->as_double_reg());
break;
}
default: ShouldNotReachHere();
}
}
void LIR_Assembler::emit_alloc_obj(LIR_OpAllocObj* op) {
if (op->init_check()) {
__ ldrb(rscratch1, Address(op->klass()->as_register(),
InstanceKlass::init_state_offset()));
__ cmpw(rscratch1, InstanceKlass::fully_initialized);
add_debug_info_for_null_check_here(op->stub()->info());
__ br(Assembler::NE, *op->stub()->entry());
}
__ allocate_object(op->obj()->as_register(),
op->tmp1()->as_register(),
op->tmp2()->as_register(),
op->header_size(),
op->object_size(),
op->klass()->as_register(),
*op->stub()->entry());
__ bind(*op->stub()->continuation());
}
void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
Register len = op->len()->as_register();
__ uxtw(len, len);
if (UseSlowPath || op->type() == T_INLINE_TYPE ||
(!UseFastNewObjectArray && is_reference_type(op->type())) ||
(!UseFastNewTypeArray && !is_reference_type(op->type()))) {
__ b(*op->stub()->entry());
} else {
Register tmp1 = op->tmp1()->as_register();
Register tmp2 = op->tmp2()->as_register();
Register tmp3 = op->tmp3()->as_register();
if (len == tmp1) {
tmp1 = tmp3;
} else if (len == tmp2) {
tmp2 = tmp3;
} else if (len == tmp3) {
// everything is ok
} else {
__ mov(tmp3, len);
}
__ allocate_array(op->obj()->as_register(),
len,
tmp1,
tmp2,
arrayOopDesc::header_size(op->type()),
array_element_size(op->type()),
op->klass()->as_register(),
*op->stub()->entry());
}
__ bind(*op->stub()->continuation());
}
void LIR_Assembler::type_profile_helper(Register mdo,
ciMethodData *md, ciProfileData *data,
Register recv, Label* update_done) {
for (uint i = 0; i < ReceiverTypeData::row_limit(); i++) {
Label next_test;
// See if the receiver is receiver[n].
__ lea(rscratch2, Address(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i))));
__ ldr(rscratch1, Address(rscratch2));
__ cmp(recv, rscratch1);
__ br(Assembler::NE, next_test);
Address data_addr(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_count_offset(i)));
__ addptr(data_addr, DataLayout::counter_increment);
__ b(*update_done);
__ bind(next_test);
}
// Didn't find receiver; find next empty slot and fill it in
for (uint i = 0; i < ReceiverTypeData::row_limit(); i++) {
Label next_test;
__ lea(rscratch2,
Address(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i))));
Address recv_addr(rscratch2);
__ ldr(rscratch1, recv_addr);
__ cbnz(rscratch1, next_test);
__ str(recv, recv_addr);
__ mov(rscratch1, DataLayout::counter_increment);
__ lea(rscratch2, Address(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_count_offset(i))));
__ str(rscratch1, Address(rscratch2));
__ b(*update_done);
__ bind(next_test);
}
}
void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, Label* failure, Label* obj_is_null) {
// we always need a stub for the failure case.
CodeStub* stub = op->stub();
Register obj = op->object()->as_register();
Register k_RInfo = op->tmp1()->as_register();
Register klass_RInfo = op->tmp2()->as_register();
Register dst = op->result_opr()->as_register();
ciKlass* k = op->klass();
Register Rtmp1 = noreg;
// check if it needs to be profiled
ciMethodData* md;
ciProfileData* data;
const bool should_profile = op->should_profile();
if (should_profile) {
ciMethod* method = op->profiled_method();
assert(method != NULL, "Should have method");
int bci = op->profiled_bci();
md = method->method_data_or_null();
assert(md != NULL, "Sanity");
data = md->bci_to_data(bci);
assert(data != NULL, "need data for type check");
assert(data->is_ReceiverTypeData(), "need ReceiverTypeData for type check");
}
Label profile_cast_success, profile_cast_failure;
Label *success_target = should_profile ? &profile_cast_success : success;
Label *failure_target = should_profile ? &profile_cast_failure : failure;
if (obj == k_RInfo) {
k_RInfo = dst;
} else if (obj == klass_RInfo) {
klass_RInfo = dst;
}
if (k->is_loaded() && !UseCompressedClassPointers) {
select_different_registers(obj, dst, k_RInfo, klass_RInfo);
} else {
Rtmp1 = op->tmp3()->as_register();
select_different_registers(obj, dst, k_RInfo, klass_RInfo, Rtmp1);
}
assert_different_registers(obj, k_RInfo, klass_RInfo);
if (should_profile) {
Label not_null;
__ cbnz(obj, not_null);
// Object is null; update MDO and exit
Register mdo = klass_RInfo;
__ mov_metadata(mdo, md->constant_encoding());
Address data_addr
= __ form_address(rscratch2, mdo,
md->byte_offset_of_slot(data, DataLayout::flags_offset()),
0);
__ ldrb(rscratch1, data_addr);
__ orr(rscratch1, rscratch1, BitData::null_seen_byte_constant());
__ strb(rscratch1, data_addr);
__ b(*obj_is_null);
__ bind(not_null);
} else {
__ cbz(obj, *obj_is_null);
}
if (!k->is_loaded()) {
klass2reg_with_patching(k_RInfo, op->info_for_patch());
} else {
__ mov_metadata(k_RInfo, k->constant_encoding());
}
__ verify_oop(obj);
if (op->fast_check()) {
// get object class
// not a safepoint as obj null check happens earlier
__ load_klass(rscratch1, obj);
__ cmp( rscratch1, k_RInfo);
__ br(Assembler::NE, *failure_target);
// successful cast, fall through to profile or jump
} else {
// get object class
// not a safepoint as obj null check happens earlier
__ load_klass(klass_RInfo, obj);
if (k->is_loaded()) {
// See if we get an immediate positive hit
__ ldr(rscratch1, Address(klass_RInfo, long(k->super_check_offset())));
__ cmp(k_RInfo, rscratch1);
if ((juint)in_bytes(Klass::secondary_super_cache_offset()) != k->super_check_offset()) {
__ br(Assembler::NE, *failure_target);
// successful cast, fall through to profile or jump
} else {
// See if we get an immediate positive hit
__ br(Assembler::EQ, *success_target);
// check for self
__ cmp(klass_RInfo, k_RInfo);
__ br(Assembler::EQ, *success_target);
__ stp(klass_RInfo, k_RInfo, Address(__ pre(sp, -2 * wordSize)));
__ far_call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id)));
__ ldr(klass_RInfo, Address(__ post(sp, 2 * wordSize)));
// result is a boolean
__ cbzw(klass_RInfo, *failure_target);
// successful cast, fall through to profile or jump
}
} else {
// perform the fast part of the checking logic
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, success_target, failure_target, NULL);
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
__ stp(klass_RInfo, k_RInfo, Address(__ pre(sp, -2 * wordSize)));
__ far_call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id)));
__ ldp(k_RInfo, klass_RInfo, Address(__ post(sp, 2 * wordSize)));
// result is a boolean
__ cbz(k_RInfo, *failure_target);
// successful cast, fall through to profile or jump
}
}
if (should_profile) {
Register mdo = klass_RInfo, recv = k_RInfo;
__ bind(profile_cast_success);
__ mov_metadata(mdo, md->constant_encoding());
__ load_klass(recv, obj);
Label update_done;
type_profile_helper(mdo, md, data, recv, success);
__ b(*success);
__ bind(profile_cast_failure);
__ mov_metadata(mdo, md->constant_encoding());
Address counter_addr
= __ form_address(rscratch2, mdo,
md->byte_offset_of_slot(data, CounterData::count_offset()),
0);
__ ldr(rscratch1, counter_addr);
__ sub(rscratch1, rscratch1, DataLayout::counter_increment);
__ str(rscratch1, counter_addr);
__ b(*failure);
}
__ b(*success);
}
void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
const bool should_profile = op->should_profile();
LIR_Code code = op->code();
if (code == lir_store_check) {
Register value = op->object()->as_register();
Register array = op->array()->as_register();
Register k_RInfo = op->tmp1()->as_register();
Register klass_RInfo = op->tmp2()->as_register();
Register Rtmp1 = op->tmp3()->as_register();
CodeStub* stub = op->stub();
// check if it needs to be profiled
ciMethodData* md;
ciProfileData* data;
if (should_profile) {
ciMethod* method = op->profiled_method();
assert(method != NULL, "Should have method");
int bci = op->profiled_bci();
md = method->method_data_or_null();
assert(md != NULL, "Sanity");
data = md->bci_to_data(bci);
assert(data != NULL, "need data for type check");
assert(data->is_ReceiverTypeData(), "need ReceiverTypeData for type check");
}
Label profile_cast_success, profile_cast_failure, done;
Label *success_target = should_profile ? &profile_cast_success : &done;
Label *failure_target = should_profile ? &profile_cast_failure : stub->entry();
if (should_profile) {
Label not_null;
__ cbnz(value, not_null);
// Object is null; update MDO and exit
Register mdo = klass_RInfo;
__ mov_metadata(mdo, md->constant_encoding());
Address data_addr
= __ form_address(rscratch2, mdo,
md->byte_offset_of_slot(data, DataLayout::flags_offset()),
0);
__ ldrb(rscratch1, data_addr);
__ orr(rscratch1, rscratch1, BitData::null_seen_byte_constant());
__ strb(rscratch1, data_addr);
__ b(done);
__ bind(not_null);
} else {
__ cbz(value, done);
}
add_debug_info_for_null_check_here(op->info_for_exception());
__ load_klass(k_RInfo, array);
__ load_klass(klass_RInfo, value);
// get instance klass (it's already uncompressed)
__ ldr(k_RInfo, Address(k_RInfo, ObjArrayKlass::element_klass_offset()));
// perform the fast part of the checking logic
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, success_target, failure_target, NULL);
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
__ stp(klass_RInfo, k_RInfo, Address(__ pre(sp, -2 * wordSize)));
__ far_call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id)));
__ ldp(k_RInfo, klass_RInfo, Address(__ post(sp, 2 * wordSize)));
// result is a boolean
__ cbzw(k_RInfo, *failure_target);
// fall through to the success case
if (should_profile) {
Register mdo = klass_RInfo, recv = k_RInfo;
__ bind(profile_cast_success);
__ mov_metadata(mdo, md->constant_encoding());
__ load_klass(recv, value);
Label update_done;
type_profile_helper(mdo, md, data, recv, &done);
__ b(done);
__ bind(profile_cast_failure);
__ mov_metadata(mdo, md->constant_encoding());
Address counter_addr(mdo, md->byte_offset_of_slot(data, CounterData::count_offset()));
__ lea(rscratch2, counter_addr);
__ ldr(rscratch1, Address(rscratch2));
__ sub(rscratch1, rscratch1, DataLayout::counter_increment);
__ str(rscratch1, Address(rscratch2));
__ b(*stub->entry());
}
__ bind(done);
} else if (code == lir_checkcast) {
Register obj = op->object()->as_register();
Register dst = op->result_opr()->as_register();
Label success;
emit_typecheck_helper(op, &success, op->stub()->entry(), &success);
__ bind(success);
if (dst != obj) {
__ mov(dst, obj);
}
} else if (code == lir_instanceof) {
Register obj = op->object()->as_register();
Register dst = op->result_opr()->as_register();
Label success, failure, done;
emit_typecheck_helper(op, &success, &failure, &failure);
__ bind(failure);
__ mov(dst, zr);
__ b(done);
__ bind(success);
__ mov(dst, 1);
__ bind(done);
} else {
ShouldNotReachHere();
}
}
void LIR_Assembler::emit_opFlattenedArrayCheck(LIR_OpFlattenedArrayCheck* op) {
// We are loading/storing an array that *may* be a flattened array (the declared type
// Object[], interface[], or VT?[]). If this array is flattened, take slow path.
__ load_storage_props(op->tmp()->as_register(), op->array()->as_register());
__ tst(op->tmp()->as_register(), ArrayStorageProperties::flattened_value);
__ br(Assembler::NE, *op->stub()->entry());
if (!op->value()->is_illegal()) {
// We are storing into the array.
Label skip;
__ tst(op->tmp()->as_register(), ArrayStorageProperties::null_free_value);
__ br(Assembler::EQ, skip);
// The array is not flattened, but it is null_free. If we are storing
// a null, take the slow path (which will throw NPE).
__ cbz(op->value()->as_register(), *op->stub()->entry());
__ bind(skip);
}
}
void LIR_Assembler::emit_opNullFreeArrayCheck(LIR_OpNullFreeArrayCheck* op) {
// This is called when we use aastore into a an array declared as "[LVT;",
// where we know VT is not flattened (due to FlatArrayElemMaxFlatSize, etc).
// However, we need to do a NULL check if the actual array is a "[QVT;".
__ load_storage_props(op->tmp()->as_register(), op->array()->as_register());
__ mov(rscratch1, (uint64_t) ArrayStorageProperties::null_free_value);
__ cmp(op->tmp()->as_register(), rscratch1);
}
void LIR_Assembler::emit_opSubstitutabilityCheck(LIR_OpSubstitutabilityCheck* op) {
Label L_oops_equal;
Label L_oops_not_equal;
Label L_end;
Register left = op->left()->as_register();
Register right = op->right()->as_register();
__ cmp(left, right);
__ br(Assembler::EQ, L_oops_equal);
// (1) Null check -- if one of the operands is null, the other must not be null (because
// the two references are not equal), so they are not substitutable,
// FIXME: do null check only if the operand is nullable
{
__ cbz(left, L_oops_not_equal);
__ cbz(right, L_oops_not_equal);
}
ciKlass* left_klass = op->left_klass();
ciKlass* right_klass = op->right_klass();
// (2) Value object check -- if either of the operands is not a value object,
// they are not substitutable. We do this only if we are not sure that the
// operands are value objects
if ((left_klass == NULL || right_klass == NULL) ||// The klass is still unloaded, or came from a Phi node.
!left_klass->is_valuetype() || !right_klass->is_valuetype()) {
Register tmp1 = rscratch1; /* op->tmp1()->as_register(); */
Register tmp2 = rscratch2; /* op->tmp2()->as_register(); */
__ mov(tmp1, (intptr_t)markWord::always_locked_pattern);
__ ldr(tmp2, Address(left, oopDesc::mark_offset_in_bytes()));
__ andr(tmp1, tmp1, tmp2);
__ ldr(tmp2, Address(right, oopDesc::mark_offset_in_bytes()));
__ andr(tmp1, tmp1, tmp2);
__ mov(tmp2, (intptr_t)markWord::always_locked_pattern);
__ cmp(tmp1, tmp2);
__ br(Assembler::NE, L_oops_not_equal);
}
// (3) Same klass check: if the operands are of different klasses, they are not substitutable.
if (left_klass != NULL && left_klass->is_valuetype() && left_klass == right_klass) {
// No need to load klass -- the operands are statically known to be the same value klass.
__ b(*op->stub()->entry());
} else {
Register left_klass_op = op->left_klass_op()->as_register();
Register right_klass_op = op->right_klass_op()->as_register();
if (UseCompressedOops) {
__ ldrw(left_klass_op, Address(left, oopDesc::klass_offset_in_bytes()));
__ ldrw(right_klass_op, Address(right, oopDesc::klass_offset_in_bytes()));
__ cmpw(left_klass_op, right_klass_op);
} else {
__ ldr(left_klass_op, Address(left, oopDesc::klass_offset_in_bytes()));
__ ldr(right_klass_op, Address(right, oopDesc::klass_offset_in_bytes()));
__ cmp(left_klass_op, right_klass_op);
}
__ br(Assembler::EQ, *op->stub()->entry()); // same klass -> do slow check
// fall through to L_oops_not_equal
}
__ bind(L_oops_not_equal);
move(op->not_equal_result(), op->result_opr());
__ b(L_end);
__ bind(L_oops_equal);
move(op->equal_result(), op->result_opr());
__ b(L_end);
// We've returned from the stub. op->result_opr() contains 0x0 IFF the two
// operands are not substitutable. (Don't compare against 0x1 in case the
// C compiler is naughty)
__ bind(*op->stub()->continuation());
if (op->result_opr()->type() == T_LONG) {
__ cbzw(op->result_opr()->as_register(), L_oops_not_equal); // (call_stub() == 0x0) -> not_equal
} else {
__ cbz(op->result_opr()->as_register(), L_oops_not_equal); // (call_stub() == 0x0) -> not_equal
}
move(op->equal_result(), op->result_opr()); // (call_stub() != 0x0) -> equal
// fall-through
__ bind(L_end);
}
void LIR_Assembler::casw(Register addr, Register newval, Register cmpval) {
__ cmpxchg(addr, cmpval, newval, Assembler::word, /* acquire*/ true, /* release*/ true, /* weak*/ false, rscratch1);
__ cset(rscratch1, Assembler::NE);
__ membar(__ AnyAny);
}
void LIR_Assembler::casl(Register addr, Register newval, Register cmpval) {
__ cmpxchg(addr, cmpval, newval, Assembler::xword, /* acquire*/ true, /* release*/ true, /* weak*/ false, rscratch1);
__ cset(rscratch1, Assembler::NE);
__ membar(__ AnyAny);
}
void LIR_Assembler::emit_compare_and_swap(LIR_OpCompareAndSwap* op) {
assert(VM_Version::supports_cx8(), "wrong machine");
Register addr;
if (op->addr()->is_register()) {
addr = as_reg(op->addr());
} else {
assert(op->addr()->is_address(), "what else?");
LIR_Address* addr_ptr = op->addr()->as_address_ptr();
assert(addr_ptr->disp() == 0, "need 0 disp");
assert(addr_ptr->index() == LIR_OprDesc::illegalOpr(), "need 0 index");
addr = as_reg(addr_ptr->base());
}
Register newval = as_reg(op->new_value());
Register cmpval = as_reg(op->cmp_value());
if (op->code() == lir_cas_obj) {
if (UseCompressedOops) {
Register t1 = op->tmp1()->as_register();
assert(op->tmp1()->is_valid(), "must be");
__ encode_heap_oop(t1, cmpval);
cmpval = t1;
__ encode_heap_oop(rscratch2, newval);
newval = rscratch2;
casw(addr, newval, cmpval);
} else {
casl(addr, newval, cmpval);
}
} else if (op->code() == lir_cas_int) {
casw(addr, newval, cmpval);
} else {
casl(addr, newval, cmpval);
}
}
void LIR_Assembler::cmove(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, LIR_Opr result, BasicType type) {
Assembler::Condition acond, ncond;
switch (condition) {
case lir_cond_equal: acond = Assembler::EQ; ncond = Assembler::NE; break;
case lir_cond_notEqual: acond = Assembler::NE; ncond = Assembler::EQ; break;
case lir_cond_less: acond = Assembler::LT; ncond = Assembler::GE; break;
case lir_cond_lessEqual: acond = Assembler::LE; ncond = Assembler::GT; break;
case lir_cond_greaterEqual: acond = Assembler::GE; ncond = Assembler::LT; break;
case lir_cond_greater: acond = Assembler::GT; ncond = Assembler::LE; break;
case lir_cond_belowEqual:
case lir_cond_aboveEqual:
default: ShouldNotReachHere();
acond = Assembler::EQ; ncond = Assembler::NE; // unreachable
}
assert(result->is_single_cpu() || result->is_double_cpu(),
"expect single register for result");
if (opr1->is_constant() && opr2->is_constant()
&& opr1->type() == T_INT && opr2->type() == T_INT) {
jint val1 = opr1->as_jint();
jint val2 = opr2->as_jint();
if (val1 == 0 && val2 == 1) {
__ cset(result->as_register(), ncond);
return;
} else if (val1 == 1 && val2 == 0) {
__ cset(result->as_register(), acond);
return;
}
}
if (opr1->is_constant() && opr2->is_constant()
&& opr1->type() == T_LONG && opr2->type() == T_LONG) {
jlong val1 = opr1->as_jlong();
jlong val2 = opr2->as_jlong();
if (val1 == 0 && val2 == 1) {
__ cset(result->as_register_lo(), ncond);
return;
} else if (val1 == 1 && val2 == 0) {
__ cset(result->as_register_lo(), acond);
return;
}
}
if (opr1->is_stack()) {
stack2reg(opr1, FrameMap::rscratch1_opr, result->type());
opr1 = FrameMap::rscratch1_opr;
} else if (opr1->is_constant()) {
LIR_Opr tmp
= opr1->type() == T_LONG ? FrameMap::rscratch1_long_opr : FrameMap::rscratch1_opr;
const2reg(opr1, tmp, lir_patch_none, NULL);
opr1 = tmp;
}
if (opr2->is_stack()) {
stack2reg(opr2, FrameMap::rscratch2_opr, result->type());
opr2 = FrameMap::rscratch2_opr;
} else if (opr2->is_constant()) {
LIR_Opr tmp
= opr2->type() == T_LONG ? FrameMap::rscratch2_long_opr : FrameMap::rscratch2_opr;
const2reg(opr2, tmp, lir_patch_none, NULL);
opr2 = tmp;
}
if (result->type() == T_LONG)
__ csel(result->as_register_lo(), opr1->as_register_lo(), opr2->as_register_lo(), acond);
else
__ csel(result->as_register(), opr1->as_register(), opr2->as_register(), acond);
}
void LIR_Assembler::arith_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr dest, CodeEmitInfo* info, bool pop_fpu_stack) {
assert(info == NULL, "should never be used, idiv/irem and ldiv/lrem not handled by this method");
if (left->is_single_cpu()) {
Register lreg = left->as_register();
Register dreg = as_reg(dest);
if (right->is_single_cpu()) {
// cpu register - cpu register
assert(left->type() == T_INT && right->type() == T_INT && dest->type() == T_INT,
"should be");
Register rreg = right->as_register();
switch (code) {
case lir_add: __ addw (dest->as_register(), lreg, rreg); break;
case lir_sub: __ subw (dest->as_register(), lreg, rreg); break;
case lir_mul: __ mulw (dest->as_register(), lreg, rreg); break;
default: ShouldNotReachHere();
}
} else if (right->is_double_cpu()) {
Register rreg = right->as_register_lo();
// single_cpu + double_cpu: can happen with obj+long
assert(code == lir_add || code == lir_sub, "mismatched arithmetic op");
switch (code) {
case lir_add: __ add(dreg, lreg, rreg); break;
case lir_sub: __ sub(dreg, lreg, rreg); break;
default: ShouldNotReachHere();
}
} else if (right->is_constant()) {
// cpu register - constant
jlong c;
// FIXME. This is fugly: we really need to factor all this logic.
switch(right->type()) {
case T_LONG:
c = right->as_constant_ptr()->as_jlong();
break;
case T_INT:
case T_ADDRESS:
c = right->as_constant_ptr()->as_jint();
break;
default:
ShouldNotReachHere();
c = 0; // unreachable
break;
}
assert(code == lir_add || code == lir_sub, "mismatched arithmetic op");
if (c == 0 && dreg == lreg) {
COMMENT("effective nop elided");
return;
}
switch(left->type()) {
case T_INT:
switch (code) {
case lir_add: __ addw(dreg, lreg, c); break;
case lir_sub: __ subw(dreg, lreg, c); break;
default: ShouldNotReachHere();
}
break;
case T_OBJECT:
case T_ADDRESS:
switch (code) {
case lir_add: __ add(dreg, lreg, c); break;
case lir_sub: __ sub(dreg, lreg, c); break;
default: ShouldNotReachHere();
}
break;
default:
ShouldNotReachHere();
}
} else {
ShouldNotReachHere();
}
} else if (left->is_double_cpu()) {
Register lreg_lo = left->as_register_lo();
if (right->is_double_cpu()) {
// cpu register - cpu register
Register rreg_lo = right->as_register_lo();
switch (code) {
case lir_add: __ add (dest->as_register_lo(), lreg_lo, rreg_lo); break;
case lir_sub: __ sub (dest->as_register_lo(), lreg_lo, rreg_lo); break;
case lir_mul: __ mul (dest->as_register_lo(), lreg_lo, rreg_lo); break;
case lir_div: __ corrected_idivq(dest->as_register_lo(), lreg_lo, rreg_lo, false, rscratch1); break;
case lir_rem: __ corrected_idivq(dest->as_register_lo(), lreg_lo, rreg_lo, true, rscratch1); break;
default:
ShouldNotReachHere();
}
} else if (right->is_constant()) {
jlong c = right->as_constant_ptr()->as_jlong();
Register dreg = as_reg(dest);
switch (code) {
case lir_add:
case lir_sub:
if (c == 0 && dreg == lreg_lo) {
COMMENT("effective nop elided");
return;
}
code == lir_add ? __ add(dreg, lreg_lo, c) : __ sub(dreg, lreg_lo, c);
break;
case lir_div:
assert(c > 0 && is_power_of_2(c), "divisor must be power-of-2 constant");
if (c == 1) {
// move lreg_lo to dreg if divisor is 1
__ mov(dreg, lreg_lo);
} else {
unsigned int shift = exact_log2_long(c);
// use rscratch1 as intermediate result register
__ asr(rscratch1, lreg_lo, 63);
__ add(rscratch1, lreg_lo, rscratch1, Assembler::LSR, 64 - shift);
__ asr(dreg, rscratch1, shift);
}
break;
case lir_rem:
assert(c > 0 && is_power_of_2(c), "divisor must be power-of-2 constant");
if (c == 1) {
// move 0 to dreg if divisor is 1
__ mov(dreg, zr);
} else {
// use rscratch1 as intermediate result register
__ negs(rscratch1, lreg_lo);
__ andr(dreg, lreg_lo, c - 1);
__ andr(rscratch1, rscratch1, c - 1);
__ csneg(dreg, dreg, rscratch1, Assembler::MI);
}
break;
default:
ShouldNotReachHere();
}
} else {
ShouldNotReachHere();
}
} else if (left->is_single_fpu()) {
assert(right->is_single_fpu(), "right hand side of float arithmetics needs to be float register");
switch (code) {
case lir_add: __ fadds (dest->as_float_reg(), left->as_float_reg(), right->as_float_reg()); break;
case lir_sub: __ fsubs (dest->as_float_reg(), left->as_float_reg(), right->as_float_reg()); break;
case lir_mul_strictfp: // fall through
case lir_mul: __ fmuls (dest->as_float_reg(), left->as_float_reg(), right->as_float_reg()); break;
case lir_div_strictfp: // fall through
case lir_div: __ fdivs (dest->as_float_reg(), left->as_float_reg(), right->as_float_reg()); break;
default:
ShouldNotReachHere();
}
} else if (left->is_double_fpu()) {
if (right->is_double_fpu()) {
// fpu register - fpu register
switch (code) {
case lir_add: __ faddd (dest->as_double_reg(), left->as_double_reg(), right->as_double_reg()); break;
case lir_sub: __ fsubd (dest->as_double_reg(), left->as_double_reg(), right->as_double_reg()); break;
case lir_mul_strictfp: // fall through
case lir_mul: __ fmuld (dest->as_double_reg(), left->as_double_reg(), right->as_double_reg()); break;
case lir_div_strictfp: // fall through
case lir_div: __ fdivd (dest->as_double_reg(), left->as_double_reg(), right->as_double_reg()); break;
default:
ShouldNotReachHere();
}
} else {
if (right->is_constant()) {
ShouldNotReachHere();
}
ShouldNotReachHere();
}
} else if (left->is_single_stack() || left->is_address()) {
assert(left == dest, "left and dest must be equal");
ShouldNotReachHere();
} else {
ShouldNotReachHere();
}
}
void LIR_Assembler::arith_fpu_implementation(LIR_Code code, int left_index, int right_index, int dest_index, bool pop_fpu_stack) { Unimplemented(); }
void LIR_Assembler::intrinsic_op(LIR_Code code, LIR_Opr value, LIR_Opr unused, LIR_Opr dest, LIR_Op* op) {
switch(code) {
case lir_abs : __ fabsd(dest->as_double_reg(), value->as_double_reg()); break;
case lir_sqrt: __ fsqrtd(dest->as_double_reg(), value->as_double_reg()); break;
default : ShouldNotReachHere();
}
}
void LIR_Assembler::logic_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr dst) {
assert(left->is_single_cpu() || left->is_double_cpu(), "expect single or double register");
Register Rleft = left->is_single_cpu() ? left->as_register() :
left->as_register_lo();
if (dst->is_single_cpu()) {
Register Rdst = dst->as_register();
if (right->is_constant()) {
switch (code) {
case lir_logic_and: __ andw (Rdst, Rleft, right->as_jint()); break;
case lir_logic_or: __ orrw (Rdst, Rleft, right->as_jint()); break;
case lir_logic_xor: __ eorw (Rdst, Rleft, right->as_jint()); break;
default: ShouldNotReachHere(); break;
}
} else {
Register Rright = right->is_single_cpu() ? right->as_register() :
right->as_register_lo();
switch (code) {
case lir_logic_and: __ andw (Rdst, Rleft, Rright); break;
case lir_logic_or: __ orrw (Rdst, Rleft, Rright); break;
case lir_logic_xor: __ eorw (Rdst, Rleft, Rright); break;
default: ShouldNotReachHere(); break;
}
}
} else {
Register Rdst = dst->as_register_lo();
if (right->is_constant()) {
switch (code) {
case lir_logic_and: __ andr (Rdst, Rleft, right->as_jlong()); break;
case lir_logic_or: __ orr (Rdst, Rleft, right->as_jlong()); break;
case lir_logic_xor: __ eor (Rdst, Rleft, right->as_jlong()); break;
default: ShouldNotReachHere(); break;
}
} else {
Register Rright = right->is_single_cpu() ? right->as_register() :
right->as_register_lo();
switch (code) {
case lir_logic_and: __ andr (Rdst, Rleft, Rright); break;
case lir_logic_or: __ orr (Rdst, Rleft, Rright); break;
case lir_logic_xor: __ eor (Rdst, Rleft, Rright); break;
default: ShouldNotReachHere(); break;
}
}
}
}
void LIR_Assembler::arithmetic_idiv(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr illegal, LIR_Opr result, CodeEmitInfo* info) {
// opcode check
assert((code == lir_idiv) || (code == lir_irem), "opcode must be idiv or irem");
bool is_irem = (code == lir_irem);
// operand check
assert(left->is_single_cpu(), "left must be register");
assert(right->is_single_cpu() || right->is_constant(), "right must be register or constant");
assert(result->is_single_cpu(), "result must be register");
Register lreg = left->as_register();
Register dreg = result->as_register();
// power-of-2 constant check and codegen
if (right->is_constant()) {
int c = right->as_constant_ptr()->as_jint();
assert(c > 0 && is_power_of_2(c), "divisor must be power-of-2 constant");
if (is_irem) {
if (c == 1) {
// move 0 to dreg if divisor is 1
__ movw(dreg, zr);
} else {
// use rscratch1 as intermediate result register
__ negsw(rscratch1, lreg);
__ andw(dreg, lreg, c - 1);
__ andw(rscratch1, rscratch1, c - 1);
__ csnegw(dreg, dreg, rscratch1, Assembler::MI);
}
} else {
if (c == 1) {
// move lreg to dreg if divisor is 1
__ movw(dreg, lreg);
} else {
unsigned int shift = exact_log2(c);
// use rscratch1 as intermediate result register
__ asrw(rscratch1, lreg, 31);
__ addw(rscratch1, lreg, rscratch1, Assembler::LSR, 32 - shift);
__ asrw(dreg, rscratch1, shift);
}
}
} else {
Register rreg = right->as_register();
__ corrected_idivl(dreg, lreg, rreg, is_irem, rscratch1);
}
}
void LIR_Assembler::comp_op(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, LIR_Op2* op) {
if (opr1->is_constant() && opr2->is_single_cpu()) {
// tableswitch
Register reg = as_reg(opr2);
struct tableswitch &table = switches[opr1->as_constant_ptr()->as_jint()];
__ tableswitch(reg, table._first_key, table._last_key, table._branches, table._after);
} else if (opr1->is_single_cpu() || opr1->is_double_cpu()) {
Register reg1 = as_reg(opr1);
if (opr2->is_single_cpu()) {
// cpu register - cpu register
Register reg2 = opr2->as_register();
if (is_reference_type(opr1->type())) {
__ cmpoop(reg1, reg2);
} else {
assert(!is_reference_type(opr2->type()), "cmp int, oop?");
__ cmpw(reg1, reg2);
}
return;
}
if (opr2->is_double_cpu()) {
// cpu register - cpu register
Register reg2 = opr2->as_register_lo();
__ cmp(reg1, reg2);
return;
}
if (opr2->is_constant()) {
bool is_32bit = false; // width of register operand
jlong imm;
switch(opr2->type()) {
case T_INT:
imm = opr2->as_constant_ptr()->as_jint();
is_32bit = true;
break;
case T_LONG:
imm = opr2->as_constant_ptr()->as_jlong();
break;
case T_ADDRESS:
imm = opr2->as_constant_ptr()->as_jint();
break;
case T_METADATA:
imm = (intptr_t)(opr2->as_constant_ptr()->as_metadata());
break;
case T_INLINE_TYPE:
case T_OBJECT:
case T_ARRAY:
jobject2reg(opr2->as_constant_ptr()->as_jobject(), rscratch1);
__ cmpoop(reg1, rscratch1);
return;
default:
ShouldNotReachHere();
imm = 0; // unreachable
break;
}
if (Assembler::operand_valid_for_add_sub_immediate(imm)) {
if (is_32bit)
__ cmpw(reg1, imm);
else
__ subs(zr, reg1, imm);
return;
} else {
__ mov(rscratch1, imm);
if (is_32bit)
__ cmpw(reg1, rscratch1);
else
__ cmp(reg1, rscratch1);
return;
}
} else
ShouldNotReachHere();
} else if (opr1->is_single_fpu()) {
FloatRegister reg1 = opr1->as_float_reg();
assert(opr2->is_single_fpu(), "expect single float register");
FloatRegister reg2 = opr2->as_float_reg();
__ fcmps(reg1, reg2);
} else if (opr1->is_double_fpu()) {
FloatRegister reg1 = opr1->as_double_reg();
assert(opr2->is_double_fpu(), "expect double float register");
FloatRegister reg2 = opr2->as_double_reg();
__ fcmpd(reg1, reg2);
} else {
ShouldNotReachHere();
}
}
void LIR_Assembler::comp_fl2i(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr dst, LIR_Op2* op){
if (code == lir_cmp_fd2i || code == lir_ucmp_fd2i) {
bool is_unordered_less = (code == lir_ucmp_fd2i);
if (left->is_single_fpu()) {
__ float_cmp(true, is_unordered_less ? -1 : 1, left->as_float_reg(), right->as_float_reg(), dst->as_register());
} else if (left->is_double_fpu()) {
__ float_cmp(false, is_unordered_less ? -1 : 1, left->as_double_reg(), right->as_double_reg(), dst->as_register());
} else {
ShouldNotReachHere();
}
} else if (code == lir_cmp_l2i) {
Label done;
__ cmp(left->as_register_lo(), right->as_register_lo());
__ mov(dst->as_register(), (u_int64_t)-1L);
__ br(Assembler::LT, done);
__ csinc(dst->as_register(), zr, zr, Assembler::EQ);
__ bind(done);
} else {
ShouldNotReachHere();
}
}
void LIR_Assembler::align_call(LIR_Code code) { }
void LIR_Assembler::call(LIR_OpJavaCall* op, relocInfo::relocType rtype) {
address call = __ trampoline_call(Address(op->addr(), rtype));
if (call == NULL) {
bailout("trampoline stub overflow");
return;
}
add_call_info(code_offset(), op->info());
}
void LIR_Assembler::ic_call(LIR_OpJavaCall* op) {
address call = __ ic_call(op->addr());
if (call == NULL) {
bailout("trampoline stub overflow");
return;
}
add_call_info(code_offset(), op->info());
}
/* Currently, vtable-dispatch is only enabled for sparc platforms */
void LIR_Assembler::vtable_call(LIR_OpJavaCall* op) {
ShouldNotReachHere();
}
void LIR_Assembler::emit_static_call_stub() {
address call_pc = __ pc();
address stub = __ start_a_stub(call_stub_size());
if (stub == NULL) {
bailout("static call stub overflow");
return;
}
int start = __ offset();
__ relocate(static_stub_Relocation::spec(call_pc));
__ emit_static_call_stub();
assert(__ offset() - start + CompiledStaticCall::to_trampoline_stub_size()
<= call_stub_size(), "stub too big");
__ end_a_stub();
}
void LIR_Assembler::throw_op(LIR_Opr exceptionPC, LIR_Opr exceptionOop, CodeEmitInfo* info) {
assert(exceptionOop->as_register() == r0, "must match");
assert(exceptionPC->as_register() == r3, "must match");
// exception object is not added to oop map by LinearScan
// (LinearScan assumes that no oops are in fixed registers)
info->add_register_oop(exceptionOop);
Runtime1::StubID unwind_id;
// get current pc information
// pc is only needed if the method has an exception handler, the unwind code does not need it.
int pc_for_athrow_offset = __ offset();
InternalAddress pc_for_athrow(__ pc());
__ adr(exceptionPC->as_register(), pc_for_athrow);
add_call_info(pc_for_athrow_offset, info); // for exception handler
__ verify_not_null_oop(r0);
// search an exception handler (r0: exception oop, r3: throwing pc)
if (compilation()->has_fpu_code()) {
unwind_id = Runtime1::handle_exception_id;
} else {
unwind_id = Runtime1::handle_exception_nofpu_id;
}
__ far_call(RuntimeAddress(Runtime1::entry_for(unwind_id)));
// FIXME: enough room for two byte trap ????
__ nop();
}
void LIR_Assembler::unwind_op(LIR_Opr exceptionOop) {
assert(exceptionOop->as_register() == r0, "must match");
__ b(_unwind_handler_entry);
}
void LIR_Assembler::shift_op(LIR_Code code, LIR_Opr left, LIR_Opr count, LIR_Opr dest, LIR_Opr tmp) {
Register lreg = left->is_single_cpu() ? left->as_register() : left->as_register_lo();
Register dreg = dest->is_single_cpu() ? dest->as_register() : dest->as_register_lo();
switch (left->type()) {
case T_INT: {
switch (code) {
case lir_shl: __ lslvw (dreg, lreg, count->as_register()); break;
case lir_shr: __ asrvw (dreg, lreg, count->as_register()); break;
case lir_ushr: __ lsrvw (dreg, lreg, count->as_register()); break;
default:
ShouldNotReachHere();
break;
}
break;
case T_LONG:
case T_INLINE_TYPE:
case T_ADDRESS:
case T_OBJECT:
switch (code) {
case lir_shl: __ lslv (dreg, lreg, count->as_register()); break;
case lir_shr: __ asrv (dreg, lreg, count->as_register()); break;
case lir_ushr: __ lsrv (dreg, lreg, count->as_register()); break;
default:
ShouldNotReachHere();
break;
}
break;
default:
ShouldNotReachHere();
break;
}
}
}
void LIR_Assembler::shift_op(LIR_Code code, LIR_Opr left, jint count, LIR_Opr dest) {
Register dreg = dest->is_single_cpu() ? dest->as_register() : dest->as_register_lo();
Register lreg = left->is_single_cpu() ? left->as_register() : left->as_register_lo();
switch (left->type()) {
case T_INT: {
switch (code) {
case lir_shl: __ lslw (dreg, lreg, count); break;
case lir_shr: __ asrw (dreg, lreg, count); break;
case lir_ushr: __ lsrw (dreg, lreg, count); break;
default:
ShouldNotReachHere();
break;
}
break;
case T_LONG:
case T_ADDRESS:
case T_INLINE_TYPE:
case T_OBJECT:
switch (code) {
case lir_shl: __ lsl (dreg, lreg, count); break;
case lir_shr: __ asr (dreg, lreg, count); break;
case lir_ushr: __ lsr (dreg, lreg, count); break;
default:
ShouldNotReachHere();
break;
}
break;
default:
ShouldNotReachHere();
break;
}
}
}
void LIR_Assembler::store_parameter(Register r, int offset_from_rsp_in_words) {
assert(offset_from_rsp_in_words >= 0, "invalid offset from rsp");
int offset_from_rsp_in_bytes = offset_from_rsp_in_words * BytesPerWord;
assert(offset_from_rsp_in_bytes < frame_map()->reserved_argument_area_size(), "invalid offset");
__ str (r, Address(sp, offset_from_rsp_in_bytes));
}
void LIR_Assembler::store_parameter(jint c, int offset_from_rsp_in_words) {
assert(offset_from_rsp_in_words >= 0, "invalid offset from rsp");
int offset_from_rsp_in_bytes = offset_from_rsp_in_words * BytesPerWord;
assert(offset_from_rsp_in_bytes < frame_map()->reserved_argument_area_size(), "invalid offset");
__ mov (rscratch1, c);
__ str (rscratch1, Address(sp, offset_from_rsp_in_bytes));
}
void LIR_Assembler::store_parameter(jobject o, int offset_from_rsp_in_words) {
ShouldNotReachHere();
assert(offset_from_rsp_in_words >= 0, "invalid offset from rsp");
int offset_from_rsp_in_bytes = offset_from_rsp_in_words * BytesPerWord;
assert(offset_from_rsp_in_bytes < frame_map()->reserved_argument_area_size(), "invalid offset");
__ lea(rscratch1, __ constant_oop_address(o));
__ str(rscratch1, Address(sp, offset_from_rsp_in_bytes));
}
void LIR_Assembler::arraycopy_valuetype_check(Register obj, Register tmp, CodeStub* slow_path, bool is_dest) {
__ load_storage_props(tmp, obj);
if (is_dest) {
// We also take slow path if it's a null_free destination array, just in case the source array
// contains NULLs.
__ tst(tmp, ArrayStorageProperties::flattened_value | ArrayStorageProperties::null_free_value);
} else {
__ tst(tmp, ArrayStorageProperties::flattened_value);
}
__ br(Assembler::NE, *slow_path->entry());
}
// This code replaces a call to arraycopy; no exception may
// be thrown in this code, they must be thrown in the System.arraycopy
// activation frame; we could save some checks if this would not be the case
void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
ciArrayKlass* default_type = op->expected_type();
Register src = op->src()->as_register();
Register dst = op->dst()->as_register();
Register src_pos = op->src_pos()->as_register();
Register dst_pos = op->dst_pos()->as_register();
Register length = op->length()->as_register();
Register tmp = op->tmp()->as_register();
__ resolve(ACCESS_READ, src);
__ resolve(ACCESS_WRITE, dst);
CodeStub* stub = op->stub();
int flags = op->flags();
BasicType basic_type = default_type != NULL ? default_type->element_type()->basic_type() : T_ILLEGAL;
if (is_reference_type(basic_type)) basic_type = T_OBJECT;
if (flags & LIR_OpArrayCopy::always_slow_path) {
__ b(*stub->entry());
__ bind(*stub->continuation());
return;
}
if (flags & LIR_OpArrayCopy::src_valuetype_check) {
arraycopy_valuetype_check(src, tmp, stub, false);
}
if (flags & LIR_OpArrayCopy::dst_valuetype_check) {
arraycopy_valuetype_check(dst, tmp, stub, true);
}
// if we don't know anything, just go through the generic arraycopy
if (default_type == NULL // || basic_type == T_OBJECT
) {
Label done;
assert(src == r1 && src_pos == r2, "mismatch in calling convention");
// Save the arguments in case the generic arraycopy fails and we
// have to fall back to the JNI stub
__ stp(dst, dst_pos, Address(sp, 0*BytesPerWord));
__ stp(length, src_pos, Address(sp, 2*BytesPerWord));
__ str(src, Address(sp, 4*BytesPerWord));
address copyfunc_addr = StubRoutines::generic_arraycopy();
assert(copyfunc_addr != NULL, "generic arraycopy stub required");
// The arguments are in java calling convention so we shift them
// to C convention
assert_different_registers(c_rarg0, j_rarg1, j_rarg2, j_rarg3, j_rarg4);
__ mov(c_rarg0, j_rarg0);
assert_different_registers(c_rarg1, j_rarg2, j_rarg3, j_rarg4);
__ mov(c_rarg1, j_rarg1);
assert_different_registers(c_rarg2, j_rarg3, j_rarg4);
__ mov(c_rarg2, j_rarg2);
assert_different_registers(c_rarg3, j_rarg4);
__ mov(c_rarg3, j_rarg3);
__ mov(c_rarg4, j_rarg4);
#ifndef PRODUCT
if (PrintC1Statistics) {
__ incrementw(ExternalAddress((address)&Runtime1::_generic_arraycopystub_cnt));
}
#endif
__ far_call(RuntimeAddress(copyfunc_addr));
__ cbz(r0, *stub->continuation());
// Reload values from the stack so they are where the stub
// expects them.
__ ldp(dst, dst_pos, Address(sp, 0*BytesPerWord));
__ ldp(length, src_pos, Address(sp, 2*BytesPerWord));
__ ldr(src, Address(sp, 4*BytesPerWord));
// r0 is -1^K where K == partial copied count
__ eonw(rscratch1, r0, zr);
// adjust length down and src/end pos up by partial copied count
__ subw(length, length, rscratch1);
__ addw(src_pos, src_pos, rscratch1);
__ addw(dst_pos, dst_pos, rscratch1);
__ b(*stub->entry());
__ bind(*stub->continuation());
return;
}
assert(default_type != NULL && default_type->is_array_klass() && default_type->is_loaded(), "must be true at this point");
int elem_size = type2aelembytes(basic_type);
int shift_amount;
int scale = exact_log2(elem_size);
Address src_length_addr = Address(src, arrayOopDesc::length_offset_in_bytes());
Address dst_length_addr = Address(dst, arrayOopDesc::length_offset_in_bytes());
Address src_klass_addr = Address(src, oopDesc::klass_offset_in_bytes());
Address dst_klass_addr = Address(dst, oopDesc::klass_offset_in_bytes());
// test for NULL
if (flags & LIR_OpArrayCopy::src_null_check) {
__ cbz(src, *stub->entry());
}
if (flags & LIR_OpArrayCopy::dst_null_check) {
__ cbz(dst, *stub->entry());
}
// If the compiler was not able to prove that exact type of the source or the destination
// of the arraycopy is an array type, check at runtime if the source or the destination is
// an instance type.
if (flags & LIR_OpArrayCopy::type_check) {
if (!(flags & LIR_OpArrayCopy::LIR_OpArrayCopy::dst_objarray)) {
__ load_klass(tmp, dst);
__ ldrw(rscratch1, Address(tmp, in_bytes(Klass::layout_helper_offset())));
__ cmpw(rscratch1, Klass::_lh_neutral_value);
__ br(Assembler::GE, *stub->entry());
}
if (!(flags & LIR_OpArrayCopy::LIR_OpArrayCopy::src_objarray)) {
__ load_klass(tmp, src);
__ ldrw(rscratch1, Address(tmp, in_bytes(Klass::layout_helper_offset())));
__ cmpw(rscratch1, Klass::_lh_neutral_value);
__ br(Assembler::GE, *stub->entry());
}
}
// check if negative
if (flags & LIR_OpArrayCopy::src_pos_positive_check) {
__ cmpw(src_pos, 0);
__ br(Assembler::LT, *stub->entry());
}
if (flags & LIR_OpArrayCopy::dst_pos_positive_check) {
__ cmpw(dst_pos, 0);
__ br(Assembler::LT, *stub->entry());
}
if (flags & LIR_OpArrayCopy::length_positive_check) {
__ cmpw(length, 0);
__ br(Assembler::LT, *stub->entry());
}
if (flags & LIR_OpArrayCopy::src_range_check) {
__ addw(tmp, src_pos, length);
__ ldrw(rscratch1, src_length_addr);
__ cmpw(tmp, rscratch1);
__ br(Assembler::HI, *stub->entry());
}
if (flags & LIR_OpArrayCopy::dst_range_check) {
__ addw(tmp, dst_pos, length);
__ ldrw(rscratch1, dst_length_addr);
__ cmpw(tmp, rscratch1);
__ br(Assembler::HI, *stub->entry());
}
if (flags & LIR_OpArrayCopy::type_check) {
// We don't know the array types are compatible
if (basic_type != T_OBJECT) {
// Simple test for basic type arrays
if (UseCompressedClassPointers) {
__ ldrw(tmp, src_klass_addr);
__ ldrw(rscratch1, dst_klass_addr);
__ cmpw(tmp, rscratch1);
} else {
__ ldr(tmp, src_klass_addr);
__ ldr(rscratch1, dst_klass_addr);
__ cmp(tmp, rscratch1);
}
__ br(Assembler::NE, *stub->entry());
} else {
// For object arrays, if src is a sub class of dst then we can
// safely do the copy.
Label cont, slow;
#define PUSH(r1, r2) \
stp(r1, r2, __ pre(sp, -2 * wordSize));
#define POP(r1, r2) \
ldp(r1, r2, __ post(sp, 2 * wordSize));
__ PUSH(src, dst);
__ load_klass(src, src);
__ load_klass(dst, dst);
__ check_klass_subtype_fast_path(src, dst, tmp, &cont, &slow, NULL);
__ PUSH(src, dst);
__ far_call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id)));
__ POP(src, dst);
__ cbnz(src, cont);
__ bind(slow);
__ POP(src, dst);
address copyfunc_addr = StubRoutines::checkcast_arraycopy();
if (copyfunc_addr != NULL) { // use stub if available
// src is not a sub class of dst so we have to do a
// per-element check.
int mask = LIR_OpArrayCopy::src_objarray|LIR_OpArrayCopy::dst_objarray;
if ((flags & mask) != mask) {
// Check that at least both of them object arrays.
assert(flags & mask, "one of the two should be known to be an object array");
if (!(flags & LIR_OpArrayCopy::src_objarray)) {
__ load_klass(tmp, src);
} else if (!(flags & LIR_OpArrayCopy::dst_objarray)) {
__ load_klass(tmp, dst);
}
int lh_offset = in_bytes(Klass::layout_helper_offset());
Address klass_lh_addr(tmp, lh_offset);
jint objArray_lh = Klass::array_layout_helper(T_OBJECT);
__ ldrw(rscratch1, klass_lh_addr);
__ mov(rscratch2, objArray_lh);
__ eorw(rscratch1, rscratch1, rscratch2);
__ cbnzw(rscratch1, *stub->entry());
}
// Spill because stubs can use any register they like and it's
// easier to restore just those that we care about.
__ stp(dst, dst_pos, Address(sp, 0*BytesPerWord));
__ stp(length, src_pos, Address(sp, 2*BytesPerWord));
__ str(src, Address(sp, 4*BytesPerWord));
__ lea(c_rarg0, Address(src, src_pos, Address::uxtw(scale)));
__ add(c_rarg0, c_rarg0, arrayOopDesc::base_offset_in_bytes(basic_type));
assert_different_registers(c_rarg0, dst, dst_pos, length);
__ lea(c_rarg1, Address(dst, dst_pos, Address::uxtw(scale)));
__ add(c_rarg1, c_rarg1, arrayOopDesc::base_offset_in_bytes(basic_type));
assert_different_registers(c_rarg1, dst, length);
__ uxtw(c_rarg2, length);
assert_different_registers(c_rarg2, dst);
__ load_klass(c_rarg4, dst);
__ ldr(c_rarg4, Address(c_rarg4, ObjArrayKlass::element_klass_offset()));
__ ldrw(c_rarg3, Address(c_rarg4, Klass::super_check_offset_offset()));
__ far_call(RuntimeAddress(copyfunc_addr));
#ifndef PRODUCT
if (PrintC1Statistics) {
Label failed;
__ cbnz(r0, failed);
__ incrementw(ExternalAddress((address)&Runtime1::_arraycopy_checkcast_cnt));
__ bind(failed);
}
#endif
__ cbz(r0, *stub->continuation());
#ifndef PRODUCT
if (PrintC1Statistics) {
__ incrementw(ExternalAddress((address)&Runtime1::_arraycopy_checkcast_attempt_cnt));
}
#endif
assert_different_registers(dst, dst_pos, length, src_pos, src, r0, rscratch1);
// Restore previously spilled arguments
__ ldp(dst, dst_pos, Address(sp, 0*BytesPerWord));
__ ldp(length, src_pos, Address(sp, 2*BytesPerWord));
__ ldr(src, Address(sp, 4*BytesPerWord));
// return value is -1^K where K is partial copied count
__ eonw(rscratch1, r0, zr);
// adjust length down and src/end pos up by partial copied count
__ subw(length, length, rscratch1);
__ addw(src_pos, src_pos, rscratch1);
__ addw(dst_pos, dst_pos, rscratch1);
}
__ b(*stub->entry());
__ bind(cont);
__ POP(src, dst);
}
}
#ifdef ASSERT
if (basic_type != T_OBJECT || !(flags & LIR_OpArrayCopy::type_check)) {
// Sanity check the known type with the incoming class. For the
// primitive case the types must match exactly with src.klass and
// dst.klass each exactly matching the default type. For the
// object array case, if no type check is needed then either the
// dst type is exactly the expected type and the src type is a
// subtype which we can't check or src is the same array as dst
// but not necessarily exactly of type default_type.
Label known_ok, halt;
__ mov_metadata(tmp, default_type->constant_encoding());
if (UseCompressedClassPointers) {
__ encode_klass_not_null(tmp);
}
if (basic_type != T_OBJECT) {
if (UseCompressedClassPointers) {
__ ldrw(rscratch1, dst_klass_addr);
__ cmpw(tmp, rscratch1);
} else {
__ ldr(rscratch1, dst_klass_addr);
__ cmp(tmp, rscratch1);
}
__ br(Assembler::NE, halt);
if (UseCompressedClassPointers) {
__ ldrw(rscratch1, src_klass_addr);
__ cmpw(tmp, rscratch1);
} else {
__ ldr(rscratch1, src_klass_addr);
__ cmp(tmp, rscratch1);
}
__ br(Assembler::EQ, known_ok);
} else {
if (UseCompressedClassPointers) {
__ ldrw(rscratch1, dst_klass_addr);
__ cmpw(tmp, rscratch1);
} else {
__ ldr(rscratch1, dst_klass_addr);
__ cmp(tmp, rscratch1);
}
__ br(Assembler::EQ, known_ok);
__ cmp(src, dst);
__ br(Assembler::EQ, known_ok);
}
__ bind(halt);
__ stop("incorrect type information in arraycopy");
__ bind(known_ok);
}
#endif
#ifndef PRODUCT
if (PrintC1Statistics) {
__ incrementw(ExternalAddress(Runtime1::arraycopy_count_address(basic_type)));
}
#endif
__ lea(c_rarg0, Address(src, src_pos, Address::uxtw(scale)));
__ add(c_rarg0, c_rarg0, arrayOopDesc::base_offset_in_bytes(basic_type));
assert_different_registers(c_rarg0, dst, dst_pos, length);
__ lea(c_rarg1, Address(dst, dst_pos, Address::uxtw(scale)));
__ add(c_rarg1, c_rarg1, arrayOopDesc::base_offset_in_bytes(basic_type));
assert_different_registers(c_rarg1, dst, length);
__ uxtw(c_rarg2, length);
assert_different_registers(c_rarg2, dst);
bool disjoint = (flags & LIR_OpArrayCopy::overlapping) == 0;
bool aligned = (flags & LIR_OpArrayCopy::unaligned) == 0;
const char *name;
address entry = StubRoutines::select_arraycopy_function(basic_type, aligned, disjoint, name, false);
CodeBlob *cb = CodeCache::find_blob(entry);
if (cb) {
__ far_call(RuntimeAddress(entry));
} else {
__ call_VM_leaf(entry, 3);
}
__ bind(*stub->continuation());
}
void LIR_Assembler::emit_lock(LIR_OpLock* op) {
Register obj = op->obj_opr()->as_register(); // may not be an oop
Register hdr = op->hdr_opr()->as_register();
Register lock = op->lock_opr()->as_register();
if (!UseFastLocking) {
__ b(*op->stub()->entry());
} else if (op->code() == lir_lock) {
Register scratch = noreg;
if (UseBiasedLocking) {
scratch = op->scratch_opr()->as_register();
}
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
__ resolve(ACCESS_READ | ACCESS_WRITE, obj);
// add debug info for NullPointerException only if one is possible
int null_check_offset = __ lock_object(hdr, obj, lock, scratch, *op->stub()->entry());
if (op->info() != NULL) {
add_debug_info_for_null_check(null_check_offset, op->info());
}
// done
} else if (op->code() == lir_unlock) {
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
__ unlock_object(hdr, obj, lock, *op->stub()->entry());
} else {
Unimplemented();
}
__ bind(*op->stub()->continuation());
}
void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
ciMethod* method = op->profiled_method();
int bci = op->profiled_bci();
ciMethod* callee = op->profiled_callee();
// Update counter for all call types
ciMethodData* md = method->method_data_or_null();
assert(md != NULL, "Sanity");
ciProfileData* data = md->bci_to_data(bci);
assert(data != NULL && data->is_CounterData(), "need CounterData for calls");
assert(op->mdo()->is_single_cpu(), "mdo must be allocated");
Register mdo = op->mdo()->as_register();
__ mov_metadata(mdo, md->constant_encoding());
Address counter_addr(mdo, md->byte_offset_of_slot(data, CounterData::count_offset()));
// Perform additional virtual call profiling for invokevirtual and
// invokeinterface bytecodes
if (op->should_profile_receiver_type()) {
assert(op->recv()->is_single_cpu(), "recv must be allocated");
Register recv = op->recv()->as_register();
assert_different_registers(mdo, recv);
assert(data->is_VirtualCallData(), "need VirtualCallData for virtual calls");
ciKlass* known_klass = op->known_holder();
if (C1OptimizeVirtualCallProfiling && known_klass != NULL) {
// We know the type that will be seen at this call site; we can
// statically update the MethodData* rather than needing to do
// dynamic tests on the receiver type
// NOTE: we should probably put a lock around this search to
// avoid collisions by concurrent compilations
ciVirtualCallData* vc_data = (ciVirtualCallData*) data;
uint i;
for (i = 0; i < VirtualCallData::row_limit(); i++) {
ciKlass* receiver = vc_data->receiver(i);
if (known_klass->equals(receiver)) {
Address data_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)));
__ addptr(data_addr, DataLayout::counter_increment);
return;
}
}
// Receiver type not found in profile data; select an empty slot
// Note that this is less efficient than it should be because it
// always does a write to the receiver part of the
// VirtualCallData rather than just the first time
for (i = 0; i < VirtualCallData::row_limit(); i++) {
ciKlass* receiver = vc_data->receiver(i);
if (receiver == NULL) {
Address recv_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)));
__ mov_metadata(rscratch1, known_klass->constant_encoding());
__ lea(rscratch2, recv_addr);
__ str(rscratch1, Address(rscratch2));
Address data_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)));
__ addptr(data_addr, DataLayout::counter_increment);
return;
}
}
} else {
__ load_klass(recv, recv);
Label update_done;
type_profile_helper(mdo, md, data, recv, &update_done);
// Receiver did not match any saved receiver and there is no empty row for it.
// Increment total counter to indicate polymorphic case.
__ addptr(counter_addr, DataLayout::counter_increment);
__ bind(update_done);
}
} else {
// Static call
__ addptr(counter_addr, DataLayout::counter_increment);
}
}
void LIR_Assembler::emit_delay(LIR_OpDelay*) {
Unimplemented();
}
void LIR_Assembler::monitor_address(int monitor_no, LIR_Opr dst) {
__ lea(dst->as_register(), frame_map()->address_for_monitor_lock(monitor_no));
}
void LIR_Assembler::emit_updatecrc32(LIR_OpUpdateCRC32* op) {
assert(op->crc()->is_single_cpu(), "crc must be register");
assert(op->val()->is_single_cpu(), "byte value must be register");
assert(op->result_opr()->is_single_cpu(), "result must be register");
Register crc = op->crc()->as_register();
Register val = op->val()->as_register();
Register res = op->result_opr()->as_register();
assert_different_registers(val, crc, res);
unsigned long offset;
__ adrp(res, ExternalAddress(StubRoutines::crc_table_addr()), offset);
if (offset) __ add(res, res, offset);
__ mvnw(crc, crc); // ~crc
__ update_byte_crc32(crc, val, res);
__ mvnw(res, crc); // ~crc
}
void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
COMMENT("emit_profile_type {");
Register obj = op->obj()->as_register();
Register tmp = op->tmp()->as_pointer_register();
Address mdo_addr = as_Address(op->mdp()->as_address_ptr());
ciKlass* exact_klass = op->exact_klass();
intptr_t current_klass = op->current_klass();
bool not_null = op->not_null();
bool no_conflict = op->no_conflict();
Label update, next, none;
bool do_null = !not_null;
bool exact_klass_set = exact_klass != NULL && ciTypeEntries::valid_ciklass(current_klass) == exact_klass;
bool do_update = !TypeEntries::is_type_unknown(current_klass) && !exact_klass_set;
assert(do_null || do_update, "why are we here?");
assert(!TypeEntries::was_null_seen(current_klass) || do_update, "why are we here?");
assert(mdo_addr.base() != rscratch1, "wrong register");
__ verify_oop(obj);
if (tmp != obj) {
__ mov(tmp, obj);
}
if (do_null) {
__ cbnz(tmp, update);
if (!TypeEntries::was_null_seen(current_klass)) {
__ ldr(rscratch2, mdo_addr);
__ orr(rscratch2, rscratch2, TypeEntries::null_seen);
__ str(rscratch2, mdo_addr);
}
if (do_update) {
#ifndef ASSERT
__ b(next);
}
#else
__ b(next);
}
} else {
__ cbnz(tmp, update);
__ stop("unexpected null obj");
#endif
}
__ bind(update);
if (do_update) {
#ifdef ASSERT
if (exact_klass != NULL) {
Label ok;
__ load_klass(tmp, tmp);
__ mov_metadata(rscratch1, exact_klass->constant_encoding());
__ eor(rscratch1, tmp, rscratch1);
__ cbz(rscratch1, ok);
__ stop("exact klass and actual klass differ");
__ bind(ok);
}
#endif
if (!no_conflict) {
if (exact_klass == NULL || TypeEntries::is_type_none(current_klass)) {
if (exact_klass != NULL) {
__ mov_metadata(tmp, exact_klass->constant_encoding());
} else {
__ load_klass(tmp, tmp);
}
__ ldr(rscratch2, mdo_addr);
__ eor(tmp, tmp, rscratch2);
__ andr(rscratch1, tmp, TypeEntries::type_klass_mask);
// klass seen before, nothing to do. The unknown bit may have been
// set already but no need to check.
__ cbz(rscratch1, next);
__ tbnz(tmp, exact_log2(TypeEntries::type_unknown), next); // already unknown. Nothing to do anymore.
if (TypeEntries::is_type_none(current_klass)) {
__ cbz(rscratch2, none);
__ cmp(rscratch2, (u1)TypeEntries::null_seen);
__ br(Assembler::EQ, none);
// There is a chance that the checks above (re-reading profiling
// data from memory) fail if another thread has just set the
// profiling to this obj's klass
__ dmb(Assembler::ISHLD);
__ ldr(rscratch2, mdo_addr);
__ eor(tmp, tmp, rscratch2);
__ andr(rscratch1, tmp, TypeEntries::type_klass_mask);
__ cbz(rscratch1, next);
}
} else {
assert(ciTypeEntries::valid_ciklass(current_klass) != NULL &&
ciTypeEntries::valid_ciklass(current_klass) != exact_klass, "conflict only");
__ ldr(tmp, mdo_addr);
__ tbnz(tmp, exact_log2(TypeEntries::type_unknown), next); // already unknown. Nothing to do anymore.
}
// different than before. Cannot keep accurate profile.
__ ldr(rscratch2, mdo_addr);
__ orr(rscratch2, rscratch2, TypeEntries::type_unknown);
__ str(rscratch2, mdo_addr);
if (TypeEntries::is_type_none(current_klass)) {
__ b(next);
__ bind(none);
// first time here. Set profile type.
__ str(tmp, mdo_addr);
}
} else {
// There's a single possible klass at this profile point
assert(exact_klass != NULL, "should be");
if (TypeEntries::is_type_none(current_klass)) {
__ mov_metadata(tmp, exact_klass->constant_encoding());
__ ldr(rscratch2, mdo_addr);
__ eor(tmp, tmp, rscratch2);
__ andr(rscratch1, tmp, TypeEntries::type_klass_mask);
__ cbz(rscratch1, next);
#ifdef ASSERT
{
Label ok;
__ ldr(rscratch1, mdo_addr);
__ cbz(rscratch1, ok);
__ cmp(rscratch1, (u1)TypeEntries::null_seen);
__ br(Assembler::EQ, ok);
// may have been set by another thread
__ dmb(Assembler::ISHLD);
__ mov_metadata(rscratch1, exact_klass->constant_encoding());
__ ldr(rscratch2, mdo_addr);
__ eor(rscratch2, rscratch1, rscratch2);
__ andr(rscratch2, rscratch2, TypeEntries::type_mask);
__ cbz(rscratch2, ok);
__ stop("unexpected profiling mismatch");
__ bind(ok);
}
#endif
// first time here. Set profile type.
__ ldr(tmp, mdo_addr);
} else {
assert(ciTypeEntries::valid_ciklass(current_klass) != NULL &&
ciTypeEntries::valid_ciklass(current_klass) != exact_klass, "inconsistent");
__ ldr(tmp, mdo_addr);
__ tbnz(tmp, exact_log2(TypeEntries::type_unknown), next); // already unknown. Nothing to do anymore.
__ orr(tmp, tmp, TypeEntries::type_unknown);
__ str(tmp, mdo_addr);
// FIXME: Write barrier needed here?
}
}
__ bind(next);
}
COMMENT("} emit_profile_type");
}
void LIR_Assembler::align_backward_branch_target() {
}
void LIR_Assembler::negate(LIR_Opr left, LIR_Opr dest, LIR_Opr tmp) {
// tmp must be unused
assert(tmp->is_illegal(), "wasting a register if tmp is allocated");
if (left->is_single_cpu()) {
assert(dest->is_single_cpu(), "expect single result reg");
__ negw(dest->as_register(), left->as_register());
} else if (left->is_double_cpu()) {
assert(dest->is_double_cpu(), "expect double result reg");
__ neg(dest->as_register_lo(), left->as_register_lo());
} else if (left->is_single_fpu()) {
assert(dest->is_single_fpu(), "expect single float result reg");
__ fnegs(dest->as_float_reg(), left->as_float_reg());
} else {
assert(left->is_double_fpu(), "expect double float operand reg");
assert(dest->is_double_fpu(), "expect double float result reg");
__ fnegd(dest->as_double_reg(), left->as_double_reg());
}
}
void LIR_Assembler::leal(LIR_Opr addr, LIR_Opr dest, LIR_PatchCode patch_code, CodeEmitInfo* info) {
if (patch_code != lir_patch_none) {
deoptimize_trap(info);
return;
}
__ lea(dest->as_register_lo(), as_Address(addr->as_address_ptr()));
}
void LIR_Assembler::rt_call(LIR_Opr result, address dest, const LIR_OprList* args, LIR_Opr tmp, CodeEmitInfo* info) {
assert(!tmp->is_valid(), "don't need temporary");
CodeBlob *cb = CodeCache::find_blob(dest);
if (cb) {
__ far_call(RuntimeAddress(dest));
} else {
__ mov(rscratch1, RuntimeAddress(dest));
__ blr(rscratch1);
}
if (info != NULL) {
add_call_info_here(info);
}
__ maybe_isb();
}
void LIR_Assembler::volatile_move_op(LIR_Opr src, LIR_Opr dest, BasicType type, CodeEmitInfo* info) {
if (dest->is_address() || src->is_address()) {
move_op(src, dest, type, lir_patch_none, info,
/*pop_fpu_stack*/false, /*unaligned*/false, /*wide*/false);
} else {
ShouldNotReachHere();
}
}
#ifdef ASSERT
// emit run-time assertion
void LIR_Assembler::emit_assert(LIR_OpAssert* op) {
assert(op->code() == lir_assert, "must be");
if (op->in_opr1()->is_valid()) {
assert(op->in_opr2()->is_valid(), "both operands must be valid");
comp_op(op->condition(), op->in_opr1(), op->in_opr2(), op);
} else {
assert(op->in_opr2()->is_illegal(), "both operands must be illegal");
assert(op->condition() == lir_cond_always, "no other conditions allowed");
}
Label ok;
if (op->condition() != lir_cond_always) {
Assembler::Condition acond = Assembler::AL;
switch (op->condition()) {
case lir_cond_equal: acond = Assembler::EQ; break;
case lir_cond_notEqual: acond = Assembler::NE; break;
case lir_cond_less: acond = Assembler::LT; break;
case lir_cond_lessEqual: acond = Assembler::LE; break;
case lir_cond_greaterEqual: acond = Assembler::GE; break;
case lir_cond_greater: acond = Assembler::GT; break;
case lir_cond_belowEqual: acond = Assembler::LS; break;
case lir_cond_aboveEqual: acond = Assembler::HS; break;
default: ShouldNotReachHere();
}
__ br(acond, ok);
}
if (op->halt()) {
const char* str = __ code_string(op->msg());
__ stop(str);
} else {
breakpoint();
}
__ bind(ok);
}
#endif
#ifndef PRODUCT
#define COMMENT(x) do { __ block_comment(x); } while (0)
#else
#define COMMENT(x)
#endif
void LIR_Assembler::membar() {
COMMENT("membar");
__ membar(MacroAssembler::AnyAny);
}
void LIR_Assembler::membar_acquire() {
__ membar(Assembler::LoadLoad|Assembler::LoadStore);
}
void LIR_Assembler::membar_release() {
__ membar(Assembler::LoadStore|Assembler::StoreStore);
}
void LIR_Assembler::membar_loadload() {
__ membar(Assembler::LoadLoad);
}
void LIR_Assembler::membar_storestore() {
__ membar(MacroAssembler::StoreStore);
}
void LIR_Assembler::membar_loadstore() { __ membar(MacroAssembler::LoadStore); }
void LIR_Assembler::membar_storeload() { __ membar(MacroAssembler::StoreLoad); }
void LIR_Assembler::on_spin_wait() {
Unimplemented();
}
void LIR_Assembler::get_thread(LIR_Opr result_reg) {
__ mov(result_reg->as_register(), rthread);
}
void LIR_Assembler::peephole(LIR_List *lir) {
#if 0
if (tableswitch_count >= max_tableswitches)
return;
/*
This finite-state automaton recognizes sequences of compare-and-
branch instructions. We will turn them into a tableswitch. You
could argue that C1 really shouldn't be doing this sort of
optimization, but without it the code is really horrible.
*/
enum { start_s, cmp1_s, beq_s, cmp_s } state;
int first_key, last_key = -2147483648;
int next_key = 0;
int start_insn = -1;
int last_insn = -1;
Register reg = noreg;
LIR_Opr reg_opr;
state = start_s;
LIR_OpList* inst = lir->instructions_list();
for (int i = 0; i < inst->length(); i++) {
LIR_Op* op = inst->at(i);
switch (state) {
case start_s:
first_key = -1;
start_insn = i;
switch (op->code()) {
case lir_cmp:
LIR_Opr opr1 = op->as_Op2()->in_opr1();
LIR_Opr opr2 = op->as_Op2()->in_opr2();
if (opr1->is_cpu_register() && opr1->is_single_cpu()
&& opr2->is_constant()
&& opr2->type() == T_INT) {
reg_opr = opr1;
reg = opr1->as_register();
first_key = opr2->as_constant_ptr()->as_jint();
next_key = first_key + 1;
state = cmp_s;
goto next_state;
}
break;
}
break;
case cmp_s:
switch (op->code()) {
case lir_branch:
if (op->as_OpBranch()->cond() == lir_cond_equal) {
state = beq_s;
last_insn = i;
goto next_state;
}
}
state = start_s;
break;
case beq_s:
switch (op->code()) {
case lir_cmp: {
LIR_Opr opr1 = op->as_Op2()->in_opr1();
LIR_Opr opr2 = op->as_Op2()->in_opr2();
if (opr1->is_cpu_register() && opr1->is_single_cpu()
&& opr1->as_register() == reg
&& opr2->is_constant()
&& opr2->type() == T_INT
&& opr2->as_constant_ptr()->as_jint() == next_key) {
last_key = next_key;
next_key++;
state = cmp_s;
goto next_state;
}
}
}
last_key = next_key;
state = start_s;
break;
default:
assert(false, "impossible state");
}
if (state == start_s) {
if (first_key < last_key - 5L && reg != noreg) {
{
// printf("found run register %d starting at insn %d low value %d high value %d\n",
// reg->encoding(),
// start_insn, first_key, last_key);
// for (int i = 0; i < inst->length(); i++) {
// inst->at(i)->print();
// tty->print("\n");
// }
// tty->print("\n");
}
struct tableswitch *sw = &switches[tableswitch_count];
sw->_insn_index = start_insn, sw->_first_key = first_key,
sw->_last_key = last_key, sw->_reg = reg;
inst->insert_before(last_insn + 1, new LIR_OpLabel(&sw->_after));
{
// Insert the new table of branches
int offset = last_insn;
for (int n = first_key; n < last_key; n++) {
inst->insert_before
(last_insn + 1,
new LIR_OpBranch(lir_cond_always, T_ILLEGAL,
inst->at(offset)->as_OpBranch()->label()));
offset -= 2, i++;
}
}
// Delete all the old compare-and-branch instructions
for (int n = first_key; n < last_key; n++) {
inst->remove_at(start_insn);
inst->remove_at(start_insn);
}
// Insert the tableswitch instruction
inst->insert_before(start_insn,
new LIR_Op2(lir_cmp, lir_cond_always,
LIR_OprFact::intConst(tableswitch_count),
reg_opr));
inst->insert_before(start_insn + 1, new LIR_OpLabel(&sw->_branches));
tableswitch_count++;
}
reg = noreg;
last_key = -2147483648;
}
next_state:
;
}
#endif
}
void LIR_Assembler::atomic_op(LIR_Code code, LIR_Opr src, LIR_Opr data, LIR_Opr dest, LIR_Opr tmp_op) {
Address addr = as_Address(src->as_address_ptr());
BasicType type = src->type();
bool is_oop = is_reference_type(type);
void (MacroAssembler::* add)(Register prev, RegisterOrConstant incr, Register addr);
void (MacroAssembler::* xchg)(Register prev, Register newv, Register addr);
switch(type) {
case T_INT:
xchg = &MacroAssembler::atomic_xchgalw;
add = &MacroAssembler::atomic_addalw;
break;
case T_LONG:
xchg = &MacroAssembler::atomic_xchgal;
add = &MacroAssembler::atomic_addal;
break;
case T_INLINE_TYPE:
case T_OBJECT:
case T_ARRAY:
if (UseCompressedOops) {
xchg = &MacroAssembler::atomic_xchgalw;
add = &MacroAssembler::atomic_addalw;
} else {
xchg = &MacroAssembler::atomic_xchgal;
add = &MacroAssembler::atomic_addal;
}
break;
default:
ShouldNotReachHere();
xchg = &MacroAssembler::atomic_xchgal;
add = &MacroAssembler::atomic_addal; // unreachable
}
switch (code) {
case lir_xadd:
{
RegisterOrConstant inc;
Register tmp = as_reg(tmp_op);
Register dst = as_reg(dest);
if (data->is_constant()) {
inc = RegisterOrConstant(as_long(data));
assert_different_registers(dst, addr.base(), tmp,
rscratch1, rscratch2);
} else {
inc = RegisterOrConstant(as_reg(data));
assert_different_registers(inc.as_register(), dst, addr.base(), tmp,
rscratch1, rscratch2);
}
__ lea(tmp, addr);
(_masm->*add)(dst, inc, tmp);
break;
}
case lir_xchg:
{
Register tmp = tmp_op->as_register();
Register obj = as_reg(data);
Register dst = as_reg(dest);
if (is_oop && UseCompressedOops) {
__ encode_heap_oop(rscratch2, obj);
obj = rscratch2;
}
assert_different_registers(obj, addr.base(), tmp, rscratch1, dst);
__ lea(tmp, addr);
(_masm->*xchg)(dst, obj, tmp);
if (is_oop && UseCompressedOops) {
__ decode_heap_oop(dst);
}
}
break;
default:
ShouldNotReachHere();
}
__ membar(__ AnyAny);
}
#undef __
| [
"robin.westberg@oracle.com"
] | robin.westberg@oracle.com |
f07ecddf62085d45bef421ee501fabaf61368b11 | 0ba447ad10da4415235a4aef88f8a33fa3ac85d6 | /OLD/code/byteland2.cpp | e8582143d6d4158e158411128641c313c890fbcb | [] | no_license | jojoclt/C | 9aeef9364c17284446cacf7ca2222af5fe5062ad | 30fd09812c6436b28adf742347cb54947ba6a9d7 | refs/heads/master | 2023-01-08T01:50:29.555281 | 2023-01-05T15:19:34 | 2023-01-05T15:19:34 | 174,821,787 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 427 | cpp | #include <bits/stdc++.h>
using namespace std;
long long n,tmp;
map<long long, long long> mem;
long long f(long long n){
if (n == 0) mem[n] = 0;
else if (mem[n]) return mem[n];
else{
tmp = f(n/2) + f(n/3) + f(n/4);
if (tmp > n) mem[n] = tmp;
else mem[n] = n;
}
return mem[n];
}
int main(){
while(scanf("%lld",&n)){
mem.clear();
printf("%lld\n",f(n));
}
}
| [
"Chalanthorn_jojo@Hotmail.com"
] | Chalanthorn_jojo@Hotmail.com |
f703e31f060b58a0f669bdf501bea53f79681a08 | 1dbf00b81014946aa8f8caaa6757a6b27339ca51 | /src/stegolib/Algorithm.h | 8bedac41f3ebf862ff3bcc96b3995b942e128a2f | [
"MIT"
] | permissive | gaara4896/stego-264-mv | d85ffa4bc78640f9580fe8583d55ae68b6b27e5a | 25ddb26f966ed1fb8f846eb91607a4cf978781af | refs/heads/master | 2020-04-04T13:08:02.507422 | 2018-11-14T18:27:27 | 2018-11-14T18:27:27 | 155,950,108 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,116 | h | #ifndef STEGO_ALGORITHM_H
#define STEGO_ALGORITHM_H
#include <memory>
#include <vector>
#include "stego_connector.h"
#include "crypto/CryptoFile.h"
class Algorithm {
public:
virtual void encode(int16_t (*mvs)[2], uint16_t *mb_type, int mb_width, int mb_height, int mv_stride);
virtual void decode(int16_t (*mvs[2])[2], uint32_t *mbtype_table, int mv_sample_log2, int mb_width, int mb_height,
int mv_stride, int mb_stride);
virtual void embedIntoMv(int16_t *mvX, int16_t *mvY) = 0;
virtual void extractFromMv(int16_t mvX, int16_t mvY) = 0;
virtual void initAsEncoder(stego_params *params);
virtual void initAsDecoder(stego_params *params);
virtual unsigned int computeEmbeddingSize(unsigned int dataSize);
virtual stego_result finalise();
virtual ~Algorithm() {};
protected:
void initialiseAlgorithm(stego_params *params);
std::vector<uint8_t> deriveBytes(size_t numBytes, std::string salt);
CryptoFile datafile;
int flags = 0;
ulong bits_processed = 0;
bool encoder;
std::string password;
};
#endif //STEGO_ALGORITHM_H
| [
"15033996@imail.sunway.edu.my"
] | 15033996@imail.sunway.edu.my |
d46d73c520d697935ba36b913085709e9682bb41 | 9aa178a742415968b4924b366224e7ba3bf8fdb8 | /stl1/stl1/stl1.cpp | 8e16ce86b8771f860ab5a1580046cd531936a996 | [] | no_license | SigridHo/CodingEx | 3a66af7b9b2f5f1bd992206559d8cc13542fce8f | 719e1554cd99315909fe514eb5d3ef94ec27e81c | refs/heads/master | 2016-09-15T20:35:34.448480 | 2015-08-10T03:28:13 | 2015-08-10T03:28:13 | 39,752,652 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 272 | cpp |
#include <iostream>
#include <iterator>
#include <set>
using namespace std;
int main(){
int a[] = {8,7,8,9,6,2,1};
set<int> v;
for( int i = 0;i < 7;++i)
v.insert(a[i]);
ostream_iterator<int> o(cout," ");
copy( v.begin(),v.end(),o);
system("pause");
return 0;
}
| [
"hsinruiho@gmail.com"
] | hsinruiho@gmail.com |
8375da5715271c02a5ea8c4c29abc1077395ee6f | acf70bec6eb846e85ffdc74ccbe69d1ec00d0a81 | /examples/src/jsonpointer_examples.cpp | 585aec9599f2b44a9fc6e914ba7a38d72528d475 | [
"BSL-1.0",
"MIT"
] | permissive | bergmansj/jsoncons | 2ebd56894c00020b3d06cf889b7485f37ae674f4 | 11db194bd3f0e3e89f29b3447e28d131db242501 | refs/heads/master | 2020-05-23T23:42:35.235279 | 2019-05-15T03:38:41 | 2019-05-15T03:38:41 | 186,999,801 | 0 | 0 | NOASSERTION | 2019-05-16T09:48:41 | 2019-05-16T09:48:41 | null | UTF-8 | C++ | false | false | 10,982 | cpp | // Copyright 2017 Daniel Parker
// Distributed under Boost license
#include <jsoncons/json.hpp>
#include <jsoncons_ext/jsonpointer/jsonpointer.hpp>
namespace jp = jsoncons::jsonpointer;
void jsonpointer_select_RFC6901()
{
// Example from RFC 6901
auto j = jsoncons::json::parse(R"(
{
"foo": ["bar", "baz"],
"": 0,
"a/b": 1,
"c%d": 2,
"e^f": 3,
"g|h": 4,
"i\\j": 5,
"k\"l": 6,
" ": 7,
"m~n": 8
}
)");
try
{
const jsoncons::json& result1 = jp::get(j, "");
std::cout << "(1) " << result1 << std::endl;
const jsoncons::json& result2 = jp::get(j, "/foo");
std::cout << "(2) " << result2 << std::endl;
const jsoncons::json& result3 = jp::get(j, "/foo/0");
std::cout << "(3) " << result3 << std::endl;
const jsoncons::json& result4 = jp::get(j, "/");
std::cout << "(4) " << result4 << std::endl;
const jsoncons::json& result5 = jp::get(j, "/a~1b");
std::cout << "(5) " << result5 << std::endl;
const jsoncons::json& result6 = jp::get(j, "/c%d");
std::cout << "(6) " << result6 << std::endl;
const jsoncons::json& result7 = jp::get(j, "/e^f");
std::cout << "(7) " << result7 << std::endl;
const jsoncons::json& result8 = jp::get(j, "/g|h");
std::cout << "(8) " << result8 << std::endl;
const jsoncons::json& result9 = jp::get(j, "/i\\j");
std::cout << "(9) " << result9 << std::endl;
const jsoncons::json& result10 = jp::get(j, "/k\"l");
std::cout << "(10) " << result10 << std::endl;
const jsoncons::json& result11 = jp::get(j, "/ ");
std::cout << "(11) " << result11 << std::endl;
const jsoncons::json& result12 = jp::get(j, "/m~0n");
std::cout << "(12) " << result12 << std::endl;
}
catch (const jp::jsonpointer_error& e)
{
std::cerr << e.what() << std::endl;
}
}
void jsonpointer_contains()
{
// Example from RFC 6901
auto j = jsoncons::json::parse(R"(
{
"foo": ["bar", "baz"],
"": 0,
"a/b": 1,
"c%d": 2,
"e^f": 3,
"g|h": 4,
"i\\j": 5,
"k\"l": 6,
" ": 7,
"m~n": 8
}
)");
std::cout << "(1) " << jp::contains(j, "/foo/0") << std::endl;
std::cout << "(2) " << jp::contains(j, "e^g") << std::endl;
}
void jsonpointer_select_author()
{
auto j = jsoncons::json::parse(R"(
[
{ "category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
},
{ "category": "fiction",
"author": "Evelyn Waugh",
"title": "Sword of Honour",
"price": 12.99
}
]
)");
// Using exceptions to report errors
try
{
jsoncons::json result = jp::get(j, "/1/author");
std::cout << "(1) " << result << std::endl;
}
catch (const jp::jsonpointer_error& e)
{
std::cout << e.what() << std::endl;
}
// Using error codes to report errors
std::error_code ec;
const jsoncons::json& result = jp::get(j, "/0/title", ec);
if (ec)
{
std::cout << ec.message() << std::endl;
}
else
{
std::cout << "(2) " << result << std::endl;
}
}
void jsonpointer_add_member_to_object()
{
auto target = jsoncons::json::parse(R"(
{ "foo": "bar"}
)");
std::error_code ec;
jp::insert(target, "/baz", jsoncons::json("qux"), ec);
if (ec)
{
std::cout << ec.message() << std::endl;
}
else
{
std::cout << target << std::endl;
}
}
void jsonpointer_add_element_to_array()
{
auto target = jsoncons::json::parse(R"(
{ "foo": [ "bar", "baz" ] }
)");
std::error_code ec;
jp::insert(target, "/foo/1", jsoncons::json("qux"), ec);
if (ec)
{
std::cout << ec.message() << std::endl;
}
else
{
std::cout << target << std::endl;
}
}
void jsonpointer_add_element_to_end_array()
{
auto target = jsoncons::json::parse(R"(
{ "foo": [ "bar", "baz" ] }
)");
std::error_code ec;
jp::insert(target, "/foo/-", jsoncons::json("qux"), ec);
if (ec)
{
std::cout << ec.message() << std::endl;
}
else
{
std::cout << target << std::endl;
}
}
void jsonpointer_insert_name_exists()
{
auto target = jsoncons::json::parse(R"(
{ "foo": "bar", "baz" : "abc"}
)");
std::error_code ec;
jp::insert(target, "/baz", jsoncons::json("qux"), ec);
if (ec)
{
std::cout << ec.message() << std::endl;
}
else
{
std::cout << target << std::endl;
}
}
void jsonpointer_add_element_outside_range()
{
auto target = jsoncons::json::parse(R"(
{ "foo": [ "bar", "baz" ] }
)");
std::error_code ec;
jp::insert_or_assign(target, "/foo/3", jsoncons::json("qux"), ec);
if (ec)
{
std::cout << ec.message() << std::endl;
}
else
{
std::cout << target << std::endl;
}
}
void jsonpointer_insert_or_assign_name_exists()
{
auto target = jsoncons::json::parse(R"(
{ "foo": "bar", "baz" : "abc"}
)");
std::error_code ec;
jp::insert_or_assign(target, "/baz", jsoncons::json("qux"), ec);
if (ec)
{
std::cout << ec.message() << std::endl;
}
else
{
std::cout << target << std::endl;
}
}
void jsonpointer_remove_object_member()
{
auto target = jsoncons::json::parse(R"(
{ "foo": "bar", "baz" : "qux"}
)");
std::error_code ec;
jp::remove(target, "/baz", ec);
if (ec)
{
std::cout << ec.message() << std::endl;
}
else
{
std::cout << target << std::endl;
}
}
void jsonpointer_remove_array_element()
{
auto target = jsoncons::json::parse(R"(
{ "foo": [ "bar", "qux", "baz" ] }
)");
std::error_code ec;
jp::remove(target, "/foo/1", ec);
if (ec)
{
std::cout << ec.message() << std::endl;
}
else
{
std::cout << target << std::endl;
}
}
void jsonpointer_replace_object_value()
{
auto target = jsoncons::json::parse(R"(
{
"baz": "qux",
"foo": "bar"
}
)");
std::error_code ec;
jp::replace(target, "/baz", jsoncons::json("boo"), ec);
if (ec)
{
std::cout << ec.message() << std::endl;
}
else
{
std::cout << target << std::endl;
}
}
void jsonpointer_replace_array_value()
{
auto target = jsoncons::json::parse(R"(
{ "foo": [ "bar", "baz" ] }
)");
std::error_code ec;
jp::replace(target, "/foo/1", jsoncons::json("qux"), ec);
if (ec)
{
std::cout << ec.message() << std::endl;
}
else
{
std::cout << pretty_print(target) << std::endl;
}
}
void jsonpointer_error_example()
{
auto j = jsoncons::json::parse(R"(
[
{ "category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
},
{ "category": "fiction",
"author": "Evelyn Waugh",
"title": "Sword of Honour",
"price": 12.99
}
]
)");
try
{
jsoncons::json result = jp::get(j, "/1/isbn");
std::cout << "succeeded?" << std::endl;
std::cout << result << std::endl;
}
catch (const jp::jsonpointer_error& e)
{
std::cout << "Caught jsonpointer_error with category " << e.code().category().name()
<< ", code " << e.code().value()
<< " and message \"" << e.what() << "\"" << std::endl;
}
}
void jsonpointer_get_examples()
{
{
jsoncons::json j = jsoncons::json::array{"baz","foo"};
jsoncons::json& item = jp::get(j,"/0");
std::cout << "(1) " << item << std::endl;
//std::vector<uint8_t> u;
//cbor::encode_cbor(j,u);
//for (auto c : u)
//{
// std::cout << "0x" << std::hex << (int)c << ",";
//}
//std::cout << std::endl;
}
{
const jsoncons::json j = jsoncons::json::array{"baz","foo"};
const jsoncons::json& item = jp::get(j,"/1");
std::cout << "(2) " << item << std::endl;
}
{
jsoncons::json j = jsoncons::json::array{"baz","foo"};
std::error_code ec;
jsoncons::json& item = jp::get(j,"/1",ec);
std::cout << "(4) " << item << std::endl;
}
{
const jsoncons::json j = jsoncons::json::array{"baz","foo"};
std::error_code ec;
const jsoncons::json& item = jp::get(j,"/0",ec);
std::cout << "(5) " << item << std::endl;
}
}
void jsonpointer_address_example()
{
auto j = jsoncons::json::parse(R"(
{
"a/b": ["bar", "baz"],
"m~n": ["foo", "qux"]
}
)");
jp::address addr;
addr /= "m~n";
addr /= "1";
std::cout << "(1) " << addr << "\n\n";
std::cout << "(2)\n";
for (const auto& item : addr)
{
std::cout << item << "\n";
}
std::cout << "\n";
jsoncons::json item = jp::get(j, addr);
std::cout << "(3) " << item << "\n";
}
void jsonpointer_address_iterator_example()
{
jp::address addr("/store/book/1/author");
std::cout << "(1) " << addr << "\n\n";
std::cout << "(2)\n";
for (const auto& token : addr)
{
std::cout << token << "\n";
}
std::cout << "\n";
}
void jsonpointer_address_append_tokens()
{
jp::address addr;
addr /= "a/b";
addr /= "";
addr /= "m~n";
std::cout << "(1) " << addr << "\n\n";
std::cout << "(2)\n";
for (const auto& token : addr)
{
std::cout << token << "\n";
}
std::cout << "\n";
}
void jsonpointer_address_concatentae()
{
jp::address addr("/a~1b");
addr += jp::address("//m~0n");
std::cout << "(1) " << addr << "\n\n";
std::cout << "(2)\n";
for (const auto& token : addr)
{
std::cout << token << "\n";
}
std::cout << "\n";
}
void jsonpointer_examples()
{
std::cout << "\njsonpointer examples\n\n";
jsonpointer_select_author();
jsonpointer_address_example();
jsonpointer_select_RFC6901();
jsonpointer_add_member_to_object();
jsonpointer_add_element_to_array();
jsonpointer_add_element_to_end_array();
jsonpointer_add_element_outside_range();
jsonpointer_remove_object_member();
jsonpointer_remove_array_element();
jsonpointer_replace_object_value();
jsonpointer_replace_array_value();
jsonpointer_contains();
jsonpointer_error_example();
jsonpointer_insert_name_exists();
jsonpointer_insert_or_assign_name_exists();
jsonpointer_get_examples();
jsonpointer_address_iterator_example();
jsonpointer_address_append_tokens();
jsonpointer_address_concatentae();
}
| [
"danielaparker@yahoo.com"
] | danielaparker@yahoo.com |
3bd8626ec3850938f428c8a1ff8df5e19ad247ff | 965765b1285f3a333d96c741419b0d53bc1f8611 | /CG_Game/Header/GLError.h | 99b0462349ef5b9b3655df5959168a00846c0bfa | [] | no_license | Cluster7ck/CG-Game | ade0b9fd3d9dcc02ad847bcd614886cd6faf4ba1 | 0298e144d5d242b4a9aea0b466fa659a833119ae | refs/heads/master | 2020-04-06T07:06:15.664447 | 2016-09-05T01:15:14 | 2016-09-05T01:15:14 | 65,743,850 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 373 | h | #ifndef GLERROR_H
#define GLERROR_H
#include <string>
#include <iostream>
//https://blog.nobel-joergensen.com/2013/01/29/debugging-opengl-using-glgeterror/
void _check_gl_error(const char *file, int line);
///
/// Usage
/// [... some opengl calls]
/// glCheckError();
///
#define check_gl_error() _check_gl_error(__FILE__,__LINE__)
//#define GL_DEBUG 0
#endif // GLERROR_H | [
"l.erpmobil@googlemail.com"
] | l.erpmobil@googlemail.com |
1b8d0306fd27e84211c5840722ea81e674d81855 | e10ed5091d48be9fb628f0d3056c0760ba3d5a85 | /mediatek/custom/hawk35/hal/camera/camera/isp_tuning_custom.cpp | 2dfbc26e4a27fababaa8763c89e925aacdd7ae86 | [] | no_license | jawad6233/motorola-hawk-kernel-3.4.67 | a1feb3a4406ae782d0186b8081f6bd129d083cb5 | add095e96c3affd573bffa4f6d3f04774b91f184 | refs/heads/master | 2021-01-22T15:35:25.213212 | 2014-11-11T14:10:02 | 2014-11-11T14:10:02 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 35,054 | cpp | //
#define LOG_TAG "IspTuningCustom"
#ifndef ENABLE_MY_LOG
#define ENABLE_MY_LOG (0)
#endif
//
#include <utils/Errors.h>
#include <cutils/log.h>
//
#define USE_CUSTOM_ISP_TUNING
#include "isp_tuning.h"
//
using namespace NSIspTuning;
//
/*******************************************************************************
*
* rCamInfo
* [in] ISP Camera Info for RAW sensor. Its members are as below:
*
* eCamMode:
* ECamMode_Video = 0,
* ECamMode_Online_Preview,
* ECamMode_Online_Capture,
* ECamMode_Online_Capture_ZSD,
* ECamMode_Offline_Capture_Pass1,
* ECamMode_Offline_Capture_Pass2,
* ECamMode_HDR_Cap_Pass1_SF, // Pass1: Single Frame
* ECamMode_HDR_Cap_Pass1_MF1, // Pass1: Multi Frame Stage1
* ECamMode_HDR_Cap_Pass1_MF2, // Pass1: Multi Frame Stage2
* ECamMode_HDR_Cap_Pass2, // Pass2
*
* eIdx_Scene:
* SCENE_MODE_OFF, // Disable scene mode equal Auto mode
* SCENE_MODE_ACTION, // Action mode
* SCENE_MODE_PORTRAIT, // Portrait mode
* SCENE_MODE_LANDSCAPE, // Landscape
* SCENE_MODE_NIGHTSCENE, // Night Scene
* SCENE_MODE_NIGHTPORTRAIT, // Night Portrait
* SCENE_MODE_THEATRE, // Theatre mode
* SCENE_MODE_BEACH, // Beach mode
* SCENE_MODE_SNOW, // Snow mode
* SCENE_MODE_SUNSET, // Sunset mode
* SCENE_MODE_STEADYPHOTO, // Steady photo mode
* SCENE_MODE_FIREWORKS, // Fireworks mode
* SCENE_MODE_SPORTS, // Sports mode
* SCENE_MODE_PARTY, // Party mode
* SCENE_MODE_CANDLELIGHT, // Candle light mode
*
* u4ISOValue:
* ISO value to determine eISO.
*
* eIdx_ISO:
* eIDX_ISO_100,
* eIDX_ISO_200,
* eIDX_ISO_400,
* eIDX_ISO_800,
* eIDX_ISO_1600
*
* i4CCT:
* Correlated color temperature
*
* eCCTIndex_CCM:
* Correlated color temperature index for CCM
* eIDX_CCM_CCT_TL84
* eIDX_CCM_CCT_CWF
* eIDX_CCM_CCT_D65
*
* u4ZoomRatio_x100:
* zoom ratio (x100)
*
* i4LightValue_x10:
* light value (x10)
*
* rIdxMgr:
* [in] The default ISP tuning index manager.
* [out] The ISP tuning index manager after customizing.
*
*
*******************************************************************************/
//meimei
static MINT32 m_i4FluorescentIndex;
static MINT32 m_i4DaylightFluorescentIndex;
#define DAYLIGHT_F_IDX 10
#define DAYLIGHT_F2_IDX 55
static MINT32 m_i4LightValue_x10;
//meimei
MVOID
IspTuningCustom::
evaluate_nvram_index(RAWIspCamInfo const& rCamInfo, IndexMgr& rIdxMgr)
{
MBOOL fgRet = MFALSE;
ECamMode_T const eCamMode = rCamInfo.eCamMode;
EIndex_Scene_T const eIdx_Scene = rCamInfo.eIdx_Scene;
EIndex_ISO_T const eIdx_ISO = rCamInfo.eIdx_ISO;
MUINT32 const u4ISOValue = rCamInfo.u4ISOValue;
MUINT32 const i4CCT = rCamInfo.i4CCT;
MUINT32 const u4ZoomRatio_x100 = rCamInfo.u4ZoomRatio_x100;
MINT32 const i4LightValue_x10 = rCamInfo.i4LightValue_x10;
// (0) We have:
// eCamMode, eScene, ......
//..............................................................................
// (1) Dump info. before customizing.
#if ENABLE_MY_LOG
rCamInfo.dump();
#endif
#if 0
LOGD("[+evaluate_nvram_index][before customizing]");
rIdxMgr.dump();
#endif
//..............................................................................
// (2) Modify each index based on conditions.
//
// setIdx_XXX() returns:
// MTURE: if successful
// MFALSE: if the input index is out of range.
//
#if 0
fgRet = rIdxMgr.setIdx_DM(XXX);
fgRet = rIdxMgr.setIdx_DP(XXX);
fgRet = rIdxMgr.setIdx_NR1(XXX);
fgRet = rIdxMgr.setIdx_NR2(XXX);
fgRet = rIdxMgr.setIdx_Saturation(XXX);
fgRet = rIdxMgr.setIdx_Contrast(XXX);
fgRet = rIdxMgr.setIdx_Hue(XXX);
fgRet = rIdxMgr.setIdx_Gamma(XXX);
fgRet = rIdxMgr.setIdx_EE(XXX);
#endif
//..............................................................................
// (3) Finally, dump info. after modifying.
#if 0
LOGD("[-evaluate_nvram_index][after customizing]");
rIdxMgr.dump();
#endif
}
/*******************************************************************************
*
*******************************************************************************/
MVOID
IspTuningCustom::
refine_NR1(RAWIspCamInfo const& rCamInfo, ISP_NVRAM_NR1_T& rNR1)
{
// (1) Check to see if it works or not.
switch (rCamInfo.eCamMode)
{
// Normal
case ECamMode_Online_Preview:
case ECamMode_Video:
case ECamMode_Online_Capture:
case ECamMode_Online_Capture_ZSD:
case ECamMode_Online_Preview_ZSD:
case ECamMode_Offline_Capture_Pass1:
// TODO: Add your code below...
//20110808 Jouny
int curr_gnf,set_gnf;
curr_gnf = rNR1.nr_cfg1.bits.GNF;
//LOGD("ISO:%d Original NR1_GNF:%d %d\n",rCamInfo.eIdx_ISO
// ,rNR1.nr_cfg1.bits.GNF
// ,curr_gnf);
if(rCamInfo.u4ZoomRatio_x100>0)
{
if(rCamInfo.u4ZoomRatio_x100>=459)
{
set_gnf = 16;
}
else
{
set_gnf = curr_gnf+rCamInfo.u4ZoomRatio_x100 * (16-curr_gnf)/459;
}
if(set_gnf>16)
{
set_gnf = 16;
}
else if(set_gnf<1)
{
set_gnf = 1;
}
rNR1.nr_cfg1.bits.GNF = set_gnf;
}
break;
// HDR
case ECamMode_HDR_Cap_Pass1_SF:
// TODO: Add your code below...
switch(rCamInfo.eIdx_ISO)
{
case eIDX_ISO_100:
rNR1.nr_cfg1.bits.GNF = rNR1.nr_cfg1.bits.GNF+2;
if(rNR1.nr_cfg1.bits.GNF>15)
{
rNR1.nr_cfg1.bits.GNF = 15;
}
break;
case eIDX_ISO_200:
rNR1.nr_cfg1.bits.GNF = rNR1.nr_cfg1.bits.GNF+2;
if(rNR1.nr_cfg1.bits.GNF>15)
{
rNR1.nr_cfg1.bits.GNF = 15;
}
break;
case eIDX_ISO_400:
// rNR1.nr_cfg1.bits.GNF = 15;
break;
case eIDX_ISO_800:
case eIDX_ISO_1600:
// rNR1.nr_cfg1.bits.GNF = 16;
break;
default:
//rNR1.nr_cfg1.bits.GNF = rNR1.nr_cfg1.bits.GNF;
break;
}
break;
case ECamMode_HDR_Cap_Pass1_MF1:
rNR1.ctrl.bits.NR_EN = 0;
break;
// case ECamMode_Offline_Capture_Pass2:
// case ECamMode_HDR_Cap_Pass1_MF2:
// case ECamMode_HDR_Cap_Pass2:
default:
// Usually, NR1 is disabled in capture pass2.
// Of course, you can do what you want.
#if 1
::memset(rNR1.set, 0, sizeof(ISP_NVRAM_NR1_T));
#endif
break;
}
}
/*******************************************************************************
*
*******************************************************************************/
MVOID
IspTuningCustom::
refine_DP(RAWIspCamInfo const& rCamInfo, ISP_NVRAM_DP_T& rDP)
{
if (ECamMode_FB_PostProcess_NR2_Only == rCamInfo.eCamMode) { // Disable DP in FB
::memset(rDP.set, 0, sizeof(ISP_NVRAM_DP_T));
}
}
/*******************************************************************************
*
*******************************************************************************/
MVOID
IspTuningCustom::
refine_NR2(RAWIspCamInfo const& rCamInfo, ISP_NVRAM_NR2_T& rNR2)
{
// (1) Check to see if it works or not.
if ( ECamMode_Offline_Capture_Pass1 == rCamInfo.eCamMode )
{ // Usually, NR2 is disabled in capture pass1.
// Of course, you can do what you want.
#if 1
::memset(rNR2.set, 0, sizeof(ISP_NVRAM_NR2_T));
#endif
return;
}
// (2) HDR Mode.
if ( ECamMode_HDR_Cap_Pass2 == rCamInfo.eCamMode )
{ // TODO: Add your code below...
rNR2.lce_gain.bits.LCE_LINK = 1;
rNR2.lce_gain.bits.LCE_GAIN0 = 0x8;
rNR2.lce_gain.bits.LCE_GAIN1 = 0xc;
rNR2.lce_gain.bits.LCE_GAIN2 = 0xe;
rNR2.lce_gain.bits.LCE_GAIN3 = 0x10;
rNR2.lce_gain_div.bits.LCE_GAIN_DIV0 = 0x10;
rNR2.lce_gain_div.bits.LCE_GAIN_DIV1 = 0xb;
rNR2.lce_gain_div.bits.LCE_GAIN_DIV2 = 0x9;
rNR2.lce_gain_div.bits.LCE_GAIN_DIV3 = 0x8;
switch(rCamInfo.eIdx_ISO)
{
case eIDX_ISO_100:
rNR2.ctrl.bits.ENY = 1;
rNR2.ctrl.bits.MODE = 1;
rNR2.ctrl.bits.IIR_MODE = 1;
rNR2.cfg2.bits.GNY = 8;
rNR2.cfg2.bits.GNC = 8;
rNR2.mode1_cfg1.bits.GNY_H = 5;
rNR2.mode1_cfg1.bits.GNC_H = 8;
rNR2.mode1_cfg1.bits.C_V_FLT2 = 1;
rNR2.mode1_cfg1.bits.C_V_FLT3 = 1;
rNR2.mode1_cfg1.bits.C_V_FLT4 = 1;
rNR2.mode1_cfg1.bits.C_V_FLT5 = 1;
rNR2.mode1_cfg2.bits.Y_H_FLT4 = 1;
rNR2.mode1_cfg2.bits.Y_H_FLT5 = 1;
rNR2.mode1_cfg2.bits.Y_H_FLT6 = 1;
break;
case eIDX_ISO_200:
rNR2.ctrl.bits.ENY = 1;
rNR2.ctrl.bits.MODE = 1;
rNR2.ctrl.bits.IIR_MODE = 1;
rNR2.cfg2.bits.GNY = 8;
rNR2.cfg2.bits.GNC = 8;
rNR2.mode1_cfg1.bits.GNY_H = 5;
rNR2.mode1_cfg1.bits.GNC_H = 8;
rNR2.mode1_cfg1.bits.C_V_FLT2 = 1;
rNR2.mode1_cfg1.bits.C_V_FLT3 = 1;
rNR2.mode1_cfg1.bits.C_V_FLT4 = 1;
rNR2.mode1_cfg1.bits.C_V_FLT5 = 1;
rNR2.mode1_cfg2.bits.Y_H_FLT4 = 1;
rNR2.mode1_cfg2.bits.Y_H_FLT5 = 1;
rNR2.mode1_cfg2.bits.Y_H_FLT6 = 1;
break;
case eIDX_ISO_400:
rNR2.ctrl.bits.ENY = 1;
rNR2.ctrl.bits.MODE = 1;
rNR2.ctrl.bits.IIR_MODE = 1;
rNR2.cfg2.bits.GNY = 8;
rNR2.cfg2.bits.GNC = 8;
rNR2.mode1_cfg1.bits.GNY_H = 5;
rNR2.mode1_cfg1.bits.GNC_H = 8;
rNR2.mode1_cfg1.bits.C_V_FLT2 = 1;
rNR2.mode1_cfg1.bits.C_V_FLT3 = 1;
rNR2.mode1_cfg1.bits.C_V_FLT4 = 1;
rNR2.mode1_cfg1.bits.C_V_FLT5 = 1;
rNR2.mode1_cfg2.bits.Y_H_FLT4 = 1;
rNR2.mode1_cfg2.bits.Y_H_FLT5 = 1;
rNR2.mode1_cfg2.bits.Y_H_FLT6 = 1;
break;
case eIDX_ISO_800:
case eIDX_ISO_1600:
rNR2.ctrl.bits.ENY = 1;
rNR2.ctrl.bits.MODE = 1;
rNR2.ctrl.bits.IIR_MODE = 1;
rNR2.cfg2.bits.GNY = 8;
rNR2.cfg2.bits.GNC = 8;
rNR2.mode1_cfg1.bits.GNY_H = 5;
rNR2.mode1_cfg1.bits.GNC_H = 8;
rNR2.mode1_cfg1.bits.C_V_FLT2 = 1;
rNR2.mode1_cfg1.bits.C_V_FLT3 = 1;
rNR2.mode1_cfg1.bits.C_V_FLT4 = 1;
rNR2.mode1_cfg1.bits.C_V_FLT5 = 1;
rNR2.mode1_cfg2.bits.Y_H_FLT4 = 1;
rNR2.mode1_cfg2.bits.Y_H_FLT5 = 1;
rNR2.mode1_cfg2.bits.Y_H_FLT6 = 1;
break;
default:
/*
rNR2.ctrl.bits.ENY = rNR2.ctrl.bits.ENY;
rNR2.ctrl.bits.MODE = rNR2.ctrl.bits.MODE;
rNR2.ctrl.bits.IIR_MODE = rNR2.ctrl.bits.IIR_MODE;
rNR2.cfg2.bits.GNY = rNR2.cfg2.bits.GNY;
rNR2.cfg2.bits.GNC = rNR2.cfg2.bits.GNC;
rNR2.mode1_cfg1.bits.GNY_H = rNR2.mode1_cfg1.bits.GNY_H;
rNR2.mode1_cfg1.bits.GNC_H = rNR2.mode1_cfg1.bits.GNC_H;
rNR2.mode1_cfg1.bits.C_V_FLT2 = rNR2.mode1_cfg1.bits.C_V_FLT2;
rNR2.mode1_cfg1.bits.C_V_FLT3 = rNR2.mode1_cfg1.bits.C_V_FLT3;
rNR2.mode1_cfg1.bits.C_V_FLT4 = rNR2.mode1_cfg1.bits.C_V_FLT4;
rNR2.mode1_cfg1.bits.C_V_FLT5 = rNR2.mode1_cfg1.bits.C_V_FLT5;
rNR2.mode1_cfg2.bits.Y_H_FLT4 = rNR2.mode1_cfg2.bits.Y_H_FLT4;
rNR2.mode1_cfg2.bits.Y_H_FLT5 = rNR2.mode1_cfg2.bits.Y_H_FLT5;
rNR2.mode1_cfg2.bits.Y_H_FLT6 = rNR2.mode1_cfg2.bits.Y_H_FLT6;
*/
break;
}
return;
}
// (3) Face Beautifier Mode
if (ECamMode_FB_PostProcess_NR2_Only == rCamInfo.eCamMode)
{
// CAM+0500H: NR2 Control Register
rNR2.ctrl.val = 0x00000000;
rNR2.ctrl.bits.ENY = 1;
rNR2.ctrl.bits.ENC = 1;
rNR2.ctrl.bits.MODE = 1;
rNR2.ctrl.bits.IIR_MODE = 1;
// CAM+0504H: NR2 Common Configuration Register 1
rNR2.cfg1.val = 0x00000000;
rNR2.cfg1.bits.Y_DP_MIN_TH = 0x14;
rNR2.cfg1.bits.Y_DP_MAX_TH = 0x14;
rNR2.cfg1.bits.Y_DP_EN = 0x01;
rNR2.cfg1.bits.YUV444_MODE = 0;
//rNR2.cfg1.bits.C_SM = 0;
//rNR2.cfg1.bits.QEC = 0;
// CAM+0508H: NR2 Configuration Register 2
rNR2.cfg2.val = 0x00000000;
rNR2.cfg2.bits.GNC = 0x03;
rNR2.cfg2.bits.GNY = 0x08;
rNR2.cfg2.bits.SC1 = 0x07;
rNR2.cfg2.bits.SY1 = 0x07;
rNR2.cfg2.bits.S3 = 0x02;
rNR2.cfg2.bits.S2 = 0x02;
rNR2.cfg2.bits.UV_SMPL = 0x02;
// CAM+050CH: NR2 Configuration Register 3
rNR2.pty.val = 0x00000000;
rNR2.pty.bits.PTY4 = 0x3f;
rNR2.pty.bits.PTY3 = 0x30;
rNR2.pty.bits.PTY2 = 0x21;
rNR2.pty.bits.PTY1 = 0x13;
// CAM+0510H: NR2 Configuration Register 4
rNR2.ptc.val = 0x00000000;
rNR2.ptc.bits.PTC4 = 0x0f;
rNR2.ptc.bits.PTC3 = 0x08;
rNR2.ptc.bits.PTC2 = 0x08;
rNR2.ptc.bits.PTC1 = 0x04;
// CAM+0514H: NR2 Common Configuration Register 2
rNR2.luma.val = 0x00000000;
rNR2.luma.bits.LUMA_AVG = 0;
rNR2.luma.bits.LUMA_LUTY5 = 0x01;
rNR2.luma.bits.LUMA_LUTY4 = 0x06;
rNR2.luma.bits.LUMA_LUTY3 = 0x0a;
rNR2.luma.bits.LUMA_LUTY2 = 0x10;
rNR2.luma.bits.LUMA_LUTY1 = 0x10;
// CAM+0518H: NR2 LCE Configuration Register 1
rNR2.lce_gain.val = 0x00000000;
rNR2.lce_gain.bits.LCE_GAIN3 = 0x08;
rNR2.lce_gain.bits.LCE_GAIN2 = 0x08;
rNR2.lce_gain.bits.LCE_GAIN1 = 0x08;
rNR2.lce_gain.bits.LCE_GAIN0 = 0x08;
rNR2.lce_gain.bits.LCE_LINK = 0;
// CAM+051CH: NR2 LCE Configuration Register 2
rNR2.lce_gain_div.val = 0x00000000;
rNR2.lce_gain_div.bits.LCE_GAIN_DIV3 = 0x10;
rNR2.lce_gain_div.bits.LCE_GAIN_DIV2 = 0x10;
rNR2.lce_gain_div.bits.LCE_GAIN_DIV1 = 0x10;
rNR2.lce_gain_div.bits.LCE_GAIN_DIV0 = 0x10;
// CAM+0520H: NR2 Mode1 Configuration Register 1
rNR2.mode1_cfg1.val = 0x00000000;
rNR2.mode1_cfg1.bits.GNC_H = 0x08;
rNR2.mode1_cfg1.bits.GNY_H = 0x05;
rNR2.mode1_cfg1.bits.Y_V_FLT4 = 0x03;
rNR2.mode1_cfg1.bits.Y_V_FLT3 = 0x02;
rNR2.mode1_cfg1.bits.Y_V_FLT2 = 0x01;
rNR2.mode1_cfg1.bits.Y_V_FLT1 = 0x01;
rNR2.mode1_cfg1.bits.C_V_FLT5 = 0x03;
rNR2.mode1_cfg1.bits.C_V_FLT4 = 0x03;
rNR2.mode1_cfg1.bits.C_V_FLT3 = 0x02;
rNR2.mode1_cfg1.bits.C_V_FLT2 = 0x02;
rNR2.mode1_cfg1.bits.C_V_FLT1 = 0x01;
// CAM+0524H: NR2 Mode1 Configuration Register 2
rNR2.mode1_cfg2.val = 0x00000000;
rNR2.mode1_cfg2.bits.Y_H_FLT6 = 0x03;
rNR2.mode1_cfg2.bits.Y_H_FLT5 = 0x02;
rNR2.mode1_cfg2.bits.Y_H_FLT4 = 0x02;
rNR2.mode1_cfg2.bits.Y_H_FLT3 = 0x01;
rNR2.mode1_cfg2.bits.Y_H_FLT2 = 0x01;
rNR2.mode1_cfg2.bits.Y_H_FLT1 = 0x01;
// CAM+0528H: NR2 Mode1 Configuration Register 3
rNR2.mode1_cfg3.val = 0x00000000;
rNR2.mode1_cfg3.bits.H_PTY4 = 0x3f;
rNR2.mode1_cfg3.bits.H_PTY3 = 0x30;
rNR2.mode1_cfg3.bits.H_PTY2 = 0x21;
rNR2.mode1_cfg3.bits.H_PTY1 = 0x13;
}
}
/*******************************************************************************
*
*******************************************************************************/
MVOID
IspTuningCustom::
refine_DM(RAWIspCamInfo const& rCamInfo, ISP_NVRAM_DEMOSAIC_T& rDM)
{
// (1) Check to see if it works or not.
if ( ECamMode_Offline_Capture_Pass1 == rCamInfo.eCamMode )
return; // It does not work in capture pass1.
// (2) TODO: Add your code below...
}
/*******************************************************************************
*
*******************************************************************************/
MVOID
IspTuningCustom::
refine_EE(RAWIspCamInfo const& rCamInfo, ISP_NVRAM_EE_T& rEE)
{
// (1) Check to see if it works or not.
if ( ECamMode_Offline_Capture_Pass1 == rCamInfo.eCamMode )
return; // It does not work in capture pass1.
// (2) HDR Mode.
if ( ECamMode_HDR_Cap_Pass2 == rCamInfo.eCamMode )
{ // TODO: Add your code below...
return;
}
// (3) TODO: Add your code below...
}
/*******************************************************************************
*
*******************************************************************************/
MVOID
IspTuningCustom::
refine_Saturation(RAWIspCamInfo const& rCamInfo, ISP_NVRAM_SATURATION_T& rSaturation)
{
// (1) Check to see if it works or not.
if ( ECamMode_Offline_Capture_Pass1 == rCamInfo.eCamMode )
return; // It does not work in capture pass1.
// (2) HDR Mode.
if ( ECamMode_HDR_Cap_Pass2 == rCamInfo.eCamMode )
{
MINT8 icTempG1 = 0, icTempG2 = 0, icTempG3 = 0, icTempG4 = 0, icTempG5 = 0;
switch(rCamInfo.eIdx_ISO)
{
case eIDX_ISO_100:
icTempG1 = 0x00;
icTempG2 = 0x00;
icTempG3 = 0x00;
icTempG4 = 0x00;
icTempG5 = 0x00;
break;
case eIDX_ISO_200:
icTempG1 = 0x00;
icTempG2 = 0x00;
icTempG3 = 0x00;
icTempG4 = 0x00;
icTempG5 = 0x00;
break;
case eIDX_ISO_400:
icTempG1 = 0x00;
icTempG2 = 0x00;
icTempG3 = 0x00;
icTempG4 = 0x00;
icTempG5 = 0x00;
break;
case eIDX_ISO_800:
icTempG1 = 0x00;
icTempG2 = 0x00;
icTempG3 = 0x00;
icTempG4 = 0x00;
icTempG5 = 0x00;
break;
case eIDX_ISO_1600:
icTempG1 = 0x00;
icTempG2 = 0x00;
icTempG3 = 0x00;
icTempG4 = 0x00;
icTempG5 = 0x00;
break;
default:
//icTempG1 = 0x00;
//icTempG2 = 0x00;
//icTempG3 = 0x00;
//icTempG4 = 0x00;
//icTempG5 = 0x00;
break;
}
rSaturation.gain.bits.G1 = (rSaturation.gain.bits.G1 > icTempG1) ? (rSaturation.gain.bits.G1 - icTempG1) : 0;
rSaturation.gain.bits.G2 = (rSaturation.gain.bits.G2 > icTempG2) ? (rSaturation.gain.bits.G2 - icTempG2) : 0;
rSaturation.gain.bits.G3 = (rSaturation.gain.bits.G3 > icTempG3) ? (rSaturation.gain.bits.G3 - icTempG3) : 0;
rSaturation.gain.bits.G4 = (rSaturation.gain.bits.G4 > icTempG4) ? (rSaturation.gain.bits.G4 - icTempG4) : 0;
rSaturation.gain_ofs.bits.G5 = (rSaturation.gain_ofs.bits.G5 > icTempG5) ? (rSaturation.gain_ofs.bits.G5 - icTempG5) : 0;
return;
}
}
/*******************************************************************************
*
*******************************************************************************/
MVOID
IspTuningCustom::
refine_Contrast(RAWIspCamInfo const& rCamInfo, ISP_NVRAM_CONTRAST_T& rContrast)
{
// (1) Check to see if it works or not.
if ( ECamMode_Offline_Capture_Pass1 == rCamInfo.eCamMode )
return; // It does not work in capture pass1.
// (2) HDR Mode.
if ( ECamMode_HDR_Cap_Pass2 == rCamInfo.eCamMode )
{ // TODO: Add your code below...
return;
}
// (3) TODO: Add your code below...
}
/*******************************************************************************
*
*******************************************************************************/
MVOID
IspTuningCustom::
refine_Hue(RAWIspCamInfo const& rCamInfo, ISP_NVRAM_HUE_T& rHue)
{
// (1) Check to see if it works or not.
if ( ECamMode_Offline_Capture_Pass1 == rCamInfo.eCamMode )
return; // It does not work in capture pass1.
// (2) HDR Mode.
if ( ECamMode_HDR_Cap_Pass2 == rCamInfo.eCamMode )
{ // TODO: Add your code below...
return;
}
// (3) TODO: Add your code below...
}
/*******************************************************************************
*
*******************************************************************************/
MVOID
IspTuningCustom::
refine_CCM(RAWIspCamInfo const& rCamInfo, ISP_NVRAM_CCM_T& rCCM)
{
// (1) Check to see if it works or not.
if ( ECamMode_Offline_Capture_Pass1 == rCamInfo.eCamMode )
return; // It does not work in capture pass1.
// (2) TODO: Add your code below...
if ( ECamMode_Online_Preview == rCamInfo.eCamMode ||
ECamMode_Video == rCamInfo.eCamMode ||
ECamMode_Online_Capture == rCamInfo.eCamMode ||
ECamMode_Online_Capture_ZSD == rCamInfo.eCamMode ||
ECamMode_Online_Preview_ZSD == rCamInfo.eCamMode ||
ECamMode_Offline_Capture_Pass2 == rCamInfo.eCamMode ||
ECamMode_HDR_Cap_Pass1_SF == rCamInfo.eCamMode || // refine_CCM() should also be applied to HDR.
ECamMode_HDR_Cap_Pass2 == rCamInfo.eCamMode)
{
}
}
/*******************************************************************************
*
*******************************************************************************/
MVOID
IspTuningCustom::
refine_OB(RAWIspCamInfo const& rCamInfo, ISP_NVRAM_OB_T& rOB)
{
switch (rCamInfo.eCamMode)
{
// NORMAL
case ECamMode_Online_Preview:
case ECamMode_Video:
case ECamMode_Online_Capture:
case ECamMode_Online_Capture_ZSD:
case ECamMode_Online_Preview_ZSD:
case ECamMode_Offline_Capture_Pass1:
// HDR
case ECamMode_HDR_Cap_Pass1_SF: // HDR Pass1: Single Frame
case ECamMode_HDR_Cap_Pass1_MF1: // HDR Pass1: Multi Frame Stage1
// TODO: Add your code below...
break;
default:
// Neen't apply OB since it has been applied in pass1.
::memset(rOB.set, 0, sizeof(rOB));
break;
}
}
/*******************************************************************************
*
*******************************************************************************/
MVOID
IspTuningCustom::
refine_GammaECO(RAWIspCamInfo const& rCamInfo, ISP_NVRAM_GAMMA_ECO_T& rGammaECO)
{
// Enable gamma ECO
//rGammaECO.gamma_eco_en.bits.GMA_ECO_EN = 1;
}
/*******************************************************************************
*
*******************************************************************************/
MVOID
IspTuningCustom::
refine_RGB2YCC_YOfst(RAWIspCamInfo const& rCamInfo, ISP_NVRAM_RGB2YCC_YOFST_T& rRGB2YCC_YOfst)
{
// Adjust Y offset
//rRGB2YCC_YOfst.rgb2ycc_yofst.bits.YOFST = 3;
}
/*******************************************************************************
*
*******************************************************************************/
MVOID
IspTuningCustom::
refine_ColorClip(RAWIspCamInfo const& rCamInfo, ISP_NVRAM_CCLIP_T& rColorClip)
{
/*
// CCLIP_CON CAM+00CCH
rColorClip.cclip_ctrl.bits.EN = 1;
// CCLIP_GTC CAM+00D0H
rColorClip.cclip_gtc.bits.CCLIP_TC = 0x332;
// CCLIP_ADC CAM+00D4H
rColorClip.cclip_adc.bits.CCLIP_D_TH1 = 0x200;
rColorClip.cclip_adc.bits.CCLIP_D_SLOPE = 0x13;
// CCLIP_BAC CAM+00D8H
rColorClip.cclip_bac.bits.CCLIP_B_OFFSET = 0x014;
rColorClip.cclip_bac.bits.CCLIP_B_SLOPE = 0x2;
rColorClip.cclip_bac.bits.CCLIP_B_DIFF = 0x100;
*/
}
/*******************************************************************************
*
*******************************************************************************/
MVOID
IspTuningCustom::
prepare_edge_gamma(ISP_NVRAM_EDGE_GAMMA_T& rEGamma)
{
rEGamma.ctrl.bits.ED_GM_EN = 1;
rEGamma.cfg1.bits.EGAMMA_B1 = 0x45;
rEGamma.cfg1.bits.EGAMMA_B2 = 0x72;
rEGamma.cfg1.bits.EGAMMA_B3 = 0x90;
rEGamma.cfg1.bits.EGAMMA_B4 = 0xA6;
rEGamma.cfg2.bits.EGAMMA_B5 = 0xC4;
rEGamma.cfg2.bits.EGAMMA_B6 = 0xD7;
rEGamma.cfg2.bits.EGAMMA_B7 = 0xE6;
rEGamma.cfg2.bits.EGAMMA_B8 = 0xF1;
rEGamma.cfg3.bits.EGAMMA_B9 = 0xF5;
rEGamma.cfg3.bits.EGAMMA_B10= 0xF9;
rEGamma.cfg3.bits.EGAMMA_B11= 0xFC;
}
/*******************************************************************************
*
* eIdx_CCM_CCT_old:
* [in] the previous color temperature index
* eIDX_CCM_CCT_TL84
* eIDX_CCM_CCT_CWF
* eIDX_CCM_CCT_D65
*
* i4CCT:
* [in] the current color temperature from 3A.
*
* i4FluorescentIndex:
* [in] the current fluorescent index
*
* return:
* [out] the current color temperature index
* eIDX_CCM_CCT_TL84
* eIDX_CCM_CCT_CWF
* eIDX_CCM_CCT_D65
*
*******************************************************************************/
EIndex_CCM_CCT_T
IspTuningCustom::
evaluate_CCM_CCT_index (
EIndex_CCM_CCT_T const eIdx_CCM_CCT_old,
MINT32 const i4CCT,
MINT32 const i4FluorescentIndex
) const
{
MY_LOG(
"[+evaluate_CCM_CCT_index]"
"(eIdx_CCM_CCT_old, i4CCT, i4FluorescentIndex)=(%d, %d, %d)"
, eIdx_CCM_CCT_old, i4CCT, i4FluorescentIndex
);
EIndex_CCM_CCT_T eIdx_CCM_CCT_new = eIdx_CCM_CCT_old;
// -----------------|---|---|--------------|---|---|------------------
// THA TH1 THB THC TH2 THD
MINT32 const THA = 3318;
MINT32 const TH1 = 3484;
MINT32 const THB = 3667;
MINT32 const THC = 4810;
MINT32 const TH2 = 5050;
MINT32 const THD = 5316;
MINT32 const F_IDX_TH1 = 25;
MINT32 const F_IDX_TH2 = -25;
#if 1
switch (eIdx_CCM_CCT_old)
{
case eIDX_CCM_CCT_TL84:
LOGD("[meimei][CCT_old]eIDX_CCM_CCT_TL84=%d",eIdx_CCM_CCT_old);
if ( i4CCT < THA )
{
eIdx_CCM_CCT_new = eIDX_CCM_CCT_TL84;
}
else if ( i4CCT < THD )
{
eIdx_CCM_CCT_new = eIDX_CCM_CCT_CWF;
}
else
{
eIdx_CCM_CCT_new = eIDX_CCM_CCT_D65;
}
LOGD("[meimei][CCT_new]eIDX_CCM_CCT_TL84=%d",eIdx_CCM_CCT_new);
break;
case eIDX_CCM_CCT_CWF:
LOGD("[meimei][CCT_old]eIDX_CCM_CCT_CWF=%d",eIdx_CCM_CCT_old);
if ( i4CCT < THA )
{
eIdx_CCM_CCT_new = eIDX_CCM_CCT_TL84;
}
else if ( i4CCT < THD )
{
eIdx_CCM_CCT_new = eIDX_CCM_CCT_CWF;
}
else
{
eIdx_CCM_CCT_new = eIDX_CCM_CCT_D65;
}
LOGD("[meimei][CCT_new]eIDX_CCM_CCT_CWF=%d",eIdx_CCM_CCT_new);
break;
case eIDX_CCM_CCT_D65:
LOGD("[meimei][CCT_old]eIDX_CCM_CCT_D65=%d",eIdx_CCM_CCT_old);
if ( i4CCT > THC )
{
eIdx_CCM_CCT_new = eIDX_CCM_CCT_D65;
}
else if ( i4CCT > TH1 )
{
eIdx_CCM_CCT_new = eIDX_CCM_CCT_CWF;
}
else
{
eIdx_CCM_CCT_new = eIDX_CCM_CCT_TL84;
}
LOGD("[meimei][CCT_new]eIDX_CCM_CCT_D65=%d",eIdx_CCM_CCT_new);
break;
}
#else
switch (eIdx_CCM_CCT_old)
{
case eIDX_CCM_CCT_TL84:
if ( i4CCT < THB )
{
eIdx_CCM_CCT_new = eIDX_CCM_CCT_TL84;
}
else if ( i4CCT < THD )
{
if ( i4FluorescentIndex < F_IDX_TH2 )
eIdx_CCM_CCT_new = eIDX_CCM_CCT_CWF;
else
eIdx_CCM_CCT_new = eIDX_CCM_CCT_TL84;
}
else
{
eIdx_CCM_CCT_new = eIDX_CCM_CCT_D65;
}
break;
case eIDX_CCM_CCT_CWF:
if ( i4CCT < THA )
{
eIdx_CCM_CCT_new = eIDX_CCM_CCT_TL84;
}
else if ( i4CCT < THD )
{
if ( i4FluorescentIndex > F_IDX_TH1 )
eIdx_CCM_CCT_new = eIDX_CCM_CCT_TL84;
else
eIdx_CCM_CCT_new = eIDX_CCM_CCT_CWF;
}
else
{
eIdx_CCM_CCT_new = eIDX_CCM_CCT_D65;
}
break;
case eIDX_CCM_CCT_D65:
if ( i4CCT > THC )
{
eIdx_CCM_CCT_new = eIDX_CCM_CCT_D65;
}
else if ( i4CCT > TH1 )
{
if(i4FluorescentIndex > F_IDX_TH2)
eIdx_CCM_CCT_new = eIDX_CCM_CCT_TL84;
else
eIdx_CCM_CCT_new = eIDX_CCM_CCT_CWF;
}
else
{
eIdx_CCM_CCT_new = eIDX_CCM_CCT_TL84;
}
break;
}
#endif
//#if ENABLE_MY_LOG
if ( eIdx_CCM_CCT_old != eIdx_CCM_CCT_new )
{
LOGD(
"[-evaluate_CCM_CCT_index] CCM CCT Idx(old,new)=(%d,%d)"
, eIdx_CCM_CCT_old, eIdx_CCM_CCT_new
);
}
//#endif
//meimei: back up FluorescentIndex
m_i4FluorescentIndex = i4FluorescentIndex;
return eIdx_CCM_CCT_new;
}
/*******************************************************************************
*
* eIdx_Shading_CCT_old:
* [in] the previous color temperature index
* eIDX_Shading_CCT_ALight
* eIDX_Shading_CCT_CWF
* eIDX_Shading_CCT_D65
*
* i4CCT:
* [in] the current color temperature from 3A.
*
*
* return:
* [out] the current color temperature index
* eIDX_Shading_CCT_ALight
* eIDX_Shading_CCT_CWF
* eIDX_Shading_CCT_D65
*
*******************************************************************************/
EIndex_Shading_CCT_T
IspTuningCustom::
evaluate_Shading_CCT_index (
EIndex_Shading_CCT_T const eIdx_Shading_CCT_old,
MINT32 const i4CCT,
MINT32 const i4DaylightFluorescentIndex,
MINT32 const i4DaylightProb,
MINT32 const i4DaylightFluorescentProb,
MINT32 const i4SceneLV
) const
{
MY_LOG(
"[+evaluate_Shading_CCT_index]"
"(eIdx_Shading_CCT_old, i4CCT, i4DaylightFluorescentIndex, i4DaylightProb, i4DaylightFluorescentProb, i4SceneLV)="
"(%d, %d, %d, %d, %d, %d)"
, eIdx_Shading_CCT_old, i4CCT, i4DaylightFluorescentIndex, i4DaylightProb, i4DaylightFluorescentProb, i4SceneLV
);
EIndex_Shading_CCT_T eIdx_Shading_CCT_new = eIdx_Shading_CCT_old;
// -----------------|----|----|--------------|----|----|------------------
// THH2 TH2 THL2 THH1 TH1 THL1
MINT32 const THL1 = 3257;
MINT32 const THH1 = 3484;
MINT32 const TH1 = (THL1+THH1)/2; //(THL1 +THH1)/2
MINT32 const THL2 = 4673;
MINT32 const THH2 = 5155;
MINT32 const TH2 = (THL2+THH2)/2;//(THL2 +THH2)/2
switch (eIdx_Shading_CCT_old)
{
case eIDX_Shading_CCT_ALight:
if ( i4CCT < THH1 )
{
eIdx_Shading_CCT_new = eIDX_Shading_CCT_ALight;
}
else if ( i4CCT < TH2)
{
eIdx_Shading_CCT_new = eIDX_Shading_CCT_CWF;
}
else
{
eIdx_Shading_CCT_new = eIDX_Shading_CCT_D65;
}
break;
case eIDX_Shading_CCT_CWF:
if ( i4CCT < THL1 )
{
eIdx_Shading_CCT_new = eIDX_Shading_CCT_ALight;
}
else if ( i4CCT < THH2 )
{
eIdx_Shading_CCT_new = eIDX_Shading_CCT_CWF;
}
else
{
eIdx_Shading_CCT_new = eIDX_Shading_CCT_D65;
}
break;
case eIDX_Shading_CCT_D65:
if ( i4CCT < TH1 )
{
eIdx_Shading_CCT_new = eIDX_Shading_CCT_ALight;
}
else if ( i4CCT < THL2 )
{
eIdx_Shading_CCT_new = eIDX_Shading_CCT_CWF;
}
else
{
eIdx_Shading_CCT_new = eIDX_Shading_CCT_D65;
}
break;
}
//meimei: back up DaylightFluorescentIndex
m_i4DaylightFluorescentIndex = i4DaylightFluorescentIndex;
//meimei hack
if (eIdx_Shading_CCT_new == eIDX_Shading_CCT_D65)
{
//if (m_i4FluorescentIndex < DAYLIGHT_F_IDX|| m_i4DaylightFluorescentIndex<DAYLIGHT_F2_IDX)
if (m_i4DaylightFluorescentIndex < 80&& i4CCT<6000)
{
LOGD
(
"[meimei Hack shading!! m_i4FluorescentIndex = %d\n"
,m_i4FluorescentIndex
);
eIdx_Shading_CCT_new = eIDX_Shading_CCT_CWF;
}
}
//#if ENABLE_MY_LOG
// if ( eIdx_Shading_CCT_old != eIdx_Shading_CCT_new )
if (1)
{
LOGD(
"[-evaluate_Shading_CCT_index] Shading CCT Idx(old,new)=(%d,%d), i4CCT = %d\n"
, eIdx_Shading_CCT_old, eIdx_Shading_CCT_new,i4CCT
);
}
//#endif
return eIdx_Shading_CCT_new;
}
/*******************************************************************************
*
*******************************************************************************/
EIndex_ISO_T
IspTuningCustom::
map_ISO_value_to_index(MUINT32 const u4Iso) const
{
if ( u4Iso < 150 )
{
return eIDX_ISO_100;
}
else if ( u4Iso < 300 )
{
return eIDX_ISO_200;
}
else if ( u4Iso < 600 )
{
return eIDX_ISO_400;
}
else if ( u4Iso < 900 )
{
return eIDX_ISO_800;
}
return eIDX_ISO_1600;
}
/*******************************************************************************
*
* rCamInfo
* [in] ISP Camera Info for RAW sensor. Its members are as below:
*
* eIdx_Scene:
* SCENE_MODE_OFF, // Disable scene mode equal Auto mode
* SCENE_MODE_ACTION, // Action mode
* SCENE_MODE_PORTRAIT, // Portrait mode
* SCENE_MODE_LANDSCAPE, // Landscape
* SCENE_MODE_NIGHTSCENE, // Night Scene
* SCENE_MODE_NIGHTPORTRAIT, // Night Portrait
* SCENE_MODE_THEATRE, // Theatre mode
* SCENE_MODE_BEACH, // Beach mode
* SCENE_MODE_SNOW, // Snow mode
* SCENE_MODE_SUNSET, // Sunset mode
* SCENE_MODE_STEADYPHOTO, // Steady photo mode
* SCENE_MODE_FIREWORKS, // Fireworks mode
* SCENE_MODE_SPORTS, // Sports mode
* SCENE_MODE_PARTY, // Party mode
* SCENE_MODE_CANDLELIGHT, // Candle light mode
*
* u4ISOValue:
* ISO value to determine eISO.
*
* eIdx_ISO:
* eIDX_ISO_100,
* eIDX_ISO_200,
* eIDX_ISO_400,
* eIDX_ISO_800,
* eIDX_ISO_1600
*
* i4CCT:
* Correlated color temperature
*
* eCCTIndex_CCM:
* Correlated color temperature index for CCM
* eIDX_CCM_CCT_TL84
* eIDX_CCM_CCT_CWF
* eIDX_CCM_CCT_D65
*
* u4ZoomRatio_x100:
* zoom ratio (x100)
*
* i4LightValue_x10:
* light value (x10)
*
*
*******************************************************************************/
MBOOL
IspTuningCustom::
is_to_invoke_offline_capture(RAWIspCamInfo const& rCamInfo) const
{
#if 1
EIndex_Scene_T const eIdx_Scene = rCamInfo.eIdx_Scene;
EIndex_ISO_T const eIdx_ISO = rCamInfo.eIdx_ISO; // ISO enum
MUINT32 const u4ISOValue = rCamInfo.u4ISOValue; // real ISO
MUINT32 const i4CCT = rCamInfo.i4CCT;
MUINT32 const u4ZoomRatio_x100 = rCamInfo.u4ZoomRatio_x100;
MINT32 const i4LightValue_x10 = rCamInfo.i4LightValue_x10;
#endif
#if 0
switch (eIdx_ISO)
{
case eIDX_ISO_100:
case eIDX_ISO_200:
case eIDX_ISO_400:
case eIDX_ISO_800:
case eIDX_ISO_1600:
default:
break;
}
#endif
#if 0
if(eIdx_ISO==eIDX_ISO_400 ||eIdx_ISO==eIDX_ISO_800 || eIdx_ISO==eIDX_ISO_1600)
{
return MTRUE;
}
else
#endif
return MTRUE;
}
/*******************************************************************************
*
*******************************************************************************/
| [
"iicux@Fucking-laptop.(none)"
] | iicux@Fucking-laptop.(none) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.