blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 247 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2 values | repo_name stringlengths 4 111 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 58 | visit_date timestamp[ns]date 2015-07-25 18:16:41 2023-09-06 10:45:08 | revision_date timestamp[ns]date 1970-01-14 14:03:36 2023-09-06 06:22:19 | committer_date timestamp[ns]date 1970-01-14 14:03:36 2023-09-06 06:22:19 | github_id int64 3.89k 689M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 25 values | gha_event_created_at timestamp[ns]date 2012-06-07 00:51:45 2023-09-14 21:58:52 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-08-24 19:49:39 ⌀ | gha_language stringclasses 159 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 7 10.5M | extension stringclasses 111 values | filename stringlengths 1 195 | text stringlengths 7 10.5M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e1e83731ea6ecb83e830a3f057d18f5a8d83de15 | 48c93efbea5fd5abb2f668f7ee769bea6fe75be9 | /40ReadWrite/test5.cc | 85dcfa49421745e7ae1cb090cf6a156d1c60e1d7 | [] | no_license | ssmero/CSCE240 | f960f1a1a0b7bf5b2c7ee36a512a8a3e7ee435aa | 5fbfde18131fa8cd86a9c8467984e44660806cef | refs/heads/master | 2020-04-25T13:35:10.444038 | 2019-02-27T01:08:03 | 2019-02-27T01:08:03 | 172,814,202 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,536 | cc | test5.cc | #include <iostream> // std::cout
#include <fstream> // std::ifstream
using namespace std;
int main ()
{
int r2 = 16*16;
int r4 = r2*r2;
int r6 = r4*r2;
std::ofstream output ("rawbinary5.txt", std::ofstream::binary);
if (output)
{
char* buffer = new char [4];
for(int i = 1; i <= 24; i += 4)
{
int n = i + r2*(i+1) + r4*(i+2) + r6*(i+3);
buffer = reinterpret_cast<char*>(&n);
output.write(buffer, 4);
printf("%12d %08x\n", n, n);
}
output.close();
}
std::ifstream input ("rawbinary5.txt", std::ifstream::binary);
if (input)
{
char* buffer = new char[1];
for(int i = 0; i < 24; ++i)
{
input.read(buffer, 1); // read one character
char c = *buffer; // dereference
printf("CHAR X%2dX\n", c);
}
input.close();
}
std::ifstream input2 ("rawbinary5.txt", std::ifstream::binary);
if (input2)
{
char* buffer = new char[2];
for(int i = 0; i < 12; ++i)
{
input2.read(buffer, 2); // read two characters
short n = *buffer; // dereference
printf("SHORT %2d %2d %4d\n", buffer[0], buffer[1], n);
}
input2.close();
}
/*
std::ifstream input3 ("rawbinary5.txt", std::ifstream::binary);
if (input3)
{
char* buffer = new char[4];
buffer[0] = 0;
buffer[1] = 0;
buffer[2] = 0;
buffer[3] = 0;
for(int i = 0; i < 8; ++i)
{
input3.read(buffer, 3); // read three characters
int n = *buffer;
printf("THREE %2d %2d %2d %2d %4d\n", buffer[0], buffer[1], buffer[2], buffer[3], n);
}
input3.close();
}
*/
std::ifstream input4 ("rawbinary5.txt", std::ifstream::binary);
if (input4)
{
char* buffer = new char[4];
for(int i = 0; i < 6; ++i)
{
input4.read(buffer, 4); // read three characters
int n = r6*buffer[3] + r4*buffer[2] + r2*buffer[1] + buffer[0];
printf("FOUR %2d %2d %2d %2d %4d\n", buffer[0], buffer[1], buffer[2], buffer[3], n);
}
input4.close();
}
{
FILE *fp = fopen("rawbinary5.txt", "r");
char c;
printf("FILE ");
while ((c = getc(fp)) != EOF)
{
printf(" %2d", c);
}
printf("\n");
fclose(fp);
}
{
FILE *fp = fopen("rawbinary5.txt", "r");
int n;
for(int i = 0; i < 6; ++i)
{
fread(&n, 4, 1, fp);
printf("READ %2d %12d\n", i, n);
}
fclose(fp);
}
return 0;
}
|
460dd752680ed62065d7bf4635e66d7d6a959321 | a763f6505331d1c1823d0e8620cc2d5f83048486 | /wdm/capture/mini/bt848/scaler.cpp | 8761d746585fdd42a90a4f0ffd0424b2e9749a30 | [] | no_license | KernelPanic-OpenSource/Win2K3_NT_drivers | 1dc9ccd83e38299f6643ecfd996a5df1357cc912 | 1b5d2672673ff31b60ee4a5b96922ddbcc203749 | refs/heads/master | 2023-04-11T08:18:29.881663 | 2021-04-14T04:30:34 | 2021-04-14T04:30:34 | 357,772,205 | 12 | 5 | null | null | null | null | UTF-8 | C++ | false | false | 13,340 | cpp | scaler.cpp | // $Header: G:/SwDev/WDM/Video/bt848/rcs/Scaler.cpp 1.3 1998/04/29 22:43:40 tomz Exp $
#include "Scaler.h"
#include "S_constr.h"
// video information for PAL
VideoInfoStruct NTSCVideoInfo =
{
730, // Clkx1_HACTIVE = 746
148, // Clkx1_HDELAY = 140
44, // Min_Pixels = 44
240, // Active_lines_per_field = 240
144, // Min_UncroppedPixels = Min_Pixels + 100
724, // Max_Pixels = ((Clkx1_HACTIVE < 774) ? Clkx1_HACTIVE - 6 : 768)
32, // Min_Lines = (Active_lines_per_field / 16 + 1) * 2
240, // Max_Lines = Active_lines_per_field
352, // Max_VFilter1_Pixels = ((Clkx1_HACTIVE > 796) ? 384 : (Clkx1_HACTIVE * 14 / 29))
176, // Max_VFilter2_Pixels = Clkx1_HACTIVE * 8 / 33
176, // Max_VFilter3_Pixels = Clkx1_HACTIVE * 8 / 33
240, // Max_VFilter1_Lines = Active_lines_per_field
120, // Max_VFilter2_Lines = Active_lines_per_field / 2
96, // Max_VFilter3_Lines = Active_lines_per_field * 2 / 5
};
// video information for PAL
VideoInfoStruct PALVideoInfo =
{
914, // Clkx1_HACTIVE = 914
190, // Clkx1_HDELAY = 190
48, // Min_Pixels = 48
284, // Active_lines_per_field = 284
148, // Min_UncroppedPixels = Min_Pixels + 100
768, // Max_Pixels = ((Clkx1_HACTIVE < 774) ? Clkx1_HACTIVE - 6 : 768)
36, // Min_Lines = (Active_lines_per_field / 16 + 1) * 2
284, // Max_Lines = Active_lines_per_field
384, // Max_VFilter1_Pixels = ((Clkx1_HACTIVE > 796) ? 384 : (Clkx1_HACTIVE * 14 / 29))
221, // Max_VFilter2_Pixels = Clkx1_HACTIVE * 8 / 33
221, // Max_VFilter3_Pixels = Clkx1_HACTIVE * 8 / 33
284, // Max_VFilter1_Lines = Active_lines_per_field
142, // Max_VFilter2_Lines = Active_lines_per_field / 2
113, // Max_VFilter3_Lines = Active_lines_per_field * 2 / 5
};
//===========================================================================
// Bt848 Scaler Class Implementation
//===========================================================================
/////////////////////////////////////////////////////////////////////////////
// Constructor
/////////////////////////////////////////////////////////////////////////////
Scaler::Scaler( VidField field ):
CONSTRUCT_SCALER_REGISTERS( ( ( field == VF_Even ) ? 0 : 0x80 ) ),
// Since VDelay in hardware is reversed; i.e. odd reg is really even field
// and vice versa, construct the opposite here
regReverse_CROP ( (0x03 * 4) + ( ( field == VF_Even ) ? 0x80 : 0 ), RW ),
fieldVDELAY_MSB( regReverse_CROP, 6, 2, RW),
regVDELAY_LO ( (0x04 * 4) + ( ( field == VF_Even ) ? 0x80 : 0 ), RW ),
regVDelay( regVDELAY_LO, 8, fieldVDELAY_MSB, RW ),
m_videoFormat( VFormat_NTSC ), VFilterFlag_( On ),
m_ptrVideoIn( &NTSCVideoInfo )
{
m_HActive = 0;
m_pixels = 0;
m_lines = 0;
m_VFilter = 0;
// this seems to be the minimum needed for reliable CC capture
regVDelay = 0x1A;
}
/////////////////////////////////////////////////////////////////////////////
// Destructor
/////////////////////////////////////////////////////////////////////////////
Scaler::~Scaler()
{
}
/////////////////////////////////////////////////////////////////////////////
// Method: void Scaler::VideoFormatChanged( VideoFormat format )
// Purpose: Set which video format is using
// Input: Video format -
// Auto format: VFormat_AutoDetect
// NTSC (M): VFormat_NTSC
// PAL (B, D, G, H, I): VFormat_PAL_BDGHI
// PAL (M): VFormat_PAL_M
// PAL(N): VFormat_PAL_N
// SECAM: VFormat_SECAM
// Output: None
// Return: None
/////////////////////////////////////////////////////////////////////////////
void Scaler::VideoFormatChanged( VideoFormat format )
{
m_videoFormat = format;
}
/////////////////////////////////////////////////////////////////////////////
// Method: void Scaler::Scale( MRect & clientScr )
// Purpose: Perform scaling
// Input: MRect & clientScr - rectangle to scale to
// Output: None
// Return: None
/////////////////////////////////////////////////////////////////////////////
void Scaler::Scale( MRect & clientScr )
{
if ( m_videoFormat == VFormat_NTSC )
m_ptrVideoIn = &NTSCVideoInfo; // set scaling constants for NTSC
else
m_ptrVideoIn = &PALVideoInfo; // set scaling constants for PAL/SECAM
// the order of functions calling here is important because some
// calculations are based on previous results
SetHActive( clientScr );
SetVActive();
SetVScale( clientScr );
SetVFilter();
SetVDelay();
SetHDelay();
SetHScale();
SetHFilter();
}
/////////////////////////////////////////////////////////////////////////////
// Method: void Scaler::SetHActive( MRect & clientScr )
// Purpose: Set HActive register
// Input: MRect & clientScr - rectangle to scale to
// Output: None
// Return: None
/////////////////////////////////////////////////////////////////////////////
void Scaler::SetHActive( MRect & clientScr )
{
m_HActive = min( m_ptrVideoIn->Max_Pixels,
max( (WORD)clientScr.Width(), m_ptrVideoIn->Min_Pixels ) );
regHActive = m_HActive;
}
/////////////////////////////////////////////////////////////////////////////
// Method: void Scaler::SetHDelay( void )
// Purpose: Set HDelay register
// Input: None
// Output: None
// Return: None
/////////////////////////////////////////////////////////////////////////////
void Scaler::SetHDelay( void )
{
// calculations here requires calculation of HActive first!
m_pixels = m_HActive;
if ( m_pixels < m_ptrVideoIn->Min_UncroppedPixels )
m_pixels += (WORD) ( ( m_ptrVideoIn->Min_UncroppedPixels - m_pixels + 9 ) / 10 );
LONG a = (LONG)m_pixels * (LONG)m_ptrVideoIn->Clkx1_HDELAY;
LONG b = (LONG)m_ptrVideoIn->Clkx1_HACTIVE * 2L;
WORD HDelay = (WORD) ( ( a + (LONG)m_ptrVideoIn->Clkx1_HACTIVE * 2 - 1) / b * 2L );
// now add the cropping region into HDelay register; i.e. skip some pixels
// before we start taking them as real image
HDelay += (WORD)AnalogWin_.left;
// HDelay must be even or else color would be wrong
HDelay &= ~01;
regHDelay = HDelay;
// since we increase HDelay, we should decrease HActive by the same amount
m_HActive -= (WORD)AnalogWin_.left;
regHActive = m_HActive;
}
/////////////////////////////////////////////////////////////////////////////
// Method: void Scaler::SetHScale( void )
// Purpose: Set HScale register
// Input: None
// Output: None
// Return: None
/////////////////////////////////////////////////////////////////////////////
void Scaler::SetHScale( void )
{
regHScale = (WORD) ( ( ( (LONG)m_ptrVideoIn->Clkx1_HACTIVE * 4096L ) /
(LONG)m_pixels ) - 4096L );
}
/////////////////////////////////////////////////////////////////////////////
// Method: void Scaler::SetHFilter( void )
// Purpose: Set HFilt register field
// Input: None
// Output: None
// Return: None
/////////////////////////////////////////////////////////////////////////////
void Scaler::SetHFilter( void )
{
if ( m_videoFormat != VFormat_SECAM )
fieldHFILT = HFilter_AutoFormat;
else // SECAM
if ( m_pixels < m_ptrVideoIn->Clkx1_HACTIVE / 7 )
fieldHFILT = HFilter_ICON;
else
fieldHFILT = HFilter_QCIF;
}
/////////////////////////////////////////////////////////////////////////////
// Method: void Scaler::SetVScale( MRect & clientScr )
// Purpose: Set VScale register
// Input: MRect & clientScr - rectangle to scale to
// Output: None
// Return: None
/////////////////////////////////////////////////////////////////////////////
void Scaler::SetVScale( MRect & clientScr )
{
m_lines = min( m_ptrVideoIn->Max_Lines,
max( (WORD)clientScr.Height(), m_ptrVideoIn->Min_Lines ) );
WORD LPB_VScale_Factor = (WORD) ( 1 + ( m_lines - 1 ) / m_ptrVideoIn->Active_lines_per_field );
m_lines = (WORD) ( ( m_lines + LPB_VScale_Factor - 1 ) / LPB_VScale_Factor );
LONG a = (LONG)m_ptrVideoIn->Active_lines_per_field * 512L / (LONG)m_lines;
WORD VScale = (WORD) ( ( 0x10000L - a + 512L ) & 0x1FFFL );
regVScale = VScale;
}
/////////////////////////////////////////////////////////////////////////////
// Method: void Scaler::SetVDelay( void )
// Purpose: Set VDelay register
// Input: None
// Output: None
// Return: None
/////////////////////////////////////////////////////////////////////////////
void Scaler::SetVDelay( void )
{
WORD VDelay, moreDelay;
// increase VDelay will eliminate garbage lines at top of image
switch ( m_VFilter )
{
case 3:
moreDelay = 4;
break;
case 2:
moreDelay = 2;
break;
case 1:
case 0:
default:
moreDelay = 0;
break;
}
if ( m_videoFormat == VFormat_NTSC )
VDelay = 0x001A + moreDelay; // NTSC
else
VDelay = 0x0026 + moreDelay; // PAL/SECAM
// now add the cropping region into VDelay register; i.e. skip some pixels
// before we start taking them as real image
VDelay += (WORD)( ( (LONG)m_ptrVideoIn->Max_Lines * (LONG)AnalogWin_.top + m_lines - 1 ) / (LONG)m_lines * 2 );
regVDelay = VDelay;
}
/////////////////////////////////////////////////////////////////////////////
// Method: void Scaler::SetVActive( void )
// Purpose: Set VActive register
// Input: None
// Output: None
// Return: None
/////////////////////////////////////////////////////////////////////////////
void Scaler::SetVActive( void )
{
// No calculation needed for VActive register since it based on the UNSCALED image
if ( m_videoFormat == VFormat_NTSC )
regVActive = 0x1F4;
else
regVActive = 0x238;
}
/////////////////////////////////////////////////////////////////////////////
// Method: void Scaler::SetVFilter( void )
// Purpose: Set VFilt register field
// Input: None
// Output: None
// Return: None
/////////////////////////////////////////////////////////////////////////////
void Scaler::SetVFilter( void )
{
// this is to remove junk lines at the top of video. flag set to off
// when image hight is above CIF
if ( VFilterFlag_ == Off ) {
fieldVFILT = 0;
m_VFilter = 0;
return;
}
if ( ( m_HActive <= m_ptrVideoIn->Max_VFilter3_Pixels ) &&
( m_lines <= m_ptrVideoIn->Max_VFilter3_Lines ) )
m_VFilter = 3;
else if ( ( m_HActive <= m_ptrVideoIn->Max_VFilter2_Pixels ) &&
( m_lines <= m_ptrVideoIn->Max_VFilter2_Lines ) )
m_VFilter = 2;
else if ( ( m_HActive <= m_ptrVideoIn->Max_VFilter1_Pixels ) &&
( m_lines <= m_ptrVideoIn->Max_VFilter1_Lines ) )
m_VFilter = 1;
else
m_VFilter = 0;
fieldVFILT = m_VFilter;
}
/////////////////////////////////////////////////////////////////////////////
// Method: void Scaler::GetDigitalWin( MRect &DigWin ) const
// Purpose: Retreives the size of digital window
// Input: None
// Output: MRect &DigWin - retrieved value
// Return: None
/////////////////////////////////////////////////////////////////////////////
void Scaler::GetDigitalWin( MRect &DigWin ) const
{
DigWin = DigitalWin_;
}
/////////////////////////////////////////////////////////////////////////////
// Method: ErrorCode Scaler::SetDigitalWin( const MRect &DigWin )
// Purpose: Sets the size and location of the digital window
// Input: const MRect &DigWin - window size to set to
// Output: None
// Return: Success or Fail if passed rect is bigger then analog window
// Note: This function can affect the scaling, so Scale() is called
/////////////////////////////////////////////////////////////////////////////
ErrorCode Scaler::SetDigitalWin( const MRect &DigWin )
{
// we can not scale up
if ( ( DigWin.Height() > AnalogWin_.Height() ) ||
( DigWin.Width() > AnalogWin_.Width() ) )
return Fail;
DigitalWin_ = DigWin;
// every invocation of SetDigitalWin potentially changes the scaling
Scale( DigitalWin_ );
return Success;
}
/////////////////////////////////////////////////////////////////////////////
// Method: void Scaler::GetAnalogWin( MRect &AWin ) const
// Purpose: Retreives the size of analog window
// Input: None
// Output: MRect &DigWin - retrieved value
// Return: None
/////////////////////////////////////////////////////////////////////////////
void Scaler::GetAnalogWin( MRect &AWin ) const
{
AWin = AnalogWin_;
}
/////////////////////////////////////////////////////////////////////////////
// Method: ErrorCode Scaler::SetAnalogWin( const MRect &AWin )
// Purpose: Sets the size and location of the analog window
// Input: const MRect &AWin - window size to set to
// Output: None
// Return: Success or Fail if passed rect is bigger then analog window
/////////////////////////////////////////////////////////////////////////////
ErrorCode Scaler::SetAnalogWin( const MRect &AWin )
{
AnalogWin_ = AWin;
return Success;
}
|
68a1f3c7c2b8b51894c3dd8fd7a7807f5778f4cf | e81a82daa6542cd7c9e339f5bed5a3b17533d2ca | /CM730Platform/CM730Linux/cm730linux.hh | 8b62af094abcea27893ed9fc977a54b0d941b43b | [
"Apache-2.0"
] | permissive | drewnoakes/bold-humanoid | 56ea9c06d673eff73bd07865bb0bea8d91371a04 | 6025fcc92cdf3ce9486d4fe5af4f30ee7a7a3335 | refs/heads/master | 2023-07-16T13:30:17.976858 | 2021-08-24T12:05:48 | 2021-08-24T12:05:48 | 398,125,395 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,787 | hh | cm730linux.hh | #pragma once
#include <string>
#include "../../CM730Platform/cm730platform.hh"
namespace bold
{
typedef unsigned char uchar;
class CM730Linux : public CM730Platform
{
public:
CM730Linux(std::string name);
~CM730Linux();
void setPortName(std::string name) { d_portName = name; }
std::string getPortName() const { return d_portName; }
unsigned long getReceivedByteCount() const override { return d_rxByteCount; }
unsigned long getTransmittedByteCount() const override { return d_txByteCount; }
void resetByteCounts() override { d_rxByteCount = d_txByteCount = 0; }
bool openPort() override;
bool setBaud(unsigned baud) override;
bool closePort() override;
bool clearPort() override;
bool isPortOpen() const override;
int writePort(uchar const* packet, std::size_t numPacket) override;
int readPort(uchar* packet, std::size_t numPacket) override;
void setPacketTimeout(uint lenPacket) override;
bool isPacketTimeout() override;
double getPacketTime() override;
double getPacketTimeoutMillis() const override;
void sleep(double msec) override;
private:
/// The FD for the socket connected to the CM730
int d_socket;
/// Timestamp of when we start waiting for a response (status) packet, in millis
double d_packetStartTimeMillis;
/// Amount of time to wait for a packet, relative to d_PacketStartTime, in millis
double d_packetWaitTimeMillis;
/// The estimated amount of time required to send a single byte, in millis. Calculated from baud rate.
double d_byteTransferTimeMillis;
/// A string that defines the port of the CM730
std::string d_portName;
unsigned long d_txByteCount;
unsigned long d_rxByteCount;
//bool d_isPortOpen;
};
}
|
7b59910edbd81ddb37f5152616fff60d8cb13eda | e2922b409c914c539a4781ea362db4345ae15c73 | /include/horus.h | c53c0d36dcf10fc4404ca671625fa44064ec0cb6 | [
"MIT"
] | permissive | 7thFACTOR/horus_ui | 2dbbb2263e17fde6d4584d22839998899d1af962 | fdf6202924f5a967c8cb62c31171798d24f2e19b | refs/heads/master | 2023-05-11T03:36:22.145148 | 2022-04-28T15:41:19 | 2022-04-28T15:41:19 | 115,265,223 | 149 | 17 | MIT | 2019-03-26T08:57:07 | 2017-12-24T13:39:44 | C++ | WINDOWS-1252 | C++ | false | false | 83,449 | h | horus.h | #pragma once
#include <stdio.h>
#include <stdint.h>
#include <math.h>
/*
------------------------------------------------------------------------------
Horus UI
------------------------------------------------------------------------------
Immediate Mode Graphical User Interface Library
(C) All rights reserved 2016-2017 7thFACTOR Software - Nicusor Nedelcu (nekitu)
------------------------------------------------------------------------------
*/
/// \file horus.h
#ifndef HORUS_NO_BASIC_TYPES
#ifndef HORUS_NO_U8
typedef uint8_t u8;
#endif
#ifndef HORUS_NO_U16
typedef uint16_t u16;
#endif
#ifndef HORUS_NO_U32
typedef uint32_t u32;
#endif
#ifndef HORUS_NO_U64
typedef uint64_t u64;
#endif
#ifndef HORUS_NO_U128
typedef struct
{
u64 data[2];
} u128;
#endif
#ifndef HORUS_NO_I8
typedef int8_t i8;
#endif
#ifndef HORUS_NO_I16
typedef int16_t i16;
#endif
#ifndef HORUS_NO_I32
typedef int32_t i32;
#endif
#ifndef HORUS_NO_I64
typedef int64_t i64;
#endif
#ifndef HORUS_NO_I128
typedef struct
{
i64 data[2];
} i128;
#endif
#ifndef HORUS_NO_F32
typedef float f32;
#endif
#ifndef HORUS_NO_F64
typedef double f64;
#endif
#endif
#ifdef HORUS_STATIC
#define HORUS_API
#define HORUS_CLASS_API
#else
#ifdef _WINDOWS
#ifdef HORUS_EXPORTS
#define HORUS_API extern "C++" __declspec(dllexport)
#define HORUS_CLASS_API __declspec(dllexport)
#else
#define HORUS_API extern "C++" __declspec(dllimport)
#define HORUS_CLASS_API __declspec(dllimport)
#endif
#else
#ifdef HORUS_EXPORTS
#define HORUS_API __attribute__((dllexport))
#define HORUS_CLASS_API __attribute__((dllexport))
#else
#define HORUS_API __attribute__((dllimport))
#define HORUS_CLASS_API __attribute__((dllimport))
#endif
#endif
#endif
namespace hui
{
#define HORUS_BIT(bit) (1<<bit)
#define HORUS_ENUM_AS_FLAGS(T)\
HORUS_ENUM_AS_FLAGS_EX(T, u32)
#define HORUS_ENUM_AS_FLAGS_EX(T, enumBasicType) \
inline T operator & (T x, T y) { return static_cast<T> (static_cast<enumBasicType>(x) & static_cast<enumBasicType>(y)); }; \
inline T operator | (T x, T y) { return static_cast<T> (static_cast<enumBasicType>(x) | static_cast<enumBasicType>(y)); }; \
inline T operator ^ (T x, T y) { return static_cast<T> (static_cast<enumBasicType>(x) ^ static_cast<enumBasicType>(y)); }; \
inline T operator ~ (T x) { return static_cast<T> (~static_cast<enumBasicType>(x)); }; \
inline T& operator &= (T& x, T y) { x = x & y; return x; }; \
inline T& operator |= (T& x, T y) { x = x | y; return x; }; \
inline T& operator ^= (T& x, T y) { x = x ^ y; return x; }; \
inline bool operator !(T x) { return !(enumBasicType)(x); }; \
inline bool checkFlags(T x) { return (enumBasicType)x != 0; }; \
inline bool any(T x) { return (enumBasicType)x != 0; }; \
inline bool has(T x, T y) { return ((enumBasicType)x & (enumBasicType)y) != 0; }; \
inline enumBasicType fromFlags(T x) { return (enumBasicType)x; };
template <typename T> inline T toFlags(int x) { return (T)x; };
typedef void* Image;
typedef void* Theme;
typedef void* Atlas;
typedef void* Font;
typedef void* ThemeWidgetElement;
typedef void* Window;
typedef void* ViewPane;
typedef void* ViewPaneTab;
typedef void* ViewContainer;
typedef void* MouseCursor;
typedef void* GraphicsApiContext;
typedef void* GraphicsApiTexture;
typedef void* GraphicsApiRenderTarget;
typedef void* GraphicsApiVertexBuffer;
typedef void* Context;
typedef u32 Rgba32;
typedef u32 TabIndex;
typedef u32 ViewId;
const f32 ColumnFill = -1;
/// Horizontal align type, for text and images
enum class HAlignType
{
Left,
Right,
Center
};
/// Vertical align type, for text and images
enum class VAlignType
{
Top,
Bottom,
Center
};
/// Font style type
enum class FontStyle
{
Normal,
Bold,
Italic,
BoldItalic,
Count
};
/// Current supported widget types, used form themes
enum class WidgetType
{
None,
Custom,
Window,
Layout,
Compound,
Tooltip,
Button,
IconButton,
TextInput,
Slider,
Progress,
Image,
Check,
Radio,
Label,
Panel,
Popup,
Dropdown,
List,
Selectable,
ResizeGrip,
Line,
Space,
ScrollView,
MenuBar,
Menu,
TabGroup,
Tab,
Viewport,
ViewPane,
MsgBox,
Box,
Toolbar,
ToolbarButton,
ToolbarDropdown,
ToolbarSeparator,
ColumnsHeader,
ComboSlider,
RotarySlider,
Count
};
/// Current supported widget element types, used for themes
enum class WidgetElementId
{
None = 0,
Custom,
WindowBody,
ButtonBody,
CheckBody,
CheckMark,
RadioBody,
RadioMark,
LineBody,
LabelBody,
PanelBody,
PanelCollapsedArrow,
PanelExpandedArrow,
TextInputBody,
TextInputCaret,
TextInputSelection,
TextInputDefaultText,
SliderBody,
SliderBodyFilled,
SliderKnob,
ProgressBack,
ProgressFill,
TooltipBody,
PopupBody,
PopupBehind,
DropdownBody,
DropdownArrow,
ScrollViewBody,
ScrollViewScrollBar,
ScrollViewScrollThumb,
TabGroupBody,
TabBodyActive,
TabBodyInactive,
ViewPaneDockRect,
ViewPaneDockDialRect,
MenuBarBody,
MenuBarItem,
MenuBody,
MenuItemSeparator,
MenuItemBody,
MenuItemShortcut,
MenuItemCheckMark,
MenuItemNoCheckMark,
SubMenuItemArrow,
MessageBoxIconError,
MessageBoxIconInfo,
MessageBoxIconQuestion,
MessageBoxIconWarning,
SelectableBody,
BoxBody,
ToolbarBody,
ToolbarButtonBody,
ToolbarDropdownBody,
ToolbarSeparatorVerticalBody,
ToolbarSeparatorHorizontalBody,
ColumnsHeaderBody,
ComboSliderBody,
ComboSliderLeftArrow,
ComboSliderRightArrow,
ComboSliderRangeBar,
RotarySliderBody,
RotarySliderMark,
RotarySliderValueDot,
Count
};
/// The state of a widget
enum class WidgetStateType
{
Normal,
Focused,
Pressed,
Hovered,
Disabled,
None,
Count
};
/// Mouse button type
enum class MouseButton
{
Left = 0,
Middle,
Right,
AuxButton1,
AuxButton2,
AuxButton3,
AuxButton4,
AuxButton5,
None,
Count
};
/// Image fit mode, used in the image widget
enum class ImageFitType
{
None,
KeepAspect,
Stretch
};
/// Text input modes for the textInput widget
enum class TextInputValueMode
{
Any,
NumericOnly,
HexOnly,
Custom
};
/// List selection mode
enum class ListSelectionMode
{
Single,
Multiple
};
/// Various flags for the selectable widget
enum class SelectableFlags : u32
{
Normal = HORUS_BIT(0),
Checkable = HORUS_BIT(1),
Checked = HORUS_BIT(2),
Disabled = HORUS_BIT(3),
Selected = HORUS_BIT(4)
};
HORUS_ENUM_AS_FLAGS(SelectableFlags);
enum class TabGroupState
{
Auto,
Disabled
};
enum class TabState
{
Auto,
Disabled
};
/// When pushTint is called, specifies what element is color tinted
enum class TintColorType
{
Body,
Text,
All,
Count
};
/// Window flags
enum class WindowFlags
{
Resizable = HORUS_BIT(0),
Fixed = HORUS_BIT(1),
ResizableNoTitle = HORUS_BIT(2),
FixedNoTitle = HORUS_BIT(3),
NoTaskbarButton = HORUS_BIT(4),
Centered = HORUS_BIT(5),
CustomPosition = HORUS_BIT(6)
};
HORUS_ENUM_AS_FLAGS(WindowFlags);
/// Native window state
enum class WindowState
{
Normal,
Maximized,
Minimized,
Hidden
};
/// Key press codes
enum class KeyCode
{
None,
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
Num1,
Num2,
Num3,
Num4,
Num5,
Num6,
Num7,
Num8,
Num9,
Num0,
A,
B,
C,
D,
E,
F,
G,
H,
I,
J,
K,
L,
M,
N,
O,
P,
Q,
R,
S,
T,
U,
V,
W,
X,
Y,
Z,
NumLock,
Scroll,
NumPad1,
NumPad2,
NumPad3,
NumPad4,
NumPad5,
NumPad6,
NumPad7,
NumPad8,
NumPad9,
NumPad0,
Multiply,
Add,
Subtract,
Minus,
Insert,
Divide,
Decimal,
Home,
End,
PgUp,
PgDown,
ArrowUp,
ArrowDown,
ArrowLeft,
ArrowRight,
LControl,
RControl,
LShift,
RShift,
LAlt,
RAlt,
Control,
Shift,
Alt,
Tab,
Space,
Enter,
PrintScr,
Esc,
CapsLock,
LButton,
MButton,
RButton,
Pause,
Backspace,
LWin,
RWin,
Apps,
Delete,
Apostrophe,
Backslash,
Period,
Comma,
Equals,
LBracket,
RBracket,
Semicolon,
Slash,
Grave,
Count
};
enum class KeyModifiers : u32
{
None = 0,
Shift = HORUS_BIT(0),
Control = HORUS_BIT(1),
Alt = HORUS_BIT(2),
CapsLock = HORUS_BIT(3)
};
HORUS_ENUM_AS_FLAGS(KeyModifiers);
enum class MouseCursorType
{
Arrow,
IBeam,
Wait,
CrossHair,
ArrowWait,
SizeNWSE,
SizeNESW,
SizeWE,
SizeNS,
SizeAll,
No,
Hand,
FingerPoint,
Custom,
Count
};
/// Text cache pruning mode. The text cache is keeping unicode text transformed from utf8 to be faster to render each frame
/// When the UI is rendered continuously every frame the cache is pruned for non used text, based on last time access.
/// When the UI is rendered only when needed, the cache is pruned for non used text, based on frame count, if that is greater than a specified max frames, then the unicode text is discarded from cache.
enum class TextCachePruneMode
{
Time, /// delete unused text after some time
Frames /// delete unused text after N frames
};
/// Slider drag direction modes
enum class SliderDragDirection
{
Any,
HorizontalOnly,
VerticalOnly
};
enum class AntiAliasing
{
None,
MSAA4X,
MSAA8X,
MSAA16X,
Count
};
/// Docking modes for the view panes
enum class DockType
{
Left, /// will dock pane to left
Right, /// will dock pane to right
Top, /// will dock pane to top
Bottom, /// will dock pane to bottom
RootLeft, /// will dock pane to left of root dock space
RootRight, /// will dock pane to right of root dock space
RootTop, /// will dock pane to top of root dock space
RootBottom, /// will dock pane to bottom of root dock space
TopAsViewTab, /// will dock pane as full pane in the pane tabs bar
};
/// Common message box icons
enum class MessageBoxIcon
{
Error,
Info,
Question,
Warning,
Custom,
Count
};
/// Message box flags, used for configure the messagebox and to get results
enum class MessageBoxButtons : u32
{
None = 0,
Ok = HORUS_BIT(0),
Cancel = HORUS_BIT(1),
Yes = HORUS_BIT(2),
No = HORUS_BIT(3),
Retry = HORUS_BIT(4),
Abort = HORUS_BIT(5),
ClosedByEscape = HORUS_BIT(6), /// escape key closed the message box
OkCancel = (u32)Ok | (u32)Cancel,
YesNo = (u32)Yes | (u32)No,
YesNoCancel = (u32)YesNo | (u32)Cancel
};
HORUS_ENUM_AS_FLAGS(MessageBoxButtons);
enum class ToolbarDirection
{
Horizontal,
Vertical
};
enum class ContextMenuFlags
{
None = 0,
AllowLeftClickOpen = HORUS_BIT(1)
};
HORUS_ENUM_AS_FLAGS(ContextMenuFlags);
enum class PopupFlags : u32
{
None = 0,
FadeWindowContents = HORUS_BIT(1), /// fade the contents behind the popup when shown
WindowCenter = HORUS_BIT(2), /// center the popup to window
BelowLastWidget = HORUS_BIT(3), /// position the popup below last widget
RightSideLastWidget = HORUS_BIT(4), /// position the popup on right side of the last widget
CustomPosition = HORUS_BIT(5), /// use custom popup position
SameLayer = HORUS_BIT(6), /// internal: don't increment layer index
TopMost = HORUS_BIT(7), /// set to have this popup top most
IsMenu = HORUS_BIT(8) /// internal, when this popup is a menu
};
HORUS_ENUM_AS_FLAGS(PopupFlags);
/// A 2D point
class Point
{
public:
Point()
: x(0.0f)
, y(0.0f)
{}
Point(const Point& other)
{
x = other.x;
y = other.y;
}
Point(f32 newX, f32 newY)
{
x = newX;
y = newY;
}
Point(f32 value)
{
x = value;
y = value;
}
inline f32 dot(const Point& other) const
{
return x * other.x + y * other.y;
}
f32 getDistance(const Point& other) const
{
f32 xx = x - other.x, yy = y - other.y;
xx = xx * xx + yy * yy;
if (xx <= 0.0f)
{
return 0.0f;
}
return (f32)sqrtf(xx);
}
inline void makeAbsolute()
{
x = fabs(x);
y = fabs(y);
}
f32 getCos(const Point& other) const
{
f32 m = (x * x + y * y) * (other.x * other.x + other.y * other.y);
if (m <= 0.0f)
{
return 0.0f;
}
return (f32)(x * other.x + y * other.y) / sqrt(m);
}
void normalize()
{
f32 m = x * x + y * y;
if (m <= 0.0f)
{
x = y = 0.0f;
return;
}
m = sqrtf(m);
x /= m;
y /= m;
}
Point getNormalized() const
{
f32 m = x * x + y * y;
Point value = *this;
if (m <= 0.0f)
{
return Point();
}
m = sqrtf((f32)m);
value.x /= m;
value.y /= m;
return value;
}
Point& normalizeTo(Point& to)
{
f32 m = x * x + y * y;
if (m <= 0.0f)
{
return *this;
}
m = sqrtf(m);
to.x = x / m;
to.y = y / m;
return *this;
}
Point getNegated() const
{
Point value = *this;
value.x = -x;
value.y = -y;
return value;
}
inline void negate()
{
x = -x;
y = -y;
}
inline Point& negateTo(Point& to)
{
to.x = -x;
to.y = -y;
return *this;
}
bool isOnLine(const Point& lineA, const Point& lineB, f32 tolerance = 0.0001) const
{
f32 u1, u2;
u1 = (lineB.x - lineA.x);
u2 = (lineB.y - lineA.y);
if (u1 == 0.0f)
u1 = 1.0f;
if (u2 == 0.0f)
u2 = 1.0f;
u1 = (x - lineA.x) / u1;
u2 = (y - lineA.y) / u2;
return (fabs(u1 - u2) <= tolerance);
}
inline bool isAlmosEqual(const Point& other, f32 tolerance = 0.001f) const
{
return fabs(x - other.x) <= tolerance
&& fabs(y - other.y) <= tolerance;
}
inline f32 getLength() const
{
return sqrt(x * x + y * y);
}
inline f32 getSquaredLength() const
{
return x * x + y * y;
}
void setLength(f32 length)
{
f32 oldLen = getLength();
if (oldLen < 0.0001f)
{
oldLen = 0.0001f;
}
f32 l = length / oldLen;
x *= l;
y *= l;
}
inline Point& set(f32 newX, f32 newY)
{
x = newX;
y = newY;
return *this;
}
inline Point& clear()
{
x = y = 0.0f;
return *this;
}
inline f32 operator [](int index) const
{
if (index == 0)
{
return x;
}
else if (index == 1)
{
return y;
}
return 0;
}
inline Point& operator += (const Point& value)
{
x += value.x;
y += value.y;
return *this;
}
inline Point& operator *= (const Point& value)
{
x *= value.x;
y *= value.y;
return *this;
}
inline Point& operator -= (const Point& value)
{
x -= value.x;
y -= value.y;
return *this;
}
inline Point& operator /= (const Point& value)
{
x /= value.x;
y /= value.y;
return *this;
}
inline Point& operator += (f32 value)
{
x += value;
y += value;
return *this;
}
inline Point& operator *= (f32 value)
{
x *= value;
y *= value;
return *this;
}
inline Point& operator -= (f32 value)
{
x -= value;
y -= value;
return *this;
}
inline Point& operator /= (f32 value)
{
x /= value;
y /= value;
return *this;
}
inline Point operator + (const Point& value) const
{
Point result;
result.x = x + value.x;
result.y = y + value.y;
return result;
}
inline Point operator * (const Point& value) const
{
Point result;
result.x = x * value.x;
result.y = y * value.y;
return result;
}
inline Point operator - (const Point& value) const
{
Point result;
result.x = x - value.x;
result.y = y - value.y;
return result;
}
inline Point operator / (const Point& value) const
{
Point result;
result.x = x / value.x;
result.y = y / value.y;
return result;
}
inline Point operator + (const f32 value) const
{
Point result;
result.x = x + value;
result.y = y + value;
return result;
}
inline Point operator * (const f32 value) const
{
Point result;
result.x = x * value;
result.y = y * value;
return result;
}
inline Point operator - (const f32 value) const
{
Point result;
result.x = x - value;
result.y = y - value;
return result;
}
inline Point operator / (const f32 value) const
{
Point result;
result.x = x / value;
result.y = y / value;
return result;
}
inline Point operator / (const size_t value) const
{
Point result;
result.x = x / (f32)value;
result.y = y / (f32)value;
return result;
}
inline Point& operator = (const f32 value)
{
x = value;
y = value;
return *this;
}
inline Point& operator = (const i32 value)
{
x = (f32)value;
y = (f32)value;
return *this;
}
inline bool operator <= (const Point& other) const
{
return x <= other.x
&& y <= other.y;
}
inline bool operator >= (const Point& other) const
{
return x >= other.x
&& y >= other.y;
}
inline bool operator < (const Point& other) const
{
return x < other.x
&& y < other.y;
}
inline bool operator > (const Point& other) const
{
return x > other.x
&& y > other.y;
}
inline bool operator != (const Point& other) const
{
return x != other.x
|| y != other.y;
}
inline Point& operator = (const Point& other)
{
x = other.x;
y = other.y;
return *this;
}
f32 x, y;
};
/// A 2D spline control point
struct SplineControlPoint
{
enum class NodeType
{
Cusp,
Smooth,
Symmetrical
};
Point leftTangent;
Point center;
Point rightTangent;
bool isLine = true;
NodeType type = NodeType::Symmetrical;
};
/// A 2D rectangle
struct Rect
{
f32 x = 0, y = 0, width = 0, height = 0;
Rect()
: x(0)
, y(0)
, width(0)
, height(0)
{}
Rect(f32 newX, f32 newY, f32 newWidth, f32 newHeight)
{
x = newX;
y = newY;
width = newWidth;
height = newHeight;
}
void set(f32 newX, f32 newY, f32 newWidth, f32 newHeight)
{
x = newX;
y = newY;
width = newWidth;
height = newHeight;
}
inline bool isZero() const
{
return x == 0.0f && y == 0.0f && width == 0.0f && height == 0.0f;
}
inline f32 left() const { return x; }
inline f32 top() const { return y; }
inline f32 right() const { return x + width; }
inline f32 bottom() const { return y + height; }
inline Point topLeft() const { return Point(x, y); }
inline Point topRight() const { return Point(x + width, y); }
inline Point bottomLeft() const { return Point(x, y + height); }
inline Point bottomRight() const { return Point(x + width, y + height); }
inline Point center() const { return Point(x + width / 2, y + height / 2); }
inline bool contains(const Point& pt) const
{
return pt.x >= x && pt.x < (x + width) && pt.y >= y && (pt.y < y + height);
}
inline bool contains(f32 X, f32 Y) const
{
return X >= x && X < (x + width) && Y >= y && Y < (y + height);
}
inline bool contains(const Rect& other) const
{
return x <= other.x && (other.right()) < right()
&& y <= other.y && (other.bottom()) < bottom();
}
inline bool outside(const Rect& other) const
{
return (x > other.right() || right() < other.x)
|| (y > other.bottom() || bottom() < other.y);
}
Rect clipInside(const Rect& parentRect) const
{
Rect newRect = *this;
if (parentRect.x > newRect.x)
{
newRect.width -= parentRect.x - newRect.x;
newRect.x = parentRect.x;
}
if (parentRect.y > newRect.y)
{
newRect.height -= parentRect.y - newRect.y;
newRect.y = parentRect.y;
}
if (parentRect.right() < right())
{
newRect.width -= right() - parentRect.right();
}
if (parentRect.bottom() < bottom())
{
newRect.height -= bottom() - parentRect.bottom();
}
if (newRect.width < 0) newRect.width = 0;
if (newRect.height < 0) newRect.height = 0;
return newRect;
}
inline Rect expand(f32 amount)
{
return {
x - amount,
y - amount,
width + 2.0f * amount,
height + 2.0f * amount
};
}
inline Rect contract(f32 amount)
{
return expand(-amount);
}
inline Rect operator + (const Point& pt) const
{
return { x + pt.x, y + pt.y, width, height };
}
inline Rect& operator += (const Point& pt)
{
x += pt.x;
y += pt.y;
return *this;
}
inline Rect operator - (const Point& pt) const
{
return { x - pt.x, y - pt.y, width, height };
}
inline Rect& operator -= (const Point& pt)
{
x -= pt.x;
y -= pt.y;
return *this;
}
inline bool operator != (const Rect& other) const
{
constexpr f32 epsilon = 0.00001f;
return fabs(x - other.x) > epsilon
|| fabs(y - other.y) > epsilon
|| fabs(width - other.width) > epsilon
|| fabs(height - other.height) > epsilon;
}
};
struct InputEvent
{
enum class Type
{
None,
MouseMove,
MouseDown,
MouseUp,
MouseWheel,
Key,
Text,
WindowResize,
WindowGotFocus,
WindowLostFocus,
WindowClose,
OsDragDrop
};
struct MouseData
{
MouseButton button = MouseButton::Left;
u32 clickCount = 1;
Point point;
Point wheel;
i32 wheelDelta = 0;
KeyModifiers modifiers = KeyModifiers::None;
};
struct KeyData
{
bool down = false;
KeyCode code = KeyCode::None;
KeyModifiers modifiers = KeyModifiers::None;
};
struct TextData
{
static const int maxTextBufferSize = 64;
char text[maxTextBufferSize] = { 0 };
};
struct OsDragDropData
{
enum class Type
{
None,
DropFile,
DropText,
DropBegin,
DropComplete
};
Type type = Type::None;
u32 timestamp = 0;
char* filename = nullptr;
Window window = 0;
};
union
{
MouseData mouse;
KeyData key;
TextData text;
OsDragDropData drop;
};
InputEvent()
{}
InputEvent(const InputEvent& ev)
{
*this = ev;
}
InputEvent& operator = (const InputEvent& other)
{
type = other.type;
window = other.window;
mouse = other.mouse;
key = other.key;
text = other.text;
drop = other.drop;
return *this;
}
Type type = Type::None;
Window window = 0;
};
struct HORUS_CLASS_API Color
{
Color() {}
Color(u32 color)
{
setFromRgba(color);
}
Color(f32 R, f32 G, f32 B, f32 A)
: r(R), g(G), b(B), a(A)
{}
u32 getRgba() const;
u32 getArgb() const;
void setFromRgba(u32 value)
{
u8 *color = (u8*)&value;
r = (f32)color[0] / 255.0f;
g = (f32)color[1] / 255.0f;
b = (f32)color[2] / 255.0f;
a = (f32)color[3] / 255.0f;
}
Color operator * (f32 other) const
{
return { r * other, g * other, b * other, a * other };
}
Color operator * (const Color& other) const
{
return { r * other.r, g * other.g, b * other.b, a * other.a };
}
Color operator - (const Color& other) const
{
return { r - other.r, g - other.g, b - other.b, a - other.a };
}
Color operator + (const Color& other) const
{
return { r + other.r, g + other.g, b + other.b, a + other.a };
}
static Color random();
static const Color transparent;
static const Color white;
static const Color black;
static const Color red;
static const Color darkRed;
static const Color veryDarkRed;
static const Color green;
static const Color darkGreen;
static const Color veryDarkGreen;
static const Color blue;
static const Color darkBlue;
static const Color veryDarkBlue;
static const Color yellow;
static const Color darkYellow;
static const Color veryDarkYellow;
static const Color magenta;
static const Color cyan;
static const Color darkCyan;
static const Color veryDarkCyan;
static const Color orange;
static const Color darkOrange;
static const Color darkGray;
static const Color gray;
static const Color lightGray;
static const Color sky;
f32 r = 0.0f, g = 0.0f, b = 0.0f, a = 1.0f;
};
/// Used by the openMultipleFileDialog function. Warning! the pointers will be deleted on struct's instance out of scope
struct OpenMultipleFileSet
{
char* filenameBuffer = nullptr; /// buffer used to store the filenames, created by the library
size_t* bufferIndices = nullptr; /// array containing indices into filenameBuffer, where each filename starts
u32 count = 0; /// the number of filenames
~OpenMultipleFileSet()
{
delete[] filenameBuffer;
delete[] bufferIndices;
}
};
/// A view handler is used by the docking system to delegate UI rendering to the user
/// It calls various functions at specific times so the user will just show the UI
struct ViewHandler
{
/// Called when the user must render the main menu of the application on the specified window
/// \param window the window for which the main menu to be rendered
virtual void onTopAreaRender(Window window) {}
virtual void onLeftAreaRender(Window window) {}
virtual void onRightAreaRender(Window window) {}
virtual void onBottomAreaRender(Window window) {}
/// Called when the user must render the widgets for a specific view
/// \param window the window where the drawing of UI will occur
/// \param viewPane the view pane where the drawing of UI will occur
/// \param activeViewId the view ID for which to draw the UI (there can be multiple views with the same ID), data driven UI
/// \param userDataId the user data ID, which was set by the user for this particular view instance
virtual void onViewRender(Window window, Window viewPane, ViewId activeViewId, u64 userDataId) {}
/// Called when a view was closed
/// \param window the window where the view pane was closed
/// \param viewPane the view pane
/// \param activeViewId the view ID for which to draw the UI (there can be multiple views with the same ID), data driven UI
/// \param userDataId the user data ID, which was set by the user for this particular view instance
virtual void onViewClosed(Window window, Window viewPane, ViewId activeViewId, u64 userDataId) {}
/// Called just before the frame starts to render
/// \param window the window where rendering will happen
virtual void onBeforeFrameRender(Window wnd) {}
/// Called after the frame starts to render
/// \param window the window where rendering did happen
virtual void onAfterFrameRender(Window wnd) {}
virtual void onViewPaneTabSave(ViewPaneTab tab, u64 dataId, FILE* file) {}
virtual void onViewPaneTabLoad(ViewPaneTab tab, u64 dataId, FILE* file) {}
};
/// Line drawing style
struct LineStyle
{
LineStyle() {}
LineStyle(const Color& newColor, f32 newWidth, bool newUseStipple = false)
: color(newColor)
, width(newWidth)
, useStipple(newUseStipple)
{}
static const u32 stipplePatternMaxCount = 8;
Color color = Color::white;
f32 width = 1.0f;
bool useStipple = false;
f32 stipplePattern[stipplePatternMaxCount] = {5, 5}; /// first value is the dash size, second is empty space size and so on, toggle
u32 stipplePatternCount = 2;
f32 stipplePhase = 0.0f;
};
/// Filled primitives style
struct FillStyle
{
FillStyle() {}
FillStyle(const Color& newColor)
: color(newColor)
{}
Color color = Color::white;
GraphicsApiTexture texture;
Point scale;
};
/// Raw image data info
struct RawImage
{
u8* pixels = nullptr;
u32 width = 0;
u32 height = 0;
u32 bpp = 0;
};
/// Info about a widget element
struct WidgetElementInfo
{
/// the image from the theme, used to draw the element
Image image = 0;
/// the border size used to draw 9-cell resizable element
u32 border = 0;
/// the color of the element
Color color;
/// the text color of the element
Color textColor;
/// the font used for this element
Font font = 0;
/// the pixel width of the element (not its image)
f32 width = 0;
/// the pixel height of the element (not its image)
f32 height = 0;
};
/// Various HorusUI per-context global settings
struct ContextSettings
{
TextCachePruneMode textCachePruneMode = TextCachePruneMode::Time; /// how to prune the unicode text cache which is not used for a while
f32 textCachePruneMaxTimeSec = 5; /// after this time, if an Unicode text is not accessed, it's discarded from cache, textCachePruneMode must be Time
f32 textCachePruneMaxFrames = 500; /// after this frame count, if an Unicode text is not accessed, it's discarded from cache, textCachePruneMode must be Frames
f32 textCachePruneIntervalSec = 5; /// after each interval has passed, the pruning of unused texts is executed, will delete the texts that were not used for the last textCachePruneMaxTimeMs or textCachePruneMaxFrames, depending on the prune mode
u32 defaultAtlasSize = 4096; /// default atlas textures size in pixels
SliderDragDirection sliderDragDirection = SliderDragDirection::Any; /// allows to change slider value from any direction drag, vertical or horizontal
bool sliderInvertVerticalDragAmount = false; /// if true and vertical sliding allowed, it will invert the drag amount
f32 dragStartDistance = 3; /// the max distance after which a dragging operation starts to occur when mouse down and moved, in pixels
f32 whiteImageUvBorder = 0.001f; /// this value is subtracted from the white image used to draw lines, to avoid black border artifacts
f32 sameLineHeight = 20.0f; /// the height of a line when sameLine() is used to position widgets on a single row/line. Used to center various widget heights vertically. This must be non-zero, otherwise the widgets will align wrongly.
f32 minScrollViewHandleSize = 20.0f; /// the minimum allowed scroll handle size (height)
bool allowUndockingToNewWindow = true; /// allow pane tabs to be undocked as native windows, outside of main window
u32 widgetLoopStartId = 1000000000; /// when pushing loops into loop stack, the widget ids will start from here. Basically this avoids the user to specify IDs when creating widgets in a loop, taking into account the fact there will not be so many widgets created anyway.
u32 widgetLoopMaxCount = 500000; /// current increment after each loop push to stack
};
//////////////////////////////////////////////////////////////////////////
// Core
//////////////////////////////////////////////////////////////////////////
/// Create a new HorusUI context
/// \param customInputProvider a custom input provider which will handle input and windowing
/// \param customGfxProvider a custom graphics provider which will handle rendering of the UI
/// \return the created context handle
HORUS_API Context createContext(struct InputProvider* customInputProvider = nullptr, struct GraphicsProvider* customGfxProvider = nullptr);
/// Initialize a created context, that is create renderer and various systems, called after createContext
/// It is used for initializing the renderer, after the graphics API is initialized by SDL or other lib
/// \param ctx the context to be initialized
HORUS_API void initializeContext(Context ctx);
/// Set the current context
/// \param ctx the context
HORUS_API void setContext(Context ctx);
/// \return the current context
HORUS_API Context getContext();
/// Delete a context
/// \param ctx the context to be deleted
HORUS_API void deleteContext(Context ctx);
/// \return the context settings
HORUS_API ContextSettings& getContextSettings();
/// Set the input provider for the current context
/// \param provider the input provider (user owns the pointer and must delete it at the end of the program)
HORUS_API void setInputProvider(struct InputProvider* provider);
/// Set the graphics provider for the current context
/// \param provider the graphics provider (user owns the pointer and must delete it at the end of the program)
HORUS_API void setGraphicsProvider(struct GraphicsProvider* provider);
/// Gather and process the input events, including window events, called in a main loop
HORUS_API void processInputEvents();
/// Set the current frame time delta. Used for tooltips and other timed things.
/// Must be called continuously in the main loop. If initializeWithSDL is used, no need to call it, the SDL input provider will update it.
/// \param dt delta time value, in seconds
HORUS_API void setFrameDeltaTime(f32 dt);
/// \return delta time in seconds
HORUS_API f32 getFrameDeltaTime();
/// Begin a frame which means the rendering of UI across one or many windows. This must be called first when rendering UI
HORUS_API void beginFrame();
/// Ends an UI frame
HORUS_API void endFrame();
/// Clear the current window background with the color found in the current theme
HORUS_API void clearBackground();
/// \return true if there is nothing to do in the UI (like redrawing or layout computations), used to not render continuously when its not needed, for applications that do not need realtime continuous rendering
HORUS_API bool hasNothingToDo();
/// This will disable rendering functions, used when only widget logic needs to be run, but no drawing, used mostly internally for layout computations
/// \param disable if true, disable the rendering functions
HORUS_API void setDisableRendering(bool disable);
/// Call this when you need to repaint the UI, due to data/layout changes
HORUS_API void forceRepaint();
/// If called, rendering and input will be ignored until the endFrame and the loop will redraw again, used mostly internally when layout is computed
HORUS_API void skipThisFrame();
/// Copy UTF8 text to the clipboard
/// \param text the null ended UTF8 text
/// \return true if text was copied to clipboard
HORUS_API bool copyToClipboard(const char* text);
/// Paste UTF8 from clipboard
/// \param outText a pointer to a buffer where to store the text, provided by user
/// \param maxTextSize the available text buffer size
/// \return true if text was pasted
HORUS_API bool pasteFromClipboard(char* outText, u32 maxTextSize);
/// \return the current input event which was popped from the event queue
HORUS_API const InputEvent& getInputEvent();
/// Cancel the current event, after this function call the event will be null, so no widget/window will react
HORUS_API void cancelEvent();
/// Add an input event to the queue, usually used by input providers to push events to event queue
HORUS_API void addInputEvent(const InputEvent& event);
/// Signal that the mouse was moved, used by input providers
HORUS_API void setMouseMoved(bool moved);
/// \return the input event count in the event queue
HORUS_API u32 getInputEventCount();
/// \return the input event at the index
/// \param index the event index (maximum is getInputEventCount())
HORUS_API InputEvent getInputEventAt(u32 index);
/// Set the current input event, usually called by input providers
/// \param event the event to be set
HORUS_API void setInputEvent(const InputEvent& event);
/// Clear the input event queue, usually called by input providers
HORUS_API void clearInputEventQueue();
/// Set the current mouse cursor type
/// \param type the cursor type
HORUS_API void setMouseCursor(MouseCursorType type);
/// Create a mouse cursor from a bitmap
/// \param pixels the 32bit color bitmap, RGBA
/// \param width width of the cursor bitmap
/// \param height height of the cursor bitmap
/// \param hotSpotX the cursor pointer hot spot X coordinate, relative to the bitmap size
/// \param hotSpotY the cursor pointer hot spot Y coordinate, relative to the bitmap size
/// \return the created mouse cursor
HORUS_API MouseCursor createMouseCursor(Rgba32* pixels, u32 width, u32 height, u32 hotSpotX = 0, u32 hotSpotY = 0);
/// Create a mouse cursor from a bitmap loaded from a PNG image file
/// \param hotSpotX the cursor pointer hot spot X coordinate, relative to the bitmap size
/// \param hotSpotY the cursor pointer hot spot Y coordinate, relative to the bitmap size
/// \return the created mouse cursor
HORUS_API MouseCursor createMouseCursor(const char* imageFilename, u32 hotSpotX = 0, u32 hotSpotY = 0);
/// Delete a custom mouse cursor
/// \param cursor the cursor to be deleted
HORUS_API void deleteMouseCursor(MouseCursor cursor);
/// Set the current custom mouse cursor
/// \param cursor the custom mouse cursor to be set
HORUS_API void setMouseCursor(MouseCursor cursor);
//////////////////////////////////////////////////////////////////////////
// Windowing
//////////////////////////////////////////////////////////////////////////
/// Set the current window
/// \param window the window to be set as current
HORUS_API void setWindow(Window window);
/// \return the window set as current
HORUS_API Window getWindow();
/// \return the focused window
HORUS_API Window getFocusedWindow();
/// \return the mouse hovered window
HORUS_API Window getHoveredWindow();
/// \return the application's main window
HORUS_API Window getMainWindow();
/// Create a new OS native window
/// \param title the title of the window
/// \param width the width of the window or -1 to use default
/// \param height the height of the window or -1 to use default
/// \param flags the flags of the window
/// \param positionType the position of the window
/// \param customPosition if the position is custom, then this is the location on screen
/// \return the created window handle
HORUS_API Window createWindow(
const char* title, u32 width, u32 height,
WindowFlags flags = WindowFlags::Resizable | WindowFlags::Centered,
Point customPosition = { 0, 0 });
/// Set window title
/// \param title the window title
HORUS_API void setWindowTitle(Window window, const char* title);
/// Set window rectangle on screen
/// \param window the window handle
/// \param rect the screen rectangle
HORUS_API void setWindowRect(Window window, const Rect& rect);
/// \return the window rectangle on screen
/// \param window the window handle
HORUS_API Rect getWindowRect(Window window);
/// \return the window client rectangle area, relative to window screen rectangle
/// \param window the window handle
HORUS_API Rect getWindowClientRect(Window window);
/// Present the contents of the backbuffer, called after all rendering is done
/// \param window the backbuffer's window to show
HORUS_API void presentWindow(Window window);
/// Destroy an OS native window
/// \param window the window to destroy
HORUS_API void destroyWindow(Window window);
/// Show a window
/// \param window the window to be shown
HORUS_API void showWindow(Window window);
/// Hide a window
/// \param window window to be hidden
HORUS_API void hideWindow(Window window);
/// Bring a window to front
/// \param window to be brought to front
HORUS_API void riseWindow(Window window);
/// Maximize a window
/// \param window the window to be maximized
HORUS_API void maximizeWindow(Window window);
/// Minimize a window
/// \param window the window to be minimized
HORUS_API void minimizeWindow(Window window);
/// \return the window's state
/// \param window the window
HORUS_API WindowState getWindowState(Window window);
/// Capture input to a specific window
/// \param window the window to capture input events
HORUS_API void setCapture(Window window);
/// Release the capture for the input events
HORUS_API void releaseCapture();
/// \return true if the application must quit, due to quitApplication() call.
HORUS_API bool mustQuit();
/// \return true if the application must quit, due to user closing main window. You can close the application by exiting the main loop or ignore it, as you wish. If you show a message box and it is cancelled you must call cancelQuitApplication() to set this returned value to false.
HORUS_API bool wantsToQuit();
/// Cancel quitting the application if it was due to exit
HORUS_API void cancelQuitApplication();
/// Set the quit application to true, so the main loop will end
HORUS_API void quitApplication();
/// Shut down the library
HORUS_API void shutdown();
//////////////////////////////////////////////////////////////////////////
// Images
//////////////////////////////////////////////////////////////////////////
/// Load a PNG image from file (it doesn't need to be power of two in dimension) and add it to the theme's image atlas.
/// \param filename the PNG filename, relative to the executable
/// \return the created image or nullptr if it cannot be loaded
HORUS_API Image loadImage(const char* filename);
/// Create an image from memory
/// \param pixels the RGBA 32bit color pixels buffer
/// \param width the width in pixels
/// \param height the height in pixels
/// \return the created image or nullptr if error
HORUS_API Image createImage(Rgba32* pixels, u32 width, u32 height);
/// \return an image size as a point (x = width, y = height)
/// \param image the image
HORUS_API Point getImageSize(Image image);
/// Update an image's pixel data
/// \param image the image to be updated
/// \param pixels the new pixels of the image
HORUS_API void updateImagePixels(Image image, Rgba32* pixels);
/// Delete an image
/// \param image the image to be deleted
HORUS_API void deleteImage(Image image);
/// Load a raw image from a PNG file, it will not add it to the theme's image atlas. Used when you need an image data for something else.
/// \param filename the PNG filename
/// \return the raw image info and data
HORUS_API RawImage loadRawImage(const char* filename);
/// Delete a raw image object after your used/copied its contents
/// \param image the raw image
HORUS_API void deleteRawImage(RawImage& image);
//////////////////////////////////////////////////////////////////////////
// Image atlas
//////////////////////////////////////////////////////////////////////////
/// Create a new image atlas. Usually used for collections of images (for making thumbnail browsers for example)
/// \param width the width of the atlas image
/// \param height the height of the atlas image
/// \return the new atlas handle
HORUS_API Atlas createAtlas(u32 width, u32 height);
/// Delete an image atlas
/// \param atlas the atlas to be deleted
HORUS_API void deleteAtlas(Atlas atlas);
/// Add an image to an image atlas (it will just queue it, to pack the images into the atlas, call packAtlas)
/// \param atlas the image atlas
/// \param image the raw image to be queued for add
/// \return the new image handle created in the image atlas
HORUS_API Image addAtlasImage(Atlas atlas, const RawImage& image);
/// Pack image atlas. This will optimally fit all the queued images into the image atlas. This operation might add new textures to the atlas' texture array if some of the images do not fit inside the current atlas texture(s)
/// \param atlas the atlas to be packed
/// \return true if all queued images were packed ok
HORUS_API bool packAtlas(Atlas atlas);
//////////////////////////////////////////////////////////////////////////
// Themes
//////////////////////////////////////////////////////////////////////////
/// Load a theme from a JSON file
/// \param filename the JSON filename (*.theme), relative to executable
HORUS_API Theme loadTheme(const char* filename);
/// Set the current theme
/// \param theme the theme to be set as current
HORUS_API void setTheme(Theme theme);
/// \return the current theme
HORUS_API Theme getTheme();
/// Delete a theme
/// \param theme the theme to be deleted, if this is the current theme it will be set to null
HORUS_API void deleteTheme(Theme theme);
/// Create a new theme
/// \param atlasTextureSize the width and height of the atlas texture, where theme images are kept
/// \return the newly created theme
HORUS_API Theme createTheme(u32 atlasTextureSize);
/// Add a image to a theme's atlas (it will not pack it yet to the atlas, call buildTheme for that)
/// \param theme the theme
/// \param img the image to be added
/// \return the newly created image handle
HORUS_API Image addThemeImage(Theme theme, const RawImage& img);
HORUS_API void setWidgetStyle(WidgetType widgetType, const char* styleName);
HORUS_API void setWidgetDefaultStyle(WidgetType widgetType);
HORUS_API void setUserWidgetElementStyle(const char* elementName, const char* styleName);
/// Set a theme's widget element info
/// \param theme the theme of the widget element
/// \param elementId the element to be set
/// \param widgetStateType which state to be set
/// \param elementInfo the element info to be set
HORUS_API void setThemeWidgetElement(
Theme theme,
WidgetElementId elementId,
WidgetStateType widgetStateType,
const WidgetElementInfo& elementInfo,
const char* styleName = "default");
/// Build a theme after images were added to its atlas, respectively packing the theme's image atlas
/// \param theme the theme to be built
void buildTheme(Theme theme);
/// Set a theme's user widget element info
/// \param theme the theme of the widget element
/// \param userElementName the element name
/// \param widgetStateType which state to be set
/// \param elementInfo the element info to be set
HORUS_API void setThemeUserWidgetElement(
Theme theme,
const char* userElementName,
WidgetStateType widgetStateType,
const WidgetElementInfo& elementInfo,
const char* styleName = "default");
/// Return a theme widget element's info
/// \param elementId the widget element id
/// \param state the element state
/// \param outInfo returned element info
HORUS_API void getThemeWidgetElementInfo(WidgetElementId elementId, WidgetStateType state, WidgetElementInfo& outInfo, const char* styleName = "default");
/// Return a theme user widget element's info
/// \param userElementName the user widget element name
/// \param state the element state
/// \param outInfo returned element info
HORUS_API void getThemeUserWidgetElementInfo(const char* userElementName, WidgetStateType state, WidgetElementInfo& outInfo, const char* styleName = "default");
/// Create a new font object
/// \param theme the theme where to place the font
/// \param name the name of the font (a given name like for example: 'smallItalic')
/// \param fontFilename the TTF/OTF font filename, relative to executable
/// \param faceSize the font face size in font units
/// \return the newly created font handle
HORUS_API Font createFont(Theme theme, const char* name, const char* fontFilename, u32 faceSize);
/// Release font reference, if font usage is zero, the font is deleted
/// \param font the font to be reference released
HORUS_API void releaseFont(Font font);
/// \return the font by name, from the current theme
/// \param themeFontName the name of the font as it is in the theme
HORUS_API Font getFont(const char* themeFontName);
/// \return the font by name, from the specified theme
HORUS_API Font getFont(Theme theme, const char* themeFontName);
//////////////////////////////////////////////////////////////////////////
// Layout and containers
//////////////////////////////////////////////////////////////////////////
/// Start to create UI inside a specific native window, set it as current window
/// \param window the window
HORUS_API void beginWindow(Window window);
/// Stop creating UI in the current window
HORUS_API void endWindow();
/// Begin a widget container, and invisible rectangle on the current window area where widgets will be laid out
HORUS_API void beginContainer(const Rect& rect);
/// End the current widget container
HORUS_API void endContainer();
/// Push a widget loop, used when you create widgets inside a loop.
/// For each pushed loop, the widget IDs will be created incrementally in the upper range of uint32
/// \param loopMaxCount optional, this should be a constant for this specific loop, the max number of widgets that might be in this loop. If -1, use the current loop size set with getSettings().widgetLoopMaxCount
HORUS_API void pushWidgetLoop(u32 loopMaxCount = ~0);
/// Pop a widget id from ID stack, used with pushWidgetId
HORUS_API void popWidgetLoop();
/// Begin a layout made up as columns which can have percentage based widths or fixed
/// \param columnCount the number of columns to be created
/// \param preferredWidths a float array of the preferred width for each columns, if width is smaller of equal to 1.0f it is considered a percentage of the parent layout, if it is greater than 1.0f it is considered a fixed pixel size
/// \param minWidths a float array of the minimal width for each columns, if width is smaller of equal to 1.0f it is considered a percentage of the parent layout, if it is greater than 1.0f it is considered a fixed pixel size
/// \param maxWidths a float array of the maximum width for each columns, if width is smaller of equal to 1.0f it is considered a percentage of the parent layout, if it is greater than 1.0f it is considered a fixed pixel size
HORUS_API void beginColumns(u32 columnCount, const f32 preferredWidths[] = nullptr, const f32 minWidths[] = nullptr, const f32 maxWidths[] = nullptr);
/// Begin an equal widths array of columns
/// \param columnCount the column count
/// \param minWidths a float array of the minimal width for each columns, if width is smaller of equal to 1.0f it is considered a percentage of the parent layout, if it is greater than 1.0f it is considered a fixed pixel size
/// \param addPadding true if you want padding to be added to left and right sides of the columns group
HORUS_API void beginEqualColumns(u32 columnCount, const f32 minWidths[] = nullptr, bool addPadding = false);
/// Start a single padded column layout, which has padding added to left and right sides
HORUS_API void beginPaddedColumn();
/// End a single padded column layout
HORUS_API void endPaddedColumn();
/// Begin a two columns layout
HORUS_API void beginTwoColumns();
/// Begin a three columns layout
HORUS_API void beginThreeColumns();
/// Begin a four columns layout
HORUS_API void beginFourColumns();
/// Begin a five column layout
HORUS_API void beginFiveColumns();
/// Begin a six column layout
HORUS_API void beginSixColumns();
/// Advance to next column in the current column layout
HORUS_API void nextColumn();
/// \return the current column's rectangle in coordinates relative to current window
HORUS_API Rect getColumnRect();
/// End the columns layout (does the same thing as nextColumn, for the last column)
HORUS_API void endColumns();
/// Draw a column header widget, usually called inside a column layout. This widget might get resized with mouse, so its parent column could get resized
/// \param label the label of the header
/// \param preferredWidth the normal width of the column header
/// \param minWidth the minimal width of the column header
/// \param maxWidth the maximal width of the column header
HORUS_API void columnHeader(const char* label, f32 width, f32 preferredWidth, f32 minWidth, f32 maxWidth);
/// Begin a scroll view area widget
/// \param height the height of the scroll area
/// \param scrollPosition the current scroll position (given by endScrollView)
/// \param virtualHeight the virtual inside scroll height, if its zero then its automatically calculated from the child widgets inside this area
HORUS_API void beginScrollView(f32 height, f32 scrollPosition, f32 virtualHeight = 0.0f);
/// Ends a scroll view area widget
/// \return the current scroll position (offset)
HORUS_API f32 endScrollView();
/// Begin a virtual list content area, used for many items, inside the beginScrollView/endScrollView
/// \param totalRowCount the number of rows
/// \param itemHeight the height of one item
/// \param scrollPosition the current scroll offset of the scroll view widget
HORUS_API void beginVirtualListContent(u32 totalRowCount, u32 itemHeight, f32 scrollPosition);
/// End a virtual list content area
HORUS_API void endVirtualListContent();
/// Push the old padding and set a new one, padding is the left and right side horizontal spacing for widgets
/// \param newPadding the new horizontal padding value
HORUS_API void pushPadding(f32 newPadding);
/// Pop the previous padding value from stack and set it as current
HORUS_API void popPadding();
/// Push the old spacing value to stack and set a new spacing value, spacing is the vertical space between widgets
/// \param newSpacing the new vertical spacing value
HORUS_API void pushSpacing(f32 newSpacing);
/// Pop old spacing value from stack and set it as current
HORUS_API void popSpacing();
/// \return the current vertical spacing value
HORUS_API f32 getSpacing();
/// \return the current horizontal left and right side padding value
HORUS_API f32 getPadding();
/// Set the global UI scale, this will scale all the elements from widgets to text, but not the docking panes
/// \param scale a value between 0 and N, no higher limit, but use with consideration
HORUS_API void setGlobalScale(f32 scale);
/// \return the current global UI scale
HORUS_API f32 getGlobalScale();
/// Push and set a new tinting color on stack, to colorize the next widget on specific parts
/// \param color the tint color
/// \param type what elements of the widget to tint
HORUS_API void pushTint(const Color& color, TintColorType type = TintColorType::All);
/// Pop the old tint color from stack
HORUS_API void popTint(TintColorType type = TintColorType::All);
/// Draw a delayed tooltip widget near the previous widget
/// \param text the label of the tooltip
/// \return true if the tooltip is visible now
HORUS_API bool tooltip(const char* text);
/// Begin drawing a custom tooltip (delayed), which contains other widgets like image and labels etc.
/// \param width the tooltip width
/// \return true if the tooltip is visible now
HORUS_API bool beginCustomTooltip(f32 width);
/// End drawing a custom tooltip
HORUS_API void endCustomTooltip();
/// Begin draw a box, which may contain other widgets
/// \param color the box tint color
/// \param widgetElementId the widget element id image to use when drawing the box
/// \param state the widget element state to draw with
/// \param customHeight a forced custom height, otherwise auto calculated from the total height the child widgets have
HORUS_API void beginBox(
const Color& color,
WidgetElementId widgetElementId = WidgetElementId::BoxBody,
WidgetStateType state = WidgetStateType::Normal,
f32 customHeight = 0.0f);
/// Begin draw a box, which may contain other widgets
/// \param color the box tint color
/// \param userElementName the user widget element name whose image to use when drawing the box
/// \param state the widget element state to draw with
/// \param customHeight a forced custom height, otherwise auto calculated from the total height the child widgets have
HORUS_API void beginBox(
const Color& color,
const char* userElementName,
WidgetStateType state = WidgetStateType::Normal,
f32 customHeight = 0.0f);
/// End the box widget
HORUS_API bool endBox();
/// Begin drawing a popup widget on top of all other popups or widgets
/// \param width the width of the popup
/// \param flags the popup flags
/// \param position when custom position, this is the window coordinates of the popup
/// \param widgetElementId will use this element's theme to draw the popup body
HORUS_API void beginPopup(
f32 width,
PopupFlags flags = PopupFlags::BelowLastWidget,
const Point& position = Point(),
WidgetElementId widgetElementId = WidgetElementId::PopupBody);
/// End a popup widget
HORUS_API void endPopup();
/// Close the current popup, used inside begin/endPopup
HORUS_API void closePopup();
/// \return true if the popup must be closed, due to user input, used inside begin/endPopup
HORUS_API bool mustClosePopup();
/// \return true if the user clicked outside popup's rect, used inside begin/endPopup
HORUS_API bool clickedOutsidePopup();
/// \return true if mouse is inside popup's rect, used inside begin/endPopup
HORUS_API bool mouseOutsidePopup();
/// \return true if the user pressed escape while current popup is active, used inside begin/endPopup
HORUS_API bool pressedEscapeOnPopup();
/// Draw a message box popup
/// \param title the message box title
/// \param message the message
/// \param buttons the visible buttons flags in the message box
/// \param icon the icon of the message box
/// \param width the width of the message box
/// \param customIcon the custom icon, if set in the icon param
/// \return the pushed button in the message box
HORUS_API MessageBoxButtons messageBox(
const char* title,
const char* message,
MessageBoxButtons buttons = MessageBoxButtons::Ok,
MessageBoxIcon icon = MessageBoxIcon::Info,
u32 width = 400,
Image customIcon = 0);
/// Set the current widget as enabled or not
/// \param enabled if true, the widget is enabled for input
HORUS_API void setEnabled(bool enabled);
/// Set current widget as focused
HORUS_API void setFocused();
/// Draw a button widget
/// \param labelText the button text
/// \return true if button was pressed
HORUS_API bool button(const char* labelText);
/// Draw a button with an icon on it
/// \param icon the icon image
/// \param height the button height, if zero then it takes the icon's height
/// \param down if true the button is in the pressed state
/// \return true if the button was pressed
HORUS_API bool iconButton(Image icon, f32 height = 0.0f, bool down = false);
/// Draw a text input widget
/// \param text the text to be edited, provided by user
/// \param maxTextSize the max size of the text buffer
/// \param valueType the value type filter, what value is allowed in the text
/// \param defaultText the grayed default text when there is no text value
/// \param icon the icon drawn in the widget
/// \return true if the text was modified
HORUS_API bool textInput(char* text, u32 maxTextSize, TextInputValueMode valueType = TextInputValueMode::Any, const char* defaultText = nullptr, Image icon = 0, bool password = false, const char* passwordChar = "•");
/// Draw an integer number slider widget
/// \param minVal the minimum value
/// \param maxVal the maximum value
/// \param value the value ref
/// \param useStep use stepping when moving slider
/// \param step if useStep is true, then this is the step size
/// \return true if value was modified
HORUS_API bool sliderInteger(i32 minVal, i32 maxVal, i32& value, bool useStep = false, i32 step = 0);
/// Draw a float number slider widget
/// \param minVal the minimum value
/// \param maxVal the maximum value
/// \param value the value ref
/// \param useStep use stepping when moving slider
/// \param step if useStep is true, then this is the step size
/// \return true if value was modified
HORUS_API bool sliderFloat(f32 minVal, f32 maxVal, f32& value, bool useStep = false, f32 step = 0);
HORUS_API bool comboSliderFloat(f32& value, f32 stepsPerPixel = 1.0f, f32 arrowStep = 1.0f);
HORUS_API bool comboSliderFloatRanged(f32& value, f32 minVal, f32 maxVal, f32 stepsPerPixel = 1.0f, f32 arrowStep = 1.0f);
HORUS_API bool rotarySliderFloat(const char* label, f32& value, f32 minVal, f32 maxVal, f32 step, bool twoSide = false, f32 fineStepDivideFactor = 10.f);
/// Draw a image widget
/// \param image the image to draw
/// \param height the height of the image, if zero then the actual image height will be used
/// \param horizontalAlign the horizontal image align mode
/// \param verticalAlign the vertical image align mode
/// \param fit how the image is fitted in the rectangle, resize mode
/// \return true if it was clicked on
HORUS_API bool image(Image image, f32 height = 0, HAlignType horizontalAlign = HAlignType::Center, VAlignType verticalAlign = VAlignType::Center, ImageFitType fit = ImageFitType::KeepAspect);
/// Draw a progress bar widget
/// \param value the progress as a percentage from 0.0f to 1.0f (meaning 100%)
HORUS_API void progress(f32 value);
/// Draw a check box widget
/// \param labelText the label text
/// \param checked true if it has check mark on
/// \return true if it is checked
HORUS_API bool check(const char* labelText, bool checked);
/// Draw a radio box widget
/// \param labelText the label text
/// \param checked true if it has check mark on
/// \return true if it is checked
HORUS_API bool radio(const char* labelText, bool checked);
/// Draw a label text widget
/// \param labelText the label's text
/// \param horizontalAlign the text align mode horizontally in the current layout rectangle
/// \return true if it was clicked on
HORUS_API bool label(const char* labelText, HAlignType horizontalAlign = HAlignType::Left);
/// Draw a label text widget with a custom font
/// \param labelText the label's text
/// \param font the label's font
/// \param horizontalAlign the text align mode horizontally in the current layout rectangle
/// \return true if it was clicked on
HORUS_API bool labelCustomFont(const char* labelText, Font font, HAlignType horizontalAlign = HAlignType::Left);
/// Draw a multiline label text widget (involves more logic than a single lined label)
/// \param labelText the label's text
/// \param horizontalAlign the text align mode horizontally in the current layout rectangle
/// \return true if it was clicked on
HORUS_API bool multilineLabel(const char* labelText, HAlignType horizontalAlign);
/// Draw a multiline label text widget with a custom font (involves more logic than a single lined label)
/// \param labelText the label's text
/// \param font the label's font
/// \param horizontalAlign the text align mode horizontally in the current layout rectangle
/// \return true if it was clicked on
HORUS_API bool multilineLabelCustomFont(const char* labelText, Font font, HAlignType horizontalAlign = HAlignType::Left);
/// Draw a expandable panel widget
/// \param labelText the text of the panel
/// \param expanded true if the panel is expanded
/// \return true if the panel is expanded, use this in a if() statement to draw child widgets if expanded
HORUS_API bool panel(const char* labelText, bool expanded);
/// Draw a dropdown widget
/// \param selectedIndex the current selected item index
/// \param items an array of strings for the items
/// \param itemCount the number of items in the list
/// \param maxVisibleDropDownItems the maximum number of visible items in the drop down list, if ~0 then its automatic
/// \return true if it the selection changed
HORUS_API bool dropdown(i32& selectedIndex, const char** items, u32 itemCount, u32 maxVisibleDropDownItems = ~0);
/// Draw a custom data dropdown widget, good for many items in the list
/// \param selectedIndex the current selected item index
/// \param userdata the items user custom data
/// \param itemSource a callback to use when rendering an item, returns false when item list ended
/// \param maxVisibleDropDownItems the maximum number of visible items in the drop down list, if ~0 then its automatic
/// \return true if it the selection changed
HORUS_API bool dropdown(i32& selectedIndex, void* userdata, bool(*itemSource)(void* userdata, i32 index, char** outItemText), u32 maxVisibleDropDownItems = ~0);
/// TODO:
HORUS_API bool list(i32* selectedIndices, u32 maxSelectedIndices, ListSelectionMode selectionType, const char** items, u32 itemCount);
/// TODO:
HORUS_API bool list(i32* selectedIndices, u32 maxSelectedIndices, ListSelectionMode selectionType, void* userdata, bool(*itemSource)(void* userdata, i32 index, char** outItemText));
/// TODO:
HORUS_API bool beginList(ListSelectionMode selectionType);
/// TODO:
HORUS_API void endList();
/// TODO:
HORUS_API void listItem(const char* labelText, SelectableFlags stateFlags, Image icon);
/// Draw a selectable label
/// \param labelText the label's text
/// \param stateFlags the state of the selectable widget
/// \return true if it is selected
HORUS_API bool selectable(const char* labelText, SelectableFlags stateFlags = SelectableFlags::Normal);
/// Draw a selectable label with custom font
/// \param labelText the label's text
/// \param font the label's text font
/// \param stateFlags the state of the selectable widget
/// \return true if it is selected
HORUS_API bool selectableCustomFont(const char* labelText, Font font, SelectableFlags stateFlags = SelectableFlags::Normal);
//////////////////////////////////////////////////////////////////////////
// Separators
//////////////////////////////////////////////////////////////////////////
/// Draw a horizontal line widget
HORUS_API void line();
/// Leave a space between previous widget and next one
/// \param size the size of the gap
HORUS_API void gap(f32 size);
/// Leave a normal space between previous widget and next one
HORUS_API void space();
/// Make next widget show on the same row as the last widget. The widget width depends on the widget type, the content inside it, etc.
/// Not all widgets support the same line modifier, since some need content
HORUS_API void beginSameLine();
HORUS_API void endSameLine();
HORUS_API void pushSameLineSpacing(f32 horizontalSpace = 0.0f);
HORUS_API f32 popSameLineSpacing();
HORUS_API void pushWidth(f32 width);
HORUS_API f32 popWidth();
/// Begin a custom user viewport area
/// \param height the height of the viewport, if zero, it will take the entire remaining container height
/// \return the rectangle in window coordinates of the actual viewport area, use this to draw your custom things in
HORUS_API Rect beginViewport(f32 height = 0);
/// End the current user viewport
HORUS_API void endViewport();
//////////////////////////////////////////////////////////////////////////
// Menus
//////////////////////////////////////////////////////////////////////////
/// Begin a menu bar widget
HORUS_API void beginMenuBar();
/// End the current menu bar widget
HORUS_API void endMenuBar();
/// Begin a menu panel widget (it will show up only when clicked)
/// \param labelText the menu item text
/// \param flags the menu item flags
/// \return true if the menu is visible, use it in a if() statement to show menu items
HORUS_API bool beginMenu(const char* labelText, SelectableFlags flags = SelectableFlags::Normal);
/// End the current menu
HORUS_API void endMenu();
/// Begin drawing a context menu which will open on right click on the previous widget
/// \return true if the menu is opened/visible
HORUS_API bool beginContextMenu(ContextMenuFlags flags = ContextMenuFlags::None);
/// End the current context menu
HORUS_API void endContextMenu();
/// Draw a menu item widget, use inside begin/end menu (or context menu)
/// \param labelText the menu item text
/// \param shortcut the key shortcut text
/// \param icon the menu item left side icon
/// \param flags the menu item flags
/// \return true if the menu item was clicked on
HORUS_API bool menuItem(const char* labelText, const char* shortcut, Image icon = 0, SelectableFlags flags = SelectableFlags::Normal);
/// Draw a menu item separator
HORUS_API void menuSeparator();
//////////////////////////////////////////////////////////////////////////
// Toolbar
//////////////////////////////////////////////////////////////////////////
/// Begin drawing a toolbar widget
/// \param direction the toolbar direction
HORUS_API void beginToolbar(ToolbarDirection dir = ToolbarDirection::Horizontal);
/// End the current toolbar
HORUS_API void endToolbar();
/// Draw a toolbar button widget
/// \param normalIcon the normal state icon
/// \param disabledIcon the disabled state icon
/// \param down true if the button state is down
/// \return true if the button was pressed
HORUS_API bool toolbarButton(Image normalIcon, Image disabledIcon = 0, bool down = false);
/// Draw a toolbar dropdown button widget
/// \param label the label text
/// \param normalIcon the normal state icon
/// \param disabledIcon the disabled state icon
/// \param down true if the button state is down
/// \return true if the dropdown button was pressed
HORUS_API bool toolbarDropdown(const char* label, Image normalIcon = 0, Image disabledIcon = 0);
/// Draw a toolbar item separator
HORUS_API void toolbarSeparator();
/// Leave a gap horizontally in the toolbar
HORUS_API void toolbarGap(f32 gapSize = 5);
/// Draw a text input filter editor in the toolbar
/// \param outText the text buffer to edit
/// \param maxOutTextSize the maximum size of the buffer
/// \param filterIndex the current filter index
/// \param filterNames the filter names
/// \param filterNameCount the filter name count
/// \return true if the text or filter changed
HORUS_API bool toolbarTextInputFilter(char* outText, u32 maxOutTextSize, u32& filterIndex, const char** filterNames = 0, u32 filterNameCount = 0);
/// Draw a text input widget in the toolbar
/// \param outText the text buffer to edit
/// \param maxOutTextSize the maximum size of the buffer
/// \param hint the text hint
/// \param icon the text edit icon
/// \return true if the text was changed
HORUS_API bool toolbarTextInput(char* outText, u32 maxOutTextSize, const char* hint = 0, Image icon = 0);
//////////////////////////////////////////////////////////////////////////
// Dockable Tabs
//////////////////////////////////////////////////////////////////////////
/// Start a tab group
/// \param selectedIndex the selected tab index
HORUS_API void beginTabGroup(TabIndex selectedIndex);
/// Draw a tab widget
/// \param labelText the text of the tab
/// \param icon the icon of the tab
HORUS_API void tab(const char* labelText, Image icon);
/// End the tab group
HORUS_API TabIndex endTabGroup();
//////////////////////////////////////////////////////////////////////////
// Immediate state query for the last widget
//////////////////////////////////////////////////////////////////////////
/// \return true if the previous widget is hovered
HORUS_API bool isHovered();
/// \return true if the previous widget is focused
HORUS_API bool isFocused();
/// \return true if the previous widget is pressed down
HORUS_API bool isPressed();
/// \return true if the previous widget is clicked
HORUS_API bool isClicked();
/// \return true if the previous widget is visible
HORUS_API bool isVisible();
/// \return true if the change for the widget's value ended, used for undo systems to add the undo action only after the drag/edit ended
HORUS_API bool isChangeEnded();
/// \return the current widget id (the next widget's id)
HORUS_API u32 getWidgetId();
/// \return the current mouse position inside current window
HORUS_API Point getMousePosition();
//////////////////////////////////////////////////////////////////////////
// Drag and drop logic support
//////////////////////////////////////////////////////////////////////////
/// \return true if there is a drag intent
HORUS_API bool wantsToDragDrop();
/// set the mouse cursor to be used when dropping allowed
/// \param dropAllowedCursor the mouse cursor
HORUS_API void setDragDropMouseCursor(MouseCursor dropAllowedCursor);
/// Begin dragging an object
/// \param dragObjectUserType the user type for the object
/// \param dragObject the user object to drag as payload
HORUS_API void beginDragDrop(u32 dragObjectUserType, void* dragObject);
/// End drag and drop operation
HORUS_API void endDragDrop();
/// Allow drag drop for the next widgets
HORUS_API void allowDragDrop();
/// Disallow drop for the next widgets
HORUS_API void disallowDragDrop();
/// \return true if the user dropped payload on previous widget
HORUS_API bool droppedOnWidget();
/// \return the drag drop payload user object pointer
HORUS_API void* getDragDropObject();
/// \return the drag drop payload user object type
HORUS_API u32 getDragDropObjectType();
//////////////////////////////////////////////////////////////////////////
// Custom widgets
//////////////////////////////////////////////////////////////////////////
/// Begin drawing a custom widget
/// \param height the widget height
/// \return the widget rectangle in window coordinates
HORUS_API Rect beginCustomWidget(f32 height = 0.0f);
/// End custom widget drawing
HORUS_API void endCustomWidget();
/// \return the current widget drawing pen position in the parent layout/container
HORUS_API Point getPenPosition();
/// Set the widget pen position
HORUS_API void setPenPosition(const Point& penPosition);
/// Increment the widget layer index, the highest layer index will be the active one
HORUS_API void incrementLayerIndex();
/// \return the layer index, after decrementing it
HORUS_API u32 decrementLayerIndex();
///
HORUS_API void decrementWindowMaxLayerIndex();
///
HORUS_API Point getParentSize();
///
HORUS_API Rect getWidgetRect();
///
HORUS_API void pushDrawCommandIndex();
///
HORUS_API u32 popDrawCommandIndex();
///
HORUS_API void beginInsertDrawCommands(u32 atIndex);
///
HORUS_API void endInsertDrawCommands();
///
HORUS_API void setFont(Font font);
///
HORUS_API void setColor(const Color& color);
///
HORUS_API void setLineColor(const Color& color);
///
HORUS_API void setFillColor(const Color& color);
///
HORUS_API void drawTextAt(const char* text, const Point& position);
///
HORUS_API void drawTextInBox(const char* text, const Rect& rect, HAlignType horizontalAlign, VAlignType verticalAlign);
///
HORUS_API Point getTextSize(const char* text);
///
HORUS_API void drawImage(Image image, const Point& position, f32 scale);
///
HORUS_API void drawStretchedImage(Image image, const Rect& rect);
///
HORUS_API void drawBorderedImage(Image image, u32 border, const Rect& rect);
///
HORUS_API void setLineStyle(const LineStyle& style);
///
HORUS_API void setFillStyle(const FillStyle& style);
///
HORUS_API void drawLine(const Point& a, const Point& b);
///
HORUS_API void drawPolyLine(const Point* points, u32 pointCount, bool closed = false);
///
HORUS_API void drawCircle(const Point& center, f32 radius, u32 segments = 32);
///
HORUS_API void drawEllipse(const Point& center, f32 radiusX, f32 radiusY, u32 segments = 32);
///
HORUS_API void drawRectangle(const Rect& rc);
///
HORUS_API void drawSolidRectangle(const Rect& rc);
///
HORUS_API void drawSpline(SplineControlPoint* points, u32 count, f32 segmentSize = 15);
///
HORUS_API void drawArrow(const Point& startPoint, const Point& endPoint, f32 tipLength, f32 tipWidth, bool drawBodyLine = true);
HORUS_API void drawSolidTriangle(const Point& p1, const Point& p2, const Point& p3);
//////////////////////////////////////////////////////////////////////////
// Pane container functions
//////////////////////////////////////////////////////////////////////////
/// Create a view container for a specific window, where views can be docked, used by the docking system
HORUS_API ViewContainer createViewContainer(Window window);
/// Delete a view container, used by the docking system
HORUS_API void deleteViewContainer(ViewContainer viewContainer);
/// Get the view containers from all windows, used by the docking system
HORUS_API u32 getViewContainers(ViewContainer* outViewContainers, u32 maxCount);
/// \return the view container's window, used by the docking system
HORUS_API Window getViewContainerWindow(ViewContainer viewContainer);
/// \return a view container for a specific window, used by the docking system
HORUS_API ViewContainer getWindowViewContainer(Window window);
/// Delete window's view container, used by the docking system
HORUS_API void deleteViewContainerFromWindow(Window window);
/// Get view container's view panes, used by the docking system
/// \return -1 if maxCount was too small
HORUS_API u32 getViewContainerViewPanes(ViewContainer viewContainer, ViewPane* outViewPanes, u32 maxCount);
HORUS_API u32 getViewContainerViewPaneCount(ViewContainer viewContainer);
/// Get view container's first view pane, used by the docking system
HORUS_API ViewPane getViewContainerFirstViewPane(ViewContainer viewContainer);
/// Save the view container state, with all view panes docked info
/// \param filename the *.hui filename relative to executable where to save the state
/// \return true if save was ok
HORUS_API bool saveViewContainersState(const char* filename);
/// Load the view container state, with all view panes docked info, it will create view panes
/// \param filename the *.hui filename relative to executable from where to load the state
/// \return true if the load was ok
HORUS_API bool loadViewContainersState(const char* filename);
/// Set the view container spacing for adding toolbars, status bar or panels
/// Top spacing is not needed, it will be computed automatically from the rendered widgets heights
HORUS_API void setViewContainerSideSpacing(ViewContainer viewContainer, f32 left, f32 right, f32 bottom);
//////////////////////////////////////////////////////////////////////////
// Pane and tab functions
//////////////////////////////////////////////////////////////////////////
/// \return the view pane rect
/// \param viewPane the view pane
HORUS_API Rect getViewPaneRect(ViewPane viewPane);
/// \return the remaining view pane height
/// \param viewPane the view pane
HORUS_API f32 getRemainingViewPaneHeight(ViewPane viewPane);
/// Create a new view pane
/// \param viewContainer the parent view container
/// \param dockType how the view pane will dock
/// \param paneSize width or height, depending on dock type
/// \return the view pane handle
HORUS_API ViewPane createViewPane(ViewContainer viewContainer, DockType dockType, f32 paneSize = 0.0f);
/// Create a new view pane as a child of another view pane
/// \param parentViewPane the parent view pane
/// \param dockType how the view pane will dock
/// \param paneSize width or height, depending on dock type
/// \return the view pane handle
HORUS_API ViewPane createChildViewPane(ViewPane parentViewPane, DockType dockType, f32 paneSize = 0.0f);
/// Add a tab (view instance) to a view pane tab group
/// \param viewPane the view pane where to add a tab
/// \param title the tab text
/// \param id the view id to be shown in this tab
/// \param userDataId the data id associated with this tab's view
/// \return a view pane tab handle
HORUS_API ViewPaneTab addViewPaneTab(ViewPane viewPane, const char* title, ViewId id, u64 userDataId);
/// Remove a view pane tab
HORUS_API void removeViewPaneTab(ViewPaneTab viewPaneTab);
/// Set a view pane tab data id
HORUS_API void setViewPaneTabUserDataId(ViewPaneTab viewPaneTab, u64 userDataId);
/// \return a tab view's data id
HORUS_API u64 getViewPaneTabUserDataId(ViewPaneTab viewPaneTab);
HORUS_API void setViewPaneTabTitle(ViewPaneTab viewPaneTab, const char* title);
HORUS_API const char* getViewPaneTabTitle(ViewPaneTab viewPaneTab);
HORUS_API ViewId getViewPaneTabViewId(ViewPaneTab viewPaneTab);
/// Set a view icon
HORUS_API void setViewIcon(ViewId id, Image image);
/// Dock a view pane inside a view container
HORUS_API void dockViewPane(ViewPane viewPane, ViewContainer viewContainer, DockType dockType);
/// Begin draw of a view pane
HORUS_API ViewId beginViewPane(ViewPane viewPane);
/// End draw of a view pane
HORUS_API void endViewPane();
/// Activate a view pane
HORUS_API void activateViewPane(ViewPane viewPane);
/// Close a view pane
HORUS_API void closeViewPane(ViewPane viewPane);
/// Maximize a view pane
HORUS_API void maximizeViewPane(ViewPane viewPane);
/// Restore a view pane
HORUS_API void restoreViewPane(ViewPane viewPane);
/// Get view pane's view pane tabs
/// \return -1 if maxCount was too small
HORUS_API u32 getViewPaneTabs(ViewPane viewPane, ViewPaneTab* outViewPaneTabs, u32 maxCount);
HORUS_API u32 getViewPaneTabCount(ViewPane viewPane);
//////////////////////////////////////////////////////////////////////////
// Docking system functions
//////////////////////////////////////////////////////////////////////////
/// Set the current view handler, used throughout the docking system (also for save/load view window state)
HORUS_API void setCurrentViewHandler(ViewHandler* handler);
/// \return the current view handler, used throughout the docking system (also for save/load view window state)
HORUS_API ViewHandler* getCurrentViewHandler();
/// Update the docking system internal, usually called by the dockingSystemLoop function, if you make your own loop, then you need to call it
HORUS_API void updateDockingSystem();
/// If this function will be called it will block until all or the main window is closed, or a quitApplication is issued
HORUS_API void dockingSystemLoop();
//////////////////////////////////////////////////////////////////////////
// Utility panels and complex/combined mega-widgets
//////////////////////////////////////////////////////////////////////////
/// Draw a color picker popup widget
HORUS_API bool colorPickerPopup(const Color& currentColor, Color& outNewColor);
/// Draw a 3D double vector editor widget
HORUS_API bool vec3Editor(f64& x, f64& y, f64& z, f64 scrollStep = 0.03f);
/// Draw a 3D float vector editor widget
HORUS_API bool vec3Editor(f32& x, f32& y, f32& z, f32 scrollStep = 0.03f);
/// Draw a 2D double vector editor widget
HORUS_API bool vec2Editor(f64& x, f64& y, f64 scrollStep = 0.03f);
/// Draw a 2D float vector editor widget
HORUS_API bool vec2Editor(f32& x, f32& y, f32 scrollStep = 0.03f);
/// Draw an object reference editor
HORUS_API bool objectRefEditor(Image targetIcon, Image clearIcon, const char* objectTypeName, const char* valueAsString, u32 objectType, void** outObject, bool* objectValueWasModified);
//////////////////////////////////////////////////////////////////////////
// System native file dialogs
//////////////////////////////////////////////////////////////////////////
/// Show a native open file dialog
HORUS_API bool openFileDialog(const char* filterList, const char* defaultPath, char* outPath, u32 maxOutPathSize);
/// Show a native open multiple file dialog
HORUS_API bool openMultipleFileDialog(const char* filterList, const char* defaultPath, OpenMultipleFileSet& outPathSet);
/// Show a native save file dialog
HORUS_API bool saveFileDialog(const char* filterList, const char* defaultPath, char* outPath, u32 maxOutPathSize);
/// Show a native pick folder dialog
HORUS_API bool pickFolderDialog(const char* defaultPath, char* outPath, u32 maxOutPathSize);
//////////////////////////////////////////////////////////////////////////
// Utility functions
//////////////////////////////////////////////////////////////////////////
/// Convert an int value to string
HORUS_API void toString(i32 value, char* outString, u32 outStringMaxSize, u32 fillerZeroesCount = 0);
/// Convert a float value to string
HORUS_API void toString(f32 value, char* outString, u32 outStringMaxSize, u32 decimalPlaces = 4);
/// Convert a unicode (utf32) value to utf8 string
HORUS_API bool unicodeToUtf8(const u32* text, u32 maxTextSize, char* outString, u32 maxOutStringSize);
HORUS_API bool getColorFromText(const char* colorText, Color& color);
}
/** @}*/ |
ddca748da33fa43ab529646afc94176a88d8817f | f155329f675db44f146dc9e7042548cdaf4b6716 | /wimax/connection.h | cffcb5d40abc4ba8682530a66d626790879fa9df | [] | no_license | ilayapriya/ns-2-31wimaxrelay | f089d3beedf5e25819e990c2c006e9d518ba1b50 | 374522e67e044886d7135ad19dbf5da1c0fd6685 | refs/heads/master | 2020-05-19T20:02:12.557721 | 2009-11-07T14:05:11 | 2009-11-07T14:05:11 | 32,441,501 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 11,696 | h | connection.h | /* This software was developed at the National Institute of Standards and
* Technology by employees of the Federal Government in the course of
* their official duties. Pursuant to title 17 Section 105 of the United
* States Code this software is not subject to copyright protection and
* is in the public domain.
* NIST assumes no responsibility whatsoever for its use by other parties,
* and makes no guarantees, expressed or implied, about its quality,
* reliability, or any other characteristic.
* <BR>
* We would appreciate acknowledgement if the software is used.
* <BR>
* NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND
* DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING
* FROM THE USE OF THIS SOFTWARE.
* </PRE></P>
* @author rouil
*/
#ifndef CONNECTION_H
#define CONNECTION_H
#include "serviceflow.h"
#include "arqstatus.h"
#include "packet.h"
#include "queue.h"
#include "mac802_16pkt.h"
/* CONSTANTS */
#define INITIAL_RANGING_CID 0x0000
#define BASIC_CID_START 0x0001
#define BASIC_CID_STOP 0x2000
#define PRIMARY_CID_START 0x2001
#define PRIMARY_CID_STOP 0x4000
#define TRANSPORT_SEC_CID_START 0x4001
#define TRANSPORT_SEC_CID_STOP 0xFEFE
#define AAS_INIT_RANGIN_CID 0xFEFF
#define MULTICAST_CID_START 0xFF00
#define MULTICAST_CID_STOP 0xFFFD
#define PADDING_CID 0xFFFE
#define BROADCAST_CID 0xFFFF
#define IN_CONNECTION false
#define OUT_CONNECTION true
/**
* Define maximum subscribers since in this version, we use "br" field to indicate subsriber station;
* Need to change it later with cdma packet structure at mac802_16pkt.h
*/
#define MAX_SSID 2048
/**
* Define cdma_connection for cdma-initial-ranging (uses only cid 0 for all subscribers)
*/
struct cdma_connection {
int cdma_flag;
int cdma_ssid;
u_char cdma_code;
u_char cdma_top;
int cdma_cid;
};
/**
* Define the type of the connection
*/
enum ConnectionType_t {
CONN_INIT_RANGING,
CONN_AAS_INIT_RANGING,
CONN_MULTICAST_POLLING,
CONN_PADDING,
CONN_BROADCAST,
CONN_BASIC,
CONN_PRIMARY,
CONN_SECONDARY,
CONN_DATA
};
class PeerNode;
class ConnectionManager;
class Connection;
class Arqstatus;
LIST_HEAD (connection, Connection);
/**
* Class Connection
* The class supports LIST.
*/
class Connection {
public:
/** constructor */
Connection (ConnectionType_t);
/** constructor */
Connection (ConnectionType_t, int cid);
/** destructor */
~Connection ();
/**
* Set the connection manager
* @param manager The Connection manager
*/
void setManager (ConnectionManager *manager);
/**
* Enqueue the given packet
* @param p The packet to enqueue
*/
void enqueue (Packet * p);
/**
* Enqueue the given packet at the head
* @param p The packet to enqueue
*/
void enqueue_head (Packet * p);
/**
* Set the service flow for this connection
* @param sflow The service flow for this connection
*/
void setServiceFlow (ServiceFlow * sflow);
/**
* Return the service flow for this connection
*/
ServiceFlow * getServiceFlow ();
/**
* Get the value of cid
* The connection id
* @return the value of cid
*/
inline int get_cid ( ) {
return cid_;
}
/**
* Get the value of type_
* The connection id
* @return the value of type_
*/
inline ConnectionType_t get_category ( ) {
return type_;
}
/**
* Get the value of serviceflow_
* The service flow associated with the connection
* @return the value of serviceflow_
*/
inline ServiceFlow * get_serviceflow ( ) {
return serviceflow_;
}
/**
* Set the value of serviceflow_
* The service flow associated with the connection
* @return the value of serviceflow_
*/
inline void set_serviceflow (ServiceFlow * value ) {
serviceflow_ = value;
}
/**
* return the connection type
* @return The connection type
*/
inline ConnectionType_t getType () {
return type_;
}
/**
* Get the value of queue_
* The queue for this connection
* @return the value of queue_
*/
inline PacketQueue * get_queue ( ) {
return queue_;
}
/**
* Dequeue a packet from the queue
* @param p The packet to enqueue
*/
Packet * dequeue ();
/**
* Return queue size in bytes
* @return The queue size in bytes
*/
int queueByteLength ();
Packet * queueLookup (int n);
/**
* Return queue size in number of packets
* @return The number of packet in the queue
*/
int queueLength ();
/**
* Flush the queue
*/
int flush_queue ();
/**
* Enable/Disable fragmentation
*/
void enable_fragmentation (bool enable) {
frag_enable_ = enable;
}
/**
* Indicates if the connection supports fragmentation
*/
bool isFragEnable () {
return frag_enable_;
}
/**
* Enable/Disable Packing
*/
void enable_packing (bool enable) {
pack_enable_ = enable;
}
/**
* Indicates if the connection supports packing
*/
bool isPackingEnable () {
return pack_enable_;
}
// Chain element to the list
inline void insert_entry(struct connection *head) {
LIST_INSERT_HEAD(head, this, link);
}
// Return next element in the chained list
Connection* next_entry(void) const {
return link.le_next;
}
// Remove the entry from the list
inline void remove_entry() {
LIST_REMOVE(this, link);
}
/**
* Return the peer node for this connection
* @return the peer node for this connection
*/
inline PeerNode * getPeerNode () {
return peer_;
}
/**
* Return the ArqStatus for this connection
* @return the ArqStatus for this connection
*/
inline Arqstatus * getArqStatus () {
return arqstatus_;
}
/**
* Set the peer node for this connection
* @param the peer node for this connection
*/
inline void setPeerNode (PeerNode *peer) {
peer_=peer;
}
/**
* Set the ArqStatus for this connection
* @param the ArqStatus for this connection
*/
inline void setArqStatus (Arqstatus * arqstatus) {
arqstatus_= arqstatus;
}
/**
* Update the fragmentation information
* @param status The new fragmentation status
* @param index The new fragmentation index
* @param bytes The number of bytes
*/
void updateFragmentation (fragment_status status, int index, int bytes);
fragment_status getFragmentationStatus () {
return frag_status_;
}
int getFragmentNumber () {
return frag_nb_;
}
int getFragmentBytes () {
return frag_byte_proc_;
}
/**
* Set the bandwidth requested
* @param bw The bandwidth requested in bytes
*/
void setBw (int bw);
/**
* Get the bandwidth requested
* @param bw The bandwidth requested in bytes
*/
int getBw ();
/**
* Get and Set polling interval
*/
int getPOLL_interval ();
void setPOLL_interval (int poll_int);
/**
* Get and Set counter for cdma bandwidth requested parameters
*/
inline int getBW_REQ_QUEUE () {
return bw_req_queue_;
}
inline void setBW_REQ_QUEUE ( int bw_req_queue ) {
bw_req_queue_ = bw_req_queue ;
}
/**
* Get and Set counter for cdma initial ranging requested parameters
*/
inline int getINIT_REQ_QUEUE (int ssid) {
return init_req_queue_[ssid];
}
inline void setINIT_REQ_QUEUE (int ssid, int init_req_queue) {
init_req_queue_[ssid] = init_req_queue;
}
/**
* Get and Set the cdma bandwidth requested parameters
*/
inline int getCDMA () {
return requested_cdma_;
}
inline u_char getCDMA_code () {
return requested_cdma_code_;
}
inline u_char getCDMA_top () {
return requested_cdma_top_;
}
inline void setCDMA (int cdma_flag) {
requested_cdma_ = cdma_flag;
}
inline void setCDMA_code (u_char cdma_code) {
requested_cdma_code_ = cdma_code;
}
inline void setCDMA_top (u_char cdma_top) {
requested_cdma_top_ = cdma_top;
}
/**
* Get and Set the cdma initial ranging requested parameters; uses only cid 0 so need array of subscribers
*/
inline int getCDMA_SSID_FLAG (int ssid) {
return cdma_per_conn[ssid].cdma_flag;
}
inline u_char getCDMA_SSID_TOP (int ssid) {
return cdma_per_conn[ssid].cdma_top;
}
inline u_char getCDMA_SSID_CODE (int ssid) {
return cdma_per_conn[ssid].cdma_code;
}
inline int getCDMA_SSID_CID (int ssid) {
return cdma_per_conn[ssid].cdma_cid;
}
inline int getCDMA_SSID_SSID (int ssid) {
return cdma_per_conn[ssid].cdma_ssid;
}
inline void setCDMA_SSID_FLAG (int ssid, int flag_ssid) {
cdma_per_conn[ssid].cdma_flag = flag_ssid;
}
inline void setCDMA_SSID_TOP (int ssid, u_char top_ssid) {
cdma_per_conn[ssid].cdma_top = top_ssid;
}
inline void setCDMA_SSID_CODE (int ssid, u_char code_ssid) {
cdma_per_conn[ssid].cdma_code = code_ssid;
}
inline void setCDMA_SSID_CID (int ssid, int cid_ssid) {
cdma_per_conn[ssid].cdma_cid = cid_ssid;
}
inline void setCDMA_SSID_SSID (int ssid, int ssid_ssid) {
cdma_per_conn[ssid].cdma_ssid = ssid_ssid;
}
inline void initCDMA () {
requested_cdma_ = 0;
requested_cdma_code_ = 0;
requested_cdma_top_ = 0;
}
/**
* Clear cdma parameter value
*/
void initCDMA_SSID ();
protected:
/**
* Pointer to next in the list
*/
LIST_ENTRY(Connection) link;
//LIST_ENTRY(Connection); //for magic draw
private:
/**
* The connection manager
*/
ConnectionManager* manager_;
/**
* The connection id
*/
int cid_;
/**
* The service flow associated with the connection
*/
ServiceFlow * serviceflow_;
/**
* ArqStatus of the connection
*/
Arqstatus * arqstatus_;
/**
* The queue for this connection
*/
PacketQueue * queue_;
/**
* The connection type
*/
ConnectionType_t type_;
/**
* Pointer to the peer node data
*/
PeerNode *peer_;
/**
* Fragmentation status
*/
fragment_status frag_status_;
/**
* Fragmentation number
*/
int frag_nb_;
/**
* Bytes already processed (i.e sent or received)
*/
int frag_byte_proc_;
/**
* Indicates if the connection can use fragmentation
*/
bool frag_enable_;
/**
* Indicates if the connection can use packing
*/
bool pack_enable_;
/**
* Indicates the number of bytes requested
*/
int requested_bw_;
/**
* Indicates polling interval for each connection
*/
int poll_int_;
/**
* Indicates a counter to resend bandwidth request (do not use for now)
*/
int bw_req_queue_;
/**
* Indicates cdma-bw-req variables
*/
int requested_cdma_;
u_char requested_cdma_code_;
u_char requested_cdma_top_;
/**
* Indicates cdma-initial-ranging-req variables
*/
cdma_connection cdma_per_conn[MAX_SSID];
int init_req_queue_[MAX_SSID];
};
#endif //CONNECTION_H
|
c3e69990b66f3f39971158fb1d8cab80fcdedc90 | 68e2df11645278a9997eeae804a9a075585b59f2 | /src/motor/plugin/api/motor/plugin/resourcehook.hh | c8cee015c1226f29fb39c7412612805a999354b4 | [
"BSD-3-Clause"
] | permissive | motor-dev/Motor | df673aafcd4040a7ce7e6ef9301c38270982d544 | edd724bba99af63d938a0db165dec07403a40fb6 | refs/heads/master | 2023-07-22T10:19:26.028314 | 2023-07-07T14:01:20 | 2023-07-07T14:01:20 | 398,261,504 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 740 | hh | resourcehook.hh | /* Motor <motor.devel@gmail.com>
see LICENSE for detail */
#ifndef MOTOR_PLUGIN_RESOURCEHOOK_HH
#define MOTOR_PLUGIN_RESOURCEHOOK_HH
#include <motor/plugin/stdafx.h>
#include <motor/plugin/hook.hh>
#include <motor/plugin/plugin.hh>
namespace Motor { namespace Plugin {
template < typename RESOURCE >
struct ResourceHook
{
private:
ref< const RESOURCE > m_resource;
public:
explicit ResourceHook(ref< const RESOURCE > resource) : m_resource(resource)
{
}
void onload(const Context& context)
{
context.resourceManager->load(m_resource);
}
void onunload(const weak< Resource::ResourceManager >& manager)
{
manager->unload(m_resource);
}
};
}} // namespace Motor::Plugin
#endif
|
f922bfcc09cf5e2c041a05190eefd7dd372d34c7 | 46380e913e7fe8727e010663745fd59ea04efcd9 | /Source/hardtime_textworld/Public/SimWorld.h | e49930adc37913e1293af92d7c36e21325adacec | [
"MIT"
] | permissive | ThomasWilliamWallace/PrisonGame | e2c9a43b9ff12de4d0b84ec818c0ff4806a1d7bd | 243ffd5d587086775c094d3dc72ff29987aa9bce | refs/heads/master | 2023-07-18T01:10:58.019447 | 2021-08-23T20:56:59 | 2021-08-23T20:56:59 | 150,906,473 | 2 | 0 | MIT | 2021-08-23T20:56:59 | 2018-09-29T22:03:39 | C++ | UTF-8 | C++ | false | false | 429 | h | SimWorld.h | #pragma once
#include "PlayerRegistry.h"
#include "Item.h"
class USimWorld //represents the simulated world
{
public:
UPlayerData* weightsOccupied;
UPlayerData* circuitsOccupied;
UPlayerData* studyOccupied;
UPlayerData* bedOccupied;
void WorldEffects();
void PrintWorld();
void FullDisplay();
void Clean();
USimWorld();
std::vector< Item* > items;
UPlayerRegistry playerRegistry;
};
|
4e67bcd70ad577e19445bdef577319c918c20991 | 50316327867a122463e4d2bbbdefae307ec4183f | /src/LogEngine.cpp | fa218ff02b0795233213c84818c81b83ab3f8410 | [] | no_license | mrowacz/simple_http_server | e998e82e930022222891c7f5b4bcf5c27f79a27b | bfc1876ceba607684caab1cd72b89b7b17c665f0 | refs/heads/master | 2021-07-05T10:43:34.142178 | 2017-09-24T22:14:07 | 2017-09-24T22:14:07 | 103,870,849 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,165 | cpp | LogEngine.cpp | // Copyright 2017 Lukasz Czerwinski mrowacz@gmail.com
// Distributed under MIT license, or public domain if desired and
// recognized in your jurisdiction.
#include "LogEngine.h"
void slog::init() {
logging::core::get()->set_filter
(
logging::trivial::severity >= logging::trivial::trace
);
logging::add_common_attributes();
}
void slog::logToStdOut()
{
logging::add_console_log
(
std::cout,
keywords::format = "[%TimeStamp%]: >> %Message%"
);
}
void slog::logToFile() {
logging::add_file_log
(
keywords::file_name = "server_%N.log",
keywords::auto_flush = true,
keywords::rotation_size = 10 * 1024 * 1024,
keywords::time_based_rotation = sinks::file::rotation_at_time_point(0, 0, 0),
keywords::format = "[%TimeStamp%][%File%]: >> %Message%"
);
}
void slog::disable() {
logging::core::get()->set_filter
(
logging::trivial::severity >= logging::trivial::fatal
);
}
|
fae5bc2754dda9a4d1310ccc174a78a2b670c495 | 868d1f80fbddca5461123155c992adbfdb9c4136 | /NetKet/Hamiltonian/graph_hamiltonian.hpp | a62d329f4e2f7c444adbbdbd2037fe0f7f5fec62 | [
"Apache-2.0"
] | permissive | stavros11/netket | 68e7c3d54a712f796080aa17771c7b216e0de59e | 1cec25a4884bdbd2fddb5d24daae627cd89316d8 | refs/heads/master | 2020-03-31T08:20:01.200337 | 2018-11-01T21:30:06 | 2018-11-01T21:30:06 | 149,031,663 | 0 | 0 | Apache-2.0 | 2018-09-16T20:08:22 | 2018-09-16T20:08:22 | null | UTF-8 | C++ | false | false | 4,624 | hpp | graph_hamiltonian.hpp | // Copyright 2018 The Simons Foundation, Inc. - All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef NETKET_BOND_HAMILTONIAN_CC
#define NETKET_BOND_HAMILTONIAN_CC
#include <Eigen/Dense>
#include <array>
#include <unordered_map>
#include <vector>
#include "Utils/json_helper.hpp"
#include "local_operator.hpp"
namespace netket {
// BondHamiltonian on an arbitrary graph
template <class G>
class GraphHamiltonian : public AbstractHamiltonian {
std::vector<LocalOperator> operators_;
Hilbert hilbert_;
// Arbitrary graph
const G &graph_;
// const std::size_t nvertices_;
const int nvertices_;
public:
using MatType = LocalOperator::MatType;
explicit GraphHamiltonian(const G &graph, const json &pars)
: hilbert_(pars), graph_(graph), nvertices_(graph.Nsites()) {
auto pars_hamiltonian = pars["Hamiltonian"];
// Ensure that at least one of SiteOps and BondOps was initialized
if (!FieldExists(pars_hamiltonian, "SiteOps") and
FieldExists(pars_hamiltonian, "BondOps")) {
pars_hamiltonian["SiteOps"] = std::vector<MatType>();
} else if (!FieldExists(pars_hamiltonian, "BondOps") and
FieldExists(pars_hamiltonian, "SiteOps")) {
pars_hamiltonian["BondOps"] = std::vector<MatType>();
} else if (!FieldExists(pars_hamiltonian, "BondOps") and
!FieldExists(pars_hamiltonian, "SiteOps")) {
throw InvalidInputError("Must input at least SiteOps or BondOps");
}
// Ensure that parameters are arrays
if (!pars_hamiltonian["SiteOps"].is_array()) {
throw InvalidInputError(
"Hamiltonian: Bond operators object is not an array!");
}
if (!pars_hamiltonian["BondOps"].is_array()) {
throw InvalidInputError(
"Hamiltonian: Bond operators object is not an array!");
}
// Check BondOpColors
if (!FieldExists(pars_hamiltonian, "BondOpColors")) {
if (pars_hamiltonian["BondOps"].size() == 0) {
pars_hamiltonian["BondOpColors"] = std::vector<int>();
} else {
pars_hamiltonian["BondOpColors"] =
std::vector<int>(pars_hamiltonian["BondOps"].size(), 0);
}
}
if (!pars_hamiltonian["BondOpColors"].is_array()) {
throw InvalidInputError("Hamiltonian.BondOpColors is not an array");
}
// Save operators and bond colors
auto sop = pars_hamiltonian["SiteOps"].get<std::vector<MatType>>();
auto bop = pars_hamiltonian["BondOps"].get<std::vector<MatType>>();
auto op_color = pars_hamiltonian["BondOpColors"].get<std::vector<int>>();
// Site operators
if (sop.size() > 0) {
for (int i = 0; i < nvertices_; i++) {
for (std::size_t j = 0; j < sop.size(); j++) {
operators_.push_back(
LocalOperator(hilbert_, sop[j], std::vector<int>{i}));
}
}
}
// Bond operators
if (bop.size() != op_color.size()) {
throw InvalidInputError(
"The bond Hamiltonian definition is inconsistent."
"The sizes of BondOps and BondOpColors do not match.");
}
if (bop.size() > 0) {
// Use EdgeColors to populate operators
for (auto const &kv : graph_.EdgeColors()) {
for (std::size_t c = 0; c < op_color.size(); c++) {
if (op_color[c] == kv.second && kv.first[0] < kv.first[1]) {
std::vector<int> edge = {kv.first[0], kv.first[1]};
operators_.push_back(LocalOperator(hilbert_, bop[c], edge));
}
}
}
}
InfoMessage() << "Size of operators_ " << operators_.size() << std::endl;
}
void FindConn(const Eigen::VectorXd &v,
std::vector<std::complex<double>> &mel,
std::vector<std::vector<int>> &connectors,
std::vector<std::vector<double>> &newconfs) const override {
connectors.clear();
newconfs.clear();
mel.resize(0);
for (std::size_t i = 0; i < operators_.size(); i++) {
operators_[i].AddConn(v, mel, connectors, newconfs);
}
}
const Hilbert &GetHilbert() const override { return hilbert_; }
};
} // namespace netket
#endif
|
7546c3b707b43b8481c88ee0077669360482ae38 | deae7011a968494f64d3406123040760cc2b6361 | /src/id_in.cpp | b33c38d913bdfc5b64f296a0feb5ccb44362b279 | [] | no_license | ioan-chera/AutoWolf | 9499508ec1ca75bdee95ba5a0b7e92fc0881db09 | 0780662807138aad4145a65851215d8d8a8815de | refs/heads/master | 2022-02-11T18:34:01.393793 | 2022-01-19T06:27:33 | 2022-01-19T06:27:33 | 11,735,081 | 3 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 19,370 | cpp | id_in.cpp | //
// Copyright (C) 1991-1992 id Software
// Copyright (C) 2007-2011 Moritz Kroll
// Copyright (C) 2013 Ioan Chera
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
//
// ID Engine
// ID_IN.c - Input Manager
// v1.0d1
// By Jason Blochowiak
//
//
// This module handles dealing with the various input devices
//
// Depends on: Memory Mgr (for demo recording), Sound Mgr (for timing stuff),
// User Mgr (for command line parms)
//
// Globals:
// in_lastScan - The keyboard scan code of the last key pressed
// in_lastASCII - The ASCII value of the last key pressed
// DEBUG - there are more globals
//
#include "version.h"
#include "Config.h"
#include "Exception.h"
#include "i_system.h"
#include "i_video.h"
#include "id_in.h"
#include "id_sd.h"
#include "id_us.h"
#include "ioan_bot.h"
#include "Logger.h"
#include "PString.h"
#include "wl_def.h"
#include "wl_main.h"
#include "wl_play.h"
#include "Platform.h"
#ifdef IOS
#include "CocoaFun.h"
#endif
#ifdef USE_SDL1_2
#define KP2 SDLK_KP2
#define KP4 SDLK_KP4
#define KP6 SDLK_KP6
#define KP8 SDLK_KP8
#else
#define KP2 SDLK_KP_2
#define KP4 SDLK_KP_4
#define KP6 SDLK_KP_6
#define KP8 SDLK_KP_8
#endif
InputManager myInput;
// IOANCH: added C++ class
const byte InputManager::m_ASCIINames[] = // Unshifted ASCII for scan codes // TODO: keypad
{
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,8 ,9 ,0 ,0 ,0 ,13 ,0 ,0 , // 0
0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,27 ,0 ,0 ,0 , // 1
' ',0 ,0 ,0 ,0 ,0 ,0 ,39 ,0 ,0 ,'*','+',',','-','.','/', // 2
'0','1','2','3','4','5','6','7','8','9',0 ,';',0 ,'=',0 ,0 , // 3
'`','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o', // 4
'p','q','r','s','t','u','v','w','x','y','z','[',92 ,']',0 ,0 , // 5
0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , // 6
0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 // 7
};
const byte InputManager::m_ShiftNames[] = // Shifted ASCII for scan codes
{
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,8 ,9 ,0 ,0 ,0 ,13 ,0 ,0 , // 0
0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,27 ,0 ,0 ,0 , // 1
' ',0 ,0 ,0 ,0 ,0 ,0 ,34 ,0 ,0 ,'*','+','<','_','>','?', // 2
')','!','@','#','$','%','^','&','*','(',0 ,':',0 ,'+',0 ,0 , // 3
'~','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O', // 4
'P','Q','R','S','T','U','V','W','X','Y','Z','{','|','}',0 ,0 , // 5
0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , // 6
0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 // 7
};
//
// InputManager::p_getMouseButtons
//
// Gets mouse click info
//
int InputManager::p_getMouseButtons() const
{
int buttons = SDL_GetMouseState(NULL, NULL);
int middlePressed = buttons & SDL_BUTTON(SDL_BUTTON_MIDDLE);
int rightPressed = buttons & SDL_BUTTON(SDL_BUTTON_RIGHT);
buttons &= ~(SDL_BUTTON(SDL_BUTTON_MIDDLE) | SDL_BUTTON(SDL_BUTTON_RIGHT));
if(middlePressed) buttons |= 1 << 2;
if(rightPressed) buttons |= 1 << 1;
return buttons;
}
//
// InputManager::p_processEvent
//
// Reads SDL events and puts them in its variables
//
void InputManager::p_processEvent(const SDL_Event *event)
{
// static int lastOffset;
switch (event->type)
{
// exit if the window is closed
case SDL_QUIT:
Logger::Write("SDL_QUIT processed");
if(!g_appForcedToQuit)
{
Logger::Write("...not forced");
DestroySavedInstance();
if (ingame && cfg_botActive)
bot.SaveData();
Quit();
}
else
{
Logger::Write("...forced");
exit(0);
}
// check for keypresses
case SDL_KEYDOWN:
{
if(event->key.keysym.sym == SCROLLLOCK ||
event->key.keysym.sym == SDLK_F12)
{
m_grabInput = !m_grabInput;
#ifdef USE_SDL1_2
SDL_WM_GrabInput(m_grabInput ? SDL_GRAB_ON : SDL_GRAB_OFF);
#else
// SDL_SetRelativeMouseMode(m_grabInput ? SDL_TRUE : SDL_FALSE);
#endif
return;
}
m_lastScan = (ScanCode)event->key.keysym.sym;
#ifdef USE_SDL1_2
SDLMod mod = SDL_GetModState();
#else
SDL_Keymod mod = SDL_GetModState();
#endif
if(m_keyboard.count(sc_Alt))
{
if(static_cast<int>(m_lastScan) == static_cast<int>(SDLK_F4))
{
DestroySavedInstance();
if (ingame && cfg_botActive)
bot.SaveData();
Quit();
}
}
// IOANCH 20130801: added meta key mapping
if(static_cast<int>(m_lastScan) == static_cast<int>(SDLK_KP_ENTER)) m_lastScan = (ScanCode)SDLK_RETURN;
else if(m_lastScan == static_cast<ScanCode>(SDLK_RSHIFT)) m_lastScan = (ScanCode)SDLK_LSHIFT;
else if(m_lastScan == static_cast<ScanCode>(SDLK_RALT)) m_lastScan = (ScanCode)SDLK_LALT;
else if(m_lastScan == static_cast<ScanCode>(SDLK_RCTRL)) m_lastScan = (ScanCode)SDLK_LCTRL;
else if(m_lastScan == static_cast<ScanCode>(RGUI)) m_lastScan = (ScanCode)LGUI;
#ifndef USE_SDL1_2
else if(m_lastScan == static_cast<ScanCode>(SDLK_AC_BACK)) m_lastScan = (ScanCode)SDLK_ESCAPE;
#endif
else
{
if((mod & KMOD_NUM) == 0)
{
switch((int)m_lastScan)
{
case KP2: m_lastScan = (ScanCode)SDLK_DOWN; break;
case KP4: m_lastScan = (ScanCode)SDLK_LEFT; break;
case KP6: m_lastScan = (ScanCode)SDLK_RIGHT; break;
case KP8: m_lastScan = (ScanCode)SDLK_UP; break;
}
}
}
int sym = m_lastScan;
if(sym >= 'a' && sym <= 'z')
sym -= 32; // convert to uppercase
if(mod & (KMOD_SHIFT | KMOD_CAPS))
{
if(sym < (int)lengthof(m_ShiftNames) && m_ShiftNames[sym])
m_lastASCII = m_ShiftNames[sym];
}
else
{
if(sym < (int)lengthof(m_ASCIINames) && m_ASCIINames[sym])
m_lastASCII = m_ASCIINames[sym];
}
m_keyboard.insert(m_lastScan);
if(m_lastScan == static_cast<ScanCode>(SDLK_PAUSE))
m_paused = true;
break;
}
case SDL_KEYUP:
{
int key = event->key.keysym.sym;
if(key == SDLK_KP_ENTER) key = SDLK_RETURN;
else if(key == SDLK_RSHIFT) key = SDLK_LSHIFT;
else if(key == SDLK_RALT) key = SDLK_LALT;
else if(key == SDLK_RCTRL) key = SDLK_LCTRL;
else if(key == RGUI) key = LGUI;
#ifndef USE_SDL1_2
else if(key == SDLK_AC_BACK) key = SDLK_ESCAPE;
#endif
else
{
if((SDL_GetModState() & KMOD_NUM) == 0)
{
switch(key)
{
case KP2: key = SDLK_DOWN; break;
case KP4: key = SDLK_LEFT; break;
case KP6: key = SDLK_RIGHT; break;
case KP8: key = SDLK_UP; break;
}
}
}
m_keyboard.erase(key);
break;
}
//
// For Android and possibly iOS
//
#ifndef USE_SDL1_2
case SDL_APP_WILLENTERBACKGROUND:
Sound::Stop();
Sound::MusicOff();
break;
case SDL_APP_DIDENTERFOREGROUND:
#ifdef IOS
Cocoa_HideStatusBar(); // make sure it stays hidden
#endif
I_RecreateRenderer();
Sound::MusicOn();
break;
case SDL_FINGERDOWN:
case SDL_FINGERMOTION:
case SDL_FINGERUP:
if(Platform::touchscreen)
{
m_fingerdown = event->type != SDL_FINGERUP;
float fingerx = event->tfinger.x;
float fingery = event->tfinger.y;
// WARNING: it's assumed that the window is in the middle. Who's to
// know for sure?
if(128*vid_screenWidth / vid_screenHeight >
static_cast<int>(128*vid_correctedWidth / vid_correctedHeight))
{
// Greater aspect ratio of window: pillar box. Height is correct
// 0... a... 1 - a... 1
// w / W
// w = H / sh * sw
// a = 1 / 2 - ca
// ca = 1 / 2 * w / W
// a = 1 / 2 - 1 / 2 * w / W
// a = 1 / 2 * (1 - w / W)
// a = 1 / 2 * (1 - H / sh * sw / W)
float a = 0.5f * (1 - (float)vid_screenHeight * vid_correctedRatio / vid_screenWidth);
m_touchx = static_cast<int>((fingerx - a) / (1 - 2 * a) * cfg_logicalWidth);
m_touchy = static_cast<int>(fingery * cfg_logicalHeight);
}
else
{
float a = 0.5f * (1 - (float)vid_screenWidth / vid_correctedRatio / vid_screenHeight);
m_touchx = static_cast<int>(fingerx * cfg_logicalWidth);
m_touchy = static_cast<int>((fingery - a) / (1 - 2 * a) * cfg_logicalHeight);
}
}
break;
case SDL_TEXTINPUT:
if(event->text.text[0] && !event->text.text[1])
m_lastASCII = event->text.text[0];
break;
#else
case SDL_ACTIVEEVENT:
{
if(cfg_fullscreen && (event->active.state & SDL_APPACTIVE) != 0)
{
if(event->active.gain)
{
if(m_needRestore)
{
I_FreeLatchMem();
I_LoadLatchMem();
}
m_needRestore = false;
}
else m_needRestore = true;
}
}
#endif
#if defined(GP2X)
case SDL_JOYBUTTONDOWN:
GP2X_ButtonDown(event->jbutton.button);
break;
case SDL_JOYBUTTONUP:
GP2X_ButtonUp(event->jbutton.button);
break;
#endif
}
}
//
// InputManager::clearKeysDown
//
// Removes input information so key presses aren't responded to
//
void InputManager::clearKeysDown()
{
m_lastScan = sc_None;
m_lastASCII = key_None;
m_keyboard.clear();
}
//
// InputManager::initialize
//
// Sets up the parameters
//
void InputManager::initialize()
{
if (m_started)
return;
clearKeysDown();
if(cfg_joystickindex >= 0 && cfg_joystickindex < SDL_NumJoysticks())
{
m_joystick = SDL_JoystickOpen(cfg_joystickindex);
if(m_joystick)
{
m_joyNumButtons = SDL_JoystickNumButtons(m_joystick);
if(m_joyNumButtons > 32)
m_joyNumButtons = 32; // only up to 32 buttons are supported
m_joyNumHats = SDL_JoystickNumHats(m_joystick);
if(cfg_joystickhat < -1 || cfg_joystickhat >= m_joyNumHats)
throw Exception(PString("The joystickhat param must be between 0 and ").concat(m_joyNumHats - 1).concat("!")());
}
}
SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE);
if(cfg_fullscreen || cfg_forcegrabmouse)
{
m_grabInput = true;
#ifdef USE_SDL1_2
SDL_WM_GrabInput(SDL_GRAB_ON);
#else
// SDL_SetRelativeMouseMode(SDL_TRUE);
#endif
}
// I didn't find a way to ask libSDL whether a mouse is present, yet...
#if defined(GP2X)
m_mousePresent = false;
#elif defined(_arch_dreamcast)
m_mousePresent = DC_MousePresent();
#else
m_mousePresent = true;
#endif
m_started = true;
}
//
// InputManager::close
//
// Cleans up and disables the started flag
//
void InputManager::close()
{
if (!m_started)
return;
if(m_joystick)
SDL_JoystickClose(m_joystick);
m_started = false;
}
//
// InputManager::getJoyDelta
//
// Outputs the joystick handling
//
void InputManager::getJoyDelta(int *dx, int *dy) const
{
if(!m_joystick)
{
*dx = *dy = 0;
return;
}
SDL_JoystickUpdate();
#ifdef _arch_dreamcast
int x = 0;
int y = 0;
#else
int x = SDL_JoystickGetAxis(m_joystick, 0) >> 8;
int y = SDL_JoystickGetAxis(m_joystick, 1) >> 8;
#endif
if(cfg_joystickhat != -1)
{
uint8_t hatState = SDL_JoystickGetHat(m_joystick, cfg_joystickhat);
if(hatState & SDL_HAT_RIGHT)
x += 127;
else if(hatState & SDL_HAT_LEFT)
x -= 127;
if(hatState & SDL_HAT_DOWN)
y += 127;
else if(hatState & SDL_HAT_UP)
y -= 127;
if(x < -128) x = -128;
else if(x > 127) x = 127;
if(y < -128) y = -128;
else if(y > 127) y = 127;
}
*dx = x;
*dy = y;
}
//
// InputManager::getJoyFineDelta
//
// Outputs for dreamcast
//
void InputManager::getJoyFineDelta(int *dx, int *dy) const
{
if(!m_joystick)
{
*dx = 0;
*dy = 0;
return;
}
SDL_JoystickUpdate();
int x = SDL_JoystickGetAxis(m_joystick, 0);
int y = SDL_JoystickGetAxis(m_joystick, 1);
if(x < -128) x = -128;
else if(x > 127) x = 127;
if(y < -128) y = -128;
else if(y > 127) y = 127;
*dx = x;
*dy = y;
}
//
// InputManager::joyButtons
//
// Returns the status of joystick buttons
//
int InputManager::joyButtons() const
{
if(!m_joystick) return 0;
SDL_JoystickUpdate();
int res = 0;
for(int i = 0; i < m_joyNumButtons && i < 32; i++)
res |= SDL_JoystickGetButton(m_joystick, i) << i;
return res;
}
//
// InputManager::waitAndProcessEvents
//
// Process events after waiting for input
//
void InputManager::waitAndProcessEvents()
{
SDL_Event event;
if(!SDL_WaitEvent(&event)) return;
do
{
p_processEvent(&event);
}
while(SDL_PollEvent(&event));
}
//
// InputManager::processEvents
//
// Gets instantaneous keyboard signal
//
void InputManager::processEvents()
{
SDL_Event event;
while (SDL_PollEvent(&event))
{
p_processEvent(&event);
}
}
//
// InputManager::readControl
//
// Returns cursor movement data
//
struct KeyboardDef
{
ScanCode button0,button1,
upleft, up, upright,
left, right,
downleft, down, downright;
};
//KeyboardDef KbdDefs = {0x1d,0x38,0x47,0x48,0x49,0x4b,0x4d,0x4f,0x50,0x51};
static const KeyboardDef KbdDefs =
{
sc_Control, // button0
sc_Alt, // button1
sc_Home, // upleft
sc_UpArrow, // up
sc_PgUp, // upright
sc_LeftArrow, // left
sc_RightArrow, // right
sc_End, // downleft
sc_DownArrow, // down
sc_PgDn // downright
};
static Direction dirTable[] = // Quick lookup for total direction
{
dir_NorthWest, dir_North, dir_NorthEast,
dir_West, dir_None, dir_East,
dir_SouthWest, dir_South, dir_SouthEast
};
CursorInfo InputManager::readControl()
{
word buttons;
int dx,dy;
Motion mx,my;
CursorInfo ret;
mx = my = motion_None;
buttons = 0;
processEvents();
if (m_keyboard.count(KbdDefs.upleft))
{
mx = motion_Left;
my = motion_Up;
}
else if (m_keyboard.count(KbdDefs.upright))
{
mx = motion_Right;
my = motion_Up;
}
else if (m_keyboard.count(KbdDefs.downleft))
{
mx = motion_Left;
my = motion_Down;
}
else if (m_keyboard.count(KbdDefs.downright))
{
mx = motion_Right;
my = motion_Down;
}
if (m_keyboard.count(KbdDefs.up))
my = motion_Up;
else if (m_keyboard.count(KbdDefs.down))
my = motion_Down;
if (m_keyboard.count(KbdDefs.left))
mx = motion_Left;
else if (m_keyboard.count(KbdDefs.right))
mx = motion_Right;
if (m_keyboard.count(KbdDefs.button0))
buttons += 1 << 0;
if (m_keyboard.count(KbdDefs.button1))
buttons += 1 << 1;
dx = mx * 127;
dy = my * 127;
ret.x = dx;
ret.xaxis = mx;
ret.y = dy;
ret.yaxis = my;
ret.touch = touch_None;
ret.button0 = (buttons & (1 << 0)) != 0;
ret.button1 = (buttons & (1 << 1)) != 0;
ret.button2 = (buttons & (1 << 2)) != 0;
ret.button3 = (buttons & (1 << 3)) != 0;
ret.dir = dirTable[((my + 1) * 3) + (mx + 1)];
return ret;
}
//
// InputManager::waitForKey
//
// Returns a key that should be pressed
//
ScanCode InputManager::waitForKey()
{
ScanCode result;
while ((result = m_lastScan)==0)
waitAndProcessEvents();
m_lastScan = sc_None;
return(result);
}
char InputManager::waitForASCII()
{
char result;
while ((result = m_lastASCII)==0)
waitAndProcessEvents();
m_lastASCII = '\0';
return(result);
}
void InputManager::startAck()
{
processEvents();
//
// get initial state of everything
//
clearKeysDown();
memset(m_btnstate, 0, sizeof(m_btnstate));
int buttons = joyButtons() << 4;
if(m_mousePresent)
buttons |= mouseButtons();
for(int i = 0; i < NUMBUTTONS; i++, buttons >>= 1)
if(buttons & 1)
m_btnstate[i] = true;
}
int InputManager::mouseButtons () const
{
if (m_mousePresent)
return p_getMouseButtons();
else
return 0;
}
bool InputManager::checkAck ()
{
processEvents();
//
// see if something has been pressed
//
if(m_lastScan)
return true;
int buttons = joyButtons() << 4;
if(m_mousePresent)
buttons |= mouseButtons();
for(int i = 0; i < NUMBUTTONS; i++, buttons >>= 1)
{
if(buttons & 1)
{
if(!m_btnstate[i])
{
// Wait until button has been released
do
{
waitAndProcessEvents();
buttons = joyButtons() << 4;
if(m_mousePresent)
buttons |= mouseButtons();
}
while(buttons & (1 << i));
return true;
}
}
else
m_btnstate[i] = false;
}
return false;
}
void InputManager::ack ()
{
startAck ();
do
{
waitAndProcessEvents();
}
while(!checkAck ());
}
bool InputManager::userInput(longword delay)
{
longword lasttime;
lasttime = GetTimeCount();
startAck ();
do
{
processEvents();
if (checkAck())
return true;
I_Delay(5);
} while (GetTimeCount() - lasttime < delay);
return(false);
}
//
// IN_InitVerifyJoysticks
//
// IOANCH: moved the startup joystick validity check here
//
void IN_InitVerifyJoysticks()
{
int numJoysticks = SDL_NumJoysticks();
if(cfg_joystickindex && (cfg_joystickindex < -1 ||
cfg_joystickindex >= numJoysticks))
{
if(!numJoysticks)
throw Exception("No joysticks are available to SDL!\n");
else
throw Exception((PString("The joystick index must be between -1 and %i!\n") <<
(numJoysticks - 1))());
}
}
|
d96b4cbd57a674327382cd6649334d465a34c3e9 | 3e9c9637629f9a6d9a63ecc6a236405317f55109 | /algospot-FESTIVAL.cpp | 8eaad8eac73c37c7c3112e8f4834917d3a24dfc0 | [] | no_license | digression99/2018-algorithm | 6998efebef6ceffcdd1039ef5e1e1d6c9e5d794a | c34128a3d13e820195fc9ef3d349b567905ddea9 | refs/heads/master | 2018-09-10T13:28:21.362369 | 2018-06-05T12:05:44 | 2018-06-05T12:05:44 | 116,538,141 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 985 | cpp | algospot-FESTIVAL.cpp | //
// algospot_FESTIVAL
//
//
//
#include <iostream>
#include <vector>
using namespace std;
const int MAXN = 1000;
int memo[MAXN + 1][MAXN + 1];
int getSum(vector<int> & data, int start, int end) {
return 0;
}
double solve(vector<int> & data, int n, int l) {
double minNum = 0;
for (int i = 0; i < n; ++i) {
memo[i][i + l] = getSum(data, i, i + l);
minNum = min(minNum, (double)memo[i][i + l] / l);
}
for (int i = l + 1; i <= n; ++i) {
for (int j = 0; j < n - i; ++j) {
memo[j][i] = memo[j][i - 1] + data[j + i];
minNum = min(minNum, (double)memo[j][i] / i);
}
}
return minNum;
}
int main() {
int tc;
cin >> tc;
for (int i = 0; i < tc; ++i) {
int n = 0, l = 0;
vector<int> data(n);
cin >> n >> l;
for (int j = 0; j < n; ++j) {
cin >> data[j];
}
cout << solve(data, n, l) << endl;
}
return 0;
}
|
3cd6c145114a382d50f96ef93898f94a40c21c31 | a2df02d4aaead0336a3427d15fb20386346e01c2 | /model/element.cpp | e1b07be049cf5c2188b29c6c33040461607ae662 | [] | no_license | nicoctopus/octopus | 6b0fa3ea09d6f38ebd6a6155f1a152d38489d548 | a0bd6b4b4057aa9c6c72d92aeb762142e95d0414 | refs/heads/master | 2020-03-30T23:55:17.595788 | 2012-03-29T14:11:29 | 2012-03-29T14:11:29 | 3,397,245 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,454 | cpp | element.cpp | #include "element.h"
#include <QDebug.h>
/**
* CONSTRUCTEURS
**/
Element::Element()
{
}
Element::Element(const Element &element)
{
this->idElement = element.idElement;
this->nameElement = element.nameElement;
this->posXBlackBoard = element.posXBlackBoard;
this->posYBlackBoard = element.posYBlackBoard;
}
Element::Element(const int &id, const QString &name, const bool &active, qint16 xBlackBoard, qint16 yBlackBoard)
{
this->idElement = id;
this->nameElement = name;
this->active = active;
this->posXBlackBoard = xBlackBoard;
this->posYBlackBoard = yBlackBoard;
}
/**
* GETTERS SETTEURS
**/
quint32 Element::getId() {
return idElement;
}
void Element::setName(const QString &n) {
this->nameElement = n;
}
QString Element::getName() {
return nameElement;
}
void Element::updateId(const quint32 &id)
{
this->idElement = id;
}
bool Element::isActive() {
return active;
}
void Element::setActive(const bool &active)
{
this->active = active;
}
void Element::setPosXBlackBoard(qint16 x){
this->posXBlackBoard = x;
}
void Element::setPosYBlackBoard(qint16 y){
this->posYBlackBoard = y;
}
qint16 Element::getPosXBlackBoard(){
return this->posXBlackBoard;
}
qint16 Element::getPosYBlackBoard(){
return this->posYBlackBoard;
}
/**
* DESTRUCTEUR
**/
Element::~Element()
{
}
|
a603066321942c56c01403f860a64d39299dfefc | 39e348a6cfdc365a49b03695a3a86f92aa72fd2b | /C++/ExtentableList/ExtentableList/equeue.hpp | b86c18bb3649a2ea3ec07ba5410db0221c7816a0 | [] | no_license | qiuyongchen/code_saver | fd646e969774b190d764f709c4233e6283af84f1 | afbec799e72901e85e9434bbe3cc745d9735fc6f | refs/heads/master | 2021-01-10T04:48:00.349287 | 2016-02-21T04:18:52 | 2016-02-21T04:18:52 | 45,052,084 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,681 | hpp | equeue.hpp | #include <queue>
#include <iostream>
using namespace std;
template<class T>
class Queue {
public:
queue<T> q;
int size() {
return q.size();
}
T front() {
return q.front();
}
void push(T a) {
q.push(a);
}
void pop() {
q.pop();
}
void clear() {
while (size() != 0) pop();
}
};
/*
#include "equeue.h"
#include <iostream>
#include <string>
using namespace std;
template<class T>
Queue<T>::Queue() {
frontBlock_ = backBlock_ = NULL;
size_ = count_ = ptrb_ = ptrf_ = 0;
}
template<class T>
Queue<T>::~Queue() {
clear();
}
template<class T>
void Queue<T>::clear() {
while (!empty()) pop();
}
template<class T>
bool Queue<T>::empty() const {
return (size() == 0);
}
template<class T>
int Queue<T>::size() const {
return size_;
}
template<class T>
T Queue<T>::front() const {
if (!empty())
return frontBlock_->dat[ptrf_];
else
exit(1);
}
template<class T>
void Queue<T>::push(const T& a) {
// if the queue is empty or the array is full(labeled by subscrit1024)
// we have to append a new array to the queue.
if (empty() || ptrb_ == 1024) {
appendBlock();
}
// push the new element into the queue.
backBlock_->dat[ptrb_++] = a;
size_++;
}
template<class T>
T Queue<T>::pop() {
// if the queue is empty.
if (empty()) exit(1);
// if there is only one element in the backBlock, then we pop it out
// and reduce that backBlock.
ptrf_++;
if (ptrf_ == 1024 || (ptrf_ == ptrb_ && frontBlock_ == backBlock_))
reduceBlock();
size_--;
}
template<class T>
void Queue<T>::appendBlock() {
// if the queue if empty.
if (empty()) {
frontBlock_ = backBlock_ = new MemBlock<T>;
frontBlock_->prev = frontBlock_->next = NULL;
backBlock_->prev = backBlock_->next = NULL;
// or the queue is not empty.
} else {
MemBlock<T> *tempPtr = new MemBlock<T>; // allocate a new MemBlock.
tempPtr->next = NULL;
tempPtr->prev = backBlock_;
backBlock_->next = tempPtr;
backBlock_ = tempPtr;
}
// set back the count_(it is the subscrit of the array dat[1024]) to zero.
count_ = ptrb_ = 0;
}
template<class T>
void Queue<T>::reduceBlock() {
// if the queue is empty.
if (empty()) {
exit(1);
// or the queue is not empty.
} else {
MemBlock<T> *tempPtr = frontBlock_;
frontBlock_ = frontBlock_->next;
delete tempPtr;
}
count_ = ptrf_ = 0; // set up the count_(subscrit of array dat[1024]) to 0
}
template<class T>
void Queue<T>::reset() {
}
*/ |
525ac44e82853374b97cc707bfb682644639ddc5 | d476bd95b1713915a30367860d39fd9d4941dd36 | /C++/AsteroidField/GameTest/DEFINITIONS.hpp | 987c9ad0168f07a15829739b2dc5304f8da3e37a | [] | no_license | ivasiletc/CodeExamples | 2929a66c53645bd488b41b492f5a1c69b4e77fe2 | b7594731877531337b172e2894f645f3f1b40104 | refs/heads/master | 2020-12-10T17:10:24.230806 | 2020-03-16T13:38:58 | 2020-03-16T13:38:58 | 233,648,287 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,826 | hpp | DEFINITIONS.hpp | #pragma once
/* Config parameters from the task */
#define CANNON_SHOOTING_FREQUENCY 2.0f // shots/second
#define CANNON_BULLETS_SPEED 10 // meters/second
#define SPACESHIP_FORWARD_MOVEMENT_SPEED 50.0f // meters/second
#define ASTEROID_EXPLOSION_DURATION 1.0f // seconds
#define SPACESHIP_MANOEUVERING_ENGINES_THRUST 5.0f
#define SPACESHIP_MASS 1.0f
#define ASTEROID_SPAWN_FREQUENCY 0.5f // asteroid/second
#define ASTEROID_SPAWN_FREQUENCY_INCREASING 0.25f // asteroid/second
/* ############# */
/* Game settings */
#define SCREEN_WIDTH 500 //Default - 500 (In case you will try to change it. Please don't)
#define SCREEN_HEIGHT 700 //Default - 700
#define SPLASH_STATE_SHOW_TIME 2.0 //"Loading" screen. In case of many application reruns change to min value for convenience
#define SCORE_INCREASING_TIME 1.0f //score point/second
#define ASTEROID_MOVEMENT_SPEED 100.0f //Additional asteroid speed to make game more dynamic
/* ############# */
/* Resource filepath */
#define SPLASH_SCENE_BACKGROUND_FILEPATH "Resources/SplashState.png"
#define GAME_OVER_BACKGROUND_FILEPATH "Resources/GameOverState.png"
#define MAIN_MENU_BACKGROUND_FILEPATH "Resources/background1.png"
#define GAME_BACKGROUND_FILEPATH "Resources/background1.png"
#define SPACE_FILEPATH "Resources/background1.png"
#define PLAY_BUTTON_FILEPATH "Resources/PlayButton.png"
#define BULLET_FILEPATH "Resources/bullet.png"
#define SHIP_LEFT_FILEPATH "Resources/ship_left.png"
#define SHIP_RIGHT_FILEPATH "Resources/ship_right.png"
#define SHIP_MAIN_FILEPATH "Resources/ship_main.png"
#define SHIP_MAIN_FLAME_FILEPATH "Resources/ship_main_flame.png"
#define ASTEROID_TEXTURES_AMOUNT 4
#define ASTEROID0_FILEPATH "Resources/asteroid0.png"
#define ASTEROID1_FILEPATH "Resources/asteroid1.png"
#define ASTEROID2_FILEPATH "Resources/asteroid2.png"
#define ASTEROID3_FILEPATH "Resources/asteroid3.png"
#define ASTEROID_EXPLOSION0_FILEPATH "Resources/AsteroidExplosion0.png"
#define ASTEROID_EXPLOSION1_FILEPATH "Resources/AsteroidExplosion1.png"
#define ASTEROID_EXPLOSION2_FILEPATH "Resources/AsteroidExplosion2.png"
#define ASTEROID_EXPLOSION3_FILEPATH "Resources/AsteroidExplosion3.png"
#define ASTEROID_EXPLOSION4_FILEPATH "Resources/AsteroidExplosion4.png"
#define ASTEROID_EXPLOSION5_FILEPATH "Resources/AsteroidExplosion5.png"
#define ASTEROID_EXPLOSION6_FILEPATH "Resources/AsteroidExplosion6.png"
#define ASTEROID_EXPLOSION7_FILEPATH "Resources/AsteroidExplosion7.png"
#define FONT_FILEPATH "Resources/CASTELAR.ttf"
/* ############# */
/* SpaceShip and game states */
#define SHIP_STATE_MAIN 1
#define SHIP_STATE_TURNING_LEFT 2
#define SHIP_STATE_TURNING_RIGHT 3
#define SHIP_STATE_MAIN_FLAME 4
enum GameStates
{
eReady,
ePlaying,
eGameOver
};
/* ############# */ |
3a702d20f9530733e4000c2ac50f7480d0209795 | 060487fce88b0ae154f5189dc016bfb4e7dfa8d0 | /autore.cpp | 77413142fe287bcb92da7d1da271dfa3c3280d70 | [] | no_license | CrackedNut/progetto-po | 769e4d598ddf2dfc303d20fbaf913dd2f70186f7 | 09c5db99e1f07a0677761be96a3ebe4f18cc4d1d | refs/heads/main | 2023-06-03T17:39:23.372770 | 2021-06-27T12:27:28 | 2021-06-27T12:27:28 | 369,501,040 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 367 | cpp | autore.cpp | #include "autore.h"
Autore::Autore() {}
QString Autore::get_cognome() {return cognome;}
QVector<QString> Autore::get_afferenze() {return afferenze;}
QString Autore::get_nc() {return nc;}
void Autore::set_cognome(QString c) {cognome = c;}
void Autore::set_afferenze(QVector<QString> a) {afferenze = a;}
void Autore::set_nc() {nc = nome + " " + cognome;}
|
1e74eb9d58d14f2455ce0bb9d9d1198e3888750e | ecb324fb1afc5aeb6af1268021d7b56c71070e51 | /洛谷/入门/洛谷P1317.cpp | 49b40f1da71a45387638971b87c01b524e98d1f3 | [] | no_license | WULEI7/WULEI7 | 937d74340eae8aed4256be9c1978ead5eba718e0 | d3fd49bd0463f15bf325a13f5c80aa7ca6c89f9f | refs/heads/master | 2023-04-15T09:52:05.428521 | 2023-04-07T10:40:35 | 2023-04-07T10:40:35 | 239,913,141 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 263 | cpp | 洛谷P1317.cpp | #include <bits/stdc++.h>
using namespace std;
int n,i,j,flag=0,ans=0,a[10000];
int main()
{
cin >> n;
for(i=0;i<n;i++)
cin >> a[i];
for(i=0;i<n-1;i++)
{
if(a[i+1]<a[i])
flag=1;
if(flag==1&&a[i+1]>a[i])
{ans++;flag=0;}
}
cout << ans;
return 0;
}
|
4db6eeec456ef7be776bada39d793058c6df6899 | 47a0d457c251d58b436c7af498261ba99eb4657d | /VectorworksSDK/SDK2021/WindowsSDK/Source/Samples/DefaultTools/Source/CustomDefaultTools/ExtObjTheLineEx.cpp | 2cf4468319aa13079d473790af3daf33e4f5cc25 | [] | no_license | jacob-ditkoff/VW_2021SDK_Example | 591cbc1e5e38dddda69420be6bc0ab6f322b5cf1 | a429f3c402716f1fc4a067e0aacf08a67c5285c5 | refs/heads/main | 2023-03-21T18:04:22.305924 | 2021-03-04T14:48:50 | 2021-03-04T14:48:50 | 339,420,316 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,331 | cpp | ExtObjTheLineEx.cpp | #include "StdAfx.h"
#include "ExtObjTheLineEx.h"
using namespace CustomDefaultTools;
namespace CustomDefaultTools
{
// --------------------------------------------------------------------------------------------------------
static SToolDef gToolDef = {
/*ToolType*/ eExtensionToolType_Normal,
/*ParametricName*/ "SampleToolDef_LineEx",
/*PickAndUpdate*/ ToolDef::pickAndUpdate,
/*NeedScreenPlane*/ ToolDef::doesntNeedScreenPlane,
/*Need3DProjection*/ ToolDef::doesntNeed3DView,
/*Use2DCursor*/ ToolDef::use2DCursor,
/*ConstrainCursor*/ ToolDef::constrainCursor,
/*NeedPerspective*/ ToolDef::doesntNeedPerspective,
/*ShowScreenHints*/ ToolDef::showScreenHints,
/*NeedsPlanarContext*/ ToolDef::needsPlanarContext,
/*Message*/ {"ExtObjTheLineEx", "tool_message"},
/*WaitMoveDistance*/ 0,
/*ConstraintFlags*/ 0,
/*BarDisplay*/ kToolBarDisplay_XYClLaZo,
/*MinimumCompatibleVersion*/ 900,
/*Title*/ {"ExtObjTheLineEx", "tool_title"},
/*Category*/ {"ExtObjTheLineEx", "tool_category"},
/*HelpText*/ {"ExtObjTheLineEx", "tool_help"},
/*VersionCreated*/ 16,
/*VersoinModified*/ 0,
/*VersoinRetired*/ 0,
/*contextual help*/ "",
/*Icon Specifier*/ "DefaultTools/Images/ExtObjTheLineDefTool.png",
/*Cursor Specifier*/ "Vectorworks/Cursors/SmallCrosshair.png",
};
// --------------------------------------------------------------------------------------------------------
static SParametricDef gParametricDef = {
/*LocalizedName*/ {"ExtObjTheLineEx", "localized_name"},
/*SubType*/ kParametricSubType_Linear,
/*ResetOnMove*/ false,
/*ResetOnRotate*/ false,
/*WallInsertOnEdge*/ false,
/*WallInsertNoBreak*/ false,
/*WallInsertHalfBreak*/ false,
/*WallInsertHideCaps*/ false,
};
/*
static SParametricParamChc gArrChoices[] = {
{ 128, "Line", {"ExtObjTheLineEx", "choice1"} },
{ 128, "Arc", {"ExtObjTheLineEx", "choice2"} },
{ 128, "Bezier", {"ExtObjTheLineEx", "choice3"} },
{ 128, "None", {"ExtObjTheLineEx", "choice4"} },
//------
{ 129, "Default Legend", {"ExtObjTheLineEx", "choice5" },
//------
// TERMINATE
{ NULL, NULL, {0,0} }
};
*/
static SParametricParamDef gArrParameters[] = {
// Default line parameters
{ "LineLength", {"ExtObjTheRect", ""}, "10cm", "10cm", kFieldCoordDisp, 0 },
// custom parameters
{ "p1", {"ExtObjTheLineEx", "param1"}, "False", "False", kFieldBoolean, 0 },
{ "p2", {"ExtObjTheLineEx", "param2"}, "False", "False", kFieldBoolean, 0 },
{ "p3", {"ExtObjTheLineEx", "param3"}, "", "", kFieldText, 0 },
{ "p4", {"ExtObjTheLineEx", "param4"}, "", "", kFieldText, 0 },
{ "p5", {"ExtObjTheLineEx", "param5"}, "2\"", "2\"", kFieldCoordDisp, 0 },
{ "p6", {"ExtObjTheLineEx", "param6"}, "Auto", "Auto", kFieldPopUp, 128 },
{ "p7", {"ExtObjTheLineEx", "param7"}, "Auto", "Auto", kFieldPopUp, 129 },
// TERMINATE
{ "", {0,0}, "", "", EFieldStyle(0), 0 }
};
}
// --------------------------------------------------------------------------------------------------------
// {BFF6F152-1AFB-481F-BE54-0AD22CE2E178}
IMPLEMENT_VWParametricExtension(
/*Extension class*/ CExtObjTheLine,
/*Event sink*/ CObjTheLine_EventSink,
/*Universal name*/ "SampleToolDef_LineEx",
/*Version*/ 1,
/*UUID*/ 0xbff6f152, 0x1afb, 0x481f, 0xbe, 0x54, 0xa, 0xd2, 0x2c, 0xe2, 0xe1, 0x78 );
// Test with VectorScript:
// SetSelect(CreateCustomObject('SampleToolDef_Line',0,0,0));
// --------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------
CExtObjTheLine::CExtObjTheLine(CallBackPtr cbp)
: VWExtensionParametric( cbp, gParametricDef, gArrParameters )
// : VWExtensionParametric( cbp, gParametricDef, gArrParameters, gArrChoices )
{
}
CExtObjTheLine::~CExtObjTheLine()
{
}
// --------------------------------------------------------------------------------------------------------
// {8D1E4C23-D13E-45F9-9BEB-9E2EADC8D8E6}
IMPLEMENT_VWToolExtension(
/*Extension class*/ CExtObjTheLineDefTool,
/*Event sink*/ CExtObjTheLineDefTool_EventSink,
/*Universal name*/ "SampleToolDef_LineToolEx",
/*Version*/ 1,
/*UUID*/ 0x8d1e4c23, 0xd13e, 0x45f9, 0x9b, 0xeb, 0x9e, 0x2e, 0xad, 0xc8, 0xd8, 0xe6 );
// --------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------
CExtObjTheLineDefTool::CExtObjTheLineDefTool(CallBackPtr cbp)
: VWExtensionTool( cbp, gToolDef )
{
}
CExtObjTheLineDefTool::~CExtObjTheLineDefTool()
{
}
// --------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------
CExtObjTheLineDefTool_EventSink::CExtObjTheLineDefTool_EventSink(IVWUnknown* parent)
: VWToolDefaultLine_EventSink( parent, "SampleToolDef_LineEx" )
{
memset( fBarState, 0, sizeof(fBarState) );
// default values for our groups
fBarState[0] = 0;
fBarState[2] = 1;
}
CExtObjTheLineDefTool_EventSink::~CExtObjTheLineDefTool_EventSink()
{
}
void CExtObjTheLineDefTool_EventSink::Init(const TXString& universalName)
{
SDefaultLineToolInfo toolInfo = this->GetToolInfo();
toolInfo.fModeGroup = 2; // group 2
toolInfo.fConstrainedChoiceIndex = 1; // fModeGroup: button index 1
toolInfo.fUnconstrainedChoiceIndex = 3; // button index 3
this->SetToolInfo( toolInfo );
VWToolDefaultLine_EventSink::Init( universalName );
}
bool CExtObjTheLineDefTool_EventSink::DoSetUp(bool bRestore, const IToolModeBarInitProvider* modeBarInitProvider)
{
// NOTE! the constructor initializes
// the default values of fBarState
const IToolModeBarInitProvider* p2 = dynamic_cast<const IToolModeBarInitProvider*> (modeBarInitProvider);
if (p2)
{
TXStringArray imageSpecs;
imageSpecs.Append("DefaultTools/Images/SampleToolButtonA.png");
imageSpecs.Append("DefaultTools/Images/SampleToolButtonB.png");
p2->AddRadioModeGroup( /*group 0*/ fBarState[0], imageSpecs);
p2->AddButtonModeGroup("DefaultTools/Images/SampleToolButtonB.png");
// NOTE! The sample uses Vectorworks icons for this group.
// This could be dangerous since these numbers are not guaranteed and may change in the future
imageSpecs.Append("Vectorworks/ModeViewBar/Classes.png");
p2->AddRadioModeGroup( /*group 2*/ fBarState[2], imageSpecs);
p2->AddButtonModeGroup( /*group 3*/ "Vectorworks/ModeViewBar/Options.png" );
}
TXStringArray arrButtonsHelps;
// arrButtonsHelps.Append( TXString( (short)11100, (short)10 ) );
// arrButtonsHelps.Append( TXString( (short)11100, (short)11 ) );
// arrButtonsHelps.Append( TXString( (short)11100, (short)12 ) );
// arrButtonsHelps.Append( TXString( (short)11100, (short)13 ) );
// arrButtonsHelps.Append( TXString( (short)11100, (short)14 ) );
// arrButtonsHelps.Append( TXString( (short)11100, (short)15 ) );
// arrButtonsHelps.Append( TXString( (short)11100, (short)16 ) );
// arrButtonsHelps.Append( TXString( (short)11100, (short)17 ) );
// arrButtonsHelps.Append( TXString( (short)11100, (short)18 ) );
// pModeBarInitProvider->SetButtonsHelpText( arrButtonsHelps );
return VWToolDefaultLine_EventSink::DoSetUp( bRestore, modeBarInitProvider );
}
void CExtObjTheLineDefTool_EventSink::DoModeEvent(size_t modeGroupID, size_t newButtonID, size_t oldButtonID)
{
// save the state so to be able to restore the mode bar proerly
fBarState[ modeGroupID ] = newButtonID;
// just for fun, show a dialog
TXString msg;
msg.Format( "groupID: %d newButtonID: %d oldButtonID: %d", modeGroupID, newButtonID, oldButtonID );
gSDK->AlertInform( "CExtObjThePointDefTool_EventSink::DoModeEvent", msg );
VWToolDefaultLine_EventSink::DoModeEvent( modeGroupID, newButtonID, oldButtonID );
}
// --------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------
CObjTheLine_EventSink::CObjTheLine_EventSink(IVWUnknown* parent)
: VWParametric_EventSink( parent )
{
}
CObjTheLine_EventSink::~CObjTheLine_EventSink()
{
}
EObjectEvent CObjTheLine_EventSink::OnInitXProperties(CodeRefID objectID)
{
// obtain the interfact for accessing the extended properties
using namespace VectorWorks::Extension;
VCOMPtr<IExtendedProps> extProps( IID_ExtendedProps );
extProps->SetObjectProperty( objectID, kObjXPropDefaultPropertyUI, (Sint8)kUseAppropriateLocationWidget );
extProps->SetObjectProperty( objectID, kObjXPropShowLinearDirection, true );
return kObjectEventNoErr;
}
EObjectEvent CObjTheLine_EventSink::Recalculate()
{
VWParametricObj paramObj( fhObject );
double lineLength = paramObj.GetParamReal( "LineLength" );
VWLine2DObj lineObj( 0, 0, lineLength, 0 );
return kObjectEventNoErr;
}
|
c037d787888bba723b6322115c5398db10aa83d1 | ca76abb42abf825c969ec3ef4b96a614f7ff122b | /433-hub/433-hub.ino | 59762ed25f0992eb314ba7be836e01955151dfe7 | [
"MIT"
] | permissive | mitchmitchell/Devices | 565edec530fa71ecfa372c2b64e8643378b9c9e8 | 70ec1d91a574bde4f9f56ee18e3f529863eddbac | refs/heads/master | 2020-04-17T18:10:49.036113 | 2019-01-20T23:02:48 | 2019-01-20T23:02:48 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 91,051 | ino | 433-hub.ino | /*
*
* 433 Hub
*
* This device can copy signals from wireless remote controls that use the 433 frequency, and then rebroadcast them. It can do this in three ways:
* - Copy and replay ON and OFF signals. For example, from cheap wireless power switches. It basically copies remote controls.
* - Copy and then replay a single signal. For example, to emulate a window sensor.
* - Recognise signals without replaying them. For example, After learning the signal once, it can detect when a window sensor is triggered again. Or when a button on a remote control is pressed.
*
* This allows you to:
* - Create a smart home security solution using cheap window and movement sensors.
* - Automatically turn on lights and other devices when you get home, or when the sun goes down etc, using wireless power sockets.
* - Control automations using wireless buttons or remote controls.
*
* The system can store 50 "recognise only" signals, or about 20 on/off signals. You can store any combination of these.
*
* Are there any limits?
* - This does not work on things like garage door openers or keyless entry systems for cars.
* These devices have a very basic protection: the code changes everytime you use it, so replaying signals will not open the door again.
*
* Security?
* - Many cheap 433Mhz devices do not use encryption. This allows us to copy the signal in the first place.
* This also means that your neighbour can in theory do the same thing you can: copy and replay signals picked up through the walls.
*
*
*
* SETTINGS */
#define HAS_SCREEN // Have you connected a screen? Connecting a screen is recommend.
#define KEYPAD_BUTTON_COUNT 12 // How many buttons does your keypad have?
/* END OF SETTINGS
*
*
* ABOUT THE CODE
*
* The code has a number of states it can be in.
* LISTENING MODE. Here The main loop continuously listens for signals. If it detects it calls three successive funtions:
* 1. Check if signal is a signal (SignalViabilityCheck function)
* 2. Clean up the signal (signalCleaner function)
* 3. Analyse the signal to find the binary code it represents (signalAnalysis function).
*
* If a valid binary code is found, the next action depends on which 'state' the system is in.
* - If in LISTENING_SIMPLE state, then the signal is compared to all the stored signals. It lets you know if there is a match.
* - If in LISTENING_ON state, then the signal is compared to all the stored signals. It lets you know if there is a match.
* - If in COPYING_SIMPLE state, the code is stored as a 'simple' signal. This can then be replayed later.
* - If in COPYING_ON state, the code is stored, after which the system asks for the OFF code (COPYING_OFF state), and then stores it with the same data.
* - If in LEARNING_SIMPLE state, only the binary code is stored, and not the meta-data required to fully recreate the signal.
*
* The final states the system can be in are:
* - IN_MENU. This is when the system is displaying a menu on the screen.
* - REPLAYING. This is the state while a signal is being replayed.
*
* Depending on the current state the various functions can work in slightly different ways.
* take for example the scanEeprom function:
* - When in LISTENING state it compares the latest found signal to existing signals stored in the EEPROM memory.
* - When in REPLAYING state it returns data required to rebuild the original signal.
* - If called with a 0, then it does not try to recognise or rebuild anything. This is used during setup, when we only need to know how many signals are stored.
*
* __SIGNAL ANALYSIS DETAILS__
* When it detects a signal, the code tries to find the part of the signal that repeats.
* In normal operation the signalCleaner function cleans up the signal and simultaneously tries to find the 'betweenSpace' variable.
* Often, 433Mhz signals have a repeating binary code that is interrupted by a short burst of different signals (called the 'anomaly' in this code).
* If no anomaly can be detected, then the repeating part is probably 'back to back', without a separator signal.
* In this case there is a 'backup' function, the 'pattern finder'. This uses brute force to find the signal.
* If both methods fail, then the signal cannot be copied.
*
*
*
* TODO
* - Check if signal is already stored before storing it. Then again, there are good reasons to store a signal again. Perhaps only check for doubles with recognise-only signals?
* - Make things use 'return' or 'break' to keep processing times low. (mostly done).
* - make the pattern finder need less memory. It should scan what it found to find anomalies (one or more, in one place or several!).
* It should then maybe declare the beginning of the signal. The storage mechanism should then wrap around at endPosition and continue at startPosition.
* If two anomaly clusters exist, then startPosition could become the first anomaly cluster, and end position the second anomaly cluster.
* Perhaps this can be fed into a common function that works its maagic after the repeating part is found.
* - Another bit could be used to store if an on/off signal should also be recognisable. That way the remote could be used twice somehow.. Or:
* - request current status of on/off toggles from the controller. Though it might be jarring or even dangerous if all devices suddenly toggled to their new positions.
*/
//
// SETTINGS
//
//#define DEBUG // Do you want to see extra debugging information in the serial output?
// Enable and select the attached radio type
#define MY_RADIO_RF24 // This is a common and simple radio used with MySensors. Downside is that it uses the same frequency space as WiFi.
//#define MY_RADIO_NRF5_ESB // This is a new type of device that is arduino and radio all in one. Currently not suitable for beginners yet.
//#define MY_RADIO_RFM69 // This is an open source radio on the 433mhz frequency. Great range and built-in encryption, but more expensive and little more difficult to connect.
//#define MY_RADIO_RFM95 // This is a LoRaWan radio, which can have a range of 10km.
// MySensors: Choose your desired radio power level. High power can cause issues on cheap Chinese NRF24 radio's.
//#define MY_RF24_PA_LEVEL RF24_PA_MIN
//#define MY_RF24_PA_LEVEL RF24_PA_LOW
#define MY_RF24_PA_LEVEL RF24_PA_HIGH
//#define MY_RF24_PA_LEVEL RF24_PA_MAX
// Mysensors security
//#define MY_SECURITY_SIMPLE_PASSWD "changeme" // Be aware, the length of the password has an effect on memory use.
#define MY_SIGNING_SOFT_RANDOMSEED_PIN A0 // Setting a pin to pickup random electromagnetic noise helps make encryption more secure.
// Mysensors advanced settings
#define MY_TRANSPORT_WAIT_READY_MS 10000 // Try connecting for 10 seconds. Otherwise just continue.
//#define MY_RF24_CHANNEL 100 // In EU the default channel 76 overlaps with wifi, so you could try using channel 100. But you will have to set this up on every device, and also on the controller.
//#define MY_RF24_DATARATE RF24_1MBPS // Slower datarate makes the network more stable?
//#define MY_NODE_ID 10 // Giving a node a manual ID can in rare cases fix connection issues.
//#define MY_PARENT_NODE_ID 0 // Fixating the ID of the gatewaynode can in rare cases fix connection issues.
//#define MY_PARENT_NODE_IS_STATIC // Used together with setting the parent node ID. Daking the controller ID static can in rare cases fix connection issues.
#define MY_SPLASH_SCREEN_DISABLED // Saves a little memory.
//#define MY_DISABLE_RAM_ROUTING_TABLE_FEATURE // Saves a little memory.
// Enable MySensors debug output to the serial monitor, so you can check if the radio is working ok.
// #define MY_DEBUG
// REQUIRED LIBRARIES
#include <MySensors.h> // The library that helps form the wireless network.
#include <EEPROM.h> // Allows for storing data on the Arduino itself, like a mini hard-drive.
#define INCLUDE_SCROLLING 0 // Simple drivers for the OLED screen.
#define OLED_I2C_ADDRESS 0x3C
#include <SSD1306Ascii.h>
#include <SSD1306AsciiAvrI2c.h>
SSD1306AsciiAvrI2c oled;
// Keypad
#define KEYPAD_PIN A0 // The pin where the analog keypad is connected. These keypads vary their resistance according to which button is pressed.
byte buttonPressed = 0; // The last button that was pressed by the user.
byte prevButtonState = 0;
boolean buttonsToggleStatus[KEYPAD_BUTTON_COUNT + 1]; // Array to hold the buttons' toggle status (if the button has an on/off signal). For simple signals buttonsToggleStatus[x] is always 0. For on/off signals this actually switches between 0 and 1. For simplicity, the zero position of the array is ignored.
static unsigned long lastLoopTime = 0; // Holds the last time the main loop ran.
// Receiver and transmitter
#define RECEIVER 3 // The pin where the receiver is connected.
#define TRANSMITTER 6 // The pin where the transmitter is connected.
// SIGNAL CLONING
/* What length of signal are we looking for? This determines how many edges we need to be able to store. Here's a chart:
*
* 2 bytes = 16 bits = 32 timings
* 3 bytes = 24 bits = 48 timings <- default for MINIMAL_SIGNAL_LENGTH. Cheap window and door sensors use this.
* 4 bytes = 32 bits = 64 timings
* 5 bytes = 40 bits = 80 timings
* 6 bytes = 48 bits = 96 timings
* 8 bytes = 64 bits = 128 timings <- Most wireless sockets use 8 byte signals. I have never come across a longer signal.
* 10 bytes = 80 bits = 160 timings
* 12 bytes = 96 bits = 192 timings
*
* 16 bytes = 128bits = 256 timings
*
* As you can see, getting more than 16 bytes in practice requires more memory than the Arduino Nano has.
* Ideally, your MAXEDGES setting should be 3x the size of the repeating signal you are looking for.
*
*/
#define MAXEDGES 400 // Maximum samples, limited by RAM. The findPattern() function requires more signals to work than the default analyser.
#define GRANULARITY 50 // Sensitivity. Lower can grab faster signals, but might be less dependable. Set somewhere between 50 and 100.
#define EDGES_TO_SKIP 60 // How much of the beginning of the incoming signal to skip. This is a memory saving measure. Sometimes the first part of the signal is the 'pre-amble': simple timings to help the receiver synchronise its clock. Set somewhere between 0 and 100.
#define MINIMAL_SIGNAL_LENGTH 48 // Allow a signal's length to be more than 3 bytes ( 1 byte = 2 nibbles = 8 bits = 16 edges).
#define MINIMUMDURATION 50 // Minimum low or high signal duration for a valid signal in microseconds.
#define MAXIMUMDURATION 20000 // Maximum low or high signal duration for a valid signal.
#define MINIMUMSILENCE 30000 // Minimum low period after a complete signal in microseconds. If there is no input for this long, we can conclude that the transmission must have finished.
#define EEPROM_STORAGE_START 512 // From which position the eeprom can safely be used as storage without overwriting MySensors encryption data.
#define MAXI 249 * GRANULARITY // The maximum length in microseconds that any timing may have to be precisely stored. If a timing is longer, it will be truncated.
byte timings[MAXEDGES]; // Creates the array we use to store the timings, but that is also re-used for other things in order to save memory.
byte metaData[8]; // Holds metadata for a replayable signal.
long signalstart = 0; // Used to calculate the length of each received timing.
long signalend; // Used to calculate the length of each received timing.
unsigned int interval; // The length of a timing in milliseconds.
signed int edges = 0 - EDGES_TO_SKIP; // By starting below zero we can try to avoid the beginning of signals, which often contains a 'pre-amble': a boring pattern to help the receiver get up to speed.
byte bucketsTotal = 0; // This describes how many different timings there are in the signal. To clean up the signal it's wise to lump neighbouring timings together.
byte repeatingPatternLength = 255; // This describes how many timings the repeating part of the signal is made of.
byte amountOfStoredSignals = 0; // How many signals are curently stored on the EEPROM storage. This counts detect-only as well as replayable signals.
byte amountOfStoredReplayableSignals = 0; // How many replayable signals are stored in the EEPROM?
byte repeatingSignalByteLength = 3; // How many bytes does the repeating part of the signal take up in EEPROM?
boolean lastByteIsSplit = false; // Is the last byte of a new signal only half-filled? Signals are multiples of 4 bits, but we can only store them in multiples of 8. So a signal with 20 bits (5 'nibbles'), would still be stored in 3*8 = 24 bits. We need to know that when reconstructing the signal.
byte betweenSpace = 250; // Which timing denotes the space ("the anomaly" as it's called in this code) between repeated signals? If it's still set at 250 after the analysis, the the analysis must have failed to find it.
int startPosition = 1; // The start position of a clean signal (this cuts of the first one)
int endPosition = MAXEDGES - 1; // The end position of a clean signal (this cuts of the last one, which is often truncated).
int positionOfLastSignalEnd = EEPROM_STORAGE_START; // Denotes the EEPROM position right before the position where a new signal can safely be stored.
boolean validSignal = true; // Used by the signal detection loop If the 'high' part of a timing was bad, then this is set to false. Looking for a valid 'low' is then skipped.
boolean captureFinished = false; // If the entire edges array is full of freshly received timings, this is set to true. Analysis the signal is then set in motion.
byte bucketCount = 0; // How many different types of timings are there in the signal. This is used to tighten up the signal.
boolean connectedToNetwork = false; // Are we connected to the local MySensors network?
// DESCRIPTION BIT STATES
#define DESCRIPTION_HALFBYTE 0
#define DESCRIPTION_DUO_RECONSTRUCTION_TYPE 1
//#define DESCRIPTION_NOT_USED_YET 2
#define DESCRIPTION_ON_OFF 3
#define DESCRIPTION_REPLAYABLE 4
#define DESCRIPTION_UNRECONSTRUCTABLE_DUO 5
#define DESCRIPTION_ANOMALY 6
#define DESCRIPTION_LARGE_ANOMALY 7
// DISPLAY & STATES
// The list is shared between the display function as well as to desribe what the device is currently doing.
#define REPLAYING 8
// Menu states
#define MENU_MAIN 200
#define MENU_NEW 30
#define MENU_DELETE_LAST 40
#define MENU_DELETE_ALL 50
#define LEARNING_SIMPLE 33
#define LEARNING_ON 34
#define COPYING_SIMPLE 35
#define COPYING_ON 36
#define LEARNING_OFF 38
#define COPYING_OFF 39
#define DELETE_LAST 43
#define CLEAR_EEPROM 53
// General display codes
#define PROCESSING 112 // Not a state, only used for display.
#define SIGNAL_STORED 116 // Not a state, only used for display.
#define EEPROM_CLEARED 118 // Not a state, only used for display.
#define MATCH 123 // Not a state, only used for display.
// Display codes for errors
#define BAD_SIGNAL 140 // Not a state, only used for display.
#define OUT_OF_SPACE 141 // Not a state, only used for display.
#define NO_SIGNAL_STORED_YET 143 // Not a state, only used for display.
#define NO_MORE_FREE_BUTTONS 144 // Not a state, only used for display.
#define STARTUP 254
#define LISTENING 255 // This is de default state.
byte state = STARTUP; // This variable stores what the device is currently doing. It shares some states with the display output.
// MYSENSORS
#define RADIO_DELAY 100 // Milliseconds between sending radio signals. This keeps the radio happy.
#define DEVICE_STATUS_ID 1 // The first 'child' of this device is a text field that contains status updates.
#define LISTENER_OUTPUT_ID 2 // The first 'child' of this device is a text field that contains status updates.
// The device creates 4 virtual buttons that allow signals to be recorded even without an attached screen and keypad.
#define LEARN_SIMPLE_BTN_ID 3 // Learn to detect a single signal.
#define LEARN_ON_OFF_BTN_ID 4 // Learn to detect an ON and an OFF signal that belong together.
#define COPYING_SIMPLE_BTN_ID 5 // Learn to replay a single signal.
#define COPYING_ON_OFF_BTN_ID 6 // Learn to replay an ON and an OFF signal that belong together.
MyMessage textMessage(DEVICE_STATUS_ID, V_TEXT); // Sets up the message format that we'll be sending to the MySensors gateway later. In this case it's a text variable. The first part is the ID of the specific sensor module on this node. The second part tells the gateway what kind of data to expect.
MyMessage buttonmsg(LEARN_SIMPLE_BTN_ID, V_STATUS); // The message for replayable signals' buttons. This is an on/off message.
MyMessage detectmsg(10, V_TRIPPED); // The message for detect-only signals. This is an on/off message.
void presentation()
{
Serial.begin(115200);
sendSketchInfo(F("433 Hub"), F("1.0")); // Sends the sketch version information to the gateway and Controller
present(DEVICE_STATUS_ID, S_INFO, F("Device status")); wait(RADIO_DELAY); // Child 0. This outputs general status details.
present(LISTENER_OUTPUT_ID, S_INFO, F("Detected codes")); wait(RADIO_DELAY); // Child 1. This outputs the ID of detected signals that were matched to signals in eeprom.
present(LEARN_SIMPLE_BTN_ID, S_BINARY, F("Recognise a single code")); wait(RADIO_DELAY);// Child 2
present(LEARN_ON_OFF_BTN_ID, S_BINARY, F("Recognise an ON+OFF code")); wait(RADIO_DELAY); // Child 2
present(COPYING_SIMPLE_BTN_ID, S_BINARY, F("Copy a single code")); wait(RADIO_DELAY); // Child 3
present(COPYING_ON_OFF_BTN_ID, S_BINARY, F("Copy an ON/OFF code")); wait(RADIO_DELAY); // Child 3
}
void setup()
{
pinMode(RECEIVER, INPUT_PULLUP); // 433 receiver
pinMode(TRANSMITTER, OUTPUT); // 433 transmitter
pinMode(KEYPAD_PIN, INPUT); // Set keypad pin as input
digitalWrite(TRANSMITTER, LOW); // 433 transmitter set to off
#ifdef HAS_SCREEN
oled.begin(&Adafruit128x64, OLED_I2C_ADDRESS); // Start the display (if there is one)
oled.setFont(Adafruit5x7);
oled.ssd1306WriteCmd(SSD1306_DISPLAYON);
oled.setScroll(false);
#endif
// Check if there is a network connection
if(isTransportReady()){
Serial.println(F("Connected to gateway!"));
connectedToNetwork = true;
send(textMessage.setSensor(DEVICE_STATUS_ID).set( F("433 Hub connected") )); wait(RADIO_DELAY);
scanEeprom(); // Find out how many signals are stored in memory.
#ifdef DEBUG
Serial.print(F("Stored signal count: "));
Serial.println(amountOfStoredSignals);
Serial.print(F("Replayable signal count: "));
Serial.println(amountOfStoredReplayableSignals);
#endif
// We loop over all the detect-only signals, and present them to the controller.
for( byte recognisedID=10; recognisedID < 10 + (amountOfStoredSignals - amountOfStoredReplayableSignals); recognisedID++ ){
present(recognisedID, S_DOOR); wait(RADIO_DELAY); // , (const char*)recognisedID
}
// We loop over all the replayable signals, and present them to the controller.
for( byte replayableID=100; replayableID < 100 + amountOfStoredReplayableSignals; replayableID++ ){
present(replayableID, S_BINARY); wait(RADIO_DELAY); // , (const char*)replayableID
}
}
else{
Serial.println(F("! NOCONNECTION"));
connectedToNetwork = false;
}
state = LISTENING;
updateDisplay(LISTENING); // Show "Listening" on the display.
clearTimingsArray(); // Reset everything, so that we are ready to listen for a signal.
#ifdef DEBUG
Serial.print(F("Free RAM after setup = ")); Serial.println(freeRam());
#endif
}
void loop()
{
if( !captureFinished ){
//Serial.print(F("|"));
if( signalstart == 0 ){
signalstart = micros();
}
// Part 1- HIGH
while( bitRead(PIND, RECEIVER) == HIGH ){}
signalend = micros();
interval = signalend - signalstart;
if (interval > MINIMUMDURATION && interval < MAXIMUMDURATION ){
if( edges >= 0 ){ // The edges variable can start at a negative number. This helps cut off the pre-amble that is often transmitted, and that we don't really need.
if( interval > MAXI ){ // Very long edges will be truncated.
timings[edges] = 249;
}
else if( interval != 0 ){
timings[edges] = (byte) constrain((interval / GRANULARITY), 0, 255); // this rounds the number to something simpler that should fit in a byte array.
}
}
edges++;
}
else {
edges = 0 - EDGES_TO_SKIP;
validSignal = false;
captureFinished = true;
//Serial.println(F("bad timing HIGH"));
signalstart = micros();
}
// Part 2 - LOW
if( validSignal ){ // We only try to find a low part if the high part of the signal before it was valid.
while( bitRead(PIND, RECEIVER) == LOW && interval < MINIMUMSILENCE ){}
signalstart = micros();
interval = signalstart - signalend;
if( interval > MINIMUMDURATION && interval < MAXIMUMDURATION ){ // Check if the timing falls within reasonable boundaries.
if( edges >= 1 ){
if(interval > MAXI){ // MAXI = 254 * granularity
timings[edges] = 249; // A timing longer than this is ridiculous and will be truncated.
}
else if( interval != 0 ){
timings[edges] = (byte) constrain((interval / GRANULARITY), 0, 255); // This rounds the number to something simpler that should fit in a byte array.
}
}
edges++;
}
else if( interval >= MINIMUMSILENCE ){ // If the low part of the signal takes a very long time, it could be that the transmission is over.
captureFinished = true;
//Serial.println(F("minimum LOW silence reached"));
if( edges < 0 ){ edges = 0 - EDGES_TO_SKIP; }
signalstart = 0;
}
else {
edges = 0 - EDGES_TO_SKIP;
//validSignal = false;
captureFinished = true;
//Serial.println(F("bad timing LOW"));
}
}
if( edges >= MAXEDGES - 2 ){ // Our timings array is full of fresh data.
captureFinished = true;
//Serial.print(F("edges full "));
}
}
else { // SignalCapture is finished.
captureFinished = false; // Reset for next round. TODO: check if this is in the reset function too.
boolean signalIsOk = false;
if( validSignal && edges > MINIMAL_SIGNAL_LENGTH * 2 ){ // The timings data is long enough.
Serial.println(F("Received a signal"));
if( signalViabilityCheck() ){ // A quick quality check on the signal.
Serial.println(F("PROCESSING"));
updateDisplay(PROCESSING);
betweenSpace = 250; // Reset the betweenSpace. Might be superfluous.
if( signalCleaner() ){ // Cleaning and tightening the received signal.
if ( signalAnalysis() ){
Serial.println();
Serial.println(F("signalAnalysis complete"));
signalIsOk = true;
}
else {
Serial.println(F("signalAnalysis failed"));
}
}
else{
Serial.println(F("The signal cleaner couldn't find a repeating part"));
}
}
else {
Serial.println(F("Low quality signal"));
signalIsOk = false;
clearTimingsArray();
updateDisplay(state);
}
//clearTimingsArray();
if( state < 40 ){ // States below 40 are all states in which a signal is supposed to be copied to the EEPROM memory.
if( signalIsOk ){
Serial.print(F("StAtE ")); Serial.println(state);
// store it.
if( writeSignalToEeprom() ){ // We try to store the signal in the EEPROM (internal storage)
updateDisplay(SIGNAL_STORED);
// If we are doing an on/off copy, then we must move to the next step in the process.
if( state == COPYING_ON ){
Serial.println(F(" Now copying OFF signal"));
state = COPYING_OFF; // switch to the next part of the process.
send(textMessage.setSensor(DEVICE_STATUS_ID).set( F("Now play the OFF signal") )); wait(RADIO_DELAY);
//updateDisplay(PLAY_OFF_SIGNAL);
}
else if( state == LEARNING_ON ){
Serial.println(F("Now learning OFF signal"));
state = LEARNING_OFF; // switch to the next part of the process.
send(textMessage.setSensor(DEVICE_STATUS_ID).set( F("Now play the OFF signal") )); wait(RADIO_DELAY);
//updateDisplay(PLAY_OFF_SIGNAL);
}
else{
Serial.println(F("Finished copying"));
state = LISTENING;
//updateDisplay(LISTENING);
send(textMessage.setSensor(DEVICE_STATUS_ID).set( F("Learning finished OK") )); wait(RADIO_DELAY);
}
}
else{ // Storing the signal in EEPROM failed.
Serial.println(F("Error storing signal"));
updateDisplay(OUT_OF_SPACE);
send(textMessage.setSensor(DEVICE_STATUS_ID).set( F("Error storing signal") )); wait(RADIO_DELAY);
}
}
else{ // Signal was not ok (while recording a signal).
updateDisplay(BAD_SIGNAL);
// TODO add a 'try again' screen. Or add that to the BAD_SIGNAL screen?
}
}
else{ // System received a good signal while in the LISTENING state.
if( signalIsOk ){
byte seenThisSignalBefore = scanEeprom(); // We ask this function to loop over the EEPROM and compare its data against the data we placed at the beginning of the timings array.
if( seenThisSignalBefore > 0 ){
Serial.print(F("MATCH EEPROM #")); Serial.println(seenThisSignalBefore);
//Serial.print(F("Recognised #")); Serial.println(seenThisSignalBefore - amountOfStoredReplayableSignals);
send(textMessage.setSensor(DEVICE_STATUS_ID).set( F("Detected a known signal") )); wait(RADIO_DELAY);
updateDisplay(MATCH);
}
}
}
clearTimingsArray();
updateDisplay(state);
}
else{ // The captured signal didn't have enough edges.
captureFinished = false;
validSignal = true;
}
#ifdef HAS_SCREEN
//
// MAIN MENU
//
// Once every 100 milliseconds check if the menu button is being pressed.
if( millis() - lastLoopTime > 100 ){
lastLoopTime = millis();
#if KEYPAD_BUTTON_COUNT == 4
buttonPressed = keypad4();
#else if KEYPAD_BUTTON_COUNT == 12
buttonPressed = keypad12();
#endif
if( buttonPressed != prevButtonState ){
prevButtonState = buttonPressed;
wait(100);
#ifdef DEBUG
Serial.print(F("btn: ")); Serial.println(buttonPressed);
#endif
if( buttonPressed == KEYPAD_BUTTON_COUNT ){ // Menu button is being pressed.
if( state < 40 ){
if( state == COPYING_OFF || state == LEARNING_OFF ){ // If the user has already recorded the ON part of the signal, Ww should remove that.
state = DELETE_LAST;
scanEeprom();
}
state = MENU_NEW; // If the user cancels the recording, jump straight (back) to the 'new' menu.
}
else{
state = MENU_MAIN; // Start at the main menu.
}
showMenu();
#ifdef DEBUG
Serial.print(F("New state: ")); Serial.println(state);
#endif
updateDisplay(state);
// Sub menu for deleting the eeprom.
if( state == CLEAR_EEPROM ){
Serial.println(F("ERASING STORED SIGNAL DATA"));
updateDisplay(EEPROM_CLEARED);
for( int g = EEPROM_STORAGE_START; g <= EEPROM.length(); g++ ){ // Deleting the data stored in the eeprom.
EEPROM.update(g, 255);
}
scanEeprom(); // Re-index the EEPROM, which in this case sets all signal counters back to 0.
state = LISTENING;
}
else if( state == DELETE_LAST){
scanEeprom();
updateDisplay(DELETE_LAST);
state = LISTENING;
}
}
else if( buttonPressed > 0 && buttonPressed < KEYPAD_BUTTON_COUNT - 1 ){ // A send-signal button is being pressed, and we're not inside the menu, so we should replay a signal.
state = REPLAYING;
replay(buttonPressed);
state = LISTENING;
}
updateDisplay(state);
clearTimingsArray();
}
} // End of checking if the menu button is being pressed.
#endif
} // End of checking the received signal.
} // End of main loop.
//
// VIABILITY CHECK
//
// The signal should have a minimal level of diversity. This function checks how many different types of timings there are, and how often they exist.
boolean signalViabilityCheck()
{
#ifdef debug
Serial.println(F("__Viability check"));
printRawSignal();
#endif
/* TODO - remove if everything still works.
while( timings[startPosition] == 0 ){
startPosition++; Serial.println(F("-0"));
if(startPosition == endPosition
} // move the startposition up if the beginning of the signal has zero's.
while( timings[endPosition] == 0 ){ endPosition--; Serial.println(F("0-")); } // move the startposition up if the beginning of the signal has zero's.
*/
boolean diverseEnough = false; // At the beginning of this function we assume the signal is not diverse enough, until proven otherwise.
int uniqueCounter = 0; // How often a certain timing exists in the timings data.
bucketCount = 0;
for( byte s = 0; s < 255; s++ ){ // Check how often the different timings exist.
uniqueCounter = 0;
byte samenumber = 0;
for( int j = startPosition; j <= endPosition; j++ ){
if( timings[j] == s ){
uniqueCounter++;
}
}
// If there was at least one occurence of this timing, then increase the bucketCount.
if( s != 0 && uniqueCounter > 0 ){
//Serial.print(F("- bucket: ")); Serial.print(s); Serial.print(F(" has ")); Serial.println(uniqueCounter);
bucketCount++;
}
// If we find a timing that takes up more than 10% of all timings and less than 90%, then this indicates the signal is varied enough.
if( uniqueCounter > round((endPosition-startPosition) * .1) && uniqueCounter < round((endPosition-startPosition) * .9) && diverseEnough == false ){
diverseEnough = true;
}
}
//Serial.print(F("Buckets found during quality check: ")); Serial.println(bucketCount);
if( diverseEnough && bucketCount >=2 ){ // If both indicators are positive, then we the signal may be useful.
#ifdef DEBUG
printRawSignal();
#endif
return true;
}
else{
return false; // Indicates that the signal was not useable.
}
}
//
// SIGNAL CLEANER
//
// This merges timings that are very similar into one. To do this the variable P is used to combine increasingly distant neighbouringing timings together.
// In the first loop, when P is 1, only direct neighbours are merged (for example: 5 and 6). When P is 2 it could, for example, merge 4 and 6 together. And so forth.
// When P is 2, this is also the first round that we look for the repeating part of the timings. Most signals have some special timings in between the repeating bits. Here we look for it, and point to it with the 'betweenSpace' variable.
boolean signalCleaner()
{
Serial.println(F("__signalCleaner"));
for( byte i = 0; i < 8; i++ ){
metaData[i] = 0; // Set all metadata values to 0. Don't want old data messing things up.
}
repeatingPatternLength = 255; // This is only allowed to become smaller. After all, we want the smallest repeating code.
// Sorting timings into the most popular buckets.
int previousCounter = 0;
betweenSpace = 250;
byte prevBucketCount = 0;
byte highestFoundTiming = 0;
byte p = 1;
while( p <= 4 ){
#ifdef DEBUG
Serial.print(F("P")); Serial.println(p);
#endif
bucketCount = 0; // Reset bucket count.
byte lastOftenFoundTiming = 0; // Reset last found neighbouring timing.
boolean foundBetweenSpaceThisRound = false;
for( byte i = 0; i < betweenSpace + 5; i++ ){ // The "+5" is a failsafe. The idea is it will scan a bit more of the original signal, just in case we find a betweenSpacing that's even better nearby. In practise it's not that useful..
//Serial.print(F("i_")); Serial.print(i);
int currentCounter = 0;
int lastFoundJ = endPosition; // The position in the array of the last timing of this type that we found. We use this to check if there is enough distance between these timings, as the betweenSpaces we're looking for act like spacers between the repeating signals.
for ( int j = endPosition; j >= startPosition; j-- ){ // count all occurrences of this timing in the data // starting at 1 and ending at end-1 to cut off the weird timings.
if( timings[j] == i ){
currentCounter++;
if( p > 1 && bucketCount > 1 && currentCounter < 10 && foundBetweenSpaceThisRound == false ){ // If this timing was found more than 10 times, it's probably not the between space. J has to be bigger than 5 to allow the code to grab the spacer data later.
//Serial.print(F("Checking: ")); Serial.print(lastFoundJ); Serial.print(F(" - ")); Serial.print(j); Serial.print(F(" = ")); Serial.println(lastFoundJ - j);
//Serial.print(F("Repeating pattern length: ")); Serial.println(repeatingPatternLength);
if ( lastFoundJ < endPosition - 3 && lastFoundJ - j > MINIMAL_SIGNAL_LENGTH && lastFoundJ - j < repeatingPatternLength ){ // endPosition - 3 is done so that we are sure we have enough space at the end of the array left over to copy the anomaly data from later.
// We found it! Determining the betweenSpace is important. It means we're certain we've found the part of the timings array that is the repeating part.
foundBetweenSpaceThisRound == true; // No need to keep looking while processing the higher timings.
betweenSpace = i;
endPosition = lastFoundJ; // We remember where the signal we found starter and ended. From now on we'll only be focussing on this small part of the timings array.
startPosition = j + 1;
repeatingPatternLength = endPosition - startPosition;
#ifdef DEBUG
Serial.print(F("BETWEENSPACE:")); Serial.println(betweenSpace);
Serial.print(F("-Repeating pattern length: ")); Serial.println(repeatingPatternLength);
//Serial.print(F("timings[startPosition-1] = ")); Serial.println(timings[startPosition-1]);
//Serial.print(F("timings[startPosition] = ")); Serial.println(timings[startPosition]);
//Serial.print(F("timings[endPosition] = ")); Serial.println(timings[endPosition]);
//Serial.print(F("timings[endPosition+1] = ")); Serial.println(timings[endPosition+1]);
#endif
}
}
lastFoundJ = j;
}
}
if( currentCounter > 0 ){ // We found at least one occurence of the timing we're currently looking at.
#ifdef DEBUG
Serial.print(F("Found ")); Serial.print(i); Serial.print(F(" this often: ")); Serial.println(currentCounter);
#endif
bucketCount++;
highestFoundTiming = i;
if( previousCounter != 0 ){ // If we also already found another timing on a previous loop though, then we can compare the two.
if( lastOftenFoundTiming != 0 && lastOftenFoundTiming < i && i - lastOftenFoundTiming <= p && lastOftenFoundTiming != i ){ // If the neighbouring big timing isn't too far away from this one, then we may be able to gobble it up (or let it gobble up the current timing).
//Serial.print(F("p threshold matched (i=")); Serial.print(i); Serial.print(F(", prev i= ")); Serial.println(lastOftenFoundTiming);
//Serial.print(F("Distance to previous timing(i - lastoftenfoundtiming) = ")); Serial.println(i - lastOftenFoundTiming);
//Serial.print(F("-currentCounter=")); Serial.print(currentCounter);
//Serial.print(F(", previousCounter = ")); Serial.print(previousCounter);
if( currentCounter >= previousCounter ){ // The current timing is found more often in the timings array. Whichever is bigger wil 'win', and the other timing will be set to be the same as the most often occuring of the two.
#ifdef DEBUG
Serial.print(F("Shifting timing ")); Serial.print(lastOftenFoundTiming); Serial.print(F(" (found ")); Serial.print(previousCounter); Serial.print(F(" times) UP to ")); Serial.print(i); Serial.print(F(" (found ")); Serial.print(currentCounter); Serial.println(F(" times)."));
#endif
for( int e = startPosition; e <= endPosition; e++ ){ // Loop over the dataset and change all occurences of the other timing into the current timing.
if( timings[e] == lastOftenFoundTiming ){
timings[e] = i;
}
}
//currentCounter = previousCounter + currentCounter; // Reflect that this is now a bigger bucket.
}
else{ // Previous counter was bigger
#ifdef DEBUG
Serial.print(F("Shifting timing ")); Serial.print(i); Serial.print(F(" (found ")); Serial.print(currentCounter); Serial.print(F(" times) DOWN to ")); Serial.print(lastOftenFoundTiming); Serial.print(F(" (found ")); Serial.print(previousCounter); Serial.println(F(" times)."));
#endif
for( int e = startPosition; e <= endPosition; e++ ){ // loop over the timings and lift the previous ones up.
if( timings[e] == i ){
timings[e] = lastOftenFoundTiming;
}
}
}
bucketCount--; // We just merged two timings together into a single bucket.
}
}
lastOftenFoundTiming = i; // Remember what the last timing was..
previousCounter = currentCounter; // ..and how often we found it.
}
} // End of loop that goes over all timings to count how often each timing exists.
if( bucketCount != prevBucketCount ){ // If the bucketCount changed, then we may want to comb through the timings array again with the same P setting.
//Serial.print(F("Setting prevBucketCount to ")); Serial.println(bucketCount);
prevBucketCount = bucketCount;
if(betweenSpace != 250 && bucketCount < 5){ // We found the betweenSpace and have a cleaned up signal. So we have all that we need.
p = 5; // Breaks out of the while loop.
}
}
else{ // If the bucketcount is unchanged, the current P setting is no longer having any effect, and we should try increasing it.
//Serial.println(F("Unchanged bucketcount"));
p++; // By increasing P the next iteration will be allowed to merge timings together that are further apart from each other.
}
lastOftenFoundTiming = 0;
printRawSignal();
if( highestFoundTiming < 10 ){ // After one round of cleaning the signal we can exit the process here in case the signal is very fast. Otherwise we may acutally damage the timings data by merging them too much.
#ifdef DEBUG
Serial.println(F("Fast signal")); // This is a very fast signal (probably without a betweenSpace anyway). Some more expensive modern devices use this. Wireless carkeys, for example.
#endif
break;
}
} // end of P while loop
if( betweenSpace == 250 ){ // 250 is the default. This means the previous function did not find a between-space indicator. Time to bring in the pattern finder.
if( findPattern() ){ // The pattern finder uses the 'brute force method' to detect a repeating pattern in the signal.
//Serial.print(F(" pattern found startPosition: ")); Serial.println(startPosition);
//Serial.print(F(" patterner found endPosition: ")); Serial.println(endPosition);
//Serial.print(F(" pattern length (repeatingPatternLength): ")); Serial.println(repeatingPatternLength);
}
else{ // Even the pattern matcher couldn't find a repeating part in the timings data.
return false; // Signal analysis is impossible.
}
}
else{
return true; // We found a betweenSpace.
}
}
//
// SIGNAL ANALYSIS
//
// Now that the signal is clean we can try to find the byte code it contains.
// If required (depending on the current state), we store the byte code in the EEPROM memory.
boolean signalAnalysis()
{
//Serial.println(F("__signalAnalysis"));
byte jump = 1; // Used by the function that tries to determine the timing duo's that the repeating signal consists of.
for( int i = startPosition; i < endPosition; i = i + jump ){ // loop over the repeating signal part and do some checks to see how well it compresses.
byte patternCount = 0;
// Find the repeating duos. Going over all the timings, we count how many of a pattern involving this timing and the next one we can find.
for ( int j = startPosition; j < endPosition; j++ ){
if( timings[i] == timings[j] && timings[i+1] == timings[j+1] ){
patternCount++;
if( metaData[2] == 0 ){ // If we haven't found the second duo yet, se we cannot skip looking for the duo's.
if( timings[i] == metaData[0] && timings[i+1] == metaData[1] ){
// We have apparently already found the first duo. We can skip this one.
// break;
}else if(metaData[1] == 0){
//patternCount++;
//j++;
Serial.print(timings[i]); Serial.print(F("+")); Serial.print(timings[i+1]); Serial.print(F(","));
if(patternCount == 4){ // We found this pattern 4 times now, so we can be pretty sure it's useful.
metaData[0] = timings[i];
metaData[1] = timings[i+1];
Serial.println();
Serial.println(F("=duo1"));
jump = 2; // If the first duo is found, the other timing duo's should always be a multiple of 2 steps further ahead.
break;
}
}else if( metaData[3] == 0 ){
Serial.print(timings[i]); Serial.print(F("+")); Serial.print(timings[i+1]); Serial.print(F(","));
if(patternCount == 4){
metaData[2] = timings[i];
metaData[3] = timings[i+1];
Serial.println();
Serial.println(F("=duo2"));
}
}
}
}
}
if( patternCount == 1 ){ // Trimminig the signal to the part that has only duo's. That way we can get the spacer part optimally.
//Serial.println(F("Anomaly"));
if( metaData[0] == 0 ){ // We haven't found the first repeating duo yet, so we're near the beginning of the signal.
// shifting the window if necessary.
endPosition = endPosition + jump;
startPosition = startPosition + jump; // In theory this could give trouble, as the value is changed while the loop uses this value.
}
else if (metaData[2] != 0 ){ // it's all filled, so we are now at the end of the signal.
if( metaData[4] == 0 ){
#ifdef DEBUG
Serial.print(F("anomaly1a:")); Serial.println(timings[i]);
Serial.print(F("anomaly1b:")); Serial.println(timings[i+1]);
#endif
metaData[4] = timings[i];
metaData[5] = timings[i+1];
repeatingPatternLength = repeatingPatternLength - 2; // Shorten the actual repeating signal length.
}
else if( metaData[6] == 0 ){
#ifdef DEBUG
Serial.print(F("anomaly2a:")); Serial.println(timings[i]);
Serial.print(F("anomaly2b:")); Serial.println(timings[i+1]);
#endif
metaData[6] = timings[i];
metaData[7] = timings[i+1];
repeatingPatternLength = repeatingPatternLength - 2; // Shorten the actual repeating signal length.
}
else{
Serial.println(F("eh?"));
return false;
}
}
}
} // end of analysing the duo's
// Switch the duo's around in necessary, so that the one the has a differnce in timings is the first one. This will save a byte in storage later.
if( metaData[0] == metaData[1] == metaData[2] && metaData[1] < metaData[3]){
metaData[1] = metaData[3];
metaData[3] = metaData[0];
}
#ifdef DEBUG
// Here we draw the to serial output as duo's.
Serial.println();
// output the signal to serial.
bool lineBreak = 1;
for (int j = startPosition; j <= endPosition; j++) {
if( (j - startPosition) % 16 == 0 ){
Serial.println(); Serial.println();
}
Serial.print(F(",")); Serial.print(timings[j]);
//if(j % 2 == 1){Serial.println();}
lineBreak = !lineBreak;
if(lineBreak){
Serial.println();
}
}
Serial.println();
Serial.println();
Serial.println(repeatingPatternLength);
Serial.println();
Serial.println(metaData[0]);
Serial.println(metaData[1]);
Serial.println(metaData[2]);
Serial.println(metaData[3]);
Serial.println();
Serial.println(metaData[4]);
Serial.println(metaData[5]);
Serial.println(metaData[6]);
Serial.println(metaData[7]);
#endif
// Do a quick clean check of how long the repeating signal is. I guess I don't trust the code above 100% :-)
jump = 1;
repeatingPatternLength = 0;
for ( int i = startPosition; i < endPosition; i = i + jump ){ // Loop over the repeating signal part and do some checks to see how well it compresses.
if( (timings[i] == metaData[0] && timings[i + 1] == metaData[1]) || (timings[i] == metaData[2] && timings[i + 1] == metaData[3]) ){
repeatingPatternLength = repeatingPatternLength + 2;
jump = 2;
}
}
repeatingSignalByteLength = (byte)repeatingPatternLength / 16;
if( repeatingPatternLength % 16 > 0 ){ repeatingSignalByteLength++; } // If there is a nibble (half a byte) left over, then increase the required array length by one.
if( repeatingPatternLength % 16 == 8 ){
lastByteIsSplit = true;
}
// Take 8 bits and encode them into a byte.
for( byte i = 0; i < repeatingSignalByteLength; i++ ){
byte eepromByte = 0;
for( int j = 0; j < 8; j++ ){
if( timings[startPosition] == metaData[0] && timings[startPosition + 1] == metaData[1] ){
Serial.print(F("0"));
bitWrite(eepromByte,j,0);
startPosition = startPosition + 2;
}
else if( timings[startPosition] == metaData[2] && timings[startPosition + 1] == metaData[3] ){
Serial.print(F("1"));
bitWrite(eepromByte,j,1);
startPosition = startPosition + 2;
}
else{
Serial.print(F("?"));
bitWrite(eepromByte,j,0);
} // End of bit loop
} // End of byte loop
timings[i] = eepromByte;
#ifdef DEBUG
Serial.print(i); Serial.print(F(" > ")); Serial.println(eepromByte); Serial.print(F(" "));
#endif
}
if( timings[0] == 0 && timings[1] == 0 ){ return false; } // A quick final quality check. Might be superfluous.
return true; // return if the signal analysis went ok.
}
//
// PATTERN FINDER
//
// Finds repeating patterns in the signal data. This is a backup function. Some signals don't have a betweenSpace. In those cases we use brute force to look for the longest repeating pattern we can find. This function takes longer.
boolean findPattern()
{
//Serial.print(F("___pattern_finder___"));
byte maxPatternLength = (byte)constrain((endPosition-startPosition)/2, 31, 255); // what length is the pattern we're looking for allowed to be? It's most likely 8 bytes = 64 bits = 128 timings, but we can't be sure in this case. To find a repeating pattern, we need to be able to have it in the data twice, so the maximum length is the timings array length divided by two.
byte searchLength = 32;
while( searchLength + 4 <= maxPatternLength ){ // Check the maximum pattern length we can search for in the current memory.
searchLength = searchLength + 4;
}
//Serial.print(F(" searchLength that we begin pattern matching with: ")); Serial.println(searchLength);
for( searchLength; searchLength > MINIMAL_SIGNAL_LENGTH; searchLength = searchLength - 4 ){ // Find repeating patterns of a minimal length, starting with a long as possible signal, and then working down.
//Serial.print(F(" -trying length: ")); Serial.println(searchLength);
int patternFirstPosition = 0; // Where we found an often occuring pattern for the first time. To keep things simple(low memory) we only search the first 255 positions of the array.
for ( int i = startPosition; i <= endPosition-searchLength; i++ ){
byte patternCount = 0;
for ( int y = startPosition; y <= endPosition-searchLength; y++ ) {
boolean oksofar = true; // starts out assuming the pattern is found, and then starts comparing. As soon as one of the timings is not the same, it sets this to false.
for (byte r = 0; r < searchLength; r++) { // We compare the selected patterns
if( timings[i+r] != timings[y+r] ){
oksofar = false; // If the pattern is not found at this position.
break; // No need continuing the comparison.
}
}
if( oksofar == true ){
patternCount++; // We scanned over the position in the array, and nothing tripped up the recogniser, meaning it actuallly found the pattern.
y = y + (searchLength-1); // Minus one, because the for-loop will also add one. We skip ahead and see if we can find the same pattern again straigth after.
}
}
if(patternCount > 1){ // We found a repeating pattern!
// Quick quality check. It makes sure the found code isn't just the same number in a row a lot.
int sameNumber = 0;
for( int j = startPosition; j <= endPosition; j++ ){
if( timings[j] == timings[startPosition] ){
sameNumber++;
}
}
if(sameNumber > 15){ // This many of the same timings in a row is a bad sign.
return false;
}
Serial.print(F("Pattern: "));
for (int t = 0; t < searchLength; t++) {
Serial.print(timings[i + t]); Serial.print(F(","));
}
Serial.println();
// Update the global variables:
repeatingPatternLength = searchLength; // Store the length of the repeating part.
startPosition = i; // Set the start position of the repeating part of the signal.
endPosition = i + searchLength; // Set the end position of the repeating oart of the signal.
return true;
}
}
}
//Serial.println(F("Pattern finder failed"));
return false; // We reached the end without finding any repeating pattern.
}
//
// SCAN EEPROM
//
// This function has multiple uses, depending on the state. When signalNumber is given as 0, then it acts as a simple scan of the eeprom, and can compare found signals to those in eeprom.
byte scanEeprom()
{
byte whatWeCameHereFor = 0;
amountOfStoredSignals = 0; // Reset these. Everytime this function runs they are updated.
amountOfStoredReplayableSignals = 0;
positionOfLastSignalEnd = EEPROM_STORAGE_START - 1; // MySensors has another value we could grab to get even more space.
boolean finishedScanningEeprom = false;
while( finishedScanningEeprom == false ){
byte storedSignalLength = EEPROM.read(positionOfLastSignalEnd + 1); // This get the first byte of the next stored signal (if it exists), and indicates how much data it takes on the eeprom.
if( storedSignalLength == 0xff ){ // No more signals found in the EEPROM.
finishedScanningEeprom = true;
}
else {
//if( positionOfLastSignalEnd + storedSignalLength > EEPROM.length() ){ break; } // This should theoretically never happen. But if it did it would lock up the device, so it can't hurt.
// DELETE THE LAST RECORDED SIGNAL?
if( state == DELETE_LAST){
Serial.print(F("deletelast check:")); Serial.println(storedSignalLength);
Serial.print(F("deletelast check:")); Serial.println( EEPROM.read(positionOfLastSignalEnd + 1 + storedSignalLength) );
Serial.print(F("deletelast check:")); Serial.println( EEPROM.read(positionOfLastSignalEnd + 1) );
Serial.print(F("deletelast check:")); Serial.println( EEPROM.read(positionOfLastSignalEnd) );
Serial.print(F("deletelast check:")); Serial.println(positionOfLastSignalEnd);
}
if( state == DELETE_LAST && EEPROM.read(positionOfLastSignalEnd + 1 + storedSignalLength) == 0xff ){
Serial.println(F("Deleting last stored signal"));
for( int j = positionOfLastSignalEnd + 1; j < positionOfLastSignalEnd + 1 + storedSignalLength; j++ ){
EEPROM.update(j, 0xff);
}
return 1;
}
amountOfStoredSignals++; // Update how many signals are stored in eeprom.
byte descriptionData = EEPROM.read(positionOfLastSignalEnd + 1);
if( bitRead(descriptionData, DESCRIPTION_REPLAYABLE) == 1 ){ // Is it a replayable signal?
amountOfStoredReplayableSignals++;
if( state == REPLAYING && amountOfStoredReplayableSignals == buttonPressed ){
Serial.println(F("eeprom scan found the signal to replay"));
whatWeCameHereFor = storedSignalLength;
startPosition = positionOfLastSignalEnd + 1; // Recycling variables to save memory.
endPosition = positionOfLastSignalEnd + storedSignalLength;
}
}
// LISTENING
positionOfLastSignalEnd = positionOfLastSignalEnd + storedSignalLength;
if( state == LISTENING && whatWeCameHereFor == 0 && bitRead(descriptionData, DESCRIPTION_REPLAYABLE) == 0 ){ // We only check detect-only signals for now. This could be changed to include all signals (just remove the last check here)
// We should scan the stored binary data against the last signal we received.
boolean areTheyTheSame = true; // the code below continously tries to disprove that they are the same, and skips ahead at the first evidence that this is the case.
for( byte i = 0; i < 1 + bitRead(descriptionData, DESCRIPTION_ON_OFF); i++ ){ // This is a trick to be able to check both the on and off signals.
Serial.print(F("on.off.check(0/1):")); Serial.println(i);
areTheyTheSame = true;
//Serial.println(repeatingSignalByteLength);
for( byte j = 0; j < repeatingSignalByteLength; j++ ){
/*
Serial.print( (repeatingSignalByteLength - j) - 1 );
Serial.print(F(">"));
Serial.print( timings[(repeatingSignalByteLength - j) - 1] );
Serial.print(F(" =?= "));
Serial.print( (positionOfLastSignalEnd - (repeatingSignalByteLength*i)) - j );
Serial.print(F(">"));
Serial.println( EEPROM.read((positionOfLastSignalEnd - (repeatingSignalByteLength*i)) - j ));
*/
if( timings[(repeatingSignalByteLength - j) - 1] != EEPROM.read((positionOfLastSignalEnd - (repeatingSignalByteLength*i)) - j ) ){
areTheyTheSame = false;
break;
}
}
if( areTheyTheSame == true ){ // We've compared the entire signal, and.. they are the same!
Serial.print(F("SEND: Toggle ")); Serial.print(10 + (amountOfStoredSignals - amountOfStoredReplayableSignals)); Serial.print(F(" to ")); Serial.println(i);
connectedToNetwork = send(detectmsg.setSensor(10 + (amountOfStoredSignals - amountOfStoredReplayableSignals)).set(!i),1); // This sends the found value to the server. It also asks for a receipt (the 1 at the end), so that it acts as a network status detection at the same time.
break; // Just in case that this is a double signal, then we don't want a second loop to overrule this result.
}
}
if( areTheyTheSame == true ){ // We've compared the entire signal, and.. they are the same!
//Serial.println(F("Match"));
updateDisplay(MATCH);
whatWeCameHereFor = amountOfStoredSignals;// Sending back the index of this signal.
}
}
} // end of checking a stored signal.
} // end of while loop, so the entire EEPROM has now been scanned.
return whatWeCameHereFor;
}
//
// STORE SIGNAL
//
boolean writeSignalToEeprom()
{
Serial.println(F("__Storing"));
byte signalDescriber = 0; // This will hold all the setings for this signal. The 'Description byte' is basically a settings switchboard that describes the signal. It helps to keep the required eeprom storage low.
if( (state == COPYING_ON || state == COPYING_SIMPLE) && amountOfStoredReplayableSignals == KEYPAD_BUTTON_COUNT - 1 ){
updateDisplay(NO_MORE_FREE_BUTTONS); // Warn the user: there are no more physical buttons left.
}
// TODO?: If this is an on-off situation, maybe get the previous signal from storage and make sure that the meta data is similar? By doing a check we could make sure no rogue signals accidentally interfere with the recording proces. The odds of that happening are pretty slim though..
byte spaceNeeded = 2; // We calculate how much space we need to store everything, and then check if it will still fit in memory. The minimal metadata length we can possibly start with is 2. One byte for signal length, and another for the signal describer
/*
* THE COMPLETE DATA TO STORE
* This is what a stored signal in the EEPROM looks like:
*
* byte 0. How many of the eeprom's bytes are used to store the signal.
* byte 1. Signal describer. Stores settings. See below for details.
*
* The next part stores the metaData array. For 'recognise only' signals this is skipped.
* byte 3. Most popular bit-duo part A. Together they are binary 0. (only stored if the signal should be replayed)
* byte 4. Most popular bit-duo part B. Together they are binary 0. (only stored if the signal should be replayed)
* byte 5. Second most popular bit-duo part A. Together they are binary 1. (optional, depending on signal and state)
* byte 6. Second most popular bit-duo part B. Together they are binary 1. (optional, depending on signal and state)
* byte 7. First anomaly duo. (optional, depending on signal and state)
* byte 8. First anomaly duo. (optional, depending on signal and state)
* byte 9. Second anomaly duo. (optional, depending on signal and state)
* byte 10. Second anomaly duo. (optional, depending on signal and state)
*
* byte 11 and onwards: stores the actual repeating part of the signal. Each byte has 8 bits, and these 8 bits can be expanded into the original signal.
*
* If this is an on+off signal, then it will be appended, but only it's repeating signal data.
*
*
* Signal describer byte:
* bit 7. - Since there is a spacer, is it 2 bit (0) or 4 bit (1) spacer?
* bit 6. - Is there a spacer anomaly? Usually there is. No (0) or Yes (1).
* bit 5. - Can one of the duo's be reconstructed from the other one? No (1) or yes (0). If yes, then we can save 2 bytes, and must also store what type of reconstruction can be done (there are two options fo this).
* bit 4. - Simple read-only signal (0), or are we planning to transmit it (1)? If it's read-only, then we only store the signal spacer, signal description (so we can now it's a simple signal), and the repeating signal array. A normal, simple 8 byte signal would thus take 10 bytes of storage on the EEPROM.
* bit 3. - Is this a singular signal (0), or combined on/off signal (1). (The repeating signal payload is then doubled, and should later be split in half.)
* bit 2. - Currently not used. Perhaps in the future this could be used to store if a replayable signal should also operate as a recognise-only signal
* bit 1. - What type of duo reconstruction can be done? This depends on bit 5 being set to 0, indicating a duo reconstruction should be performed. If they are mirrored, then (0) is stored. Is the first duo just twice the first timing of the second duo (e.g. if it is 2&2 + 2&7), then a 1 is stored.
* bit 0. - Stores if the last byte of the repeating pattern is only half used.
*/
#ifdef DEBUG
Serial.print(metaData[0]); Serial.println(F(" most popular bit-duo part A (0)"));
Serial.print(metaData[1]); Serial.println(F(" most popular bit-duo part A (0)"));
Serial.print(metaData[2]); Serial.println(F(" most popular bit-duo part B (1)"));
Serial.print(metaData[3]); Serial.println(F(" most popular bit-duo part B (1)"));
Serial.print(metaData[4]); Serial.println(F(" spacer anomaly 1"));
Serial.print(metaData[5]); Serial.println(F(" spacer anomaly 2"));
Serial.print(metaData[6]); Serial.println(F(" spacer anomaly 3"));
Serial.print(metaData[7]); Serial.println(F(" spacer anomaly 4"));
#endif
if( state != COPYING_OFF && state != LEARNING_OFF ){ // We only create the description bit on the ON part of an ON/OFF signal. The OFF part is just directly appended to the eeprom later.
// IS THE LAST BYTE SPLIT? (Uneven number of tri-bits)
if( lastByteIsSplit ){
bitWrite(signalDescriber, DESCRIPTION_HALFBYTE , 1); // We use this position to remember if there is an even or uneven amount of 'nibbles' (a nibble is half a byte).
}
// ARE WE STORING AN ON/OFF SIGNAL?
if( state == COPYING_ON || state == LEARNING_ON ){
bitWrite(signalDescriber, DESCRIPTION_ON_OFF , 1); // We use this position to remember if this is an ON/OFF signal.
spaceNeeded = spaceNeeded + (repeatingSignalByteLength * 2); // If this is an on-off signal, then we will need to store the repeating part twice.
}else {
spaceNeeded = spaceNeeded + repeatingSignalByteLength;
}
// SIMPLE OR REPLAY? If it's simple, then all additional description bits can stay at 0.
if( state == COPYING_ON || state == COPYING_SIMPLE ){
bitWrite(signalDescriber, DESCRIPTION_REPLAYABLE , 1); // We use this position to remember if this is a recognise-only signal(0), or if it's a signal that can be replayed(1).
if( metaData[2] == metaData[1] && metaData[3] == metaData[0] ){
//Serial.println(F("A duo can be reconstructed. Duo 2 is the mirror image of duo 1."));
spaceNeeded = spaceNeeded + 2;
}
else if( metaData[0] == metaData[2] == metaData[3] ){
//Serial.println(F("A duo can be reconstructed. Duo 2 is just twice the first timing of duo 1"));
bitWrite(signalDescriber, DESCRIPTION_DUO_RECONSTRUCTION_TYPE , 1);
spaceNeeded = spaceNeeded + 2;
}
else{
// There is no clever way to store the duo's using less storage space.
bitWrite(signalDescriber, DESCRIPTION_UNRECONSTRUCTABLE_DUO , 1); // We use this position to remember if a duo can be reconstructed (0) or not (1).
spaceNeeded = spaceNeeded + 4;
}
// ANOMALY?
if( metaData[4] != 0 && metaData[5] != 0 ){
bitWrite(signalDescriber, DESCRIPTION_ANOMALY , 1); // We use this position to remember that there is at least one part anomaly.
spaceNeeded = spaceNeeded + 2;
if( metaData[6] != 0 && metaData[7] != 0 ){
bitWrite(signalDescriber, DESCRIPTION_LARGE_ANOMALY , 1); // We use this position to remember that this is a double size anomaly.
spaceNeeded = spaceNeeded + 2;
}
}
#ifdef DEBUG
Serial.print(F("Signal description byte (")); Serial.println(signalDescriber);
for (byte i = 0; i < 8; i++) {
Serial.print(i); Serial.print(F(" = ")); Serial.println(bitRead(signalDescriber,i));
}
Serial.print(F("Storage space needed: ")); Serial.println(spaceNeeded);
Serial.print(F("Space left: ")); Serial.println( EEPROM.length() - positionOfLastSignalEnd );
#endif
}
} // End of check if we're storing a single or double signal.
if( positionOfLastSignalEnd + spaceNeeded < EEPROM.length() ){ // If there is enough space to store the new signal. E2END+1 would also work instead of EEPROM.length();
//Serial.println(F("Enough space left"));
if( state != COPYING_OFF && state != LEARNING_OFF ){
// Storing a new signal. Moving pointer to the next free space in the EEPROM.
positionOfLastSignalEnd++;
EEPROM.update(positionOfLastSignalEnd, spaceNeeded); // Here we store the length of all the data associated with this recording session.
//Serial.print(positionOfLastSignalEnd); Serial.print(F(" ~~> "));Serial.println(spaceNeeded);
positionOfLastSignalEnd++;
EEPROM.update(positionOfLastSignalEnd, signalDescriber); // Here we store the signal describer which holds all the settings needed to recreate this signal.
//Serial.print(positionOfLastSignalEnd); Serial.print(F(" ~~> "));Serial.println(signalDescriber);
/*
Here we store the metaData array. This is how this loop works:
0 -> bit4 (if replaying) -> metadata 1&2 must be stored
1 -> bit5 (if a duo can not be cleverly reconstructed from the other) -> metadata 3&4 must be stored
2 -> bit6 (if there is at least one part anomaly -> metadata 5&6 must be stored
3 -> bit7 (if second part anomaly exists) -> metadata 7&8 must be stored.
*/
if( bitRead(signalDescriber, DESCRIPTION_REPLAYABLE) == 1 ){ // If we want to be able to replay this signal, then we should store the meta data.
for( byte i = 0; i < 4; i++ ){ // Looping over the signalDescriber and the metaData array at the same time.
if( bitRead(signalDescriber, i+4) == 1 ){ // 4, 5, 6, 7
positionOfLastSignalEnd++;
EEPROM.update(positionOfLastSignalEnd, metaData[i*2]);
//Serial.print(positionOfLastSignalEnd); Serial.print(F(" ~> "));Serial.println(metaData[i*2]);
positionOfLastSignalEnd++;
EEPROM.update(positionOfLastSignalEnd, metaData[i*2 + 1]);
//Serial.print(positionOfLastSignalEnd); Serial.print(F(" ~> "));Serial.println(metaData[i*2 + 1]);
}
}
if( state == COPYING_ON || state == COPYING_SIMPLE ){
Serial.println(F("TODO POSSIBLEBUG"));
amountOfStoredReplayableSignals++; // Remember that we now have an extra replayable signal.
}
}
} // End of check if this is part two of an on/off signal.
// Add the repeating part of the signal to the storage.
for( byte i = 0; i < repeatingSignalByteLength; i++ ){
positionOfLastSignalEnd++;
Serial.print(positionOfLastSignalEnd); Serial.print(F(" ~~> "));Serial.println(timings[i]);
EEPROM.update(positionOfLastSignalEnd, timings[i]);
}
if( state != COPYING_OFF && state != LEARNING_OFF ){
amountOfStoredSignals++; // On/off signals only count as one because they would be attached to one button.
}
}
else{
return false;
}
//Serial.print(F(" Free RAM at the end of storage function = ")); Serial.println(freeRam());
send(textMessage.setSensor(DEVICE_STATUS_ID).set( F("Stored a signal") )); wait(RADIO_DELAY);
return true; // Succesfully stored the signal
}
//
// REPLAY
//
void replay(byte signalNumber)
{
state = REPLAYING;
buttonPressed = signalNumber;
Serial.print(F("__replaying_")); Serial.println(buttonPressed);
repeatingPatternLength = 0;
if( signalNumber == 0 ){ return; } // We cannot play signal 0. Just a (superfluous) safeguard.
byte storedSignalLength = scanEeprom();
if( storedSignalLength == 0 ){
//Serial.println(F("No signal to replay stored yet!"));
updateDisplay(NO_SIGNAL_STORED_YET);
}
else{
updateDisplay(REPLAYING);
for( byte i = 0; i < 8; i++ ){
metaData[i] = 0; // Reset all metadata values.
}
byte eepromReadPosition = 4; // Where in the eeprom signal we are reading back the data.
byte restoredSignalLength = 0; // pointer to where in the timings array the signal has been reconstructed.
byte signalDescription = EEPROM.read(startPosition+1);
lastByteIsSplit = bitRead(signalDescription, DESCRIPTION_HALFBYTE);
#ifdef DEBUG
Serial.println(F("Data from EEPROM (length: ")); Serial.println(storedSignalLength);
for( int i = startPosition; i <= endPosition; i++ ){
Serial.println( EEPROM.read(i) );
}
#endif
#ifdef HAS_SCREEN && DEBUG
// Show on the screen if the ON or OFF signal is being played.
if( bitRead(signalDescription, DESCRIPTION_ON_OFF) ){
oled.set1X();
oled.setCursor(0,6);
oled.print(F("part "));
oled.print(buttonsToggleStatus[signalNumber] + 1);
}
#endif
repeatingPatternLength = storedSignalLength - 4;// This indicates how many of the bytes in the eeprom describe the actual repeating signal.
metaData[0] = EEPROM.read( startPosition + 2 ); // These are always reconstructed.
metaData[1] = EEPROM.read( startPosition + 3 );
if( bitRead(signalDescription,DESCRIPTION_UNRECONSTRUCTABLE_DUO) == 0 ){ // A duo must be reconstructed.
if( bitRead(signalDescription,DESCRIPTION_UNRECONSTRUCTABLE_DUO) == 0 ){ // The second duo is a mirror image of the first duo.
metaData[2] = metaData[1];
metaData[3] = metaData[0];
}
else{ // The second duo is just twice the first timing of the first duo.
metaData[2] = metaData[0];
metaData[3] = metaData[0];
}
}
else {
metaData[2] = EEPROM.read( startPosition + eepromReadPosition );
eepromReadPosition++;
metaData[3] = EEPROM.read( startPosition + 5 );
repeatingPatternLength = repeatingPatternLength - 2;
}
// The anomaly can be placed directly into the timings array.
if( bitRead(signalDescription,DESCRIPTION_ANOMALY) == 1 ){ // Reconstruct part 1 of anomaly.
eepromReadPosition++;
timings[restoredSignalLength] = EEPROM.read( startPosition + eepromReadPosition );
restoredSignalLength++;
eepromReadPosition++;
timings[restoredSignalLength] = EEPROM.read( startPosition + eepromReadPosition );
restoredSignalLength++;
repeatingPatternLength = repeatingPatternLength - 2;
}
if( bitRead(signalDescription,DESCRIPTION_LARGE_ANOMALY) == 1 ){ // Reconstruct part 2 of anomaly.
eepromReadPosition++;
timings[restoredSignalLength] = EEPROM.read( startPosition + eepromReadPosition );
restoredSignalLength++;
eepromReadPosition++;
timings[restoredSignalLength] = EEPROM.read( startPosition + eepromReadPosition );
restoredSignalLength++;
repeatingPatternLength = repeatingPatternLength - 2;
}
#ifdef DEBUGGING
Serial.println(F("Reconstructed betweenSpace anomaly: "));
for( byte w = 0; w < 4; w++ ){
Serial.println(timings[w]);
}
Serial.println(F("Reconstructed metaData:"));
for( byte w = 0; w < 4; w++ ){
Serial.println(metaData[w]);
}
#endif
if( bitRead(signalDescription, DESCRIPTION_ON_OFF) ){ // If it's an of+off signal then the repeating part should be cut in half to get the actual length, since they are stored back to back.
repeatingPatternLength = repeatingPatternLength / 2;
}
// Looping over the EEPROM, with some special construction that switches which signal should be reconstructed based on the toggle state of the button.
for( int i = (endPosition - repeatingPatternLength * (1+buttonsToggleStatus[signalNumber])) + 1; i <= endPosition - (repeatingPatternLength * buttonsToggleStatus[signalNumber]); i++ ){
// Here we can reconstruct the original signal.
Serial.print(F(" byte ")); Serial.print(i);Serial.print(F(" = ")); Serial.println( EEPROM.read(i) );
for (byte j = 0; j < 8; j++) {
Serial.print(restoredSignalLength); Serial.print(F(" => ")); Serial.println( metaData[ bitRead(EEPROM.read(i),j) * 2 ] );
timings[restoredSignalLength] = metaData[ bitRead(EEPROM.read(i),j) * 2 ];
restoredSignalLength++;
Serial.print(restoredSignalLength); Serial.print(F(" => ")); Serial.println( metaData[ bitRead(EEPROM.read(i),j) * 2 + 1] );
timings[restoredSignalLength] = metaData[ bitRead(EEPROM.read(i),j) * 2 +1];
//metaData[ bitRead(EEPROM.read(i),j) * 2 + 1 ];
restoredSignalLength++;
}
Serial.println();
}
// If the last byte is only half used, then we should not transmit the last half byte.
if( lastByteIsSplit ){
restoredSignalLength = restoredSignalLength - 8;
}
// We only change the value in the toggle array if this is an on/off signal.
if( bitRead(signalDescription,DESCRIPTION_ON_OFF) == 1 ){
buttonsToggleStatus[signalNumber] = !buttonsToggleStatus[signalNumber]; // Toggle the value in the array.
//Serial.print(F(" changed value in toggle array to: ")); Serial.println(buttonsToggleStatus[signalNumber]);
}
// Finally, play the new timing a few times.
for( int j = 0; j < restoredSignalLength; j++ ){
//Serial.println( timings[j] );
}
for( byte i = 0; i < 6; i++ ){ // Sending the pattern 6 times.
boolean high = false;
for( int j = 0; j < restoredSignalLength; j++ ){
if( high ){
digitalWrite(TRANSMITTER, LOW);
high = false;
}
else{
digitalWrite(TRANSMITTER, HIGH);
high = true;
}
interval = timings[j] * GRANULARITY;
delayMicroseconds(interval);
}
}
//Serial.print(F("Free RAM after replay = ")); Serial.println(freeRam());
/*
wait(200);
// Serial.println(F("Sending reverse signal")); // Just to be safe, send the reverse signal too.
for( int i = 0; i < 6; i++ ){ // Sending the pattern 6 times.
boolean high = true;
for( int j = 0; j < restoredSignalLength; j++ ){
if( high ){
digitalWrite(TRANSMITTER, LOW);
high = false;
}
else{
digitalWrite(TRANSMITTER, HIGH);
high = true;
}
int fullTiming = timings[j] * GRANULARITY;
delayMicroseconds(fullTiming);
//Serial.println(fullTiming);
}
}
digitalWrite(TRANSMITTER, LOW);
*/
//Serial.println(F("Done replaying"));
} // End of check if at least one signal is stored in the EEPROM.
send(textMessage.setSensor(DEVICE_STATUS_ID).set( F("Replayed a signal") )); wait(RADIO_DELAY);
state = LISTENING;
} // End of replay function
//
// UPDATE DISPLAY
//
void updateDisplay(byte currentStatus) // Show info on the display
{
#ifdef HAS_SCREEN
oled.clear(); // Clear the display
displayNetworkStatus(); // Update the network connection icon.
oled.set2X(); // Switch font size
oled.setCursor(0,2);
// Often used
if( currentStatus == LISTENING ){
oled.print(F("LISTENING..")); // Call this "Scanning" instead?
oled.set1X();
oled.setCursor(0,5);
oled.print(F("Detect signals: ")); oled.print(amountOfStoredSignals - amountOfStoredReplayableSignals);
oled.setCursor(0,6);
oled.print(F("Replay signals: ")); oled.print(amountOfStoredReplayableSignals);
}
else if( currentStatus == PROCESSING ){
oled.print(F("Processing"));
}
else if( currentStatus == MATCH ){
oled.print(F("Found"));
oled.setCursor(0,5);
oled.print(F("match!"));
wait(2000);
}
else if( currentStatus == REPLAYING ){
oled.print(F("Playing ")); oled.print(buttonPressed);
}
// Copying
else if( currentStatus == COPYING_ON || currentStatus == LEARNING_ON ){
oled.print(F("Play ON"));
oled.set1X();
oled.setCursor(0,6);
oled.print(F(">cancel"));
}
else if( currentStatus == COPYING_OFF || currentStatus == LEARNING_OFF){
oled.print(F("Play OFF"));
oled.set1X();
oled.setCursor(0,6);
oled.print(F(">cancel"));
}
else if( currentStatus == COPYING_SIMPLE || currentStatus == LEARNING_SIMPLE ){
oled.print(F("READY!"));
oled.set1X();
oled.setCursor(0,4);
oled.print(F("Start your signal"));
oled.set1X();
oled.setCursor(0,6);
oled.print(F(">cancel"));
}
else if( currentStatus == SIGNAL_STORED ){
oled.print(F("SIGNAL"));
oled.setCursor(0,4);
oled.print(F("STORED"));
if( state == COPYING_OFF || state == LEARNING_OFF ){
oled.set1X();
oled.setCursor(0,7);
oled.print(F("Stored signals: ")); oled.print(amountOfStoredSignals);
}
wait(3000);
}
// Errors
else if( currentStatus == BAD_SIGNAL ){
oled.print(F("BAD SIGNAL"));
oled.set1X();
oled.setCursor(0,5);
oled.print(F("TRY AGAIN"));
}
else if( currentStatus == OUT_OF_SPACE ){
oled.print(F("Out of space!"));
wait(4000);
}
else if( currentStatus == NO_SIGNAL_STORED_YET ){
oled.print(F("Empty"));
wait(2000);
}
else if( currentStatus == NO_MORE_FREE_BUTTONS ){
oled.print(F("No buttons left"));
oled.set1X();
oled.setCursor(0,0);
oled.print(F("NOTICE"));
oled.setCursor(0,5);
oled.print(F("You can only replay"));
oled.setCursor(0,6);
oled.print(F("it via the app."));
wait(4000);
}
// Other
else if( currentStatus == DELETE_LAST ){
oled.print(F("DELETED"));
oled.setCursor(0,5);
oled.print(F("ONE SIGNAL"));
wait(4000);
}
else if( currentStatus == EEPROM_CLEARED ){
oled.print(F("MEMORY"));
oled.setCursor(0,5);
oled.print(F("CLEAR"));
wait(4000);
}
else{
oled.print(F("??? ")); oled.print(currentStatus);
}
#endif
} // End of update display function
//
// MENUS
//
byte showMenu() // Lets the user select which state to enter.
{
#ifdef HAS_SCREEN
Serial.println(F("__MENU"));
boolean stayInMenu = true; // We stay in the menu while this is true
byte menuItems = 4; // How many items are shown? Don't forget 'cancel' is always shown.
byte menuPosition = 2; // Current position of the cursor.
wait(100);
while( stayInMenu ){
#if KEYPAD_BUTTON_COUNT == 4
buttonPressed = keypad4();
#else if KEYPAD_BUTTON_COUNT == 12
buttonPressed = keypad12();
#endif
//buttonPressed = (byte)constrain(map2(analogRead(KEYPAD_PIN), KEYPAD_OFFSET, 1024, 0, KEYPAD_BUTTON_COUNT), 0 , KEYPAD_BUTTON_COUNT);
wait(100);
if(buttonPressed != prevButtonState){
Serial.print(F("[] button pressed: ")); Serial.println(buttonPressed);
if( buttonPressed == KEYPAD_BUTTON_COUNT - 1 ){ // User has pressed the change button.
menuPosition++;
if( menuPosition > menuItems + 1 ){ menuPosition = 2; } // If necessary, loop around back to the top item in the menu.
Serial.print(F("changed to ")); Serial.println(menuPosition);
}
else if( buttonPressed == KEYPAD_BUTTON_COUNT ){ // User has pressed the menu/ok button.
Serial.print(F("select!")); Serial.println(menuPosition);
if( menuPosition == 2 ){ // User pressed cancel. This could move the user back to the main menu, but for simplicity, this currently just exits the menu.
state = 255;
stayInMenu = false; // We can now exit the menu.
}
else if( state == MENU_MAIN ){ // Going into sub-menu.
state = menuPosition * 10; // So the first submenu state is 30, the second submenu is 40, etc.
menuPosition = 2; // Reset the cursor position to the top position.
}
else{ // User is in submenu, so they are making their final selection for a new state.
state = state + menuPosition; // If the submenu state was 30, the final states are 32, 33, etc.
stayInMenu = false; // We can now exit the menu.
}
}
else if( buttonPressed == 0 && prevButtonState == KEYPAD_BUTTON_COUNT ){
// Here we display the actual menu items.
oled.clear();
displayNetworkStatus();
oled.set2X();
oled.setCursor(0,0);
oled.print(F("MENU"));
oled.set1X();
oled.setCursor(8,2);
oled.print(F("CANCEL"));
oled.setCursor(8,3);
if( state == MENU_MAIN ){
oled.print(F("NEW"));
oled.setCursor(8,4);
oled.print(F("DELETE LAST"));
oled.setCursor(8,5);
oled.print(F("DELETE ALL"));
}
else if( state == MENU_NEW ){
menuItems = 5; // Cancel + the items below.
oled.print(F("Detect single"));
oled.setCursor(8,4);
oled.print(F("Detect On+Off"));
oled.setCursor(8,5);
oled.print(F("Replay single"));
oled.setCursor(8,6);
oled.print(F("Replay On+Off"));
}
else if( state == MENU_DELETE_LAST || state == MENU_DELETE_ALL){
menuItems = 2; // Cancel + the item below.
oled.print(F("I am sure"));
oled.setCursor(8,4);
}
}
// Add the pointer.
for( byte w = 2; w < 7; w++ ){ // Update the position of the selection cursor on the screen.
oled.setCursor(0,w);
if( menuPosition == w ){
oled.print(F(">"));
}
else{
oled.print(F(" "));
}
}
wait(1);
prevButtonState = buttonPressed;
}
}
#endif
}
//
// RECEIVING DATA FROM THE NETWORK
//
void receive(const MyMessage &message)
{
Serial.print(F("INCOMING MESSAGE for child #")); Serial.println(message.sensor);
if( message.type==V_STATUS ){
Serial.print("-Requested status: "); Serial.println(message.getBool());
if( message.sensor < 10 ){
updateDisplay(REPLAYING);
}
if( (message.sensor == LEARN_SIMPLE_BTN_ID ) && message.getBool() ){ // The user wants to the system to learn a new simple signal. This only starts when the button is toggled to on.
send(textMessage.setSensor(DEVICE_STATUS_ID).set( F("Please play the signal") )); wait(RADIO_DELAY);
state = LEARNING_SIMPLE;
}
else if( (message.sensor == LEARN_ON_OFF_BTN_ID) && message.getBool() ){ // The user wants the system to learn a new on+off signal. This only starts when the button is toggled to on.
send(textMessage.setSensor(DEVICE_STATUS_ID).set( F("Play the ON signal") )); wait(RADIO_DELAY);
state = LEARNING_ON;
}
if( (message.sensor == COPYING_SIMPLE_BTN_ID) && message.getBool() ){ // The user wants to the system to learn a new simple signal. This only starts when the button is toggled to on.
send(textMessage.setSensor(DEVICE_STATUS_ID).set( F("Please play the signal") )); wait(RADIO_DELAY);
state = COPYING_SIMPLE;
}
else if( (message.sensor == COPYING_ON_OFF_BTN_ID) && message.getBool() ){ // The user wants the system to learn a new on+off signal. This only starts when the button is toggled to on.
send(textMessage.setSensor(DEVICE_STATUS_ID).set( F("Play the ON signal") )); wait(RADIO_DELAY);
state = COPYING_ON;
}
else if( message.sensor >= 100 ){ // If the user toggled a signal replay button.
if( buttonsToggleStatus[message.sensor - 99] != message.getBool() ){
Serial.println("-Replaying signal!");
replay(message.sensor - 99);
}
}
updateDisplay(state);
}
}
void printRawSignal() // Prints the entire timings array to the serial output. Useful for debugging.
{
#ifdef DEBUG
Serial.print(F("__printing signal_")); Serial.println(edges+1);
for( int j = startPosition; j <= endPosition; j++ ){
Serial.print(F(",")); Serial.print(timings[j]);
if( j % 16 == 15 ){ Serial.println(); }
}
Serial.println();
#endif
}
void clearTimingsArray()
{
#ifdef DEBUG
Serial.print(F("__Clearing_timings\n-state:")); Serial.println(state);
#endif
memset(timings,0,sizeof(timings)); // Write 0's to timings array.
startPosition = 0;
endPosition = MAXEDGES - 1; //sizeof(timings) - 1;
repeatingPatternLength = 255;
edges = 0 - EDGES_TO_SKIP;
signalstart = 0;
bucketsTotal = 0;
captureFinished = false;
validSignal = true;
bucketCount = 0;
signalstart = micros();
}
void displayNetworkStatus() // Show connection icon on the display
{
#ifdef HAS_SCREEN
oled.set1X();
oled.setCursor(122,0);
if( connectedToNetwork ){
oled.print(F("w"));
}
else{
oled.print(F(" "));
}
#endif
}
int freeRam() {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
// via https://playground.arduino.cc/Code/AvailableMemory
byte keypad4()
{
signed int buttonNumber = (analogRead(KEYPAD_PIN) - 200) * (4 - 0 + 1) / (1024 - 200 + 1) + 0;
buttonNumber = constrain(buttonNumber, 0, 4);
return (byte)buttonNumber;
}
byte keypad12()
{
int analogValue = analogRead(KEYPAD_PIN);
if (analogValue < 450) {
return 0;
} else if (analogValue < 500) {
return 1;
} else if (analogValue < 525) {
return 2;
} else if (analogValue < 555) {
return 3;
} else if (analogValue < 585) {
return 4;
} else if (analogValue < 620) {
return 5;
} else if (analogValue < 660) {
return 6;
} else if (analogValue < 705) {
return 7;
} else if (analogValue < 760) {
return 8;
} else if (analogValue < 820) {
return 9;
} else if (analogValue < 890) {
return 10;
} else if (analogValue < 976) {
return 11;
} else {
return 12;
}
}
/**
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* Copyright (C) 2013-2015 Sensnology AB
* Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
*
* Documentation: http://www.mysensors.org
* Support Forum: http://forum.mysensors.org
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
*
*/
|
c679de182eff1ce89f1d282b23ec1e62b9946192 | 1ff28e913616f314e58c27d35ee9b241bcd60732 | /src/Singleton.h | 1d6bc4833edc018634ce20b73895312b5bf6f3bd | [] | no_license | RobKortowski/Compiler | 6a98ec1fc723085c584f511d6c0c7d26e3ec0c24 | 13d7b34ba60cd9af71f4474ee72b1fd772311ea7 | refs/heads/master | 2021-01-20T02:15:44.888353 | 2017-08-24T16:01:22 | 2017-08-24T16:01:22 | 101,311,710 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,639 | h | Singleton.h | /* by Robert Kortowski 221450@student.pwr.edu.pl */
#ifndef SINGLETON_H
#define SINGLETON_H
#include <map>
#include <vector>
#include <string>
#include "Member.h"
#include "Variable.h"
#include "Expression.h"
#include "Value.h"
#include "Identifier.h"
#include "Line.h"
#include "Condition.h"
#include <cln/cln.h>
class Singleton{
public:
int a;
static Singleton& getInstance();
int addMember(Member*);
Member* getMember(int);
void append(std::string);
void append(std::string, int);
void append(int);
std::vector<Line*> code;
std::map<int, std::vector<Line*>*> points;
std::vector<Line*>* getLines(int);
int addLiteral(cln::cl_I);
cln::cl_I getLiteral(int);
int addName(std::string);
std::string getStringName(int a);
bool nameExists(std::string);
int addVariable(Variable*);
int getNameId(std::string);
Variable* getVariable(int);
int addExpression(Expression*);
Expression* getExpression(int);
int addValue(Value*);
Value* getValue(int);
std::string cmd(std::string, int);
int addIdentifier(Identifier*);
Identifier* getIdentifier(int);
int getEtq();
int addCondition(Condition*);
Condition* getCondition(int);
cln::cl_I getMem();
cln::cl_I getVarsMem(int);
void incrementMem(cln::cl_I);
void loadNumber(cln::cl_I, int);
int getStartingPoint();
private:
int etq;
std::vector<Condition*> conds;
std::vector<Identifier*> idens;
std::vector<Value*> vals;
std::vector<Expression*> exps;
std::vector<Variable*> vars;
std::map<std::string, int> names;
cln::cl_I memCount;
std::vector<cln::cl_I> literals;
std::vector<Member*> members;
Singleton();
Singleton(Singleton const&);
void operator=(Singleton const&);
};
#endif
|
06202980f6e9997a8d38700f27f2513562c1072b | 2c78de0b151238b1c0c26e6a4d1a36c7fa09268c | /common/components/rtl/external/Embarcadero/DelphiBerlin/cpprtl/Source/libcxxabi/win64/seh_unwind/src/unwind_cpp_support.hpp | 78b1dbb8fc7b087f4902f56778133b5fbd633fc3 | [] | no_license | bravesoftdz/realwork | 05a3b308cef59bed8a9efda4212849c391b4b267 | 19b446ce8ad2adf82ab8ce7988bc003221accad2 | refs/heads/master | 2021-06-07T23:57:22.429896 | 2016-11-01T18:30:21 | 2016-11-01T18:30:21 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,701 | hpp | unwind_cpp_support.hpp | /*=============================================================================
C++ EH Integration API
=============================================================================*/
#if !defined(CXXRUNTIME_UNWIND_CPP_SUPPORT_HPP)
#define CXXRUNTIME_UNWIND_CPP_SUPPORT_HPP
#include "../include/unwind.h"
#include "../include/cpp_unwind.hpp"
extern "C" uint64 const __clang_exception_class;
void __init_unwind_exception(_Unwind_Exception& x);
///////////////////////////////////////////////////////////////////////////////
// our own personality routine
extern "C" _Unwind_Reason_Code __seh_cxx_personality_v0(
int version,
_Unwind_Action actions,
uint64 exceptionClass,
struct _Unwind_Exception* exceptionObject,
struct _Unwind_Context* context);
///////////////////////////////////////////////////////////////////////////////
// The callback that ends an SEH filter
extern "C" void __seh_end_filter(unsigned long result, _Unwind_Exception* p);
///////////////////////////////////////////////////////////////////////////////
void __cpp_unwind_exception_cleanup_fn(
_Unwind_Reason_Code reason, struct _Unwind_Exception* exc);
///////////////////////////////////////////////////////////////////////////////
inline __cxa_exception* __to_cpp_exception(_Unwind_Exception* p)
{
return (__cxa_exception*)
(((char*)p)-offsetof(__cxa_exception, unwindHeader));
}
///////////////////////////////////////////////////////////////////////////////
__cxa_exception* __initialize_exception(
void* thrown_exception,
std::type_info* tinfo,
void (*dest)(void*));
///////////////////////////////////////////////////////////////////////////////
extern "C" void __cpp_terminate();
#endif |
03a1b7ff17a6363253cabd0788286589c8431f30 | a31de016611f3b4efc7a576e7113cad1a738419b | /_minimum_valid_path_show.cpp | cc5d4a8cbbb05baf29bfc8f672710a048c44e163 | [] | no_license | Ing-Josef-Klotzner/python | 9d4044d632672fff966b28ab80e1ef77763c78f5 | 3913729d7d6e1b7ac72b46db7b06ca0c58c8a608 | refs/heads/master | 2022-12-09T01:40:52.275592 | 2022-12-01T22:46:43 | 2022-12-01T22:46:43 | 189,040,355 | 0 | 0 | null | 2022-12-01T19:52:37 | 2019-05-28T14:05:16 | Python | UTF-8 | C++ | false | false | 4,100 | cpp | _minimum_valid_path_show.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <tuple>
#define tuple_type int, int, long long int, long long int
using namespace std;
int n, m, k, u, v, w, x, y;
const int maxarr = 500001;
vector <int> adj [maxarr];
bool special [maxarr];
long long int dist [maxarr] [2];
struct state {
int index;
bool isspecial;
long long int dist;
state (int index_, bool flag, long long int dist_) :index (index_), isspecial (flag), dist (dist_)
{}
bool operator < (const state& other) const
{
return dist > other.dist;
}
}; priority_queue <state> pb;
struct edge {
int v, edge_index;
long long int w;
edge (int v_, long long int w_, int index_) :v (v_), w (w_), edge_index (index_) {}
}; vector <edge> edges;
bool iscompatible (int index1, int index2) {
if (index1 == m)
return true;
int a = edges [index1].w, b = edges [index2].w;
if (a > b)
swap (a, b);
return 2 * a >= b;
}
bool dijkstrascheck (state& s) {
if (s.dist < dist [s.index] [s.isspecial]) {
dist [s.index] [s.isspecial] = s.dist;
pb.push (s);
return true;
}
return false;
}
vector <tuple <int, int, long long int, long long int>> path;
long long int dijkstras () {
for (int i = 0; i < maxarr; i++)
for (int j = 0; j < 2; j++)
dist [i][j] = 9223372036854775807;
state s (m, special [x], 0);
dijkstrascheck (s);
while (!pb.empty ()) {
state curr = pb.top ();
pb.pop ();
int vertex = edges [curr.index].v;
if (vertex == y and curr.isspecial)
return curr.dist;
for (int i = 0; i < adj [vertex].size (); i++) {
int index = adj [vertex] [i];
if (!iscompatible (curr.index, index))
continue;
if (special [edges [index].v] and curr.isspecial)
continue;
state s1 (index, (special [edges [index].v] or curr.isspecial), curr.dist + edges [index].w);
if (dijkstrascheck (s1))
path.push_back (make_tuple (edges [index].v, vertex, edges [index].w, curr.dist + edges [index].w));
if (vertex == 26430)// and (curr.dist == 14437 or curr.dist == 14777))
cout << curr.dist << ' ' << vertex << ' ' << edges [curr.index].w << ' ' << edges [index].w << ' ' << edges [index].v << (" ") << s1.index << ' ' << s1.isspecial << ' ' << dist [s1.index][s1.isspecial] << '\n';
}
}
return -1;
}
int main () {
ios_base::sync_with_stdio (false); cin.tie (NULL); cout.tie (NULL);
cin >> n >> m;
for (int i = 0; i < m; i++) {
cin >> u >> v >> w;
adj [u].push_back (edges.size ());
edges.push_back (edge (v, w, edges.size ()));
}
cin >> k;
while (k--) {
cin >> x;
special [x] = true;
}
cin >> x >> y;
edges.push_back (edge (x, 0, m));
long long res = dijkstras ();
cout << res << endl;
int pln = path.size ();
pln--;
cout << get <0> (path [pln]) << ' ' << y << ' ' << pln << '\n';
while (get <0> (path [pln]) != y or get <3> (path [pln]) != res) pln--;
cout << get <0> (path [pln]) << ' ' << y << ' ' << pln << '\n';
tuple <tuple_type> ltp = path [pln];
tuple <tuple_type> tp;
cout << "path reversed from y " << y << " to x " << x << ": " << get <0> (ltp) << ' ';
int total = get <2> (ltp);
int ln = 2;
for (int i = pln - 1; i >= 0; i--) {
tp = path [i]; //get <0> (tp) = get <0> (path [i]); get <1> (tp) = get <1> (path [i]); get <2> (tp) = get <2> (path [i]); get <3> (tp) = get <3> (path [i]);
if (get <0> (tp) == get <1> (ltp) and get <3> (ltp) - get <2> (ltp) == get <3> (tp)) {
ln++;
cout << get <0> (tp) << ' ';
ltp = tp; //get <0> (ltp) = get <0> (tp); get <1> (ltp) = get <1> (tp); get <2> (ltp) = get <2> (tp); get <3> (ltp) = get <3> (tp);
total += get <2> (tp);
}
}
cout << x << '\n' << "path length: " << ln << '\n' << "path distance: " << total << '\n';
} |
0fa75663100ae7749cfcec46517fca8da155b62b | c5743b334b4df9e8f064589a18d6fa6190b88137 | /215.cpp | bc1f186bfd23a61d4b8dfa2013623ff3c824e32e | [] | no_license | linouk23/leetcode | 485232c67c3327a8b11828e67f3a0aa40414a019 | 651a79e23f28cf3fd514e04f201fe42d25260ee0 | refs/heads/master | 2021-01-21T17:23:09.503891 | 2018-08-26T23:21:55 | 2018-08-26T23:21:55 | 85,233,374 | 17 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 1,544 | cpp | 215.cpp | // 215. Kth Largest Element in an Array - https://leetcode.com/problems/kth-largest-element-in-an-array
#include "bits/stdc++.h"
using namespace std;
struct Partition_result {
vector<int> low, high;
int pivot;
};
class Solution {
public:
int get_pivot(vector<int>& nums) {
int n = (int)nums.size() - 1;
vector<int> pivots = {nums[0], nums[n / 2], nums[n]};
sort(pivots.begin(), pivots.end());
return pivots[1];
}
Partition_result partition(vector<int>& nums) {
int pivot = get_pivot(nums);
vector<int> low, high;
for (int& num : nums) {
if (num < pivot) {
low.emplace_back(num);
} else if (num > pivot) {
high.emplace_back(num);
}
}
return {low, high, pivot};
}
int quickSelect(vector<int>& nums, int k) {
auto result = partition(nums);
int n = (int)nums.size();
int low_size = (int)result.low.size();
int high_size = (int)result.high.size();
if (k <= low_size) {
return quickSelect(result.low, k);
} else if (k > n - high_size) {
return quickSelect(result.high,
k - (n - high_size));
} else {
return result.pivot;
}
}
int findKthLargest(vector<int>& nums, int k) {
k = (int)nums.size() - k + 1;
return quickSelect(nums, k);
}
};
int main() {
ios::sync_with_stdio(false);
return 0;
}
|
9c23ffa1ed9273818d2b38fc51cccefd977b2d10 | 51d8409aebbda28795e4173739198019510fb3ae | /CourseWork/SerialPSO/main.cpp | cf6dd2c3df73812632c58eac6d88bdd7314391f1 | [] | no_license | Aggravator/mpi_practika | 8a79fddb15e29b1ab2626b9af04c9a1783805b72 | 988c107b8bb8271f24ff4c8668d09b96318cdb45 | refs/heads/master | 2021-01-13T01:53:53.115860 | 2015-10-23T00:31:51 | 2015-10-23T00:31:51 | 26,479,555 | 0 | 0 | null | null | null | null | IBM852 | C++ | false | false | 6,979 | cpp | main.cpp | #include <iostream>
#include <cstdlib>
#include <vector>
#include <limits>
#include <conio.h>
#include <algorithm>
#include <iomanip>
#include <chrono>
using namespace std;
const double PI = 3.1415926535897932384626433832795;
inline double rndDouble(double min, double max){
return (rand() / double(RAND_MAX))*(max - min) + min;
}
const int dimensionCount = 10;
struct Particle{
double fitness;
double bestFitness;
double pos[dimensionCount];
double velocity[dimensionCount];
double bestPos[dimensionCount];
};
double fitnessFunc(const double *pos){
//Rastrigin's function
/*double temp = 0;
for (int i = 0; i < dimensionCount; ++i)
temp += (pos[i] * pos[i] - 10 * cos(2 * PI*pos[i]));
return 10 * dimensionCount + temp;*/
//Schwefel's function
double temp = 0;
for (int i = 0; i < dimensionCount; ++i)temp += (-pos[i] * sin(sqrt(abs(pos[i]))));
return temp;
}
double fitnessFunc(const Particle &particle){
return fitnessFunc(particle.pos);
}
double posCmp(const double *pos1, const double *pos2){
double temp = 0;
for (int i = 0; i < dimensionCount; ++i)temp += abs(pos2[i]-pos1[i]);
return temp;
}
bool isEqual(double a, double b, double delta){
if (abs(a - b) < delta)return true;
else return false;
}
int main(){
srand(time(0));
int particleCount = 500;
vector<Particle> particles(particleCount);
particles.reserve(particleCount);
double minDimValue=-500, maxDimValue=500;
double c1=2, c2=2;//velocity coefficients personal and global
double w =0.8,wMax=1,wMin=0.7;
double bestFitness,oldBestFitness;
double bestPos[dimensionCount], oldBestPos[dimensionCount];
double *localBestPos;
double delta = 0.001;
double deltaForCdiw=0.0001;
double z;
int repeatCounter;
int bestPosIndex;
int testCount = 0,rightCount=0;
int iteration;
int maxIterations = 1200, maxRepeatedIter = 500;
chrono::high_resolution_clock::time_point t1, t2;
unsigned int sumTime = 0;
again:
t1 = chrono::high_resolution_clock::now();
//Initialize
repeatCounter = 0;
/*do{
z = rndDouble(0.001, 0.999);
} while (isEqual(z, 0.25, deltaForCdiw) || isEqual(z, 0.5, deltaForCdiw) || isEqual(z, 0.75, deltaForCdiw));*/
oldBestFitness=bestFitness = numeric_limits<double>::max();
for (int i = 0; i < particleCount; ++i){
for (int j = 0; j < dimensionCount; ++j){
particles[i].pos[j] = rndDouble(minDimValue, maxDimValue);
//particles[i].velocity[j] = rndDouble(0, (maxDimValue - minDimValue) / 6.0);
}
copy(particles[i].pos, particles[i].pos + dimensionCount, particles[i].bestPos);
fill(particles[i].velocity, particles[i].velocity + dimensionCount, 0);
particles[i].fitness = fitnessFunc(particles[i]);
particles[i].bestFitness = particles[i].fitness;
if (bestFitness>particles[i].fitness){
bestFitness = particles[i].fitness;
copy(particles[i].pos, particles[i].pos + dimensionCount,bestPos);
}
}
copy(bestPos, bestPos + dimensionCount, oldBestPos);
//main cycle
iteration = 0;
bool ju = true;
while (/*iteration < maxIterations &&*/ repeatCounter<maxRepeatedIter || iteration<100*dimensionCount){
++iteration;
bestPosIndex = -1;
//w = wMax - iteration*(wMax - wMin) / double(maxIterations);
w = (wMax - wMin)*(maxIterations - iteration) / maxIterations + wMin;
//z = 4 * z*(1 - z);w = (wMax - wMin)*(maxIterations - iteration) / maxIterations + wMin*z;
for (int i = 0; i < particleCount; ++i){
localBestPos=min({ particles[i], particles[(i + particleCount - 1) % particleCount], particles[(i + particleCount + 1) % particleCount] },
[](const Particle& a,const Particle& b){return a.bestFitness < b.bestFitness; }).bestPos;
//˝hange of velocity and position of particle
for (int j = 0; j < dimensionCount; ++j){
//particles[i].velocity[j] = w*particles[i].velocity[j] + c1*rndDouble(0, 1)*(particles[i].bestPos[j] - particles[i].pos[j]) + c2*rndDouble(0, 1)*(bestPos[j] - particles[i].pos[j]);
particles[i].velocity[j] = w*particles[i].velocity[j] + c1*rndDouble(0, 1)*(particles[i].bestPos[j] - particles[i].pos[j]) + c2*rndDouble(0, 1)*(localBestPos[j] - particles[i].pos[j]);
//particles[i].velocity[j] = 0.729*(particles[i].velocity[j] + 2.05*rndDouble(0, 1)*(particles[i].bestPos[j] - particles[i].pos[j]) + 2.05*rndDouble(0, 1)*(localBestPos[j] - particles[i].pos[j]));
//particles[i].velocity[j] = 0.729*(particles[i].velocity[j] + 2.05*rndDouble(0, 1)*(particles[i].bestPos[j] - particles[i].pos[j]) + 2.05*rndDouble(0, 1)*(bestPos[j] - particles[i].pos[j]));
particles[i].pos[j] += particles[i].velocity[j];
//particle position correction
if (particles[i].pos[j] < minDimValue){
particles[i].pos[j] = minDimValue;
particles[i].velocity[j] = 0;
}
if (particles[i].pos[j] > maxDimValue){
particles[i].pos[j] = maxDimValue;
particles[i].velocity[j] = 0;
}
}
double tfitness = fitnessFunc(particles[i]);
//correction the best position of particle
if (particles[i].bestFitness > tfitness){
copy(particles[i].pos, particles[i].pos + dimensionCount, particles[i].bestPos);
particles[i].bestFitness = tfitness;
}
particles[i].fitness = tfitness;
//search new the best search position
if (tfitness < bestFitness){
bestPosIndex = i;
bestFitness = tfitness;
}
}
//correction the best global position
//if (bestPosIndex != -1) copy(particles[bestPosIndex].pos, particles[bestPosIndex].pos + dimensionCount, bestPos);
//auto worseE = min_element(particles.begin(), particles.end(), [](const Particle& p1, const Particle& p2){return p1.fitness>p2.fitness; });
//cout <<iteration<< ": Best|Worst fitness: " <<setw(13)<< fitnessFunc(bestPos) <<" | "<<setw(13)<<worseE->fitness<< endl;
if (/*posCmp(bestPos,oldBestPos)>delta*/abs(bestFitness-oldBestFitness)>delta){
repeatCounter = 0;
//copy(bestPos, bestPos + dimensionCount, oldBestPos);
oldBestFitness = bestFitness;
}
else ++repeatCounter;
if (maxIterations < iteration + 2)maxIterations += 40;
}
t2 = chrono::high_resolution_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1).count()/1000000.0;
sumTime += std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1).count();
cout << "Launch #: " << testCount << endl;
cout << "Best position: [ "<<setprecision(5)<<bestPos[0];
for (int i = 1; i < dimensionCount; ++i)cout << ", " << bestPos[i];
cout << "]" << endl;
cout << "Best fitness: " << bestFitness << endl;
cout << "Time: " << duration<<endl;
cout << "Iterations: " << iteration << endl;
cout << "Avg answers: " << double(rightCount) / testCount << endl;
cout << "---------------------------------------" << endl;
if (abs(bestFitness + dimensionCount*418.9829) < 0.1)rightCount += 1;
++testCount;
if (testCount<500) goto again;
cout << "Launch count: " << testCount<<endl;
cout << "Right answers: " << rightCount <<" | "<<double(rightCount)/testCount<< endl;
cout << "Average time: " << (sumTime / double(testCount)) / 1000000.0 << endl;
getch();
} |
4c720ce1cc079162b1c13d1a59e8d5e193dcb31c | 5a00d240240a763913c86ea4813e1d3b7f40bd3e | /hwdep.cpp | 756c175964bcbcacefaad2fb6813476185e8c94e | [] | no_license | neophack/Arduino-GPS-NTP-Server | b904984e0bfd95ef0c4e7d322114521aa2f879af | 2b2392532cc970e37eb906c3674ac1f78a50917d | refs/heads/master | 2021-05-27T12:14:57.511631 | 2013-08-07T14:58:03 | 2013-08-07T14:58:03 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,085 | cpp | hwdep.cpp | #include "hwdep.h"
#include "gps.h"
#include "lcd.h"
char pps_int = 0;
#ifdef SIMULATE
#include <stdlib.h>
struct _timer_struct timer;
/* Set up for 1:1 divisor and 1 interrupt per 65536 */
void timer_init() {
timer.counter = 0;
timer.top = MAX_TIMER_VAL;
timer.prediv_count = 0;
timer.prediv = PREDIV;
}
void timer_set_interval(unsigned short top) {
timer.top = top - 1;
}
unsigned short timer_get_interval() {
return timer.top + 1;
}
extern void timer_int();
void gps_init() {
return; /* XXX unimplemented */
}
#define GPS_CYCLES (32000000L + 3L)
//#define GPS_CYCLES (32000000L - 3L)
static uint32 gps_clk = GPS_CYCLES / 64;
void sim_clk() {
timer.prediv_count ++;
if (timer.prediv_count == timer.prediv) {
timer.prediv_count = 0;
timer.counter++;
if (timer.counter > timer.top) {
timer.counter = 0;
timer_int();
}
}
gps_clk += 2;
if (gps_clk >= GPS_CYCLES) {
gps_clk -= GPS_CYCLES;
#ifdef LCD
lcd_set_displaydate(2012, 7, 4, 12, 34, 56, -15);
lcd_set_gps_status(4);
#endif
timer.capture = timer.counter;
time_get_ns_capt();
pps_int = 1;
}
}
#else
static volatile int timer_ready = 0;
extern void timer_int();
void int4();
void timer_init() {
pinMode(49, INPUT);
pinMode(2, INPUT);
// TCCR4A = _BV(COM4A1) | _BV(COM4A0);
// TCCR4A = 0;
TCCR4A = 0;
PORTH &= ~_BV(PORTH4);
TCCR4B = _BV(CS41) | _BV(WGM42) | _BV(ICES4);
TIMSK4 = _BV(OCIE4A) | _BV(ICIE4) | _BV(TOIE4);
timer_set_interval(DEF_TIMER_VAL);
timer_ready = 1;
}
ISR(TIMER4_COMPA_vect) {
TIFR4 |= _BV(ICF4);
if (timer_ready)
timer_int();
}
ISR(TIMER4_OVF_vect) {
if (timer_ready) {
Serial.println("OVF");
/* Handle an overrun nicely */
}
}
ISR(TIMER4_CAPT_vect) {
time_get_ns_capt();
pps_int = 1;
}
void timer_set_interval(unsigned short top) {
OCR4A = top - 1;
}
unsigned short timer_get_interval() {
return OCR4A + 1;
}
void gps_set_nmea_reporting();
void gps_init() {
GPSPORT.begin(4800);
// gps_set_nmea_reporting();
gps_set_sirf();
gps_enable_dgps();
}
#endif
|
775f5b64693517b94489fdfd7fd1bb9c9d43ffdc | 356600c46576d20bb5f49f2576da45baef0b2886 | /GithubWeek4.cpp | 98aa93cbbd7490ffd30c7c39d7a62986457a9253 | [] | no_license | jjpardo89/Week4 | 5f6408fb2c205f78ec45c774923f71380e0fca29 | b55fddb419a3fa1b09dfd924e3d6eddc6672f2e0 | refs/heads/main | 2023-04-10T12:37:01.638753 | 2021-04-08T23:59:06 | 2021-04-08T23:59:06 | 356,078,649 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,928 | cpp | GithubWeek4.cpp |
#include <iostream>
#include <string>
#include <fstream>
#include <cstring>
int main(int argc, char* argv[])
{
if (argc < 2)
{
std::cout << "\nError with input args...\n" << std::endl;
return 1;
}
// For debugging purposes only
for (int i = 0; i < argc; i++)
{
std::cout << i << ":" << argv[i] << std::endl;
}
std::ifstream inFile;
inFile.open(argv[1]);
if (!inFile)
{
std::cout << "Error With File Name" << std::endl;
return 1;
}
// Main program banner / title output on initial launch
std::cout << "\n**********************************************************";
std::cout << "\n************Welcome to my Letter Count Program************";
std::cout << "\n**********************************************************";
std::cout << "\nAnalyzing File: '" << argv[1] << "'";
//Declaring each character counter and setting them at the start to be 0.
int cntA = 0, cntE = 0, cntI = 0, cntO = 0, cntU = 0, cntR = 0, cntT = 0, cntS = 0, total;
// Declaring 'letter' to define each vowel. Since we need to count only 1 character at a time, we will declare letter as char to provide proper, indivisual calculations
char letter;
inFile.get(letter);
// Looping through the file, Constitution_of_the_United_States.txt, until each vowel is counted.
while (inFile)
{
// Looping through 'A' and 'a'
if (letter == 'A' || letter == 'a')
{
cntA++;
}
// Looping through 'E' and 'e'
if (letter == 'E' || letter == 'e')
{
cntE++;
}
// Looping through 'I' and 'i'
if (letter == 'I' || letter == 'i')
{
cntI++;
}
// Looping through 'O' and 'o'
if (letter == 'O' || letter == 'o')
{
cntO++;
}
// Looping through 'U' and 'u'
if (letter == 'U' || letter == 'u')
{
cntU++;
}
// Looping through 'R' and 'r'
if (letter == 'R' || letter == 'r')
{
cntR++;
}
// Looping through 'T' and 't'
if (letter == 'T' || letter == 't')
{
cntT++;
}
// Looping through 'S' and 's'
if (letter == 'S' || letter == 's')
{
cntS++;
}
// Function to grab / count each vowel in the file 'Constitution_of_the_United_States.txt'
inFile.get(letter);
}
//
// End of indivisual 'letter' calculations
//
// Displaying each vowel's total
std::cout << "\nThe number of A's: ........................................." << cntA;
std::cout << "\nThe number of E's: ........................................." << cntE;
std::cout << "\nThe number of I's: ........................................." << cntI;
std::cout << "\nThe number of O's: ........................................." << cntO;
std::cout << "\nThe number of U's: ........................................." << cntU;
std::cout << "\nThe number of R's: ........................................." << cntR;
std::cout << "\nThe number of T's: ........................................." << cntT;
std::cout << "\nThe number of S's: ........................................." << cntS;
// Calculation of ALL the total vowels
total = cntA + cntE + cntI + cntO + cntU + cntR + cntT + cntS;
// Display the final total based on the total vowel count
std::cout << "\nThe vowel count is (+ R, S, T): ............................." << total;
std::cout << "\n Press any key to continue";
letter = getchar();
// Close the file, 'Constitution_of_the_United_States.txt'
inFile.close();
// Ending the program
return 0;
}
|
8dd6821ff57b5d8cd0b6c05729b8be71f1b5d97e | 0eff74b05b60098333ad66cf801bdd93becc9ea4 | /second/download/CMake/CMake-gumtree/Kitware_CMake_repos_log_153.cpp | b44362e43d592463a9ebbc7bde1104076f1b7696 | [] | 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 | 40 | cpp | Kitware_CMake_repos_log_153.cpp | size = snprintf(buffer, size, "WinSSL"); |
efef3e2caa4a3e9113bee899e6185f0e3cad61dd | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /mindspore/lite/src/litert/delegate/npu/op/arithmetic_self_npu.cc | e1b461f024950c152989c14b983289c375847ec9 | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MPL-1.0",
"OpenSSL",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause-Open-MPI",
"MIT",
"MPL-2.0-no-copyleft-exception",
"NTP",
"BSD-3-Clause",
"GPL-1.0-or-later",
"0BSD",
"MPL-2.0",
"LicenseRef-scancode-f... | permissive | mindspore-ai/mindspore | ca7d5bb51a3451c2705ff2e583a740589d80393b | 54acb15d435533c815ee1bd9f6dc0b56b4d4cf83 | refs/heads/master | 2023-07-29T09:17:11.051569 | 2023-07-17T13:14:15 | 2023-07-17T13:14:15 | 239,714,835 | 4,178 | 768 | Apache-2.0 | 2023-07-26T22:31:11 | 2020-02-11T08:43:48 | C++ | UTF-8 | C++ | false | false | 5,776 | cc | arithmetic_self_npu.cc | /**
* Copyright 2020-2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "src/litert/delegate/npu/op/arithmetic_self_npu.h"
#include <string>
namespace mindspore::lite {
template <typename T>
ge::Operator *CreateOperator(const std::string &name) {
auto op = new (std::nothrow) T(name);
if (op == nullptr) {
MS_LOG(ERROR) << name << " op is nullptr";
return nullptr;
}
return op;
}
int ArithmeticSelfNPUOp::Init(const schema::Primitive *primitive, const std::vector<mindspore::MSTensor> &in_tensors,
const std::vector<mindspore::MSTensor> &out_tensors) {
switch (type_) {
case schema::PrimitiveType_Cos:
op_ = CreateOperator<hiai::op::Cos>(name_);
break;
case schema::PrimitiveType_Log:
op_ = CreateOperator<hiai::op::Log>(name_);
break;
case schema::PrimitiveType_Square:
op_ = CreateOperator<hiai::op::Square>(name_);
break;
case schema::PrimitiveType_Sqrt:
op_ = CreateOperator<hiai::op::Sqrt>(name_);
break;
case schema::PrimitiveType_Rsqrt:
op_ = CreateOperator<hiai::op::Rsqrt>(name_);
break;
case schema::PrimitiveType_Sin:
op_ = CreateOperator<hiai::op::Sin>(name_);
break;
case schema::PrimitiveType_LogicalNot:
op_ = CreateOperator<hiai::op::LogicalNot>(name_);
break;
case schema::PrimitiveType_Floor:
op_ = CreateOperator<hiai::op::Floor>(name_);
break;
case schema::PrimitiveType_Ceil:
op_ = CreateOperator<hiai::op::Ceil>(name_);
break;
case schema::PrimitiveType_Round:
op_ = CreateOperator<hiai::op::Round>(name_);
break;
case schema::PrimitiveType_Neg:
op_ = CreateOperator<hiai::op::Neg>(name_);
break;
case schema::PrimitiveType_Reciprocal:
op_ = CreateOperator<hiai::op::Reciprocal>(name_);
break;
case schema::PrimitiveType_ExpFusion:
op_ = CreateOperator<hiai::op::Exp>(name_);
break;
default:
MS_LOG(ERROR) << "Unsupported primitive type: " << schema::EnumNamePrimitiveType(type_);
return RET_ERROR;
}
if (op_ == nullptr) {
MS_LOG(ERROR) << "Arithmetic self create operator return nullptr.";
return RET_ERROR;
}
return RET_OK;
}
template <typename T>
void SetInputs(const std::vector<ge::Operator *> &npu_inputs, ge::Operator *op) {
auto cur_op = reinterpret_cast<T *>(op);
cur_op->set_input_x(*npu_inputs[0]);
return;
}
int ArithmeticSelfNPUOp::SetNPUInputs(const std::vector<mindspore::MSTensor> &in_tensors,
const std::vector<mindspore::MSTensor> &out_tensors,
const std::vector<ge::Operator *> &npu_inputs) {
switch (type_) {
case schema::PrimitiveType_Cos:
SetInputs<hiai::op::Cos>(npu_inputs, op_);
break;
case schema::PrimitiveType_Log:
SetInputs<hiai::op::Log>(npu_inputs, op_);
break;
case schema::PrimitiveType_Square:
SetInputs<hiai::op::Square>(npu_inputs, op_);
break;
case schema::PrimitiveType_Sqrt:
SetInputs<hiai::op::Sqrt>(npu_inputs, op_);
break;
case schema::PrimitiveType_Rsqrt:
SetInputs<hiai::op::Rsqrt>(npu_inputs, op_);
break;
case schema::PrimitiveType_Sin:
SetInputs<hiai::op::Sin>(npu_inputs, op_);
break;
case schema::PrimitiveType_LogicalNot:
SetInputs<hiai::op::LogicalNot>(npu_inputs, op_);
break;
case schema::PrimitiveType_Floor:
SetInputs<hiai::op::Floor>(npu_inputs, op_);
break;
case schema::PrimitiveType_Ceil:
SetInputs<hiai::op::Ceil>(npu_inputs, op_);
break;
case schema::PrimitiveType_Round:
SetInputs<hiai::op::Round>(npu_inputs, op_);
break;
case schema::PrimitiveType_Neg:
SetInputs<hiai::op::Neg>(npu_inputs, op_);
break;
case schema::PrimitiveType_Reciprocal:
SetInputs<hiai::op::Reciprocal>(npu_inputs, op_);
break;
case schema::PrimitiveType_ExpFusion:
SetInputs<hiai::op::Exp>(npu_inputs, op_);
break;
default:
MS_LOG(ERROR) << "SetInputs for npu op " << name_ << " failed.";
return RET_ERROR;
}
return RET_OK;
}
int ArithmeticSelfNPUOp::SetNPUInputs(
const std::vector<mindspore::MSTensor> &in_tensors, const std::vector<mindspore::MSTensor> &out_tensors,
const std::vector<ge::Operator *> &npu_inputs,
const std::unordered_map<int, std::pair<ge::Operator *, int>> &index2_multi_out_index) {
auto ret = SetNPUInputs(in_tensors, out_tensors, npu_inputs);
if (ret != RET_OK) {
MS_LOG(ERROR) << "ArithmeticSelfNPUOp SetNPUInputs failed";
return RET_ERROR;
}
if (index2_multi_out_index.empty()) {
return RET_OK;
}
for (auto it : index2_multi_out_index) {
MS_LOG(INFO) << name_ << "set input " << it.first << " from " << it.second.first << " output " << it.second.second;
CHECK_LESS_RETURN(npu_inputs.size(), 1);
op_->SetInput(it.first, *it.second.first, it.second.second);
}
return RET_OK;
}
ge::Operator *ArithmeticSelfNPUOp::GetNPUOp() { return this->op_; }
ArithmeticSelfNPUOp::~ArithmeticSelfNPUOp() {
if (op_ != nullptr) {
delete op_;
op_ = nullptr;
}
}
} // namespace mindspore::lite
|
60ba4515ecda30a4dfde88e4dc9323ac043f8450 | 59b5fc014641eeac6c3da577201a6866bb1c62bc | /Emmanumdraft45.cpp | 6567eb1742b936ebe67f4a9a4e08ebab51722ff8 | [] | no_license | ehartman4/Algorithms | cb4077022e0694a908cd5e3a1abe42ae145f25ec | 8f5d1c7457037a44b8dba2a43e0fd1add6a9c1a1 | refs/heads/master | 2021-01-15T14:31:45.977177 | 2012-12-10T17:00:31 | 2012-12-10T17:00:31 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,167 | cpp | Emmanumdraft45.cpp | #include <iostream>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <list>
using namespace std;
class binary{
public:
int num;
int numlist[];
int numlength;
int numover;
int size;
string strnum;
binary chop();
binary dechop(binary);
int decimal();
binary back();
binary operator= (int);
binary operator+ (binary);
binary& operator+= (binary);
int addbi(int,int);
friend ostream& operator<< (ostream&, binary);
friend istream& operator>> (istream&, binary&);
};
int binary::decimal()
{
int bin = strnum.length()-1;
int dec = 0;
int column = 1;
int a;
string g;
const char* t;
while (bin>=0){
g = strnum[bin];
a = atoi(g.c_str());
dec += column*a;
bin -= 1;
column *= 2;
}
return dec;
}
binary binary::back(int input)
{
str next;
int input = input;
if (input%2==1){
next = '1'
}
}
ostream& operator<< (ostream& co, binary b)
{
co<<b.strnum;
return co;
}
istream& operator>> (istream& ci, binary& b)
{
ci >> b.strnum;
//b.chop();
return ci;
}
binary binary::chop()
{
numlist[strnum.length()];
for (int i = 0; i < strnum.length(); ++i)
{
const char* t = &strnum[i];
numlist[i] = atoi(t);
}
size = strnum.length();
}
/*
binary binary::dechop(binary b)
{
if (b.numover>10){
b.strnum = string x = strnum.substr(strnum.length()-10);
string y = strnum.substr(0,strnum.length()-10);
b.num = atoi(x.c_str());
b.numover = atoi(y.c_str());
}
else {
b.num = atoi(strnum.c_str());
b.numover=0;
}
}
*/
binary binary::operator= (int right)
{
num = right;
}
binary& binary::operator+= (binary right)
{
int one = decimal();
int two = right.decimal();
num = one + two;
}
binary binary::operator+ (binary twonum)
{
int one = decimal();
int two = twonum.decimal();
binary sum;
int three = one + two;
sum.num = three;
return sum;
};
int main(){
binary one,two;
cin >>one;
cin>>two;
cout<<one<<endl;
cout<<one.decimal()<<endl;
/*
binary three = one+two;
cout<<"three: "<<three<<endl;
cout<<"three+two: "<<three+two<<endl;
three +=two;
cout<<"new three: "<<three<<endl;
one = one + two;
cout<<"one"<<one<<endl;
cout<<two<<" equals "<<two.decimal()<<endl;
*/
} |
71aca4e9948e40f7241b8ffa230e01f9e198ce2d | 1bbcff5e96aa6e5322608063e11e72277e08e5f3 | /l5.cpp | 91aa6706cfd32bff9e201ace2709b530a510e8cd | [] | no_license | Ash-HeLiX/Lesson-G2 | 48ac83ef9c0a71e3e2156a81958deb28516273a7 | 80aeb1b17373969b8976b087f78604800ba91955 | refs/heads/master | 2023-02-15T04:56:52.941405 | 2018-07-29T05:52:44 | 2018-07-29T05:52:44 | null | 0 | 0 | null | null | null | null | WINDOWS-1251 | C++ | false | false | 950 | cpp | l5.cpp | //Библиотечная функция islower() принимает в качестве аргумента один символ (букву)
//и возвращает ненулевое целое значение в том случае, если буква является строчной,
//и нулевое, если буква является заглавной. Опи- сание функции хранится в файле CTYPE.H.
//Напишите программу, которая принимает букву от пользователя, а затем выводит нулевое
//или ненулевое значение в зависимости от того, является ли буква строчной или нет.
#include <iostream>
#include <ctype.h>
using namespace std;
int main()
{
char var;
int islower(int var);
cout << "Enter : " ;
cin >> var;
cout << islower(var);
}
|
eacc4502a1bf1b2180b72089885bfedbfb3d1fd0 | 78297bc868d588dd7a16cfea059ef7365ba18622 | /server/api/src/rsFileRename.cpp | cdb93d5c9aa3c1ad4979604159a48dde25d0819d | [
"BSD-3-Clause"
] | permissive | irods/irods | ab72a41fdf05a4a905c3e3a97bb7ba3c2a6ae52d | f3ccaa842218e477395ebcf553639134433b63ee | refs/heads/main | 2023-09-01T20:12:33.322002 | 2023-08-23T18:22:59 | 2023-08-31T13:41:31 | 14,724,975 | 381 | 167 | NOASSERTION | 2023-09-11T18:18:14 | 2013-11-26T18:10:18 | C++ | UTF-8 | C++ | false | false | 4,002 | cpp | rsFileRename.cpp | /*** Copyright (c), The Regents of the University of California ***
*** For more information please refer to files in the COPYRIGHT directory ***/
/* rsFileRename.c - server routine that handles the fileRename
* API
*/
/* script generated code */
#include "irods/fileRename.h"
#include "irods/miscServerFunct.hpp"
#include "irods/fileOpr.hpp"
#include "irods/dataObjOpr.hpp"
#include "irods/physPath.hpp"
#include "irods/rsFileRename.hpp"
// =-=-=-=-=-=-=-
#include "irods/irods_log.hpp"
#include "irods/irods_file_object.hpp"
#include "irods/irods_stacktrace.hpp"
#include "irods/irods_resource_backport.hpp"
int
rsFileRename(
rsComm_t *rsComm,
fileRenameInp_t* fileRenameInp,
fileRenameOut_t** rename_out ) {
rodsServerHost_t* rodsServerHost;
int remoteFlag;
int status;
//remoteFlag = resolveHost (&fileRenameInp->addr, &rodsServerHost);
irods::error ret = irods::get_host_for_hier_string( fileRenameInp->rescHier, remoteFlag, rodsServerHost );
if ( !ret.ok() ) {
irods::log( PASSMSG( "failed in call to irods::get_host_for_hier_string", ret ) );
return -1;
}
if ( remoteFlag == LOCAL_HOST ) {
status = _rsFileRename( rsComm, fileRenameInp, rename_out );
}
else if ( remoteFlag == REMOTE_HOST ) {
status = remoteFileRename( rsComm, fileRenameInp, rename_out, rodsServerHost );
}
else {
if ( remoteFlag < 0 ) {
return remoteFlag;
}
else {
rodsLog( LOG_NOTICE, "rsFileRename: resolveHost returned unrecognized value %d",
remoteFlag );
return SYS_UNRECOGNIZED_REMOTE_FLAG;
}
}
return status;
}
int
remoteFileRename(
rsComm_t* rsComm,
fileRenameInp_t* fileRenameInp,
fileRenameOut_t** rename_out,
rodsServerHost_t* rodsServerHost ) {
int status;
if ( rodsServerHost == NULL ) {
rodsLog( LOG_NOTICE,
"remoteFileRename: Invalid rodsServerHost" );
return SYS_INVALID_SERVER_HOST;
}
if ( ( status = svrToSvrConnect( rsComm, rodsServerHost ) ) < 0 ) {
return status;
}
status = rcFileRename( rodsServerHost->conn, fileRenameInp, rename_out );
if ( status < 0 ) {
rodsLog( LOG_NOTICE,
"remoteFileRename: rcFileRename failed for %s",
fileRenameInp->newFileName );
}
return status;
}
// =-=-=-=-=-=-=-
// local function which makes the call to rename via the resource plugin
int _rsFileRename(
rsComm_t* _comm,
fileRenameInp_t* _rename_inp,
fileRenameOut_t** _rename_out ) {
// =-=-=-=-=-=-=-
// FIXME: need to check resource permission and vault permission
// when RCAT is available
// mkDirForFilePath( _comm, "/", _rename_inp->newFileName, getDefDirMode () ); - The actual file path depends on the resource
// =-=-=-=-=-=-=-
// make the call to rename via the resource plugin
irods::file_object_ptr file_obj(
new irods::file_object(
_comm,
_rename_inp->objPath,
_rename_inp->oldFileName,
_rename_inp->rescHier,
0, 0, 0 ) );
irods::error rename_err = fileRename( _comm, file_obj, _rename_inp->newFileName );
// =-=-=-=-=-=-=-
// report errors if any
if ( !rename_err.ok() ) {
std::stringstream msg;
msg << "fileRename failed for [";
msg << _rename_inp->oldFileName;
msg << "] to [";
msg << _rename_inp->newFileName;
msg << "]";
irods::error err = PASSMSG( msg.str(), rename_err );
irods::log( err );
}
// =-=-=-=-=-=-=-
// percolate possible change in phy path up
( *_rename_out ) = ( fileRenameOut_t* ) malloc( sizeof( fileRenameOut_t ) );
snprintf(
( *_rename_out )->file_name, sizeof( ( *_rename_out )->file_name ),
"%s", file_obj->physical_path().c_str() );
return rename_err.code();
} // _rsFileRename
|
c3b7ce28291a3fc80a145f7ba64a38e0dae63722 | fba63f42f74fef170d5346c944413441c8c7c4c6 | /kmp_get_next/kmp_get_next.cpp | 38817ff0bba2e2abc499898f39ee63635d6a8e31 | [] | no_license | insozhao/kmp_get_next | bd0932e2a8914c9b1cc15fe31a9198aabffe8940 | 2a9407265c4de876b02b9498a4967c258861af0e | refs/heads/master | 2022-01-20T06:15:27.613749 | 2019-07-22T02:44:13 | 2019-07-22T02:44:13 | 198,124,551 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 584 | cpp | kmp_get_next.cpp | // kmp_get_next.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <stdlib.h>
#include <string.h>
void get_next(char *p, int *next);
void main()
{
char str[] = "aabaabaaa";
int *next = (int *)malloc(sizeof(int)*strlen(str));
get_next(str, next);
for (int i = 0; i < strlen(str); i++)
{
printf("%d", next[i]);
}
system("pause");
}
void get_next(char *p, int *next){
int slen = strlen(p);
next[0] = 0;
for (int j = 0, i = 1; i < slen;i++)
{
while (j>0 && p[j] != p[i])
j = next[j - 1];
if (p[i] == p[j])
j++;
next[i] = j;
}
} |
676ff71311c8e96e1d941690e473f47c53daac67 | f65d6c358eaf15c32a08aabb31ab9660d4d28742 | /ShadesOfNight/Source/SampleText/DroneController.cpp | cb013c7053af621137a92a1256eec0f4e4fd89e3 | [] | no_license | Migzus/project-night | bf3cb80166f090640a931ae5802d9b1db6d8c79a | 3d848203200ea0e9d26c65c6ba48f6409f272271 | refs/heads/master | 2022-09-19T04:15:22.617118 | 2020-05-28T17:59:29 | 2020-05-28T17:59:29 | 242,973,308 | 0 | 0 | null | 2020-03-31T15:44:18 | 2020-02-25T10:33:03 | null | UTF-8 | C++ | false | false | 3,002 | cpp | DroneController.cpp | // Fill out your copyright notice in the Description page of Project Settings.
#include "DroneController.h"
#include "Components/BoxComponent.h"
#include "Components/StaticMeshComponent.h"
#include "PlayerMovement.h"
#include "DrawDebugHelpers.h"
#include "HomingMissile.h"
#include "TimerManager.h"
// Sets default values
ADroneController::ADroneController()
{
// Set this pawn to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
CreateDefaultSubobject<UBoxComponent>("Detection Zone");
DroneMesh = CreateDefaultSubobject<UStaticMeshComponent>("Drone Root");
//BoxComponent = CreateDefaultSubobject<UBoxComponent>("Movement Component");
}
// Called when the game starts or when spawned
void ADroneController::BeginPlay()
{
Super::BeginPlay();
GetWorldTimerManager().SetTimer(SpawnRate, this, &ADroneController::SpawnMissile, 0.0f, false, MissileCooldown);
/*TSubclassOf<UBoxComponent> _BoxCollider;
TArray<UBoxComponent*> _DetectionZone{ GetComponentsByTag(_BoxCollider, "DetectionZone") };
for (auto Box : _DetectionZone)
{
Box->OnComponentBeginOverlap.AddDynamic(this, &ADroneController::OnOverlapEnter);
}
TSubclassOf<UStaticMeshComponent> _Mesh;
TArray<UStaticMeshComponent*> _DroneComponent{ GetComponentsByTag(_Mesh, "DroneRoot") };
DroneMesh = _DroneComponent[0];*/
}
void ADroneController::OnOverlapEnter(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
{
APlayerMovement* _Player = Cast<APlayerMovement>(OtherActor);
if (_Player)
{
Player = _Player;
bIsSeekingPlayer = true;
}
}
// Called every frame
void ADroneController::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
if (bIsSeekingPlayer)
{
if (IsPlayerInSight())
{
if (CurrentMissile == nullptr)
{
}
}
}
}
bool ADroneController::IsPlayerInSight() const
{
FHitResult _Hit;
FVector _Start{ GetActorLocation() };
FVector _End{ Player->GetActorLocation() };
ECollisionChannel _Ground{ ECollisionChannel::ECC_WorldStatic };
FCollisionQueryParams _Params{ FCollisionQueryParams() };
_Params.AddIgnoredActor(this);
DrawDebugLine(GetWorld(), _Start, _End, FColor::Red, false, 0.1f, 0, 6.0f);
bool _Statement{ GetWorld()->LineTraceSingleByChannel(_Hit, _Start, _End, _Ground, _Params) };
return _Statement;
}
void ADroneController::SpawnMissile()
{
FActorSpawnParameters _ActorParams{};
_ActorParams.Owner->SetActorLocation(GetActorLocation());
_ActorParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
AHomingMissile* _NewMissile{ GetWorld()->SpawnActor<AHomingMissile>(MissilePrefab, _ActorParams) };
if (_NewMissile)
{
_NewMissile->SetTarget<APlayerMovement>(Player);
CurrentMissile = _NewMissile;
}
}
|
1bbf248f688e8c7b56e9a7427d62eeb5b900aa69 | cf26fab850b5ae23bf614095362d92d711f1693b | /Yan-Kim-p3/pwd.cpp | fe2bd863cb8161430baf3d4a5f7c05a9327ba2d1 | [] | no_license | olveryu/CSCI1730-system-programming | 61d443bdeb77085ab782a60a70748e7cf2356ebd | f3b6ea8db13dbafa0a8f30d6d35ae598dc0cfb3e | refs/heads/master | 2021-07-12T02:30:41.143961 | 2017-10-12T21:48:19 | 2017-10-12T21:48:19 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 373 | cpp | pwd.cpp |
#include <unistd.h>
#include <stdio.h>
#include <cstdlib>
int main() {
char cwd[1024];
if (getcwd(cwd, sizeof(cwd)) != NULL){ //Gets the current working directory
fprintf(stdout,"%s\n", cwd); //Prints out the full path to the current working directory
}else{
perror("getcwd() error"); //Prints out error elsewise
}
return EXIT_SUCCESS;
}
|
114b180633e83c134467a6a6046b7db5c6af03df | bed3ac926beac0f4e0293303d7b2a6031ee476c9 | /Modules/Core/Common/test/itkOptimizerParametersGTest.cxx | 6a95dc35a89c07bb71e981326656f6bb600e919b | [
"IJG",
"Zlib",
"LicenseRef-scancode-proprietary-license",
"SMLNJ",
"BSD-3-Clause",
"BSD-4.3TAHOE",
"LicenseRef-scancode-free-unknown",
"Spencer-86",
"LicenseRef-scancode-llnl",
"FSFUL",
"Libpng",
"libtiff",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-other-permissive",
... | permissive | InsightSoftwareConsortium/ITK | ed9dbbc5b8b3f7511f007c0fc0eebb3ad37b88eb | 3eb8fd7cdfbc5ac2d0c2e5e776848a4cbab3d7e1 | refs/heads/master | 2023-08-31T17:21:47.754304 | 2023-08-31T00:58:51 | 2023-08-31T14:12:21 | 800,928 | 1,229 | 656 | Apache-2.0 | 2023-09-14T17:54:00 | 2010-07-27T15:48:04 | C++ | UTF-8 | C++ | false | false | 2,721 | cxx | itkOptimizerParametersGTest.cxx | /*=========================================================================
*
* Copyright NumFOCUS
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0.txt
*
* 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.
*
*=========================================================================*/
// First include the header file to be tested:
#include "itkOptimizerParameters.h"
#include <gtest/gtest.h>
#include <algorithm> // For count and equal.
#include <array>
#include <vector>
// Tests constructing OptimizerParameters of the specified size and initial value.
TEST(OptimizerParameters, ConstructWithSpecifiedSizeAndInitialValue)
{
using OptimizerParametersType = itk::OptimizerParameters<double>;
for (double initialValue{ -1.0 }; initialValue <= 1.0; ++initialValue)
{
EXPECT_EQ(OptimizerParametersType(0, initialValue).size(), 0);
for (size_t size{ 1 }; size <= 4; ++size)
{
const OptimizerParametersType optimizerParameters(size, initialValue);
EXPECT_EQ(optimizerParameters.size(), size);
EXPECT_EQ(std::count(optimizerParameters.begin(), optimizerParameters.end(), initialValue), size);
}
}
}
// Tests constructing OptimizerParameters with the specified data and size.
TEST(OptimizerParameters, ConstructWithSpecifiedDataAndSize)
{
using OptimizerParametersType = itk::OptimizerParameters<double>;
// First test for size = zero.
EXPECT_EQ(OptimizerParametersType(std::vector<double>{}.data(), 0), OptimizerParametersType{});
EXPECT_EQ(OptimizerParametersType(std::array<double, 0>().data(), 0), OptimizerParametersType{});
// Test for an arbitrary size:
const auto testConstructOptimizerParameters = [](const double * const inputData, const itk::SizeValueType dimension) {
const OptimizerParametersType optimizerParameters(inputData, dimension);
ASSERT_EQ(optimizerParameters.size(), dimension);
EXPECT_TRUE(std::equal(optimizerParameters.begin(), optimizerParameters.end(), inputData));
};
testConstructOptimizerParameters(std::array<double, 1>().data(), 1);
testConstructOptimizerParameters(std::vector<double>{ 1.0 }.data(), 1);
const std::vector<double> stdVector{ 1.0, 2.0, 4.0 };
testConstructOptimizerParameters(stdVector.data(), stdVector.size());
}
|
030bc5c7ac67f18acdbab2586deacd725fc13199 | 0225a1fb4e8bfd022a992a751c9ae60722f9ca0d | /indexer/altitude_loader.cpp | f63b5b9511aecff34b92432ebb42f296b3a4b0a5 | [
"Apache-2.0"
] | permissive | organicmaps/organicmaps | fb2d86ea12abf5aab09cd8b7c55d5d5b98f264a1 | 76016d6ce0be42bfb6ed967868b9bd7d16b79882 | refs/heads/master | 2023-08-16T13:58:16.223655 | 2023-08-15T20:16:15 | 2023-08-15T20:16:15 | 324,829,379 | 6,981 | 782 | Apache-2.0 | 2023-09-14T21:30:12 | 2020-12-27T19:02:26 | C++ | UTF-8 | C++ | false | false | 3,674 | cpp | altitude_loader.cpp | #include "indexer/altitude_loader.hpp"
#include "indexer/mwm_set.hpp"
#include "coding/reader.hpp"
#include "coding/succinct_mapper.hpp"
#include "base/logging.hpp"
#include "base/stl_helpers.hpp"
#include "base/thread.hpp"
#include "defines.hpp"
#include <algorithm>
#include "3party/succinct/mapper.hpp"
namespace feature
{
namespace
{
template <class TCont>
void LoadAndMap(size_t dataSize, ReaderSource<FilesContainerR::TReader> & src, TCont & cont,
std::unique_ptr<CopiedMemoryRegion> & region)
{
std::vector<uint8_t> data(dataSize);
src.Read(data.data(), data.size());
region = std::make_unique<CopiedMemoryRegion>(std::move(data));
coding::MapVisitor visitor(region->ImmutableData());
cont.map(visitor);
}
} // namespace
AltitudeLoaderBase::AltitudeLoaderBase(MwmValue const & mwmValue)
{
m_countryFileName = mwmValue.GetCountryFileName();
if (!mwmValue.m_cont.IsExist(ALTITUDES_FILE_TAG))
return;
try
{
m_reader = std::make_unique<FilesContainerR::TReader>(mwmValue.m_cont.GetReader(ALTITUDES_FILE_TAG));
ReaderSource<FilesContainerR::TReader> src(*m_reader);
m_header.Deserialize(src);
LoadAndMap(m_header.GetAltitudeAvailabilitySize(), src, m_altitudeAvailability,
m_altitudeAvailabilityRegion);
LoadAndMap(m_header.GetFeatureTableSize(), src, m_featureTable, m_featureTableRegion);
}
catch (Reader::OpenException const & e)
{
m_header.Reset();
LOG(LERROR, ("File", m_countryFileName, "Error while reading", ALTITUDES_FILE_TAG, "section.", e.Msg()));
}
}
bool AltitudeLoaderBase::HasAltitudes() const
{
return m_reader != nullptr && m_header.m_minAltitude != geometry::kInvalidAltitude;
}
geometry::Altitudes AltitudeLoaderBase::GetAltitudes(uint32_t featureId, size_t pointCount)
{
if (!HasAltitudes())
{
// There's no altitude section in mwm.
return geometry::Altitudes(pointCount, geometry::kDefaultAltitudeMeters);
}
if (!m_altitudeAvailability[featureId])
return geometry::Altitudes(pointCount, m_header.m_minAltitude);
uint64_t const r = m_altitudeAvailability.rank(featureId);
CHECK_LESS(r, m_altitudeAvailability.size(), ("Feature Id", featureId, "of", m_countryFileName));
uint64_t const offset = m_featureTable.select(r);
CHECK_LESS_OR_EQUAL(offset, m_featureTable.size(), ("Feature Id", featureId, "of", m_countryFileName));
uint64_t const altitudeInfoOffsetInSection = m_header.m_altitudesOffset + offset;
CHECK_LESS(altitudeInfoOffsetInSection, m_reader->Size(), ("Feature Id", featureId, "of", m_countryFileName));
try
{
Altitudes altitudes;
ReaderSource<FilesContainerR::TReader> src(*m_reader);
src.Skip(altitudeInfoOffsetInSection);
altitudes.Deserialize(m_header.m_minAltitude, pointCount, m_countryFileName, featureId, src);
// It's filtered on generator stage.
ASSERT(none_of(altitudes.m_altitudes.begin(), altitudes.m_altitudes.end(),
[](geometry::Altitude a) { return a == geometry::kInvalidAltitude; }), (featureId, m_countryFileName));
return std::move(altitudes.m_altitudes);
}
catch (Reader::OpenException const & e)
{
LOG(LERROR, ("Feature Id", featureId, "of", m_countryFileName, ". Error while getting altitude data:", e.Msg()));
return geometry::Altitudes(pointCount, m_header.m_minAltitude);
}
}
geometry::Altitudes const & AltitudeLoaderCached::GetAltitudes(uint32_t featureId, size_t pointCount)
{
auto const it = m_cache.find(featureId);
if (it != m_cache.end())
return it->second;
return m_cache.emplace(featureId, AltitudeLoaderBase::GetAltitudes(featureId, pointCount)).first->second;
}
} // namespace feature
|
0af22aeccba21901fe23f60994ac3c69c97dbc8a | edd3c932464347e18571f30ba2601c436cae626b | /tests/test_hmac_sha256/test_hmac_sha256.cpp | 81d181cd27e72cfd63e573b685fb27a30e9a7ad1 | [
"BSD-3-Clause"
] | permissive | laurijamsa/ruuvi.gateway_esp.c | 74209ba42b670085889b308cb7f76e82c88f9d68 | 2ad7131dd51624d7f2a25e7dea472f3cb2f0f873 | refs/heads/master | 2023-07-17T05:29:27.557942 | 2021-08-30T07:23:31 | 2021-08-30T07:23:31 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,194 | cpp | test_hmac_sha256.cpp | /**
* @file test_hmac_sha256.cpp
* @author TheSomeMan
* @date 2021-07-04
* @copyright Ruuvi Innovations Ltd, license BSD-3-Clause.
*/
#include "hmac_sha256.h"
#include "gtest/gtest.h"
#include <string>
#include "ruuvi_device_id.h"
using namespace std;
/*** Google-test class implementation
* *********************************************************************************/
class TestHMAC_SHA256 : public ::testing::Test
{
private:
protected:
void
SetUp() override
{
ruuvi_device_id_init();
}
void
TearDown() override
{
ruuvi_device_id_deinit();
}
public:
TestHMAC_SHA256();
~TestHMAC_SHA256() override;
};
TestHMAC_SHA256::TestHMAC_SHA256()
: Test()
{
}
TestHMAC_SHA256::~TestHMAC_SHA256() = default;
/*** Unit-Tests
* *******************************************************************************************************/
TEST_F(TestHMAC_SHA256, test_hmac_sha256_in_bin_buf) // NOLINT
{
// https://en.wikipedia.org/wiki/HMAC
// HMAC_SHA256("key", "The quick brown fox jumps over the lazy dog") =
// f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8
ASSERT_TRUE(hmac_sha256_set_key_str("key"));
hmac_sha256_t hmac_sha256 = { 0 };
const string msg = "The quick brown fox jumps over the lazy dog";
ASSERT_TRUE(hmac_sha256_calc(reinterpret_cast<const uint8_t *>(msg.c_str()), msg.length(), &hmac_sha256));
const std::vector<uint8_t> exp_hmac_sha256 = {
0xf7, 0xbc, 0x83, 0xf4, 0x30, 0x53, 0x84, 0x24, 0xb1, 0x32, 0x98, 0xe6, 0xaa, 0x6f, 0xb1, 0x43,
0xef, 0x4d, 0x59, 0xa1, 0x49, 0x46, 0x17, 0x59, 0x97, 0x47, 0x9d, 0xbc, 0x2d, 0x1a, 0x3c, 0xd8,
};
ASSERT_EQ(exp_hmac_sha256, std::vector<uint8_t>(&hmac_sha256.buf[0], &hmac_sha256.buf[32]));
}
TEST_F(TestHMAC_SHA256, test_hmac_sha256_in_str_buf) // NOLINT
{
// https://en.wikipedia.org/wiki/HMAC
// HMAC_SHA256("key", "The quick brown fox jumps over the lazy dog") =
// f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8
ASSERT_TRUE(hmac_sha256_set_key_str("key"));
const hmac_sha256_str_t hmac_sha256_str = hmac_sha256_calc_str("The quick brown fox jumps over the lazy dog");
ASSERT_TRUE(hmac_sha256_is_str_valid(&hmac_sha256_str));
ASSERT_EQ(string("f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8"), string(hmac_sha256_str.buf));
}
TEST_F(TestHMAC_SHA256, test1_hmac_sha256_with_device_id_as_encryption_key) // NOLINT
{
const nrf52_device_id_t nrf52_device_id = { 0x40, 0x98, 0xA7, 0x78, 0x58, 0x1A, 0xE1, 0x38 };
const mac_address_bin_t nrf52_mac_addr = { 0xC8, 0x25, 0x2D, 0x8E, 0x9C, 0x2C };
ruuvi_device_id_set(&nrf52_device_id, &nrf52_mac_addr);
const nrf52_device_id_str_t hmac_key = ruuvi_device_id_get_str();
ASSERT_EQ(string("40:98:A7:78:58:1A:E1:38"), string(hmac_key.str_buf));
ASSERT_TRUE(hmac_sha256_set_key_str(hmac_key.str_buf));
const hmac_sha256_str_t hmac_sha256_str = hmac_sha256_calc_str("The quick brown fox jumps over the lazy dog");
ASSERT_TRUE(hmac_sha256_is_str_valid(&hmac_sha256_str));
ASSERT_EQ(string("04c84e84c41c795e449b3ad9f11304f3d6665d74f33df10d2bf8e832ca26a814"), string(hmac_sha256_str.buf));
}
TEST_F(TestHMAC_SHA256, test2_hmac_sha256_with_device_id_as_encryption_key) // NOLINT
{
const nrf52_device_id_t nrf52_device_id = { 0x40, 0x98, 0xA7, 0x78, 0x58, 0x1A, 0xE1, 0x38 };
const mac_address_bin_t nrf52_mac_addr = { 0xC8, 0x25, 0x2D, 0x8E, 0x9C, 0x2C };
ruuvi_device_id_set(&nrf52_device_id, &nrf52_mac_addr);
const nrf52_device_id_str_t hmac_key = ruuvi_device_id_get_str();
ASSERT_EQ(string("40:98:A7:78:58:1A:E1:38"), string(hmac_key.str_buf));
ASSERT_TRUE(hmac_sha256_set_key_str(hmac_key.str_buf));
const string json_str = R"({
"status": "online",
"gw_mac": "C8:25:2D:8E:9C:2C",
"timestamp": "1625822511",
"nonce": "1763874810"
})";
const hmac_sha256_str_t hmac_sha256_str = hmac_sha256_calc_str(json_str.c_str());
ASSERT_TRUE(hmac_sha256_is_str_valid(&hmac_sha256_str));
ASSERT_EQ(string("040f70eaf7e23084d2ae1171bb48ca3ebf66271c4ec24c4cff03d3d5d96f0d5d"), string(hmac_sha256_str.buf));
}
|
9f00d4d04aef5834f82ef056e3420b2f06bf9a3f | 1a2190b96ca17719d2b41a5fbcac6043cf9f08e4 | /URI OJ/Contests/2014-03-29 - Contest Algar/D.cpp | f6fedd9515b3f65abac6e05299f68efb6ff742a0 | [] | no_license | eliasm2/problem-solving | 13c1abbf397bb41683fccb3490b0113c36ce9010 | 15becf49315b5defb8c1267e0c43ce1579dcae1a | refs/heads/master | 2020-09-07T07:12:17.112311 | 2018-07-20T17:27:43 | 2018-07-20T17:27:43 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,084 | cpp | D.cpp | #include <map>
#include <set>
#include <list>
#include <stack>
#include <cmath>
#include <queue>
#include <ctime>
#include <cfloat>
#include <vector>
#include <string>
#include <cstdio>
#include <bitset>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <iomanip>
#include <sstream>
#include <utility>
#include <iostream>
#include <algorithm>
#include <fstream>
typedef long long int64;
typedef unsigned long long uint64;
using namespace std;
int main(int argc, char* argv[]) {
ios::sync_with_stdio(false);
int t;
cin >> t;
while (t--) {
string L; uint64 N;
cin >> L >> N;
uint64 alph = L.size();
string res = "";
while (N > 0ULL) {
N -= 1ULL;
res += L[N % alph];
N /= alph;
}
int i = 0, j = res.size()-1;
while (i < j) {
swap(res[i], res[j]);
i++, j--;
}
cout << res << "\n";
}
return 0;
}
|
6a2577ac3c4b9fb1c34758d264a2566d79a1b189 | a50cf8b2f7a63a9ef3131a6e875fb3a17711c644 | /Classes/GalleryScene.h | b136faf1365f9b2e468851702805c8c15c7de1af | [] | no_license | bbangwon/breadone_cocos2dx_study | 13dfe0ec238ab95911500bbb11738b771248e746 | 3479f7a95ba138b43a8c81d029d72db916217a9a | refs/heads/master | 2021-01-12T10:52:19.603641 | 2017-01-16T05:52:55 | 2017-01-16T05:52:55 | 72,740,657 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 630 | h | GalleryScene.h | //
// GalleryScene.h
// GameForStudy
//
// Created by YOUNG IL CHUNG on 2016. 12. 26..
//
//
#ifndef GalleryScene_h
#define GalleryScene_h
#include "cocos2d.h"
class GalleryScene : public cocos2d::Layer
{
public:
static cocos2d::Scene* createScene();
virtual bool init();
CREATE_FUNC(GalleryScene);
void onClickHome(Ref *object);
void onClickMake(Ref *object);
void setItems();
static cocos2d::Sprite* getImage(std::string tableName, int rowNo, int colorNo);
void onClickItemCallback(Ref *object);
int _removeNo;
void removeItem();
};
#endif /* GalleryScene_h */
|
e5042fb1938c8d8b9e50c145fb899d6e87894084 | cbe65a4422e18f14394bec13a6a4650ec1c8ce8d | /cf599b.cpp | 1a652406216b2b33108eb6a30bd438911bfd22bf | [] | no_license | ryojiro/Contest | 3a40fc36325bef4346c2f26799d9e5652d72d715 | 9776900cc90ae4746d101e36f5e14e661c859cf2 | refs/heads/master | 2020-04-15T13:10:54.327351 | 2016-12-25T07:17:24 | 2016-12-25T07:17:24 | 57,588,397 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 997 | cpp | cf599b.cpp | #include<iostream>
#include<string>
#include<cstdlib>
#include<cmath>
#include<algorithm>
using namespace std;
long calc(long current, long f[], long b[], long n) {
long* temp = new long[n];
for(long i=0; i<n; i++) temp[i] = f[i];
sort(temp, temp+n);
long count = 0;
bool pre = false;
for(long i=0; i<n; i++) {
if(temp[i] != b[i]) return -2;
if(temp[i] == temp[i+1]) pre = true;
}
delete[] temp;
if(pre) return -1;
else return current;
}
int main() {
long m, n;
cin >> m >> n;
long* f = new long[m];
long* b = new long[n];
for(long i=0; i<m; i++) cin >> f[i];
for(long i=0; i<n; i++) cin >> b[i];
sort(b, b+n);
long temp = 0;
for(int i=0; i<m-n+1; i++) {
temp = calc(i, f, b, n);
if(temp == -1) {
cout << "Ambiguity" << endl;
break;
}
else if(temp >= 0) {
cout << "Possible" << endl;
for(int i=0; i<n; i++) cout << f[i] << ' ';
cout << endl;
break;
}
}
if(temp == -2) cout << "Impossible" << endl;
delete[] f;
delete[] b;
return 0;
}
|
113e086993588baaeb2e341223d2234df7b4894e | 38c8d4ddadc3a401791472123776da87294ec8b7 | /Exercises_from_classes/week13/exercise1.cpp | e7b2dab685e9c1a6c9ec0af1ae2f9c386a9584bc | [] | no_license | JakubSapko/Programming_and_numerical_analysis | 24e1918e2e5cba38ba214635082291bab9b9f49f | f97c7c6aeb80f597827bf5ff9b94d1447d296d19 | refs/heads/master | 2021-02-13T18:09:11.435578 | 2020-10-03T22:11:08 | 2020-10-03T22:11:08 | 244,719,652 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,785 | cpp | exercise1.cpp | #include <vector>
#include <iostream>
#include <iomanip>
#include <cmath>
#include <algorithm>
using namespace std;
int main()
{
vector<double> v = {12.54, -7.2, 9.09, 3.561, 0.0, -4.2135, 6.0009, 12.1, 2.45, -3.1};
auto wypisz = [&v]()->void
{
for(auto em : v)
cout << em << " ";
cout << endl;
};
auto sum = [v]() -> double
{
double res = 0.0;
for(auto em : v)
res += em;
return res;
};
auto av = [=]() -> double
{
return sum()/v.size();
};
auto std = [=]() -> double
{
double aver = av();
double res = 0.0;
for(auto em : v)
res += (em - aver)*(em-aver);
return sqrt(res/v.size());
};
auto max = [=]() -> double
{
return *std::max_element(v.begin(), v.end());
};
auto min = [=]() -> double
{
return *std::min_element(v.begin(), v.end());
};
auto square = [&v]() -> void
{
for(auto it=v.begin(); it != v.end(); ++it)
*it = (*it) * (*it);
};
auto inverse = [&v]() -> void
{
for(auto it=v.begin(); it != v.end(); ++it)
{
if(*it != 0)
*it = 1/(*it);
}
};
auto multKtimes = [&v](double k) -> void
{
for(auto it=v.begin(); it != v.end(); ++it)
{
*it *= k;
}
};
auto toInt = [&v]() -> void
{
for(auto it=v.begin(); it != v.end(); ++it)
{
*it = (int)*it;
}
};
auto modify = [&v](double what, double treshold) -> void
{
for(int ii=0; ii<v.size(); ii++)
{
if(v[ii] > treshold)
{
v[ii] *= -1;
v.insert(v.begin()+ii+1, what);
ii++;
}
}
};
wypisz();
cout << setprecision(3) << "SUMA=" << sum()
<< " SREDNIA=" << av()
<< " ODCHYLENIE=" << std()
<< " MAX=" << max()
<< " MIN=" << min()
<< endl;
square();
wypisz();
inverse();
wypisz();
multKtimes(1241.78);
wypisz();
toInt();
wypisz();
modify(-13, 50);
wypisz();
return 0;
} |
3c8fc59de3e9a39c1b7b68bc38681a8698f403c2 | 2dd0253e5f7331e2346cb44aebabc925c5003519 | /include/backend/base/base_conv2d_winograd.h | 30f9ddb5dc6cd3503b13cf49180939572262e63e | [] | no_license | KangLin/TenniS | 06e22b734c08781abf3bcb24abeceda777584e6c | d2c44ab369685450beb18fc83685f9e589bb3f35 | refs/heads/master | 2023-07-30T14:11:25.828834 | 2021-10-03T08:49:52 | 2021-10-03T08:49:52 | 412,299,971 | 0 | 0 | null | 2021-10-01T02:35:24 | 2021-10-01T02:35:23 | null | UTF-8 | C++ | false | false | 1,441 | h | base_conv2d_winograd.h | #ifndef TENSORSTACK_BACKEND_BASE_BASE_CONV2D_WINOGRAD_H
#define TENSORSTACK_BACKEND_BASE_BASE_CONV2D_WINOGRAD_H
#include "operator_on_device.h"
#include "backend/common_structure.h"
#include <valarray>
namespace ts{
namespace base {
class Conv2DWinograd : public OperatorOnDevice {
public:
using self = Conv2DWinograd;
using supper = OperatorOnDevice;
Conv2DWinograd();
void init() override;
int infer(Stack &stack, std::vector<Tensor::Prototype> &output) override;
int run(ts::Stack &stack) override;
virtual void conv2d_tranform_kernel(WinogradConv2DMode winograd_mode, const Tensor &kernel, Tensor &kernel_transformed) = 0;
virtual void conv2d_winograd(const Tensor &x, WinogradConv2DMode winograd_mode, const Padding2D &padding, float padding_value,
const Tensor &w, Conv2DFormat format, Tensor &out, bool kernel_transformed) = 0;
// virtual void conv2d_winograd(const Tensor &x, WinogradConv2DMode winograd_mode,
// const Tensor &w, Conv2DFormat format, Tensor &out, Stack &stack) = 0;
private:
WinogradConv2DMode m_winograd_mode;
Conv2DFormat m_format;
std::valarray<int> m_padding4x2;
float m_padding_value;
bool m_kernel_transformed;
Tensor m_k_transformed;
};
}
}
#endif |
0c996bc9b7946e81a745bd94c0c1d671a5c90e66 | d3b956cbd70f86a7f461d4eaf1e9bd1b23beb472 | /Viewer/src/Utils.cpp | fcc4d83323cba71bf8b793f71208860253cb57a3 | [] | no_license | sagigvili/ComputerGraphics2020 | c8b18d4050db8b0246d36a5e9a4ac74fa8e23c5d | 4b31f843eff65e21b064f814f5da79a875902474 | refs/heads/main | 2023-08-07T20:53:34.457351 | 2021-09-08T16:25:09 | 2021-09-08T16:25:09 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,760 | cpp | Utils.cpp | #include <memory>
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include "Utils.h"
glm::vec3 Utils::Vec3fFromStream(std::istream& issLine)
{
float x, y, z;
issLine >> x >> std::ws >> y >> std::ws >> z;
return glm::vec3(x, y, z);
}
glm::vec2 Utils::Vec2fFromStream(std::istream& issLine)
{
float x, y;
issLine >> x >> std::ws >> y;
return glm::vec2(x, y);
}
glm::vec4 Utils::Vec4FromVec3(const glm::vec3& other)
{
glm::vec4 out;
out.x = other.x;
out.y = other.y;
out.z = other.z;
out.w = 1;
return out;
}
char** Utils::convertStringVectorToCharArray(std::vector<std::string> vec)
{
int i = 0;
char** strings = new char* [vec.size() + 1];
for (auto s : vec) {
strings[i] = new char[s.size() + 1];
std::strcpy(strings[i++], s.c_str());
}
return strings;
}
std::vector<glm::vec3> Utils::CalculateNormals(std::vector<glm::vec3> vertices, std::vector<Face> faces)
{
std::vector<glm::vec3> normals(vertices.size());
std::vector<int> adjacent_faces_count(vertices.size());
for (int i = 0; i < adjacent_faces_count.size(); i++)
{
adjacent_faces_count[i] = 0;
}
for (int i = 0; i < faces.size(); i++)
{
Face currentFace = faces.at(i);
int index0 = currentFace.GetVertexIndex(0);
int index1 = currentFace.GetVertexIndex(1);
int index2 = currentFace.GetVertexIndex(2);
glm::vec3 v0 = vertices.at(index0);
glm::vec3 v1 = vertices.at(index1);
glm::vec3 v2 = vertices.at(index2);
glm::vec3 u = v0 - v1;
glm::vec3 v = v2 - v1;
glm::vec3 face_normal = glm::normalize(-glm::cross(u, v));
normals.at(index0) += face_normal;
normals.at(index1) += face_normal;
normals.at(index2) += face_normal;
adjacent_faces_count.at(index0) += 1;
adjacent_faces_count.at(index1) += 1;
adjacent_faces_count.at(index2) += 1;
}
for (int i = 0; i < normals.size(); i++)
{
normals[i] /= adjacent_faces_count[i];
normals[i] = glm::normalize(normals[i]);
}
return normals;
}
std::shared_ptr<MeshModel> Utils::LoadMeshModel(const std::string& filePath)
{
std::vector<Face> faces;
std::vector<glm::vec3> vertices;
std::vector<glm::vec3> normals;
std::vector<glm::vec2> textureCoords;
std::ifstream ifile(filePath.c_str());
// while not end of file
while (!ifile.eof())
{
// get line
std::string curLine;
std::getline(ifile, curLine);
// read the type of the line
std::istringstream issLine(curLine);
std::string lineType;
issLine >> std::ws >> lineType;
// based on the type parse data
if (lineType == "v")
{
vertices.push_back(Utils::Vec3fFromStream(issLine));
}
else if (lineType == "vn")
{
normals.push_back(Utils::Vec3fFromStream(issLine));
}
else if (lineType == "vt")
{
textureCoords.push_back(Utils::Vec2fFromStream(issLine));
}
else if (lineType == "f")
{
faces.push_back(Face(issLine));
}
else if (lineType == "#" || lineType == "")
{
// comment / empty line
}
else
{
std::cout << "Found unknown line Type \"" << lineType << "\"";
}
}
return std::make_shared<MeshModel>(faces, vertices, CalculateNormals(vertices, faces), textureCoords, Utils::GetFileName(filePath));
}
std::string Utils::GetFileName(const std::string& filePath)
{
if (filePath.empty()) {
return {};
}
auto len = filePath.length();
auto index = filePath.find_last_of("/\\");
if (index == std::string::npos) {
return filePath;
}
if (index + 1 >= len) {
len--;
index = filePath.substr(0, len).find_last_of("/\\");
if (len == 0) {
return filePath;
}
if (index == 0) {
return filePath.substr(1, len - 1);
}
if (index == std::string::npos) {
return filePath.substr(0, len);
}
return filePath.substr(index + 1, len - index - 1);
}
return filePath.substr(index + 1, len - index);
} |
71474020cde52c13858a962177415f464ddd0a17 | 4aadb120c23f44519fbd5254e56fc91c0eb3772c | /Source/src/OpenSteerUT/CameraPlugin.cpp | e90e790c1c29b2b8709655cccb84c16a1e097c91 | [] | no_license | janfietz/edunetgames | d06cfb021d8f24cdcf3848a59cab694fbfd9c0ba | 04d787b0afca7c99b0f4c0692002b4abb8eea410 | refs/heads/master | 2016-09-10T19:24:04.051842 | 2011-04-17T11:00:09 | 2011-04-17T11:00:09 | 33,568,741 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,503 | cpp | CameraPlugin.cpp | // CameraPlugin static code:
// - code which has been extracted from OpenSteerDemo
//-----------------------------------------------------------------------------
//
//
// OpenSteer -- Steering Behaviors for Autonomous Characters
//
// Copyright (c) 2002-2005, Sony Computer Entertainment America
// Original author: Craig Reynolds <craig_reynolds@playstation.sony.com>
//
// 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.
//
//
//-----------------------------------------------------------------------------
// CameraPlugin code:
//-----------------------------------------------------------------------------
// Copyright (c) 2009, Jan Fietz, Cyrus Preuss
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither the name of EduNetGames nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
#include "CameraPlugin.h"
#include "EduNetCommon/EduNetDraw.h"
#include "OpenSteer/Utilities.h"
using namespace OpenSteer;
//-----------------------------------------------------------------------------
// some camera-related default constants
const float CameraPlugin::camera2dElevation = 6;
const float CameraPlugin::cameraTargetDistance = 10;
const OpenSteer::Vec3 CameraPlugin::cameraTargetOffset( Vec3::up * CameraPlugin::camera2dElevation );
// 0, CameraPlugin::camera2dElevation, 0 );
//-----------------------------------------------------------------------------
void CameraPlugin::initGui( void* pkUserdata )
{
//GLUI* glui = ::getRootGLUI();
//GLUI_Panel* pluginPanel = static_cast<GLUI_Panel*>( pkUserdata );
//GLUI_Spinner* lookdownDistanceSpinner =
// glui->add_spinner_to_panel( pluginPanel, "Look Down Distance", GLUI_SPINNER_FLOAT, &m_Camera.lookdownDistance);
//lookdownDistanceSpinner->set_float_limits(0.1f, 50.0f);
}
//-----------------------------------------------------------------------------
// set a certain initial camera state used by several plug-ins
void
CameraPlugin::init3dCamera( AbstractLocalSpace& selected )
{
init3dCamera( selected, cameraTargetDistance, camera2dElevation );
}
//-----------------------------------------------------------------------------
void
CameraPlugin::init3dCamera (AbstractLocalSpace& selected,
float distance,
float elevation)
{
position3dCamera (selected, distance, elevation);
m_Camera.fixedDistDistance = distance;
m_Camera.fixedDistVOffset = elevation;
m_Camera.mode = Camera::cmFixedDistanceOffset;
}
//-----------------------------------------------------------------------------
void
CameraPlugin::init2dCamera( AbstractLocalSpace& selected )
{
init2dCamera( selected, cameraTargetDistance, camera2dElevation );
}
//-----------------------------------------------------------------------------
void
CameraPlugin::init2dCamera( AbstractLocalSpace& selected,
float distance,
float elevation )
{
position2dCamera (selected, distance, elevation);
m_Camera.fixedDistDistance = distance;
m_Camera.fixedDistVOffset = elevation;
m_Camera.mode = Camera::cmFixedDistanceOffset;
}
//-----------------------------------------------------------------------------
void
CameraPlugin::position3dCamera( AbstractLocalSpace& selected )
{
position3dCamera( selected, cameraTargetDistance, camera2dElevation );
}
//-----------------------------------------------------------------------------
void
CameraPlugin::position3dCamera( AbstractLocalSpace& selected,
float distance,
float /*elevation*/ )
{
if (&selected)
{
Vec3 direction = selected.position() - m_Camera.position();
float fDirection = direction.length();
if( fDirection > 0 )
{
direction /= fDirection;
m_Camera.setForward( direction );
m_Camera.regenerateOrthonormalBasisUF( m_Camera.forward() );
}
const Vec3 behind = selected.forward() * -distance;
m_Camera.setPosition (selected.position() + behind);
m_Camera.target = selected.position();
}
else
{
Vec3 forward = -Vec3::up + Vec3::forward;
forward = forward.normalized();
const Vec3 behind = forward * -distance;
m_Camera.setPosition( behind );
m_Camera.target = Vec3::zero;
}
m_Camera.doNotSmoothNextMove ();
}
//-----------------------------------------------------------------------------
void
CameraPlugin::position2dCamera( AbstractLocalSpace& selected )
{
float distance = cameraTargetDistance;
float elevation = camera2dElevation;
if( &selected )
{
Vec3 dir = selected.position() - m_Camera.position();
if( dir.length() > 0 )
{
distance = ::etMin( distance, dir.length() );
}
}
position2dCamera( selected, distance, elevation );
}
//-----------------------------------------------------------------------------
void
CameraPlugin::position2dCamera( AbstractLocalSpace& selected,
float distance,
float elevation )
{
// position the camera as if in 3d:
position3dCamera (selected, distance, elevation);
// then adjust for 3d:
Vec3 position3d = m_Camera.position();
position3d.y += elevation;
m_Camera.setPosition (position3d);
m_Camera.doNotSmoothNextMove ();
}
//-----------------------------------------------------------------------------
void CameraPlugin::setCameraTarget ( const AbstractLocalSpace* selected )
{
m_Camera.setLocalSpaceToTrack( selected );
}
//-----------------------------------------------------------------------------
void CameraPlugin::redraw( OpenSteer::AbstractRenderer* pRenderer,
const float currentTime,
const float elapsedTime )
{
pRenderer->SetCamera( &m_Camera );
if( false == this->isVisible() )
{
return;
}
m_Camera.draw( pRenderer, currentTime, elapsedTime);
}
void OpenSteer::CameraPlugin::update( const float currentTime, const float elapsedTime )
{
m_Camera.update( currentTime, elapsedTime );
}
void OpenSteer::CameraPlugin::open( void )
{
m_Camera.reset();
} |
18401820d9acaa48976e86961046cf1741d3d488 | cc785a8f497d08c0c78d86bc43456d8a405e6f69 | /libextra/test/UnitTestConstants.cpp | 286eeb6493a2afc6df7705364854eac91eb0f4ac | [
"Apache-2.0"
] | permissive | PRImA-Research-Lab/prima-image-lib | 1ecf96faccd0eeee4aabf87b94172c52fabdb3e9 | 9072672cf1f42caf35e8c69d6b09ee6217fb24a6 | refs/heads/master | 2021-07-10T06:30:13.571399 | 2017-10-03T12:52:54 | 2017-10-03T12:52:54 | 105,634,020 | 4 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 372 | cpp | UnitTestConstants.cpp | #include "UnitTestConstants.h"
namespace libextra
{
/*
* Class CUnitTestConstants
*
* Constants for unit tests (e.g. file paths)
*
* CC 09/05/14
*/
const wchar_t * CUnitTestConstants::TESTING_FOLDER = L"C:\\Users\\clc\\projects\\libextra\\misc\\testing\\";
CUnitTestConstants::CUnitTestConstants(void)
{
}
CUnitTestConstants::~CUnitTestConstants(void)
{
}
} |
d91dcccafa5040f4ca33222815ca9dfafc6502ea | 0e0e68d285a39c1d2c1fad524ca9e19adf8508c8 | /src/CollisionRect.cpp | 6368b5e5a1c2f02249623dee27cd671a24f289a1 | [] | no_license | indrajithbandara/SDL-RPG | e1ec502648b13b4dd922898f7fac38ded75de257 | 3698404996b97b0b8c2532013d6521f4fe0c4fe4 | refs/heads/master | 2021-05-09T22:37:56.120111 | 2014-08-19T09:36:54 | 2014-08-19T09:36:54 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 492 | cpp | CollisionRect.cpp | #include "stdafx.h"
#include "CollissionRect.h"
CCollisionRect::CCollisionRect()
{
SetRectangle(0,0,0,0);
OffsetX = 0;
OffsetY = 0;
}
CCollisionRect::CCollisionRect(int x, int y, int w, int h)
{
OffsetX = x;
OffsetY = y;
SetRectangle(0,0,w,h);
}
CCollisionRect::~CCollisionRect(void)
{
}
void CCollisionRect::SetRectangle(int x, int y, int w, int h)
{
CollisionRectangle.x = x + OffsetX;
CollisionRectangle.y = y + OffsetY;
CollisionRectangle.w = w;
CollisionRectangle.h = h;
} |
29054722fdc43d152b7266e9b4dc65d4e256f8f1 | 6ffd23679939f59f0a09c9507a126ba056b239d7 | /dnn/src/naive/dropout/opr_impl.h | ea517876f8277ce5a20aba6de918ad96e50fcd5d | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | MegEngine/MegEngine | 74c1c9b6022c858962caf7f27e6f65220739999f | 66b79160d35b2710c00befede0c3fd729109e474 | refs/heads/master | 2023-08-23T20:01:32.476848 | 2023-08-01T07:12:01 | 2023-08-11T06:04:12 | 248,175,118 | 5,697 | 585 | Apache-2.0 | 2023-07-19T05:11:07 | 2020-03-18T08:21:58 | C++ | UTF-8 | C++ | false | false | 1,101 | h | opr_impl.h | #pragma once
#include "megdnn/oprs.h"
#include "src/naive/rng/opr_impl.h"
namespace megdnn {
namespace naive {
class DropoutForwardImpl final : public DropoutForward {
Xoroshiro128plus m_rng;
public:
using DropoutForward::DropoutForward;
void exec(
_megdnn_tensor_in inp, _megdnn_tensor_out oup, _megdnn_tensor_out mask,
_megdnn_workspace workspace) override;
size_t get_mask_size_in_bytes(const TensorLayout& inp) override;
size_t get_workspace_in_bytes(
const TensorLayout&, const TensorLayout&, const TensorLayout&) override {
return 0;
}
};
class DropoutBackwardImpl final : public DropoutBackward {
public:
using DropoutBackward::DropoutBackward;
void exec(
_megdnn_tensor_in doup, _megdnn_tensor_in mask, _megdnn_tensor_out dinp,
_megdnn_workspace workspace) override;
size_t get_workspace_in_bytes(
const TensorLayout&, const TensorLayout&, const TensorLayout&) override {
return 0;
}
};
} // namespace naive
} // namespace megdnn
// vim: syntax=cpp.doxygen
|
c9be71ac148362237538210de41e0655f6cb34ed | c20c4812ac0164c8ec2434e1126c1fdb1a2cc09e | /Source/Source/KG3DEngine/KG3DEngine/Helpers/KGINIFileHelpersEx.h | dc6ff380521c629f607a731ffe5e0e34902aca8b | [
"MIT"
] | permissive | uvbs/FullSource | f8673b02e10c8c749b9b88bf18018a69158e8cb9 | 07601c5f18d243fb478735b7bdcb8955598b9a90 | refs/heads/master | 2020-03-24T03:11:13.148940 | 2018-07-25T18:30:25 | 2018-07-25T18:30:25 | 142,408,505 | 2 | 2 | null | 2018-07-26T07:58:12 | 2018-07-26T07:58:12 | null | GB18030 | C++ | false | false | 2,717 | h | KGINIFileHelpersEx.h | ////////////////////////////////////////////////////////////////////////////////
//
// FileName : KGINIFileHelperEx.h
// Version : 1.0
// Creator : Chen Tianhong
// Create Date : 2007-12-6 14:14:30
// Comment : 这个放类相关的部分
//
////////////////////////////////////////////////////////////////////////////////
#ifndef _INCLUDE_KGINIFILEHELPEREX_H_
#define _INCLUDE_KGINIFILEHELPEREX_H_
#include "KGINIFileHelpers.h"
////////////////////////////////////////////////////////////////////////////////
class IIniFile;
namespace KG_CUSTOM_HELPERS
{
namespace Private
{
//D3DCOLORVALUE////////////////////////////////////////////////////////////////
bool SaveINIFileHelper(IIniFile* pIniFile, const char* szSection, const char* szKeyName, const D3DCOLORVALUE& DataRet);
bool LoadINIFileHelper(IIniFile* pIniFile, const char* szSection, const char* szKeyName, D3DCOLORVALUE* DataRet);
//D3DVECTOR//////////////////////////////////////////////////////////////////////////
bool SaveINIFileHelper(IIniFile* pIniFile, const char* szSection, const char* szKeyName, const D3DVECTOR& DataRet);
bool LoadINIFileHelper(IIniFile* pIniFile, const char* szSection, const char* szKeyName, D3DVECTOR* DataRet);
//D3DLIGHT9//////////////////////////////////////////////////////////////////////////
bool SaveINIFileHelper(IIniFile* pIniFile, const char* szSection, const char* szKeyName, const D3DLIGHT9& DataRet);
bool LoadINIFileHelper(IIniFile* pIniFile, const char* szSection, const char* szKeyName, D3DLIGHT9* DataRet);
};
//比较大的结构体,用Save/LoadINIFileBigData,参数略有不同
//模板的形式,用于Unicode包装,把Unicode传递到底层的非Unicode代码中,同时得到模板类型安全
template<class _SaveType>
inline bool SaveINIFileBigData(IIniFile* pIniFile, LPCTSTR szSection, LPCTSTR szKeyName, const _SaveType& DataRet)
{
#if defined(_UNICODE) | defined(UNICODE)
UnicodeConvertor CvtSection, CvtKeyName, CvtDataRet;
return Private::SaveINIFileHelper(pIniFile, CvtSection.ToA(szSection), CvtKeyName.ToA(szKeyName), DataRet);
#else
return Private::SaveINIFileHelper(pIniFile, szSection, szKeyName, DataRet);
#endif
}
template<class _LoadType>
inline bool LoadINIFileBigData(IIniFile* pIniFile, LPCTSTR szSection, LPCTSTR szKeyName, _LoadType* pDataRet)
{
#if defined(_UNICODE) | defined(UNICODE)
UnicodeConvertor CvtSection, CvtKeyName;
return Private::LoadINIFileHelper(pIniFile, CvtSection.ToA(szSection), CvtKeyName.ToA(szKeyName), pDataRet);
#else
return Private::LoadINIFileHelper(pIniFile, szSection, szKeyName, pDataRet);
#endif
}
};
namespace KGCH = KG_CUSTOM_HELPERS;
#endif //_INCLUDE_KGINIFILEHELPEREX_H_
|
7c44af3ebc42f31a440481ab1c3dc9b57c774d69 | 4a0ea369c33e0d21f5ef671ba9d82a0e3c4ff6f8 | /utils/location.h | 0419de1d26e8c0d05dd0df4e331489230e0fb659 | [
"MIT"
] | permissive | weidezhang/dht | ee37de39a74bc975d37b8245469873bfc2e31c5f | 2ce617cb6f02b5ebdb599487f0fef5720f688fd5 | refs/heads/master | 2021-01-18T07:51:50.113147 | 2013-06-10T09:05:31 | 2013-06-10T09:05:31 | 10,290,178 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,196 | h | location.h | #ifndef _LOCATION_H_
#define _LOCATION_H_
#include <vec.h>
#include <chord_types.h>
#include <coord.h>
struct sockaddr_in;
class location {
const chordID n_;
const net_address addr_;
int vnode_;
Coord coords_;
float a_lat_;
float a_var_;
bool alive_;
time_t dead_time_;
sockaddr_in saddr_;
unsigned long nrpc_;
//for Accordion
time_t updatetime_;
time_t knownup_;
time_t age_;
int32_t budget_;
void init ();
public:
location (const chordID &_n, const net_address &_r, const int v,
const Coord &coords, time_t knownup, time_t age, int32_t budget, bool m);
location (const chord_node &n);
~location ();
// Accessors;
const chordID id () const { return n_; }
const net_address &address () const { return addr_; };
int vnode () const { return vnode_; }
const Coord &coords () const { return coords_; };
Coord coords () { return coords_; };
float distance () const { return a_lat_; };
float a_var () const { return a_var_; };
bool alive () const { return alive_; };
time_t dead_time () const { return dead_time_; }
const sockaddr_in &saddr () const { return saddr_; };
unsigned long nrpc () const { return nrpc_; };
// jy: for Accordion
time_t knownup () const { return knownup_;}
void update_knownup ();
time_t age ();
time_t init_age () { return age_;}
time_t updatetime () { return updatetime_;}
int32_t budget () const { return budget_;}
void set_budget (int32_t b) { budget_ = b;}
void update_age ();
void update ( ptr<location> l);
void update ( chord_node n);
void set_loss ();
char get_loss ();
void fill_node (chord_node &data);
void fill_node (chord_node_wire &data);
void fill_node_ext (chord_node_ext &data);
// Mutators
void set_alive (bool alive);
void set_coords (const Coord &coords);
void set_coords_err (float x) { coords_.update_err (x); };
void set_coords (const chord_node &n);
void set_distance (float dist) { a_lat_ = dist; };
void set_variance (float variance) { a_var_ = variance; };
void inc_nrpc () { nrpc_++; }
bool isme_;
char losses_;
};
const strbuf &strbuf_cat (const strbuf &sb, const ref<location> l);
#endif /* _LOCATION_H */
|
eddeb6b5f1aa26b06a2aecf581519abf41c736cb | 7993f562d912c37c8d419622793d732c567df8d2 | /admin_see_statistics.h | 6472d379ea8bece6051b3578870224a665f36f7d | [] | no_license | tazbid/OnlineBookStore | e71fc2dd148d52fc69f7470d2a5e66af09666f4b | 56f0a3d701be2f25099c8e37a005e1de71548cca | refs/heads/master | 2022-09-16T16:50:37.386849 | 2020-06-01T07:12:38 | 2020-06-01T07:12:38 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 538 | h | admin_see_statistics.h | #ifndef ADMIN_SEE_STATISTICS_H
#define ADMIN_SEE_STATISTICS_H
#include <QDialog>
#include<QtSql>
#include<QFileInfo>
#include<QTableView>
namespace Ui {
class admin_see_statistics;
}
class admin_see_statistics : public QDialog
{
Q_OBJECT
public:
explicit admin_see_statistics(QWidget *parent = nullptr);
~admin_see_statistics();
private slots:
void on_pushButton_see_statistics_clicked();
private:
Ui::admin_see_statistics *ui;
QSqlQueryModel *model;
QSqlQuery *qry;
};
#endif // ADMIN_SEE_STATISTICS_H
|
b85bce02c390b7fd570748bcbc58604d89502d02 | 39fe085377f3c7327e82d92dcb38083d039d8447 | /core/sqf/monitor/linux/intprocess.h | 180053490f02154338cfc2a1a24fc02597eecbe7 | [
"Apache-2.0"
] | permissive | naveenmahadevuni/incubator-trafodion | 0da8d4c7d13a47d3247f260b4e67618c0fae1539 | ed24b19436530b2c214e4bf73280bc8e3f419669 | refs/heads/master | 2021-01-22T04:40:52.402291 | 2015-07-16T00:02:50 | 2015-07-16T00:02:50 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,558 | h | intprocess.h | ///////////////////////////////////////////////////////////////////////////////
//
// @@@ START COPYRIGHT @@@
//
// (C) Copyright 2010-2014 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// @@@ END COPYRIGHT @@@
//
///////////////////////////////////////////////////////////////////////////////
#ifndef INTPROCESS_H_
#define INTPROCESS_H_
#include <map>
#include <semaphore.h>
#include "lock.h"
//
// Internal-process manager
//
// singleton
//
class CIntProcess
{
private:
typedef void (*Exit_Cb)(void *ctx, int pid, int status);
typedef struct Ctx
{
CIntProcess *intprocess;
Exit_Cb exit_cb;
int exit_cb_pid;
void *exit_cb_ctx;
} Ctx;
typedef std::map<pid_t, Ctx *> Map_Type;
typedef Map_Type::const_iterator Map_Iter_Type;
// map pid->ctx
class CMap
{
public:
CMap();
virtual ~CMap();
Map_Iter_Type end();
void erase(int pid);
Map_Iter_Type find(pid_t pid);
void insert(int pid, Ctx *ctx);
void lock();
void print_map();
void unlock();
private:
CLock Lock;
Map_Type Map;
};
public:
CIntProcess();
virtual ~CIntProcess();
int create(const char *filename, // filename to exec
char *const argv[], // arguments
Exit_Cb exit_cb, // callback
int exit_cb_pid, // callback pid
void *exit_cb_ctx, // callback context
pid_t *pid); // returned pid of exec'd process
static Ctx *get_ctx(pid_t pid);
static bool handle_signal(pid_t pid, int status);
static void print_map();
static void remove_ctx(pid_t pid);
private:
static CMap Map;
static sem_t *Sem;
static char SemName[100];
};
#endif /*INTPROCESS_H_*/
|
a9032458a293d1be2fa6ddac2d5440f584861336 | b1dbd8dbb2c39d296e3facff3a62b56f4049b62d | /bares/src/list.cpp | 2b7b5020802a6c6f292f0d17dd5aa11b3b848c4e | [] | no_license | claranobre/estrutura_de_dados_one | 5a079c46fcb5651323bbb347e910de47aac25fa3 | 63e49f3b9c476c2cd3ef36ae4b51ebf89de59420 | refs/heads/master | 2021-01-16T17:45:01.855379 | 2015-05-29T03:28:01 | 2015-05-29T03:28:01 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,179 | cpp | list.cpp | #include "list.h"
template <class Object>
List<Object>::List()
: _size(0), head(new Node(Object(), nullptr, nullptr)), tail(new Node(Object(), nullptr, nullptr)) {}
template <class Object>
List<Object>::List(const List & list)
: _size(list._size), head(list.head), tail(list.tail) {}
template <class Object>
List<Object>::~List()
{
delete head;
delete tail;
}
template <class Object>
const List<Object> &
List<Object>::operator=(const List & list)
{
_size = list._size;
head = list.head;
tail = list.tail;
return *this;
}
template <class Object>
typename List<Object>::iterator List<Object>::begin()
{
return List<Object>::iterator(this->head);
}
template <class Object>
typename List<Object>::const_iterator
List<Object>::begin() const
{
return List<Object>::const_iterator(this->head);
}
template <class Object>
typename List<Object>::iterator
List<Object>::end()
{
return List<Object>::iterator(this->tail);
}
template <class Object>
typename List<Object>::const_iterator
List<Object>::end() const
{
return List<Object>::const_iterator();
}
template <class Object>
int List<Object>::size() const
{
return _size;
}
template <class Object>
bool List<Object>::empty() const
{
return _size == 0;
}
template <class Object>
void List<Object>::clear()
{
delete head;
delete tail;
head = nullptr;
tail = nullptr;
_size = 0;
}
template <class Object>
typename List<Object>::iterator
List<Object>::insert(List<Object>::iterator itr, const Object & x)
{
Node itr_node = *itr;
Node new_node = Node();
_size++;
new_node.data = x;
new_node.prev = itr_node.prev;
new_node.next = &itr_node;
itr_node.prev = &new_node;
if(empty())
*head = new_node;
return List<Object>::iterator(&new_node);
}
template <class Object>
typename List<Object>::iterator
List<Object>::erase(List<Object>::iterator itr)
{
return nullptr;
}
template <class Object>
typename List<Object>::iterator
List<Object>::erase(List<Object>::iterator start, List<Object>::iterator end)
{
return nullptr;
}
template <class Object>
typename List<Object>::const_iterator
List<Object>::find(const Object & x) const
{
return nullptr;
}
template <class Object>
typename List<Object>::iterator
List<Object>::find(const Object & x)
{
return nullptr;
}
// const_iterator
// ----------------------------------------------------------------------------
template <class Object>
List<Object>::const_iterator::const_iterator()
: current(nullptr) {}
template <class Object>
const Object &
List<Object>::const_iterator::operator*() const
{
return nullptr;
}
template <class Object>
typename List<Object>::const_iterator &
List<Object>::const_iterator::operator++()
{
return nullptr;
}
template <class Object>
typename List<Object>::const_iterator &
List<Object>::const_iterator::operator++(int)
{
return nullptr;
}
template <class Object>
typename List<Object>::const_iterator
List<Object>::const_iterator::operator--()
{
return nullptr;
}
template <class Object>
typename List<Object>::const_iterator
List<Object>::const_iterator::operator--(int)
{
return nullptr;
}
template <class Object>
List<Object>::const_iterator::const_iterator(List<Object>::Node* p)
: current(p) {}
// iterator
// ----------------------------------------------------------------------------
template <class Object>
const Object &
List<Object>::iterator::operator*() const
{
return nullptr;
}
template <class Object>
Object &
List<Object>::iterator::operator*()
{
return this->current->data;
}
template <class Object>
typename List<Object>::iterator &
List<Object>::iterator::operator++()
{
return nullptr;
}
template <class Object>
typename List<Object>::iterator
List<Object>::iterator::operator++(int)
{
return nullptr;
}
template <class Object>
typename List<Object>::iterator &
List<Object>::iterator::operator--()
{
return nullptr;
}
template <class Object>
typename List<Object>::iterator
List<Object>::iterator::operator--(int)
{
return nullptr;
}
template <class Object>
List<Object>::iterator::iterator(List<Object>::Node* p)
{}
|
1e56665c000f09c31baade5d07bd238f2ccaf4f5 | 984b29f8466e7071db3c72e0cc2fd0df71eec9ac | /SciUSBMono/SciUSBMono/SciArcus.h | 3e7e4e38a1cd4ef764658e8fa606e1dd20ff5d4c | [] | no_license | radtek/SciUSBMono | 201071388e30cbf0812506bf936cd70629141dc6 | 3f961f2de1dc8bb9b7b44e2eb194a18703e3646b | refs/heads/master | 2020-06-23T01:12:19.140176 | 2017-10-16T17:28:29 | 2017-10-16T17:28:29 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,791 | h | SciArcus.h | #pragma once
class CMySciUsbMono;
class CSciArcus
{
public:
CSciArcus(CMySciUsbMono * pMySciUsbMono, LPCTSTR szSerialNumber);
~CSciArcus(void);
BOOL doInit(); // initialize the SciArcus object
void SetDllDirectory(
LPCTSTR szDllDirectory);
void SetToolsDirectory(
LPCTSTR szToolsDirectory);
BOOL GetDllLoaded();
void SetDllLoaded();
BOOL GetDeviceConnected();
void SetDeviceConnected(
BOOL fDeviceConnected);
BOOL SendReceive(
LPCTSTR Send,
LPTSTR * Receive);
long GetValue(
long Index);
void SetValue(
long Index,
long NewValue);
BOOL StoreSettings();
// find the device index
BOOL FindDeviceIndex();
// motor homing
BOOL MotorHomed();
// void SetMotorHomed();
void Home9030();
void Home9055();
void Home9040();
void Home9010();
BOOL GetAmHoming();
// go to position
void MoveToPosition(
long NewPosition);
BOOL GetMotorMoving();
BOOL GetCurrentPosition(
long * position);
// motor enabled
BOOL GetMotorEnabled();
void SetMotorEnabled(
BOOL motorEnabled);
// motor IDLE current
long GetMotorIdleCurrent();
void SetMotorIdleCurrent(
long idleCurrent);
// motor Run Current
long GetMotorRunCurrent();
void SetMotorRunCurrent(
long runCurrent);
// high speed
long GetHighSpeed();
void SetHighSpeed(
long highSpeed);
// motor status
long GetMotorStatus();
// check for move error
void CheckMoveError(
LPCTSTR szReply,
BOOL * fMoveError);
void ClearMoveError();
// set minimum position
void SetMinimumPosition(
long minimumPosition);
void SetMaximumPosition(
long maximumPosition);
protected:
// sink events
void OnError(
LPCTSTR Error);
void OnHaveConnectedDevice(
LPCTSTR SerialNumber);
void OnHaveConnectedDevice();
// // set the subclass
// void SetSubclass();
// // remove the subclass
// void RemoveSubclass();
// check if a move was completed
BOOL CheckMoveCompleted(
BOOL * fNegativeLimit,
BOOL * fPositiveLimit);
// move difference
long GetMoveDifference(
long NewPosition);
// check absolute position
BOOL CheckAbsolutePosition(
long position,
LPTSTR szError,
int nBufferSize);
// send a command, eat return
BOOL MySendCommand(
LPCTSTR szCommand);
// wait until move completed
BOOL WaitUntilMoveCompleted(
BOOL * fPositiveLimit = NULL);
private:
CMySciUsbMono * m_pMySciUsbMono;
IDispatch * m_pdispSciArcus;
LPTSTR m_szSerialNumber; // our serial number
long m_deviceIndex; // our device index
BOOL m_fAmHomed; // motor homed flag
BOOL m_fAmHoming; // motor homing flag
BOOL m_fAmMoving; // motor position changing
// // idle and run currents
// long m_idleCurrent;
// long m_runCurrent;
// sink handling
IID m_iidSink; // sink interface id
DWORD m_dwCookie; // connection cookie
// subclassing the main window
HWND m_hwndSubclass; // subclass window
// absolute minimum position
BOOL m_fMinimumSet;
long m_Minimum;
// absolute maximum position
BOOL m_fMaximumSet;
long m_Maximum;
// dialog window
HWND m_hwndDlg;
// dialog procedure
friend LRESULT CALLBACK DlgProcSciArcus(HWND, UINT, WPARAM, LPARAM);
// sink implementation
class CImpISink : public IDispatch
{
public:
CImpISink(CSciArcus * pSciArcus);
~CImpISink();
// IUnknown methods
STDMETHODIMP QueryInterface(
REFIID riid,
LPVOID * ppv);
STDMETHODIMP_(ULONG) AddRef();
STDMETHODIMP_(ULONG) Release();
// IDispatch methods
STDMETHODIMP GetTypeInfoCount(
PUINT pctinfo);
STDMETHODIMP GetTypeInfo(
UINT iTInfo,
LCID lcid,
ITypeInfo ** ppTInfo);
STDMETHODIMP GetIDsOfNames(
REFIID riid,
OLECHAR ** rgszNames,
UINT cNames,
LCID lcid,
DISPID * rgDispId);
STDMETHODIMP Invoke(
DISPID dispIdMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS * pDispParams,
VARIANT * pVarResult,
EXCEPINFO * pExcepInfo,
PUINT puArgErr);
private:
CSciArcus * m_pSciArcus;
ULONG m_cRefs;
DISPID m_dispidError;
DISPID m_dispidHaveConnectedDevice;
};
friend CImpISink;
};
struct MY_SUBCLASS
{
CSciArcus * m_pSciArcus;
WNDPROC m_wpOrig;
}; |
903809f25a4ba5047e87039635f1cfdf85043f0f | 3e3a80316a803db0b67b386b1f0f6b2535eefe20 | /Template_class/template.h | d777bc1f0e602cce1c8f10fb7f1856f690d0d899 | [] | no_license | srkunaljagtap/c-plus-plus-Implementation | 2d5ba3730a827d8b4b785ad2250da134b617d457 | 559fdfff99f651658366e07f46b24d46bd4e4ff7 | refs/heads/master | 2021-01-21T13:11:41.621237 | 2016-05-15T22:09:12 | 2016-05-15T22:09:12 | 55,740,266 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 234 | h | template.h | #pragma once
template <class M>
M maximum(M value1, M value2, M value3)
{
M maimumvalue = value1;
if (value2 > maimumvalue) {
maimumvalue = value2;
}
if (value3 > maimumvalue) {
maimumvalue = value3;
}
return maimumvalue;
} |
337b4eb1e926f664a1106f64ed288763716bd135 | b0897cb3a6f9a897d8e2028b35e6b6be6c2d24fd | /Zorkish/CommandPut.cpp | 8e0090ff636df0b75e8c437aee79dec0da6449fb | [] | no_license | jasonristeski/CPP | eba5b83b68463341709cd1b921fb9ddadb0e2333 | 5bd6183ced7b4506b28ba01f11df5de44ffc8c66 | refs/heads/master | 2020-03-30T11:33:56.584625 | 2018-10-18T08:49:12 | 2018-10-18T08:49:12 | 151,180,499 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 654 | cpp | CommandPut.cpp | #include "CommandPut.h"
#include "Adventure.h"
#include "StateManager.h"
void CommandPut::execute(std::vector<std::string> args)
{
Adventure* adv = StateManager::getAdventure();
if (args.size() == 4 && args[2] == "in") // put x in y
{
if (adv->getPlayer()->getInventory()->has(args[1]))
{
Item* temp = adv->getPlayer()->getInventory()->removeItem(args[1]);
bool found = false;
for (int i = 0; i < adv->getCurrentLocation()->containers.size(); i++)
{
if (adv->getCurrentLocation()->containers[i]->getName() == args[3])
{
adv->getCurrentLocation()->containers[i]->addEntity(temp);
found = true;
}
}
}
}
}
|
06d7990a3b1073f0fb8a5ce35b1d02c4523c2788 | e10b1380edec77ac043fad3c4142eef58449c857 | /AnalyzeScripts/makeBkgEstimates.C | 5ccb27a02356cb450a571e9d312346b8ab452c07 | [] | no_license | mirandabryson/StopAnalysis | e46b62fb23c345d933fd5e57f729e3e98e867fec | 0b09e278ab484f68239ac58658363ef30df7ec88 | refs/heads/master | 2020-04-30T11:36:34.664059 | 2019-03-13T15:01:20 | 2019-03-13T15:01:20 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,014 | c | makeBkgEstimates.C | // -*- C++ -*-
const bool useMetExtrapolation = true;
const double extr_threshold = 3; // minimum number of events in a bin to not need an MET extrapolation
const bool doCRPurityError = true;
void dataDrivenFromCR(TFile* fdata, TFile* fmc, TFile* fout, TString ddtype, TString gentype) {
// Additional hists to consider: dataStats, MCstats, impurity
TList* listOfDirs = fmc->GetListOfKeys();
for (auto k : *listOfDirs) {
TString srname = k->GetName();
if (!srname.Contains("sr")) continue;
if (srname.Contains("base")) continue;
TString crname = srname;
crname.ReplaceAll("sr", ddtype);
TString hname_data_CR = crname + "/h_metbins";
TString hname_MC_SR = srname + "/h_metbins" + gentype;
TString hname_MC_CR = crname + "/h_metbins";
auto outdir = (TDirectory*) fout->mkdir(srname);
auto hist_data_CR = (TH1D*) fdata->Get(hname_data_CR);
auto hist_MC_CR = (TH1D*) fmc->Get(hname_MC_CR);
auto hist_MC_SR = (TH1D*) fmc->Get(hname_MC_SR);
if (!fmc->Get(hname_MC_CR)) {
cout << "Couldn't find yield hist for " << hist_MC_CR << " in " << fmc->GetName() << "!!" << endl;
cout << "This should not happend! Can not use data driven on this region! Use MC yields directly use TF from other SR!" << endl;
continue; // <-- actions to be added
}
if (!fmc->Get(hname_MC_SR)) {
cout << "Couldn't find yield hist for " << hist_MC_SR << " in " << fmc->GetName() << ". Cannot define TF!" << endl;
continue; // <-- actions to be added
}
if (!fdata->Get(hname_data_CR)) {
cout << "Couldn't find yield hist for " << hist_data_CR << " in " << fdata->GetName() << ". Please use yield from MC!" << endl;
continue; // <-- actions to be added
}
int lastbin = hist_data_CR->GetNbinsX();
int extr_start_bin = lastbin; // the bin to start extrapolation, if == lastbin means no MET extrapolation is needed
auto combineYieldsInExtrBins = [&](TH1D* hist) {
double err = 0;
double ylds = hist->IntegralAndError(extr_start_bin, -1, err);
for (int ibin = extr_start_bin; ibin <= lastbin; ++ibin) {
hist->SetBinContent(ibin, ylds);
hist->SetBinError(ibin, err);
}
};
if (useMetExtrapolation) {
double err = 0;
double ylds = 0;
for (; extr_start_bin > 1; --extr_start_bin) {
ylds = hist_MC_CR->IntegralAndError(extr_start_bin, -1, err);
if (ylds > extr_threshold) break;
}
if (extr_start_bin != lastbin) {
cout << "Doing MET extrapolation for " << crname << " from bin " << extr_start_bin << " to bin " << lastbin << " (last bin)!" << endl;
combineYieldsInExtrBins(hist_data_CR);
}
}
TH1D* centralHist;
auto crdir = (TDirectoryFile*) fmc->Get(crname);
for (auto h : *(crdir->GetListOfKeys())) {
TString hname = h->GetName();
if (!hname.BeginsWith("h_metbins")) continue;
// hardcode genclass skipping for now
if (hname.Contains("_2lep") || hname.Contains("_1lep") || hname.Contains("_Znunu") || hname.Contains("_unclass")) continue;
TString hnameSR = hname;
hnameSR.ReplaceAll("h_metbins", "h_metbins" + gentype);
// Not using fraction
auto hist_MC_CR = (TH1D*) crdir->Get(hname);
auto hist_MC_SR = (TH1D*) fmc->Get(srname + "/" + hnameSR);
if (!hist_MC_SR) {
if (!hnameSR.Contains("cr2lTriggerSF"))
cout << "Couldn't find yield hist for " << (srname + "/" + hnameSR) << " in " << fmc->GetName() << ". Use centralHist!" << endl;
hist_MC_SR = (TH1D*) fmc->Get(hname_MC_SR)->Clone(hnameSR);
}
if (useMetExtrapolation && extr_start_bin != lastbin)
combineYieldsInExtrBins(hist_MC_CR);
auto alphaHist = (TH1D*) hist_MC_SR->Clone(hname+"_alpha");
alphaHist->Divide(hist_MC_CR);
for (int i = 1; i <= alphaHist->GetNbinsX(); ++i) {
// zero out negative yields
if (alphaHist->GetBinContent(i) < 0) {
alphaHist->SetBinContent(i, 0);
alphaHist->SetBinError(i, 0);
}
}
outdir->cd();
TH1D* hout = (TH1D*) alphaHist->Clone(hname);
hout->Multiply(hist_data_CR);
hout->Write();
if (hname.EndsWith("h_metbins")) {
centralHist = hout;
// Store the central alpha hist and extr_start_bin for signal contamination
alphaHist->Write("h_alphaHist");
if (useMetExtrapolation && extr_start_bin < lastbin) {
TH1D* h_extrstart = new TH1D("h_extrstart", "MET extrapolation start bin", 1, 0, 1);
h_extrstart->SetBinContent(1, extr_start_bin);
h_extrstart->Write();
}
if (doCRPurityError) {
auto hist_MC_CR_pure = (TH1D*) fmc->Get(hname_MC_CR + gentype);
auto hout_purityUp = (TH1D*) hout->Clone(hname+"_CRpurityUp");
auto hout_purityDn = (TH1D*) hout->Clone(hname+"_CRpurityDn");
if (useMetExtrapolation && extr_start_bin < lastbin)
combineYieldsInExtrBins(hist_MC_CR_pure);
for (int ibin = 1; ibin <= lastbin; ++ibin) {
double crpurityerr = 0.5 * (hist_MC_CR->GetBinContent(ibin) - hist_MC_CR_pure->GetBinContent(ibin)) / hist_MC_CR->GetBinContent(ibin);
hout_purityUp->SetBinContent(ibin, hout->GetBinContent(ibin) / ( 1 - crpurityerr));
hout_purityDn->SetBinContent(ibin, hout->GetBinContent(ibin) / ( 1 + crpurityerr));
}
hout_purityUp->Write();
hout_purityDn->Write();
auto purityHist = (TH1D*) hist_MC_CR_pure->Clone("h_CRpurity");
purityHist->Divide(hist_MC_CR_pure, hist_MC_CR, 1, 1, "B");
purityHist->Write();
}
}
}
// Create alphaHist for dataStats
auto h_dataStats = (TH1D*) centralHist->Clone("h_metbins_dataStats");
auto h_MCStats = (TH1D*) centralHist->Clone("h_metbins_MCStats");
for (int ibin = 1; ibin <= extr_start_bin; ++ibin) {
// If not doing met extrapolation, extr_start_bin will equal to lastbin
double data_error_thisbin = (hist_data_CR->GetBinContent(ibin) < 0.01)? 0 : hist_data_CR->GetBinError(ibin) / hist_data_CR->GetBinContent(ibin);
h_dataStats->SetBinError(ibin, data_error_thisbin * h_dataStats->GetBinContent(ibin));
double MC_SR_error_thisbin = (hist_MC_SR->GetBinContent(ibin) < 1e-5)? 0 : hist_MC_SR->GetBinError(ibin) / hist_MC_SR->GetBinContent(ibin);
double MC_CR_error_thisbin = (hist_MC_CR->GetBinContent(ibin) < 1e-5)? 0 : hist_MC_CR->GetBinError(ibin) / hist_MC_CR->GetBinContent(ibin);
double MC_error_thisbin = sqrt(MC_SR_error_thisbin*MC_SR_error_thisbin + MC_CR_error_thisbin*MC_CR_error_thisbin);
h_MCStats->SetBinError(ibin, MC_error_thisbin * h_MCStats->GetBinContent(ibin));
}
for (int ibin = extr_start_bin+1; ibin <= lastbin; ++ibin) {
// If doing met extrapolation, the bins following extr_start_bin for data and MC CR will be set to have 0 stat error
// TODO: verify that this is the right thing to do
h_dataStats->SetBinError(ibin, 0);
double MC_SR_error_thisbin = (hist_MC_SR->GetBinContent(ibin) < 1e-5)? 0 : hist_MC_SR->GetBinError(ibin) / hist_MC_SR->GetBinContent(ibin);
h_MCStats->SetBinError(ibin, MC_SR_error_thisbin * h_MCStats->GetBinContent(ibin));
}
h_dataStats->Write();
h_MCStats->Write();
hist_data_CR->Clone("h_datayields_CR")->Write();
hist_MC_CR->Clone("h_MCyields_CR")->Write();
hist_MC_SR->Clone("h_MCyields_SR")->Write();
}
}
void takeDirectlyFromMC(TFile* fin, TFile* fout, TString gentype) {
TList* listOfDirs = fin->GetListOfKeys();
for (auto k : *listOfDirs) {
TString srname = k->GetName();
if (!srname.Contains("sr")) continue;
if (srname.Contains("base")) continue;
auto indir = (TDirectoryFile*) fin->Get(srname);
auto outdir = (TDirectory*) fout->mkdir(srname);
auto hlist = indir->GetListOfKeys();
for (auto h : *hlist) {
TString hname = h->GetName();
if (!hname.BeginsWith("h_metbins" + gentype)) continue;
TH1D* hin = (TH1D*) indir->Get(hname);
outdir->cd();
TH1D* hout = (TH1D*) hin->Clone(hname.ReplaceAll(gentype, ""));
for (int i = 1; i <= hout->GetNbinsX(); ++i) {
// zero out negative yields
if (hout->GetBinContent(i) < 0) {
hout->SetBinContent(i, 0);
hout->SetBinError(i, 0);
}
}
hout->Write();
}
if (!outdir->Get("h_metbins")) {
cout << "Didn't find yield hist for " << gentype << " in " << fin->GetName() << ":" << srname << "/. Faking a 0 one!" << endl;
outdir->cd();
// Get the MET binning from h_metbins, which shall always exist, and then set all bins to 0
TH1D* hout = (TH1D*) fin->Get(srname + "/h_metbins")->Clone("h_metbins");
for (int i = 1; i <= hout->GetNbinsX(); ++i) {
hout->SetBinContent(i, 0);
hout->SetBinError(i, 0);
}
hout->Write();
}
}
}
int makeBkgEstimates(string input_dir="../StopLooper/output/temp14", string output_dir="../StopLooper/output/temp14", string suffix = "17") {
// Set input files (global pointers)
TFile* fbkg = new TFile(Form("%s/allBkg_%s.root",input_dir.c_str(),suffix.c_str()));
TFile* fdata = new TFile(Form("%s/allData_%s.root",input_dir.c_str(),suffix.c_str()));
if (!fdata) {
cout << "Couldn't find fdata!! Can't procceed, exiting!\n"; return -1;
}
// Create output files
TFile* f2l = new TFile(Form("%s/lostlepton.root",output_dir.c_str()), "RECREATE");
TFile* f1l = new TFile(Form("%s/1lepFromW.root",output_dir.c_str()), "RECREATE");
TFile* f1ltop = new TFile(Form("%s/1lepFromTop.root",output_dir.c_str()), "RECREATE");
TFile* fznunu = new TFile(Form("%s/ZToNuNu.root",output_dir.c_str()), "RECREATE");
dataDrivenFromCR(fdata, fbkg, f2l, "cr2l", "_2lep");
dataDrivenFromCR(fdata, fbkg, f1l, "cr0b", "_1lepW");
takeDirectlyFromMC(fbkg, f1ltop, "_1lepTop");
takeDirectlyFromMC(fbkg, fznunu, "_Znunu");
return 0;
}
|
ae13c91c9a6276f0702b0d86600ee737ffcf2a73 | c3d4f43717d0c098a9bb99f1c60d0688f5057e1d | /codeforces/Codeforces#543Div2.C.cpp | 29fa15fd7087e00ab02c24e2ce6c12c2e8c14633 | [] | no_license | moneymaniacteam/algorithm | 96701ab7e140ec26c7363fccd1929c8e948319ff | 516175e33bc1d42d556fa43bf1fce0725eaa12c4 | refs/heads/main | 2023-05-05T12:28:20.234649 | 2021-05-25T16:56:30 | 2021-05-25T16:56:30 | 362,050,705 | 0 | 0 | null | 2021-04-27T09:13:19 | 2021-04-27T09:13:18 | null | UTF-8 | C++ | false | false | 1,115 | cpp | Codeforces#543Div2.C.cpp | #include <bits/stdc++.h>
using namespace std;
#define INF 987654321
#define FOR(var, start, to) for(int var = start; var < to; var++)
#define MAX(a, b) a > b ? a : b
#define MIN(a, b) a < b ? a : b
#define MAX3(a, b, c) MAX(a, MAX(b, c))
#define MIN3(a, b, c) MIN(a, MIN(b, c))
#define ABS(a) a < 0 ? -a : a
typedef long long int ll;
typedef unsigned long long int ull;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
int check[151];
int main() {
ios_base::sync_with_stdio(false); cin.tie(0);
int n, k, m = 0, ans = 0;
bool flag = false;
vi v, a;
cin >> n >> k;
for(int i = 0; i < n; i++) {
int input;
cin >> input; v.push_back(input); a.push_back(input);
}
while(!v.empty()) {
for(int i = 0; i < min(n - m, k); i++) {
v[i]--;
if(v[i] <= 0) {
m++;
v.erase(v.begin() + i);
a.erase(a.begin() + i);
flag = true;
}
}
if(flag) {
for(int i = 0; i < min(n - m, k); i++) {
if(a[i] - v[i] < (100 * m / n) + 1)
ans++;
}
flag = false;
}
}
cout << ans;
return 0;
}
|
9b06893ae950eacb7d7a0196916c4eac1ab47fb0 | 2ffce6f6d7a6ccc6f201216a891109c52f883538 | /C++/cpp_project3/ClubCenter/Club.h | 88e9f9d67899819986f1a91cf76e7bc6d66680cd | [] | no_license | Enderfga/Enderfga | 39b447f969800e38a5c0379e16a7fae9fa49d347 | 172311204ef59b5546c6c1fe210f7bfb28b80681 | refs/heads/main | 2023-08-31T02:47:17.668640 | 2023-08-31T02:20:37 | 2023-08-31T02:20:37 | 351,614,060 | 59 | 7 | null | null | null | null | UTF-8 | C++ | false | false | 1,800 | h | Club.h | #pragma once
#include"Activity.h"
#include<vector>
class Club
{//抽象类,只有纯虚函数,借助其指针实现多态效果
public:
Club(){}
~Club(){}
virtual void displayMembers() const = 0;
virtual void displayActivities() const = 0;
virtual void addMember(const Person&) = 0;
virtual void addActivity(const Activity&) = 0;
protected://基类用protected而不是private,子类可以访问
std::string name_;
std::set<std::shared_ptr<Person>> members_;
std::set<std::shared_ptr<Activity>> activity_;
};
class SportsClub:public Club
{
public:
SportsClub();
SportsClub(std::string name,std::set<std::shared_ptr<Person>> members,std::set<std::shared_ptr<Activity>> activity, std::string coach);
SportsClub(const SportsClub& sc);
~SportsClub(){}
void displayMembers() const;
void displayActivities() const;
void addMember(const Person& p);
void addActivity(const Activity& a);
enum interest_ { Running, Swimming, Basketball,Volleyball }used;//枚举变量
private:
std::string coach_;
};
class MusicClub :public Club
{
public:
MusicClub();
MusicClub(std::string name, std::set<std::shared_ptr<Person>> members, std::set<std::shared_ptr<Activity>> activity, std::string musician);
MusicClub(const MusicClub& mc);
~MusicClub() {}
void displayMembers() const;
void displayActivities() const;
void addMember(const Person& p);
void addActivity(const Activity& a);
enum instrument_ { Piano, Violine, Songs }used;//枚举变量
private:
std::string musician_;
};
class ClubCenter
{
public:
ClubCenter();
ClubCenter(std::vector<std::shared_ptr<Club>> clubs);
ClubCenter(const ClubCenter &cc);
~ClubCenter(){}
void displayClub();
void addClub(std::shared_ptr<Club> c);//直接以Club的智能指针作为参数
private:
std::vector<std::shared_ptr<Club>> clubs_;
}; |
d39db99a7cc4dc82eccda46465633388190df195 | 68aaf3c62a97417d9f8c91e91eb96bff8ef61507 | /Strassenverkehr/Aufgabenblock_3/FzgFahren.h | b6d5eaf6936354c2735c8074ed82aef980ca72d4 | [] | no_license | bwirsen/Info-Praktikum-2 | f14cb4e0278399e8a0272d6034a81df91a9ad59f | 6d4c150a69d306f158f672e90870490c1935bc58 | refs/heads/master | 2020-03-24T11:46:31.577500 | 2018-11-26T12:44:00 | 2018-11-26T12:44:00 | 142,694,837 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 249 | h | FzgFahren.h | #pragma once
#include "FzgVerhalten.h"
#include "Fahrzeug.h"
#include "Streckenende.h"
class FzgFahren :
public FzgVerhalten
{
public:
FzgFahren();
FzgFahren(Weg* p_pWeg);
~FzgFahren();
double dStrecke(Fahrzeug * pFahrzeug, double dZeit);
};
|
245f1c49fc741f9d12885385a5620fe1a7a881ff | 7fb5dfc62d59e9a15989025b589e6c2bd81d1e9a | /Learning C++/Templates/Person.h | 6a4b0cbddd91fd58988a2f75c2db7adec137b0b4 | [] | no_license | GauthamBanasandra/Cpp | 87d78b7625a3989df54a8ba5dc18bec44c8920f3 | b30626b037b913cf28fdcf7390b309fc979ccfb7 | refs/heads/master | 2020-06-10T01:22:34.106431 | 2017-05-24T14:51:03 | 2017-05-24T14:51:03 | 76,117,458 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 395 | h | Person.h | #pragma once
#include <iostream>
class Person
{
public:
Person();
Person(int, std::string);
// Invokes for "person1 < person2"
bool operator<(Person &);
// Invokes for "person1 < 200"
bool operator<(int);
~Person();
private:
int age;
public:
std::string name;
// Need to make the function const if the method doesn't modify the member variables.
int GetAge() const;
};
#pragma once
|
2c36f6fd4dabac2f277309470990042b1877ab8d | ff308fe38044c0f4cfba76758ff77742293cfda4 | /util.cpp | 871b384f72af0e3cb1bc5eadb64a3285c5589e57 | [] | no_license | adadaadadade/MyCompiler | d59b5615d9b5fe35e1f6e0fe45154a7ad6133073 | 72710a2af5d867f97812ffa7cab62fdc3ba4982c | refs/heads/master | 2023-06-13T08:44:54.782794 | 2021-07-11T16:37:50 | 2021-07-11T16:37:50 | 371,980,250 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,408 | cpp | util.cpp | #include <iostream>
#include "util.h"
#include "scanner.h"
#include "lexer.h"
using namespace std;
// \n | \t | \v | \b | \r | \f | \a| \\ | \? | \’ | \"
bool esc2chr(string& str,char ch)
{
if(ch == 'n') str.push_back('\n');
else if(ch == 't') str.push_back('\t');
else if(ch == 'v') str.push_back('\v');
else if(ch == 'b') str.push_back('\b');
else if(ch == 'r') str.push_back('\r');
else if(ch == 'f') str.push_back('\f');
else if(ch == 'a') str.push_back('\a');
else if(ch == '\\') str.push_back('\\');
else if(ch == '?') str.push_back('\?');
else if(ch == '\'') str.push_back('\'');
else if(ch == '"') str.push_back('\"');
else return false;
return true;
}
void outputScanner(Scanner scanner){
char ch;
while((ch = scanner.nextChar()) != EOF)
{
printf("<'%c',%d ,%d>", ch, scanner.get_line(), scanner.get_col());
printf("\n");
}
//KeyWords();
//printf("%d\n",(KeyWords::getKWType("int")));
//printf("%d\n",(KeyWords::getKWType("NULL")));
//printf("%d\n",(KeyWords::getKWType("alloc_array")));
//printf("%d\n",(KeyWords::getKWType("sdasdas")));
}
void outputTokens(Lexer lexer){
Token* token = lexer.nextToken();
while(token)
{
cout << token->to_string() << " ";
if(token->tag == END)
break;
token = lexer.nextToken();
}
cout << endl;
}
|
7abb9adc8ad1e798e2b85239efdae309acc0ceff | 4faf2963214ad24f1dcc759ea3dec6dd65ade856 | /mobile/src/operators/kernel/cl/elementwise_mul_kernel.cpp | 51a213026b8c9b5f44fc9690e1cf4f6baf2a7276 | [
"Apache-2.0",
"DOC"
] | permissive | xiebaiyuan/paddle-mobile | a8b6cd22a9ea08a3d84a7f6ed263fa5134f58f26 | 4a43612b35cecca9a17a848477ede3b578470e63 | refs/heads/master | 2021-06-02T14:01:42.368276 | 2021-04-27T12:29:23 | 2021-04-27T12:29:23 | 297,587,504 | 3 | 5 | Apache-2.0 | 2021-03-08T14:32:10 | 2020-09-22T08:39:45 | C++ | UTF-8 | C++ | false | false | 9,451 | cpp | elementwise_mul_kernel.cpp | /* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifdef ELEMENTWISEMUL_OP
#include "operators/kernel/elementwise_mul_kernel.h"
#include <framework/cl/cl_half.h>
#include <iostream>
#include "framework/cl/cl_image.h"
namespace paddle_mobile {
namespace operators {
template <>
bool ElementwiseMulKernel<GPU_CL, float>::Init(
ElementwiseMulParam<GPU_CL> *param) {
framework::CLImage *bias = reinterpret_cast<framework::CLImage *>(
const_cast<framework::CLImage *>(param->InputY()));
if (bias->dims() == param->InputX()->dims()) {
DLOG << "init element wise mul";
this->cl_helper_.AddKernel("elementwise_mul", "elementwise_mul_kernel.cl");
} else {
const int bias_dim_size = bias->dims().size();
if (bias_dim_size == 1) {
DLOG << "init channel_mul";
this->cl_helper_.AddKernel("channel_mul", "elementwise_mul_kernel.cl");
} else if (bias_dim_size == 2) {
// etc. input 1 72 28 28
// filter 1 72
DLOG << "init channel_mul_d2";
this->cl_helper_.AddKernel("channel_mul_d2", "elementwise_mul_kernel.cl");
} else if (bias_dim_size == 3) {
DLOG << "init channel_mul_d3";
this->cl_helper_.AddKernel("channel_mul_d3", "elementwise_mul_kernel.cl");
} else if (bias_dim_size == 4) {
DLOG << "init channel_mul_d4";
this->cl_helper_.AddKernel("channel_mul_d4", "elementwise_mul_kernel.cl");
} else {
PADDLE_MOBILE_ENFORCE(false,
"element mul not supported this situation yet");
}
}
return true;
}
template <>
void ElementwiseMulKernel<GPU_CL, float>::Compute(
const ElementwiseMulParam<GPU_CL> ¶m) {
auto input = param.InputX();
auto bias = param.InputY();
auto output = param.Out();
cl_int status;
auto kernel = this->cl_helper_.KernelAt(0);
if (bias->dims() == input->dims()) {
cl_mem input_image = input->GetCLImage();
cl_mem bias_image = bias->GetCLImage();
cl_mem output_image = output->GetCLImage();
status = clSetKernelArg(kernel, 0, sizeof(cl_mem),
reinterpret_cast<void *>(&input_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 1, sizeof(cl_mem),
reinterpret_cast<void *>(&bias_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 2, sizeof(cl_mem),
reinterpret_cast<void *>(&output_image));
CL_CHECK_ERRORS(status);
auto width = input->ImageWidth();
auto height = input->ImageHeight();
size_t global_work_size[2] = {width, height};
status =
clEnqueueNDRangeKernel(this->cl_helper_.CLCommandQueue(), kernel, 2,
NULL, global_work_size, NULL, 0, NULL, NULL);
CL_CHECK_ERRORS(status);
} else {
const int bias_dim_size = bias->dims().size();
if (bias_dim_size == 1) {
DLOG << "channel mul";
cl_mem input_image = input->GetCLImage();
cl_mem bias_image = bias->GetCLImage();
cl_mem output_image = output->GetCLImage();
int tensor_w = input->dims()[input->dims().size() - 1];
status = clSetKernelArg(kernel, 0, sizeof(cl_mem),
reinterpret_cast<void *>(&input_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 1, sizeof(cl_mem),
reinterpret_cast<void *>(&bias_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 2, sizeof(cl_mem),
reinterpret_cast<void *>(&output_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 3, sizeof(cl_int),
reinterpret_cast<void *>(&tensor_w));
CL_CHECK_ERRORS(status);
auto width = input->ImageWidth();
auto height = input->ImageHeight();
size_t global_work_size[2] = {width, height};
status =
clEnqueueNDRangeKernel(this->cl_helper_.CLCommandQueue(), kernel, 2,
NULL, global_work_size, NULL, 0, NULL, NULL);
CL_CHECK_ERRORS(status);
} else if (bias_dim_size == 2) {
DLOG << "channel mul d2";
// etc. input 1 72 28 28
// filter 1 72 --> 1 1 1 72
DLOG << "input->ImageDims(): " << input->ImageDims();
DLOG << "bias->ImageDims(): " << bias->ImageDims();
DLOG << "out->ImageDims(): " << output->ImageDims();
DLOG << "channel mul d2";
cl_mem input_image = input->GetCLImage();
cl_mem bias_image = bias->GetCLImage();
cl_mem output_image = output->GetCLImage();
int tensor_w = input->dims()[input->dims().size() - 1];
status = clSetKernelArg(kernel, 0, sizeof(cl_mem),
reinterpret_cast<void *>(&input_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 1, sizeof(cl_mem),
reinterpret_cast<void *>(&bias_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 2, sizeof(cl_mem),
reinterpret_cast<void *>(&output_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 3, sizeof(cl_int),
reinterpret_cast<void *>(&tensor_w));
CL_CHECK_ERRORS(status);
auto width = input->ImageWidth();
auto height = input->ImageHeight();
size_t global_work_size[2] = {width, height};
status =
clEnqueueNDRangeKernel(this->cl_helper_.CLCommandQueue(), kernel, 2,
NULL, global_work_size, NULL, 0, NULL, NULL);
CL_CHECK_ERRORS(status);
// bias->PrintTensor(*bias);
} else if (bias_dim_size == 3) {
DLOG << "channel_mul_d3";
// etc. input 1 72 28 28
// filter 1 72 --> 1 1 1 72
DLOG << "input->ImageDims(): " << input->ImageDims();
DLOG << "bias->ImageDims(): " << bias->ImageDims();
DLOG << "out->ImageDims(): " << output->ImageDims();
DLOG << "channel mul d3";
cl_mem input_image = input->GetCLImage();
cl_mem bias_image = bias->GetCLImage();
cl_mem output_image = output->GetCLImage();
int tensor_w = input->dims()[input->dims().size() - 1];
status = clSetKernelArg(kernel, 0, sizeof(cl_mem),
reinterpret_cast<void *>(&input_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 1, sizeof(cl_mem),
reinterpret_cast<void *>(&bias_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 2, sizeof(cl_mem),
reinterpret_cast<void *>(&output_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 3, sizeof(cl_int),
reinterpret_cast<void *>(&tensor_w));
CL_CHECK_ERRORS(status);
auto width = input->ImageWidth();
auto height = input->ImageHeight();
size_t global_work_size[2] = {width, height};
status =
clEnqueueNDRangeKernel(this->cl_helper_.CLCommandQueue(), kernel, 2,
NULL, global_work_size, NULL, 0, NULL, NULL);
CL_CHECK_ERRORS(status);
} else if (bias_dim_size == 4) {
DLOG << "channel_mul_d4";
// etc. input 1 72 28 28
// filter 1 72 --> 1 1 1 72
DLOG << "input->ImageDims(): " << input->ImageDims();
DLOG << "bias->ImageDims(): " << bias->ImageDims();
DLOG << "out->ImageDims(): " << output->ImageDims();
DLOG << "channel mul d4";
cl_mem input_image = input->GetCLImage();
cl_mem bias_image = bias->GetCLImage();
cl_mem output_image = output->GetCLImage();
int tensor_w = input->dims()[input->dims().size() - 1];
status = clSetKernelArg(kernel, 0, sizeof(cl_mem),
reinterpret_cast<void *>(&input_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 1, sizeof(cl_mem),
reinterpret_cast<void *>(&bias_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 2, sizeof(cl_mem),
reinterpret_cast<void *>(&output_image));
CL_CHECK_ERRORS(status);
status = clSetKernelArg(kernel, 3, sizeof(cl_int),
reinterpret_cast<void *>(&tensor_w));
CL_CHECK_ERRORS(status);
auto width = input->ImageWidth();
auto height = input->ImageHeight();
size_t global_work_size[2] = {width, height};
status =
clEnqueueNDRangeKernel(this->cl_helper_.CLCommandQueue(), kernel, 2,
NULL, global_work_size, NULL, 0, NULL, NULL);
CL_CHECK_ERRORS(status);
} else {
PADDLE_MOBILE_ENFORCE(false, "element mul not support this situation yet")
}
}
}
template class ElementwiseMulKernel<GPU_CL, float>;
} // namespace operators
} // namespace paddle_mobile
#endif
|
972966fe75188c6ff759746b1e5f60096ddc0ab1 | 825baf7b3ecbcbdcd2f8b86179a802739ba3636c | /src/math/angle/wrap_degrees.hpp | 4c4cc30b34d498272e8431dbe23ef9b02a251b41 | [
"MIT"
] | permissive | brucelevis/zenith | 1c8fcdb273c7497a73046f1d1a9112f7c8f9ebfb | eeef065ed62f35723da87c8e73a6716e50d34060 | refs/heads/master | 2023-08-28T21:28:05.552328 | 2021-10-15T19:14:13 | 2021-10-15T19:14:13 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 581 | hpp | wrap_degrees.hpp | /**
* @file
* @author __AUTHOR_NAME__ <mail@host.com>
* @copyright 2021 __COMPANY_LTD__
* @license <a href="https://opensource.org/licenses/MIT">MIT License</a>
*/
#ifndef ZEN_MATH_ANGLE_WRAPDEGREES_HPP
#define ZEN_MATH_ANGLE_WRAPDEGREES_HPP
namespace Zen {
namespace Math {
/**
* Wrap an angle in degrees.
*
* Wraps the angle to a value in the range of -180 to 180.
*
* @since 0.0.0
*
* @param angle The angle to wrap, in degrees.
*
* @return The wrapped angle, in degrees.
*/
double WrapDegrees (double angle);
} // namespace Math
} // namespace Zen
#endif
|
f11ef9dd6dfeca454c737cc7c3df9001f51acdf2 | 1ab4e3eee387d7f07a4cdc79fa3668ddc3ef09c1 | /trash/A1002 2.cpp | 029fa8ec212ae0014a77ecc0db97856639795214 | [] | no_license | lofiprogram/space | ac4e22fc43f3e0c8b9693d0b9f23e0db67245337 | cd3b139fefaa3ad98ede741189ff35db9ebe55e4 | refs/heads/main | 2023-02-15T13:07:40.717161 | 2021-01-11T13:19:59 | 2021-01-11T13:19:59 | 328,667,481 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 964 | cpp | A1002 2.cpp | #define _CRT_SECURE_NO_WARNINGS
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<vector>
#include <algorithm>
#include<set>
#include<string>
#include<unordered_map>
#include<queue>
#include <iomanip>
using namespace std;
double a[1001];
int main() {
int m, count = 0;
int x;
double y;
cin >> m;
for (int i = 0; i < m; i++) {
cin >> x >> y;
a[x] += y;
}
cin >> m;
for (int i = 0; i < m; i++) {
cin >> x >> y;
a[x] += y;
}
for (int i = 0; i < 1001; i++) {
if (a[i] != 0)count++;
}
cout << count;
for (int i = 1001; i >= 0; i--) {
if (a[i] != 0) {
cout << " " << i << " " << setiosflags(ios::fixed) << setprecision(1) << a[i];
}
}
return 0;
}
/*
https://blog.csdn.net/I_HOPE_SOAR/article/details/83064733?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.control
*/
|
f396353933019499cde33c669d09e8d153d6ea9a | d33024b33d0b2f894903916d2db55c69b86306e3 | /src/cli/cli.hpp | 14adec4c7438a2d5b48170510c1ac0329d50b0fc | [
"MIT"
] | permissive | aaron-michaux/gaffs | 2556f6d81962e7997e5e0678aae6871590e89fdd | de9ba7b24e8ef39f0f13f6f657b7f104d74f58e1 | refs/heads/main | 2022-12-30T02:36:29.142688 | 2020-10-13T13:51:17 | 2020-10-13T13:51:17 | 300,690,761 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 472 | hpp | cli.hpp |
#pragma once
#include "driver/compiler-options.hpp"
namespace giraffe
{
struct CliConfig final
{
bool show_help = false;
bool has_error = false;
vector<string> fnames = {};
CompilerOptions compiler_opts = {};
string start_rule = ""s;
};
CliConfig parse_command_line(int argc, char** argv) noexcept;
void show_help(char* argv0) noexcept;
int run(int argc, char** argv) noexcept;
} // namespace giraffe
|
d7a6aaaabfe556115017d0ccb160567439e4c14e | 62d6b2c72869b8dee9343414bc89b90961b3f8e4 | /TypeInformation/TypeInformation.cc | 34816d80bf412023d268f5417a788c4ddcfb3993 | [] | no_license | Podginator/Cattle | 81645cb3a7a002d0ae5f8dae9088551fb40b841e | 501895cc0eebae3ce812c29894cab698d60ef9fb | refs/heads/master | 2021-01-19T22:14:29.894101 | 2017-05-10T16:25:08 | 2017-05-10T16:25:08 | 88,776,197 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,623 | cc | TypeInformation.cc | #include "TypeInformation.h"
using namespace RattleLang;
using namespace std;
TypeInformation::TypeInformation() {
this->scope = nullptr;
}
TypeInformation::TypeInformation(initializer_list<type> names, Context* context)
{
for (auto i : names) {
typenames.push_back(i);
}
this->scope = context;
}
TypeInformation::TypeInformation(vector<type> names, Context* context)
{
this->scope = context;
this->typenames = names;
}
// Return the number of returned items.
size_t TypeInformation::num_return() {
return typenames.size();
}
string TypeInformation::get_c_typename() {
size_t numReturned = num_return();
if (numReturned == 1) {
return typenames[0].get_corresponding_type_string();
}
string ret = "tuple<";
ret.append(StringHelper::combine_str(typenames, ',', &type::get_corresponding_type_string ));
ret += ">";
return ret;
}
void TypeInformation::set_scope(Context *context) {
scope = context;
}
bool TypeInformation::is_empty() {
return (num_return() == 1 && typenames[0].type_name == NONE) || (num_return() == 0);
}
// Functions return a type name.
string TypeInformation::get_c_return_types() {
return get_c_typename();
}
string TypeInformation::get_rattle_typename() {
size_t numReturned = num_return();
if (numReturned == 1) {
return typenames[0].type_name;
}
string ret = "[";
ret += StringHelper::combine_str(typenames, ',', &type::get_type_name);
ret += "]";
return ret;
}
bool TypeInformation::is_void() {
return typenames.size() == 1 && typenames[0].type_name == VOID;
} |
96a2e7eecbddabf0e10ecde35651894b4dc1ea61 | 980348abab32f50717ca0d5603dd0af22ad6c823 | /rule.h | 38d2b08381438d0cf6986ab565ad2375997920d1 | [] | no_license | JosephSummerhays/cs-236 | f924572b61f987d614cd7daf4fa2b8fd74857751 | 22a67b1ae2dd6c24735210e533b421c2a5183b45 | refs/heads/master | 2021-09-11T21:56:38.829216 | 2018-04-12T17:38:33 | 2018-04-12T17:38:33 | 125,928,775 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 319 | h | rule.h | #pragma once
#include "predicate.h"
class rule {
private:
predicate* headpred;
std::vector<predicate*> predList;
public:
rule() {}
rule(predicate* headpred);
~rule() {}
void push(predicate* toPush);
vector<predicate*>& getPredList();
std::string toStr();
predicate getHead() {return (*headpred);}
};
|
dd343d7c799235a49572a0beff3378cb520d4cbd | fe6901d7ee0f461b0237ab77b4d37c3c2f545ff6 | /ContainersTest/ContainersTest.cpp | ff3c72cca2f9f3fe6f2a05298fe1716fc88b4db7 | [] | no_license | Petrik7/Exercises | 0cd4be9975ad996f2604b8c4b344cd68069dee4b | b8f3e688cdbe579ed1e613efe4cd192617a87153 | refs/heads/master | 2016-09-05T17:02:51.197651 | 2013-01-20T00:18:05 | 2013-01-20T00:18:05 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,929 | cpp | ContainersTest.cpp | // ContainersTest.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <stack>
#include <assert.h>
#include <limits>
#include <vector>
#include <string>
#include <algorithm>
#include <iostream>
#include <iterator>
#include "Stack.h"
#include "List.h"
#include "BinTreeTests.h"
int GCD(int a, int b)
{
if (b==0)
return a;
int ost = a%b;
return GCD(b, ost);
}
int _tmain(int argc, _TCHAR* argv[])
{
std::vector<int> v;
v.push_back(1);
v.push_back(2);
std::vector<int> :: iterator it = v.begin();
++it;
std:: cout << *it << " - 2" << std::endl;
++it;
if(it == v.end())
std:: cout << " - end" << std::endl;
unsigned int a = std::numeric_limits<unsigned int>::max()/2;
unsigned int b = a + 1000000;
unsigned int res = a + b;
int g = GCD(252, 105);
g = GCD(105, 252);
g = GCD(1989, 867);
std::stack<int> ss;
ss.push(11);
Stack<int> stack;
stack.Push(11);
stack.Push(22);
stack.Push(333);
while(!stack.IsEmpty())
{
int i = stack.Top();
std::cout << i << std::endl;
stack.Pop();
}
List<int> list;
list.PushFront(11);
assert(11 == *(list.Begin()));
list.PopFront();
assert(list.IsEmpty());
list.PushBack(99);
assert(99 == *(list.Begin()));
list.PopBack();
assert(list.IsEmpty());
list.PushFront(22);
list.PushBack(33);
list.PushBack(44);
list.PushFront(11);
assert(11 == *(list.Begin()));
list.Rotate();
assert(44 == *(list.Begin()));
List<int> :: iterator i = list.Begin();
int first_value = *i;
std::cout << "Printing list containt: " << std::endl;
for(; i != list.End(); ++i)
{
std::cout << *i << std::endl;
}
//List<int> :: iterator<int> iter_second = ++iter_first;
//int second_value = *iter_second;
BinTreeTests binTreeTests;
binTreeTests.Execute();
return 0;
}
|
667ec8b110f3a81c4b59f2a0af039df6fa1b3bdc | 0369ca461a912ef83bf349dd98ae26df77df75c3 | /main.cpp | f69c9b8be7abd2e8cdf63c4e560b807477624410 | [] | no_license | AmberElferink/ComputerVisionCube | ade305a187a99bc65d83acd319c61e2473dc81ab | d099a796a244845fa91b2340d429db979def80b0 | refs/heads/master | 2023-04-27T04:56:59.488945 | 2020-02-16T17:37:57 | 2020-02-16T17:37:57 | 367,667,706 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 12,009 | cpp | main.cpp | #include <SDL2/SDL.h>
#include <cstdlib>
#include <iostream>
#include <opencv2/core/opengl.hpp>
#include <opencv2/videoio.hpp>
#include <string_view>
#include <opencv2/highgui.hpp> // saving images
#include <Ui.h>
#include <Texture.h>
#include "Calibration.h"
#include "IndexedMesh.h"
#include "Pipeline.h"
#include "RenderPass.h"
#include "Renderer.h"
const cv::Size patternSize = cv::Size(6, 9);
// just copy a glsl file in here with the vertex shader
constexpr std::string_view vertexShaderSource =
"#version 450 core\n"
"layout (location = 0) in vec2 screenCoordinate;\n"
"layout (location = 0) out vec2 textureCoordinate;\n"
"\n"
"void main()\n"
"{\n"
" gl_Position = vec4(mix(vec2(-1.0, -1.0), vec2(1.0, 1.0), "
"screenCoordinate), 0.0, 1.0); //transform screen coordinate system to gl "
"coordinate system\n"
" textureCoordinate = vec2(screenCoordinate.x, 1 - "
"screenCoordinate.y);\n"
"}\n";
// fragment shader chooses color for each pixel in the frameBuffer
constexpr std::string_view fragmentShaderSource =
"#version 450 core\n"
"layout (location = 0) in vec2 textureCoordinate;\n"
"layout (location = 0) out vec4 color;\n"
"uniform sampler2D ourTexture;\n"
"void main()\n"
"{\n"
" color = texture(ourTexture, textureCoordinate);\n"
"}\n";
constexpr std::string_view axisVertexShaderSource =
"#version 450 core\n"
"layout (location = 0) in vec3 position;\n"
"layout (location = 1) in vec3 color;\n"
"layout (location = 0) out vec4 out_color;\n"
"uniform mat4 rotTransMat;\n"
"uniform mat4 cameraMat;\n"
"uniform float scaleFactor;\n"
"\n"
"void main()\n"
"{\n"
" gl_Position = cameraMat * rotTransMat * vec4(-position.xy * scaleFactor, position.z * scaleFactor, 1.0);\n"
" out_color = vec4(color, 1.0);\n"
"}\n";
constexpr std::string_view axisFragmentShaderSource =
"#version 450 core\n"
"layout (location = 0) in vec4 in_color;\n"
"layout (location = 0) out vec4 out_color;\n"
"void main()\n"
"{\n"
" out_color = in_color;\n"
"}\n";
//this loops over the vertices only (not any surface in between)
constexpr std::string_view cubeVertexShaderSource =
"#version 450 core\n"
"layout (location = 0) in vec3 position;\n"
"layout (location = 1) in vec3 normal;\n"
"layout (location = 0) out vec4 world_pos;\n"
"layout (location = 1) out vec3 world_normal;\n"
"uniform mat4 rotTransMat;\n"
"uniform mat4 cameraMat;\n"
"uniform float scaleFactor;\n"
"\n"
"void main()\n"
"{\n"
" vec4 mod_position = vec4(-position.xy, position.z, 1.0f); //flip position xy so the cube points toward the center of the checkboard\n"
" mod_position.xyz = mod_position.xyz * scaleFactor;\n"
" world_pos = rotTransMat * mod_position;\n"
" world_normal = normalize(rotTransMat * vec4(-normal.xy, normal.z, 0)).xyz; //normal is not affected by translations, so 0, //since position xy are flipped, normals should be too \n"
" gl_Position = cameraMat * world_pos;\n"
"}\n";
//this loops over the surfaces in between, after the transform tu unit projection space, so basically the pixels.
constexpr std::string_view cubeFragmentShaderSource =
"#version 450 core\n"
"layout (location = 0) in vec4 position;\n"
"layout (location = 1) in vec3 normal;\n"
"layout (location = 0) out vec4 out_color;\n"
"uniform vec3 lightPos;\n"
"void main()\n"
"{\n"
" vec4 dir = vec4(lightPos, 1.0) - position;\n"
" vec3 viewDir = -normalize(position.xyz);\n"
" float dist2 = dot(dir, dir);\n"
" dir = normalize(dir);\n"
" vec3 reflectDir = reflect(-dir.xyz, normal);\n"
" float spec = pow(max(dot(viewDir, reflectDir), 0.0), 128);\n"
" float lightIntensity = (clamp(dot(dir.xyz, normal), 0.0, 0.5) * 0.2 + spec * 0.25) / dist2 + 0.2;\n"
" out_color.rgb = lightIntensity * vec3(0.349f, 0.65f, 0.67f);\n"
" out_color.a = 1.0f;\n"
"}\n";
int main(int argc, char* argv[]) {
// Select video source from command line argument 1 (an int)
int videoSourceIndex = 0;
if (argc > 1) {
videoSourceIndex = std::stoi(argv[1]);
}
cv::ocl::setUseOpenCL(true);
if (!cv::ocl::haveOpenCL()) {
std::printf("OpenCL is not available...\n");
return EXIT_FAILURE;
}
cv::ocl::Context context;
if (!context.create(cv::ocl::Device::TYPE_GPU)) {
std::printf("Failed creating the context...\n");
return EXIT_FAILURE;
}
std::printf("%zu GPU devices are detected.\n", context.ndevices());
for (int i = 0; i < context.ndevices(); i++) {
const cv::ocl::Device& device = context.device(i);
std::printf("name: %s\n"
"available: %s\n"
"imageSupport: %s\n"
"OpenCL_C_Version: %s\n",
device.name().c_str(),
device.available() ? "true" : "false",
device.imageSupport() ? "true" : "false",
device.OpenCL_C_Version().c_str());
}
cv::VideoCapture videoSource;
if (!videoSource.open(videoSourceIndex)) {
std::fprintf(stderr, "Could not open video source on index %d\n",
videoSourceIndex);
return EXIT_FAILURE;
}
cv::Size screenSize = cv::Size(videoSource.get(cv::CAP_PROP_FRAME_WIDTH), videoSource.get(cv::CAP_PROP_FRAME_HEIGHT));
auto renderer = Renderer::create("Calibration", screenSize.width, screenSize.height);
if (!renderer) {
std::fprintf(stderr, "Failed to initialize renderer\n");
return EXIT_FAILURE;
}
auto ui = Ui::create(renderer->getNativeWindowHandle());
if (!renderer) {
std::fprintf(stderr, "Failed to initialize renderer\n");
return EXIT_FAILURE;
}
auto fullscreenQuad = IndexedMesh::createFullscreenQuad("fullscreen quad");
auto axis = IndexedMesh::createAxis("axis");
auto cube = IndexedMesh::createCube("cube");
// pipelines
Pipeline::CreateInfo fullScreenPipelineInfo;
fullScreenPipelineInfo.ViewportWidth = screenSize.width;
fullScreenPipelineInfo.ViewportHeight = screenSize.height;
fullScreenPipelineInfo.VertexShaderSource = vertexShaderSource;
fullScreenPipelineInfo.FragmentShaderSource = fragmentShaderSource;
fullScreenPipelineInfo.DebugName = "fullscreen blit";
auto fullscreenPipeline = Pipeline::create(fullScreenPipelineInfo);
if (!fullscreenPipeline) {
std::fprintf(stderr, "Failed to create fullscreen pipeline\n");
return EXIT_FAILURE;
}
Pipeline::CreateInfo axisPipelineInfo;
axisPipelineInfo.ViewportWidth = screenSize.width;
axisPipelineInfo.ViewportHeight = screenSize.height;
axisPipelineInfo.VertexShaderSource = axisVertexShaderSource;
axisPipelineInfo.FragmentShaderSource = axisFragmentShaderSource;
axisPipelineInfo.LineWidth = 2.0f;
axisPipelineInfo.DebugName = "axis";
auto axisPipeline = Pipeline::create(axisPipelineInfo);
if (!axisPipeline) {
std::fprintf(stderr, "Failed to create axis pipeline\n");
return EXIT_FAILURE;
}
Pipeline::CreateInfo cubePipelineInfo;
cubePipelineInfo.ViewportWidth = screenSize.width;
cubePipelineInfo.ViewportHeight = screenSize.height;
cubePipelineInfo.VertexShaderSource = cubeVertexShaderSource;
cubePipelineInfo.FragmentShaderSource = cubeFragmentShaderSource;
cubePipelineInfo.DebugName = "cube";
auto cubePipeline = Pipeline::create(cubePipelineInfo);
if (!cubePipeline) {
std::fprintf(stderr, "Failed to create cube pipeline\n");
return EXIT_FAILURE;
}
RenderPass::CreateInfo passInfo;
passInfo.Clear = true;
passInfo.ClearColor[0] = 0.0f;
passInfo.ClearColor[1] = 0.0f;
passInfo.ClearColor[2] = 0.0f;
passInfo.ClearColor[3] = 1.0f;
passInfo.DepthWrite = false;
passInfo.DepthTest = false;
passInfo.DebugName = "full screen quad";
auto fullscreenPass = RenderPass::create(passInfo);
passInfo.Clear = false;
passInfo.DepthWrite = true;
passInfo.DepthTest = true;
auto objectPass = RenderPass::create(passInfo);
passInfo.Clear = false;
passInfo.DepthWrite = true; //turn on or off that the axes draw over the cube
passInfo.DepthTest = true; //turn on or off that the axes draw over the cube
auto axisPass = RenderPass::create(passInfo);
auto texture = Texture::create(screenSize.width, screenSize.height);
if (!texture) {
std::fprintf(stderr, "Failed to create camera texture\n");
return EXIT_FAILURE;
}
cv::Mat frame;
bool running = true;
bool calibrateFrame = false;
SDL_Event event;
float squareSideLengthM = 0.023;
Calibration calibration(patternSize, screenSize, squareSideLengthM);
bool saveNextImage = false;
std::string calibFileName;
//clang-format off
mat4 rotTransMat{
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1};
float3 lightPos = { 0.0f, 0.0f, 0.0f};
//clang-format on
bool firstFrame = true;
while (running) {
calibrateFrame = false;
// input
while (SDL_PollEvent(&event)) {
ui->processEvent(event);
switch (event.type) {
case SDL_QUIT: // cross
running = false;
break;
case SDL_KEYDOWN:
switch (event.key.keysym.sym) {
case SDLK_ESCAPE:
running = false;
break;
case SDLK_c:
calibrateFrame = true;
break;
case SDLK_r:
if (std::strcmp(ui->CalibrationDirectoryPath, "") != 0)
calibration.LoadFromDirectory(ui->CalibrationDirectoryPath);
break;
case SDLK_s:
saveNextImage = true;
break;
}
}
}
// Get frame from webcam
videoSource >> frame;
if (frame.empty()) {
std::fprintf(stderr,
"Camera returned an empty frame... Quitting.\n");
return EXIT_FAILURE;
}
if (saveNextImage) {
calibration.TakeCapture(ui->CalibrationDirectoryPath, frame);
saveNextImage = false;
}
calibration.DetectPattern(frame, calibrateFrame,
false); // write calibration colors to image
texture->upload(frame);
cubePipeline->setUniform( "lightPos", lightPos);
bool drawObjects = false;
if (calibration.UpdateRotTransMat(rotTransMat, squareSideLengthM, !firstFrame)) {
axisPipeline->setUniform("rotTransMat", rotTransMat);
axisPipeline->setUniform("cameraMat", calibration.ProjMat);
axisPipeline->setUniform( "scaleFactor", 5.0f);
cubePipeline->setUniform( "rotTransMat", rotTransMat);
cubePipeline->setUniform( "cameraMat", calibration.ProjMat);
cubePipeline->setUniform( "scaleFactor", 2.0f);
drawObjects = true;
}
// tell it you want to draw 2 triangles (2 vertices)
fullscreenPass->bind();
fullscreenPipeline->bind();
texture->bind();
fullscreenQuad->draw();
if (drawObjects) {
objectPass->bind();
cubePipeline->bind();
cube->draw();
axisPass->bind();
axisPipeline->bind();
axis->draw();
firstFrame = false;
}
ui->draw(renderer->getNativeWindowHandle(), calibration, rotTransMat, lightPos, squareSideLengthM, saveNextImage);
renderer->swapBuffers();
}
return EXIT_SUCCESS;
}
|
0d712dc91aa15dd0d0e8f3c44e9aafe96fdaf4d4 | 31a80bc9f5e1daf06532563039e771380ed6d188 | /163337_09_3/three_point.cpp | 739e03bec7076c35c1fa4791c3eb4a1bf30e8e69 | [] | no_license | SeungHyeokJeon/image_processing | c732c23789b7756f64357168ff695fab7c452534 | 796edd56eb3478e439fdaff0a695901c6f549acf | refs/heads/master | 2022-11-04T15:37:21.207613 | 2020-06-18T10:10:33 | 2020-06-18T10:10:33 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,545 | cpp | three_point.cpp | #include "opencv2/opencv.hpp"
#include <iostream>
using namespace cv;
int mx, my;
bool flag = false;
int count = 0;
Mat src, warp_dst = Mat::zeros(src.rows, src.cols, src.type());
Mat warp_mat(2, 3, CV_32FC1);
Point2f srcTri[3];
Point2f dstTri[3];
void onMouse(int event, int x, int y, int flags, void *param)
{
if (event == EVENT_LBUTTONDOWN)
{
mx = x;
my = y;
flag = true;
}
else if (event == EVENT_LBUTTONUP)
{
if (flag == true)
{
switch (count)
{
case 0:
srcTri[0] = Point2f(mx, my);
break;
case 1:
srcTri[1] = Point2f(mx, my);
break;
case 2:
srcTri[2] = Point2f(mx, my);
break;
case 3:
dstTri[0] = Point2f(mx, my);
break;
case 4:
dstTri[1] = Point2f(mx, my);
break;
case 5:
dstTri[2] = Point2f(mx, my);
warp_mat = getAffineTransform(srcTri, dstTri);
warpAffine(src, warp_dst, warp_mat, warp_dst.size());
imshow("3Point", warp_dst);
break;
}
count++;
flag = false;
}
}
}
int main()
{
src = imread("image.jpg");
imshow("Original", src);
setMouseCallback("Original", onMouse);
while (1)
{
int key = waitKey(100);
if (key == 'q')
return 0;
}
} |
690ac87b45239efae1b31c3e9dc4256c2d767d3b | f07d428eb0e5e6ce63b6102d5210fa42fa9eed87 | /include/UnfoldingFunctions.h | fba4d374de67ec4de3963225b778320f7b8ada10 | [
"Apache-2.0"
] | permissive | RhiannonSJ/SBND_Analysis_Tool | 0974313c9999e7c3d0971933ef3d129f46ac01a6 | e31378c59da54295e2fe58ab73dfee5d6cf7f7fd | refs/heads/master | 2018-12-11T23:46:41.865054 | 2018-09-13T01:05:43 | 2018-09-13T01:05:43 | 121,518,695 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,442 | h | UnfoldingFunctions.h | #ifndef UNFOLDING_FUNCTIONS_H
#define UNFOLDING_FUNCTIONS_H
#include "../src/RooUnfoldResponse.h"
#include "../src/RooUnfoldBayes.h"
#include "RooUnfoldHeaders.h"
#include "CC0piAnalysisHelper.h"
#include "CC1piAnalysisHelper.h"
#include "GeneralAnalysisHelper.h"
#include "EventSelectionTool.h"
#include "Particle.h"
#include "Event.h"
namespace ana{
// Get the response matrix for the chosen topology
void GetResponse( const EventSelectionTool::EventList & event_list,
const TopologyMap & topology,
RooUnfoldResponse & response );
// Get the true and reconstructed histograms
void GetTrueRecoHists( const EventSelectionTool::EventList & event_list,
const TopologyMap & topology,
TH2D *true_hist,
TH2D *reco_hist );
// Get event list of reconstructed events
void GetRecoEventList( const EventSelectionTool::EventList & event_list,
const TopologyMap & topology,
EventSelectionTool::ParticleList & primary_list,
EventSelectionTool::EventList & reco_event_list );
// Set info for 2D histograms
void Set2DHistInfo( TH2D *hist, const char x_axis[1024], const char y_axis[1024], const char title[1024], const char draw_opt[1024] );
}
#endif
|
636b6fcfc632ad1fc0953718c425135343fc309f | bfc88535fa1495c64672f048a5559e8bb6de1ae1 | /UVa/12289.cpp | a127d786afb745ea325f2b1c7bba52491b422d57 | [] | no_license | famus2310/CP | 59839ffe23cf74019e2f655f49af224390846776 | d8a77572830fb3927de92f1e913ee729d04865e1 | refs/heads/master | 2021-07-05T00:23:31.113026 | 2020-08-07T22:28:24 | 2020-08-07T22:28:24 | 144,426,214 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 732 | cpp | 12289.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define pb push_back
#define debug(x) cout << x << endl
#define fastio ios_base::sync_with_stdio(0), cin.tie(0)
#define PI acos(-1)
#define all(c) c.begin(), c.end()
const int MOD = 1e9 + 7;
const int INF = 1e9;
const LL INF64 = 1e18;
const int N = 1e5 + 5;
string s[] = {"one", "two", "three"};
string inp;
int main() {
int t;
scanf("%d", &t);
while (t--) {
cin >> inp;
int wrong;
for (int i = 0; i < 3; i++) {
wrong = 0;
if (inp.size() != s[i].size()) continue;
for (int j = 0; j < s[i].size() && wrong < 2; j++) {
if (s[i][j] != inp[j]) wrong++;
}
if (wrong < 2) {
cout << i + 1 << endl;
break;
}
}
}
return 0;
}
|
ebcea09925e671ee48af79155dc9953b83a94e86 | 8d11cdf7b36b99b3e58cb78c14cdb6710b39bd12 | /frenet_planner_ros/src/frenet_optimal_trajectory.cpp | 234b6e43ac2b8d53a11688539592505eac846e57 | [
"MIT"
] | permissive | thefatbandit/frenet-gym | 3852b70e4d0119737d17daed6ae5a40c8a7617f5 | 3a8ad0a9131c2f06dee891c5334d286cf34cfac2 | refs/heads/master | 2023-05-09T13:23:55.969901 | 2021-05-29T09:32:38 | 2021-05-29T09:32:38 | 279,312,479 | 1 | 1 | MIT | 2021-05-29T09:32:39 | 2020-07-13T13:36:44 | Python | UTF-8 | C++ | false | false | 7,993 | cpp | frenet_optimal_trajectory.cpp | #include "../include/frenet_optimal_trajectory.hpp"
#include <ros/console.h>
#include <geometry_msgs/Twist.h>
#include "ros/ros.h"
#include <sstream>
namespace plt = matplotlibcpp;
static int flag_for_display_paths = 0;
vecD FrenetPath::get_d_ddd()
{
return d_ddd;
}
double FrenetPath::get_cf()
{
return cf;
}
vecD FrenetPath::get_d()
{
return d;
}
vecD FrenetPath::get_yaw()
{
return yaw;
}
void FrenetPath::calc_lat_paths(double c_speed, double c_d, double c_d_d, double c_d_dd, double s0, double Ti, double di, double di_d)
{
quintic lat_qp(c_d, c_d_d, c_d_dd, di, di_d, 0.0, Ti);
for(double te = 0.0; te <= Ti + DT; te += DT)
{
t.push_back(te);
d.push_back(lat_qp.calc_point(te));
d_d.push_back(lat_qp.calc_first_derivative(te));
d_dd.push_back(lat_qp.calc_second_derivative(te));
d_ddd.push_back(lat_qp.calc_third_derivative(te));
}
}
void FrenetPath::calc_lon_paths(double c_speed, double s0, double Ti, FrenetPath &fp, double tv, double Jp)
{
// Normal Implementation
quartic lon_qp(s0, c_speed, 0.0, tv, 0.0, Ti); //s_dd is set to const. 0 (i.e. not being sampled)
for(auto const& te : t)
{
s.push_back(lon_qp.calc_point(te));
s_d.push_back(lon_qp.calc_first_derivative(te));
s_dd.push_back(lon_qp.calc_second_derivative(te));
s_ddd.push_back(lon_qp.calc_third_derivative(te));
}
//https://www.geeksforgeeks.org/std-inner_product-in-cpp/
double Js = inner_product(s_ddd.begin(), s_ddd.end(), s_ddd.begin(), 0);
double ds = pow((TARGET_SPEED - s_d.back()), 2);
cd = (KJ*Jp + KT*Ti + KD*d.back()*d.back());
// cout<<"Jp : "<<Jp<<" Ti : "<<Ti<<" d^2 : "<<d.back()*d.back()<<endl;
// cout<<"Js : "<<Js<<" Ti : "<<Ti<<" Speed around target speed : "<<ds<<endl;
cv = (KJ*Js + KT*Ti + KD_V*ds);
cf = (KLAT*cd + KLON*cv);
}
void FrenetPath::calc_lon_paths_quintic_poly(double c_speed, double s0, double Ti, FrenetPath &fp, double ts, double tv, double Jp)
{
quintic lon_qp(s0, c_speed, 0.0, s0 + ts, tv, 0.0, Ti); // s_dd is not being sampled
for(auto const& te : t)
{
s.push_back(lon_qp.calc_point(te));
// cout<<"lon_qp.calc_point(te) : "<<lon_qp.calc_point(te)<<endl;
s_d.push_back(lon_qp.calc_first_derivative(te));
s_dd.push_back(lon_qp.calc_second_derivative(te));
s_ddd.push_back(lon_qp.calc_third_derivative(te));
}
//https://www.geeksforgeeks.org/std-inner_product-in-cpp/
double Js = inner_product(s_ddd.begin(), s_ddd.end(), s_ddd.begin(), 0);
double ds = pow((TARGET_SPEED - s_d.back()), 2);
cd = (KJ*Jp + KT*Ti + KD*d.back()*d.back());
cv = (KJ*Js + KT*Ti + KD_V*ds);
cf = (KLAT*cd + KLON*cv);
}
void get_limits_d(FrenetPath lp, double *lower_limit_d, double *upper_limit_d)
{
vecD d_sampling = lp.get_d();
if(d_sampling.size() == 0)
{
*lower_limit_d = -MAX_ROAD_WIDTH;
*upper_limit_d = MAX_ROAD_WIDTH + D_ROAD_W;
}
else
{
*lower_limit_d = d_sampling.back() - MAX_SHIFT_D;
*upper_limit_d = d_sampling.back() + MAX_SHIFT_D + D_ROAD_W;
}
}
FrenetPath calc_frenet_paths(double c_speed, double c_d, double c_d_d, double c_d_dd, double s0, FrenetPath lp)
{
double lower_limit_d, upper_limit_d;
lower_limit_d = -MAX_ROAD_WIDTH;
upper_limit_d = MAX_ROAD_WIDTH + D_ROAD_W;
get_limits_d(lp, &lower_limit_d, &upper_limit_d);//IF not required to sample around previous sampled d then comment this line.
FrenetPath fp;
/*
Parameters to be subscribed:
di, Ti, di_d, tv(target_vel) ,s(optional)
*/
double tv = twist.linear.x;
double Ti = twist.linear.y;
double di = twist.linear.z;
double di_d = twist.angular.x;
//s0 = action.angular.y;
fp.calc_lat_paths(c_speed, c_d, c_d_d, c_d_dd, s0, Ti, di, di_d);
vecD d_ddd_vec = fp.get_d_ddd();
double Jp = inner_product(d_ddd_vec.begin(), d_ddd_vec.end(), d_ddd_vec.begin(), 0);
fp.calc_lon_paths(c_speed, s0, Ti, fp, tv, Jp);
return fp;
}
void FrenetPath::adding_global_path(Spline2D csp)
{
for(int i = 0; i < s.size(); i++)
{
double ix, iy;
csp.calc_position(&ix, &iy, s[i]);
if(ix == NONE)
{
break;
}
double iyaw = csp.calc_yaw(s[i]);
double di = d[i];
double fx = ix - di*sin(iyaw);
double fy = iy + di*cos(iyaw);
x.push_back(fx);
y.push_back(fy);
}
for(int i = 0; i < x.size() - 1; i++)
{
double dx = x[i + 1] - x[i];
double dy = y[i + 1] - y[i];
yaw.push_back(atan2(dy, dx));
ds.push_back(sqrt(dx*dx + dy*dy));
}
if(s.size() - x.size() != 0)//TO remove paths whose predicted s goes out of bounds of global path.
{
return;
}
for(int i = 0; i < yaw.size() - 1; i++){
c.push_back((yaw[i + 1] - yaw[i]) / ds[i]);
}
}
// convert to global frame
FrenetPath calc_global_paths(FrenetPath fp, Spline2D csp)
{
fp.adding_global_path(csp);
return fp;
}
vector<geometry_msgs::Point32> transformation(vector<geometry_msgs::Point32> fp, geometry_msgs::Pose cp, double px, double py, double pyaw)
{
vector<geometry_msgs::Point32> new_fp(fp.size());
tf::Quaternion qb(cp.orientation.x, cp.orientation.y, cp.orientation.z, cp.orientation.w);
tf::Matrix3x3 mb(qb);
double broll, bpitch, byaw;
mb.getRPY(broll, bpitch, byaw);
double bx, by;
bx = cp.position.x;
by = cp.position.y;
double x, y, theta;
theta = pyaw - byaw;
x = px - bx;
y = py - by;
for(int i = 0; i < new_fp.size(); i++)
{
new_fp[i].x = (fp[i].x - bx)* cos(theta) + (fp[i].y - by) * sin(theta) + x + bx;
new_fp[i].y = -(fp[i].x - bx) * sin(theta) + (fp[i].y - by) * cos(theta) + y + by;
}
return new_fp;
}
double dist(double x1, double y1, double x2, double y2)
{
return sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2));
}
bool point_obcheck(geometry_msgs::Point32 p, double obst_r)
{
int xlower, ylower, xupper, yupper;
auto it = lower_bound(ob_x.begin(), ob_x.end(), p.x);
if (ob_x.size() == 0)
return 0;
if (it == ob_x.begin())
xlower = xupper = it - ob_x.begin();//no smaller value than val in vector
else if (it == ob_x.end())
xupper = xlower = (it-1)- ob_x.begin();//no bigger value than val in vector
else
{
xlower = (it-1) - ob_x.begin();
xupper = it - ob_x.begin();
}
double dist1 = dist(p.x,p.y, ob_x[xlower], ob_y[xlower]);
double dist2 = dist(p.x, p.y, ob_x[xupper], ob_y[xupper]);
if(min(dist1, dist2) < obst_r)
return 1;
it = lower_bound(ob_y.begin(), ob_y.end(), p.y);
if (it == ob_y.begin())
ylower = yupper = it - ob_y.begin();//no smaller value than val in vector
else if (it == ob_y.end())
yupper = ylower = (it-1)- ob_y.begin();//no bigger value than val in vector
else
{
ylower = (it-1) - ob_y.begin();
yupper = it - ob_y.begin();
}
dist1 = dist(p.x,p.y, ob_x[ylower], ob_y[ylower]);
dist2 = dist(p.x, p.y, ob_x[yupper], ob_y[yupper]);
if(min(dist1, dist2) < obst_r)
return 1;
return 0;
}
// check for specified velocity, acceleration and curvature constraints
int check_path(FrenetPath fp, double bot_yaw, double yaw_error, double obst_r)
{
vecD path_yaw = fp.get_yaw(); //BOT CHECKING YAW. PLEASE ADD BACK
if (abs(path_yaw[0] - bot_yaw)> yaw_error) //15 deg
{
cout << "Yaw out of range" << endl;
return 1;
}
return 0;
}
void FrenetPath::plot_path()
{
plt::plot(x,y);
plt::pause(0.001);
}
void FrenetPath::plot_velocity_profile()
{
plt::plot(t, s_d);
plt::pause(0.001);
}
void display_paths(vector<FrenetPath> fplist)
{
plt::ion();
plt::show();
int count=0;
for(auto &fp : fplist)
{
if(count%50 == 0 && flag_for_display_paths){
cout<<"!!"<<endl;
fp.plot_path();
}
count++;
}
flag_for_display_paths = 1;
}
// generates the path and returns the bestpath
FrenetPath frenet_optimal_planning(Spline2D csp, double s0, double c_speed, double c_d, double c_d_d, double c_d_dd, FrenetPath lp, double bot_yaw)
{
FrenetPath fp = calc_frenet_paths(c_speed, c_d, c_d_d, c_d_dd, s0, lp);
fp = calc_global_paths(fp, csp);
int yaw_flag = check_path(fp, bot_yaw, 0.261799, 4.0);
// For showing the bestpath
double cf;
if(false)
{
plt::ion();
plt::show();
fp.plot_path();
}
if(false)
{
plt::ion();
plt::show();
fp.plot_velocity_profile();
}
cf = fp.get_cf();
return fp;
} |
db4db82e890b6b8c92a098304e086a98f74e3dee | 71b52b2176f74ede010d7c0f6f76c83812f7cda4 | /PROJ3_WIN/565Rasterizer/share.h | 7b52fc570640c403953d62ae95df3c77104557e4 | [] | no_license | yukong11/NPRRasterizer | 17ca9e69fd275071fc18a247a62f1a7c17f4e1e4 | a287c12af178e32a5132670eafe9b17ed867618e | refs/heads/master | 2020-05-18T06:00:44.127777 | 2012-12-17T01:44:39 | 2012-12-17T01:44:39 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 292 | h | share.h | #ifndef SHARE_H
#define SHARE_H
#include <stdlib.h>
#include <string>
#include <array>
struct Texture{
unsigned int id;
unsigned char* ptr;
int width;
int height;
int depth;
};
array<string,2> textureFiles={"leather.jpg","fract.jpg"};
vector<Texture> textList;
#endif |
185e150b49f37c00a77cc5f618f0ba6f18121e90 | afbcf712a7c961e1c32c03daf85fc80682d166d7 | /Chuong 2/DayConTongS.cpp | ea143e8c237006b68bdd3ccfb6b8eec8d5607fc3 | [] | no_license | Minhvn98/ThuatToanUngDung | d3e49830611326a2a903bd8c0d5e01328923c148 | 18c0d017522581bc77024841327305e9e2650272 | refs/heads/master | 2020-09-22T08:52:50.862116 | 2020-01-11T10:56:14 | 2020-01-11T10:56:14 | 225,129,091 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 790 | cpp | DayConTongS.cpp | #include <iostream>
#define max 999
using namespace std;
int n, S;
int A[max + 1];
void in(int a[], int n){
for(int i = 1; i <= n; i++){
cout<<a[i]<<endl;
}
}
int sum = 0;
bool found = 0;
void Try(int a[], int i, int k){
for(int j = a[i-1] + 1; j <= n - (k-i); j++){
a[i] = j;
if(sum + A[j] > S || found) break;
sum += A[j];
if(i == k){
if(sum == S){
cout<<k<<endl;
in(a, k);
//cout<<" = "<<sum<<endl;
found = 1;
break;
}
}
else{
Try(a, i+1, k);
}
sum -= A[j];
}
}
int main(){
freopen("tong.inp", "r", stdin);
freopen("tong.out", "w", stdout);
cin>>n;
cin>>S;
for(int i = 1; i <= n; i++){
cin>>A[i];
}
for(int k = 1; k <= n; k++){
if(!found){
int a[k + 1];
a[0] = 0;
Try(a, 1, k);
}
}
return 0;
}
|
47fc7ea3d47e45d6881e1998815aee9baf8f0c03 | 2b721d0e6d9ada23668d02ee14e83219a1ee0f48 | /source/libguiex_core/guiasgridbase.h | 32e78fde9eafa254cf1588b785c589eb286f3354 | [] | no_license | lougithub/libguiex | fef2165e06f3adb66295aac2cf5f0be24dd47d46 | 30cf061a40a4c113b58765dc3aeacddc4521a034 | refs/heads/master | 2016-09-10T10:20:48.122440 | 2014-06-11T14:17:56 | 2014-06-11T14:17:56 | 2,423,027 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,955 | h | guiasgridbase.h | /**
* @file guiasgridbase.h
* @brief
* @author ken
* @date 2011-03-16
*/
#ifndef __GUI_ASGRIDBASE_20110316_H__
#define __GUI_ASGRIDBASE_20110316_H__
//============================================================================//
// include
//============================================================================//
#include "guias.h"
//============================================================================//
// declare
//============================================================================//
namespace guiex
{
class CGUISceneEffectGridBase;
}
//============================================================================//
// class
//============================================================================//
namespace guiex
{
//*****************************************************************************
// CGUIAsGridBase
//*****************************************************************************
class GUIEXPORT CGUIAsGridBase : public CGUIAs
{
protected:
CGUIAsGridBase( const CGUIString& rAsType, const CGUIString& rAsName, const CGUIString& rSceneName);
virtual ~CGUIAsGridBase( );
public:
virtual int32 ProcessProperty( const CGUIProperty& rProperty );
virtual int32 GenerateProperty( CGUIProperty& rProperty );
virtual void Reset( );
void SetGridSize( const CGUIIntSize& rGridSize );
const CGUIIntSize& GetGridSize() const;
protected:
virtual CGUISceneEffectGridBase* GenerateGrid( const CGUISize& rSceneSize, const CGUIIntSize& rGridSize ) = 0;
virtual int32 OnInitGrid();
virtual void OnFiniGrid();
virtual void OnUpdate( );
virtual void OnRetired();
virtual void OnDestory();
int32 InitGrid( );
void FiniGrid( );
bool IsGridInit() const;
protected:
CGUIIntSize m_aGridSize;
CGUISceneEffectGridBase* m_pEffectGrid;
};
}//namespace guiex
#endif //__GUI_ASGRIDBASE_20110316_H__
|
795d57b60e42da14b0504e949f1f733c32662928 | 18919b4e9708ae890c2efc6f7c987f2a88218406 | /dune/stuff/common/disable_warnings.hh | 59bc5ae2c75c2568f4cd2b4f05e77851aa4bbb49 | [
"BSD-2-Clause"
] | permissive | BarbaraV/dune-stuff | 7aab5165475708b42ef159d3dde838b790705656 | f6297fed873f5e640354508eb927c875b60724a9 | refs/heads/master | 2021-01-15T09:24:15.852069 | 2018-02-21T15:06:59 | 2018-02-21T15:06:59 | 35,220,334 | 0 | 0 | null | 2015-05-07T13:02:58 | 2015-05-07T13:02:58 | null | UTF-8 | C++ | false | false | 2,418 | hh | disable_warnings.hh | // This file is part of the dune-stuff project:
// https://github.com/wwu-numerik/dune-stuff
// Copyright holders: Rene Milk, Felix Schindler
// License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
#include <boost/config.hpp>
#if defined(BOOST_CLANG) && BOOST_CLANG
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
# pragma GCC diagnostic ignored "-Wdeprecated-register"
# pragma GCC diagnostic ignored "-Wignored-qualifiers"
# pragma GCC diagnostic ignored "-Wextra"
# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
# pragma GCC diagnostic ignored "-Wtype-limits"
# pragma GCC diagnostic ignored "-Wshadow"
# pragma GCC diagnostic ignored "-Wreorder"
# pragma GCC diagnostic ignored "-Wuninitialized"
# pragma GCC diagnostic ignored "-Wused-but-marked-unused"
# pragma GCC diagnostic ignored "-Wlogical-not-parentheses"
# pragma GCC diagnostic ignored "-Wlogical-op-parentheses"
# pragma GCC diagnostic ignored "-Wundef"
# pragma GCC diagnostic ignored "-Wunreachable-code"
# pragma GCC diagnostic ignored "-Wcovered-switch-default"
# pragma GCC diagnostic ignored "-Wswitch-enum"
# pragma GCC diagnostic ignored "-Wunused-const-variable"
# pragma GCC diagnostic ignored "-Wunused-private-field"
# pragma GCC diagnostic ignored "-Wshorten-64-to-32"
# pragma GCC diagnostic ignored "-Wmismatched-tags"
# pragma GCC diagnostic ignored "-Woverloaded-virtual"
# pragma GCC diagnostic ignored "-Wfloat-equal"
# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
# pragma GCC diagnostic ignored "-Wreturn-stack-address"
#elif defined(BOOST_GCC) && BOOST_GCC
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
# pragma GCC diagnostic ignored "-Wignored-qualifiers"
# pragma GCC diagnostic ignored "-Wextra"
# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
# pragma GCC diagnostic ignored "-Wtype-limits"
# pragma GCC diagnostic ignored "-Wshadow"
# pragma GCC diagnostic ignored "-Wreorder"
# pragma GCC diagnostic ignored "-Wuninitialized"
# pragma GCC diagnostic ignored "-Wunused-local-typedefs"
# pragma GCC diagnostic ignored "-Wundef"
# pragma GCC diagnostic ignored "-Wunreachable-code"
# pragma GCC diagnostic ignored "-Wswitch-enum"
# pragma GCC diagnostic ignored "-Woverloaded-virtual"
# pragma GCC diagnostic ignored "-Wfloat-equal"
# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#endif
|
320a47f429acd52525e1e4d958120f14bbf64f5d | e67c447bbb742690f8352ea668a651d05dc12ad9 | /SamsungS9.cpp | 64b0625c5d7b4183e4a6d3d95d7888331d76efce | [] | no_license | patrick14796/Smartphone-project-CPP | fd53a291e5e8cc6862b53a108cd205ad8717bfe7 | 359ea6e657a0abc9a791248bca5c9c75792ce5e7 | refs/heads/master | 2022-12-09T00:06:45.509236 | 2020-09-09T10:27:41 | 2020-09-09T10:27:41 | 294,075,046 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,213 | cpp | SamsungS9.cpp | #include "SamsungS9.h"
SamsungS9::SamsungS9(int number)
{
PhoneNumber = number;
}
string SamsungS9::model()
{
return "SamsungS9";
}
string SamsungS9::about()
{
cout << "SamsungS9 Number:" << PhoneNumber << endl;
cout << "Support:VoiceCall,TextMsg" << endl;
cout << "MultiMedia Types:" << one.type() << "," << two.type() << "," << Three.type() << endl;
cout << "WireLessProptocol:" << type1.protocol() << "," << type2.protocol() << endl;
return string();
}
string SamsungS9::connectWifi()
{
return type2.protocol();
}
string SamsungS9::connectBlueTooth()
{
return type1.protocol();
}
void SamsungS9::wirelessProperties()
{
string t1 = type1.protocol();
string t2 = type2.protocol();
cout << t1 << " rate=5 MBps" << endl;
cout << t2 << " rate=56 MBps" << endl;
}
CSetLinkList SamsungS9::takePicture()
{
list.append(picNumber);
++picNumber;
return list;
}
CSetLinkList SamsungS9::removePicture(int remove)
{
list.remove(remove);
return list;
}
void SamsungS9::picturesList() {
if ((list.length() != 0) == true)
for (int i = 1; i < list.length(); ++i)
{
cout << "picture" << list.at(i) << "." << "jpg" << endl;
}
} |
40984b6795355eb60fdb0497b7ca427ba67d806d | 94d79f47936344d3397e12bb61d5bd40439ea802 | /src/task_manager_turtlesim/tasks/TaskMoveBaseWC.h | 7a63e2f38872405effa40f9575e7c481904fc5e5 | [
"BSD-2-Clause"
] | permissive | ronnierfr/ros_task_manager | b428a58e09a0030b94cd155cfc61f51257717b32 | 981aed75b9321feff0f458cb62505e9fd7aed04c | refs/heads/master | 2020-03-28T03:57:31.861918 | 2018-04-19T12:46:54 | 2018-04-19T12:46:54 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,252 | h | TaskMoveBaseWC.h | #ifndef TASK_MOVE_BASE_WC_H
#define TASK_MOVE_BASE_WC_H
#include "task_manager_lib/TaskDefinition.h"
#include "task_manager_turtlesim/TurtleSimEnv.h"
#include "task_manager_action/TaskActionMoveBase.h"
using namespace task_manager_lib;
using namespace task_manager_action;
// There is no move_base for turtlesim, this is to test the principle of the
// generic TaskActionMoveBase
namespace task_manager_turtlesim {
class TaskMoveBaseWC : public TaskActionGenericWithoutClient<move_base_msgs::MoveBaseAction,TaskActionMoveBaseConfig, TurtleSimEnv>
{
protected:
typedef TaskActionGenericWithoutClient<move_base_msgs::MoveBaseAction,
TaskActionMoveBaseConfig, TurtleSimEnv> Parent;
virtual typename Parent::ClientPtr getActionClient() {
return env->getMoveBaseActionClient();
}
void buildActionGoal(typename Parent::Goal & goal) const {
const TaskActionMoveBaseConfig & cfg_ = Parent::cfg;
goal.target_pose.header.frame_id = cfg_.frame_id;
goal.target_pose.header.stamp = ros::Time::now();
goal.target_pose.pose.position.x = cfg_.goal_x;
goal.target_pose.pose.position.y = cfg_.goal_y;
goal.target_pose.pose.position.z = cfg_.goal_z;
goal.target_pose.pose.orientation =
tf::createQuaternionMsgFromRollPitchYaw(cfg_.goal_roll,cfg_.goal_pitch,cfg_.goal_yaw);
}
public:
TaskMoveBaseWC(TaskDefinitionPtr def, TaskEnvironmentPtr env) :
Parent(def,env) {}
virtual ~TaskMoveBaseWC() {};
};
class TaskFactoryMoveBaseWC : public task_manager_lib::TaskDefinition<TaskActionMoveBaseConfig, TurtleSimEnv, TaskMoveBaseWC>
{
protected:
typedef task_manager_lib::TaskDefinition<TaskActionMoveBaseConfig, TurtleSimEnv, TaskMoveBaseWC> Parent;
public:
TaskFactoryMoveBaseWC(TaskEnvironmentPtr env) :
Parent("ActionMoveBaseWC","Publish an action goal for move base, using client from the environment",true,env) {}
virtual ~TaskFactoryMoveBaseWC() {};
};
};
#endif // TASK_MOVE_BASE_WC_H
|
417ad4e69e374a9355e82593f90d6856a07ff44a | 43410d9cc8e975e516d97eeebcb8b4991e2c45a1 | /1152.cc | 934784f53e71b8c858ec483e303e348e3d6b601e | [] | no_license | mybirth0407/backjoon_solution | 5b2edd341d32e2576ea8e612cb006d48587d4bd2 | ddffaf8c1a891dc6f878e89583e4c67930ca0dde | refs/heads/master | 2022-01-08T00:34:03.971292 | 2019-05-03T16:10:41 | 2019-05-03T16:10:41 | null | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 899 | cc | 1152.cc | /* 1152 */
#include <stdio.h>
int main () {
char input[1000001] = "\0";
int i = 0, j = 0;
int size = 0;
gets (input);
if (input[0] == 32) {
for (i = 0; i<sizeof (input); i++) { //시작점 찾기
if (input[i] == 32) {
j++;
}
if (input[i] != 32) {
break;
}
}
j--;
for (i = j; i<sizeof (input); i++) {
if (input[i] == 32) {
size++;
}
if (input[i] == 0) {
break;
}
}
if (i >= 1) {
if (input[i - 1] == 32) {
size--;
}
}
printf ("%d", size);
}
else {
for (i = j; i<sizeof (input); i++) {
if (input[i] == 32) {
size++;
}
if (input[i] == 0) {
break;
}
}
if (i >= 1) {
if (input[i - 1] == 32) {
size--;
}
}
printf ("%d", size + 1);
}
return 0;
} |
93f7a9af639961ac1d807f777462fb6ea7f44532 | 189f52bf5454e724d5acc97a2fa000ea54d0e102 | /ras/fluidisedBed/0.99/U.airMean | 6253b02ab96a8b1f96d484165afa5f7809ad563a | [] | no_license | pyotr777/openfoam_samples | 5399721dd2ef57545ffce68215d09c49ebfe749d | 79c70ac5795decff086dd16637d2d063fde6ed0d | refs/heads/master | 2021-01-12T16:52:18.126648 | 2016-11-05T08:30:29 | 2016-11-05T08:30:29 | 71,456,654 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 144,817 | airmean | U.airMean | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1606+ |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0.99";
object U.airMean;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField nonuniform List<vector>
6000
(
(-0.0200312 0.269181 0)
(-0.0045381 0.235981 0)
(0.0118579 0.247478 0)
(0.0217336 0.246989 0)
(0.0248637 0.243062 0)
(0.0211014 0.238125 0)
(0.0162601 0.232623 0)
(0.00963049 0.229053 0)
(0.00410982 0.23029 0)
(0.00152784 0.226641 0)
(-0.000979758 0.218414 0)
(-0.00240733 0.214616 0)
(-0.00338338 0.216448 0)
(-0.00360409 0.216421 0)
(-0.0029885 0.218423 0)
(-0.00205585 0.218332 0)
(-0.00131434 0.21756 0)
(-0.00177429 0.217219 0)
(-0.00256485 0.214959 0)
(-0.00431194 0.218196 0)
(-0.00643433 0.22425 0)
(-0.0079414 0.229347 0)
(-0.011257 0.230127 0)
(-0.0162962 0.232718 0)
(-0.0209471 0.237114 0)
(-0.0230131 0.241934 0)
(-0.0185457 0.245844 0)
(-0.00834161 0.245789 0)
(0.00757194 0.235312 0)
(0.0218919 0.270325 0)
(0.0103592 0.999097 0)
(0.00800619 0.974039 0)
(0.031157 0.979074 0)
(0.0458625 0.987366 0)
(0.0562478 1.00442 0)
(0.0531513 1.01475 0)
(0.0386878 1.02011 0)
(0.0185803 1.0223 0)
(0.00407338 1.01194 0)
(0.000358048 1.01066 0)
(-0.00313074 1.01534 0)
(-0.00607223 1.01676 0)
(-0.0068593 1.01456 0)
(-0.00596276 1.0124 0)
(-0.00221269 1.00963 0)
(0.00192759 1.00941 0)
(0.00314734 1.01189 0)
(0.00195288 1.01374 0)
(-0.000953204 1.01637 0)
(-0.00634377 1.01555 0)
(-0.0105447 1.01088 0)
(-0.0133004 1.00888 0)
(-0.0238394 1.01505 0)
(-0.0392889 1.01667 0)
(-0.0506268 1.0114 0)
(-0.0520581 1.00071 0)
(-0.0406668 0.986018 0)
(-0.0257218 0.979912 0)
(-0.00384468 0.976029 0)
(-0.00816234 1.00265 0)
(-0.00366927 0.816304 0)
(0.00717564 0.749909 0)
(0.0337891 0.761185 0)
(0.0467407 0.769079 0)
(0.0579738 0.78911 0)
(0.0592889 0.812959 0)
(0.0480075 0.828149 0)
(0.0319599 0.828572 0)
(0.0206291 0.813475 0)
(0.012345 0.802956 0)
(0.00767218 0.796284 0)
(0.0062398 0.791773 0)
(0.00355349 0.790675 0)
(0.00226418 0.787291 0)
(0.00525401 0.786022 0)
(0.00723024 0.788801 0)
(0.00524165 0.793332 0)
(-0.000436098 0.795957 0)
(-0.00669861 0.797906 0)
(-0.0123792 0.800228 0)
(-0.0195731 0.801464 0)
(-0.0267626 0.807692 0)
(-0.0352082 0.818224 0)
(-0.0464289 0.819986 0)
(-0.0533749 0.806789 0)
(-0.051512 0.785036 0)
(-0.0403098 0.766952 0)
(-0.0276954 0.760636 0)
(-0.00224788 0.752641 0)
(0.00596457 0.824841 0)
(0.014499 0.843132 0)
(0.0238665 0.778042 0)
(0.0354798 0.792134 0)
(0.0467139 0.804447 0)
(0.0547134 0.828119 0)
(0.0583955 0.855255 0)
(0.0593264 0.878646 0)
(0.0531822 0.88128 0)
(0.0415432 0.872374 0)
(0.0295091 0.861834 0)
(0.0224077 0.857748 0)
(0.0147681 0.85624 0)
(0.00657817 0.852408 0)
(0.00602902 0.841153 0)
(0.0115977 0.835004 0)
(0.0164854 0.83969 0)
(0.0161236 0.850305 0)
(0.00757992 0.858698 0)
(-0.0073698 0.86279 0)
(-0.0207032 0.863553 0)
(-0.0316427 0.862167 0)
(-0.0430184 0.863171 0)
(-0.0504032 0.867947 0)
(-0.0547706 0.867563 0)
(-0.0533156 0.849045 0)
(-0.0491959 0.825357 0)
(-0.0410588 0.804614 0)
(-0.0310505 0.794992 0)
(-0.0206387 0.783663 0)
(-0.0136916 0.853887 0)
(0.0159203 0.800157 0)
(0.0205812 0.750397 0)
(0.0305038 0.757408 0)
(0.0466713 0.768504 0)
(0.05963 0.799617 0)
(0.0641707 0.829914 0)
(0.070719 0.857224 0)
(0.0719908 0.870198 0)
(0.0619498 0.870597 0)
(0.0458651 0.8577 0)
(0.0340839 0.851437 0)
(0.0213736 0.851799 0)
(0.00979935 0.841123 0)
(0.00863966 0.820525 0)
(0.0165506 0.811618 0)
(0.0247878 0.819837 0)
(0.0265404 0.838821 0)
(0.0160694 0.857686 0)
(-0.00568286 0.866928 0)
(-0.0255628 0.861554 0)
(-0.0409218 0.85952 0)
(-0.0567002 0.858003 0)
(-0.0646738 0.854959 0)
(-0.0650478 0.848871 0)
(-0.061524 0.825548 0)
(-0.0568546 0.797896 0)
(-0.0431797 0.770549 0)
(-0.0272778 0.762059 0)
(-0.018073 0.757183 0)
(-0.0155777 0.813026 0)
(0.00633057 0.777777 0)
(0.00414393 0.74069 0)
(0.0138396 0.730735 0)
(0.0338276 0.739455 0)
(0.0554268 0.77611 0)
(0.0731169 0.809026 0)
(0.0853521 0.837143 0)
(0.0947522 0.856603 0)
(0.090696 0.873132 0)
(0.0741858 0.868615 0)
(0.0540762 0.862834 0)
(0.0321705 0.866855 0)
(0.0111178 0.849947 0)
(0.00388472 0.817893 0)
(0.0134673 0.802134 0)
(0.0282649 0.813584 0)
(0.033497 0.842458 0)
(0.0201684 0.875435 0)
(-0.0056802 0.889299 0)
(-0.0319784 0.87817 0)
(-0.0570785 0.87498 0)
(-0.0774134 0.863758 0)
(-0.0857879 0.846934 0)
(-0.0818578 0.83571 0)
(-0.0731173 0.80908 0)
(-0.0577481 0.776647 0)
(-0.0346712 0.741388 0)
(-0.013311 0.73567 0)
(-0.00287584 0.747989 0)
(-0.00697718 0.791606 0)
(-0.00298904 0.778933 0)
(-0.0109251 0.733158 0)
(-0.0117813 0.70972 0)
(0.00093309 0.707777 0)
(0.0308145 0.734923 0)
(0.0700707 0.772039 0)
(0.0965588 0.808097 0)
(0.11187 0.835275 0)
(0.110588 0.863097 0)
(0.09783 0.872033 0)
(0.0743605 0.869779 0)
(0.0424153 0.878389 0)
(0.0103452 0.858093 0)
(-0.00472567 0.80639 0)
(0.00422454 0.777138 0)
(0.0249537 0.790884 0)
(0.0325762 0.835951 0)
(0.0176417 0.886669 0)
(-0.00988133 0.902929 0)
(-0.0390671 0.893215 0)
(-0.0703434 0.889046 0)
(-0.0946725 0.865419 0)
(-0.107259 0.835523 0)
(-0.0989302 0.81283 0)
(-0.0772473 0.777505 0)
(-0.0412282 0.738382 0)
(-0.00749765 0.707291 0)
(0.00823925 0.71434 0)
(0.00922202 0.740922 0)
(0.00131708 0.79157 0)
(-0.00170035 0.788355 0)
(-0.0180954 0.747484 0)
(-0.0373902 0.708818 0)
(-0.0341641 0.686085 0)
(-0.0026669 0.688729 0)
(0.0489581 0.72482 0)
(0.0925854 0.777085 0)
(0.111841 0.82089 0)
(0.112467 0.861248 0)
(0.100353 0.879458 0)
(0.0804014 0.887217 0)
(0.0479914 0.895242 0)
(0.0110826 0.86966 0)
(-0.0103544 0.799223 0)
(-0.00585856 0.751958 0)
(0.0121245 0.766217 0)
(0.0206723 0.828121 0)
(0.00589392 0.894343 0)
(-0.0221059 0.916128 0)
(-0.0492694 0.909333 0)
(-0.0746968 0.905631 0)
(-0.100771 0.875468 0)
(-0.115004 0.831231 0)
(-0.103881 0.787398 0)
(-0.067005 0.735961 0)
(-0.014943 0.691431 0)
(0.0218925 0.680966 0)
(0.02849 0.710681 0)
(0.0121445 0.753626 0)
(-0.00156036 0.797477 0)
(-0.00469945 0.800349 0)
(-0.0241151 0.771865 0)
(-0.0553276 0.715276 0)
(-0.0605103 0.665553 0)
(-0.0345946 0.64473 0)
(0.0142173 0.668716 0)
(0.0653242 0.735574 0)
(0.0965562 0.802183 0)
(0.106327 0.857358 0)
(0.0981088 0.883508 0)
(0.0760652 0.903559 0)
(0.0488911 0.919515 0)
(0.0143272 0.884387 0)
(-0.00957045 0.801251 0)
(-0.0104287 0.734407 0)
(-0.00441513 0.74656 0)
(0.00223921 0.818958 0)
(-0.009555 0.900329 0)
(-0.0350067 0.930854 0)
(-0.0539599 0.920645 0)
(-0.0718355 0.917588 0)
(-0.093629 0.886115 0)
(-0.0992107 0.823922 0)
(-0.0807776 0.751088 0)
(-0.0374833 0.682104 0)
(0.015884 0.640061 0)
(0.0468489 0.656446 0)
(0.0424421 0.715257 0)
(0.0143079 0.774782 0)
(0.000965365 0.802259 0)
(-0.00813214 0.816476 0)
(-0.0299317 0.79634 0)
(-0.0610699 0.731156 0)
(-0.0754994 0.652822 0)
(-0.0590247 0.611991 0)
(-0.0207537 0.623022 0)
(0.0295737 0.691365 0)
(0.0749697 0.772026 0)
(0.0991274 0.847961 0)
(0.0947217 0.898077 0)
(0.0699607 0.916594 0)
(0.0494232 0.94189 0)
(0.0217384 0.90005 0)
(-0.00340768 0.805328 0)
(-0.00840944 0.72716 0)
(-0.0143152 0.736829 0)
(-0.0116417 0.807367 0)
(-0.0194968 0.900552 0)
(-0.0321537 0.942551 0)
(-0.0430066 0.925293 0)
(-0.0614182 0.927525 0)
(-0.0727954 0.887603 0)
(-0.0654617 0.804457 0)
(-0.0357581 0.712855 0)
(0.00547263 0.635818 0)
(0.0463559 0.598829 0)
(0.0623967 0.641569 0)
(0.0492975 0.727577 0)
(0.0207127 0.794033 0)
(0.00589103 0.81246 0)
(-0.0113818 0.830132 0)
(-0.0334789 0.813066 0)
(-0.0619896 0.74703 0)
(-0.0801937 0.649005 0)
(-0.0792135 0.589531 0)
(-0.048757 0.584396 0)
(-0.000824717 0.646482 0)
(0.0540822 0.735224 0)
(0.0842677 0.831503 0)
(0.086847 0.916155 0)
(0.0606119 0.942171 0)
(0.039447 0.963665 0)
(0.0245789 0.919645 0)
(0.00428694 0.817263 0)
(-0.00601812 0.736207 0)
(-0.0203783 0.739879 0)
(-0.0193352 0.799494 0)
(-0.0206758 0.89548 0)
(-0.0128846 0.949789 0)
(-0.0217641 0.932279 0)
(-0.0390019 0.942915 0)
(-0.045989 0.878823 0)
(-0.0256975 0.774709 0)
(0.0159127 0.674317 0)
(0.0493246 0.594833 0)
(0.070818 0.571926 0)
(0.0705858 0.634885 0)
(0.0524586 0.74117 0)
(0.0258804 0.806035 0)
(0.00958674 0.821534 0)
(-0.0113598 0.848299 0)
(-0.0357542 0.828401 0)
(-0.0619295 0.763208 0)
(-0.0804773 0.652777 0)
(-0.0856265 0.575057 0)
(-0.064858 0.54931 0)
(-0.0202763 0.595717 0)
(0.0317455 0.696011 0)
(0.0664963 0.810511 0)
(0.0722867 0.924848 0)
(0.0543888 0.963085 0)
(0.0336918 0.977654 0)
(0.0247439 0.935138 0)
(0.00501458 0.830808 0)
(-0.00698062 0.752762 0)
(-0.0230509 0.751836 0)
(-0.0238214 0.801465 0)
(-0.0183877 0.887939 0)
(0.00767206 0.949655 0)
(0.00211199 0.947599 0)
(-0.0144111 0.956872 0)
(-0.0187155 0.867937 0)
(0.0106901 0.73856 0)
(0.055531 0.633359 0)
(0.0790811 0.573431 0)
(0.0837864 0.561314 0)
(0.0729454 0.636357 0)
(0.0538532 0.754588 0)
(0.0302402 0.817259 0)
(0.0103211 0.835545 0)
(-0.0106646 0.866652 0)
(-0.0354925 0.842582 0)
(-0.0586275 0.774711 0)
(-0.0785995 0.65428 0)
(-0.0852542 0.56649 0)
(-0.0712474 0.523053 0)
(-0.0350329 0.557312 0)
(0.0126885 0.658626 0)
(0.0464792 0.791354 0)
(0.0557339 0.930009 0)
(0.0468256 0.981996 0)
(0.0320335 0.985818 0)
(0.0283231 0.948497 0)
(0.0140433 0.845449 0)
(-0.00451082 0.770175 0)
(-0.0231348 0.762015 0)
(-0.0246167 0.803999 0)
(-0.00674907 0.873832 0)
(0.0255624 0.944955 0)
(0.0210841 0.966095 0)
(0.00797643 0.970548 0)
(0.0100889 0.856557 0)
(0.0422852 0.702026 0)
(0.0799967 0.603062 0)
(0.0958533 0.564038 0)
(0.0887493 0.560565 0)
(0.0713241 0.641569 0)
(0.0525899 0.765546 0)
(0.0317557 0.828149 0)
(0.0101827 0.851353 0)
(-0.00895918 0.88429 0)
(-0.0314991 0.854354 0)
(-0.0514518 0.786271 0)
(-0.0743423 0.657596 0)
(-0.0861732 0.555877 0)
(-0.0768684 0.500045 0)
(-0.0450126 0.520059 0)
(-0.00217891 0.619593 0)
(0.0281773 0.769933 0)
(0.0399088 0.921975 0)
(0.0411584 0.989027 0)
(0.0386846 0.983604 0)
(0.0448504 0.946698 0)
(0.0420769 0.857447 0)
(0.0147698 0.789705 0)
(-0.0118256 0.775011 0)
(-0.0209398 0.807396 0)
(0.00430551 0.855514 0)
(0.0361872 0.94508 0)
(0.035426 0.987095 0)
(0.022511 0.97852 0)
(0.0286125 0.845037 0)
(0.0589459 0.670041 0)
(0.0872304 0.583699 0)
(0.100564 0.56392 0)
(0.0879671 0.568869 0)
(0.0672768 0.652196 0)
(0.0465026 0.775129 0)
(0.0291938 0.837642 0)
(0.00886081 0.867962 0)
(-0.00669161 0.895002 0)
(-0.0258038 0.862535 0)
(-0.0395938 0.795432 0)
(-0.0641011 0.668623 0)
(-0.0847661 0.551805 0)
(-0.0839117 0.478615 0)
(-0.0591719 0.484627 0)
(-0.0231637 0.584004 0)
(0.00515699 0.75063 0)
(0.0230208 0.905526 0)
(0.0375753 0.983739 0)
(0.0554323 0.970751 0)
(0.0777356 0.930863 0)
(0.0893057 0.873279 0)
(0.053832 0.817403 0)
(0.0184267 0.798475 0)
(-0.00282369 0.813115 0)
(0.0191994 0.834595 0)
(0.0395514 0.947681 0)
(0.0445793 1.01376 0)
(0.035711 0.992657 0)
(0.0382853 0.843639 0)
(0.058261 0.647741 0)
(0.07604 0.571219 0)
(0.0941915 0.563629 0)
(0.0826006 0.579293 0)
(0.0617177 0.66828 0)
(0.0377051 0.78357 0)
(0.0258629 0.845511 0)
(0.00719598 0.879588 0)
(-0.00576334 0.90595 0)
(-0.021775 0.868007 0)
(-0.0237995 0.800284 0)
(-0.0405686 0.684441 0)
(-0.0604927 0.55616 0)
(-0.0783425 0.47173 0)
(-0.078803 0.461275 0)
(-0.058288 0.551858 0)
(-0.0268381 0.726434 0)
(0.00588494 0.875669 0)
(0.0402485 0.959376 0)
(0.0710723 0.942756 0)
(0.108241 0.904033 0)
(0.132163 0.882353 0)
(0.1106 0.853532 0)
(0.069218 0.827881 0)
(0.03938 0.825676 0)
(0.0352 0.828399 0)
(0.0373258 0.947442 0)
(0.0460945 1.02563 0)
(0.0475368 1.00169 0)
(0.0498925 0.853179 0)
(0.0501569 0.643077 0)
(0.0555615 0.563511 0)
(0.0748097 0.556214 0)
(0.0701169 0.588684 0)
(0.0518988 0.688774 0)
(0.0300345 0.790981 0)
(0.0256099 0.852813 0)
(0.00791753 0.894342 0)
(-0.00456679 0.91927 0)
(-0.0162668 0.873226 0)
(-0.00980504 0.795416 0)
(-0.0122871 0.694874 0)
(-0.0318485 0.568051 0)
(-0.06103 0.487107 0)
(-0.088175 0.462697 0)
(-0.0960969 0.529939 0)
(-0.0659954 0.692754 0)
(-0.0133697 0.832542 0)
(0.0434518 0.92152 0)
(0.0830889 0.91804 0)
(0.125436 0.86802 0)
(0.153951 0.884994 0)
(0.156294 0.883262 0)
(0.122659 0.872895 0)
(0.0864601 0.863692 0)
(0.0466102 0.849538 0)
(0.0285356 0.951138 0)
(0.0382782 1.0239 0)
(0.0568479 0.997245 0)
(0.0693225 0.866632 0)
(0.0535758 0.655698 0)
(0.0452441 0.56231 0)
(0.051716 0.546802 0)
(0.0455342 0.594632 0)
(0.0283916 0.705249 0)
(0.0182428 0.7944 0)
(0.0218477 0.857948 0)
(0.00784052 0.912362 0)
(-0.00354531 0.925168 0)
(-0.00752759 0.873426 0)
(0.00728408 0.790202 0)
(0.0137155 0.701807 0)
(-0.00489779 0.585571 0)
(-0.0434147 0.513903 0)
(-0.0950959 0.491214 0)
(-0.124154 0.529949 0)
(-0.104343 0.658657 0)
(-0.0404466 0.780273 0)
(0.0334 0.872942 0)
(0.0864965 0.893094 0)
(0.121778 0.844974 0)
(0.152317 0.874025 0)
(0.175061 0.897909 0)
(0.157088 0.906501 0)
(0.123171 0.911052 0)
(0.063632 0.901019 0)
(0.0211607 0.96256 0)
(0.036493 1.00744 0)
(0.0718401 0.973182 0)
(0.100754 0.868952 0)
(0.0807125 0.683267 0)
(0.0539065 0.572668 0)
(0.035011 0.554316 0)
(0.0102656 0.613966 0)
(-0.00751722 0.715398 0)
(-0.00130629 0.794762 0)
(0.0146901 0.858859 0)
(0.00619409 0.928153 0)
(-0.000273735 0.927927 0)
(0.00946591 0.863036 0)
(0.0230469 0.781207 0)
(0.0354405 0.706736 0)
(0.0150943 0.613223 0)
(-0.0275962 0.556082 0)
(-0.0911185 0.530026 0)
(-0.135152 0.544532 0)
(-0.125728 0.630466 0)
(-0.0635696 0.728077 0)
(0.014883 0.819039 0)
(0.0776549 0.862285 0)
(0.10754 0.829074 0)
(0.136426 0.849336 0)
(0.166562 0.902603 0)
(0.164288 0.933424 0)
(0.133615 0.95402 0)
(0.0662508 0.962023 0)
(0.0168455 0.97508 0)
(0.0496664 0.981917 0)
(0.0980834 0.936635 0)
(0.14021 0.854968 0)
(0.121477 0.717873 0)
(0.0646738 0.600107 0)
(0.0120171 0.584221 0)
(-0.0229079 0.64216 0)
(-0.0372805 0.720159 0)
(-0.0215614 0.785278 0)
(-0.000636977 0.852098 0)
(5.32302e-05 0.943206 0)
(0.00818002 0.915935 0)
(0.035744 0.848781 0)
(0.0479475 0.768751 0)
(0.039957 0.706625 0)
(0.00955545 0.640545 0)
(-0.0390131 0.592184 0)
(-0.0951827 0.570218 0)
(-0.134533 0.562596 0)
(-0.121249 0.59725 0)
(-0.0624247 0.678 0)
(0.0127757 0.765104 0)
(0.0772696 0.827553 0)
(0.108966 0.812035 0)
(0.122829 0.823286 0)
(0.145038 0.889741 0)
(0.151585 0.94609 0)
(0.123289 0.999628 0)
(0.0604136 1.02358 0)
(0.0313842 0.981734 0)
(0.077765 0.948361 0)
(0.133944 0.896678 0)
(0.182114 0.83077 0)
(0.16384 0.752567 0)
(0.0859706 0.652623 0)
(0.0154696 0.620531 0)
(-0.0265602 0.66102 0)
(-0.0403347 0.717136 0)
(-0.0380614 0.771323 0)
(-0.0246335 0.844019 0)
(-0.0130277 0.9394 0)
(0.0126213 0.895248 0)
(0.0397156 0.823687 0)
(0.0434678 0.765904 0)
(0.0164206 0.72448 0)
(-0.0266542 0.670932 0)
(-0.0786022 0.632846 0)
(-0.123824 0.595042 0)
(-0.139372 0.564256 0)
(-0.117144 0.564827 0)
(-0.0622204 0.623972 0)
(0.00973895 0.713871 0)
(0.0788592 0.783649 0)
(0.12113 0.795219 0)
(0.130234 0.808334 0)
(0.13572 0.873092 0)
(0.132251 0.950338 0)
(0.107096 1.03306 0)
(0.0712208 1.05803 0)
(0.064877 0.975702 0)
(0.115419 0.912675 0)
(0.180819 0.853436 0)
(0.215138 0.810849 0)
(0.198069 0.791814 0)
(0.122502 0.714565 0)
(0.0494534 0.666897 0)
(0.0022465 0.680943 0)
(-0.0248856 0.723825 0)
(-0.0438819 0.769786 0)
(-0.0421094 0.82694 0)
(-0.0201963 0.912367 0)
(0.0109599 0.865656 0)
(0.0133555 0.805204 0)
(-0.00838915 0.779605 0)
(-0.0414903 0.755452 0)
(-0.0838107 0.711932 0)
(-0.125115 0.669263 0)
(-0.150714 0.603903 0)
(-0.157872 0.543279 0)
(-0.131578 0.520773 0)
(-0.0719129 0.567024 0)
(0.00530314 0.653678 0)
(0.0828922 0.734728 0)
(0.142079 0.765301 0)
(0.16199 0.797393 0)
(0.159863 0.863644 0)
(0.138643 0.955181 0)
(0.116757 1.04515 0)
(0.105378 1.06911 0)
(0.107846 0.971551 0)
(0.149831 0.871616 0)
(0.205523 0.817838 0)
(0.225534 0.803512 0)
(0.210942 0.814235 0)
(0.151791 0.766211 0)
(0.0946756 0.708027 0)
(0.05218 0.714316 0)
(0.0166921 0.748053 0)
(-0.00985743 0.781456 0)
(-0.0241202 0.807604 0)
(-0.0175155 0.870368 0)
(0.00124581 0.866522 0)
(-0.0272953 0.831875 0)
(-0.0603552 0.80865 0)
(-0.0888199 0.776669 0)
(-0.116769 0.735848 0)
(-0.136471 0.688917 0)
(-0.154058 0.619834 0)
(-0.170101 0.539076 0)
(-0.166025 0.48062 0)
(-0.116069 0.499514 0)
(-0.0300813 0.57988 0)
(0.0601572 0.665409 0)
(0.13649 0.716246 0)
(0.178181 0.77261 0)
(0.187888 0.860107 0)
(0.168311 0.967537 0)
(0.152042 1.0447 0)
(0.154532 1.07251 0)
(0.161898 0.970022 0)
(0.183101 0.841032 0)
(0.214017 0.791977 0)
(0.22536 0.799328 0)
(0.210307 0.831567 0)
(0.167103 0.805758 0)
(0.120314 0.739161 0)
(0.0869908 0.73431 0)
(0.0582107 0.759553 0)
(0.0373733 0.792908 0)
(0.0128006 0.822856 0)
(-0.00602257 0.858062 0)
(-0.0130755 0.878443 0)
(-0.0553638 0.855351 0)
(-0.0873477 0.824809 0)
(-0.108822 0.794746 0)
(-0.122519 0.752154 0)
(-0.126352 0.699788 0)
(-0.136767 0.637317 0)
(-0.160341 0.556993 0)
(-0.178541 0.474557 0)
(-0.157317 0.445675 0)
(-0.0878183 0.506768 0)
(0.0112247 0.596092 0)
(0.0945238 0.661727 0)
(0.153654 0.734965 0)
(0.185266 0.847075 0)
(0.191987 0.970755 0)
(0.193027 1.04214 0)
(0.211875 1.06611 0)
(0.231943 0.968896 0)
(0.231892 0.840011 0)
(0.230995 0.78232 0)
(0.225273 0.799622 0)
(0.205502 0.84437 0)
(0.175367 0.833252 0)
(0.127456 0.770533 0)
(0.0934265 0.7517 0)
(0.0730048 0.771211 0)
(0.055873 0.799763 0)
(0.0335342 0.836207 0)
(0.00818687 0.856686 0)
(-0.0144351 0.905268 0)
(-0.0538355 0.89477 0)
(-0.0916033 0.849577 0)
(-0.106719 0.809675 0)
(-0.108727 0.757725 0)
(-0.107171 0.703301 0)
(-0.113615 0.650688 0)
(-0.138467 0.57854 0)
(-0.169323 0.489561 0)
(-0.169789 0.428687 0)
(-0.129939 0.447675 0)
(-0.0514451 0.52061 0)
(0.0328588 0.602916 0)
(0.100716 0.684298 0)
(0.152752 0.817502 0)
(0.188219 0.948484 0)
(0.216899 1.02673 0)
(0.260249 1.0422 0)
(0.298908 0.96766 0)
(0.29582 0.864644 0)
(0.26541 0.795619 0)
(0.2341 0.8103 0)
(0.204397 0.853867 0)
(0.18101 0.851975 0)
(0.134136 0.807707 0)
(0.0860625 0.765209 0)
(0.0683559 0.780734 0)
(0.055629 0.811807 0)
(0.0325436 0.858688 0)
(0.0133456 0.872681 0)
(-0.0132378 0.928883 0)
(-0.0455083 0.935229 0)
(-0.0780395 0.868296 0)
(-0.081604 0.81493 0)
(-0.0804492 0.756204 0)
(-0.0846522 0.705914 0)
(-0.0934172 0.659547 0)
(-0.115009 0.597051 0)
(-0.1494 0.504377 0)
(-0.16617 0.425222 0)
(-0.146607 0.42058 0)
(-0.0967393 0.465981 0)
(-0.0252851 0.541333 0)
(0.0461121 0.625952 0)
(0.104427 0.770585 0)
(0.158363 0.907573 0)
(0.217738 0.985647 0)
(0.290682 0.996698 0)
(0.35109 0.95363 0)
(0.360925 0.889735 0)
(0.319723 0.834501 0)
(0.255897 0.839468 0)
(0.205565 0.866909 0)
(0.179661 0.864398 0)
(0.13999 0.84652 0)
(0.0807791 0.789927 0)
(0.0530786 0.785804 0)
(0.0479542 0.819426 0)
(0.0297869 0.877753 0)
(0.0141206 0.889945 0)
(-0.0244894 0.946963 0)
(-0.0328944 0.95582 0)
(-0.0494212 0.871051 0)
(-0.0445446 0.809619 0)
(-0.0491974 0.757272 0)
(-0.0606237 0.70925 0)
(-0.0778578 0.663957 0)
(-0.0941531 0.60817 0)
(-0.126972 0.520265 0)
(-0.15639 0.427378 0)
(-0.15293 0.397201 0)
(-0.118091 0.425598 0)
(-0.063998 0.486599 0)
(0.000366946 0.570609 0)
(0.0590031 0.715699 0)
(0.118 0.846355 0)
(0.200094 0.916973 0)
(0.298945 0.929165 0)
(0.383269 0.921958 0)
(0.411522 0.903181 0)
(0.373713 0.888064 0)
(0.28409 0.896647 0)
(0.20731 0.898093 0)
(0.164797 0.878121 0)
(0.132448 0.880423 0)
(0.0799306 0.831921 0)
(0.0372382 0.79283 0)
(0.0329149 0.81804 0)
(0.0263602 0.88731 0)
(0.0198568 0.906428 0)
(-0.0306737 0.971909 0)
(-0.0251254 0.951064 0)
(-0.0208303 0.864327 0)
(-0.0213596 0.807582 0)
(-0.0277418 0.760398 0)
(-0.0415775 0.718157 0)
(-0.0604049 0.669677 0)
(-0.0773367 0.612646 0)
(-0.103023 0.535942 0)
(-0.140128 0.439072 0)
(-0.149367 0.380848 0)
(-0.128228 0.395711 0)
(-0.0867935 0.443386 0)
(-0.03431 0.520883 0)
(0.0241088 0.66377 0)
(0.0812284 0.78273 0)
(0.174337 0.831601 0)
(0.286939 0.84477 0)
(0.386627 0.869428 0)
(0.432436 0.90139 0)
(0.401103 0.940698 0)
(0.304235 0.974144 0)
(0.20846 0.95459 0)
(0.141008 0.91435 0)
(0.106873 0.911304 0)
(0.0668799 0.872951 0)
(0.0275831 0.818605 0)
(0.0140385 0.818796 0)
(0.0186076 0.883979 0)
(0.0231495 0.92804 0)
(-0.0200546 0.999443 0)
(-0.00915205 0.932144 0)
(0.00154699 0.861874 0)
(-0.00270112 0.806165 0)
(-0.0120678 0.76092 0)
(-0.0265682 0.725543 0)
(-0.0442986 0.676868 0)
(-0.0629996 0.613169 0)
(-0.0825346 0.544343 0)
(-0.119562 0.455735 0)
(-0.141839 0.375117 0)
(-0.132831 0.374331 0)
(-0.102058 0.412239 0)
(-0.060305 0.480084 0)
(-0.00300859 0.614402 0)
(0.0643003 0.720848 0)
(0.156148 0.745417 0)
(0.266388 0.757466 0)
(0.364849 0.802652 0)
(0.418057 0.882211 0)
(0.397776 0.98323 0)
(0.308928 1.05535 0)
(0.207164 1.02955 0)
(0.118407 0.971457 0)
(0.0706138 0.948036 0)
(0.0377319 0.903329 0)
(0.00774745 0.844503 0)
(-0.00360961 0.825048 0)
(0.00551561 0.874228 0)
(0.013192 0.949376 0)
(-0.0050791 1.00916 0)
(0.00692084 0.919631 0)
(0.020131 0.859547 0)
(0.0167067 0.814253 0)
(0.00493678 0.769453 0)
(-0.0107731 0.737124 0)
(-0.0294875 0.686893 0)
(-0.0492145 0.619294 0)
(-0.0683424 0.549316 0)
(-0.101075 0.473347 0)
(-0.133246 0.379214 0)
(-0.133619 0.360323 0)
(-0.110194 0.390429 0)
(-0.0740935 0.44987 0)
(-0.0208537 0.56195 0)
(0.055855 0.655584 0)
(0.142689 0.668442 0)
(0.242789 0.674286 0)
(0.329596 0.73256 0)
(0.378149 0.851112 0)
(0.36923 1.01109 0)
(0.300167 1.12464 0)
(0.204001 1.11476 0)
(0.0998397 1.04104 0)
(0.0370887 0.99127 0)
(0.00368605 0.931554 0)
(-0.0177452 0.86692 0)
(-0.0239387 0.828552 0)
(-0.011619 0.866825 0)
(-0.000391151 0.954933 0)
(0.00638194 1.01165 0)
(0.021393 0.907826 0)
(0.0357286 0.855959 0)
(0.0360208 0.820117 0)
(0.0247324 0.781665 0)
(0.0054578 0.751731 0)
(-0.0149413 0.703587 0)
(-0.0388725 0.63077 0)
(-0.0630913 0.556335 0)
(-0.0930523 0.487015 0)
(-0.126805 0.387476 0)
(-0.13087 0.346398 0)
(-0.111148 0.372063 0)
(-0.0783173 0.426739 0)
(-0.0300853 0.514742 0)
(0.0414454 0.596148 0)
(0.125097 0.599882 0)
(0.215146 0.595116 0)
(0.29115 0.666815 0)
(0.332521 0.816835 0)
(0.324582 1.01631 0)
(0.274296 1.16859 0)
(0.193325 1.19144 0)
(0.0872529 1.11814 0)
(0.00861365 1.03452 0)
(-0.0305993 0.954906 0)
(-0.0475692 0.878896 0)
(-0.0496648 0.829127 0)
(-0.032125 0.853262 0)
(-0.0128831 0.94949 0)
(0.0147369 0.998287 0)
(0.0344831 0.893064 0)
(0.0519194 0.849864 0)
(0.05664 0.824845 0)
(0.0426909 0.798607 0)
(0.0194448 0.771081 0)
(-0.00646494 0.720447 0)
(-0.0356673 0.65052 0)
(-0.0681231 0.571616 0)
(-0.0963759 0.494423 0)
(-0.122415 0.395541 0)
(-0.133641 0.332523 0)
(-0.113706 0.351246 0)
(-0.0803687 0.403762 0)
(-0.0346877 0.47694 0)
(0.0271253 0.5383 0)
(0.105682 0.531262 0)
(0.185322 0.51863 0)
(0.252947 0.601823 0)
(0.281604 0.780109 0)
(0.264795 1.01434 0)
(0.23256 1.19219 0)
(0.173877 1.24958 0)
(0.0814646 1.1917 0)
(-0.0118674 1.08311 0)
(-0.0628588 0.976143 0)
(-0.0797904 0.883332 0)
(-0.0760356 0.823064 0)
(-0.0511968 0.833368 0)
(-0.0213814 0.924672 0)
(0.0209418 0.974074 0)
(0.0473398 0.874039 0)
(0.067983 0.839919 0)
(0.0734992 0.829057 0)
(0.0570042 0.817725 0)
(0.0285333 0.793633 0)
(-0.00701762 0.743173 0)
(-0.0444148 0.674296 0)
(-0.0809978 0.590537 0)
(-0.103967 0.499963 0)
(-0.118721 0.395885 0)
(-0.128256 0.324039 0)
(-0.115004 0.322507 0)
(-0.0804861 0.372607 0)
(-0.032948 0.438821 0)
(0.0252642 0.488145 0)
(0.0897395 0.468384 0)
(0.15861 0.451378 0)
(0.209764 0.549294 0)
(0.210692 0.755304 0)
(0.194203 1.0062 0)
(0.177391 1.19731 0)
(0.14301 1.28661 0)
(0.0719636 1.25436 0)
(-0.0181205 1.14085 0)
(-0.0861566 1.00092 0)
(-0.105981 0.880152 0)
(-0.0926677 0.805769 0)
(-0.061191 0.805273 0)
(-0.0262453 0.891124 0)
(0.029305 0.939976 0)
(0.0609812 0.853105 0)
(0.0801875 0.830685 0)
(0.0816149 0.834894 0)
(0.0614679 0.838311 0)
(0.0275267 0.819186 0)
(-0.0132446 0.768854 0)
(-0.056539 0.698822 0)
(-0.0912105 0.605457 0)
(-0.107701 0.500029 0)
(-0.110524 0.390473 0)
(-0.113781 0.313255 0)
(-0.103397 0.301538 0)
(-0.0717901 0.334716 0)
(-0.0263697 0.395575 0)
(0.0281412 0.440219 0)
(0.084883 0.414633 0)
(0.131855 0.38994 0)
(0.147644 0.515725 0)
(0.133636 0.735214 0)
(0.121171 0.995256 0)
(0.114429 1.19031 0)
(0.100787 1.30318 0)
(0.0571336 1.30075 0)
(-0.0163097 1.19333 0)
(-0.0824194 1.0309 0)
(-0.106747 0.872809 0)
(-0.0930749 0.777102 0)
(-0.0637999 0.775481 0)
(-0.0301065 0.851606 0)
(0.0389633 0.894399 0)
(0.0731007 0.832741 0)
(0.0863881 0.825088 0)
(0.0813603 0.842447 0)
(0.054215 0.858751 0)
(0.0180039 0.838898 0)
(-0.0229549 0.79183 0)
(-0.0614738 0.720055 0)
(-0.0983749 0.619053 0)
(-0.106868 0.494423 0)
(-0.100771 0.384349 0)
(-0.0990863 0.304662 0)
(-0.0900069 0.280386 0)
(-0.0614931 0.3033 0)
(-0.0221732 0.352371 0)
(0.0273883 0.388966 0)
(0.0733878 0.356965 0)
(0.105041 0.361848 0)
(0.0977959 0.50245 0)
(0.0742092 0.726017 0)
(0.060076 0.988675 0)
(0.0557466 1.1799 0)
(0.0569401 1.30541 0)
(0.0374222 1.32669 0)
(-0.0132722 1.234 0)
(-0.0680371 1.05563 0)
(-0.080751 0.870282 0)
(-0.0764041 0.759942 0)
(-0.0611018 0.755035 0)
(-0.0313243 0.807057 0)
(0.0423567 0.841629 0)
(0.0753216 0.812935 0)
(0.0814511 0.822559 0)
(0.0682433 0.851336 0)
(0.0354076 0.873699 0)
(0.00564491 0.854152 0)
(-0.0332752 0.813621 0)
(-0.0745677 0.741066 0)
(-0.112223 0.63104 0)
(-0.115697 0.481814 0)
(-0.101796 0.369073 0)
(-0.0894514 0.293802 0)
(-0.0814947 0.262622 0)
(-0.0563685 0.277101 0)
(-0.0228883 0.313948 0)
(0.0211483 0.344564 0)
(0.0619552 0.317221 0)
(0.0833058 0.337231 0)
(0.0732181 0.499534 0)
(0.0454697 0.724093 0)
(0.0237293 0.983785 0)
(0.0192935 1.16795 0)
(0.0274046 1.29624 0)
(0.0257969 1.33676 0)
(-0.00287262 1.25852 0)
(-0.0408695 1.07302 0)
(-0.0534718 0.860963 0)
(-0.0627544 0.760571 0)
(-0.0570322 0.742319 0)
(-0.0315266 0.763894 0)
(0.0343391 0.778759 0)
(0.059936 0.792468 0)
(0.0572914 0.820072 0)
(0.0347377 0.858285 0)
(0.00389116 0.886402 0)
(-0.0317952 0.869964 0)
(-0.0687568 0.831993 0)
(-0.0940544 0.755212 0)
(-0.109912 0.626463 0)
(-0.111437 0.463971 0)
(-0.0976043 0.342493 0)
(-0.0790416 0.27667 0)
(-0.0740449 0.246862 0)
(-0.0537149 0.256353 0)
(-0.0275357 0.281954 0)
(0.00836002 0.303514 0)
(0.0495328 0.283719 0)
(0.0699503 0.319295 0)
(0.0658452 0.498936 0)
(0.0413338 0.734824 0)
(0.0143963 0.98335 0)
(0.0112695 1.15654 0)
(0.0235899 1.28005 0)
(0.0372099 1.33125 0)
(0.0280001 1.26582 0)
(0.00112371 1.08444 0)
(-0.0296886 0.867464 0)
(-0.0501841 0.769321 0)
(-0.0529702 0.731082 0)
(-0.0312962 0.720062 0)
(0.0209015 0.730319 0)
(0.0333088 0.774743 0)
(0.0191526 0.82359 0)
(-0.0163276 0.872859 0)
(-0.0512729 0.898177 0)
(-0.0827189 0.879727 0)
(-0.106852 0.830411 0)
(-0.112657 0.746063 0)
(-0.10553 0.604586 0)
(-0.101069 0.442375 0)
(-0.0839276 0.319073 0)
(-0.0667829 0.260744 0)
(-0.0651374 0.234745 0)
(-0.0503294 0.240682 0)
(-0.0302859 0.259529 0)
(-0.00441753 0.26996 0)
(0.0366821 0.25647 0)
(0.0555736 0.305448 0)
(0.0568298 0.495919 0)
(0.0420282 0.746538 0)
(0.0219456 0.980346 0)
(0.0246987 1.14324 0)
(0.0449249 1.25611 0)
(0.0723244 1.31214 0)
(0.0811143 1.26691 0)
(0.059943 1.10734 0)
(0.0104504 0.899928 0)
(-0.0278193 0.781913 0)
(-0.0397456 0.725388 0)
(-0.0252147 0.684166 0)
(0.00472234 0.70141 0)
(-0.0014311 0.780861 0)
(-0.0376237 0.844291 0)
(-0.0766775 0.896449 0)
(-0.107072 0.909582 0)
(-0.132675 0.89401 0)
(-0.14477 0.826351 0)
(-0.128637 0.71656 0)
(-0.0954231 0.566361 0)
(-0.0804848 0.415593 0)
(-0.0801158 0.293216 0)
(-0.065401 0.251493 0)
(-0.0561344 0.226508 0)
(-0.0461431 0.227714 0)
(-0.0311649 0.244599 0)
(-0.00851683 0.247081 0)
(0.0252661 0.235471 0)
(0.0346043 0.294717 0)
(0.0364561 0.486569 0)
(0.0361694 0.749906 0)
(0.0324584 0.970875 0)
(0.047586 1.12264 0)
(0.0763678 1.22457 0)
(0.112231 1.28272 0)
(0.132742 1.26092 0)
(0.118752 1.13143 0)
(0.0595944 0.944167 0)
(0.00429982 0.808039 0)
(-0.0227708 0.727191 0)
(-0.0186282 0.657121 0)
(-0.0145407 0.694553 0)
(-0.0381265 0.798228 0)
(-0.09026 0.870207 0)
(-0.130309 0.920461 0)
(-0.156672 0.922395 0)
(-0.161446 0.887119 0)
(-0.149669 0.797686 0)
(-0.117741 0.673028 0)
(-0.0768297 0.523191 0)
(-0.0561884 0.386388 0)
(-0.0667056 0.283235 0)
(-0.0719868 0.230149 0)
(-0.0553466 0.219028 0)
(-0.0428043 0.216605 0)
(-0.0288846 0.232839 0)
(0.00118388 0.228181 0)
(0.0215093 0.222825 0)
(0.0151105 0.290265 0)
(0.00875932 0.476013 0)
(0.0190729 0.736894 0)
(0.0376229 0.946556 0)
(0.0671699 1.09135 0)
(0.101737 1.18906 0)
(0.139611 1.24936 0)
(0.16694 1.24978 0)
(0.16341 1.15665 0)
(0.107244 1.00009 0)
(0.0397983 0.851627 0)
(-0.0045998 0.742206 0)
(-0.00934713 0.638654 0)
(-0.0287129 0.724693 0)
(-0.0752104 0.838929 0)
(-0.127605 0.904816 0)
(-0.153339 0.938203 0)
(-0.163419 0.92174 0)
(-0.15198 0.871455 0)
(-0.129119 0.769283 0)
(-0.0928908 0.633496 0)
(-0.0562367 0.490327 0)
(-0.0409273 0.372818 0)
(-0.0491071 0.280586 0)
(-0.0651908 0.224578 0)
(-0.0583721 0.199773 0)
(-0.0425839 0.203978 0)
(-0.0223364 0.216374 0)
(0.00521988 0.208953 0)
(0.0129393 0.21645 0)
(0.000716273 0.298835 0)
(-0.0164777 0.47238 0)
(0.00125365 0.70956 0)
(0.040299 0.910832 0)
(0.0785917 1.0538 0)
(0.114987 1.15312 0)
(0.150912 1.218 0)
(0.18015 1.23767 0)
(0.184001 1.17878 0)
(0.139254 1.05964 0)
(0.0703214 0.908691 0)
(0.0182362 0.766862 0)
(0.000482961 0.634999 0)
(-0.0423805 0.779249 0)
(-0.0915658 0.884063 0)
(-0.129218 0.933756 0)
(-0.145445 0.951894 0)
(-0.146332 0.919796 0)
(-0.126999 0.851963 0)
(-0.0981978 0.73954 0)
(-0.0651592 0.598172 0)
(-0.0393273 0.466755 0)
(-0.031269 0.366446 0)
(-0.0388052 0.284134 0)
(-0.0524143 0.223529 0)
(-0.0540395 0.187712 0)
(-0.0413203 0.187065 0)
(-0.0173511 0.196996 0)
(0.000495192 0.197963 0)
(0.00615836 0.217508 0)
(-0.00627118 0.315165 0)
(-0.0291707 0.468703 0)
(-0.0104443 0.669095 0)
(0.0371236 0.867274 0)
(0.0805237 1.01423 0)
(0.116485 1.11875 0)
(0.148747 1.18974 0)
(0.176189 1.22429 0)
(0.182883 1.19666 0)
(0.148616 1.11043 0)
(0.0838823 0.970314 0)
(0.0360253 0.799096 0)
(0.00677562 0.649157 0)
(-0.0434079 0.847633 0)
(-0.0844769 0.924581 0)
(-0.114593 0.959383 0)
(-0.126467 0.962219 0)
(-0.121154 0.911875 0)
(-0.0966884 0.827161 0)
(-0.0660517 0.709697 0)
(-0.0423652 0.573473 0)
(-0.0290855 0.453306 0)
(-0.0263108 0.364557 0)
(-0.0338441 0.287818 0)
(-0.0437519 0.224321 0)
(-0.0501819 0.181808 0)
(-0.0411589 0.171542 0)
(-0.0180616 0.182512 0)
(-0.00411807 0.191747 0)
(0.00320036 0.222809 0)
(-0.00820044 0.337427 0)
(-0.0312696 0.470959 0)
(-0.0207309 0.633256 0)
(0.0239552 0.820467 0)
(0.0704718 0.973562 0)
(0.106388 1.08565 0)
(0.135576 1.16407 0)
(0.160873 1.2105 0)
(0.169985 1.21027 0)
(0.144577 1.15564 0)
(0.0830737 1.02561 0)
(0.0424137 0.832029 0)
(0.0116749 0.678329 0)
(-0.0366411 0.90817 0)
(-0.0748428 0.961971 0)
(-0.101488 0.983372 0)
(-0.106551 0.967144 0)
(-0.0934593 0.898998 0)
(-0.0660092 0.800833 0)
(-0.0379167 0.685267 0)
(-0.0250328 0.560931 0)
(-0.025002 0.447339 0)
(-0.0247269 0.364704 0)
(-0.0300479 0.290687 0)
(-0.0378355 0.226149 0)
(-0.0450974 0.179881 0)
(-0.0431783 0.158509 0)
(-0.0244299 0.170263 0)
(-0.00923514 0.188445 0)
(0.000451689 0.232658 0)
(-0.00938457 0.353463 0)
(-0.0294915 0.478682 0)
(-0.028717 0.60712 0)
(0.00697778 0.776179 0)
(0.0525432 0.932534 0)
(0.087375 1.05323 0)
(0.113789 1.13905 0)
(0.137343 1.1942 0)
(0.150709 1.21797 0)
(0.137601 1.19402 0)
(0.0853069 1.08145 0)
(0.0471611 0.864748 0)
(0.011855 0.715201 0)
(-0.0334764 0.96589 0)
(-0.069168 1.00026 0)
(-0.0875229 1.00252 0)
(-0.0842371 0.963473 0)
(-0.0646055 0.880809 0)
(-0.0394726 0.777178 0)
(-0.0197427 0.668019 0)
(-0.0155078 0.556918 0)
(-0.0238341 0.449507 0)
(-0.0257643 0.365528 0)
(-0.0268003 0.292658 0)
(-0.0341609 0.229522 0)
(-0.0422206 0.182335 0)
(-0.047828 0.155636 0)
(-0.0363933 0.158562 0)
(-0.0180426 0.185701 0)
(-0.00663173 0.24284 0)
(-0.0124638 0.367009 0)
(-0.0273014 0.486547 0)
(-0.0324283 0.591163 0)
(-0.00760136 0.73464 0)
(0.0340446 0.89299 0)
(0.0663334 1.02252 0)
(0.0892256 1.11543 0)
(0.109136 1.17625 0)
(0.125517 1.21485 0)
(0.126737 1.21697 0)
(0.0930701 1.12929 0)
(0.0550711 0.907038 0)
(0.0130561 0.75983 0)
(-0.0332653 1.01965 0)
(-0.0597823 1.02805 0)
(-0.066494 1.0136 0)
(-0.0585665 0.955628 0)
(-0.0407917 0.86523 0)
(-0.0242242 0.762283 0)
(-0.015964 0.660401 0)
(-0.018659 0.558394 0)
(-0.0293714 0.455085 0)
(-0.0296665 0.366222 0)
(-0.0266276 0.294916 0)
(-0.0330014 0.234103 0)
(-0.0417173 0.186536 0)
(-0.0492294 0.156837 0)
(-0.0452316 0.152173 0)
(-0.0274938 0.183495 0)
(-0.0185954 0.247189 0)
(-0.0200092 0.376011 0)
(-0.0258223 0.49064 0)
(-0.0311874 0.582556 0)
(-0.017893 0.700519 0)
(0.0169947 0.854236 0)
(0.0481077 0.993377 0)
(0.0690159 1.09495 0)
(0.0856404 1.16012 0)
(0.101641 1.20701 0)
(0.110979 1.22593 0)
(0.0967311 1.16358 0)
(0.0624327 0.953279 0)
(0.0188444 0.803173 0)
(-0.0286267 1.06899 0)
(-0.0470003 1.04448 0)
(-0.0458694 1.0175 0)
(-0.0380156 0.949247 0)
(-0.0270161 0.855582 0)
(-0.0202865 0.756139 0)
(-0.0212344 0.66076 0)
(-0.0261887 0.562092 0)
(-0.0352126 0.458895 0)
(-0.0345361 0.366226 0)
(-0.0276918 0.296448 0)
(-0.0314146 0.238963 0)
(-0.0400854 0.191701 0)
(-0.047119 0.159392 0)
(-0.0447275 0.151567 0)
(-0.0349616 0.180249 0)
(-0.0284914 0.253156 0)
(-0.0285622 0.377963 0)
(-0.0270781 0.490772 0)
(-0.0296901 0.580025 0)
(-0.0255579 0.677922 0)
(-0.000480888 0.820799 0)
(0.0311317 0.964298 0)
(0.0544739 1.07417 0)
(0.0700359 1.1445 0)
(0.08456 1.19598 0)
(0.0960904 1.22727 0)
(0.0928813 1.18468 0)
(0.0664521 0.998156 0)
(0.0264843 0.858378 0)
(-0.0177158 1.1063 0)
(-0.0342265 1.05571 0)
(-0.0318162 1.01873 0)
(-0.027067 0.945738 0)
(-0.0226863 0.851546 0)
(-0.0233321 0.756807 0)
(-0.0275463 0.663895 0)
(-0.0301943 0.564955 0)
(-0.0345342 0.461178 0)
(-0.0371706 0.363787 0)
(-0.0311565 0.296726 0)
(-0.0294101 0.243072 0)
(-0.0368421 0.196435 0)
(-0.0423169 0.16165 0)
(-0.0398967 0.154083 0)
(-0.0365496 0.182337 0)
(-0.0349502 0.257502 0)
(-0.0344382 0.377684 0)
(-0.0309777 0.487738 0)
(-0.0303407 0.577811 0)
(-0.0311807 0.666252 0)
(-0.0159978 0.791299 0)
(0.0156931 0.933812 0)
(0.0432075 1.05121 0)
(0.0614345 1.1287 0)
(0.0744751 1.18269 0)
(0.0848999 1.22371 0)
(0.0853191 1.19804 0)
(0.0614971 1.03377 0)
(0.0231502 0.911201 0)
(-0.0113943 1.13247 0)
(-0.0262409 1.06778 0)
(-0.0255742 1.02099 0)
(-0.0238433 0.944615 0)
(-0.023763 0.851902 0)
(-0.026853 0.759848 0)
(-0.0306639 0.666423 0)
(-0.0302877 0.565468 0)
(-0.0313394 0.462412 0)
(-0.0393642 0.364913 0)
(-0.0347954 0.295124 0)
(-0.0267911 0.244448 0)
(-0.031497 0.200022 0)
(-0.0352259 0.162626 0)
(-0.0344272 0.156758 0)
(-0.0332825 0.18864 0)
(-0.0359809 0.261358 0)
(-0.0370125 0.379038 0)
(-0.0341519 0.484409 0)
(-0.0315892 0.575966 0)
(-0.0342766 0.661194 0)
(-0.0269337 0.767745 0)
(0.00184323 0.902672 0)
(0.0334246 1.02544 0)
(0.055244 1.1116 0)
(0.0694787 1.17061 0)
(0.0782066 1.21993 0)
(0.0804415 1.20935 0)
(0.0568072 1.07124 0)
(0.0211447 0.957729 0)
(-0.00691747 1.15291 0)
(-0.020751 1.07967 0)
(-0.0237932 1.02352 0)
(-0.0235637 0.945579 0)
(-0.0242543 0.853657 0)
(-0.0279043 0.763467 0)
(-0.0304535 0.668024 0)
(-0.0281882 0.564828 0)
(-0.0272157 0.46384 0)
(-0.0348994 0.366924 0)
(-0.032835 0.290103 0)
(-0.0241864 0.244343 0)
(-0.0232708 0.202056 0)
(-0.0272363 0.165837 0)
(-0.0291058 0.162017 0)
(-0.0295198 0.195172 0)
(-0.0353069 0.268303 0)
(-0.0373604 0.380841 0)
(-0.0348372 0.481845 0)
(-0.0313843 0.57468 0)
(-0.0332657 0.662228 0)
(-0.0305269 0.752627 0)
(-0.00791175 0.874443 0)
(0.0245721 0.998604 0)
(0.0494411 1.0937 0)
(0.0643836 1.15822 0)
(0.0736789 1.2166 0)
(0.0777146 1.21817 0)
(0.0533743 1.10736 0)
(0.0213255 1.00083 0)
(-0.00383016 1.16746 0)
(-0.0170295 1.09286 0)
(-0.0234885 1.02774 0)
(-0.0224509 0.947114 0)
(-0.0245534 0.856472 0)
(-0.027958 0.76726 0)
(-0.0290518 0.668364 0)
(-0.0248324 0.562945 0)
(-0.019638 0.463099 0)
(-0.0213591 0.367367 0)
(-0.0240617 0.284404 0)
(-0.0186856 0.241208 0)
(-0.0146813 0.205132 0)
(-0.0190104 0.17127 0)
(-0.0233037 0.16851 0)
(-0.0248343 0.20537 0)
(-0.0331265 0.275772 0)
(-0.0359235 0.382467 0)
(-0.0332019 0.47952 0)
(-0.0288831 0.572596 0)
(-0.0272011 0.663397 0)
(-0.0259668 0.743542 0)
(-0.00977376 0.851617 0)
(0.0197353 0.972694 0)
(0.0451358 1.07562 0)
(0.0600311 1.14694 0)
(0.0673521 1.21226 0)
(0.0755217 1.22676 0)
(0.0532614 1.14204 0)
(0.0239816 1.04144 0)
(-0.00186854 1.17955 0)
(-0.0143636 1.1071 0)
(-0.0219131 1.03172 0)
(-0.0220063 0.950097 0)
(-0.0267666 0.859982 0)
(-0.0292171 0.769529 0)
(-0.0272256 0.666938 0)
(-0.0195665 0.558319 0)
(-0.00927727 0.457996 0)
(-0.00459303 0.365672 0)
(-0.00956339 0.284174 0)
(-0.0069426 0.240053 0)
(-0.00430356 0.209263 0)
(-0.00944135 0.179353 0)
(-0.0171333 0.177218 0)
(-0.0211648 0.215699 0)
(-0.0298539 0.285059 0)
(-0.0327086 0.38501 0)
(-0.0287259 0.476944 0)
(-0.0227372 0.569506 0)
(-0.0162168 0.661985 0)
(-0.0146994 0.739889 0)
(-0.00517123 0.834027 0)
(0.0215669 0.950114 0)
(0.0454461 1.05939 0)
(0.0588856 1.13686 0)
(0.0633359 1.20836 0)
(0.0714297 1.23014 0)
(0.0570171 1.17324 0)
(0.0299078 1.08593 0)
(0.000256728 1.18657 0)
(-0.0121903 1.12035 0)
(-0.0215157 1.03747 0)
(-0.0255135 0.954195 0)
(-0.0309687 0.863595 0)
(-0.0303963 0.769698 0)
(-0.0226077 0.661961 0)
(-0.00852224 0.549846 0)
(0.00454339 0.449309 0)
(0.0124384 0.3624 0)
(0.00831041 0.286093 0)
(0.00790788 0.238971 0)
(0.00774903 0.215388 0)
(0.0013104 0.190591 0)
(-0.00951217 0.188727 0)
(-0.0164087 0.228631 0)
(-0.0254359 0.293261 0)
(-0.0274917 0.385106 0)
(-0.0219302 0.472661 0)
(-0.0134822 0.563634 0)
(-0.00261408 0.658041 0)
(0.00277463 0.740564 0)
(0.00546599 0.8199 0)
(0.0237111 0.928302 0)
(0.049569 1.04446 0)
(0.064724 1.13078 0)
(0.0669617 1.20567 0)
(0.0740485 1.22911 0)
(0.0639895 1.19641 0)
(0.03954 1.13276 0)
(-0.000551871 1.1929 0)
(-0.0126346 1.13623 0)
(-0.0260648 1.04506 0)
(-0.0324442 0.959791 0)
(-0.0338107 0.866672 0)
(-0.0249312 0.765149 0)
(-0.00731029 0.650625 0)
(0.00987767 0.538253 0)
(0.0213461 0.440325 0)
(0.0288417 0.35929 0)
(0.0269573 0.289692 0)
(0.020437 0.240877 0)
(0.0173358 0.224299 0)
(0.012888 0.204892 0)
(-0.00185065 0.20439 0)
(-0.0105835 0.241776 0)
(-0.018641 0.302636 0)
(-0.0207424 0.384425 0)
(-0.0147049 0.46657 0)
(-0.00450533 0.553865 0)
(0.00981209 0.649302 0)
(0.0209567 0.738811 0)
(0.0237086 0.821271 0)
(0.0270994 0.913607 0)
(0.0464084 1.02348 0)
(0.071044 1.12341 0)
(0.0772174 1.20511 0)
(0.0863628 1.22997 0)
(0.0729656 1.21553 0)
(0.0454889 1.1892 0)
(-0.0057857 1.20016 0)
(-0.0166301 1.1559 0)
(-0.0357244 1.05522 0)
(-0.0338921 0.966464 0)
(-0.0259845 0.862055 0)
(-0.00355646 0.751224 0)
(0.0172256 0.635151 0)
(0.0289714 0.529568 0)
(0.0366225 0.434597 0)
(0.043719 0.356549 0)
(0.0430432 0.294145 0)
(0.0341016 0.250862 0)
(0.0235988 0.228975 0)
(0.020292 0.221789 0)
(0.00649656 0.222687 0)
(-0.00361153 0.256386 0)
(-0.0123814 0.310967 0)
(-0.0143465 0.384083 0)
(-0.00923503 0.460491 0)
(0.000905983 0.541394 0)
(0.0163418 0.635135 0)
(0.0318919 0.730222 0)
(0.0399164 0.822405 0)
(0.0413165 0.915725 0)
(0.0461559 1.01116 0)
(0.0616313 1.10618 0)
(0.0815723 1.19769 0)
(0.0953673 1.23164 0)
(0.0796988 1.24047 0)
(0.0467186 1.24597 0)
(-0.0135236 1.2151 0)
(-0.0210415 1.17769 0)
(-0.0330307 1.06268 0)
(-0.0168659 0.962957 0)
(0.004194 0.847227 0)
(0.0252674 0.736159 0)
(0.0368566 0.627404 0)
(0.0424664 0.525755 0)
(0.0496325 0.429429 0)
(0.0570256 0.354015 0)
(0.0558839 0.299605 0)
(0.0464807 0.262422 0)
(0.030888 0.243747 0)
(0.023323 0.235767 0)
(0.0105722 0.241889 0)
(0.00097597 0.272362 0)
(-0.00837915 0.320922 0)
(-0.0111779 0.384019 0)
(-0.00699553 0.455405 0)
(0.00265706 0.528973 0)
(0.0155514 0.618513 0)
(0.0330841 0.715207 0)
(0.0468663 0.815726 0)
(0.0529634 0.916332 0)
(0.0552848 1.01488 0)
(0.0593104 1.10309 0)
(0.0698674 1.18341 0)
(0.0904687 1.23324 0)
(0.0768016 1.26891 0)
(0.0495285 1.30784 0)
(-0.0230774 1.23738 0)
(-0.0146162 1.18659 0)
(-0.00643744 1.06019 0)
(0.0179424 0.951462 0)
(0.0339042 0.83777 0)
(0.0424174 0.731793 0)
(0.046157 0.625622 0)
(0.0515625 0.52094 0)
(0.0615591 0.422903 0)
(0.068798 0.352746 0)
(0.0663848 0.306892 0)
(0.0553833 0.276538 0)
(0.0390715 0.259249 0)
(0.0293017 0.254186 0)
(0.0124367 0.259397 0)
(0.00361919 0.288282 0)
(-0.00667095 0.330998 0)
(-0.0110287 0.385406 0)
(-0.00736977 0.448856 0)
(0.000177933 0.520754 0)
(0.0102924 0.603593 0)
(0.0263527 0.696931 0)
(0.0435935 0.802389 0)
(0.0551366 0.91003 0)
(0.0597234 1.01549 0)
(0.0602518 1.10922 0)
(0.0640259 1.18565 0)
(0.0688348 1.23841 0)
(0.0637859 1.29692 0)
(0.0426894 1.36807 0)
(-0.0169505 1.26352 0)
(0.00572005 1.17657 0)
(0.0266493 1.05244 0)
(0.0407515 0.947665 0)
(0.0459748 0.838335 0)
(0.0471393 0.731291 0)
(0.0507887 0.621796 0)
(0.0612292 0.512341 0)
(0.0747825 0.416275 0)
(0.0804037 0.352897 0)
(0.0760513 0.315242 0)
(0.063237 0.290821 0)
(0.0464809 0.276427 0)
(0.0341903 0.274335 0)
(0.0157418 0.280518 0)
(0.00307273 0.303484 0)
(-0.0066889 0.342518 0)
(-0.0127796 0.387707 0)
(-0.0108742 0.443828 0)
(-0.00474334 0.512595 0)
(0.00200014 0.591922 0)
(0.015142 0.679767 0)
(0.0332612 0.785069 0)
(0.0481508 0.89909 0)
(0.0556575 1.01204 0)
(0.0563665 1.11235 0)
(0.0544015 1.19446 0)
(0.0508628 1.25622 0)
(0.04464 1.32225 0)
(0.0292027 1.42088 0)
(0.00635548 1.2736 0)
(0.0238993 1.16307 0)
(0.0433183 1.05341 0)
(0.0455357 0.950005 0)
(0.0442734 0.838818 0)
(0.0477744 0.726916 0)
(0.0586015 0.613279 0)
(0.0763039 0.500616 0)
(0.0895758 0.410916 0)
(0.0925223 0.356004 0)
(0.0851316 0.325865 0)
(0.0700534 0.306766 0)
(0.0520436 0.295777 0)
(0.037445 0.295575 0)
(0.0197241 0.302053 0)
(0.00409303 0.321143 0)
(-0.00853826 0.35354 0)
(-0.015252 0.391944 0)
(-0.0161437 0.440347 0)
(-0.0115668 0.506322 0)
(-0.00751981 0.582179 0)
(0.00233967 0.66511 0)
(0.0187006 0.766194 0)
(0.0344084 0.884229 0)
(0.0440822 1.00518 0)
(0.0462723 1.1136 0)
(0.0414432 1.20389 0)
(0.0339162 1.27737 0)
(0.0287868 1.35283 0)
(0.0158905 1.45922 0)
(0.0134144 1.26852 0)
(0.0267603 1.15998 0)
(0.0400222 1.05556 0)
(0.0373601 0.952778 0)
(0.0385682 0.833843 0)
(0.0527434 0.715655 0)
(0.0748854 0.598764 0)
(0.0949273 0.489847 0)
(0.104408 0.408984 0)
(0.103749 0.362534 0)
(0.0930869 0.339 0)
(0.0747806 0.324275 0)
(0.0558112 0.316659 0)
(0.03881 0.317837 0)
(0.0207895 0.324744 0)
(0.0036606 0.340595 0)
(-0.0108104 0.366294 0)
(-0.0190918 0.39728 0)
(-0.0228453 0.438374 0)
(-0.0205939 0.502252 0)
(-0.0187146 0.574738 0)
(-0.0111361 0.65322 0)
(0.00140478 0.748506 0)
(0.0166294 0.867655 0)
(0.0270072 0.993337 0)
(0.0316732 1.11178 0)
(0.0271975 1.21102 0)
(0.0194778 1.29437 0)
(0.0162099 1.37989 0)
(0.0113424 1.48568 0)
(0.00619449 1.26456 0)
(0.0168595 1.15844 0)
(0.0233416 1.05318 0)
(0.0250623 0.949306 0)
(0.0400705 0.818817 0)
(0.069411 0.696805 0)
(0.0967298 0.582049 0)
(0.112227 0.483904 0)
(0.117369 0.411095 0)
(0.112535 0.372319 0)
(0.0987272 0.354501 0)
(0.0778843 0.343882 0)
(0.0581712 0.338146 0)
(0.0389251 0.340732 0)
(0.0203956 0.347968 0)
(0.0024637 0.360473 0)
(-0.0133427 0.380183 0)
(-0.0242264 0.404516 0)
(-0.030769 0.439226 0)
(-0.0317616 0.50018 0)
(-0.0322628 0.569633 0)
(-0.0273301 0.64348 0)
(-0.0191136 0.732883 0)
(-0.00479208 0.848864 0)
(0.00784447 0.978844 0)
(0.0139996 1.10503 0)
(0.0112317 1.21585 0)
(0.00540942 1.306 0)
(0.00393941 1.39903 0)
(0.00810314 1.49986 0)
(-0.00110833 1.26481 0)
(0.0013832 1.15619 0)
(0.00435769 1.04476 0)
(0.0243949 0.933895 0)
(0.060095 0.792345 0)
(0.0959808 0.674289 0)
(0.116467 0.572379 0)
(0.126298 0.482551 0)
(0.126826 0.416627 0)
(0.118164 0.384806 0)
(0.101741 0.372052 0)
(0.0790147 0.364019 0)
(0.0582665 0.3602 0)
(0.0372041 0.364967 0)
(0.0171888 0.372387 0)
(-0.00121831 0.381138 0)
(-0.0173797 0.395672 0)
(-0.0308528 0.41399 0)
(-0.0399859 0.443159 0)
(-0.0446007 0.501251 0)
(-0.0487577 0.567915 0)
(-0.0482141 0.638263 0)
(-0.0447432 0.720992 0)
(-0.0322982 0.826996 0)
(-0.0132797 0.960565 0)
(-0.00254419 1.09546 0)
(-0.00407967 1.21476 0)
(-0.0075195 1.31172 0)
(-0.00727302 1.41065 0)
(0.00492089 1.50375 0)
(-0.0112076 1.26937 0)
(-0.0122522 1.15641 0)
(-4.3047e-05 1.03124 0)
(0.0492517 0.898127 0)
(0.0927614 0.764105 0)
(0.118071 0.661837 0)
(0.131123 0.56844 0)
(0.135788 0.484183 0)
(0.132425 0.424638 0)
(0.12039 0.399492 0)
(0.101523 0.391281 0)
(0.0774983 0.38601 0)
(0.055594 0.383404 0)
(0.0334931 0.389413 0)
(0.0138391 0.396863 0)
(-0.0053291 0.402482 0)
(-0.0230856 0.412386 0)
(-0.038244 0.425972 0)
(-0.050076 0.450294 0)
(-0.0587756 0.506438 0)
(-0.0678104 0.571079 0)
(-0.0727896 0.639868 0)
(-0.0745869 0.717047 0)
(-0.0651916 0.809529 0)
(-0.0433769 0.93593 0)
(-0.0196962 1.08095 0)
(-0.0152852 1.21263 0)
(-0.0182749 1.31066 0)
(-0.017848 1.41455 0)
(-0.000185245 1.49922 0)
(-0.0206989 1.28331 0)
(-0.0132107 1.14833 0)
(0.026434 0.992316 0)
(0.0835024 0.861178 0)
(0.116375 0.749818 0)
(0.132675 0.65597 0)
(0.139933 0.567245 0)
(0.141159 0.487767 0)
(0.134465 0.43549 0)
(0.118845 0.416441 0)
(0.0979461 0.412127 0)
(0.0732353 0.408484 0)
(0.0510194 0.406923 0)
(0.0285678 0.413713 0)
(0.00798719 0.421014 0)
(-0.0116427 0.425118 0)
(-0.0299343 0.430756 0)
(-0.0464602 0.440208 0)
(-0.0604271 0.461241 0)
(-0.0730206 0.51637 0)
(-0.0867787 0.579804 0)
(-0.0963941 0.648353 0)
(-0.102707 0.720696 0)
(-0.0987898 0.800581 0)
(-0.0793692 0.913549 0)
(-0.0491143 1.0583 0)
(-0.0301607 1.20526 0)
(-0.0264109 1.30991 0)
(-0.0287271 1.41213 0)
(-0.00470104 1.486 0)
(-0.0178002 1.30297 0)
(0.0142471 1.12039 0)
(0.0648449 0.954831 0)
(0.106118 0.840514 0)
(0.129415 0.741441 0)
(0.140298 0.652242 0)
(0.144567 0.567463 0)
(0.142717 0.493456 0)
(0.132137 0.448745 0)
(0.113042 0.435583 0)
(0.0908779 0.43404 0)
(0.0666649 0.4316 0)
(0.0456593 0.43049 0)
(0.0232891 0.437789 0)
(0.0028805 0.445152 0)
(-0.0169662 0.447341 0)
(-0.0358272 0.449539 0)
(-0.0530437 0.456142 0)
(-0.0691405 0.475344 0)
(-0.0848224 0.530391 0)
(-0.10185 0.593398 0)
(-0.115355 0.661768 0)
(-0.124192 0.731287 0)
(-0.126711 0.802851 0)
(-0.116088 0.900912 0)
(-0.0868595 1.03331 0)
(-0.0578171 1.19109 0)
(-0.0390418 1.3063 0)
(-0.0394001 1.4052 0)
(-0.00994958 1.46383 0)
(0.0103342 1.3055 0)
(0.0471848 1.08166 0)
(0.0923065 0.931896 0)
(0.11911 0.826047 0)
(0.135423 0.73437 0)
(0.144018 0.649317 0)
(0.14572 0.56916 0)
(0.140046 0.501633 0)
(0.125011 0.464968 0)
(0.103903 0.456143 0)
(0.0826413 0.455466 0)
(0.0607687 0.452585 0)
(0.0399394 0.453037 0)
(0.0182007 0.460894 0)
(-0.00207499 0.467646 0)
(-0.020999 0.468932 0)
(-0.0394481 0.468425 0)
(-0.0568189 0.473533 0)
(-0.0742516 0.492121 0)
(-0.0925826 0.546961 0)
(-0.111299 0.610561 0)
(-0.127867 0.678145 0)
(-0.141186 0.744352 0)
(-0.148124 0.812523 0)
(-0.146829 0.898687 0)
(-0.127441 1.01712 0)
(-0.0949798 1.16912 0)
(-0.0640306 1.29769 0)
(-0.0531778 1.39552 0)
(-0.0179038 1.43364 0)
(0.0292085 1.28398 0)
(0.0664552 1.05792 0)
(0.103442 0.915574 0)
(0.12421 0.814237 0)
(0.137983 0.727375 0)
(0.14462 0.646796 0)
(0.14283 0.572625 0)
(0.13289 0.512548 0)
(0.114919 0.482608 0)
(0.094472 0.475212 0)
(0.0746473 0.475151 0)
(0.0546221 0.472909 0)
(0.0345791 0.474708 0)
(0.0140168 0.482328 0)
(-0.00473673 0.488279 0)
(-0.0228369 0.48843 0)
(-0.0405846 0.486612 0)
(-0.057366 0.490087 0)
(-0.0754527 0.510234 0)
(-0.0955924 0.56488 0)
(-0.115674 0.628528 0)
(-0.133567 0.697555 0)
(-0.15211 0.760806 0)
(-0.16562 0.824664 0)
(-0.169458 0.902825 0)
(-0.158901 1.00967 0)
(-0.131138 1.15034 0)
(-0.0925051 1.28285 0)
(-0.0722153 1.37754 0)
(-0.0228753 1.39505 0)
(0.0335447 1.25344 0)
(0.0724229 1.0336 0)
(0.105148 0.899964 0)
(0.124835 0.80252 0)
(0.137334 0.720364 0)
(0.141189 0.645577 0)
(0.135315 0.578376 0)
(0.123163 0.524122 0)
(0.105284 0.498805 0)
(0.0859717 0.492671 0)
(0.0668635 0.493661 0)
(0.0482325 0.491484 0)
(0.0286315 0.494506 0)
(0.00964894 0.501424 0)
(-0.00759858 0.506088 0)
(-0.0235831 0.506105 0)
(-0.0397215 0.503168 0)
(-0.0553819 0.505785 0)
(-0.0734595 0.528827 0)
(-0.0945798 0.582874 0)
(-0.116032 0.646343 0)
(-0.135344 0.71604 0)
(-0.1554 0.780721 0)
(-0.175354 0.839764 0)
(-0.186108 0.909654 0)
(-0.179696 1.0035 0)
(-0.156653 1.13262 0)
(-0.116049 1.26237 0)
(-0.0853786 1.35291 0)
(-0.0288657 1.34962 0)
(0.0319683 1.21549 0)
(0.0703654 1.00834 0)
(0.103219 0.882276 0)
(0.122192 0.789868 0)
(0.132815 0.713974 0)
(0.133043 0.645758 0)
(0.124817 0.584488 0)
(0.113304 0.534145 0)
(0.0971569 0.512839 0)
(0.078694 0.509457 0)
(0.0600557 0.510029 0)
(0.0411712 0.509101 0)
(0.0227857 0.512129 0)
(0.00600564 0.517599 0)
(-0.00876096 0.520944 0)
(-0.0229106 0.52035 0)
(-0.036844 0.517436 0)
(-0.0510486 0.520007 0)
(-0.0686437 0.546027 0)
(-0.0897673 0.600961 0)
(-0.11296 0.66388 0)
(-0.133227 0.733007 0)
(-0.152995 0.798962 0)
(-0.173322 0.859655 0)
(-0.192087 0.918656 0)
(-0.190917 0.999613 0)
(-0.170747 1.11406 0)
(-0.132017 1.23638 0)
(-0.0921053 1.32186 0)
(-0.0338206 1.30078 0)
(0.0287375 1.17771 0)
(0.065187 0.98149 0)
(0.0984548 0.862812 0)
(0.116198 0.777287 0)
(0.12365 0.70865 0)
(0.121334 0.646873 0)
(0.113236 0.589759 0)
(0.104222 0.541445 0)
(0.0900802 0.524864 0)
(0.0725496 0.524717 0)
(0.0533448 0.525641 0)
(0.033778 0.524577 0)
(0.0164196 0.526579 0)
(0.00200187 0.529862 0)
(-0.010263 0.531932 0)
(-0.0213298 0.531366 0)
(-0.0327787 0.52846 0)
(-0.045107 0.532443 0)
(-0.0621287 0.560438 0)
(-0.0826726 0.618235 0)
(-0.107145 0.681251 0)
(-0.128486 0.747312 0)
(-0.145684 0.813382 0)
(-0.163885 0.877592 0)
(-0.183156 0.933959 0)
(-0.192349 0.996924 0)
(-0.174799 1.09606 0)
(-0.138255 1.20756 0)
(-0.0914731 1.28265 0)
(-0.0352018 1.25203 0)
(0.025847 1.14194 0)
(0.0592298 0.95383 0)
(0.0910562 0.84222 0)
(0.106241 0.765759 0)
(0.110731 0.704573 0)
(0.108033 0.647881 0)
(0.102254 0.592151 0)
(0.0959245 0.54714 0)
(0.0831926 0.53563 0)
(0.0671295 0.537896 0)
(0.0464213 0.540116 0)
(0.0262134 0.537828 0)
(0.0106809 0.53728 0)
(-0.000987712 0.538305 0)
(-0.0102975 0.539253 0)
(-0.0189251 0.538116 0)
(-0.027785 0.53611 0)
(-0.0382118 0.54212 0)
(-0.0548448 0.572925 0)
(-0.0753888 0.632129 0)
(-0.100028 0.698002 0)
(-0.121732 0.758791 0)
(-0.13672 0.823913 0)
(-0.15023 0.890468 0)
(-0.165859 0.948591 0)
(-0.178558 1.00171 0)
(-0.170974 1.07775 0)
(-0.134178 1.17715 0)
(-0.0840995 1.24356 0)
(-0.0340494 1.20525 0)
(0.0228653 1.10893 0)
(0.0530245 0.927955 0)
(0.081245 0.823546 0)
(0.0930739 0.755782 0)
(0.0968566 0.700987 0)
(0.0957871 0.64687 0)
(0.0922175 0.592607 0)
(0.0871209 0.55185 0)
(0.0747503 0.543219 0)
(0.0598229 0.550041 0)
(0.0387333 0.553771 0)
(0.0195136 0.548121 0)
(0.00572267 0.544422 0)
(-0.00321092 0.543241 0)
(-0.0100981 0.54336 0)
(-0.0159945 0.542296 0)
(-0.0233406 0.540905 0)
(-0.031789 0.549692 0)
(-0.0476983 0.583748 0)
(-0.0695818 0.64401 0)
(-0.0923582 0.713676 0)
(-0.112616 0.768208 0)
(-0.126154 0.830974 0)
(-0.136244 0.89761 0)
(-0.146223 0.957928 0)
(-0.156182 1.00809 0)
(-0.155764 1.06493 0)
(-0.12598 1.1427 0)
(-0.0759933 1.20261 0)
(-0.0263098 1.16143 0)
(0.0197194 1.07943 0)
(0.0471274 0.905781 0)
(0.0689808 0.806955 0)
(0.0801293 0.747124 0)
(0.0851173 0.695979 0)
(0.0853331 0.644777 0)
(0.0830694 0.592341 0)
(0.0779042 0.557143 0)
(0.0642024 0.552107 0)
(0.0490649 0.561295 0)
(0.0311039 0.565863 0)
(0.0155728 0.556717 0)
(0.00449065 0.548983 0)
(-0.00272117 0.546318 0)
(-0.00828385 0.545701 0)
(-0.0134848 0.544839 0)
(-0.0202737 0.544344 0)
(-0.0274482 0.555663 0)
(-0.0423448 0.594819 0)
(-0.0650711 0.65658 0)
(-0.084163 0.724772 0)
(-0.10131 0.777477 0)
(-0.114666 0.83672 0)
(-0.123759 0.90102 0)
(-0.129644 0.961274 0)
(-0.133324 1.01049 0)
(-0.133863 1.05727 0)
(-0.112539 1.11158 0)
(-0.0710984 1.16176 0)
(-0.021396 1.12332 0)
(0.0173409 1.0547 0)
(0.0395325 0.888116 0)
(0.0567226 0.792097 0)
(0.0701066 0.737639 0)
(0.0761828 0.690347 0)
(0.0776466 0.6427 0)
(0.0743102 0.593132 0)
(0.0663922 0.563441 0)
(0.0507355 0.563636 0)
(0.0372934 0.572624 0)
(0.0253917 0.574418 0)
(0.0157137 0.562614 0)
(0.00593434 0.552924 0)
(-0.000947952 0.549176 0)
(-0.00642785 0.548287 0)
(-0.0114789 0.547866 0)
(-0.0188207 0.547859 0)
(-0.0255425 0.561405 0)
(-0.039701 0.60662 0)
(-0.0616794 0.669357 0)
(-0.0770839 0.733094 0)
(-0.0900128 0.786877 0)
(-0.10301 0.843604 0)
(-0.112726 0.90425 0)
(-0.117345 0.96146 0)
(-0.117213 1.00779 0)
(-0.113901 1.04906 0)
(-0.0959321 1.08488 0)
(-0.0635699 1.12471 0)
(-0.0193687 1.08719 0)
(0.0151348 1.03393 0)
(0.0309284 0.876454 0)
(0.046956 0.776544 0)
(0.0620021 0.729021 0)
(0.0697177 0.685235 0)
(0.0716215 0.643783 0)
(0.0673454 0.598167 0)
(0.0566109 0.574849 0)
(0.0408246 0.574814 0)
(0.0315299 0.580072 0)
(0.0249512 0.579617 0)
(0.0176189 0.569588 0)
(0.00904651 0.558353 0)
(0.00205452 0.553105 0)
(-0.00376687 0.551994 0)
(-0.00995246 0.551755 0)
(-0.0173709 0.552352 0)
(-0.0245721 0.568057 0)
(-0.0380407 0.620054 0)
(-0.0580499 0.683286 0)
(-0.0722723 0.740222 0)
(-0.084157 0.794797 0)
(-0.096263 0.850461 0)
(-0.105356 0.907474 0)
(-0.109788 0.961792 0)
(-0.108079 1.00441 0)
(-0.100881 1.04021 0)
(-0.0803262 1.06274 0)
(-0.0528785 1.095 0)
(-0.0151143 1.05432 0)
(0.0108225 1.01765 0)
(0.0249778 0.86797 0)
(0.0388439 0.764622 0)
(0.0585565 0.722464 0)
(0.0679486 0.683099 0)
(0.0697775 0.644975 0)
(0.066048 0.603358 0)
(0.0542965 0.585377 0)
(0.0378657 0.586518 0)
(0.0281396 0.588855 0)
(0.0232298 0.58606 0)
(0.0188663 0.577046 0)
(0.0118419 0.564477 0)
(0.00504699 0.558088 0)
(-0.00148047 0.557105 0)
(-0.00828145 0.556752 0)
(-0.0160516 0.557732 0)
(-0.0236256 0.57555 0)
(-0.0358639 0.633298 0)
(-0.0529621 0.696868 0)
(-0.066078 0.75074 0)
(-0.0795629 0.804562 0)
(-0.0931492 0.85773 0)
(-0.102858 0.910474 0)
(-0.107385 0.961857 0)
(-0.105141 0.999159 0)
(-0.0948881 1.02904 0)
(-0.0729266 1.04065 0)
(-0.044825 1.06805 0)
(-0.00970175 1.02887 0)
(0.0104953 1.00604 0)
(0.0238089 0.862711 0)
(0.0387494 0.754002 0)
(0.061032 0.711986 0)
(0.0720447 0.679321 0)
(0.0739926 0.645749 0)
(0.0656342 0.611763 0)
(0.0498561 0.601542 0)
(0.0324967 0.600998 0)
(0.0253088 0.59731 0)
(0.02241 0.590689 0)
(0.0198578 0.582532 0)
(0.0143449 0.570995 0)
(0.00769983 0.564344 0)
(0.000504976 0.563449 0)
(-0.00708569 0.562877 0)
(-0.0152924 0.564067 0)
(-0.0231313 0.583696 0)
(-0.0341487 0.64538 0)
(-0.0482887 0.708284 0)
(-0.0598615 0.761498 0)
(-0.0737719 0.815915 0)
(-0.0891829 0.866902 0)
(-0.10082 0.915172 0)
(-0.106261 0.962379 0)
(-0.103991 0.994283 0)
(-0.0921823 1.01804 0)
(-0.0688026 1.02226 0)
(-0.0424152 1.04366 0)
(-0.00830928 1.00949 0)
(0.0117445 0.993619 0)
(0.0298466 0.856191 0)
(0.0464451 0.744051 0)
(0.0667462 0.704976 0)
(0.0728745 0.681748 0)
(0.0712376 0.65474 0)
(0.0606763 0.624897 0)
(0.046355 0.617676 0)
(0.0334106 0.611545 0)
(0.028203 0.602733 0)
(0.0249951 0.594892 0)
(0.0221321 0.588098 0)
(0.0168032 0.578248 0)
(0.00997053 0.572038 0)
(0.0017191 0.571375 0)
(-0.00693412 0.57056 0)
(-0.0158937 0.571532 0)
(-0.0247039 0.592006 0)
(-0.0340706 0.65579 0)
(-0.0453709 0.717671 0)
(-0.0552321 0.771942 0)
(-0.0684669 0.826741 0)
(-0.0844218 0.877397 0)
(-0.098541 0.921003 0)
(-0.106361 0.962899 0)
(-0.104946 0.98909 0)
(-0.0919197 1.00544 0)
(-0.0668979 1.00324 0)
(-0.0413469 1.02188 0)
(-0.0100277 0.991278 0)
(0.0144821 0.979425 0)
(0.0378012 0.844504 0)
(0.0580415 0.734759 0)
(0.070594 0.702169 0)
(0.0709116 0.685545 0)
(0.0681644 0.661503 0)
(0.0593493 0.634824 0)
(0.0496312 0.628122 0)
(0.0408777 0.618896 0)
(0.0359994 0.608969 0)
(0.0311826 0.600765 0)
(0.0263069 0.594844 0)
(0.0199242 0.586963 0)
(0.0117886 0.581782 0)
(0.00197125 0.581343 0)
(-0.00808678 0.580213 0)
(-0.0183146 0.580683 0)
(-0.0285539 0.601165 0)
(-0.0369749 0.663956 0)
(-0.0451801 0.725408 0)
(-0.053458 0.781534 0)
(-0.0652401 0.836616 0)
(-0.080554 0.887174 0)
(-0.0944165 0.928558 0)
(-0.104852 0.964319 0)
(-0.106241 0.983333 0)
(-0.0930556 0.990273 0)
(-0.0683622 0.985275 0)
(-0.0409682 1.00258 0)
(-0.0103261 0.975345 0)
(0.0170762 0.960352 0)
(0.0468482 0.827852 0)
(0.0690518 0.726799 0)
(0.0726145 0.704581 0)
(0.0667954 0.691261 0)
(0.0636222 0.666018 0)
(0.0602801 0.641806 0)
(0.0558625 0.634063 0)
(0.0518153 0.624273 0)
(0.0473023 0.615296 0)
(0.0402307 0.6089 0)
(0.0323725 0.604 0)
(0.0233318 0.597618 0)
(0.0131228 0.593432 0)
(0.00158233 0.593097 0)
(-0.0102638 0.592075 0)
(-0.022321 0.592144 0)
(-0.0345094 0.611752 0)
(-0.0436122 0.670179 0)
(-0.0501725 0.731358 0)
(-0.0564202 0.789402 0)
(-0.0658556 0.845333 0)
(-0.0785716 0.895226 0)
(-0.0902371 0.934345 0)
(-0.099906 0.96695 0)
(-0.102306 0.978665 0)
(-0.0923582 0.975423 0)
(-0.0708784 0.968083 0)
(-0.0429042 0.980103 0)
(-0.0113652 0.957645 0)
(0.0206264 0.935681 0)
(0.0543926 0.806614 0)
(0.0748123 0.720581 0)
(0.0716385 0.709734 0)
(0.0647346 0.693825 0)
(0.0674374 0.664246 0)
(0.0689241 0.643622 0)
(0.0679199 0.636387 0)
(0.065161 0.628825 0)
(0.059218 0.623088 0)
(0.0494841 0.619119 0)
(0.0392727 0.61612 0)
(0.0265425 0.61108 0)
(0.0141324 0.607017 0)
(0.000830692 0.606711 0)
(-0.0135108 0.606086 0)
(-0.027058 0.605438 0)
(-0.0416935 0.623691 0)
(-0.0532143 0.676349 0)
(-0.0609908 0.735269 0)
(-0.0657266 0.794622 0)
(-0.0716122 0.85126 0)
(-0.0798396 0.900926 0)
(-0.0884052 0.938017 0)
(-0.0953619 0.966578 0)
(-0.0928342 0.974027 0)
(-0.0861825 0.962664 0)
(-0.068487 0.951754 0)
(-0.042938 0.956243 0)
(-0.012332 0.937567 0)
(0.0230425 0.904639 0)
(0.0588202 0.784205 0)
(0.0743219 0.716391 0)
(0.0689803 0.715214 0)
(0.068848 0.690278 0)
(0.0765936 0.657383 0)
(0.0816995 0.642656 0)
(0.0816262 0.638093 0)
(0.0770338 0.633529 0)
(0.0688537 0.630643 0)
(0.0571763 0.628661 0)
(0.0442158 0.627086 0)
(0.0298729 0.624126 0)
(0.0148178 0.620838 0)
(-0.00140419 0.621145 0)
(-0.0171913 0.619998 0)
(-0.0322468 0.619282 0)
(-0.0492686 0.636895 0)
(-0.0634423 0.684339 0)
(-0.0741213 0.739342 0)
(-0.0798822 0.79693 0)
(-0.0825259 0.852868 0)
(-0.0849536 0.903997 0)
(-0.0896071 0.94103 0)
(-0.0926772 0.963409 0)
(-0.0843469 0.965827 0)
(-0.0764794 0.952449 0)
(-0.061286 0.936654 0)
(-0.0387801 0.932262 0)
(-0.0108592 0.91782 0)
(0.0232017 0.868504 0)
(0.06082 0.764013 0)
(0.0698423 0.715332 0)
(0.0701313 0.717048 0)
(0.076645 0.684241 0)
(0.0829605 0.652843 0)
(0.0871062 0.64298 0)
(0.0848551 0.643357 0)
(0.0769156 0.641519 0)
(0.0665301 0.64031 0)
(0.0542047 0.64091 0)
(0.041444 0.640907 0)
(0.0283122 0.639231 0)
(0.0140997 0.638035 0)
(-0.00142806 0.638054 0)
(-0.0170593 0.63548 0)
(-0.0340685 0.634403 0)
(-0.0539585 0.650181 0)
(-0.0718103 0.692827 0)
(-0.0859186 0.744245 0)
(-0.0943753 0.798411 0)
(-0.0957189 0.850837 0)
(-0.094202 0.902939 0)
(-0.0939064 0.943302 0)
(-0.0926897 0.958568 0)
(-0.0815917 0.954481 0)
(-0.0687331 0.941784 0)
(-0.0517153 0.920348 0)
(-0.0310969 0.911329 0)
(-0.00707985 0.900105 0)
(0.0219804 0.832339 0)
(0.0589013 0.746154 0)
(0.0662501 0.713082 0)
(0.0755138 0.715669 0)
(0.0827321 0.682745 0)
(0.0855789 0.65593 0)
(0.0851309 0.648089 0)
(0.0799686 0.651131 0)
(0.069449 0.651865 0)
(0.0568902 0.650161 0)
(0.0445822 0.648992 0)
(0.0337857 0.648727 0)
(0.0225261 0.647358 0)
(0.0123922 0.648383 0)
(0.00134307 0.649602 0)
(-0.0109292 0.649381 0)
(-0.0260023 0.651537 0)
(-0.0464783 0.667929 0)
(-0.0662777 0.707364 0)
(-0.083212 0.754909 0)
(-0.0954091 0.803918 0)
(-0.100595 0.851276 0)
(-0.100569 0.90219 0)
(-0.097339 0.944396 0)
(-0.093641 0.953343 0)
(-0.08154 0.94373 0)
(-0.0654746 0.927123 0)
(-0.0421295 0.902689 0)
(-0.0214185 0.893667 0)
(-0.00208813 0.888537 0)
(0.0236928 0.798134 0)
(0.0552901 0.730192 0)
(0.0667103 0.70852 0)
(0.081628 0.714494 0)
(0.0869198 0.686813 0)
(0.0868701 0.665149 0)
(0.082508 0.656659 0)
(0.0759094 0.662035 0)
(0.0648596 0.663814 0)
(0.0525621 0.660711 0)
(0.0409582 0.658701 0)
(0.0300272 0.657991 0)
(0.0190343 0.65552 0)
(0.00867253 0.655908 0)
(-0.00107454 0.65818 0)
(-0.0117548 0.659366 0)
(-0.0250278 0.665477 0)
(-0.0448102 0.683608 0)
(-0.0650177 0.720389 0)
(-0.0815613 0.766155 0)
(-0.0942999 0.812959 0)
(-0.101164 0.855947 0)
(-0.103566 0.90331 0)
(-0.100665 0.944389 0)
(-0.0947903 0.948736 0)
(-0.0825383 0.933031 0)
(-0.0637685 0.910377 0)
(-0.0356818 0.882107 0)
(-0.0134772 0.879284 0)
(0.000965564 0.884557 0)
(0.0230644 0.767318 0)
(0.0532167 0.713601 0)
(0.0694339 0.703976 0)
(0.0850603 0.714296 0)
(0.0866721 0.69511 0)
(0.0830613 0.676377 0)
(0.0774353 0.666445 0)
(0.0707998 0.672671 0)
(0.0605437 0.675068 0)
(0.0480821 0.670554 0)
(0.0365626 0.666284 0)
(0.0258711 0.665021 0)
(0.0154878 0.662087 0)
(0.00557871 0.662509 0)
(-0.00366003 0.664758 0)
(-0.0133246 0.66767 0)
(-0.0255484 0.678661 0)
(-0.0456145 0.701002 0)
(-0.0671875 0.736396 0)
(-0.0852001 0.778868 0)
(-0.0987686 0.823197 0)
(-0.106582 0.864226 0)
(-0.110376 0.908286 0)
(-0.107761 0.943701 0)
(-0.0983838 0.942445 0)
(-0.0830886 0.921814 0)
(-0.0627036 0.892228 0)
(-0.033671 0.862527 0)
(-0.00981606 0.865676 0)
(0.00307023 0.885303 0)
(0.0239975 0.740069 0)
(0.0530166 0.696456 0)
(0.0717217 0.699431 0)
(0.0861239 0.716166 0)
(0.0839787 0.70725 0)
(0.0780022 0.689346 0)
(0.0704209 0.675288 0)
(0.0638594 0.681885 0)
(0.0549051 0.684165 0)
(0.0437796 0.678939 0)
(0.0323287 0.673747 0)
(0.0215334 0.670956 0)
(0.0113991 0.66763 0)
(0.00145557 0.667449 0)
(-0.0078179 0.669841 0)
(-0.0170298 0.673932 0)
(-0.0286158 0.690127 0)
(-0.0486875 0.717142 0)
(-0.0706617 0.752517 0)
(-0.0888895 0.792865 0)
(-0.103495 0.833809 0)
(-0.112041 0.871741 0)
(-0.116895 0.912891 0)
(-0.114764 0.941508 0)
(-0.103011 0.932953 0)
(-0.0846486 0.908876 0)
(-0.0634298 0.874071 0)
(-0.0357043 0.843902 0)
(-0.0117512 0.852614 0)
(0.000580339 0.88892 0)
(0.0237781 0.712262 0)
(0.0521191 0.680842 0)
(0.0712633 0.693866 0)
(0.085835 0.719034 0)
(0.0816729 0.720006 0)
(0.0733741 0.702487 0)
(0.0630952 0.683802 0)
(0.0569479 0.688462 0)
(0.0491065 0.690245 0)
(0.0389114 0.6852 0)
(0.0278324 0.679741 0)
(0.0170668 0.675604 0)
(0.00702063 0.672231 0)
(-0.00289055 0.671654 0)
(-0.0120083 0.6735 0)
(-0.020221 0.678311 0)
(-0.0312941 0.699857 0)
(-0.0504619 0.733112 0)
(-0.0739014 0.767854 0)
(-0.0922912 0.805767 0)
(-0.107305 0.844739 0)
(-0.116894 0.880016 0)
(-0.122869 0.918488 0)
(-0.121369 0.938359 0)
(-0.108768 0.921676 0)
(-0.0895148 0.893727 0)
(-0.0679732 0.856135 0)
(-0.0415019 0.825972 0)
(-0.0178956 0.840893 0)
(-0.00439768 0.888017 0)
(0.0205257 0.686944 0)
(0.0479396 0.664938 0)
(0.0691707 0.684442 0)
(0.0852853 0.720406 0)
(0.0812415 0.731939 0)
(0.0706335 0.716017 0)
(0.0572001 0.691487 0)
(0.0510294 0.692517 0)
(0.0441799 0.694169 0)
(0.0344759 0.690134 0)
(0.0238054 0.685265 0)
(0.0130125 0.680348 0)
(0.00259117 0.676863 0)
(-0.00735039 0.675682 0)
(-0.016467 0.677024 0)
(-0.0245413 0.682499 0)
(-0.0366196 0.708409 0)
(-0.0543527 0.748367 0)
(-0.0780495 0.783742 0)
(-0.0977995 0.817957 0)
(-0.113014 0.855435 0)
(-0.12331 0.888898 0)
(-0.130304 0.924757 0)
(-0.127215 0.933734 0)
(-0.114689 0.909762 0)
(-0.0966914 0.876977 0)
(-0.0761174 0.838489 0)
(-0.0510573 0.807704 0)
(-0.0253708 0.827836 0)
(-0.00822139 0.882978 0)
(0.0165189 0.663725 0)
(0.0425326 0.64708 0)
(0.065276 0.669696 0)
(0.0824814 0.7165 0)
(0.0814948 0.739415 0)
(0.0688027 0.72949 0)
(0.0533681 0.699132 0)
(0.0462546 0.694661 0)
(0.0395779 0.696011 0)
(0.0301933 0.694009 0)
(0.0196625 0.690031 0)
(0.00908531 0.685417 0)
(-0.00139916 0.682132 0)
(-0.0114586 0.680296 0)
(-0.0210066 0.681483 0)
(-0.0304963 0.689108 0)
(-0.0451819 0.718143 0)
(-0.0628977 0.763946 0)
(-0.0854543 0.80077 0)
(-0.106366 0.832118 0)
(-0.121898 0.867145 0)
(-0.132814 0.899011 0)
(-0.140591 0.928789 0)
(-0.133542 0.925938 0)
(-0.118977 0.897127 0)
(-0.102437 0.859835 0)
(-0.0840488 0.821446 0)
(-0.0619718 0.788466 0)
(-0.0340798 0.811354 0)
(-0.0111056 0.87179 0)
(0.0141762 0.642922 0)
(0.037273 0.629861 0)
(0.0573768 0.653323 0)
(0.0725179 0.705237 0)
(0.0781233 0.741634 0)
(0.0717414 0.739819 0)
(0.0526895 0.708141 0)
(0.0417169 0.698019 0)
(0.0340136 0.698237 0)
(0.0249659 0.698801 0)
(0.0150074 0.695658 0)
(0.00482779 0.691547 0)
(-0.00497381 0.688 0)
(-0.0145855 0.686255 0)
(-0.0246575 0.688139 0)
(-0.0376493 0.699967 0)
(-0.0554972 0.731352 0)
(-0.0750912 0.780214 0)
(-0.096781 0.819132 0)
(-0.116915 0.847742 0)
(-0.132868 0.879746 0)
(-0.144368 0.908211 0)
(-0.147909 0.929191 0)
(-0.136843 0.913361 0)
(-0.120818 0.883151 0)
(-0.1042 0.843819 0)
(-0.0858127 0.805929 0)
(-0.0685753 0.771234 0)
(-0.0429132 0.791809 0)
(-0.0153516 0.854606 0)
(0.0124244 0.622519 0)
(0.0294643 0.612851 0)
(0.0419768 0.639094 0)
(0.0543284 0.691787 0)
(0.0660404 0.733106 0)
(0.0688762 0.746003 0)
(0.0513745 0.720401 0)
(0.03607 0.704489 0)
(0.0264644 0.702047 0)
(0.018083 0.703743 0)
(0.00989834 0.701689 0)
(0.00142977 0.698192 0)
(-0.00716935 0.6946 0)
(-0.0155322 0.693244 0)
(-0.0263513 0.698721 0)
(-0.0427214 0.71609 0)
(-0.063915 0.750725 0)
(-0.0883555 0.800219 0)
(-0.109213 0.837351 0)
(-0.125853 0.863095 0)
(-0.139171 0.891439 0)
(-0.146298 0.914087 0)
(-0.14511 0.922939 0)
(-0.133688 0.900151 0)
(-0.119604 0.868282 0)
(-0.101164 0.829377 0)
(-0.0835146 0.793388 0)
(-0.0678559 0.758295 0)
(-0.0484674 0.772101 0)
(-0.0195133 0.8309 0)
(0.00909898 0.603757 0)
(0.0203733 0.601511 0)
(0.0259187 0.627788 0)
(0.0375846 0.675843 0)
(0.0503313 0.720443 0)
(0.0581847 0.74587 0)
(0.0519722 0.7334 0)
(0.0320309 0.715286 0)
(0.0214569 0.70781 0)
(0.0134124 0.708541 0)
(0.00623819 0.706464 0)
(-0.000998192 0.703808 0)
(-0.00836847 0.700178 0)
(-0.0161246 0.700483 0)
(-0.0279501 0.711623 0)
(-0.0460216 0.735071 0)
(-0.0692989 0.775497 0)
(-0.0963465 0.822237 0)
(-0.110851 0.853212 0)
(-0.123156 0.874631 0)
(-0.132151 0.897908 0)
(-0.135202 0.913751 0)
(-0.132842 0.915616 0)
(-0.124483 0.889056 0)
(-0.111884 0.85612 0)
(-0.0940133 0.816696 0)
(-0.0787989 0.782437 0)
(-0.0634577 0.75011 0)
(-0.0481214 0.756132 0)
(-0.0204694 0.80288 0)
(0.00365416 0.589123 0)
(0.0124011 0.593855 0)
(0.01354 0.618533 0)
(0.0246347 0.663767 0)
(0.0359446 0.707335 0)
(0.0464753 0.740059 0)
(0.0460089 0.742886 0)
(0.0318006 0.729339 0)
(0.0199952 0.71544 0)
(0.012177 0.71408 0)
(0.00464252 0.711789 0)
(-0.00269077 0.709537 0)
(-0.00918956 0.706123 0)
(-0.0175484 0.70929 0)
(-0.0309291 0.726631 0)
(-0.050124 0.756065 0)
(-0.0757931 0.800375 0)
(-0.0928138 0.838083 0)
(-0.102147 0.862599 0)
(-0.109059 0.881242 0)
(-0.114323 0.900431 0)
(-0.116242 0.911887 0)
(-0.115769 0.909608 0)
(-0.10859 0.880974 0)
(-0.0969284 0.84539 0)
(-0.0827908 0.806955 0)
(-0.0716048 0.776035 0)
(-0.0583747 0.74205 0)
(-0.0434505 0.742168 0)
(-0.0169285 0.77696 0)
(-0.000995533 0.580881 0)
(0.00581828 0.589143 0)
(0.00565653 0.609625 0)
(0.0166386 0.653379 0)
(0.0258154 0.696219 0)
(0.0370388 0.733801 0)
(0.0392481 0.748086 0)
(0.0322182 0.740798 0)
(0.0210548 0.724543 0)
(0.0127083 0.720415 0)
(0.00401143 0.71774 0)
(-0.00426688 0.714958 0)
(-0.0102235 0.711628 0)
(-0.0193897 0.719289 0)
(-0.0337107 0.742932 0)
(-0.0539227 0.777908 0)
(-0.0738856 0.816497 0)
(-0.0823492 0.84602 0)
(-0.0871275 0.867231 0)
(-0.0901391 0.884361 0)
(-0.0931999 0.901924 0)
(-0.0953896 0.911871 0)
(-0.0955297 0.906063 0)
(-0.0876572 0.873068 0)
(-0.0782414 0.83703 0)
(-0.0687749 0.800945 0)
(-0.0626363 0.770666 0)
(-0.051102 0.734113 0)
(-0.0378155 0.727659 0)
(-0.0142212 0.756994 0)
(-0.00171529 0.578607 0)
(0.00139503 0.585315 0)
(0.000374371 0.603089 0)
(0.0106507 0.646022 0)
(0.0195519 0.686183 0)
(0.0300675 0.726938 0)
(0.0339486 0.750982 0)
(0.031473 0.748614 0)
(0.0216169 0.734652 0)
(0.0126343 0.728634 0)
(0.00326556 0.724931 0)
(-0.00626455 0.720712 0)
(-0.0127992 0.717278 0)
(-0.0226901 0.729901 0)
(-0.0371283 0.758986 0)
(-0.0557326 0.794817 0)
(-0.0672926 0.825914 0)
(-0.0714694 0.849267 0)
(-0.072598 0.868605 0)
(-0.0729442 0.884891 0)
(-0.0741843 0.902702 0)
(-0.0755032 0.912639 0)
(-0.0739753 0.902176 0)
(-0.066701 0.866316 0)
(-0.0593883 0.831024 0)
(-0.0541598 0.796806 0)
(-0.0510359 0.767118 0)
(-0.0416438 0.7281 0)
(-0.0318595 0.715254 0)
(-0.0138759 0.739624 0)
(-0.00163187 0.580526 0)
(-0.00152712 0.585833 0)
(-0.00191515 0.599552 0)
(0.00744752 0.639354 0)
(0.0155161 0.677337 0)
(0.0246911 0.719967 0)
(0.0293115 0.749985 0)
(0.0275326 0.75485 0)
(0.0197778 0.744413 0)
(0.0112642 0.737554 0)
(0.00205344 0.733564 0)
(-0.00802153 0.727808 0)
(-0.015989 0.724227 0)
(-0.0259155 0.740113 0)
(-0.0394927 0.773687 0)
(-0.0533996 0.805377 0)
(-0.0593411 0.830595 0)
(-0.060783 0.849663 0)
(-0.0596245 0.867561 0)
(-0.0581065 0.88372 0)
(-0.0583711 0.902655 0)
(-0.0580296 0.911522 0)
(-0.0545115 0.896968 0)
(-0.0475492 0.859821 0)
(-0.0421567 0.826207 0)
(-0.0395597 0.794475 0)
(-0.0374771 0.763216 0)
(-0.0301782 0.722593 0)
(-0.022588 0.706727 0)
(-0.0111437 0.725427 0)
(-0.00110862 0.584124 0)
(-0.00018638 0.586298 0)
(0.0013166 0.598307 0)
(0.00820784 0.635609 0)
(0.0140039 0.673022 0)
(0.0209764 0.71509 0)
(0.025136 0.748796 0)
(0.0236037 0.759703 0)
(0.0162344 0.75144 0)
(0.00830833 0.745823 0)
(-0.000234429 0.7418 0)
(-0.00960878 0.735676 0)
(-0.0177369 0.732102 0)
(-0.0284655 0.750078 0)
(-0.0401328 0.785017 0)
(-0.0484934 0.811892 0)
(-0.0514474 0.832257 0)
(-0.0506235 0.848177 0)
(-0.0484075 0.865182 0)
(-0.0461928 0.881662 0)
(-0.0457997 0.901928 0)
(-0.0441976 0.908454 0)
(-0.0397103 0.890331 0)
(-0.0326188 0.854803 0)
(-0.03031 0.822949 0)
(-0.0268798 0.792177 0)
(-0.0246013 0.75901 0)
(-0.0186912 0.717039 0)
(-0.012766 0.699084 0)
(-0.00510606 0.715424 0)
(0.00181564 0.587168 0)
(0.00319708 0.585491 0)
(0.00637591 0.598655 0)
(0.0104902 0.634095 0)
(0.0132541 0.671112 0)
(0.0178825 0.712233 0)
(0.0196335 0.74804 0)
(0.0195393 0.762711 0)
(0.0129478 0.757959 0)
(0.00513611 0.752122 0)
(-0.00298569 0.747971 0)
(-0.0116289 0.741732 0)
(-0.0196458 0.739102 0)
(-0.0308662 0.759005 0)
(-0.0400952 0.790788 0)
(-0.0439977 0.813813 0)
(-0.0443903 0.830294 0)
(-0.0421041 0.844403 0)
(-0.0395626 0.861208 0)
(-0.0373869 0.878195 0)
(-0.0362211 0.899086 0)
(-0.0340604 0.903284 0)
(-0.0282396 0.883943 0)
(-0.0235348 0.850988 0)
(-0.0214882 0.821052 0)
(-0.0166631 0.788745 0)
(-0.0117633 0.754574 0)
(-0.00572216 0.71265 0)
(-0.00224526 0.690738 0)
(-0.00224283 0.710675 0)
(0.00296278 0.579898 0)
(0.00481767 0.57828 0)
(0.00754151 0.594585 0)
(0.00959124 0.629036 0)
(0.00966501 0.665742 0)
(0.0116502 0.706178 0)
(0.0120805 0.742712 0)
(0.012383 0.759535 0)
(0.00863555 0.757514 0)
(0.00194052 0.752454 0)
(-0.00590315 0.748277 0)
(-0.0139777 0.742301 0)
(-0.0223093 0.741083 0)
(-0.0325845 0.761611 0)
(-0.0394764 0.788415 0)
(-0.0405906 0.807328 0)
(-0.0389921 0.821285 0)
(-0.0359173 0.834614 0)
(-0.0333129 0.851767 0)
(-0.0311982 0.86916 0)
(-0.0296407 0.889745 0)
(-0.0257914 0.893255 0)
(-0.0206383 0.872821 0)
(-0.016679 0.843452 0)
(-0.0140555 0.813504 0)
(-0.00851546 0.776968 0)
(-0.00141356 0.742157 0)
(0.00567595 0.704484 0)
(0.0071129 0.682835 0)
(0.00109671 0.703481 0)
(0.00172597 0.572989 0)
(0.00411944 0.571954 0)
(0.00559875 0.590928 0)
(0.00655296 0.626256 0)
(0.0049369 0.663399 0)
(0.00359631 0.704616 0)
(0.00280208 0.740526 0)
(0.00415231 0.758413 0)
(0.00271544 0.75989 0)
(-0.00199022 0.756326 0)
(-0.00893193 0.752349 0)
(-0.0166449 0.747225 0)
(-0.0247802 0.747144 0)
(-0.0337262 0.766799 0)
(-0.0386454 0.788482 0)
(-0.0381497 0.80344 0)
(-0.0354918 0.81576 0)
(-0.0320948 0.82892 0)
(-0.0294813 0.846762 0)
(-0.0276051 0.864484 0)
(-0.0248154 0.884472 0)
(-0.0201639 0.887217 0)
(-0.0153831 0.866952 0)
(-0.0108788 0.838964 0)
(-0.00760651 0.807051 0)
(-0.00255317 0.768107 0)
(0.0029638 0.730989 0)
(0.00932364 0.69551 0)
(0.00963647 0.676933 0)
(0.00370377 0.702749 0)
(0.00191875 0.566361 0)
(0.00276826 0.566166 0)
(0.00165677 0.584991 0)
(0.00082483 0.620466 0)
(-0.00247288 0.657898 0)
(-0.00606162 0.699085 0)
(-0.00748153 0.733114 0)
(-0.00520534 0.751723 0)
(-0.00510767 0.755812 0)
(-0.00722377 0.754625 0)
(-0.0126115 0.751094 0)
(-0.019072 0.746778 0)
(-0.0269839 0.747967 0)
(-0.0348435 0.765637 0)
(-0.0378909 0.782377 0)
(-0.0364802 0.79371 0)
(-0.0333051 0.804958 0)
(-0.0299067 0.81838 0)
(-0.0275473 0.837142 0)
(-0.0251662 0.854964 0)
(-0.0214675 0.874007 0)
(-0.0160651 0.876299 0)
(-0.0103 0.856598 0)
(-0.00446975 0.827703 0)
(-4.24564e-05 0.796555 0)
(0.00311072 0.757198 0)
(0.00503449 0.719659 0)
(0.00797854 0.68591 0)
(0.00627307 0.672087 0)
(0.000515738 0.700823 0)
(0.000244786 0.553693 0)
(-0.000330176 0.558248 0)
(-0.00430529 0.577226 0)
(-0.00682959 0.61406 0)
(-0.0119111 0.65306 0)
(-0.0162173 0.693798 0)
(-0.0170355 0.725182 0)
(-0.0142816 0.744996 0)
(-0.0130913 0.751831 0)
(-0.0136224 0.752888 0)
(-0.0168247 0.750933 0)
(-0.0215657 0.747779 0)
(-0.0294824 0.750754 0)
(-0.036003 0.764697 0)
(-0.0370708 0.777052 0)
(-0.0350881 0.785552 0)
(-0.0317645 0.796132 0)
(-0.0286734 0.810184 0)
(-0.0264495 0.829561 0)
(-0.0234541 0.846926 0)
(-0.0192635 0.864657 0)
(-0.0127054 0.865768 0)
(-0.0050983 0.845304 0)
(0.00276435 0.815799 0)
(0.00810344 0.786419 0)
(0.0101623 0.747555 0)
(0.00850473 0.709744 0)
(0.0082392 0.675291 0)
(0.00451069 0.664647 0)
(-0.000343249 0.688999 0)
(-0.00199221 0.549643 0)
(-0.00463172 0.557 0)
(-0.0121495 0.574417 0)
(-0.0162043 0.611945 0)
(-0.0224555 0.651519 0)
(-0.0256863 0.690545 0)
(-0.025416 0.719067 0)
(-0.0222236 0.739576 0)
(-0.0205051 0.749097 0)
(-0.0199258 0.751882 0)
(-0.0214196 0.751819 0)
(-0.0246726 0.750819 0)
(-0.0312068 0.755339 0)
(-0.0359292 0.764683 0)
(-0.0358748 0.773154 0)
(-0.0335012 0.779856 0)
(-0.0304829 0.7901 0)
(-0.027886 0.804994 0)
(-0.0255461 0.824635 0)
(-0.0223654 0.841322 0)
(-0.0174535 0.857266 0)
(-0.00961825 0.85624 0)
(7.96709e-05 0.834551 0)
(0.00961881 0.805593 0)
(0.0158072 0.778383 0)
(0.0181678 0.741808 0)
(0.0143316 0.705581 0)
(0.0110109 0.670926 0)
(0.00560911 0.661633 0)
(0.000746166 0.6852 0)
(-0.00478054 0.550041 0)
(-0.0101878 0.559162 0)
(-0.0211713 0.574044 0)
(-0.0267275 0.611637 0)
(-0.032635 0.6502 0)
(-0.0339039 0.6872 0)
(-0.0325721 0.713665 0)
(-0.0293036 0.734116 0)
(-0.0270398 0.746176 0)
(-0.0260064 0.750248 0)
(-0.0259923 0.752138 0)
(-0.0284881 0.753863 0)
(-0.0329789 0.758511 0)
(-0.0353303 0.764293 0)
(-0.0345935 0.7692 0)
(-0.0319908 0.775271 0)
(-0.0293689 0.785494 0)
(-0.0272976 0.80119 0)
(-0.024966 0.820662 0)
(-0.0214677 0.836051 0)
(-0.0156698 0.849757 0)
(-0.00635427 0.845687 0)
(0.00531379 0.822952 0)
(0.0154998 0.79579 0)
(0.0221709 0.770874 0)
(0.0254145 0.737175 0)
(0.0213443 0.704009 0)
(0.0158663 0.6697 0)
(0.00790603 0.660032 0)
(0.00150711 0.68431 0)
(-0.00755446 0.553478 0)
(-0.0166509 0.563327 0)
(-0.0310401 0.576266 0)
(-0.037216 0.611883 0)
(-0.0410935 0.6484 0)
(-0.0403514 0.683304 0)
(-0.0386643 0.708555 0)
(-0.0357262 0.728675 0)
(-0.0330409 0.74265 0)
(-0.0315191 0.747866 0)
(-0.0304296 0.751496 0)
(-0.0317747 0.755945 0)
(-0.0337413 0.759732 0)
(-0.0341967 0.762882 0)
(-0.0329394 0.765605 0)
(-0.0306101 0.771071 0)
(-0.0283907 0.781916 0)
(-0.026908 0.798363 0)
(-0.0246349 0.816798 0)
(-0.0204797 0.830529 0)
(-0.0136476 0.841228 0)
(-0.00257458 0.833872 0)
(0.0100711 0.810838 0)
(0.0198777 0.786545 0)
(0.0260142 0.763668 0)
(0.0297187 0.732764 0)
(0.0273811 0.703107 0)
(0.0214552 0.670845 0)
(0.0106829 0.660246 0)
(0.00209386 0.683255 0)
(-0.0094393 0.559806 0)
(-0.0233835 0.570882 0)
(-0.0395493 0.580759 0)
(-0.0452001 0.611446 0)
(-0.0461384 0.645498 0)
(-0.044655 0.679283 0)
(-0.0433989 0.704214 0)
(-0.0412222 0.723816 0)
(-0.0385991 0.738555 0)
(-0.0363861 0.744898 0)
(-0.0347147 0.749786 0)
(-0.0339219 0.755664 0)
(-0.0333637 0.759099 0)
(-0.0324538 0.760712 0)
(-0.0309355 0.762482 0)
(-0.0291543 0.767649 0)
(-0.0275525 0.779338 0)
(-0.0266179 0.796341 0)
(-0.0242144 0.812689 0)
(-0.0191735 0.824638 0)
(-0.0111002 0.831693 0)
(0.001281 0.821256 0)
(0.0135089 0.799488 0)
(0.0220226 0.778433 0)
(0.0270297 0.757293 0)
(0.0302496 0.728289 0)
(0.0302446 0.701464 0)
(0.025681 0.673528 0)
(0.014195 0.663784 0)
(0.00254614 0.682747 0)
(-0.0120169 0.570132 0)
(-0.0293427 0.581212 0)
(-0.0444567 0.585657 0)
(-0.0479453 0.610489 0)
(-0.0480887 0.642567 0)
(-0.0470408 0.675985 0)
(-0.0464255 0.700595 0)
(-0.0451963 0.719898 0)
(-0.0431086 0.734311 0)
(-0.0405733 0.741517 0)
(-0.0380752 0.746928 0)
(-0.0350756 0.752842 0)
(-0.0323865 0.756739 0)
(-0.0303122 0.758 0)
(-0.0287378 0.759789 0)
(-0.02749 0.765074 0)
(-0.0266677 0.777534 0)
(-0.0260674 0.794694 0)
(-0.0233076 0.808283 0)
(-0.0173632 0.818092 0)
(-0.00797726 0.82129 0)
(0.00439216 0.809073 0)
(0.0149399 0.789757 0)
(0.0216598 0.771598 0)
(0.0256093 0.752003 0)
(0.0277344 0.724728 0)
(0.0281028 0.699472 0)
(0.0264182 0.675549 0)
(0.0171767 0.669131 0)
(0.00419006 0.684769 0)
(-0.0140197 0.585487 0)
(-0.0306954 0.591289 0)
(-0.0436397 0.588891 0)
(-0.0466139 0.609885 0)
(-0.0478432 0.640525 0)
(-0.0475351 0.673405 0)
(-0.0478033 0.69781 0)
(-0.047454 0.716938 0)
(-0.0459056 0.730279 0)
(-0.0433071 0.737701 0)
(-0.0398942 0.742849 0)
(-0.0353323 0.748221 0)
(-0.0310437 0.753111 0)
(-0.0282152 0.754988 0)
(-0.0264475 0.757299 0)
(-0.0254969 0.763252 0)
(-0.0254082 0.776497 0)
(-0.0247826 0.792871 0)
(-0.0214067 0.803493 0)
(-0.014574 0.810735 0)
(-0.00454911 0.810693 0)
(0.00644037 0.798458 0)
(0.014755 0.782008 0)
(0.0195896 0.766118 0)
(0.0223346 0.747731 0)
(0.0235903 0.722698 0)
(0.0229715 0.697865 0)
(0.0224304 0.675349 0)
(0.0156674 0.673266 0)
(0.00506859 0.689503 0)
(-0.0118475 0.600956 0)
(-0.0268397 0.599146 0)
(-0.0381792 0.592467 0)
(-0.0432335 0.610781 0)
(-0.046692 0.639272 0)
(-0.0469496 0.671744 0)
(-0.0475828 0.695677 0)
(-0.0474304 0.714307 0)
(-0.0462153 0.726382 0)
(-0.0436713 0.733272 0)
(-0.0398235 0.737925 0)
(-0.0344888 0.74255 0)
(-0.0294109 0.748636 0)
(-0.0261484 0.751937 0)
(-0.0243352 0.754928 0)
(-0.0233481 0.761915 0)
(-0.0235613 0.775839 0)
(-0.02246 0.790353 0)
(-0.0181538 0.798149 0)
(-0.0105905 0.802671 0)
(-0.00105203 0.800528 0)
(0.00798717 0.789647 0)
(0.0140522 0.775927 0)
(0.0173122 0.762097 0)
(0.0187703 0.744608 0)
(0.0193257 0.72127 0)
(0.0171356 0.697535 0)
(0.014981 0.675083 0)
(0.0101463 0.67524 0)
(0.00188887 0.693189 0)
(-0.00843845 0.612552 0)
(-0.0197267 0.604744 0)
(-0.0308832 0.59735 0)
(-0.0384191 0.613465 0)
(-0.0438649 0.639392 0)
(-0.0451688 0.669861 0)
(-0.0451085 0.693438 0)
(-0.0449964 0.711262 0)
(-0.0438759 0.722321 0)
(-0.0413605 0.728483 0)
(-0.03755 0.732567 0)
(-0.0324906 0.736732 0)
(-0.0274729 0.743804 0)
(-0.0241183 0.748935 0)
(-0.022319 0.752643 0)
(-0.0214029 0.760699 0)
(-0.0212409 0.774938 0)
(-0.0191122 0.786615 0)
(-0.0137039 0.792 0)
(-0.00600285 0.794204 0)
(0.00241797 0.791246 0)
(0.00964834 0.782251 0)
(0.0139588 0.77086 0)
(0.0153673 0.758962 0)
(0.0156547 0.742033 0)
(0.0142577 0.720981 0)
(0.0105984 0.698441 0)
(0.00690659 0.675571 0)
(0.0028418 0.675352 0)
(-0.00190962 0.692372 0)
(-0.004532 0.618418 0)
(-0.0121427 0.608743 0)
(-0.0236438 0.603068 0)
(-0.0326468 0.616885 0)
(-0.0388171 0.640134 0)
(-0.0407365 0.667718 0)
(-0.0407804 0.690848 0)
(-0.0403937 0.707807 0)
(-0.0396579 0.718163 0)
(-0.0375629 0.723394 0)
(-0.0342961 0.727134 0)
(-0.0302731 0.731166 0)
(-0.0257517 0.738545 0)
(-0.0223135 0.745727 0)
(-0.0205121 0.750368 0)
(-0.0196207 0.759227 0)
(-0.0186266 0.772895 0)
(-0.0149417 0.781333 0)
(-0.00867421 0.784949 0)
(-0.00141052 0.785676 0)
(0.0059109 0.782478 0)
(0.0117608 0.775135 0)
(0.0143039 0.766648 0)
(0.0139145 0.756932 0)
(0.0117823 0.740812 0)
(0.00795781 0.721676 0)
(0.00352987 0.699464 0)
(-8.02908e-06 0.676158 0)
(-0.00358016 0.674049 0)
(-0.00488176 0.686559 0)
(-0.00136544 0.618813 0)
(-0.00619939 0.611451 0)
(-0.017961 0.608956 0)
(-0.0264961 0.619902 0)
(-0.0322307 0.640644 0)
(-0.0345377 0.666061 0)
(-0.0356416 0.687859 0)
(-0.035522 0.703951 0)
(-0.0351285 0.713847 0)
(-0.033543 0.718078 0)
(-0.0310347 0.721603 0)
(-0.028097 0.72573 0)
(-0.0242594 0.732794 0)
(-0.0207267 0.741681 0)
(-0.0187876 0.747705 0)
(-0.0178799 0.757045 0)
(-0.0156675 0.768877 0)
(-0.0103753 0.774539 0)
(-0.00367092 0.776962 0)
(0.00298396 0.776785 0)
(0.00948895 0.77382 0)
(0.0140152 0.768917 0)
(0.0147204 0.763927 0)
(0.0122861 0.75665 0)
(0.00730008 0.742162 0)
(0.00121345 0.723631 0)
(-0.00387395 0.699354 0)
(-0.00532571 0.675593 0)
(-0.0083212 0.671531 0)
(-0.00664294 0.676377 0)
(0.000294191 0.615779 0)
(-0.00357935 0.613796 0)
(-0.0143441 0.61404 0)
(-0.0212609 0.621749 0)
(-0.0256046 0.640346 0)
(-0.0279664 0.664582 0)
(-0.0297958 0.684823 0)
(-0.0305348 0.699774 0)
(-0.0305251 0.708953 0)
(-0.0293823 0.712391 0)
(-0.0277328 0.715862 0)
(-0.0256996 0.720104 0)
(-0.0226409 0.726643 0)
(-0.0192875 0.736608 0)
(-0.0171619 0.744238 0)
(-0.0159516 0.753546 0)
(-0.012309 0.762483 0)
(-0.00597325 0.766248 0)
(0.000917125 0.768319 0)
(0.00707777 0.767914 0)
(0.0123824 0.765968 0)
(0.0148226 0.763861 0)
(0.0131427 0.762242 0)
(0.00834591 0.757056 0)
(0.00148448 0.744753 0)
(-0.0055499 0.726538 0)
(-0.00992313 0.698645 0)
(-0.00914786 0.672504 0)
(-0.0110179 0.668162 0)
(-0.00696819 0.663286 0)
(0.000442448 0.611202 0)
(-0.00421684 0.616082 0)
(-0.0126853 0.617169 0)
(-0.0169911 0.623083 0)
(-0.0201231 0.639562 0)
(-0.0221023 0.662911 0)
(-0.0237843 0.681705 0)
(-0.0249802 0.695414 0)
(-0.0255162 0.703589 0)
(-0.0250291 0.706569 0)
(-0.0241431 0.710043 0)
(-0.0229068 0.714329 0)
(-0.020714 0.720392 0)
(-0.0179237 0.730821 0)
(-0.0157448 0.739767 0)
(-0.0137481 0.748231 0)
(-0.00889085 0.754005 0)
(-0.0019258 0.756704 0)
(0.00468012 0.759407 0)
(0.00950764 0.759636 0)
(0.0131505 0.759277 0)
(0.0139015 0.760543 0)
(0.0105168 0.762346 0)
(0.00405741 0.759085 0)
(-0.00440882 0.748279 0)
(-0.0124663 0.728044 0)
(-0.0150141 0.696503 0)
(-0.0112623 0.667439 0)
(-0.0113668 0.663743 0)
(-0.0052513 0.648863 0)
(-0.0019367 0.608286 0)
(-0.00575399 0.617937 0)
(-0.00976118 0.617017 0)
(-0.0118089 0.622844 0)
(-0.0144464 0.638276 0)
(-0.0159611 0.660867 0)
(-0.0173625 0.678488 0)
(-0.0192239 0.691799 0)
(-0.0204329 0.698437 0)
(-0.0204481 0.700987 0)
(-0.0202396 0.704503 0)
(-0.019791 0.708718 0)
(-0.0185117 0.714296 0)
(-0.016515 0.724673 0)
(-0.0143308 0.734115 0)
(-0.0113122 0.741034 0)
(-0.0055969 0.744156 0)
(0.0011518 0.746893 0)
(0.00648007 0.7511 0)
(0.0101734 0.752652 0)
(0.0123065 0.753627 0)
(0.011761 0.757534 0)
(0.00771159 0.762434 0)
(0.00121464 0.761063 0)
(-0.00705234 0.75276 0)
(-0.0153443 0.730272 0)
(-0.0189952 0.692953 0)
(-0.0137196 0.659003 0)
(-0.00993619 0.657932 0)
(-0.00128671 0.637014 0)
(-0.00445528 0.606733 0)
(-0.00355621 0.61508 0)
(-0.00507343 0.614161 0)
(-0.00650913 0.622155 0)
(-0.00914126 0.637096 0)
(-0.00973833 0.658609 0)
(-0.0109889 0.675647 0)
(-0.0131533 0.689134 0)
(-0.0151922 0.693983 0)
(-0.0160116 0.696038 0)
(-0.0164682 0.69946 0)
(-0.0167344 0.703524 0)
(-0.0163365 0.708561 0)
(-0.0150428 0.718383 0)
(-0.012697 0.727283 0)
(-0.00877669 0.732453 0)
(-0.00297768 0.73406 0)
(0.00270325 0.73773 0)
(0.00671267 0.743637 0)
(0.00894513 0.746056 0)
(0.00964962 0.748277 0)
(0.00808204 0.754442 0)
(0.00407464 0.761581 0)
(-0.00121639 0.761487 0)
(-0.00762358 0.755317 0)
(-0.0143377 0.732368 0)
(-0.0182237 0.691211 0)
(-0.0157693 0.650563 0)
(-0.0101276 0.646986 0)
(0.00315014 0.629224 0)
(-0.00252905 0.605251 0)
(0.000337689 0.610287 0)
(-0.00233298 0.612223 0)
(-0.0040689 0.62122 0)
(-0.00547365 0.635 0)
(-0.00566641 0.655599 0)
(-0.00694481 0.672534 0)
(-0.00864859 0.686691 0)
(-0.0106817 0.690363 0)
(-0.0122312 0.691807 0)
(-0.0135982 0.694879 0)
(-0.0145188 0.698592 0)
(-0.0146515 0.70302 0)
(-0.0135951 0.711692 0)
(-0.0108987 0.719412 0)
(-0.00657808 0.723199 0)
(-0.00122044 0.724296 0)
(0.00329329 0.729244 0)
(0.00593867 0.736482 0)
(0.00679887 0.740034 0)
(0.00592909 0.743699 0)
(0.00341682 0.751601 0)
(-7.33361e-05 0.759631 0)
(-0.0034064 0.759959 0)
(-0.00738034 0.755238 0)
(-0.0119273 0.73271 0)
(-0.0146437 0.689524 0)
(-0.0141619 0.645465 0)
(-0.0112186 0.634094 0)
(0.00243899 0.623953 0)
(-0.000442448 0.60069 0)
(0.0027529 0.608666 0)
(-0.00194985 0.611315 0)
(-0.00297164 0.61922 0)
(-0.00320632 0.631729 0)
(-0.00360142 0.65189 0)
(-0.00520665 0.668626 0)
(-0.00678951 0.682859 0)
(-0.00847137 0.686204 0)
(-0.0103837 0.687319 0)
(-0.012245 0.689753 0)
(-0.0133846 0.692692 0)
(-0.0134662 0.696316 0)
(-0.0122283 0.703489 0)
(-0.00925822 0.710045 0)
(-0.0050211 0.712801 0)
(-0.000344265 0.714166 0)
(0.00299353 0.720257 0)
(0.0048832 0.728704 0)
(0.00480712 0.733928 0)
(0.0025935 0.739428 0)
(-0.000652526 0.748468 0)
(-0.0034251 0.756213 0)
(-0.00492619 0.756379 0)
(-0.0065185 0.75243 0)
(-0.00884783 0.73085 0)
(-0.0101686 0.687236 0)
(-0.00996953 0.642457 0)
(-0.00995502 0.626942 0)
(-0.00124625 0.616544 0)
(-0.000666936 0.597059 0)
(0.00118958 0.609088 0)
(-0.00343012 0.610009 0)
(-0.00289373 0.616201 0)
(-0.00347278 0.627626 0)
(-0.00414908 0.647117 0)
(-0.0063979 0.663632 0)
(-0.00845792 0.676639 0)
(-0.0100666 0.680233 0)
(-0.0116399 0.682188 0)
(-0.0126587 0.684683 0)
(-0.0128745 0.687041 0)
(-0.01245 0.689898 0)
(-0.0109732 0.695658 0)
(-0.00798876 0.701276 0)
(-0.00406988 0.703398 0)
(-0.0004739 0.705479 0)
(0.00202605 0.712353 0)
(0.00364928 0.721794 0)
(0.00361428 0.728721 0)
(0.00143571 0.73539 0)
(-0.00187028 0.74385 0)
(-0.00426248 0.750171 0)
(-0.00487805 0.750292 0)
(-0.00469185 0.746619 0)
(-0.00492957 0.726881 0)
(-0.0055545 0.684075 0)
(-0.0043647 0.639006 0)
(-0.0060103 0.623764 0)
(-0.000850913 0.610378 0)
(-0.0022143 0.59588 0)
(-0.000774884 0.609548 0)
(-0.00486925 0.607311 0)
(-0.00412423 0.612287 0)
(-0.00633682 0.622788 0)
(-0.00808491 0.641342 0)
(-0.0107723 0.658079 0)
(-0.0124921 0.670564 0)
(-0.0133942 0.67475 0)
(-0.0139403 0.67695 0)
(-0.0137418 0.678937 0)
(-0.0128074 0.680907 0)
(-0.0116755 0.683571 0)
(-0.00996679 0.688306 0)
(-0.00707158 0.692943 0)
(-0.00379626 0.695207 0)
(-0.00105899 0.697882 0)
(0.000963577 0.705185 0)
(0.00247384 0.715188 0)
(0.00268662 0.723618 0)
(0.00102036 0.73175 0)
(-0.00145736 0.739657 0)
(-0.00271232 0.74359 0)
(-0.00241506 0.742257 0)
(-0.00140711 0.737952 0)
(-0.00134603 0.720498 0)
(-0.0020545 0.679485 0)
(-0.000568047 0.634948 0)
(-0.00268677 0.6221 0)
(0.00135536 0.607241 0)
(-0.00421218 0.595221 0)
(-0.00250589 0.607395 0)
(-0.00737469 0.603131 0)
(-0.00777579 0.608115 0)
(-0.0112919 0.619025 0)
(-0.014051 0.637176 0)
(-0.0164644 0.653613 0)
(-0.017005 0.664508 0)
(-0.0165806 0.668515 0)
(-0.0158669 0.670463 0)
(-0.0147032 0.672179 0)
(-0.0130648 0.67399 0)
(-0.0112853 0.676822 0)
(-0.00923459 0.680953 0)
(-0.00659302 0.685217 0)
(-0.00387574 0.687676 0)
(-0.00157498 0.690705 0)
(0.000215924 0.698171 0)
(0.00152924 0.708492 0)
(0.00159535 0.71803 0)
(0.000317372 0.726987 0)
(-0.000712399 0.734267 0)
(2.6197e-05 0.736703 0)
(0.00175621 0.734822 0)
(0.00320178 0.72991 0)
(0.00262041 0.713937 0)
(0.00127062 0.673452 0)
(0.0018935 0.629444 0)
(-0.00113029 0.618039 0)
(0.00377044 0.605428 0)
(-0.00601698 0.592948 0)
(-0.00695372 0.602893 0)
(-0.0114979 0.599076 0)
(-0.0136776 0.605188 0)
(-0.0180977 0.616816 0)
(-0.0209069 0.633633 0)
(-0.0220701 0.647352 0)
(-0.0208237 0.656782 0)
(-0.0188521 0.661256 0)
(-0.017146 0.664459 0)
(-0.0155047 0.666696 0)
(-0.0135368 0.668359 0)
(-0.0111846 0.671181 0)
(-0.0087495 0.675148 0)
(-0.00630089 0.679458 0)
(-0.00389593 0.682055 0)
(-0.00183182 0.685282 0)
(-0.000250206 0.692895 0)
(0.000593313 0.703727 0)
(4.95936e-06 0.714213 0)
(-0.00148316 0.722786 0)
(-0.00132953 0.72727 0)
(0.00160725 0.727533 0)
(0.0063061 0.725409 0)
(0.00954837 0.721942 0)
(0.00858208 0.708586 0)
(0.00617352 0.668151 0)
(0.0047556 0.624169 0)
(0.00208484 0.61139 0)
(0.00488072 0.601664 0)
(-0.00824727 0.593769 0)
(-0.0120991 0.599115 0)
(-0.017648 0.595472 0)
(-0.0207549 0.60217 0)
(-0.0246188 0.613204 0)
(-0.0262525 0.629158 0)
(-0.0255666 0.642086 0)
(-0.0229229 0.650902 0)
(-0.0197349 0.655502 0)
(-0.0168599 0.659279 0)
(-0.0147944 0.661805 0)
(-0.0128375 0.663261 0)
(-0.0105656 0.665996 0)
(-0.00828431 0.670004 0)
(-0.00597132 0.674358 0)
(-0.00379027 0.677102 0)
(-0.00196381 0.680487 0)
(-0.000683973 0.688304 0)
(-0.00035307 0.699851 0)
(-0.00147032 0.711313 0)
(-0.00290942 0.719464 0)
(-0.00208475 0.72129 0)
(0.00177996 0.719017 0)
(0.0079439 0.715004 0)
(0.0140592 0.712025 0)
(0.014673 0.701913 0)
(0.0125841 0.662124 0)
(0.00981978 0.619446 0)
(0.0062642 0.605858 0)
(0.00581512 0.60064 0)
(-0.00833661 0.597066 0)
(-0.0147336 0.596701 0)
(-0.0220566 0.591218 0)
(-0.0253692 0.59959 0)
(-0.0286146 0.611781 0)
(-0.0280258 0.626157 0)
(-0.025674 0.636691 0)
(-0.0220164 0.644553 0)
(-0.0183029 0.649012 0)
(-0.0149486 0.653793 0)
(-0.0125689 0.657209 0)
(-0.0109744 0.658962 0)
(-0.00932626 0.661653 0)
(-0.00745876 0.665649 0)
(-0.00576213 0.66989 0)
(-0.00387609 0.672477 0)
(-0.00219371 0.675946 0)
(-0.00120713 0.684114 0)
(-0.00134088 0.696534 0)
(-0.00277316 0.70868 0)
(-0.00377324 0.715845 0)
(-0.00225538 0.715206 0)
(0.00196649 0.710594 0)
(0.00830527 0.70508 0)
(0.0153286 0.701957 0)
(0.0183153 0.696109 0)
(0.0169294 0.65645 0)
(0.0138307 0.613533 0)
(0.00886946 0.601816 0)
(0.00512548 0.601927 0)
(-0.00722771 0.59856 0)
(-0.0152609 0.597006 0)
(-0.0241241 0.590305 0)
(-0.0272215 0.598755 0)
(-0.0284802 0.609153 0)
(-0.0263317 0.621511 0)
(-0.0233825 0.631101 0)
(-0.0197396 0.63872 0)
(-0.0163151 0.643283 0)
(-0.0132708 0.648677 0)
(-0.0108803 0.653126 0)
(-0.00938236 0.655549 0)
(-0.00839333 0.658215 0)
(-0.00708553 0.662159 0)
(-0.00579358 0.666242 0)
(-0.00433324 0.668313 0)
(-0.00284609 0.671564 0)
(-0.0019322 0.680267 0)
(-0.00235824 0.693579 0)
(-0.0037578 0.705929 0)
(-0.00396518 0.711401 0)
(-0.00168575 0.70878 0)
(0.00260476 0.70221 0)
(0.00830562 0.695509 0)
(0.0145113 0.691981 0)
(0.0196287 0.688248 0)
(0.0207266 0.652481 0)
(0.0168784 0.610901 0)
(0.0100524 0.600589 0)
(0.00377479 0.600989 0)
(-0.00695237 0.602799 0)
(-0.0156445 0.599988 0)
(-0.0237083 0.589953 0)
(-0.0254915 0.596469 0)
(-0.025852 0.605846 0)
(-0.0239742 0.617129 0)
(-0.0215357 0.626033 0)
(-0.0184388 0.633484 0)
(-0.0156242 0.638231 0)
(-0.0131856 0.643968 0)
(-0.0109549 0.648895 0)
(-0.00938453 0.65235 0)
(-0.00849117 0.655146 0)
(-0.00755642 0.659022 0)
(-0.00665242 0.662883 0)
(-0.00521748 0.664536 0)
(-0.00404242 0.667344 0)
(-0.00303276 0.676579 0)
(-0.00335446 0.690712 0)
(-0.00420786 0.702682 0)
(-0.0034894 0.706226 0)
(-0.000759355 0.701984 0)
(0.00329986 0.694005 0)
(0.00805954 0.686427 0)
(0.0131526 0.682554 0)
(0.0199417 0.678444 0)
(0.0242049 0.648924 0)
(0.0203185 0.610456 0)
(0.0124913 0.603932 0)
(0.00403669 0.603154 0)
(-0.00692355 0.607306 0)
(-0.0149929 0.601945 0)
(-0.0218712 0.588134 0)
(-0.0231323 0.593973 0)
(-0.0242125 0.602934 0)
(-0.0233219 0.613128 0)
(-0.021486 0.621175 0)
(-0.0188664 0.628333 0)
(-0.0165318 0.633382 0)
(-0.0144597 0.639269 0)
(-0.0124066 0.644452 0)
(-0.010777 0.64874 0)
(-0.00967785 0.651864 0)
(-0.00890101 0.655801 0)
(-0.00821427 0.659435 0)
(-0.00684058 0.660744 0)
(-0.00556543 0.66327 0)
(-0.00470175 0.672853 0)
(-0.00451585 0.687575 0)
(-0.00449918 0.698251 0)
(-0.00273577 0.7003 0)
(0.000231685 0.694786 0)
(0.00392196 0.686206 0)
(0.00820031 0.678328 0)
(0.0132314 0.673797 0)
(0.0209724 0.666686 0)
(0.0267811 0.644264 0)
(0.0238505 0.61078 0)
(0.0150192 0.608562 0)
(0.00530388 0.607389 0)
(-0.00686546 0.610798 0)
(-0.0143068 0.602191 0)
(-0.0206346 0.585511 0)
(-0.0215639 0.591625 0)
(-0.0234535 0.600017 0)
(-0.0234558 0.609006 0)
(-0.0225228 0.616019 0)
(-0.0203021 0.623009 0)
(-0.0184233 0.628265 0)
(-0.016445 0.634305 0)
(-0.0145392 0.639688 0)
(-0.012856 0.644452 0)
(-0.0117034 0.648115 0)
(-0.010968 0.652169 0)
(-0.0103042 0.655642 0)
(-0.00891177 0.656633 0)
(-0.00748106 0.659215 0)
(-0.00687621 0.669079 0)
(-0.00622344 0.683742 0)
(-0.00500318 0.6928 0)
(-0.00195572 0.694342 0)
(0.00150954 0.688168 0)
(0.00516783 0.679294 0)
(0.00966649 0.670139 0)
(0.0149559 0.66414 0)
(0.02228 0.655535 0)
(0.0281282 0.638415 0)
(0.0268997 0.611339 0)
(0.0174036 0.612876 0)
(0.00735375 0.612593 0)
(-0.00720254 0.613942 0)
(-0.0138095 0.601894 0)
(-0.0202514 0.582205 0)
(-0.0206267 0.588826 0)
(-0.0227658 0.597051 0)
(-0.0235577 0.604984 0)
(-0.0235441 0.61073 0)
(-0.0220671 0.617369 0)
(-0.0204834 0.622623 0)
(-0.0186033 0.628809 0)
(-0.0168222 0.634371 0)
(-0.0152576 0.639507 0)
(-0.0142178 0.643644 0)
(-0.0134603 0.647737 0)
(-0.0126767 0.651049 0)
(-0.011171 0.65187 0)
(-0.00982423 0.654871 0)
(-0.00949378 0.665038 0)
(-0.0081968 0.679198 0)
(-0.00536027 0.686259 0)
(-0.000984684 0.687193 0)
(0.00318633 0.680695 0)
(0.00708669 0.671698 0)
(0.0114972 0.661803 0)
(0.016453 0.655251 0)
(0.0229611 0.645717 0)
(0.0284754 0.631878 0)
(0.0292983 0.611105 0)
(0.0197524 0.61687 0)
(0.00916669 0.619307 0)
(-0.00730288 0.617062 0)
(-0.013394 0.601369 0)
(-0.0204179 0.578697 0)
(-0.0203407 0.585589 0)
(-0.0225194 0.594382 0)
(-0.0236325 0.601025 0)
(-0.024342 0.605649 0)
(-0.0236299 0.611414 0)
(-0.022392 0.616565 0)
(-0.0208221 0.622748 0)
(-0.0193431 0.628452 0)
(-0.018035 0.633899 0)
(-0.0170693 0.638499 0)
(-0.0161496 0.642705 0)
(-0.0150796 0.645884 0)
(-0.0133904 0.646781 0)
(-0.0122464 0.650364 0)
(-0.0117491 0.660628 0)
(-0.00922302 0.672898 0)
(-0.00451425 0.678046 0)
(0.000746885 0.679368 0)
(0.00515368 0.673222 0)
(0.00868664 0.664245 0)
(0.0124067 0.653876 0)
(0.0168477 0.646547 0)
(0.0228306 0.636653 0)
(0.027679 0.624824 0)
(0.029574 0.609391 0)
(0.0211729 0.62011 0)
(0.00974598 0.627156 0)
(-0.0065227 0.619371 0)
(-0.0128149 0.60143 0)
(-0.0207023 0.576276 0)
(-0.0211682 0.582683 0)
(-0.0231987 0.591905 0)
(-0.0241156 0.597286 0)
(-0.0250738 0.601069 0)
(-0.0248685 0.605666 0)
(-0.0240995 0.610608 0)
(-0.0229574 0.616686 0)
(-0.0218015 0.622614 0)
(-0.0206482 0.628336 0)
(-0.0195852 0.633299 0)
(-0.0184591 0.637543 0)
(-0.0171515 0.640621 0)
(-0.0154241 0.641813 0)
(-0.014464 0.645925 0)
(-0.0127962 0.655535 0)
(-0.00878328 0.664776 0)
(-0.00287274 0.669302 0)
(0.00272259 0.670896 0)
(0.00712709 0.665626 0)
(0.00998461 0.657155 0)
(0.012805 0.646593 0)
(0.0164907 0.63838 0)
(0.0216274 0.628666 0)
(0.0251645 0.61837 0)
(0.0267537 0.606773 0)
(0.0193384 0.622455 0)
(0.00832769 0.634004 0)
(-0.00600975 0.620956 0)
(-0.0124605 0.602433 0)
(-0.0211082 0.575604 0)
(-0.0223137 0.580739 0)
(-0.0244477 0.589616 0)
(-0.0249116 0.593809 0)
(-0.0257125 0.597128 0)
(-0.0258137 0.600792 0)
(-0.0254117 0.605485 0)
(-0.0245613 0.611291 0)
(-0.0235075 0.617194 0)
(-0.0223128 0.622895 0)
(-0.0210807 0.628007 0)
(-0.0198417 0.632313 0)
(-0.018431 0.635345 0)
(-0.0169495 0.636942 0)
(-0.0155791 0.64115 0)
(-0.0128159 0.649005 0)
(-0.00768639 0.656121 0)
(-0.00149069 0.660364 0)
(0.00434357 0.662303 0)
(0.0086265 0.658636 0)
(0.011071 0.651042 0)
(0.0131695 0.640368 0)
(0.0158586 0.631356 0)
(0.0196617 0.622153 0)
(0.0212798 0.613309 0)
(0.0220787 0.604516 0)
(0.0154428 0.623808 0)
(0.00641657 0.638843 0)
(-0.00566371 0.622684 0)
(-0.012161 0.604225 0)
(-0.0210579 0.575545 0)
(-0.0229617 0.579531 0)
(-0.025296 0.587543 0)
(-0.0254842 0.59077 0)
(-0.0261271 0.593625 0)
(-0.0263686 0.596737 0)
(-0.0261851 0.600997 0)
(-0.025455 0.606333 0)
(-0.0242635 0.611975 0)
(-0.0227664 0.617529 0)
(-0.0212539 0.622874 0)
(-0.0199781 0.627401 0)
(-0.018661 0.630476 0)
(-0.0173327 0.632335 0)
(-0.0155268 0.635912 0)
(-0.0120879 0.641786 0)
(-0.00671723 0.647393 0)
(-0.00073718 0.651488 0)
(0.00498771 0.653941 0)
(0.00923824 0.652114 0)
(0.0119048 0.645346 0)
(0.0137879 0.635008 0)
(0.0152233 0.625864 0)
(0.0171291 0.61716 0)
(0.0168041 0.609417 0)
(0.0169248 0.602214 0)
(0.0112197 0.624053 0)
(0.0044039 0.641072 0)
(-0.00507419 0.624219 0)
(-0.010946 0.606113 0)
(-0.0200156 0.576077 0)
(-0.0227433 0.579219 0)
(-0.0252654 0.585445 0)
(-0.0252581 0.588421 0)
(-0.0260902 0.590607 0)
(-0.0263683 0.593481 0)
(-0.0262782 0.597234 0)
(-0.0255379 0.601986 0)
(-0.0241147 0.60725 0)
(-0.022203 0.612565 0)
(-0.0203595 0.618278 0)
(-0.0190864 0.623062 0)
(-0.0179394 0.626134 0)
(-0.0166227 0.627963 0)
(-0.0146256 0.63069 0)
(-0.0111471 0.634862 0)
(-0.00623681 0.63941 0)
(-0.000850809 0.643313 0)
(0.0044518 0.6461 0)
(0.00895368 0.64554 0)
(0.012345 0.63964 0)
(0.0145035 0.630305 0)
(0.0147946 0.622285 0)
(0.0149142 0.613654 0)
(0.0127889 0.607015 0)
(0.0120851 0.599832 0)
(0.0072423 0.623417 0)
(0.00272929 0.64106 0)
(-0.00439481 0.625121 0)
(-0.00910546 0.607837 0)
(-0.0183008 0.577455 0)
(-0.0211941 0.57936 0)
(-0.0234788 0.5835 0)
(-0.0240824 0.586644 0)
(-0.025354 0.588378 0)
(-0.0258627 0.591003 0)
(-0.0259588 0.594103 0)
(-0.0252043 0.598221 0)
(-0.023506 0.60277 0)
(-0.0211155 0.607658 0)
(-0.0188856 0.613838 0)
(-0.0175824 0.61901 0)
(-0.0165616 0.621973 0)
(-0.0152418 0.623555 0)
(-0.0132662 0.6255 0)
(-0.0101762 0.628533 0)
(-0.00604883 0.632381 0)
(-0.00148801 0.636166 0)
(0.00320192 0.639014 0)
(0.00798304 0.638869 0)
(0.0120035 0.633991 0)
(0.0143592 0.626305 0)
(0.0141077 0.620224 0)
(0.0129194 0.611696 0)
(0.0094675 0.606055 0)
(0.00796685 0.597787 0)
(0.00358046 0.621895 0)
(0.00143902 0.638862 0)
(-0.00388059 0.62496 0)
(-0.00717205 0.609356 0)
(-0.016232 0.579023 0)
(-0.0182503 0.579112 0)
(-0.0205395 0.582281 0)
(-0.0223567 0.585518 0)
(-0.0244284 0.586732 0)
(-0.0254207 0.588775 0)
(-0.0256793 0.59109 0)
(-0.0248494 0.59445 0)
(-0.0227284 0.597978 0)
(-0.0197743 0.602471 0)
(-0.0172119 0.609325 0)
(-0.0158659 0.615059 0)
(-0.0149288 0.61785 0)
(-0.0136545 0.619106 0)
(-0.0118824 0.620438 0)
(-0.00932841 0.622708 0)
(-0.00599987 0.626016 0)
(-0.00226493 0.629679 0)
(0.00190838 0.632311 0)
(0.00683768 0.631999 0)
(0.0109143 0.628502 0)
(0.0129439 0.622886 0)
(0.0123677 0.61867 0)
(0.0106213 0.611061 0)
(0.00658493 0.606261 0)
(0.00482424 0.596311 0)
(0.000263154 0.619804 0)
(0.000410734 0.634589 0)
(-0.00351139 0.624021 0)
(-0.00531092 0.610343 0)
(-0.0139077 0.580129 0)
(-0.0147579 0.578574 0)
(-0.0175396 0.582056 0)
(-0.0205045 0.58513 0)
(-0.0235404 0.585498 0)
(-0.0249739 0.586393 0)
(-0.025292 0.587754 0)
(-0.0242838 0.590212 0)
(-0.0216429 0.592504 0)
(-0.0182118 0.596768 0)
(-0.0155087 0.604552 0)
(-0.014185 0.611004 0)
(-0.0133483 0.613589 0)
(-0.0122013 0.614553 0)
(-0.0107059 0.615464 0)
(-0.00866038 0.617181 0)
(-0.00601291 0.620071 0)
(-0.0029407 0.623502 0)
(0.00100883 0.625559 0)
(0.00597292 0.624951 0)
(0.00978083 0.623372 0)
(0.0111566 0.62007 0)
(0.0100945 0.617264 0)
(0.00821621 0.611049 0)
(0.00455495 0.606856 0)
(0.00292209 0.595566 0)
(-0.00249392 0.617615 0)
(-0.00039934 0.62858 0)
(-0.00280287 0.622255 0)
(-0.00322958 0.610643 0)
(-0.010763 0.580535 0)
(-0.0114252 0.578199 0)
(-0.0149719 0.582546 0)
(-0.0187643 0.585275 0)
(-0.0223087 0.584367 0)
(-0.0239621 0.583656 0)
(-0.0243908 0.583995 0)
(-0.023093 0.585267 0)
(-0.0200247 0.586357 0)
(-0.0164263 0.590625 0)
(-0.0138411 0.599486 0)
(-0.012651 0.606721 0)
(-0.0119995 0.609114 0)
(-0.011048 0.609869 0)
(-0.00985916 0.610502 0)
(-0.00825011 0.611794 0)
(-0.00614576 0.614277 0)
(-0.00354071 0.617288 0)
(0.000334341 0.618386 0)
(0.00520472 0.617625 0)
(0.00871187 0.618282 0)
(0.00957034 0.617509 0)
(0.00819106 0.615831 0)
(0.00631426 0.610797 0)
(0.00332722 0.606964 0)
(0.00211898 0.595591 0)
(-0.00460037 0.615786 0)
(-0.000883268 0.621308 0)
(-0.00177634 0.619345 0)
(-0.00136581 0.610473 0)
(-0.00769277 0.580251 0)
(-0.00901062 0.578593 0)
(-0.0131257 0.583461 0)
(-0.0170479 0.585541 0)
(-0.0204771 0.582916 0)
(-0.0222413 0.580769 0)
(-0.0226645 0.579929 0)
(-0.0210517 0.579727 0)
(-0.0178551 0.579845 0)
(-0.0145133 0.584301 0)
(-0.0123363 0.594276 0)
(-0.011412 0.602268 0)
(-0.0109591 0.604467 0)
(-0.0102034 0.605093 0)
(-0.00930939 0.605563 0)
(-0.00810692 0.606503 0)
(-0.00650465 0.608618 0)
(-0.00429367 0.610988 0)
(-0.0005733 0.610861 0)
(0.00403609 0.610109 0)
(0.0072906 0.613069 0)
(0.00809049 0.61476 0)
(0.00680036 0.614203 0)
(0.00502172 0.610103 0)
(0.00256943 0.606248 0)
(0.00202479 0.595913 0)
(-0.00530032 0.614587 0)
(-0.00106282 0.613195 0)
(-0.00105619 0.615472 0)
(0.000280932 0.610044 0)
(-0.00533939 0.579868 0)
(-0.00759415 0.579225 0)
(-0.0114744 0.584008 0)
(-0.0148003 0.585163 0)
(-0.0178814 0.580904 0)
(-0.0194673 0.577606 0)
(-0.019695 0.57542 0)
(-0.0179994 0.573742 0)
(-0.015207 0.573222 0)
(-0.0126462 0.577931 0)
(-0.0111475 0.58886 0)
(-0.0105478 0.597463 0)
(-0.0102358 0.599464 0)
(-0.00956307 0.600024 0)
(-0.0088882 0.600478 0)
(-0.0081466 0.601245 0)
(-0.00712193 0.603027 0)
(-0.00536935 0.604547 0)
(-0.0020137 0.603094 0)
(0.00220576 0.602455 0)
(0.00529632 0.607414 0)
(0.00632959 0.611208 0)
(0.00523501 0.612075 0)
(0.00385774 0.608929 0)
(0.00215809 0.604224 0)
(0.00254856 0.595486 0)
(-0.00459231 0.61387 0)
(-0.000298042 0.60561 0)
(-0.000675257 0.610727 0)
(0.0019162 0.609126 0)
(-0.00344963 0.579562 0)
(-0.00613795 0.57939 0)
(-0.00904482 0.583412 0)
(-0.0114333 0.583717 0)
(-0.0139215 0.578198 0)
(-0.0153304 0.573938 0)
(-0.0155358 0.570337 0)
(-0.0143272 0.567308 0)
(-0.0125993 0.566252 0)
(-0.0111001 0.571129 0)
(-0.0102793 0.58272 0)
(-0.0099371 0.59173 0)
(-0.0097217 0.593433 0)
(-0.00907074 0.593909 0)
(-0.00848117 0.594492 0)
(-0.00810434 0.595414 0)
(-0.00772406 0.597189 0)
(-0.00661061 0.597963 0)
(-0.00400684 0.595273 0)
(-0.000474301 0.594658 0)
(0.00252796 0.601112 0)
(0.00399657 0.60685 0)
(0.00326907 0.60906 0)
(0.00269634 0.60665 0)
(0.00246513 0.601079 0)
(0.00349914 0.593944 0)
(-0.00340701 0.612925 0)
(0.00084387 0.59876 0)
(-0.000530027 0.604764 0)
(0.00357817 0.608113 0)
(-0.00208096 0.579715 0)
(-0.00406312 0.578842 0)
(-0.00552318 0.581555 0)
(-0.00683528 0.580967 0)
(-0.00882729 0.575027 0)
(-0.010385 0.56973 0)
(-0.0113658 0.564553 0)
(-0.011327 0.56094 0)
(-0.0107278 0.560077 0)
(-0.00998061 0.565162 0)
(-0.0096183 0.577151 0)
(-0.00947135 0.586421 0)
(-0.00940748 0.587887 0)
(-0.00882029 0.588227 0)
(-0.0080653 0.588844 0)
(-0.00750831 0.589687 0)
(-0.00743655 0.590927 0)
(-0.00719758 0.590824 0)
(-0.00586044 0.587404 0)
(-0.00350064 0.586884 0)
(-0.000827943 0.594039 0)
(0.00104995 0.601534 0)
(0.000944977 0.604924 0)
(0.00146083 0.602655 0)
(0.00249123 0.597102 0)
(0.00441774 0.592224 0)
(-0.00203176 0.612283 0)
(0.00218757 0.593242 0)
(-0.000110208 0.597717 0)
(0.00548168 0.607155 0)
(0.000314144 0.579434 0)
(-0.000322499 0.577022 0)
(-0.000958843 0.578267 0)
(-0.00191754 0.577202 0)
(-0.00429594 0.570847 0)
(-0.00647746 0.565187 0)
(-0.00805923 0.559913 0)
(-0.00883293 0.556032 0)
(-0.00912144 0.554773 0)
(-0.00903531 0.559535 0)
(-0.00907094 0.571567 0)
(-0.0090631 0.580916 0)
(-0.00911381 0.582168 0)
(-0.00868164 0.582303 0)
(-0.00799188 0.582898 0)
(-0.00739751 0.584098 0)
(-0.00727369 0.585617 0)
(-0.00706928 0.584752 0)
(-0.00634539 0.57992 0)
(-0.00523817 0.578615 0)
(-0.00363954 0.585656 0)
(-0.00191751 0.594899 0)
(-0.00133855 0.599377 0)
(0.000202642 0.597132 0)
(0.00192982 0.592239 0)
(0.00479551 0.589175 0)
(0.000324482 0.61122 0)
(0.00313937 0.589902 0)
(0.000901476 0.589489 0)
(0.00869481 0.605338 0)
(0.0037453 0.578135 0)
(0.00361287 0.574176 0)
(0.00214622 0.57393 0)
(0.000675338 0.572502 0)
(-0.00204804 0.567443 0)
(-0.00430992 0.561773 0)
(-0.00600119 0.555657 0)
(-0.00703576 0.551314 0)
(-0.00773301 0.549571 0)
(-0.00814044 0.553896 0)
(-0.00852113 0.565799 0)
(-0.00862153 0.575002 0)
(-0.00871385 0.576195 0)
(-0.00861793 0.576189 0)
(-0.0083193 0.576684 0)
(-0.00788336 0.577982 0)
(-0.00741198 0.57957 0)
(-0.00673198 0.578526 0)
(-0.00599891 0.573783 0)
(-0.00546201 0.57222 0)
(-0.00464547 0.577844 0)
(-0.0032429 0.586684 0)
(-0.00222106 0.591447 0)
(-0.000628276 0.589918 0)
(0.000778343 0.586337 0)
(0.00355713 0.585196 0)
(0.000268409 0.610439 0)
(0.00388725 0.588 0)
(0.000937284 0.580706 0)
(0.0121936 0.600749 0)
(0.00649102 0.576269 0)
(0.00497472 0.570351 0)
(0.00206837 0.569859 0)
(-2.68064e-05 0.569333 0)
(-0.00223274 0.564385 0)
(-0.00349731 0.557752 0)
(-0.00447723 0.55129 0)
(-0.00546986 0.547215 0)
(-0.00646757 0.545588 0)
(-0.007287 0.549596 0)
(-0.0078589 0.561171 0)
(-0.00808514 0.570105 0)
(-0.00843506 0.571406 0)
(-0.0086859 0.571409 0)
(-0.00885359 0.57177 0)
(-0.00880964 0.572545 0)
(-0.00828331 0.573326 0)
(-0.0070891 0.57159 0)
(-0.005702 0.567023 0)
(-0.00466228 0.56615 0)
(-0.00378063 0.571484 0)
(-0.00242509 0.579748 0)
(-0.00110865 0.583675 0)
(0.000104265 0.582349 0)
(0.000843765 0.579347 0)
(0.00205696 0.580987 0)
(-0.00180843 0.605964 0)
(0.0045993 0.587057 0)
(0.000400311 0.567928 0)
(0.0103578 0.59347 0)
(0.00663238 0.573785 0)
(0.003286 0.567917 0)
(-0.00083064 0.567486 0)
(-0.00242649 0.565606 0)
(-0.00282053 0.559588 0)
(-0.00276161 0.553577 0)
(-0.00361178 0.548181 0)
(-0.00488705 0.544318 0)
(-0.00613844 0.542361 0)
(-0.00712358 0.545719 0)
(-0.00758935 0.556732 0)
(-0.00776205 0.565627 0)
(-0.00827708 0.566972 0)
(-0.00867965 0.566939 0)
(-0.00898317 0.567294 0)
(-0.00907553 0.567859 0)
(-0.00872378 0.568144 0)
(-0.00761373 0.565713 0)
(-0.00600976 0.560636 0)
(-0.00447719 0.559438 0)
(-0.00281057 0.564197 0)
(-0.000422336 0.572087 0)
(0.00141121 0.577303 0)
(0.00248731 0.576581 0)
(0.00237392 0.573782 0)
(0.00203857 0.577342 0)
(-0.00197915 0.5994 0)
(0.00377048 0.582026 0)
(-0.00173895 0.55874 0)
(0.00602124 0.5845 0)
(0.00360667 0.572482 0)
(-0.000121467 0.566764 0)
(-0.00326939 0.563382 0)
(-0.00318157 0.560399 0)
(-0.00286195 0.555181 0)
(-0.00285156 0.550248 0)
(-0.00373879 0.54544 0)
(-0.00512856 0.541777 0)
(-0.00667987 0.53959 0)
(-0.007809 0.542211 0)
(-0.00817307 0.552414 0)
(-0.0080502 0.561364 0)
(-0.00840264 0.562692 0)
(-0.00861343 0.562574 0)
(-0.00868498 0.562873 0)
(-0.00860308 0.563333 0)
(-0.00823277 0.563313 0)
(-0.00703305 0.560189 0)
(-0.00541511 0.55521 0)
(-0.00402302 0.554339 0)
(-0.00259396 0.558267 0)
(-0.000111265 0.564116 0)
(0.00268028 0.568907 0)
(0.00483256 0.569595 0)
(0.00498418 0.569402 0)
(0.00332486 0.574706 0)
(-0.00111482 0.593656 0)
(0.00322483 0.576058 0)
(-0.00200186 0.553431 0)
(0.00222633 0.57726 0)
(-0.000307582 0.56817 0)
(-0.0017472 0.563392 0)
(-0.00353928 0.559531 0)
(-0.00342485 0.556229 0)
(-0.00331374 0.551307 0)
(-0.00351347 0.547014 0)
(-0.00432834 0.542698 0)
(-0.00570637 0.53943 0)
(-0.00758168 0.537355 0)
(-0.00885099 0.53917 0)
(-0.00939981 0.548275 0)
(-0.00898318 0.557011 0)
(-0.00879567 0.558267 0)
(-0.00843847 0.557985 0)
(-0.00791718 0.558209 0)
(-0.00734844 0.55864 0)
(-0.00672789 0.558406 0)
(-0.00546675 0.554772 0)
(-0.00405269 0.550235 0)
(-0.00304616 0.549877 0)
(-0.002158 0.553395 0)
(-0.000157021 0.558054 0)
(0.00261565 0.562575 0)
(0.00465303 0.563671 0)
(0.00503204 0.564212 0)
(0.00397075 0.570746 0)
(-0.00146779 0.589105 0)
(0.0010413 0.569997 0)
(-0.000516157 0.544862 0)
(0.00169806 0.571149 0)
(-0.00251127 0.564002 0)
(-0.0031986 0.560537 0)
(-0.0041951 0.556008 0)
(-0.0040863 0.552325 0)
(-0.00422925 0.547616 0)
(-0.00449479 0.543604 0)
(-0.00511771 0.539675 0)
(-0.00624799 0.536878 0)
(-0.00806085 0.535137 0)
(-0.00983016 0.536397 0)
(-0.0103557 0.544465 0)
(-0.00997136 0.552341 0)
(-0.00896991 0.553357 0)
(-0.00799132 0.552902 0)
(-0.00688024 0.553088 0)
(-0.00578312 0.553627 0)
(-0.00472445 0.553382 0)
(-0.00352242 0.549586 0)
(-0.00252661 0.545606 0)
(-0.00201267 0.545746 0)
(-0.00171379 0.548875 0)
(-0.000377106 0.552559 0)
(0.00181457 0.556769 0)
(0.00381756 0.558834 0)
(0.00387908 0.560919 0)
(0.00232889 0.568349 0)
(-0.00364018 0.585344 0)
(-0.00132112 0.559091 0)
(-0.000427221 0.538893 0)
(0.00101938 0.570014 0)
(-0.00434717 0.561413 0)
(-0.00474281 0.557205 0)
(-0.00542493 0.552247 0)
(-0.00525546 0.548327 0)
(-0.00543729 0.543824 0)
(-0.00571554 0.53999 0)
(-0.00618482 0.536427 0)
(-0.00677933 0.534039 0)
(-0.00769917 0.532893 0)
(-0.00969154 0.533377 0)
(-0.0108901 0.540118 0)
(-0.0101802 0.546687 0)
(-0.00864448 0.547313 0)
(-0.00726525 0.546705 0)
(-0.00584027 0.546904 0)
(-0.00442895 0.547617 0)
(-0.00301411 0.547606 0)
(-0.00188921 0.544272 0)
(-0.00145013 0.5407 0)
(-0.00158509 0.541298 0)
(-0.00122232 0.544217 0)
(-0.000141015 0.547228 0)
(0.00120957 0.551252 0)
(0.00274239 0.554185 0)
(0.0021819 0.558227 0)
(0.000325836 0.566964 0)
(-0.00457223 0.584203 0)
(-0.0014577 0.549891 0)
(-0.00148803 0.534172 0)
(4.36387e-05 0.569298 0)
(-0.0054413 0.55859 0)
(-0.00584848 0.553362 0)
(-0.00652689 0.548146 0)
(-0.00637308 0.5442 0)
(-0.00654383 0.540035 0)
(-0.0067396 0.536448 0)
(-0.00702022 0.533082 0)
(-0.00725794 0.53075 0)
(-0.00744902 0.530065 0)
(-0.00836077 0.531337 0)
(-0.00982351 0.535247 0)
(-0.00936416 0.539732 0)
(-0.0079711 0.540115 0)
(-0.00652132 0.539593 0)
(-0.00493977 0.539821 0)
(-0.00343171 0.540582 0)
(-0.00212506 0.540799 0)
(-0.00133442 0.538453 0)
(-0.00148475 0.536518 0)
(-0.0013058 0.537259 0)
(-0.000385197 0.53951 0)
(0.000550766 0.542347 0)
(0.00110529 0.546263 0)
(0.00161407 0.549828 0)
(0.000214317 0.555646 0)
(-0.00119998 0.565054 0)
(-0.00502459 0.581751 0)
(-0.000436356 0.542306 0)
(-0.00286304 0.529593 0)
(-0.000659265 0.567063 0)
(-0.00546212 0.555135 0)
(-0.00594238 0.549343 0)
(-0.00682098 0.544031 0)
(-0.00685621 0.540178 0)
(-0.00703184 0.536328 0)
(-0.00709434 0.53293 0)
(-0.00721941 0.5297 0)
(-0.00737402 0.527382 0)
(-0.00730226 0.526523 0)
(-0.0070503 0.528185 0)
(-0.00741895 0.531645 0)
(-0.00739646 0.534245 0)
(-0.00680005 0.534163 0)
(-0.00570904 0.5335 0)
(-0.00431313 0.533747 0)
(-0.00309193 0.534691 0)
(-0.00231584 0.535355 0)
(-0.00190042 0.534141 0)
(-0.00166757 0.53257 0)
(-0.000821993 0.532683 0)
(0.000235088 0.534804 0)
(0.000894381 0.537885 0)
(0.000961869 0.542023 0)
(0.000633701 0.546169 0)
(-0.00124124 0.5531 0)
(-0.00213655 0.561921 0)
(-0.00448052 0.577711 0)
(0.00121776 0.535248 0)
(-0.00360231 0.525775 0)
(-0.000367624 0.562855 0)
(-0.00396931 0.551274 0)
(-0.00467865 0.545528 0)
(-0.00587334 0.540263 0)
(-0.00621193 0.536437 0)
(-0.00647941 0.532717 0)
(-0.00649828 0.52945 0)
(-0.0066382 0.526494 0)
(-0.00691628 0.524293 0)
(-0.00706748 0.523035 0)
(-0.00642241 0.523757 0)
(-0.00571 0.527079 0)
(-0.00550004 0.529495 0)
(-0.00542367 0.528916 0)
(-0.00484138 0.527824 0)
(-0.00396127 0.528005 0)
(-0.00322079 0.529265 0)
(-0.00283119 0.530303 0)
(-0.00227005 0.529163 0)
(-0.00130328 0.527499 0)
(-0.000196731 0.527825 0)
(0.000376521 0.530383 0)
(0.000599546 0.533631 0)
(0.000449771 0.53807 0)
(-0.000169196 0.542812 0)
(-0.00204837 0.550241 0)
(-0.00257545 0.557724 0)
(-0.00408885 0.571528 0)
(0.00276347 0.530013 0)
(-0.00300109 0.521619 0)
(0.00136701 0.556905 0)
(-0.000864298 0.547402 0)
(-0.00202478 0.542007 0)
(-0.00350463 0.53689 0)
(-0.0042307 0.533048 0)
(-0.00477845 0.529385 0)
(-0.00505001 0.526252 0)
(-0.0054411 0.523559 0)
(-0.00596752 0.521489 0)
(-0.00638877 0.519991 0)
(-0.00614505 0.519958 0)
(-0.00542922 0.522481 0)
(-0.00472663 0.524643 0)
(-0.00430962 0.523897 0)
(-0.00395704 0.522713 0)
(-0.00360933 0.522864 0)
(-0.00318085 0.524147 0)
(-0.00261298 0.525208 0)
(-0.00161398 0.524137 0)
(-0.000551789 0.52311 0)
(-8.71435e-06 0.524196 0)
(-0.000163486 0.5269 0)
(-0.000422895 0.529979 0)
(-0.000794021 0.534352 0)
(-0.00143358 0.539487 0)
(-0.00302408 0.54695 0)
(-0.00370905 0.553133 0)
(-0.00436229 0.563867 0)
(0.00223678 0.524394 0)
(-0.00104273 0.517996 0)
(0.00337839 0.55181 0)
(0.00252661 0.545158 0)
(0.00116189 0.539904 0)
(-0.000336636 0.534566 0)
(-0.00143532 0.530363 0)
(-0.00234842 0.526542 0)
(-0.00304533 0.523366 0)
(-0.00377223 0.520745 0)
(-0.00452391 0.51873 0)
(-0.00515561 0.517145 0)
(-0.00538141 0.516885 0)
(-0.00506321 0.519055 0)
(-0.00426326 0.52112 0)
(-0.00357909 0.520619 0)
(-0.00327992 0.51965 0)
(-0.00318128 0.519773 0)
(-0.00287251 0.520796 0)
(-0.00217626 0.521558 0)
(-0.00121643 0.520375 0)
(-0.000609897 0.51959 0)
(-0.000665469 0.52098 0)
(-0.00126616 0.523703 0)
(-0.00192394 0.526709 0)
(-0.00263809 0.531012 0)
(-0.00343588 0.536288 0)
(-0.00458208 0.543487 0)
(-0.0051911 0.548548 0)
(-0.00483325 0.555352 0)
(0.0012476 0.518015 0)
(0.000490992 0.513619 0)
(0.00511227 0.546636 0)
(0.00548953 0.543619 0)
(0.00443462 0.539055 0)
(0.00309922 0.534005 0)
(0.00171278 0.529639 0)
(0.000433779 0.525616 0)
(-0.000712833 0.522275 0)
(-0.00177686 0.51954 0)
(-0.00273495 0.517353 0)
(-0.00359395 0.51555 0)
(-0.00426914 0.514979 0)
(-0.00441204 0.516472 0)
(-0.00378844 0.518107 0)
(-0.00306152 0.517896 0)
(-0.00277502 0.517297 0)
(-0.00272461 0.517394 0)
(-0.00246863 0.51805 0)
(-0.00183876 0.518488 0)
(-0.00125451 0.517555 0)
(-0.00130395 0.51735 0)
(-0.00189924 0.51916 0)
(-0.00273923 0.522077 0)
(-0.00366757 0.525263 0)
(-0.00468415 0.529587 0)
(-0.00565797 0.534878 0)
(-0.00633661 0.541521 0)
(-0.00651277 0.545764 0)
(-0.00548899 0.548492 0)
(-3.79422e-05 0.513004 0)
(0.00151759 0.508658 0)
(0.00585606 0.542167 0)
(0.00677997 0.54198 0)
(0.00629341 0.538062 0)
(0.00532673 0.533277 0)
(0.00408487 0.528813 0)
(0.00278038 0.524767 0)
(0.00149613 0.52133 0)
(0.000314011 0.518524 0)
(-0.000741959 0.516313 0)
(-0.00178271 0.514671 0)
(-0.00280981 0.514077 0)
(-0.00337012 0.514906 0)
(-0.00311368 0.515927 0)
(-0.00259723 0.515906 0)
(-0.00237772 0.515609 0)
(-0.00232706 0.515702 0)
(-0.00216971 0.516136 0)
(-0.0018252 0.516442 0)
(-0.00177796 0.516063 0)
(-0.00244988 0.516335 0)
(-0.00345585 0.518076 0)
(-0.00441611 0.520799 0)
(-0.00541788 0.524063 0)
(-0.00648526 0.528276 0)
(-0.0074201 0.533296 0)
(-0.00768986 0.538953 0)
(-0.00736923 0.542573 0)
(-0.00601862 0.54232 0)
(-0.00117955 0.507183 0)
(0.00209933 0.505423 0)
(0.0060126 0.539977 0)
(0.0071517 0.541999 0)
(0.00706651 0.538931 0)
(0.0063629 0.534531 0)
(0.00528058 0.530032 0)
(0.00405252 0.525803 0)
(0.00279275 0.522087 0)
(0.00158812 0.518967 0)
(0.000465517 0.516459 0)
(-0.000633045 0.514604 0)
(-0.00168205 0.513686 0)
(-0.00234898 0.513803 0)
(-0.00238692 0.514225 0)
(-0.00215004 0.514224 0)
(-0.00203811 0.5141 0)
(-0.0020335 0.514206 0)
(-0.00200882 0.514542 0)
(-0.00196902 0.514889 0)
(-0.00226054 0.51509 0)
(-0.00310801 0.515925 0)
(-0.00420113 0.517899 0)
(-0.00526303 0.52078 0)
(-0.00632798 0.524278 0)
(-0.00737199 0.528499 0)
(-0.00818191 0.533233 0)
(-0.00833091 0.538033 0)
(-0.00778185 0.540745 0)
(-0.00622026 0.538102 0)
(-0.001914 0.502125 0)
(0.00243914 0.501641 0)
(0.0059562 0.537675 0)
(0.00717742 0.541463 0)
(0.00735995 0.539339 0)
(0.00689325 0.535513 0)
(0.00599835 0.531311 0)
(0.00489143 0.52724 0)
(0.00369992 0.523564 0)
(0.00251013 0.520415 0)
(0.0013627 0.517849 0)
(0.000260553 0.515926 0)
(-0.00073903 0.514778 0)
(-0.00142898 0.514398 0)
(-0.00167814 0.514375 0)
(-0.00168969 0.514303 0)
(-0.00171708 0.514262 0)
(-0.00180683 0.514412 0)
(-0.00192732 0.514776 0)
(-0.00212606 0.515283 0)
(-0.00261064 0.515945 0)
(-0.00348607 0.517187 0)
(-0.00456604 0.519297 0)
(-0.00565965 0.522182 0)
(-0.00672274 0.525678 0)
(-0.00768108 0.529724 0)
(-0.00834011 0.534062 0)
(-0.00838496 0.538084 0)
(-0.00770808 0.540025 0)
(-0.00610241 0.535785 0)
(-0.00227918 0.498702 0)
(0.00251206 0.497516 0)
(0.00570341 0.535287 0)
(0.00693475 0.540555 0)
(0.00729116 0.539349 0)
(0.00703106 0.536106 0)
(0.006336 0.532247 0)
(0.00538847 0.528369 0)
(0.00431105 0.524776 0)
(0.00318974 0.521638 0)
(0.00207937 0.519042 0)
(0.00101748 0.517051 0)
(7.18507e-05 0.515721 0)
(-0.000631589 0.515007 0)
(-0.00102929 0.514676 0)
(-0.00123689 0.514501 0)
(-0.00141172 0.514479 0)
(-0.00161927 0.514674 0)
(-0.00187918 0.515111 0)
(-0.00224789 0.515789 0)
(-0.0028434 0.516767 0)
(-0.00371131 0.518275 0)
(-0.00474118 0.520475 0)
(-0.00579541 0.523337 0)
(-0.0067928 0.526746 0)
(-0.00763381 0.530557 0)
(-0.00814882 0.53446 0)
(-0.00810516 0.537769 0)
(-0.00737037 0.538866 0)
(-0.00581333 0.533288 0)
(-0.00241034 0.494813 0)
(0.00249618 0.493534 0)
(0.00531885 0.533085 0)
(0.00650694 0.539606 0)
(0.00697256 0.53921 0)
(0.00687947 0.536499 0)
(0.00636703 0.532979 0)
(0.00558674 0.529305 0)
(0.00464858 0.525815 0)
(0.00363497 0.522709 0)
(0.00260797 0.520092 0)
(0.00161941 0.518026 0)
(0.000732647 0.516541 0)
(2.59838e-05 0.515596 0)
(-0.000469509 0.515051 0)
(-0.000820266 0.514775 0)
(-0.00112465 0.514743 0)
(-0.00144461 0.514976 0)
(-0.00182037 0.515496 0)
(-0.00230047 0.516325 0)
(-0.00295079 0.517518 0)
(-0.00378777 0.519206 0)
(-0.00474013 0.521477 0)
(-0.00570575 0.524311 0)
(-0.00659566 0.527602 0)
(-0.00730653 0.531162 0)
(-0.00769427 0.534643 0)
(-0.00758602 0.537319 0)
(-0.00684876 0.537594 0)
(-0.0054108 0.530812 0)
(-0.00238905 0.490813 0)
(0.0023412 0.489971 0)
(0.00482354 0.531135 0)
(0.00596298 0.538679 0)
(0.00650538 0.538972 0)
(0.0065461 0.536741 0)
(0.00619536 0.533551 0)
(0.00557669 0.530092 0)
(0.00478532 0.526729 0)
(0.00389737 0.523676 0)
(0.00297562 0.521055 0)
(0.00207471 0.518929 0)
(0.00124919 0.517326 0)
(0.00055065 0.516216 0)
(-3.69014e-06 0.515521 0)
(-0.000452124 0.515162 0)
(-0.000857508 0.515111 0)
(-0.00127053 0.515378 0)
(-0.00173125 0.515973 0)
(-0.00227836 0.516919 0)
(-0.00294582 0.518263 0)
(-0.00373696 0.520072 0)
(-0.00459996 0.522389 0)
(-0.0054563 0.525183 0)
(-0.00622292 0.528344 0)
(-0.00680403 0.531656 0)
(-0.00707985 0.53475 0)
(-0.00691694 0.536879 0)
(-0.00620683 0.53644 0)
(-0.00490648 0.528645 0)
(-0.0022774 0.487137 0)
(0.00208992 0.486746 0)
(0.00429684 0.529358 0)
(0.00537998 0.537766 0)
(0.00597048 0.538645 0)
(0.00611595 0.536846 0)
(0.00590468 0.53397 0)
(0.00543413 0.530731 0)
(0.00478498 0.527508 0)
(0.00402518 0.524529 0)
(0.00321443 0.521923 0)
(0.00240402 0.519762 0)
(0.00164018 0.518077 0)
(0.00095975 0.516857 0)
(0.000374739 0.516059 0)
(-0.000136542 0.515636 0)
(-0.000614086 0.51557 0)
(-0.00109597 0.515859 0)
(-0.0016131 0.516511 0)
(-0.00219319 0.517546 0)
(-0.00285485 0.518989 0)
(-0.00359173 0.520873 0)
(-0.00436368 0.523207 0)
(-0.0051077 0.525945 0)
(-0.00575148 0.528963 0)
(-0.00621138 0.532038 0)
(-0.00639031 0.534782 0)
(-0.00617824 0.536444 0)
(-0.00550113 0.535405 0)
(-0.00433241 0.526777 0)
(-0.00203836 0.483939 0)
(0.00181098 0.483869 0)
(0.00378587 0.527742 0)
(0.00480444 0.536871 0)
(0.00542199 0.538249 0)
(0.0056481 0.536837 0)
(0.00555368 0.534253 0)
(0.00521364 0.53123 0)
(0.00469508 0.528155 0)
(0.00405713 0.525264 0)
(0.0033534 0.522691 0)
(0.00263042 0.52052 0)
(0.00192711 0.518787 0)
(0.00127227 0.517497 0)
(0.000676527 0.516631 0)
(0.000128883 0.516164 0)
(-0.000394939 0.516085 0)
(-0.000920962 0.51639 0)
(-0.00147144 0.517083 0)
(-0.00206368 0.518175 0)
(-0.00270513 0.519677 0)
(-0.00338509 0.521598 0)
(-0.00406998 0.523922 0)
(-0.00470838 0.526588 0)
(-0.0052389 0.529464 0)
(-0.00559131 0.532316 0)
(-0.00568812 0.534746 0)
(-0.00544159 0.536004 0)
(-0.00480022 0.534458 0)
(-0.00375339 0.525129 0)
(-0.00175312 0.481088 0)
(0.00154578 0.481366 0)
(0.00331148 0.526291 0)
(0.00426942 0.536006 0)
(0.00489387 0.537808 0)
(0.00518365 0.536736 0)
(0.00518474 0.534421 0)
(0.00495581 0.531603 0)
(0.00455209 0.528678 0)
(0.00402389 0.525884 0)
(0.00341818 0.523363 0)
(0.0027758 0.521202 0)
(0.00213027 0.519449 0)
(0.00150565 0.518121 0)
(0.000912822 0.517214 0)
(0.000348094 0.516719 0)
(-0.000201808 0.516632 0)
(-0.00075284 0.516947 0)
(-0.00131871 0.517666 0)
(-0.00190825 0.518791 0)
(-0.00252176 0.520323 0)
(-0.00314597 0.522251 0)
(-0.0037517 0.524543 0)
(-0.00429621 0.527127 0)
(-0.00472805 0.529861 0)
(-0.00498984 0.532504 0)
(-0.00501889 0.534656 0)
(-0.00475176 0.535566 0)
(-0.00414994 0.533593 0)
(-0.00321138 0.523687 0)
(-0.00147318 0.47863 0)
(0.00131703 0.479189 0)
(0.00290141 0.524986 0)
(0.00380159 0.535181 0)
(0.00442052 0.537339 0)
(0.00475387 0.536564 0)
(0.00482901 0.534494 0)
(0.00469073 0.531872 0)
(0.00438377 0.529096 0)
(0.00395013 0.526407 0)
(0.00343033 0.523949 0)
(0.00285985 0.521817 0)
(0.00226773 0.520067 0)
(0.00167523 0.518724 0)
(0.00109403 0.517797 0)
(0.000525572 0.517288 0)
(-3.556e-05 0.517196 0)
(-0.0005972 0.517517 0)
(-0.00116579 0.518249 0)
(-0.00174367 0.519388 0)
(-0.00232616 0.520926 0)
(-0.00289867 0.52284 0)
(-0.00343533 0.525084 0)
(-0.00390009 0.527577 0)
(-0.00425016 0.53017 0)
(-0.00443948 0.53262 0)
(-0.00441846 0.534526 0)
(-0.00414042 0.535138 0)
(-0.00358008 0.532811 0)
(-0.00274072 0.522438 0)
(-0.00122457 0.476558 0)
(0.00114062 0.47728 0)
(0.00257217 0.523803 0)
(0.00341443 0.534395 0)
(0.00401853 0.536857 0)
(0.00437792 0.536342 0)
(0.00450695 0.534495 0)
(0.00443936 0.532057 0)
(0.00421045 0.529428 0)
(0.00385518 0.526847 0)
(0.003408 0.524462 0)
(0.0028995 0.522373 0)
(0.00235513 0.520643 0)
(0.00179432 0.519303 0)
(0.00122954 0.518372 0)
(0.00066588 0.517858 0)
(0.00010362 0.517763 0)
(-0.00045878 0.518086 0)
(-0.00102201 0.518821 0)
(-0.00158352 0.51996 0)
(-0.00213525 0.521487 0)
(-0.00266202 0.52337 0)
(-0.00314064 0.525554 0)
(-0.00354043 0.527951 0)
(-0.00382584 0.530409 0)
(-0.00396034 0.532683 0)
(-0.00390519 0.534371 0)
(-0.00362655 0.534728 0)
(-0.00310898 0.532107 0)
(-0.00236158 0.521354 0)
(-0.00102851 0.474769 0)
(0.0010174 0.475571 0)
(0.0023239 0.522725 0)
(0.00311021 0.533653 0)
(0.00369364 0.536373 0)
(0.00406444 0.536088 0)
(0.00422984 0.534441 0)
(0.00421442 0.532175 0)
(0.00404583 0.529688 0)
(0.00375301 0.527217 0)
(0.00336508 0.524912 0)
(0.00290827 0.522877 0)
(0.00240515 0.521179 0)
(0.0018738 0.519857 0)
(0.00132733 0.518933 0)
(0.000773333 0.518421 0)
(0.00021614 0.518327 0)
(-0.000340963 0.518649 0)
(-0.000894361 0.51938 0)
(-0.0014379 0.520508 0)
(-0.00196133 0.522011 0)
(-0.00244935 0.523851 0)
(-0.00288099 0.525969 0)
(-0.00322998 0.528268 0)
(-0.00346681 0.530597 0)
(-0.00356251 0.532709 0)
(-0.00348712 0.534203 0)
(-0.00321661 0.53434 0)
(-0.00274195 0.531473 0)
(-0.00207539 0.520402 0)
(-0.000893886 0.473214 0)
(0.000941533 0.474005 0)
(0.00214846 0.521733 0)
(0.00288428 0.532953 0)
(0.00344344 0.535898 0)
(0.00381475 0.535815 0)
(0.0040018 0.534351 0)
(0.00402231 0.532245 0)
(0.00389808 0.529895 0)
(0.00365297 0.527532 0)
(0.00331152 0.525312 0)
(0.00289633 0.523338 0)
(0.0024276 0.521682 0)
(0.00192233 0.520386 0)
(0.00139393 0.519477 0)
(0.000851719 0.518974 0)
(0.000302852 0.518883 0)
(-0.000245805 0.519202 0)
(-0.00078751 0.519924 0)
(-0.0013136 0.521033 0)
(-0.00181246 0.522504 0)
(-0.00226899 0.524295 0)
(-0.00266407 0.526341 0)
(-0.00297504 0.528542 0)
(-0.00317731 0.530747 0)
(-0.00324782 0.532711 0)
(-0.00316331 0.534033 0)
(-0.00290678 0.533979 0)
(-0.00247307 0.530901 0)
(-0.0018738 0.519559 0)
(-0.00080983 0.471838 0)
(0.000902447 0.472537 0)
(0.00203332 0.520807 0)
(0.00272608 0.532292 0)
(0.00325983 0.535437 0)
(0.00362416 0.535536 0)
(0.00382132 0.534238 0)
(0.00386446 0.532283 0)
(0.00377095 0.530062 0)
(0.00356058 0.527807 0)
(0.00325409 0.525673 0)
(0.00287116 0.523765 0)
(0.00243006 0.522157 0)
(0.00194681 0.520895 0)
(0.00143479 0.520007 0)
(0.000904554 0.519516 0)
(0.000365208 0.519429 0)
(-0.000173894 0.519744 0)
(-0.000703821 0.520452 0)
(-0.00121424 0.521537 0)
(-0.00169279 0.522971 0)
(-0.0021247 0.524707 0)
(-0.00249247 0.52668 0)
(-0.00277634 0.528786 0)
(-0.00295569 0.530873 0)
(-0.00301179 0.5327 0)
(-0.0029264 0.533868 0)
(-0.0026869 0.533645 0)
(-0.00229013 0.530383 0)
(-0.00174503 0.518796 0)
(-0.000767233 0.470554 0)
(0.000888606 0.471125 0)
(0.00196408 0.519929 0)
(0.00262231 0.531664 0)
(0.00313146 0.534993 0)
(0.00348431 0.535259 0)
(0.00368312 0.534114 0)
(0.00373846 0.532298 0)
(0.00366459 0.530202 0)
(0.00347811 0.528052 0)
(0.00319671 0.526004 0)
(0.00283773 0.524165 0)
(0.00241796 0.522609 0)
(0.00195251 0.521385 0)
(0.00145448 0.520522 0)
(0.000935246 0.520047 0)
(0.000405286 0.519964 0)
(-0.000124475 0.520274 0)
(-0.000643635 0.520967 0)
(-0.00114081 0.522025 0)
(-0.00160327 0.523417 0)
(-0.00201671 0.525097 0)
(-0.00236495 0.526996 0)
(-0.0026306 0.529008 0)
(-0.00279606 0.530985 0)
(-0.00284573 0.532685 0)
(-0.00276475 0.533712 0)
(-0.0025428 0.533337 0)
(-0.00217715 0.529908 0)
(-0.0016728 0.518089 0)
(-0.000755528 0.46933 0)
(0.000890698 0.46974 0)
(0.00192686 0.519083 0)
(0.00255869 0.531065 0)
(0.00304565 0.534568 0)
(0.00338486 0.534988 0)
(0.00357968 0.533986 0)
(0.00363952 0.532302 0)
(0.0035767 0.530324 0)
(0.0034054 0.528276 0)
(0.00314099 0.526314 0)
(0.00279897 0.524545 0)
(0.00239491 0.523044 0)
(0.0019433 0.52186 0)
(0.00145672 0.521026 0)
(0.000946939 0.520567 0)
(0.000425511 0.52049 0)
(-9.5833e-05 0.520794 0)
(-0.000605723 0.52147 0)
(-0.00109217 0.522499 0)
(-0.00154237 0.523848 0)
(-0.00194244 0.525471 0)
(-0.0022774 0.527296 0)
(-0.00253165 0.529218 0)
(-0.00268982 0.53109 0)
(-0.00273842 0.532671 0)
(-0.00266453 0.533567 0)
(-0.00245875 0.533052 0)
(-0.00211736 0.529464 0)
(-0.00164071 0.517418 0)
(-0.000763015 0.468137 0)
(0.00089944 0.468368 0)
(0.00190913 0.518259 0)
(0.00252172 0.530488 0)
(0.00298973 0.534161 0)
(0.00331492 0.534728 0)
(0.00350241 0.53386 0)
(0.00356143 0.532301 0)
(0.00350337 0.530437 0)
(0.00334064 0.528488 0)
(0.00308689 0.526611 0)
(0.00275627 0.524912 0)
(0.0023633 0.523465 0)
(0.00192205 0.522323 0)
(0.00144454 0.521519 0)
(0.000942595 0.521079 0)
(0.000428532 0.521008 0)
(-8.55245e-05 0.521306 0)
(-0.000587663 0.521964 0)
(-0.00106562 0.522962 0)
(-0.00150667 0.524268 0)
(-0.00189737 0.525833 0)
(-0.00222371 0.527585 0)
(-0.00247142 0.529421 0)
(-0.00262672 0.531192 0)
(-0.00267737 0.532661 0)
(-0.0026114 0.533433 0)
(-0.0024192 0.532785 0)
(-0.00209527 0.529043 0)
(-0.00163524 0.516766 0)
(-0.000780148 0.466948 0)
(0.000909654 0.467 0)
(0.0019007 0.517448 0)
(0.00250003 0.529928 0)
(0.00295228 0.533768 0)
(0.00326408 0.534478 0)
(0.00344262 0.533739 0)
(0.0034975 0.5323 0)
(0.00343985 0.530544 0)
(0.00328095 0.528692 0)
(0.00303328 0.526898 0)
(0.00270995 0.525268 0)
(0.00232456 0.523877 0)
(0.00189076 0.522777 0)
(0.00142034 0.522004 0)
(0.000924853 0.521582 0)
(0.00041713 0.521517 0)
(-9.06043e-05 0.52181 0)
(-0.000586229 0.522449 0)
(-0.0010574 0.523417 0)
(-0.00149157 0.524679 0)
(-0.00187569 0.526187 0)
(-0.0021966 0.527869 0)
(-0.00244094 0.52962 0)
(-0.00259598 0.531295 0)
(-0.00265011 0.532656 0)
(-0.00259154 0.533309 0)
(-0.0024098 0.532531 0)
(-0.00209738 0.528634 0)
(-0.00164537 0.51612 0)
(-0.000801932 0.465751 0)
(0.000917579 0.465632 0)
(0.00189418 0.516646 0)
(0.00248447 0.529382 0)
(0.00292372 0.533389 0)
(0.0032232 0.534238 0)
(0.00339219 0.533625 0)
(0.00344101 0.532301 0)
(0.00338109 0.530651 0)
(0.00322296 0.528892 0)
(0.00297831 0.527179 0)
(0.0026595 0.525618 0)
(0.00227931 0.524282 0)
(0.00185091 0.523224 0)
(0.00138605 0.522483 0)
(0.000896188 0.522079 0)
(0.000394179 0.52202 0)
(-0.000107828 0.522306 0)
(-0.000597708 0.522928 0)
(-0.00106315 0.523865 0)
(-0.00149179 0.525084 0)
(-0.00187108 0.526535 0)
(-0.00218838 0.528149 0)
(-0.00243098 0.529818 0)
(-0.00258689 0.531399 0)
(-0.00264464 0.532655 0)
(-0.00259219 0.533193 0)
(-0.00241786 0.532285 0)
(-0.00211213 0.528232 0)
(-0.0016619 0.515474 0)
(-0.000823296 0.464542 0)
(0.000921335 0.464269 0)
(0.00188477 0.51585 0)
(0.00246828 0.528846 0)
(0.00289624 0.533022 0)
(0.00318451 0.534009 0)
(0.00334392 0.533519 0)
(0.00338596 0.532307 0)
(0.00332227 0.530759 0)
(0.00316317 0.529091 0)
(0.00291977 0.527457 0)
(0.00260384 0.525963 0)
(0.00222755 0.524682 0)
(0.0018035 0.523665 0)
(0.00134343 0.522954 0)
(0.000858947 0.522569 0)
(0.000362498 0.522516 0)
(-0.000133907 0.522796 0)
(-0.000618211 0.5234 0)
(-0.00107826 0.524306 0)
(-0.00150191 0.525482 0)
(-0.00187711 0.526879 0)
(-0.00219149 0.528425 0)
(-0.00243281 0.530015 0)
(-0.00258952 0.531505 0)
(-0.00265009 0.532659 0)
(-0.00260206 0.533082 0)
(-0.00243241 0.532045 0)
(-0.0021299 0.527832 0)
(-0.0016774 0.514821 0)
(-0.000840268 0.463319 0)
(0.00091819 0.462911 0)
(0.00186911 0.51506 0)
(0.00244592 0.528319 0)
(0.00286344 0.532664 0)
(0.00314132 0.533789 0)
(0.00329157 0.53342 0)
(0.00332685 0.532317 0)
(0.00325904 0.530868 0)
(0.00309834 0.529288 0)
(0.00285549 0.527732 0)
(0.00254184 0.526303 0)
(0.00216908 0.525075 0)
(0.00174929 0.5241 0)
(0.00129409 0.523419 0)
(0.000815228 0.523052 0)
(0.00032466 0.523005 0)
(-0.000165751 0.523279 0)
(-0.000644106 0.523864 0)
(-0.00109841 0.524741 0)
(-0.00151692 0.525875 0)
(-0.00188782 0.527218 0)
(-0.00219897 0.528698 0)
(-0.00243849 0.53021 0)
(-0.00259494 0.531612 0)
(-0.00265676 0.532664 0)
(-0.00261135 0.532973 0)
(-0.00244443 0.531807 0)
(-0.00214291 0.527432 0)
(-0.0016862 0.514162 0)
(-0.000850117 0.462087 0)
(0.00090711 0.46157 0)
(0.00184296 0.514277 0)
(0.00241259 0.527801 0)
(0.00282004 0.532316 0)
(0.00308818 0.533577 0)
(0.00323006 0.533328 0)
(0.00325923 0.532331 0)
(0.00318767 0.530979 0)
(0.00302567 0.529485 0)
(0.00278362 0.528003 0)
(0.00247256 0.526637 0)
(0.00210377 0.525462 0)
(0.00168888 0.524527 0)
(0.00123933 0.523875 0)
(0.000766753 0.523525 0)
(0.000282869 0.523484 0)
(-0.000200645 0.523752 0)
(-0.000672115 0.524319 0)
(-0.0011198 0.525167 0)
(-0.00153227 0.52626 0)
(-0.00189778 0.527551 0)
(-0.00220453 0.528966 0)
(-0.00244101 0.530402 0)
(-0.00259576 0.531716 0)
(-0.00265722 0.53267 0)
(-0.00261276 0.532866 0)
(-0.0024468 0.531568 0)
(-0.00214532 0.527029 0)
(-0.00168448 0.513496 0)
(-0.000851337 0.460853 0)
(0.000887938 0.460252 0)
(0.00180467 0.513505 0)
(0.0023654 0.527292 0)
(0.00276232 0.531977 0)
(0.00302109 0.533373 0)
(0.00315552 0.533241 0)
(0.00317961 0.532348 0)
(0.00310531 0.531089 0)
(0.00294304 0.529678 0)
(0.0027028 0.528268 0)
(0.00239536 0.526965 0)
(0.00203166 0.52584 0)
(0.00162287 0.524944 0)
(0.00118008 0.52432 0)
(0.000714887 0.523987 0)
(0.000238916 0.523951 0)
(-0.000236391 0.524213 0)
(-0.000699556 0.524763 0)
(-0.00113928 0.525582 0)
(-0.00154413 0.526635 0)
(-0.00190259 0.527874 0)
(-0.0022033 0.529227 0)
(-0.00243517 0.530589 0)
(-0.00258655 0.531817 0)
(-0.00264568 0.532673 0)
(-0.00260021 0.532757 0)
(-0.00243429 0.531329 0)
(-0.00213316 0.526624 0)
(-0.00166992 0.512828 0)
(-0.000843443 0.459627 0)
(0.000861353 0.458969 0)
(0.00175416 0.512746 0)
(0.002303 0.526794 0)
(0.00268817 0.531646 0)
(0.00293758 0.533175 0)
(0.00306546 0.533157 0)
(0.00308572 0.532365 0)
(0.00301017 0.531196 0)
(0.00284917 0.529865 0)
(0.00261233 0.528525 0)
(0.00231008 0.527281 0)
(0.00195305 0.526205 0)
(0.00155184 0.525348 0)
(0.00111722 0.524751 0)
(0.000660806 0.524434 0)
(0.000194266 0.524403 0)
(-0.000271181 0.524659 0)
(-0.000724486 0.525192 0)
(-0.00115442 0.525982 0)
(-0.00154962 0.526997 0)
(-0.00189891 0.528185 0)
(-0.00219133 0.529476 0)
(-0.00241633 0.530766 0)
(-0.00256222 0.53191 0)
(-0.00261727 0.53267 0)
(-0.00256971 0.532645 0)
(-0.0024037 0.531089 0)
(-0.00210413 0.526218 0)
(-0.00164153 0.512161 0)
(-0.00082679 0.458419 0)
(0.000828453 0.457726 0)
(0.00169172 0.512007 0)
(0.00222506 0.526308 0)
(0.00259673 0.531324 0)
(0.00283656 0.532981 0)
(0.00295873 0.533073 0)
(0.00297655 0.532378 0)
(0.00290155 0.531295 0)
(0.00274379 0.530042 0)
(0.00251231 0.528769 0)
(0.00221714 0.527583 0)
(0.00186859 0.526553 0)
(0.0014766 0.525733 0)
(0.0010517 0.525163 0)
(0.000605774 0.524861 0)
(0.000150422 0.524834 0)
(-0.000303474 0.525084 0)
(-0.000744945 0.5256 0)
(-0.00116285 0.526363 0)
(-0.00154613 0.527338 0)
(-0.00188395 0.528478 0)
(-0.00216579 0.52971 0)
(-0.0023816 0.530931 0)
(-0.00252002 0.531992 0)
(-0.00256952 0.53266 0)
(-0.00251906 0.532529 0)
(-0.00235323 0.530848 0)
(-0.00205704 0.525815 0)
(-0.00159889 0.511501 0)
(-0.000802146 0.457238 0)
(0.000790325 0.456534 0)
(0.00161798 0.511292 0)
(0.0021319 0.525838 0)
(0.0024882 0.53101 0)
(0.00271824 0.53279 0)
(0.00283564 0.532986 0)
(0.00285257 0.532384 0)
(0.00278011 0.531383 0)
(0.00262781 0.530202 0)
(0.00240387 0.528994 0)
(0.00211781 0.527862 0)
(0.00177952 0.526878 0)
(0.00139832 0.526094 0)
(0.000984859 0.525549 0)
(0.000551253 0.525261 0)
(0.000108837 0.525238 0)
(-0.000331702 0.525481 0)
(-0.000759462 0.52598 0)
(-0.00116345 0.526716 0)
(-0.00153286 0.527655 0)
(-0.00185716 0.528747 0)
(-0.00212625 0.529922 0)
(-0.00233048 0.531076 0)
(-0.00245917 0.532059 0)
(-0.00250155 0.532639 0)
(-0.00244736 0.532406 0)
(-0.00228212 0.530604 0)
(-0.00199151 0.525415 0)
(-0.0015422 0.510853 0)
(-0.000770343 0.456095 0)
(0.000747739 0.455399 0)
(0.00153377 0.510607 0)
(0.00202442 0.525384 0)
(0.00236369 0.530703 0)
(0.00258407 0.532598 0)
(0.00269802 0.532891 0)
(0.00271589 0.532376 0)
(0.00264811 0.53145 0)
(0.00250353 0.53034 0)
(0.00228926 0.529192 0)
(0.00201423 0.528112 0)
(0.00168763 0.527171 0)
(0.00131872 0.526422 0)
(0.000918317 0.525901 0)
(0.000498672 0.525626 0)
(7.05405e-05 0.525606 0)
(-0.000355339 0.525843 0)
(-0.000768047 0.526326 0)
(-0.00115668 0.527035 0)
(-0.00151061 0.527937 0)
(-0.00181958 0.528984 0)
(-0.00207386 0.530104 0)
(-0.00226417 0.531195 0)
(-0.00238084 0.532104 0)
(-0.00241425 0.532601 0)
(-0.00235522 0.532273 0)
(-0.00219083 0.530359 0)
(-0.00190801 0.525022 0)
(-0.00147213 0.510224 0)
(-0.000732313 0.455 0)
(0.000701062 0.454327 0)
(0.00143999 0.509954 0)
(0.00190398 0.524947 0)
(0.00222529 0.530401 0)
(0.0024369 0.532399 0)
(0.00254935 0.532781 0)
(0.00257056 0.532345 0)
(0.00250972 0.531489 0)
(0.00237484 0.530443 0)
(0.00217204 0.529353 0)
(0.00190945 0.528322 0)
(0.00159569 0.527423 0)
(0.00124017 0.526707 0)
(0.000854145 0.526208 0)
(0.000449168 0.525945 0)
(3.59249e-05 0.525929 0)
(-0.000374676 0.526159 0)
(-0.000771649 0.526625 0)
(-0.00114412 0.527309 0)
(-0.00148154 0.528176 0)
(-0.00177384 0.529179 0)
(-0.00201159 0.530248 0)
(-0.00218599 0.531279 0)
(-0.00228841 0.532119 0)
(-0.00231062 0.53254 0)
(-0.00224509 0.532126 0)
(-0.0020812 0.530109 0)
(-0.00180782 0.524636 0)
(-0.00138966 0.509619 0)
(-0.000688692 0.453961 0)
(0.000650438 0.453321 0)
(0.00133677 0.509336 0)
(0.00177237 0.524524 0)
(0.00207631 0.530096 0)
(0.00228138 0.532185 0)
(0.00239528 0.532644 0)
(0.00242287 0.532281 0)
(0.00237127 0.531488 0)
(0.00224753 0.530501 0)
(0.00205726 0.529464 0)
(0.00180773 0.52848 0)
(0.00150732 0.527621 0)
(0.00116575 0.526936 0)
(0.000794123 0.526458 0)
(0.000403552 0.526207 0)
(4.95748e-06 0.526193 0)
(-0.00039059 0.526416 0)
(-0.000772016 0.526866 0)
(-0.0011284 0.527525 0)
(-0.00144918 0.528359 0)
(-0.00172432 0.52932 0)
(-0.00194459 0.53034 0)
(-0.00210158 0.531315 0)
(-0.00218767 0.532093 0)
(-0.00219612 0.532445 0)
(-0.00212162 0.531955 0)
(-0.00195666 0.529849 0)
(-0.00169296 0.524257 0)
(-0.00129529 0.50904 0)
(-0.000639952 0.452981 0)
(0.000595154 0.452393 0)
(0.00122524 0.508753 0)
(0.00163287 0.524109 0)
(0.00192226 0.52978 0)
(0.00212488 0.531942 0)
(0.00224423 0.532467 0)
(0.00228158 0.532166 0)
(0.00224124 0.53143 0)
(0.00212931 0.530497 0)
(0.00195148 0.52951 0)
(0.0017145 0.52857 0)
(0.0014268 0.527748 0)
(0.00109826 0.527092 0)
(0.000739783 0.526634 0)
(0.00036244 0.526395 0)
(-2.2664e-05 0.526383 0)
(-0.000404351 0.5266 0)
(-0.000771458 0.527035 0)
(-0.00111297 0.527669 0)
(-0.00141819 0.52847 0)
(-0.00167697 0.529392 0)
(-0.00188 0.530365 0)
(-0.00201908 0.531288 0)
(-0.0020873 0.53201 0)
(-0.00207933 0.532302 0)
(-0.00199248 0.531748 0)
(-0.00182318 0.529569 0)
(-0.00156715 0.523878 0)
(-0.00119057 0.508489 0)
(-0.000585705 0.452075 0)
(0.000535737 0.451536 0)
(0.00110732 0.508198 0)
(0.00149114 0.523691 0)
(0.00177208 0.529434 0)
(0.00197839 0.531652 0)
(0.00210798 0.532229 0)
(0.00215794 0.531982 0)
(0.00212993 0.531298 0)
(0.00202925 0.530414 0)
(0.00186215 0.529473 0)
(0.00163551 0.528575 0)
(0.00135813 0.527788 0)
(0.00104017 0.52716 0)
(0.000692532 0.526722 0)
(0.000326313 0.526493 0)
(-4.73568e-05 0.526483 0)
(-0.000417317 0.526693 0)
(-0.000772407 0.527112 0)
(-0.00110153 0.527723 0)
(-0.00139378 0.528493 0)
(-0.00163869 0.529377 0)
(-0.00182656 0.530306 0)
(-0.00194893 0.531181 0)
(-0.00199904 0.531851 0)
(-0.00197252 0.532091 0)
(-0.00186928 0.531488 0)
(-0.00169031 0.529254 0)
(-0.00143668 0.523489 0)
(-0.00107792 0.50796 0)
(-0.000526748 0.451237 0)
(0.000471948 0.450761 0)
(0.000988536 0.507659 0)
(0.00135794 0.523247 0)
(0.0016399 0.529034 0)
(0.0018578 0.531288 0)
(0.00200205 0.531905 0)
(0.00206572 0.531706 0)
(0.00204875 0.53107 0)
(0.00195651 0.530231 0)
(0.00179607 0.529335 0)
(0.00157542 0.528476 0)
(0.00130428 0.527723 0)
(0.000993247 0.52712 0)
(0.0006533 0.5267 0)
(0.000295415 0.526481 0)
(-6.94999e-05 0.526473 0)
(-0.000430547 0.526676 0)
(-0.000776783 0.527081 0)
(-0.00109718 0.527669 0)
(-0.00138065 0.528409 0)
(-0.00161623 0.529256 0)
(-0.00179347 0.530142 0)
(-0.00190297 0.530971 0)
(-0.00193728 0.531594 0)
(-0.00189186 0.53179 0)
(-0.00176852 0.531148 0)
(-0.00157274 0.528879 0)
(-0.00131274 0.523069 0)
(-0.000963142 0.507441 0)
(-0.000463039 0.45048 0)
(0.000408601 0.450047 0)
(0.000878132 0.507109 0)
(0.00124941 0.522746 0)
(0.00154665 0.528545 0)
(0.00178439 0.530818 0)
(0.00194535 0.531468 0)
(0.00202001 0.531312 0)
(0.00200873 0.530722 0)
(0.00191819 0.529929 0)
(0.00175737 0.529075 0)
(0.00153637 0.528254 0)
(0.00126611 0.527532 0)
(0.000957689 0.526953 0)
(0.000621994 0.52655 0)
(0.000269578 0.52634 0)
(-8.9262e-05 0.526333 0)
(-0.000444284 0.52653 0)
(-0.000785146 0.526922 0)
(-0.0011012 0.527488 0)
(-0.00138139 0.528199 0)
(-0.00161426 0.52901 0)
(-0.00178829 0.529855 0)
(-0.00189248 0.530639 0)
(-0.00191743 0.531216 0)
(-0.0018566 0.531369 0)
(-0.0017118 0.530698 0)
(-0.00149166 0.52841 0)
(-0.0012116 0.522586 0)
(-0.00085561 0.506908 0)
(-0.000399567 0.449782 0)
(0.000353442 0.449393 0)
(0.000797967 0.506515 0)
(0.00119291 0.522138 0)
(0.00152091 0.527925 0)
(0.00178327 0.530208 0)
(0.00195699 0.530888 0)
(0.00203342 0.530777 0)
(0.00201638 0.530236 0)
(0.00191622 0.52949 0)
(0.00174528 0.528677 0)
(0.00151619 0.527892 0)
(0.00124107 0.527199 0)
(0.000931219 0.526642 0)
(0.000597012 0.526253 0)
(0.000248077 0.526051 0)
(-0.000106426 0.526046 0)
(-0.000457448 0.526237 0)
(-0.000795776 0.526616 0)
(-0.00111167 0.527163 0)
(-0.00139456 0.527847 0)
(-0.00163282 0.528624 0)
(-0.00181385 0.529427 0)
(-0.00192451 0.530165 0)
(-0.00195235 0.530694 0)
(-0.00188616 0.530802 0)
(-0.00172439 0.530103 0)
(-0.00147562 0.527805 0)
(-0.00116061 0.521992 0)
(-0.000777322 0.506327 0)
(-0.000344207 0.449142 0)
(0.000329118 0.448737 0)
(0.000773821 0.5058 0)
(0.00122486 0.521364 0)
(0.00159483 0.527126 0)
(0.00187754 0.529425 0)
(0.00204966 0.530146 0)
(0.00210947 0.530089 0)
(0.0020687 0.529601 0)
(0.00194385 0.528903 0)
(0.00175154 0.528132 0)
(0.00150669 0.527379 0)
(0.00122205 0.526711 0)
(0.000908404 0.526173 0)
(0.00057489 0.525796 0)
(0.000229539 0.525601 0)
(-0.000120249 0.525596 0)
(-0.000467217 0.525783 0)
(-0.000803908 0.526152 0)
(-0.00112218 0.526681 0)
(-0.0014127 0.527342 0)
(-0.00166441 0.528086 0)
(-0.00186422 0.52885 0)
(-0.00199693 0.529539 0)
(-0.00204624 0.530015 0)
(-0.00199368 0.530068 0)
(-0.00182955 0.529332 0)
(-0.00155679 0.527017 0)
(-0.00119642 0.521229 0)
(-0.000754384 0.505623 0)
(-0.000319748 0.4485 0)
(0.000355467 0.448034 0)
(0.000856502 0.504885 0)
(0.00138751 0.520359 0)
(0.00179648 0.52611 0)
(0.00207805 0.52845 0)
(0.00221963 0.529236 0)
(0.00223473 0.529246 0)
(0.00214735 0.528819 0)
(0.00198165 0.52817 0)
(0.00175805 0.527436 0)
(0.0014925 0.526713 0)
(0.00119702 0.526066 0)
(0.000880658 0.525542 0)
(0.000550412 0.525175 0)
(0.000212005 0.524984 0)
(-0.000129477 0.52498 0)
(-0.000469085 0.525163 0)
(-0.000801685 0.525524 0)
(-0.00112144 0.52604 0)
(-0.00142121 0.52668 0)
(-0.00169172 0.527397 0)
(-0.00192071 0.528123 0)
(-0.00209215 0.528763 0)
(-0.00218603 0.52918 0)
(-0.0021756 0.529162 0)
(-0.00203852 0.528365 0)
(-0.0017638 0.526009 0)
(-0.00136185 0.520232 0)
(-0.000837946 0.504717 0)
(-0.000346093 0.44781 0)
(0.000478784 0.447079 0)
(0.00109864 0.503644 0)
(0.00171232 0.519062 0)
(0.00213039 0.524861 0)
(0.00236561 0.527293 0)
(0.00243305 0.528176 0)
(0.00236971 0.528271 0)
(0.00221362 0.527908 0)
(0.00199541 0.527305 0)
(0.00173668 0.526604 0)
(0.00145179 0.525903 0)
(0.00114997 0.525271 0)
(0.000837135 0.524757 0)
(0.000517218 0.524396 0)
(0.000193163 0.524208 0)
(-0.000132529 0.524205 0)
(-0.00045743 0.524386 0)
(-0.000778998 0.524741 0)
(-0.0010942 0.525248 0)
(-0.00139896 0.525874 0)
(-0.00168722 0.526569 0)
(-0.0019496 0.527263 0)
(-0.00217169 0.527857 0)
(-0.00233215 0.52821 0)
(-0.00239838 0.528103 0)
(-0.0023333 0.527214 0)
(-0.0021023 0.524766 0)
(-0.00168908 0.518941 0)
(-0.00108104 0.503484 0)
(-0.000469629 0.446869 0)
(0.000764247 0.445787 0)
(0.00155657 0.502004 0)
(0.00219661 0.517466 0)
(0.00255008 0.523417 0)
(0.00266953 0.526008 0)
(0.00261286 0.527019 0)
(0.00244288 0.527208 0)
(0.00220763 0.526906 0)
(0.00193839 0.526342 0)
(0.00165276 0.525665 0)
(0.00135992 0.524979 0)
(0.00106415 0.524356 0)
(0.000767101 0.523849 0)
(0.000469253 0.523491 0)
(0.000170837 0.523306 0)
(-0.00012796 0.523303 0)
(-0.000426924 0.523483 0)
(-0.000725833 0.523834 0)
(-0.00102438 0.524336 0)
(-0.00132198 0.524953 0)
(-0.00161687 0.525633 0)
(-0.00190462 0.526303 0)
(-0.00217598 0.526859 0)
(-0.00241344 0.52715 0)
(-0.00258563 0.526948 0)
(-0.00264401 0.525931 0)
(-0.0025265 0.523325 0)
(-0.00217587 0.51735 0)
(-0.00154005 0.501851 0)
(-0.000755479 0.445589 0)
(0.00131162 0.443634 0)
(0.00219353 0.499876 0)
(0.00272971 0.515641 0)
(0.00291132 0.521885 0)
(0.00284506 0.524697 0)
(0.0026334 0.525853 0)
(0.00235579 0.526129 0)
(0.00205824 0.525877 0)
(0.00176191 0.52534 0)
(0.00147436 0.524678 0)
(0.00119668 0.524002 0)
(0.000927226 0.523386 0)
(0.00066338 0.522884 0)
(0.000402712 0.52253 0)
(0.000143622 0.522347 0)
(-0.000115068 0.522344 0)
(-0.000374461 0.522522 0)
(-0.000635707 0.52287 0)
(-0.000900346 0.523367 0)
(-0.00117073 0.523977 0)
(-0.00144938 0.524647 0)
(-0.00173781 0.525302 0)
(-0.00203486 0.52583 0)
(-0.00233304 0.526073 0)
(-0.00261232 0.525785 0)
(-0.00282527 0.524621 0)
(-0.00289191 0.521794 0)
(-0.00271156 0.515528 0)
(-0.00217842 0.499729 0)
(-0.00130347 0.443448 0)
(0.00192102 0.440766 0)
(0.00279971 0.497508 0)
(0.00302337 0.513834 0)
(0.00294834 0.520455 0)
(0.00269012 0.523492 0)
(0.00235947 0.52477 0)
(0.00202712 0.525105 0)
(0.00172218 0.524883 0)
(0.00144704 0.524364 0)
(0.00119654 0.523715 0)
(0.000964093 0.523048 0)
(0.000743765 0.522441 0)
(0.000530518 0.521947 0)
(0.00032065 0.521599 0)
(0.000112392 0.521419 0)
(-9.53691e-05 0.521416 0)
(-0.000303737 0.521591 0)
(-0.000513805 0.521934 0)
(-0.0007273 0.522423 0)
(-0.000947874 0.523024 0)
(-0.00118051 0.523684 0)
(-0.00143107 0.524326 0)
(-0.00170614 0.524837 0)
(-0.00201094 0.525049 0)
(-0.00234343 0.524705 0)
(-0.00267408 0.523416 0)
(-0.00293191 0.520364 0)
(-0.0030074 0.513722 0)
(-0.00278593 0.497366 0)
(-0.00191356 0.440589 0)
(0.00191875 0.436307 0)
(0.00264863 0.49509 0)
(0.00258688 0.512267 0)
(0.00232642 0.519277 0)
(0.00199881 0.522498 0)
(0.00168015 0.523869 0)
(0.00140772 0.524244 0)
(0.00118449 0.52405 0)
(0.000995572 0.523556 0)
(0.000827543 0.522931 0)
(0.000671492 0.522286 0)
(0.00052196 0.521698 0)
(0.000374636 0.521218 0)
(0.000226669 0.520881 0)
(7.81595e-05 0.520706 0)
(-7.04118e-05 0.520703 0)
(-0.000218885 0.520873 0)
(-0.00036677 0.521205 0)
(-0.000513944 0.521679 0)
(-0.000663242 0.522262 0)
(-0.000818961 0.5229 0)
(-0.000986585 0.523518 0)
(-0.00117508 0.524003 0)
(-0.00139778 0.524187 0)
(-0.00166863 0.523801 0)
(-0.00198541 0.522421 0)
(-0.00231201 0.519187 0)
(-0.00257279 0.512157 0)
(-0.00263636 0.494953 0)
(-0.0019121 0.436142 0)
(-3.33551e-05 0.433292 0)
(0.00111038 0.493342 0)
(0.00101057 0.511295 0)
(0.00086914 0.51868 0)
(0.000753786 0.522067 0)
(0.000659272 0.523545 0)
(0.000590626 0.523996 0)
(0.000538556 0.523869 0)
(0.000488228 0.523434 0)
(0.000431567 0.522863 0)
(0.000367169 0.522263 0)
(0.000296424 0.52171 0)
(0.00021906 0.521258 0)
(0.000134284 0.520939 0)
(4.52266e-05 0.520773 0)
(-4.47727e-05 0.520771 0)
(-0.000133696 0.520931 0)
(-0.0002182 0.521245 0)
(-0.000295152 0.521691 0)
(-0.000365346 0.522238 0)
(-0.000429073 0.522832 0)
(-0.000484995 0.523395 0)
(-0.000534562 0.523822 0)
(-0.000585556 0.523938 0)
(-0.000651708 0.523473 0)
(-0.000743461 0.521987 0)
(-0.000857066 0.518589 0)
(-0.000998352 0.511185 0)
(-0.00109945 0.493207 0)
(3.9225e-05 0.433133 0)
(-0.00362717 0.434466 0)
(-0.0011752 0.492988 0)
(-0.0009955 0.51178 0)
(-0.000696359 0.519576 0)
(-0.00043492 0.523191 0)
(-0.000229454 0.524841 0)
(-7.14993e-05 0.525441 0)
(4.20141e-05 0.525439 0)
(0.000112731 0.525112 0)
(0.000145811 0.524625 0)
(0.000148833 0.524092 0)
(0.000134162 0.523581 0)
(0.00010703 0.523165 0)
(6.86195e-05 0.52287 0)
(2.23514e-05 0.522715 0)
(-2.67902e-05 0.522712 0)
(-7.28751e-05 0.522861 0)
(-0.000110915 0.523151 0)
(-0.000137502 0.523562 0)
(-0.000151462 0.524066 0)
(-0.000147587 0.524593 0)
(-0.000113543 0.525072 0)
(-4.17629e-05 0.52539 0)
(7.30881e-05 0.525381 0)
(0.000233145 0.524767 0)
(0.000441431 0.523109 0)
(0.000704499 0.519484 0)
(0.00100425 0.511671 0)
(0.00118332 0.492858 0)
(0.0036315 0.434319 0)
)
;
boundaryField
{
inlet
{
type calculated;
value nonuniform List<vector>
30
(
(0 0.428197 0)
(0 0.431314 0)
(0 0.430471 0)
(0 0.430556 0)
(0 0.430346 0)
(0 0.430518 0)
(0 0.430484 0)
(0 0.429402 0)
(0 0.427435 0)
(0 0.425112 0)
(0 0.423549 0)
(0 0.422099 0)
(0 0.420469 0)
(0 0.419316 0)
(0 0.418429 0)
(0 0.418425 0)
(0 0.419012 0)
(0 0.420101 0)
(0 0.421283 0)
(0 0.422771 0)
(0 0.424009 0)
(0 0.42631 0)
(0 0.428861 0)
(0 0.43006 0)
(0 0.430277 0)
(0 0.430368 0)
(0 0.430761 0)
(0 0.430612 0)
(0 0.431498 0)
(0 0.427644 0)
)
;
}
outlet
{
type calculated;
value nonuniform List<vector>
30
(
(-0.00128286 0.434466 0)
(-0.00156231 0.492988 0)
(-0.00124685 0.51178 0)
(-0.000908706 0.519576 0)
(-0.000588465 0.523191 0)
(-0.000327032 0.524841 0)
(-0.000130311 0.525441 0)
(7.06382e-06 0.525439 0)
(9.18827e-05 0.525112 0)
(0.000133166 0.524625 0)
(0.000140982 0.524092 0)
(0.000129216 0.523581 0)
(0.000103979 0.523165 0)
(6.6949e-05 0.52287 0)
(2.16253e-05 0.522715 0)
(-2.6063e-05 0.522712 0)
(-7.12021e-05 0.522861 0)
(-0.000107864 0.523151 0)
(-0.000132555 0.523562 0)
(-0.00014361 0.524066 0)
(-0.000134938 0.524593 0)
(-9.26914e-05 0.525072 0)
(-6.81213e-06 0.52539 0)
(0.000131901 0.525381 0)
(0.000330728 0.524767 0)
(0.000594977 0.523109 0)
(0.000916844 0.519484 0)
(0.0012556 0.511671 0)
(0.00157041 0.492858 0)
(0.00128717 0.434319 0)
)
;
}
walls
{
type calculated;
value uniform (0 0 0);
}
frontAndBackPlanes
{
type empty;
}
}
// ************************************************************************* //
|
47015ba1b24bdb90288e020b7944b29fe7191a75 | 973a5b27a46642b1518a5a6ade1522d47d1716d5 | /src/module/person/module.h | aaf6a4f695bf21a564b48a0d7f49c23ddc77995f | [] | no_license | cnsuhao/computer-game | 5e031db045eec25ce0227722d0b41d6b75a5f243 | 578d61de77ecee9245b79574418025f18bd059b9 | refs/heads/master | 2021-05-29T22:46:25.743952 | 2015-10-22T09:05:30 | 2015-10-22T09:07:25 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 878 | h | module.h | #pragma once
#include "system/system.h"
#define GLM_FORCE_RADIANS
#include <glm/glm.hpp>
#include <bullet/btBulletDynamicsCommon.h>
#include "type/form/type.h"
class ModulePerson : public Module
{
// general
void Init();
void Update();
void Listeners();
void Callbacks();
// create
void Setup(uint64_t Id);
// movement
void Move(uint64_t Id, glm::vec3 Amount, float Multiplier = 4.3f);
void Jump(uint64_t Id, float Multiplier = 5.0f, bool Force = false);
// checks
static btVector3 Zero;
bool Ground(uint64_t Id);
bool Edge(uint64_t Id, glm::vec3 Direction);
std::pair<bool, float> RayDown(btVector3 &Position, float Length);
bool Ray(btVector3 &From, btVector3 &To, btVector3 &Point = Zero, btVector3 &Normal = Zero);
// save
void Load();
void Save();
public:
// callbacks
static void jsPlayer(const v8::FunctionCallbackInfo<v8::Value> &args);
};
|
c3a94406223b3006ff4b69d2c1f2cd4048faee87 | 47e535a61f47b2ff20d4bb13a28f9c8175e185ae | /Homework3/kernels/kernel7/prj_kernel7/solution4/syn/systemc/kernel7_20.cpp | bfa9d65570ab9e4656805a63afd8079136a9645a | [] | no_license | frblazquez/ACA | cd4242f9ced1f7f0869004b2eb5c7f87b3c807b6 | b19f2b68cafe3709d8f70547ad3045715f9965a7 | refs/heads/master | 2023-09-01T14:11:03.191348 | 2021-06-22T18:42:22 | 2021-10-12T18:42:22 | 352,540,818 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 127,326 | cpp | kernel7_20.cpp | #include "kernel7.h"
#include "AESL_pkg.h"
using namespace std;
namespace ap_rtl {
void kernel7::thread_tmp_1845_fu_75901_p4() {
tmp_1845_fu_75901_p4 = bitcast_ln8_1230_fu_75897_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1846_fu_75919_p4() {
tmp_1846_fu_75919_p4 = bitcast_ln8_1231_fu_75915_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1848_fu_75991_p4() {
tmp_1848_fu_75991_p4 = bitcast_ln8_1232_fu_75987_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1849_fu_76009_p4() {
tmp_1849_fu_76009_p4 = bitcast_ln8_1233_fu_76005_p1.read().range(30, 23);
}
void kernel7::thread_tmp_184_fu_26061_p4() {
tmp_184_fu_26061_p4 = bitcast_ln8_123_fu_26057_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1851_fu_76081_p4() {
tmp_1851_fu_76081_p4 = bitcast_ln8_1234_fu_76077_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1852_fu_76099_p4() {
tmp_1852_fu_76099_p4 = bitcast_ln8_1235_fu_76095_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1854_fu_76171_p4() {
tmp_1854_fu_76171_p4 = bitcast_ln8_1236_fu_76167_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1855_fu_76189_p4() {
tmp_1855_fu_76189_p4 = bitcast_ln8_1237_fu_76185_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1857_fu_76261_p4() {
tmp_1857_fu_76261_p4 = bitcast_ln8_1238_fu_76257_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1858_fu_76279_p4() {
tmp_1858_fu_76279_p4 = bitcast_ln8_1239_fu_76275_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1860_fu_76351_p4() {
tmp_1860_fu_76351_p4 = bitcast_ln8_1240_fu_76347_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1861_fu_76369_p4() {
tmp_1861_fu_76369_p4 = bitcast_ln8_1241_fu_76365_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1863_fu_76441_p4() {
tmp_1863_fu_76441_p4 = bitcast_ln8_1242_fu_76437_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1864_fu_76459_p4() {
tmp_1864_fu_76459_p4 = bitcast_ln8_1243_fu_76455_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1866_fu_76531_p4() {
tmp_1866_fu_76531_p4 = bitcast_ln8_1244_fu_76527_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1867_fu_76549_p4() {
tmp_1867_fu_76549_p4 = bitcast_ln8_1245_fu_76545_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1869_fu_76621_p4() {
tmp_1869_fu_76621_p4 = bitcast_ln8_1246_fu_76617_p1.read().range(30, 23);
}
void kernel7::thread_tmp_186_fu_26133_p4() {
tmp_186_fu_26133_p4 = bitcast_ln8_124_fu_26129_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1870_fu_76639_p4() {
tmp_1870_fu_76639_p4 = bitcast_ln8_1247_fu_76635_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1872_fu_76711_p4() {
tmp_1872_fu_76711_p4 = bitcast_ln8_1248_fu_76707_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1873_fu_76729_p4() {
tmp_1873_fu_76729_p4 = bitcast_ln8_1249_fu_76725_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1875_fu_76801_p4() {
tmp_1875_fu_76801_p4 = bitcast_ln8_1250_fu_76797_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1876_fu_76819_p4() {
tmp_1876_fu_76819_p4 = bitcast_ln8_1251_fu_76815_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1878_fu_76891_p4() {
tmp_1878_fu_76891_p4 = bitcast_ln8_1252_fu_76887_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1879_fu_76909_p4() {
tmp_1879_fu_76909_p4 = bitcast_ln8_1253_fu_76905_p1.read().range(30, 23);
}
void kernel7::thread_tmp_187_fu_26151_p4() {
tmp_187_fu_26151_p4 = bitcast_ln8_125_fu_26147_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1881_fu_76981_p4() {
tmp_1881_fu_76981_p4 = bitcast_ln8_1254_fu_76977_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1882_fu_76999_p4() {
tmp_1882_fu_76999_p4 = bitcast_ln8_1255_fu_76995_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1884_fu_77071_p4() {
tmp_1884_fu_77071_p4 = bitcast_ln8_1256_fu_77067_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1885_fu_77089_p4() {
tmp_1885_fu_77089_p4 = bitcast_ln8_1257_fu_77085_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1887_fu_77161_p4() {
tmp_1887_fu_77161_p4 = bitcast_ln8_1258_fu_77157_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1888_fu_77179_p4() {
tmp_1888_fu_77179_p4 = bitcast_ln8_1259_fu_77175_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1890_fu_77251_p4() {
tmp_1890_fu_77251_p4 = bitcast_ln8_1260_fu_77247_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1891_fu_77269_p4() {
tmp_1891_fu_77269_p4 = bitcast_ln8_1261_fu_77265_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1893_fu_77341_p4() {
tmp_1893_fu_77341_p4 = bitcast_ln8_1262_fu_77337_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1894_fu_77359_p4() {
tmp_1894_fu_77359_p4 = bitcast_ln8_1263_fu_77355_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1896_fu_77431_p4() {
tmp_1896_fu_77431_p4 = bitcast_ln8_1264_fu_77427_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1897_fu_77449_p4() {
tmp_1897_fu_77449_p4 = bitcast_ln8_1265_fu_77445_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1899_fu_77521_p4() {
tmp_1899_fu_77521_p4 = bitcast_ln8_1266_fu_77517_p1.read().range(30, 23);
}
void kernel7::thread_tmp_189_fu_26223_p4() {
tmp_189_fu_26223_p4 = bitcast_ln8_126_fu_26219_p1.read().range(30, 23);
}
void kernel7::thread_tmp_18_fu_21093_p4() {
tmp_18_fu_21093_p4 = bitcast_ln8_12_fu_21089_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1900_fu_77539_p4() {
tmp_1900_fu_77539_p4 = bitcast_ln8_1267_fu_77535_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1902_fu_77611_p4() {
tmp_1902_fu_77611_p4 = bitcast_ln8_1268_fu_77607_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1903_fu_77629_p4() {
tmp_1903_fu_77629_p4 = bitcast_ln8_1269_fu_77625_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1905_fu_77701_p4() {
tmp_1905_fu_77701_p4 = bitcast_ln8_1270_fu_77697_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1906_fu_77719_p4() {
tmp_1906_fu_77719_p4 = bitcast_ln8_1271_fu_77715_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1908_fu_77791_p4() {
tmp_1908_fu_77791_p4 = bitcast_ln8_1272_fu_77787_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1909_fu_77809_p4() {
tmp_1909_fu_77809_p4 = bitcast_ln8_1273_fu_77805_p1.read().range(30, 23);
}
void kernel7::thread_tmp_190_fu_26241_p4() {
tmp_190_fu_26241_p4 = bitcast_ln8_127_fu_26237_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1911_fu_77881_p4() {
tmp_1911_fu_77881_p4 = bitcast_ln8_1274_fu_77877_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1912_fu_77899_p4() {
tmp_1912_fu_77899_p4 = bitcast_ln8_1275_fu_77895_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1914_fu_77971_p4() {
tmp_1914_fu_77971_p4 = bitcast_ln8_1276_fu_77967_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1915_fu_77989_p4() {
tmp_1915_fu_77989_p4 = bitcast_ln8_1277_fu_77985_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1917_fu_78061_p4() {
tmp_1917_fu_78061_p4 = bitcast_ln8_1278_fu_78057_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1918_fu_78079_p4() {
tmp_1918_fu_78079_p4 = bitcast_ln8_1279_fu_78075_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1920_fu_78151_p4() {
tmp_1920_fu_78151_p4 = bitcast_ln8_1280_fu_78147_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1921_fu_78169_p4() {
tmp_1921_fu_78169_p4 = bitcast_ln8_1281_fu_78165_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1923_fu_78241_p4() {
tmp_1923_fu_78241_p4 = bitcast_ln8_1282_fu_78237_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1924_fu_78259_p4() {
tmp_1924_fu_78259_p4 = bitcast_ln8_1283_fu_78255_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1926_fu_78331_p4() {
tmp_1926_fu_78331_p4 = bitcast_ln8_1284_fu_78327_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1927_fu_78349_p4() {
tmp_1927_fu_78349_p4 = bitcast_ln8_1285_fu_78345_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1929_fu_78421_p4() {
tmp_1929_fu_78421_p4 = bitcast_ln8_1286_fu_78417_p1.read().range(30, 23);
}
void kernel7::thread_tmp_192_fu_26313_p4() {
tmp_192_fu_26313_p4 = bitcast_ln8_128_fu_26309_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1930_fu_78439_p4() {
tmp_1930_fu_78439_p4 = bitcast_ln8_1287_fu_78435_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1932_fu_78511_p4() {
tmp_1932_fu_78511_p4 = bitcast_ln8_1288_fu_78507_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1933_fu_78529_p4() {
tmp_1933_fu_78529_p4 = bitcast_ln8_1289_fu_78525_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1935_fu_78601_p4() {
tmp_1935_fu_78601_p4 = bitcast_ln8_1290_fu_78597_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1936_fu_78619_p4() {
tmp_1936_fu_78619_p4 = bitcast_ln8_1291_fu_78615_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1938_fu_78691_p4() {
tmp_1938_fu_78691_p4 = bitcast_ln8_1292_fu_78687_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1939_fu_78709_p4() {
tmp_1939_fu_78709_p4 = bitcast_ln8_1293_fu_78705_p1.read().range(30, 23);
}
void kernel7::thread_tmp_193_fu_26331_p4() {
tmp_193_fu_26331_p4 = bitcast_ln8_129_fu_26327_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1941_fu_78781_p4() {
tmp_1941_fu_78781_p4 = bitcast_ln8_1294_fu_78777_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1942_fu_78799_p4() {
tmp_1942_fu_78799_p4 = bitcast_ln8_1295_fu_78795_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1944_fu_78871_p4() {
tmp_1944_fu_78871_p4 = bitcast_ln8_1296_fu_78867_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1945_fu_78889_p4() {
tmp_1945_fu_78889_p4 = bitcast_ln8_1297_fu_78885_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1947_fu_78961_p4() {
tmp_1947_fu_78961_p4 = bitcast_ln8_1298_fu_78957_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1948_fu_78979_p4() {
tmp_1948_fu_78979_p4 = bitcast_ln8_1299_fu_78975_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1950_fu_79051_p4() {
tmp_1950_fu_79051_p4 = bitcast_ln8_1300_fu_79047_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1951_fu_79069_p4() {
tmp_1951_fu_79069_p4 = bitcast_ln8_1301_fu_79065_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1953_fu_79141_p4() {
tmp_1953_fu_79141_p4 = bitcast_ln8_1302_fu_79137_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1954_fu_79159_p4() {
tmp_1954_fu_79159_p4 = bitcast_ln8_1303_fu_79155_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1956_fu_79231_p4() {
tmp_1956_fu_79231_p4 = bitcast_ln8_1304_fu_79227_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1957_fu_79249_p4() {
tmp_1957_fu_79249_p4 = bitcast_ln8_1305_fu_79245_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1959_fu_79321_p4() {
tmp_1959_fu_79321_p4 = bitcast_ln8_1306_fu_79317_p1.read().range(30, 23);
}
void kernel7::thread_tmp_195_fu_26403_p4() {
tmp_195_fu_26403_p4 = bitcast_ln8_130_fu_26399_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1960_fu_79339_p4() {
tmp_1960_fu_79339_p4 = bitcast_ln8_1307_fu_79335_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1962_fu_79411_p4() {
tmp_1962_fu_79411_p4 = bitcast_ln8_1308_fu_79407_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1963_fu_79429_p4() {
tmp_1963_fu_79429_p4 = bitcast_ln8_1309_fu_79425_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1965_fu_79501_p4() {
tmp_1965_fu_79501_p4 = bitcast_ln8_1310_fu_79497_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1966_fu_79519_p4() {
tmp_1966_fu_79519_p4 = bitcast_ln8_1311_fu_79515_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1968_fu_79591_p4() {
tmp_1968_fu_79591_p4 = bitcast_ln8_1312_fu_79587_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1969_fu_79609_p4() {
tmp_1969_fu_79609_p4 = bitcast_ln8_1313_fu_79605_p1.read().range(30, 23);
}
void kernel7::thread_tmp_196_fu_26421_p4() {
tmp_196_fu_26421_p4 = bitcast_ln8_131_fu_26417_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1971_fu_79681_p4() {
tmp_1971_fu_79681_p4 = bitcast_ln8_1314_fu_79677_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1972_fu_79699_p4() {
tmp_1972_fu_79699_p4 = bitcast_ln8_1315_fu_79695_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1974_fu_79771_p4() {
tmp_1974_fu_79771_p4 = bitcast_ln8_1316_fu_79767_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1975_fu_79789_p4() {
tmp_1975_fu_79789_p4 = bitcast_ln8_1317_fu_79785_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1977_fu_79861_p4() {
tmp_1977_fu_79861_p4 = bitcast_ln8_1318_fu_79857_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1978_fu_79879_p4() {
tmp_1978_fu_79879_p4 = bitcast_ln8_1319_fu_79875_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1980_fu_79951_p4() {
tmp_1980_fu_79951_p4 = bitcast_ln8_1320_fu_79947_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1981_fu_79969_p4() {
tmp_1981_fu_79969_p4 = bitcast_ln8_1321_fu_79965_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1983_fu_80041_p4() {
tmp_1983_fu_80041_p4 = bitcast_ln8_1322_fu_80037_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1984_fu_80059_p4() {
tmp_1984_fu_80059_p4 = bitcast_ln8_1323_fu_80055_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1986_fu_80131_p4() {
tmp_1986_fu_80131_p4 = bitcast_ln8_1324_fu_80127_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1987_fu_80149_p4() {
tmp_1987_fu_80149_p4 = bitcast_ln8_1325_fu_80145_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1989_fu_80221_p4() {
tmp_1989_fu_80221_p4 = bitcast_ln8_1326_fu_80217_p1.read().range(30, 23);
}
void kernel7::thread_tmp_198_fu_26493_p4() {
tmp_198_fu_26493_p4 = bitcast_ln8_132_fu_26489_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1990_fu_80239_p4() {
tmp_1990_fu_80239_p4 = bitcast_ln8_1327_fu_80235_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1992_fu_80311_p4() {
tmp_1992_fu_80311_p4 = bitcast_ln8_1328_fu_80307_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1993_fu_80329_p4() {
tmp_1993_fu_80329_p4 = bitcast_ln8_1329_fu_80325_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1995_fu_80401_p4() {
tmp_1995_fu_80401_p4 = bitcast_ln8_1330_fu_80397_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1996_fu_80419_p4() {
tmp_1996_fu_80419_p4 = bitcast_ln8_1331_fu_80415_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1998_fu_80491_p4() {
tmp_1998_fu_80491_p4 = bitcast_ln8_1332_fu_80487_p1.read().range(30, 23);
}
void kernel7::thread_tmp_1999_fu_80509_p4() {
tmp_1999_fu_80509_p4 = bitcast_ln8_1333_fu_80505_p1.read().range(30, 23);
}
void kernel7::thread_tmp_199_fu_26511_p4() {
tmp_199_fu_26511_p4 = bitcast_ln8_133_fu_26507_p1.read().range(30, 23);
}
void kernel7::thread_tmp_19_fu_21111_p4() {
tmp_19_fu_21111_p4 = bitcast_ln8_13_fu_21107_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2001_fu_80581_p4() {
tmp_2001_fu_80581_p4 = bitcast_ln8_1334_fu_80577_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2002_fu_80599_p4() {
tmp_2002_fu_80599_p4 = bitcast_ln8_1335_fu_80595_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2004_fu_80671_p4() {
tmp_2004_fu_80671_p4 = bitcast_ln8_1336_fu_80667_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2005_fu_80689_p4() {
tmp_2005_fu_80689_p4 = bitcast_ln8_1337_fu_80685_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2007_fu_80761_p4() {
tmp_2007_fu_80761_p4 = bitcast_ln8_1338_fu_80757_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2008_fu_80779_p4() {
tmp_2008_fu_80779_p4 = bitcast_ln8_1339_fu_80775_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2010_fu_80851_p4() {
tmp_2010_fu_80851_p4 = bitcast_ln8_1340_fu_80847_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2011_fu_80869_p4() {
tmp_2011_fu_80869_p4 = bitcast_ln8_1341_fu_80865_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2013_fu_80941_p4() {
tmp_2013_fu_80941_p4 = bitcast_ln8_1342_fu_80937_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2014_fu_80959_p4() {
tmp_2014_fu_80959_p4 = bitcast_ln8_1343_fu_80955_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2016_fu_81031_p4() {
tmp_2016_fu_81031_p4 = bitcast_ln8_1344_fu_81027_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2017_fu_81049_p4() {
tmp_2017_fu_81049_p4 = bitcast_ln8_1345_fu_81045_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2019_fu_81121_p4() {
tmp_2019_fu_81121_p4 = bitcast_ln8_1346_fu_81117_p1.read().range(30, 23);
}
void kernel7::thread_tmp_201_fu_26583_p4() {
tmp_201_fu_26583_p4 = bitcast_ln8_134_fu_26579_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2020_fu_81139_p4() {
tmp_2020_fu_81139_p4 = bitcast_ln8_1347_fu_81135_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2022_fu_81211_p4() {
tmp_2022_fu_81211_p4 = bitcast_ln8_1348_fu_81207_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2023_fu_81229_p4() {
tmp_2023_fu_81229_p4 = bitcast_ln8_1349_fu_81225_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2025_fu_81301_p4() {
tmp_2025_fu_81301_p4 = bitcast_ln8_1350_fu_81297_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2026_fu_81319_p4() {
tmp_2026_fu_81319_p4 = bitcast_ln8_1351_fu_81315_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2028_fu_81391_p4() {
tmp_2028_fu_81391_p4 = bitcast_ln8_1352_fu_81387_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2029_fu_81409_p4() {
tmp_2029_fu_81409_p4 = bitcast_ln8_1353_fu_81405_p1.read().range(30, 23);
}
void kernel7::thread_tmp_202_fu_26601_p4() {
tmp_202_fu_26601_p4 = bitcast_ln8_135_fu_26597_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2031_fu_81481_p4() {
tmp_2031_fu_81481_p4 = bitcast_ln8_1354_fu_81477_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2032_fu_81499_p4() {
tmp_2032_fu_81499_p4 = bitcast_ln8_1355_fu_81495_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2034_fu_81571_p4() {
tmp_2034_fu_81571_p4 = bitcast_ln8_1356_fu_81567_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2035_fu_81589_p4() {
tmp_2035_fu_81589_p4 = bitcast_ln8_1357_fu_81585_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2037_fu_81661_p4() {
tmp_2037_fu_81661_p4 = bitcast_ln8_1358_fu_81657_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2038_fu_81679_p4() {
tmp_2038_fu_81679_p4 = bitcast_ln8_1359_fu_81675_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2040_fu_81751_p4() {
tmp_2040_fu_81751_p4 = bitcast_ln8_1360_fu_81747_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2041_fu_81769_p4() {
tmp_2041_fu_81769_p4 = bitcast_ln8_1361_fu_81765_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2043_fu_81841_p4() {
tmp_2043_fu_81841_p4 = bitcast_ln8_1362_fu_81837_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2044_fu_81859_p4() {
tmp_2044_fu_81859_p4 = bitcast_ln8_1363_fu_81855_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2046_fu_81931_p4() {
tmp_2046_fu_81931_p4 = bitcast_ln8_1364_fu_81927_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2047_fu_81949_p4() {
tmp_2047_fu_81949_p4 = bitcast_ln8_1365_fu_81945_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2049_fu_82021_p4() {
tmp_2049_fu_82021_p4 = bitcast_ln8_1366_fu_82017_p1.read().range(30, 23);
}
void kernel7::thread_tmp_204_fu_26673_p4() {
tmp_204_fu_26673_p4 = bitcast_ln8_136_fu_26669_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2050_fu_82039_p4() {
tmp_2050_fu_82039_p4 = bitcast_ln8_1367_fu_82035_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2052_fu_82111_p4() {
tmp_2052_fu_82111_p4 = bitcast_ln8_1368_fu_82107_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2053_fu_82129_p4() {
tmp_2053_fu_82129_p4 = bitcast_ln8_1369_fu_82125_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2055_fu_82201_p4() {
tmp_2055_fu_82201_p4 = bitcast_ln8_1370_fu_82197_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2056_fu_82219_p4() {
tmp_2056_fu_82219_p4 = bitcast_ln8_1371_fu_82215_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2058_fu_82291_p4() {
tmp_2058_fu_82291_p4 = bitcast_ln8_1372_fu_82287_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2059_fu_82309_p4() {
tmp_2059_fu_82309_p4 = bitcast_ln8_1373_fu_82305_p1.read().range(30, 23);
}
void kernel7::thread_tmp_205_fu_26691_p4() {
tmp_205_fu_26691_p4 = bitcast_ln8_137_fu_26687_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2061_fu_82411_p4() {
tmp_2061_fu_82411_p4 = bitcast_ln8_1374_fu_82407_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2062_fu_82375_p4() {
tmp_2062_fu_82375_p4 = bitcast_ln8_1375_fu_82371_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2064_fu_82469_p4() {
tmp_2064_fu_82469_p4 = bitcast_ln8_1376_fu_82465_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2065_fu_82487_p4() {
tmp_2065_fu_82487_p4 = bitcast_ln8_1377_fu_82483_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2067_fu_82559_p4() {
tmp_2067_fu_82559_p4 = bitcast_ln8_1378_fu_82555_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2068_fu_82577_p4() {
tmp_2068_fu_82577_p4 = bitcast_ln8_1379_fu_82573_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2070_fu_82649_p4() {
tmp_2070_fu_82649_p4 = bitcast_ln8_1380_fu_82645_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2071_fu_82667_p4() {
tmp_2071_fu_82667_p4 = bitcast_ln8_1381_fu_82663_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2073_fu_82739_p4() {
tmp_2073_fu_82739_p4 = bitcast_ln8_1382_fu_82735_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2074_fu_82757_p4() {
tmp_2074_fu_82757_p4 = bitcast_ln8_1383_fu_82753_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2076_fu_82829_p4() {
tmp_2076_fu_82829_p4 = bitcast_ln8_1384_fu_82825_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2077_fu_82847_p4() {
tmp_2077_fu_82847_p4 = bitcast_ln8_1385_fu_82843_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2079_fu_82919_p4() {
tmp_2079_fu_82919_p4 = bitcast_ln8_1386_fu_82915_p1.read().range(30, 23);
}
void kernel7::thread_tmp_207_fu_26763_p4() {
tmp_207_fu_26763_p4 = bitcast_ln8_138_fu_26759_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2080_fu_82937_p4() {
tmp_2080_fu_82937_p4 = bitcast_ln8_1387_fu_82933_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2082_fu_83009_p4() {
tmp_2082_fu_83009_p4 = bitcast_ln8_1388_fu_83005_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2083_fu_83027_p4() {
tmp_2083_fu_83027_p4 = bitcast_ln8_1389_fu_83023_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2085_fu_83099_p4() {
tmp_2085_fu_83099_p4 = bitcast_ln8_1390_fu_83095_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2086_fu_83117_p4() {
tmp_2086_fu_83117_p4 = bitcast_ln8_1391_fu_83113_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2088_fu_83189_p4() {
tmp_2088_fu_83189_p4 = bitcast_ln8_1392_fu_83185_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2089_fu_83207_p4() {
tmp_2089_fu_83207_p4 = bitcast_ln8_1393_fu_83203_p1.read().range(30, 23);
}
void kernel7::thread_tmp_208_fu_26781_p4() {
tmp_208_fu_26781_p4 = bitcast_ln8_139_fu_26777_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2091_fu_83279_p4() {
tmp_2091_fu_83279_p4 = bitcast_ln8_1394_fu_83275_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2092_fu_83297_p4() {
tmp_2092_fu_83297_p4 = bitcast_ln8_1395_fu_83293_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2094_fu_83369_p4() {
tmp_2094_fu_83369_p4 = bitcast_ln8_1396_fu_83365_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2095_fu_83387_p4() {
tmp_2095_fu_83387_p4 = bitcast_ln8_1397_fu_83383_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2097_fu_83459_p4() {
tmp_2097_fu_83459_p4 = bitcast_ln8_1398_fu_83455_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2098_fu_83477_p4() {
tmp_2098_fu_83477_p4 = bitcast_ln8_1399_fu_83473_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2100_fu_83549_p4() {
tmp_2100_fu_83549_p4 = bitcast_ln8_1400_fu_83545_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2101_fu_83567_p4() {
tmp_2101_fu_83567_p4 = bitcast_ln8_1401_fu_83563_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2103_fu_83639_p4() {
tmp_2103_fu_83639_p4 = bitcast_ln8_1402_fu_83635_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2104_fu_83657_p4() {
tmp_2104_fu_83657_p4 = bitcast_ln8_1403_fu_83653_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2106_fu_83729_p4() {
tmp_2106_fu_83729_p4 = bitcast_ln8_1404_fu_83725_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2107_fu_83747_p4() {
tmp_2107_fu_83747_p4 = bitcast_ln8_1405_fu_83743_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2109_fu_83819_p4() {
tmp_2109_fu_83819_p4 = bitcast_ln8_1406_fu_83815_p1.read().range(30, 23);
}
void kernel7::thread_tmp_210_fu_26853_p4() {
tmp_210_fu_26853_p4 = bitcast_ln8_140_fu_26849_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2110_fu_83837_p4() {
tmp_2110_fu_83837_p4 = bitcast_ln8_1407_fu_83833_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2112_fu_83909_p4() {
tmp_2112_fu_83909_p4 = bitcast_ln8_1408_fu_83905_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2113_fu_83927_p4() {
tmp_2113_fu_83927_p4 = bitcast_ln8_1409_fu_83923_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2115_fu_83999_p4() {
tmp_2115_fu_83999_p4 = bitcast_ln8_1410_fu_83995_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2116_fu_84017_p4() {
tmp_2116_fu_84017_p4 = bitcast_ln8_1411_fu_84013_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2118_fu_84089_p4() {
tmp_2118_fu_84089_p4 = bitcast_ln8_1412_fu_84085_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2119_fu_84107_p4() {
tmp_2119_fu_84107_p4 = bitcast_ln8_1413_fu_84103_p1.read().range(30, 23);
}
void kernel7::thread_tmp_211_fu_26871_p4() {
tmp_211_fu_26871_p4 = bitcast_ln8_141_fu_26867_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2121_fu_84179_p4() {
tmp_2121_fu_84179_p4 = bitcast_ln8_1414_fu_84175_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2122_fu_84197_p4() {
tmp_2122_fu_84197_p4 = bitcast_ln8_1415_fu_84193_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2124_fu_84269_p4() {
tmp_2124_fu_84269_p4 = bitcast_ln8_1416_fu_84265_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2125_fu_84287_p4() {
tmp_2125_fu_84287_p4 = bitcast_ln8_1417_fu_84283_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2127_fu_84389_p4() {
tmp_2127_fu_84389_p4 = bitcast_ln8_1418_fu_84385_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2128_fu_84353_p4() {
tmp_2128_fu_84353_p4 = bitcast_ln8_1419_fu_84349_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2130_fu_84441_p4() {
tmp_2130_fu_84441_p4 = bitcast_ln8_1420_fu_84437_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2131_fu_84477_p4() {
tmp_2131_fu_84477_p4 = bitcast_ln8_1421_fu_84473_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2133_fu_84535_p4() {
tmp_2133_fu_84535_p4 = bitcast_ln8_1422_fu_84531_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2134_fu_84553_p4() {
tmp_2134_fu_84553_p4 = bitcast_ln8_1423_fu_84549_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2136_fu_84625_p4() {
tmp_2136_fu_84625_p4 = bitcast_ln8_1424_fu_84621_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2137_fu_84643_p4() {
tmp_2137_fu_84643_p4 = bitcast_ln8_1425_fu_84639_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2139_fu_84715_p4() {
tmp_2139_fu_84715_p4 = bitcast_ln8_1426_fu_84711_p1.read().range(30, 23);
}
void kernel7::thread_tmp_213_fu_26943_p4() {
tmp_213_fu_26943_p4 = bitcast_ln8_142_fu_26939_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2140_fu_84733_p4() {
tmp_2140_fu_84733_p4 = bitcast_ln8_1427_fu_84729_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2142_fu_84805_p4() {
tmp_2142_fu_84805_p4 = bitcast_ln8_1428_fu_84801_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2143_fu_84823_p4() {
tmp_2143_fu_84823_p4 = bitcast_ln8_1429_fu_84819_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2145_fu_84895_p4() {
tmp_2145_fu_84895_p4 = bitcast_ln8_1430_fu_84891_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2146_fu_84913_p4() {
tmp_2146_fu_84913_p4 = bitcast_ln8_1431_fu_84909_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2148_fu_84985_p4() {
tmp_2148_fu_84985_p4 = bitcast_ln8_1432_fu_84981_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2149_fu_85003_p4() {
tmp_2149_fu_85003_p4 = bitcast_ln8_1433_fu_84999_p1.read().range(30, 23);
}
void kernel7::thread_tmp_214_fu_26961_p4() {
tmp_214_fu_26961_p4 = bitcast_ln8_143_fu_26957_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2151_fu_85075_p4() {
tmp_2151_fu_85075_p4 = bitcast_ln8_1434_fu_85071_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2152_fu_85093_p4() {
tmp_2152_fu_85093_p4 = bitcast_ln8_1435_fu_85089_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2154_fu_85165_p4() {
tmp_2154_fu_85165_p4 = bitcast_ln8_1436_fu_85161_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2155_fu_85183_p4() {
tmp_2155_fu_85183_p4 = bitcast_ln8_1437_fu_85179_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2157_fu_85255_p4() {
tmp_2157_fu_85255_p4 = bitcast_ln8_1438_fu_85251_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2158_fu_85273_p4() {
tmp_2158_fu_85273_p4 = bitcast_ln8_1439_fu_85269_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2160_fu_85345_p4() {
tmp_2160_fu_85345_p4 = bitcast_ln8_1440_fu_85341_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2161_fu_85363_p4() {
tmp_2161_fu_85363_p4 = bitcast_ln8_1441_fu_85359_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2163_fu_85435_p4() {
tmp_2163_fu_85435_p4 = bitcast_ln8_1442_fu_85431_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2164_fu_85453_p4() {
tmp_2164_fu_85453_p4 = bitcast_ln8_1443_fu_85449_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2166_fu_85525_p4() {
tmp_2166_fu_85525_p4 = bitcast_ln8_1444_fu_85521_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2167_fu_85543_p4() {
tmp_2167_fu_85543_p4 = bitcast_ln8_1445_fu_85539_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2169_fu_85615_p4() {
tmp_2169_fu_85615_p4 = bitcast_ln8_1446_fu_85611_p1.read().range(30, 23);
}
void kernel7::thread_tmp_216_fu_27033_p4() {
tmp_216_fu_27033_p4 = bitcast_ln8_144_fu_27029_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2170_fu_85633_p4() {
tmp_2170_fu_85633_p4 = bitcast_ln8_1447_fu_85629_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2172_fu_85705_p4() {
tmp_2172_fu_85705_p4 = bitcast_ln8_1448_fu_85701_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2173_fu_85723_p4() {
tmp_2173_fu_85723_p4 = bitcast_ln8_1449_fu_85719_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2175_fu_85795_p4() {
tmp_2175_fu_85795_p4 = bitcast_ln8_1450_fu_85791_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2176_fu_85813_p4() {
tmp_2176_fu_85813_p4 = bitcast_ln8_1451_fu_85809_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2178_fu_85885_p4() {
tmp_2178_fu_85885_p4 = bitcast_ln8_1452_fu_85881_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2179_fu_85903_p4() {
tmp_2179_fu_85903_p4 = bitcast_ln8_1453_fu_85899_p1.read().range(30, 23);
}
void kernel7::thread_tmp_217_fu_27051_p4() {
tmp_217_fu_27051_p4 = bitcast_ln8_145_fu_27047_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2181_fu_85975_p4() {
tmp_2181_fu_85975_p4 = bitcast_ln8_1454_fu_85971_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2182_fu_85993_p4() {
tmp_2182_fu_85993_p4 = bitcast_ln8_1455_fu_85989_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2184_fu_86065_p4() {
tmp_2184_fu_86065_p4 = bitcast_ln8_1456_fu_86061_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2185_fu_86083_p4() {
tmp_2185_fu_86083_p4 = bitcast_ln8_1457_fu_86079_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2187_fu_86155_p4() {
tmp_2187_fu_86155_p4 = bitcast_ln8_1458_fu_86151_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2188_fu_86173_p4() {
tmp_2188_fu_86173_p4 = bitcast_ln8_1459_fu_86169_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2190_fu_86275_p4() {
tmp_2190_fu_86275_p4 = bitcast_ln8_1460_fu_86271_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2191_fu_86239_p4() {
tmp_2191_fu_86239_p4 = bitcast_ln8_1461_fu_86235_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2193_fu_86333_p4() {
tmp_2193_fu_86333_p4 = bitcast_ln8_1462_fu_86329_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2194_fu_86351_p4() {
tmp_2194_fu_86351_p4 = bitcast_ln8_1463_fu_86347_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2196_fu_86423_p4() {
tmp_2196_fu_86423_p4 = bitcast_ln8_1464_fu_86419_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2197_fu_86441_p4() {
tmp_2197_fu_86441_p4 = bitcast_ln8_1465_fu_86437_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2199_fu_86513_p4() {
tmp_2199_fu_86513_p4 = bitcast_ln8_1466_fu_86509_p1.read().range(30, 23);
}
void kernel7::thread_tmp_219_fu_27123_p4() {
tmp_219_fu_27123_p4 = bitcast_ln8_146_fu_27119_p1.read().range(30, 23);
}
void kernel7::thread_tmp_21_fu_21183_p4() {
tmp_21_fu_21183_p4 = bitcast_ln8_14_fu_21179_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2200_fu_86531_p4() {
tmp_2200_fu_86531_p4 = bitcast_ln8_1467_fu_86527_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2202_fu_86603_p4() {
tmp_2202_fu_86603_p4 = bitcast_ln8_1468_fu_86599_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2203_fu_86621_p4() {
tmp_2203_fu_86621_p4 = bitcast_ln8_1469_fu_86617_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2205_fu_86687_p4() {
tmp_2205_fu_86687_p4 = bitcast_ln8_1470_fu_86683_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2206_fu_86723_p4() {
tmp_2206_fu_86723_p4 = bitcast_ln8_1471_fu_86719_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2208_fu_86781_p4() {
tmp_2208_fu_86781_p4 = bitcast_ln8_1472_fu_86777_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2209_fu_86799_p4() {
tmp_2209_fu_86799_p4 = bitcast_ln8_1473_fu_86795_p1.read().range(30, 23);
}
void kernel7::thread_tmp_220_fu_27141_p4() {
tmp_220_fu_27141_p4 = bitcast_ln8_147_fu_27137_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2211_fu_86871_p4() {
tmp_2211_fu_86871_p4 = bitcast_ln8_1474_fu_86867_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2212_fu_86889_p4() {
tmp_2212_fu_86889_p4 = bitcast_ln8_1475_fu_86885_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2214_fu_86961_p4() {
tmp_2214_fu_86961_p4 = bitcast_ln8_1476_fu_86957_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2215_fu_86979_p4() {
tmp_2215_fu_86979_p4 = bitcast_ln8_1477_fu_86975_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2217_fu_87051_p4() {
tmp_2217_fu_87051_p4 = bitcast_ln8_1478_fu_87047_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2218_fu_87069_p4() {
tmp_2218_fu_87069_p4 = bitcast_ln8_1479_fu_87065_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2220_fu_87141_p4() {
tmp_2220_fu_87141_p4 = bitcast_ln8_1480_fu_87137_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2221_fu_87159_p4() {
tmp_2221_fu_87159_p4 = bitcast_ln8_1481_fu_87155_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2223_fu_87231_p4() {
tmp_2223_fu_87231_p4 = bitcast_ln8_1482_fu_87227_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2224_fu_87249_p4() {
tmp_2224_fu_87249_p4 = bitcast_ln8_1483_fu_87245_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2226_fu_87321_p4() {
tmp_2226_fu_87321_p4 = bitcast_ln8_1484_fu_87317_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2227_fu_87339_p4() {
tmp_2227_fu_87339_p4 = bitcast_ln8_1485_fu_87335_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2229_fu_87411_p4() {
tmp_2229_fu_87411_p4 = bitcast_ln8_1486_fu_87407_p1.read().range(30, 23);
}
void kernel7::thread_tmp_222_fu_27213_p4() {
tmp_222_fu_27213_p4 = bitcast_ln8_148_fu_27209_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2230_fu_87429_p4() {
tmp_2230_fu_87429_p4 = bitcast_ln8_1487_fu_87425_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2232_fu_87501_p4() {
tmp_2232_fu_87501_p4 = bitcast_ln8_1488_fu_87497_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2233_fu_87519_p4() {
tmp_2233_fu_87519_p4 = bitcast_ln8_1489_fu_87515_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2235_fu_87621_p4() {
tmp_2235_fu_87621_p4 = bitcast_ln8_1490_fu_87617_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2236_fu_87585_p4() {
tmp_2236_fu_87585_p4 = bitcast_ln8_1491_fu_87581_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2238_fu_87679_p4() {
tmp_2238_fu_87679_p4 = bitcast_ln8_1492_fu_87675_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2239_fu_87697_p4() {
tmp_2239_fu_87697_p4 = bitcast_ln8_1493_fu_87693_p1.read().range(30, 23);
}
void kernel7::thread_tmp_223_fu_27231_p4() {
tmp_223_fu_27231_p4 = bitcast_ln8_149_fu_27227_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2241_fu_87763_p4() {
tmp_2241_fu_87763_p4 = bitcast_ln8_1494_fu_87759_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2242_fu_87799_p4() {
tmp_2242_fu_87799_p4 = bitcast_ln8_1495_fu_87795_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2244_fu_87887_p4() {
tmp_2244_fu_87887_p4 = bitcast_ln8_1496_fu_87883_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2245_fu_87851_p4() {
tmp_2245_fu_87851_p4 = bitcast_ln8_1497_fu_87847_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2247_fu_87945_p4() {
tmp_2247_fu_87945_p4 = bitcast_ln8_1498_fu_87941_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2248_fu_87963_p4() {
tmp_2248_fu_87963_p4 = bitcast_ln8_1499_fu_87959_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2250_fu_88035_p4() {
tmp_2250_fu_88035_p4 = bitcast_ln8_1500_fu_88031_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2251_fu_88053_p4() {
tmp_2251_fu_88053_p4 = bitcast_ln8_1501_fu_88049_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2253_fu_88125_p4() {
tmp_2253_fu_88125_p4 = bitcast_ln8_1502_fu_88121_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2254_fu_88143_p4() {
tmp_2254_fu_88143_p4 = bitcast_ln8_1503_fu_88139_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2256_fu_88245_p4() {
tmp_2256_fu_88245_p4 = bitcast_ln8_1504_fu_88241_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2257_fu_88209_p4() {
tmp_2257_fu_88209_p4 = bitcast_ln8_1505_fu_88205_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2259_fu_88303_p4() {
tmp_2259_fu_88303_p4 = bitcast_ln8_1506_fu_88299_p1.read().range(30, 23);
}
void kernel7::thread_tmp_225_fu_27303_p4() {
tmp_225_fu_27303_p4 = bitcast_ln8_150_fu_27299_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2260_fu_88321_p4() {
tmp_2260_fu_88321_p4 = bitcast_ln8_1507_fu_88317_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2262_fu_88393_p4() {
tmp_2262_fu_88393_p4 = bitcast_ln8_1508_fu_88389_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2263_fu_88411_p4() {
tmp_2263_fu_88411_p4 = bitcast_ln8_1509_fu_88407_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2265_fu_88483_p4() {
tmp_2265_fu_88483_p4 = bitcast_ln8_1510_fu_88479_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2266_fu_88501_p4() {
tmp_2266_fu_88501_p4 = bitcast_ln8_1511_fu_88497_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2268_fu_88573_p4() {
tmp_2268_fu_88573_p4 = bitcast_ln8_1512_fu_88569_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2269_fu_88591_p4() {
tmp_2269_fu_88591_p4 = bitcast_ln8_1513_fu_88587_p1.read().range(30, 23);
}
void kernel7::thread_tmp_226_fu_27321_p4() {
tmp_226_fu_27321_p4 = bitcast_ln8_151_fu_27317_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2271_fu_88663_p4() {
tmp_2271_fu_88663_p4 = bitcast_ln8_1514_fu_88659_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2272_fu_88681_p4() {
tmp_2272_fu_88681_p4 = bitcast_ln8_1515_fu_88677_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2274_fu_88753_p4() {
tmp_2274_fu_88753_p4 = bitcast_ln8_1516_fu_88749_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2275_fu_88771_p4() {
tmp_2275_fu_88771_p4 = bitcast_ln8_1517_fu_88767_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2277_fu_88843_p4() {
tmp_2277_fu_88843_p4 = bitcast_ln8_1518_fu_88839_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2278_fu_88861_p4() {
tmp_2278_fu_88861_p4 = bitcast_ln8_1519_fu_88857_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2280_fu_88963_p4() {
tmp_2280_fu_88963_p4 = bitcast_ln8_1520_fu_88959_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2281_fu_88927_p4() {
tmp_2281_fu_88927_p4 = bitcast_ln8_1521_fu_88923_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2283_fu_89021_p4() {
tmp_2283_fu_89021_p4 = bitcast_ln8_1522_fu_89017_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2284_fu_89039_p4() {
tmp_2284_fu_89039_p4 = bitcast_ln8_1523_fu_89035_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2286_fu_89111_p4() {
tmp_2286_fu_89111_p4 = bitcast_ln8_1524_fu_89107_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2287_fu_89129_p4() {
tmp_2287_fu_89129_p4 = bitcast_ln8_1525_fu_89125_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2289_fu_89201_p4() {
tmp_2289_fu_89201_p4 = bitcast_ln8_1526_fu_89197_p1.read().range(30, 23);
}
void kernel7::thread_tmp_228_fu_27393_p4() {
tmp_228_fu_27393_p4 = bitcast_ln8_152_fu_27389_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2290_fu_89219_p4() {
tmp_2290_fu_89219_p4 = bitcast_ln8_1527_fu_89215_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2292_fu_89321_p4() {
tmp_2292_fu_89321_p4 = bitcast_ln8_1528_fu_89317_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2293_fu_89285_p4() {
tmp_2293_fu_89285_p4 = bitcast_ln8_1529_fu_89281_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2295_fu_89373_p4() {
tmp_2295_fu_89373_p4 = bitcast_ln8_1530_fu_89369_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2296_fu_89409_p4() {
tmp_2296_fu_89409_p4 = bitcast_ln8_1531_fu_89405_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2298_fu_89467_p4() {
tmp_2298_fu_89467_p4 = bitcast_ln8_1532_fu_89463_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2299_fu_89485_p4() {
tmp_2299_fu_89485_p4 = bitcast_ln8_1533_fu_89481_p1.read().range(30, 23);
}
void kernel7::thread_tmp_229_fu_27411_p4() {
tmp_229_fu_27411_p4 = bitcast_ln8_153_fu_27407_p1.read().range(30, 23);
}
void kernel7::thread_tmp_22_fu_21201_p4() {
tmp_22_fu_21201_p4 = bitcast_ln8_15_fu_21197_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2301_fu_89551_p4() {
tmp_2301_fu_89551_p4 = bitcast_ln8_1534_fu_89547_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2302_fu_89587_p4() {
tmp_2302_fu_89587_p4 = bitcast_ln8_1535_fu_89583_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2304_fu_89675_p4() {
tmp_2304_fu_89675_p4 = bitcast_ln8_1536_fu_89671_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2305_fu_89639_p4() {
tmp_2305_fu_89639_p4 = bitcast_ln8_1537_fu_89635_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2307_fu_89733_p4() {
tmp_2307_fu_89733_p4 = bitcast_ln8_1538_fu_89729_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2308_fu_89751_p4() {
tmp_2308_fu_89751_p4 = bitcast_ln8_1539_fu_89747_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2310_fu_89853_p4() {
tmp_2310_fu_89853_p4 = bitcast_ln8_1540_fu_89849_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2311_fu_89817_p4() {
tmp_2311_fu_89817_p4 = bitcast_ln8_1541_fu_89813_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2313_fu_89941_p4() {
tmp_2313_fu_89941_p4 = bitcast_ln8_1542_fu_89937_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2314_fu_89905_p4() {
tmp_2314_fu_89905_p4 = bitcast_ln8_1543_fu_89901_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2316_fu_89999_p4() {
tmp_2316_fu_89999_p4 = bitcast_ln8_1544_fu_89995_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2317_fu_90017_p4() {
tmp_2317_fu_90017_p4 = bitcast_ln8_1545_fu_90013_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2319_fu_90089_p4() {
tmp_2319_fu_90089_p4 = bitcast_ln8_1546_fu_90085_p1.read().range(30, 23);
}
void kernel7::thread_tmp_231_fu_27483_p4() {
tmp_231_fu_27483_p4 = bitcast_ln8_154_fu_27479_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2320_fu_90107_p4() {
tmp_2320_fu_90107_p4 = bitcast_ln8_1547_fu_90103_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2322_fu_90209_p4() {
tmp_2322_fu_90209_p4 = bitcast_ln8_1548_fu_90205_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2323_fu_90173_p4() {
tmp_2323_fu_90173_p4 = bitcast_ln8_1549_fu_90169_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2325_fu_90297_p4() {
tmp_2325_fu_90297_p4 = bitcast_ln8_1550_fu_90293_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2326_fu_90261_p4() {
tmp_2326_fu_90261_p4 = bitcast_ln8_1551_fu_90257_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2328_fu_90355_p4() {
tmp_2328_fu_90355_p4 = bitcast_ln8_1552_fu_90351_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2329_fu_90373_p4() {
tmp_2329_fu_90373_p4 = bitcast_ln8_1553_fu_90369_p1.read().range(30, 23);
}
void kernel7::thread_tmp_232_fu_27501_p4() {
tmp_232_fu_27501_p4 = bitcast_ln8_155_fu_27497_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2331_fu_90445_p4() {
tmp_2331_fu_90445_p4 = bitcast_ln8_1554_fu_90441_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2332_fu_90463_p4() {
tmp_2332_fu_90463_p4 = bitcast_ln8_1555_fu_90459_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2334_fu_90535_p4() {
tmp_2334_fu_90535_p4 = bitcast_ln8_1556_fu_90531_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2335_fu_90553_p4() {
tmp_2335_fu_90553_p4 = bitcast_ln8_1557_fu_90549_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2337_fu_90625_p4() {
tmp_2337_fu_90625_p4 = bitcast_ln8_1558_fu_90621_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2338_fu_90643_p4() {
tmp_2338_fu_90643_p4 = bitcast_ln8_1559_fu_90639_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2340_fu_90745_p4() {
tmp_2340_fu_90745_p4 = bitcast_ln8_1560_fu_90741_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2341_fu_90709_p4() {
tmp_2341_fu_90709_p4 = bitcast_ln8_1561_fu_90705_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2343_fu_90803_p4() {
tmp_2343_fu_90803_p4 = bitcast_ln8_1562_fu_90799_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2344_fu_90821_p4() {
tmp_2344_fu_90821_p4 = bitcast_ln8_1563_fu_90817_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2346_fu_90893_p4() {
tmp_2346_fu_90893_p4 = bitcast_ln8_1564_fu_90889_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2347_fu_90911_p4() {
tmp_2347_fu_90911_p4 = bitcast_ln8_1565_fu_90907_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2349_fu_90983_p4() {
tmp_2349_fu_90983_p4 = bitcast_ln8_1566_fu_90979_p1.read().range(30, 23);
}
void kernel7::thread_tmp_234_fu_27573_p4() {
tmp_234_fu_27573_p4 = bitcast_ln8_156_fu_27569_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2350_fu_91001_p4() {
tmp_2350_fu_91001_p4 = bitcast_ln8_1567_fu_90997_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2352_fu_91073_p4() {
tmp_2352_fu_91073_p4 = bitcast_ln8_1568_fu_91069_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2353_fu_91091_p4() {
tmp_2353_fu_91091_p4 = bitcast_ln8_1569_fu_91087_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2355_fu_91157_p4() {
tmp_2355_fu_91157_p4 = bitcast_ln8_1570_fu_91153_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2356_fu_91193_p4() {
tmp_2356_fu_91193_p4 = bitcast_ln8_1571_fu_91189_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2358_fu_91251_p4() {
tmp_2358_fu_91251_p4 = bitcast_ln8_1572_fu_91247_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2359_fu_91269_p4() {
tmp_2359_fu_91269_p4 = bitcast_ln8_1573_fu_91265_p1.read().range(30, 23);
}
void kernel7::thread_tmp_235_fu_27591_p4() {
tmp_235_fu_27591_p4 = bitcast_ln8_157_fu_27587_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2361_fu_91335_p4() {
tmp_2361_fu_91335_p4 = bitcast_ln8_1574_fu_91331_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2362_fu_91371_p4() {
tmp_2362_fu_91371_p4 = bitcast_ln8_1575_fu_91367_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2364_fu_91459_p4() {
tmp_2364_fu_91459_p4 = bitcast_ln8_1576_fu_91455_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2365_fu_91423_p4() {
tmp_2365_fu_91423_p4 = bitcast_ln8_1577_fu_91419_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2367_fu_91517_p4() {
tmp_2367_fu_91517_p4 = bitcast_ln8_1578_fu_91513_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2368_fu_91535_p4() {
tmp_2368_fu_91535_p4 = bitcast_ln8_1579_fu_91531_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2370_fu_91607_p4() {
tmp_2370_fu_91607_p4 = bitcast_ln8_1580_fu_91603_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2371_fu_91625_p4() {
tmp_2371_fu_91625_p4 = bitcast_ln8_1581_fu_91621_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2373_fu_91697_p4() {
tmp_2373_fu_91697_p4 = bitcast_ln8_1582_fu_91693_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2374_fu_91715_p4() {
tmp_2374_fu_91715_p4 = bitcast_ln8_1583_fu_91711_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2376_fu_91787_p4() {
tmp_2376_fu_91787_p4 = bitcast_ln8_1584_fu_91783_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2377_fu_91805_p4() {
tmp_2377_fu_91805_p4 = bitcast_ln8_1585_fu_91801_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2379_fu_91877_p4() {
tmp_2379_fu_91877_p4 = bitcast_ln8_1586_fu_91873_p1.read().range(30, 23);
}
void kernel7::thread_tmp_237_fu_27663_p4() {
tmp_237_fu_27663_p4 = bitcast_ln8_158_fu_27659_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2380_fu_91895_p4() {
tmp_2380_fu_91895_p4 = bitcast_ln8_1587_fu_91891_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2382_fu_91967_p4() {
tmp_2382_fu_91967_p4 = bitcast_ln8_1588_fu_91963_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2383_fu_91985_p4() {
tmp_2383_fu_91985_p4 = bitcast_ln8_1589_fu_91981_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2385_fu_92057_p4() {
tmp_2385_fu_92057_p4 = bitcast_ln8_1590_fu_92053_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2386_fu_92075_p4() {
tmp_2386_fu_92075_p4 = bitcast_ln8_1591_fu_92071_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2388_fu_92147_p4() {
tmp_2388_fu_92147_p4 = bitcast_ln8_1592_fu_92143_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2389_fu_92165_p4() {
tmp_2389_fu_92165_p4 = bitcast_ln8_1593_fu_92161_p1.read().range(30, 23);
}
void kernel7::thread_tmp_238_fu_27681_p4() {
tmp_238_fu_27681_p4 = bitcast_ln8_159_fu_27677_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2391_fu_92237_p4() {
tmp_2391_fu_92237_p4 = bitcast_ln8_1594_fu_92233_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2392_fu_92255_p4() {
tmp_2392_fu_92255_p4 = bitcast_ln8_1595_fu_92251_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2394_fu_92327_p4() {
tmp_2394_fu_92327_p4 = bitcast_ln8_1596_fu_92323_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2395_fu_92345_p4() {
tmp_2395_fu_92345_p4 = bitcast_ln8_1597_fu_92341_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2397_fu_92417_p4() {
tmp_2397_fu_92417_p4 = bitcast_ln8_1598_fu_92413_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2398_fu_92435_p4() {
tmp_2398_fu_92435_p4 = bitcast_ln8_1599_fu_92431_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2400_fu_92507_p4() {
tmp_2400_fu_92507_p4 = bitcast_ln8_1600_fu_92503_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2401_fu_92525_p4() {
tmp_2401_fu_92525_p4 = bitcast_ln8_1601_fu_92521_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2403_fu_92597_p4() {
tmp_2403_fu_92597_p4 = bitcast_ln8_1602_fu_92593_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2404_fu_92615_p4() {
tmp_2404_fu_92615_p4 = bitcast_ln8_1603_fu_92611_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2406_fu_92687_p4() {
tmp_2406_fu_92687_p4 = bitcast_ln8_1604_fu_92683_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2407_fu_92705_p4() {
tmp_2407_fu_92705_p4 = bitcast_ln8_1605_fu_92701_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2409_fu_92771_p4() {
tmp_2409_fu_92771_p4 = bitcast_ln8_1606_fu_92767_p1.read().range(30, 23);
}
void kernel7::thread_tmp_240_fu_27753_p4() {
tmp_240_fu_27753_p4 = bitcast_ln8_160_fu_27749_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2410_fu_92807_p4() {
tmp_2410_fu_92807_p4 = bitcast_ln8_1607_fu_92803_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2412_fu_92859_p4() {
tmp_2412_fu_92859_p4 = bitcast_ln8_1608_fu_92855_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2413_fu_92895_p4() {
tmp_2413_fu_92895_p4 = bitcast_ln8_1609_fu_92891_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2415_fu_92953_p4() {
tmp_2415_fu_92953_p4 = bitcast_ln8_1610_fu_92949_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2416_fu_92971_p4() {
tmp_2416_fu_92971_p4 = bitcast_ln8_1611_fu_92967_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2418_fu_93037_p4() {
tmp_2418_fu_93037_p4 = bitcast_ln8_1612_fu_93033_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2419_fu_93073_p4() {
tmp_2419_fu_93073_p4 = bitcast_ln8_1613_fu_93069_p1.read().range(30, 23);
}
void kernel7::thread_tmp_241_fu_27771_p4() {
tmp_241_fu_27771_p4 = bitcast_ln8_161_fu_27767_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2421_fu_93131_p4() {
tmp_2421_fu_93131_p4 = bitcast_ln8_1614_fu_93127_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2422_fu_93149_p4() {
tmp_2422_fu_93149_p4 = bitcast_ln8_1615_fu_93145_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2424_fu_93221_p4() {
tmp_2424_fu_93221_p4 = bitcast_ln8_1616_fu_93217_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2425_fu_93239_p4() {
tmp_2425_fu_93239_p4 = bitcast_ln8_1617_fu_93235_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2427_fu_93305_p4() {
tmp_2427_fu_93305_p4 = bitcast_ln8_1618_fu_93301_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2428_fu_93341_p4() {
tmp_2428_fu_93341_p4 = bitcast_ln8_1619_fu_93337_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2430_fu_93399_p4() {
tmp_2430_fu_93399_p4 = bitcast_ln8_1620_fu_93395_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2431_fu_93417_p4() {
tmp_2431_fu_93417_p4 = bitcast_ln8_1621_fu_93413_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2433_fu_93489_p4() {
tmp_2433_fu_93489_p4 = bitcast_ln8_1622_fu_93485_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2434_fu_93507_p4() {
tmp_2434_fu_93507_p4 = bitcast_ln8_1623_fu_93503_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2436_fu_93579_p4() {
tmp_2436_fu_93579_p4 = bitcast_ln8_1624_fu_93575_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2437_fu_93597_p4() {
tmp_2437_fu_93597_p4 = bitcast_ln8_1625_fu_93593_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2439_fu_93663_p4() {
tmp_2439_fu_93663_p4 = bitcast_ln8_1626_fu_93659_p1.read().range(30, 23);
}
void kernel7::thread_tmp_243_fu_27843_p4() {
tmp_243_fu_27843_p4 = bitcast_ln8_162_fu_27839_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2440_fu_93699_p4() {
tmp_2440_fu_93699_p4 = bitcast_ln8_1627_fu_93695_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2442_fu_93757_p4() {
tmp_2442_fu_93757_p4 = bitcast_ln8_1628_fu_93753_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2443_fu_93775_p4() {
tmp_2443_fu_93775_p4 = bitcast_ln8_1629_fu_93771_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2445_fu_93877_p4() {
tmp_2445_fu_93877_p4 = bitcast_ln8_1630_fu_93873_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2446_fu_93841_p4() {
tmp_2446_fu_93841_p4 = bitcast_ln8_1631_fu_93837_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2448_fu_93935_p4() {
tmp_2448_fu_93935_p4 = bitcast_ln8_1632_fu_93931_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2449_fu_93953_p4() {
tmp_2449_fu_93953_p4 = bitcast_ln8_1633_fu_93949_p1.read().range(30, 23);
}
void kernel7::thread_tmp_244_fu_27861_p4() {
tmp_244_fu_27861_p4 = bitcast_ln8_163_fu_27857_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2451_fu_94025_p4() {
tmp_2451_fu_94025_p4 = bitcast_ln8_1634_fu_94021_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2452_fu_94043_p4() {
tmp_2452_fu_94043_p4 = bitcast_ln8_1635_fu_94039_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2454_fu_94115_p4() {
tmp_2454_fu_94115_p4 = bitcast_ln8_1636_fu_94111_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2455_fu_94133_p4() {
tmp_2455_fu_94133_p4 = bitcast_ln8_1637_fu_94129_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2457_fu_94199_p4() {
tmp_2457_fu_94199_p4 = bitcast_ln8_1638_fu_94195_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2458_fu_94235_p4() {
tmp_2458_fu_94235_p4 = bitcast_ln8_1639_fu_94231_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2460_fu_94293_p4() {
tmp_2460_fu_94293_p4 = bitcast_ln8_1640_fu_94289_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2461_fu_94311_p4() {
tmp_2461_fu_94311_p4 = bitcast_ln8_1641_fu_94307_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2463_fu_94413_p4() {
tmp_2463_fu_94413_p4 = bitcast_ln8_1642_fu_94409_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2464_fu_94377_p4() {
tmp_2464_fu_94377_p4 = bitcast_ln8_1643_fu_94373_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2466_fu_94465_p4() {
tmp_2466_fu_94465_p4 = bitcast_ln8_1644_fu_94461_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2467_fu_94501_p4() {
tmp_2467_fu_94501_p4 = bitcast_ln8_1645_fu_94497_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2469_fu_94553_p4() {
tmp_2469_fu_94553_p4 = bitcast_ln8_1646_fu_94549_p1.read().range(30, 23);
}
void kernel7::thread_tmp_246_fu_27933_p4() {
tmp_246_fu_27933_p4 = bitcast_ln8_164_fu_27929_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2470_fu_94589_p4() {
tmp_2470_fu_94589_p4 = bitcast_ln8_1647_fu_94585_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2472_fu_94647_p4() {
tmp_2472_fu_94647_p4 = bitcast_ln8_1648_fu_94643_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2473_fu_94665_p4() {
tmp_2473_fu_94665_p4 = bitcast_ln8_1649_fu_94661_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2475_fu_94737_p4() {
tmp_2475_fu_94737_p4 = bitcast_ln8_1650_fu_94733_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2476_fu_94755_p4() {
tmp_2476_fu_94755_p4 = bitcast_ln8_1651_fu_94751_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2478_fu_94827_p4() {
tmp_2478_fu_94827_p4 = bitcast_ln8_1652_fu_94823_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2479_fu_94845_p4() {
tmp_2479_fu_94845_p4 = bitcast_ln8_1653_fu_94841_p1.read().range(30, 23);
}
void kernel7::thread_tmp_247_fu_27951_p4() {
tmp_247_fu_27951_p4 = bitcast_ln8_165_fu_27947_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2481_fu_94917_p4() {
tmp_2481_fu_94917_p4 = bitcast_ln8_1654_fu_94913_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2482_fu_94935_p4() {
tmp_2482_fu_94935_p4 = bitcast_ln8_1655_fu_94931_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2484_fu_95037_p4() {
tmp_2484_fu_95037_p4 = bitcast_ln8_1656_fu_95033_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2485_fu_95001_p4() {
tmp_2485_fu_95001_p4 = bitcast_ln8_1657_fu_94997_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2487_fu_95089_p4() {
tmp_2487_fu_95089_p4 = bitcast_ln8_1658_fu_95085_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2488_fu_95125_p4() {
tmp_2488_fu_95125_p4 = bitcast_ln8_1659_fu_95121_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2490_fu_95177_p4() {
tmp_2490_fu_95177_p4 = bitcast_ln8_1660_fu_95173_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2491_fu_95213_p4() {
tmp_2491_fu_95213_p4 = bitcast_ln8_1661_fu_95209_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2493_fu_95265_p4() {
tmp_2493_fu_95265_p4 = bitcast_ln8_1662_fu_95261_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2494_fu_95301_p4() {
tmp_2494_fu_95301_p4 = bitcast_ln8_1663_fu_95297_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2496_fu_95359_p4() {
tmp_2496_fu_95359_p4 = bitcast_ln8_1664_fu_95355_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2497_fu_95377_p4() {
tmp_2497_fu_95377_p4 = bitcast_ln8_1665_fu_95373_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2499_fu_95443_p4() {
tmp_2499_fu_95443_p4 = bitcast_ln8_1666_fu_95439_p1.read().range(30, 23);
}
void kernel7::thread_tmp_249_fu_28023_p4() {
tmp_249_fu_28023_p4 = bitcast_ln8_166_fu_28019_p1.read().range(30, 23);
}
void kernel7::thread_tmp_24_fu_21273_p4() {
tmp_24_fu_21273_p4 = bitcast_ln8_16_fu_21269_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2500_fu_95479_p4() {
tmp_2500_fu_95479_p4 = bitcast_ln8_1667_fu_95475_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2502_fu_95531_p4() {
tmp_2502_fu_95531_p4 = bitcast_ln8_1668_fu_95527_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2503_fu_95567_p4() {
tmp_2503_fu_95567_p4 = bitcast_ln8_1669_fu_95563_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2505_fu_95619_p4() {
tmp_2505_fu_95619_p4 = bitcast_ln8_1670_fu_95615_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2506_fu_95655_p4() {
tmp_2506_fu_95655_p4 = bitcast_ln8_1671_fu_95651_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2508_fu_95743_p4() {
tmp_2508_fu_95743_p4 = bitcast_ln8_1672_fu_95739_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2509_fu_95707_p4() {
tmp_2509_fu_95707_p4 = bitcast_ln8_1673_fu_95703_p1.read().range(30, 23);
}
void kernel7::thread_tmp_250_fu_28041_p4() {
tmp_250_fu_28041_p4 = bitcast_ln8_167_fu_28037_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2511_fu_95795_p4() {
tmp_2511_fu_95795_p4 = bitcast_ln8_1674_fu_95791_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2512_fu_95831_p4() {
tmp_2512_fu_95831_p4 = bitcast_ln8_1675_fu_95827_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2514_fu_95883_p4() {
tmp_2514_fu_95883_p4 = bitcast_ln8_1676_fu_95879_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2515_fu_95919_p4() {
tmp_2515_fu_95919_p4 = bitcast_ln8_1677_fu_95915_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2517_fu_96007_p4() {
tmp_2517_fu_96007_p4 = bitcast_ln8_1678_fu_96003_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2518_fu_95971_p4() {
tmp_2518_fu_95971_p4 = bitcast_ln8_1679_fu_95967_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2520_fu_96095_p4() {
tmp_2520_fu_96095_p4 = bitcast_ln8_1680_fu_96091_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2521_fu_96059_p4() {
tmp_2521_fu_96059_p4 = bitcast_ln8_1681_fu_96055_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2523_fu_96183_p4() {
tmp_2523_fu_96183_p4 = bitcast_ln8_1682_fu_96179_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2524_fu_96147_p4() {
tmp_2524_fu_96147_p4 = bitcast_ln8_1683_fu_96143_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2526_fu_96235_p4() {
tmp_2526_fu_96235_p4 = bitcast_ln8_1684_fu_96231_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2527_fu_96271_p4() {
tmp_2527_fu_96271_p4 = bitcast_ln8_1685_fu_96267_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2529_fu_96323_p4() {
tmp_2529_fu_96323_p4 = bitcast_ln8_1686_fu_96319_p1.read().range(30, 23);
}
void kernel7::thread_tmp_252_fu_28113_p4() {
tmp_252_fu_28113_p4 = bitcast_ln8_168_fu_28109_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2530_fu_96359_p4() {
tmp_2530_fu_96359_p4 = bitcast_ln8_1687_fu_96355_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2532_fu_96447_p4() {
tmp_2532_fu_96447_p4 = bitcast_ln8_1688_fu_96443_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2533_fu_96411_p4() {
tmp_2533_fu_96411_p4 = bitcast_ln8_1689_fu_96407_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2535_fu_96535_p4() {
tmp_2535_fu_96535_p4 = bitcast_ln8_1690_fu_96531_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2536_fu_96499_p4() {
tmp_2536_fu_96499_p4 = bitcast_ln8_1691_fu_96495_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2538_fu_96587_p4() {
tmp_2538_fu_96587_p4 = bitcast_ln8_1692_fu_96583_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2539_fu_96623_p4() {
tmp_2539_fu_96623_p4 = bitcast_ln8_1693_fu_96619_p1.read().range(30, 23);
}
void kernel7::thread_tmp_253_fu_28131_p4() {
tmp_253_fu_28131_p4 = bitcast_ln8_169_fu_28127_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2541_fu_96675_p4() {
tmp_2541_fu_96675_p4 = bitcast_ln8_1694_fu_96671_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2542_fu_96711_p4() {
tmp_2542_fu_96711_p4 = bitcast_ln8_1695_fu_96707_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2544_fu_96799_p4() {
tmp_2544_fu_96799_p4 = bitcast_ln8_1696_fu_96795_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2545_fu_96763_p4() {
tmp_2545_fu_96763_p4 = bitcast_ln8_1697_fu_96759_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2547_fu_96887_p4() {
tmp_2547_fu_96887_p4 = bitcast_ln8_1698_fu_96883_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2548_fu_96851_p4() {
tmp_2548_fu_96851_p4 = bitcast_ln8_1699_fu_96847_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2550_fu_96975_p4() {
tmp_2550_fu_96975_p4 = bitcast_ln8_1700_fu_96971_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2551_fu_96939_p4() {
tmp_2551_fu_96939_p4 = bitcast_ln8_1701_fu_96935_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2553_fu_97063_p4() {
tmp_2553_fu_97063_p4 = bitcast_ln8_1702_fu_97059_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2554_fu_97027_p4() {
tmp_2554_fu_97027_p4 = bitcast_ln8_1703_fu_97023_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2556_fu_97115_p4() {
tmp_2556_fu_97115_p4 = bitcast_ln8_1704_fu_97111_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2557_fu_97151_p4() {
tmp_2557_fu_97151_p4 = bitcast_ln8_1705_fu_97147_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2559_fu_97203_p4() {
tmp_2559_fu_97203_p4 = bitcast_ln8_1706_fu_97199_p1.read().range(30, 23);
}
void kernel7::thread_tmp_255_fu_28203_p4() {
tmp_255_fu_28203_p4 = bitcast_ln8_170_fu_28199_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2560_fu_97239_p4() {
tmp_2560_fu_97239_p4 = bitcast_ln8_1707_fu_97235_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2562_fu_97291_p4() {
tmp_2562_fu_97291_p4 = bitcast_ln8_1708_fu_97287_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2563_fu_97327_p4() {
tmp_2563_fu_97327_p4 = bitcast_ln8_1709_fu_97323_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2565_fu_97379_p4() {
tmp_2565_fu_97379_p4 = bitcast_ln8_1710_fu_97375_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2566_fu_97397_p4() {
tmp_2566_fu_97397_p4 = bitcast_ln8_1711_fu_97393_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2568_fu_97465_p4() {
tmp_2568_fu_97465_p4 = bitcast_ln8_1712_fu_97461_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2569_fu_97501_p4() {
tmp_2569_fu_97501_p4 = bitcast_ln8_1713_fu_97497_p1.read().range(30, 23);
}
void kernel7::thread_tmp_256_fu_28221_p4() {
tmp_256_fu_28221_p4 = bitcast_ln8_171_fu_28217_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2571_fu_97559_p4() {
tmp_2571_fu_97559_p4 = bitcast_ln8_1714_fu_97555_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2572_fu_97577_p4() {
tmp_2572_fu_97577_p4 = bitcast_ln8_1715_fu_97573_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2574_fu_97679_p4() {
tmp_2574_fu_97679_p4 = bitcast_ln8_1716_fu_97675_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2575_fu_97643_p4() {
tmp_2575_fu_97643_p4 = bitcast_ln8_1717_fu_97639_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2577_fu_97731_p4() {
tmp_2577_fu_97731_p4 = bitcast_ln8_1718_fu_97727_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2578_fu_97767_p4() {
tmp_2578_fu_97767_p4 = bitcast_ln8_1719_fu_97763_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2580_fu_97825_p4() {
tmp_2580_fu_97825_p4 = bitcast_ln8_1720_fu_97821_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2581_fu_97843_p4() {
tmp_2581_fu_97843_p4 = bitcast_ln8_1721_fu_97839_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2583_fu_97945_p4() {
tmp_2583_fu_97945_p4 = bitcast_ln8_1722_fu_97941_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2584_fu_97909_p4() {
tmp_2584_fu_97909_p4 = bitcast_ln8_1723_fu_97905_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2586_fu_98033_p4() {
tmp_2586_fu_98033_p4 = bitcast_ln8_1724_fu_98029_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2587_fu_97997_p4() {
tmp_2587_fu_97997_p4 = bitcast_ln8_1725_fu_97993_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2589_fu_98085_p4() {
tmp_2589_fu_98085_p4 = bitcast_ln8_1726_fu_98081_p1.read().range(30, 23);
}
void kernel7::thread_tmp_258_fu_28293_p4() {
tmp_258_fu_28293_p4 = bitcast_ln8_172_fu_28289_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2590_fu_98121_p4() {
tmp_2590_fu_98121_p4 = bitcast_ln8_1727_fu_98117_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2592_fu_98209_p4() {
tmp_2592_fu_98209_p4 = bitcast_ln8_1728_fu_98205_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2593_fu_98173_p4() {
tmp_2593_fu_98173_p4 = bitcast_ln8_1729_fu_98169_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2595_fu_98297_p4() {
tmp_2595_fu_98297_p4 = bitcast_ln8_1730_fu_98293_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2596_fu_98261_p4() {
tmp_2596_fu_98261_p4 = bitcast_ln8_1731_fu_98257_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2598_fu_98349_p4() {
tmp_2598_fu_98349_p4 = bitcast_ln8_1732_fu_98345_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2599_fu_98385_p4() {
tmp_2599_fu_98385_p4 = bitcast_ln8_1733_fu_98381_p1.read().range(30, 23);
}
void kernel7::thread_tmp_259_fu_28311_p4() {
tmp_259_fu_28311_p4 = bitcast_ln8_173_fu_28307_p1.read().range(30, 23);
}
void kernel7::thread_tmp_25_fu_21291_p4() {
tmp_25_fu_21291_p4 = bitcast_ln8_17_fu_21287_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2601_fu_98437_p4() {
tmp_2601_fu_98437_p4 = bitcast_ln8_1734_fu_98433_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2602_fu_98473_p4() {
tmp_2602_fu_98473_p4 = bitcast_ln8_1735_fu_98469_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2604_fu_98561_p4() {
tmp_2604_fu_98561_p4 = bitcast_ln8_1736_fu_98557_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2605_fu_98525_p4() {
tmp_2605_fu_98525_p4 = bitcast_ln8_1737_fu_98521_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2607_fu_98619_p4() {
tmp_2607_fu_98619_p4 = bitcast_ln8_1738_fu_98615_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2608_fu_98637_p4() {
tmp_2608_fu_98637_p4 = bitcast_ln8_1739_fu_98633_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2610_fu_98703_p4() {
tmp_2610_fu_98703_p4 = bitcast_ln8_1740_fu_98699_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2611_fu_98721_p4() {
tmp_2611_fu_98721_p4 = bitcast_ln8_1741_fu_98717_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2613_fu_98825_p4() {
tmp_2613_fu_98825_p4 = bitcast_ln8_1742_fu_98821_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2614_fu_98789_p4() {
tmp_2614_fu_98789_p4 = bitcast_ln8_1743_fu_98785_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2616_fu_98883_p4() {
tmp_2616_fu_98883_p4 = bitcast_ln8_1744_fu_98879_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2617_fu_98901_p4() {
tmp_2617_fu_98901_p4 = bitcast_ln8_1745_fu_98897_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2619_fu_98973_p4() {
tmp_2619_fu_98973_p4 = bitcast_ln8_1746_fu_98969_p1.read().range(30, 23);
}
void kernel7::thread_tmp_261_fu_28383_p4() {
tmp_261_fu_28383_p4 = bitcast_ln8_174_fu_28379_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2620_fu_98991_p4() {
tmp_2620_fu_98991_p4 = bitcast_ln8_1747_fu_98987_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2622_fu_99057_p4() {
tmp_2622_fu_99057_p4 = bitcast_ln8_1748_fu_99053_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2623_fu_99093_p4() {
tmp_2623_fu_99093_p4 = bitcast_ln8_1749_fu_99089_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2625_fu_99181_p4() {
tmp_2625_fu_99181_p4 = bitcast_ln8_1750_fu_99177_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2626_fu_99145_p4() {
tmp_2626_fu_99145_p4 = bitcast_ln8_1751_fu_99141_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2628_fu_99239_p4() {
tmp_2628_fu_99239_p4 = bitcast_ln8_1752_fu_99235_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2629_fu_99257_p4() {
tmp_2629_fu_99257_p4 = bitcast_ln8_1753_fu_99253_p1.read().range(30, 23);
}
void kernel7::thread_tmp_262_fu_28401_p4() {
tmp_262_fu_28401_p4 = bitcast_ln8_175_fu_28397_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2631_fu_99323_p4() {
tmp_2631_fu_99323_p4 = bitcast_ln8_1754_fu_99319_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2632_fu_99359_p4() {
tmp_2632_fu_99359_p4 = bitcast_ln8_1755_fu_99355_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2634_fu_99411_p4() {
tmp_2634_fu_99411_p4 = bitcast_ln8_1756_fu_99407_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2635_fu_99429_p4() {
tmp_2635_fu_99429_p4 = bitcast_ln8_1757_fu_99425_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2637_fu_99533_p4() {
tmp_2637_fu_99533_p4 = bitcast_ln8_1758_fu_99529_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2638_fu_99497_p4() {
tmp_2638_fu_99497_p4 = bitcast_ln8_1759_fu_99493_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2640_fu_99591_p4() {
tmp_2640_fu_99591_p4 = bitcast_ln8_1760_fu_99587_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2641_fu_99609_p4() {
tmp_2641_fu_99609_p4 = bitcast_ln8_1761_fu_99605_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2643_fu_99675_p4() {
tmp_2643_fu_99675_p4 = bitcast_ln8_1762_fu_99671_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2644_fu_99711_p4() {
tmp_2644_fu_99711_p4 = bitcast_ln8_1763_fu_99707_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2646_fu_99799_p4() {
tmp_2646_fu_99799_p4 = bitcast_ln8_1764_fu_99795_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2647_fu_99763_p4() {
tmp_2647_fu_99763_p4 = bitcast_ln8_1765_fu_99759_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2649_fu_99887_p4() {
tmp_2649_fu_99887_p4 = bitcast_ln8_1766_fu_99883_p1.read().range(30, 23);
}
void kernel7::thread_tmp_264_fu_28473_p4() {
tmp_264_fu_28473_p4 = bitcast_ln8_176_fu_28469_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2650_fu_99851_p4() {
tmp_2650_fu_99851_p4 = bitcast_ln8_1767_fu_99847_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2652_fu_99939_p4() {
tmp_2652_fu_99939_p4 = bitcast_ln8_1768_fu_99935_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2653_fu_99975_p4() {
tmp_2653_fu_99975_p4 = bitcast_ln8_1769_fu_99971_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2655_fu_100033_p4() {
tmp_2655_fu_100033_p4 = bitcast_ln8_1770_fu_100029_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2656_fu_100051_p4() {
tmp_2656_fu_100051_p4 = bitcast_ln8_1771_fu_100047_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2658_fu_100123_p4() {
tmp_2658_fu_100123_p4 = bitcast_ln8_1772_fu_100119_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2659_fu_100141_p4() {
tmp_2659_fu_100141_p4 = bitcast_ln8_1773_fu_100137_p1.read().range(30, 23);
}
void kernel7::thread_tmp_265_fu_28491_p4() {
tmp_265_fu_28491_p4 = bitcast_ln8_177_fu_28487_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2661_fu_100207_p4() {
tmp_2661_fu_100207_p4 = bitcast_ln8_1774_fu_100203_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2662_fu_100243_p4() {
tmp_2662_fu_100243_p4 = bitcast_ln8_1775_fu_100239_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2664_fu_100295_p4() {
tmp_2664_fu_100295_p4 = bitcast_ln8_1776_fu_100291_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2665_fu_100313_p4() {
tmp_2665_fu_100313_p4 = bitcast_ln8_1777_fu_100309_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2667_fu_100417_p4() {
tmp_2667_fu_100417_p4 = bitcast_ln8_1778_fu_100413_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2668_fu_100381_p4() {
tmp_2668_fu_100381_p4 = bitcast_ln8_1779_fu_100377_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2670_fu_100475_p4() {
tmp_2670_fu_100475_p4 = bitcast_ln8_1780_fu_100471_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2671_fu_100493_p4() {
tmp_2671_fu_100493_p4 = bitcast_ln8_1781_fu_100489_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2673_fu_100559_p4() {
tmp_2673_fu_100559_p4 = bitcast_ln8_1782_fu_100555_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2674_fu_100595_p4() {
tmp_2674_fu_100595_p4 = bitcast_ln8_1783_fu_100591_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2676_fu_100647_p4() {
tmp_2676_fu_100647_p4 = bitcast_ln8_1784_fu_100643_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2677_fu_100683_p4() {
tmp_2677_fu_100683_p4 = bitcast_ln8_1785_fu_100679_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2679_fu_100741_p4() {
tmp_2679_fu_100741_p4 = bitcast_ln8_1786_fu_100737_p1.read().range(30, 23);
}
void kernel7::thread_tmp_267_fu_28563_p4() {
tmp_267_fu_28563_p4 = bitcast_ln8_178_fu_28559_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2680_fu_100759_p4() {
tmp_2680_fu_100759_p4 = bitcast_ln8_1787_fu_100755_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2682_fu_100831_p4() {
tmp_2682_fu_100831_p4 = bitcast_ln8_1788_fu_100827_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2683_fu_100849_p4() {
tmp_2683_fu_100849_p4 = bitcast_ln8_1789_fu_100845_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2685_fu_100915_p4() {
tmp_2685_fu_100915_p4 = bitcast_ln8_1790_fu_100911_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2686_fu_100951_p4() {
tmp_2686_fu_100951_p4 = bitcast_ln8_1791_fu_100947_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2688_fu_101039_p4() {
tmp_2688_fu_101039_p4 = bitcast_ln8_1792_fu_101035_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2689_fu_101003_p4() {
tmp_2689_fu_101003_p4 = bitcast_ln8_1793_fu_100999_p1.read().range(30, 23);
}
void kernel7::thread_tmp_268_fu_28581_p4() {
tmp_268_fu_28581_p4 = bitcast_ln8_179_fu_28577_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2691_fu_101097_p4() {
tmp_2691_fu_101097_p4 = bitcast_ln8_1794_fu_101093_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2692_fu_101115_p4() {
tmp_2692_fu_101115_p4 = bitcast_ln8_1795_fu_101111_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2694_fu_101181_p4() {
tmp_2694_fu_101181_p4 = bitcast_ln8_1796_fu_101177_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2695_fu_101217_p4() {
tmp_2695_fu_101217_p4 = bitcast_ln8_1797_fu_101213_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2697_fu_101275_p4() {
tmp_2697_fu_101275_p4 = bitcast_ln8_1798_fu_101271_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2698_fu_101293_p4() {
tmp_2698_fu_101293_p4 = bitcast_ln8_1799_fu_101289_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2700_fu_101395_p4() {
tmp_2700_fu_101395_p4 = bitcast_ln8_1800_fu_101391_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2701_fu_101359_p4() {
tmp_2701_fu_101359_p4 = bitcast_ln8_1801_fu_101355_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2703_fu_101447_p4() {
tmp_2703_fu_101447_p4 = bitcast_ln8_1802_fu_101443_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2704_fu_101483_p4() {
tmp_2704_fu_101483_p4 = bitcast_ln8_1803_fu_101479_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2706_fu_101535_p4() {
tmp_2706_fu_101535_p4 = bitcast_ln8_1804_fu_101531_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2707_fu_101553_p4() {
tmp_2707_fu_101553_p4 = bitcast_ln8_1805_fu_101549_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2709_fu_101657_p4() {
tmp_2709_fu_101657_p4 = bitcast_ln8_1806_fu_101653_p1.read().range(30, 23);
}
void kernel7::thread_tmp_270_fu_28653_p4() {
tmp_270_fu_28653_p4 = bitcast_ln8_180_fu_28649_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2710_fu_101621_p4() {
tmp_2710_fu_101621_p4 = bitcast_ln8_1807_fu_101617_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2712_fu_101715_p4() {
tmp_2712_fu_101715_p4 = bitcast_ln8_1808_fu_101711_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2713_fu_101733_p4() {
tmp_2713_fu_101733_p4 = bitcast_ln8_1809_fu_101729_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2715_fu_101799_p4() {
tmp_2715_fu_101799_p4 = bitcast_ln8_1810_fu_101795_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2716_fu_101835_p4() {
tmp_2716_fu_101835_p4 = bitcast_ln8_1811_fu_101831_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2718_fu_101887_p4() {
tmp_2718_fu_101887_p4 = bitcast_ln8_1812_fu_101883_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2719_fu_101905_p4() {
tmp_2719_fu_101905_p4 = bitcast_ln8_1813_fu_101901_p1.read().range(30, 23);
}
void kernel7::thread_tmp_271_fu_28671_p4() {
tmp_271_fu_28671_p4 = bitcast_ln8_181_fu_28667_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2721_fu_102009_p4() {
tmp_2721_fu_102009_p4 = bitcast_ln8_1814_fu_102005_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2722_fu_101973_p4() {
tmp_2722_fu_101973_p4 = bitcast_ln8_1815_fu_101969_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2724_fu_102067_p4() {
tmp_2724_fu_102067_p4 = bitcast_ln8_1816_fu_102063_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2725_fu_102085_p4() {
tmp_2725_fu_102085_p4 = bitcast_ln8_1817_fu_102081_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2727_fu_102151_p4() {
tmp_2727_fu_102151_p4 = bitcast_ln8_1818_fu_102147_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2728_fu_102187_p4() {
tmp_2728_fu_102187_p4 = bitcast_ln8_1819_fu_102183_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2730_fu_102245_p4() {
tmp_2730_fu_102245_p4 = bitcast_ln8_1820_fu_102241_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2731_fu_102263_p4() {
tmp_2731_fu_102263_p4 = bitcast_ln8_1821_fu_102259_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2733_fu_102365_p4() {
tmp_2733_fu_102365_p4 = bitcast_ln8_1822_fu_102361_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2734_fu_102329_p4() {
tmp_2734_fu_102329_p4 = bitcast_ln8_1823_fu_102325_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2736_fu_102417_p4() {
tmp_2736_fu_102417_p4 = bitcast_ln8_1824_fu_102413_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2737_fu_102435_p4() {
tmp_2737_fu_102435_p4 = bitcast_ln8_1825_fu_102431_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2739_fu_102539_p4() {
tmp_2739_fu_102539_p4 = bitcast_ln8_1826_fu_102535_p1.read().range(30, 23);
}
void kernel7::thread_tmp_273_fu_28743_p4() {
tmp_273_fu_28743_p4 = bitcast_ln8_182_fu_28739_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2740_fu_102503_p4() {
tmp_2740_fu_102503_p4 = bitcast_ln8_1827_fu_102499_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2742_fu_102597_p4() {
tmp_2742_fu_102597_p4 = bitcast_ln8_1828_fu_102593_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2743_fu_102615_p4() {
tmp_2743_fu_102615_p4 = bitcast_ln8_1829_fu_102611_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2745_fu_102681_p4() {
tmp_2745_fu_102681_p4 = bitcast_ln8_1830_fu_102677_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2746_fu_102717_p4() {
tmp_2746_fu_102717_p4 = bitcast_ln8_1831_fu_102713_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2748_fu_102805_p4() {
tmp_2748_fu_102805_p4 = bitcast_ln8_1832_fu_102801_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2749_fu_102769_p4() {
tmp_2749_fu_102769_p4 = bitcast_ln8_1833_fu_102765_p1.read().range(30, 23);
}
void kernel7::thread_tmp_274_fu_28761_p4() {
tmp_274_fu_28761_p4 = bitcast_ln8_183_fu_28757_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2751_fu_102893_p4() {
tmp_2751_fu_102893_p4 = bitcast_ln8_1834_fu_102889_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2752_fu_102857_p4() {
tmp_2752_fu_102857_p4 = bitcast_ln8_1835_fu_102853_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2754_fu_102951_p4() {
tmp_2754_fu_102951_p4 = bitcast_ln8_1836_fu_102947_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2755_fu_102969_p4() {
tmp_2755_fu_102969_p4 = bitcast_ln8_1837_fu_102965_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2757_fu_103035_p4() {
tmp_2757_fu_103035_p4 = bitcast_ln8_1838_fu_103031_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2758_fu_103071_p4() {
tmp_2758_fu_103071_p4 = bitcast_ln8_1839_fu_103067_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2760_fu_103123_p4() {
tmp_2760_fu_103123_p4 = bitcast_ln8_1840_fu_103119_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2761_fu_103141_p4() {
tmp_2761_fu_103141_p4 = bitcast_ln8_1841_fu_103137_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2763_fu_103215_p4() {
tmp_2763_fu_103215_p4 = bitcast_ln8_1842_fu_103211_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2764_fu_103233_p4() {
tmp_2764_fu_103233_p4 = bitcast_ln8_1843_fu_103229_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2766_fu_103305_p4() {
tmp_2766_fu_103305_p4 = bitcast_ln8_1844_fu_103301_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2767_fu_103323_p4() {
tmp_2767_fu_103323_p4 = bitcast_ln8_1845_fu_103319_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2769_fu_103389_p4() {
tmp_2769_fu_103389_p4 = bitcast_ln8_1846_fu_103385_p1.read().range(30, 23);
}
void kernel7::thread_tmp_276_fu_28833_p4() {
tmp_276_fu_28833_p4 = bitcast_ln8_184_fu_28829_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2770_fu_103407_p4() {
tmp_2770_fu_103407_p4 = bitcast_ln8_1847_fu_103403_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2772_fu_103511_p4() {
tmp_2772_fu_103511_p4 = bitcast_ln8_1848_fu_103507_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2773_fu_103475_p4() {
tmp_2773_fu_103475_p4 = bitcast_ln8_1849_fu_103471_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2775_fu_103569_p4() {
tmp_2775_fu_103569_p4 = bitcast_ln8_1850_fu_103565_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2776_fu_103587_p4() {
tmp_2776_fu_103587_p4 = bitcast_ln8_1851_fu_103583_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2778_fu_103653_p4() {
tmp_2778_fu_103653_p4 = bitcast_ln8_1852_fu_103649_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2779_fu_103689_p4() {
tmp_2779_fu_103689_p4 = bitcast_ln8_1853_fu_103685_p1.read().range(30, 23);
}
void kernel7::thread_tmp_277_fu_28851_p4() {
tmp_277_fu_28851_p4 = bitcast_ln8_185_fu_28847_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2781_fu_103741_p4() {
tmp_2781_fu_103741_p4 = bitcast_ln8_1854_fu_103737_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2782_fu_103777_p4() {
tmp_2782_fu_103777_p4 = bitcast_ln8_1855_fu_103773_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2784_fu_103835_p4() {
tmp_2784_fu_103835_p4 = bitcast_ln8_1856_fu_103831_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2785_fu_103853_p4() {
tmp_2785_fu_103853_p4 = bitcast_ln8_1857_fu_103849_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2787_fu_103955_p4() {
tmp_2787_fu_103955_p4 = bitcast_ln8_1858_fu_103951_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2788_fu_103919_p4() {
tmp_2788_fu_103919_p4 = bitcast_ln8_1859_fu_103915_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2790_fu_104043_p4() {
tmp_2790_fu_104043_p4 = bitcast_ln8_1860_fu_104039_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2791_fu_104007_p4() {
tmp_2791_fu_104007_p4 = bitcast_ln8_1861_fu_104003_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2793_fu_104101_p4() {
tmp_2793_fu_104101_p4 = bitcast_ln8_1862_fu_104097_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2794_fu_104119_p4() {
tmp_2794_fu_104119_p4 = bitcast_ln8_1863_fu_104115_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2796_fu_104185_p4() {
tmp_2796_fu_104185_p4 = bitcast_ln8_1864_fu_104181_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2797_fu_104221_p4() {
tmp_2797_fu_104221_p4 = bitcast_ln8_1865_fu_104217_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2799_fu_104273_p4() {
tmp_2799_fu_104273_p4 = bitcast_ln8_1866_fu_104269_p1.read().range(30, 23);
}
void kernel7::thread_tmp_279_fu_28923_p4() {
tmp_279_fu_28923_p4 = bitcast_ln8_186_fu_28919_p1.read().range(30, 23);
}
void kernel7::thread_tmp_27_fu_21363_p4() {
tmp_27_fu_21363_p4 = bitcast_ln8_18_fu_21359_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2800_fu_104291_p4() {
tmp_2800_fu_104291_p4 = bitcast_ln8_1867_fu_104287_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2802_fu_104365_p4() {
tmp_2802_fu_104365_p4 = bitcast_ln8_1868_fu_104361_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2803_fu_104383_p4() {
tmp_2803_fu_104383_p4 = bitcast_ln8_1869_fu_104379_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2805_fu_104455_p4() {
tmp_2805_fu_104455_p4 = bitcast_ln8_1870_fu_104451_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2806_fu_104473_p4() {
tmp_2806_fu_104473_p4 = bitcast_ln8_1871_fu_104469_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2808_fu_104539_p4() {
tmp_2808_fu_104539_p4 = bitcast_ln8_1872_fu_104535_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2809_fu_104575_p4() {
tmp_2809_fu_104575_p4 = bitcast_ln8_1873_fu_104571_p1.read().range(30, 23);
}
void kernel7::thread_tmp_280_fu_28941_p4() {
tmp_280_fu_28941_p4 = bitcast_ln8_187_fu_28937_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2811_fu_104633_p4() {
tmp_2811_fu_104633_p4 = bitcast_ln8_1874_fu_104629_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2812_fu_104651_p4() {
tmp_2812_fu_104651_p4 = bitcast_ln8_1875_fu_104647_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2814_fu_104717_p4() {
tmp_2814_fu_104717_p4 = bitcast_ln8_1876_fu_104713_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2815_fu_104735_p4() {
tmp_2815_fu_104735_p4 = bitcast_ln8_1877_fu_104731_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2817_fu_104839_p4() {
tmp_2817_fu_104839_p4 = bitcast_ln8_1878_fu_104835_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2818_fu_104803_p4() {
tmp_2818_fu_104803_p4 = bitcast_ln8_1879_fu_104799_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2820_fu_104897_p4() {
tmp_2820_fu_104897_p4 = bitcast_ln8_1880_fu_104893_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2821_fu_104915_p4() {
tmp_2821_fu_104915_p4 = bitcast_ln8_1881_fu_104911_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2823_fu_104987_p4() {
tmp_2823_fu_104987_p4 = bitcast_ln8_1882_fu_104983_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2824_fu_105005_p4() {
tmp_2824_fu_105005_p4 = bitcast_ln8_1883_fu_105001_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2826_fu_105071_p4() {
tmp_2826_fu_105071_p4 = bitcast_ln8_1884_fu_105067_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2827_fu_105089_p4() {
tmp_2827_fu_105089_p4 = bitcast_ln8_1885_fu_105085_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2829_fu_105193_p4() {
tmp_2829_fu_105193_p4 = bitcast_ln8_1886_fu_105189_p1.read().range(30, 23);
}
void kernel7::thread_tmp_282_fu_29013_p4() {
tmp_282_fu_29013_p4 = bitcast_ln8_188_fu_29009_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2830_fu_105157_p4() {
tmp_2830_fu_105157_p4 = bitcast_ln8_1887_fu_105153_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2832_fu_105245_p4() {
tmp_2832_fu_105245_p4 = bitcast_ln8_1888_fu_105241_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2833_fu_105281_p4() {
tmp_2833_fu_105281_p4 = bitcast_ln8_1889_fu_105277_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2835_fu_105339_p4() {
tmp_2835_fu_105339_p4 = bitcast_ln8_1890_fu_105335_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2836_fu_105357_p4() {
tmp_2836_fu_105357_p4 = bitcast_ln8_1891_fu_105353_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2838_fu_105459_p4() {
tmp_2838_fu_105459_p4 = bitcast_ln8_1892_fu_105455_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2839_fu_105423_p4() {
tmp_2839_fu_105423_p4 = bitcast_ln8_1893_fu_105419_p1.read().range(30, 23);
}
void kernel7::thread_tmp_283_fu_29031_p4() {
tmp_283_fu_29031_p4 = bitcast_ln8_189_fu_29027_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2841_fu_105511_p4() {
tmp_2841_fu_105511_p4 = bitcast_ln8_1894_fu_105507_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2842_fu_105529_p4() {
tmp_2842_fu_105529_p4 = bitcast_ln8_1895_fu_105525_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2844_fu_105597_p4() {
tmp_2844_fu_105597_p4 = bitcast_ln8_1896_fu_105593_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2845_fu_105615_p4() {
tmp_2845_fu_105615_p4 = bitcast_ln8_1897_fu_105611_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2847_fu_105689_p4() {
tmp_2847_fu_105689_p4 = bitcast_ln8_1898_fu_105685_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2848_fu_105707_p4() {
tmp_2848_fu_105707_p4 = bitcast_ln8_1899_fu_105703_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2850_fu_105809_p4() {
tmp_2850_fu_105809_p4 = bitcast_ln8_1900_fu_105805_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2851_fu_105773_p4() {
tmp_2851_fu_105773_p4 = bitcast_ln8_1901_fu_105769_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2853_fu_105897_p4() {
tmp_2853_fu_105897_p4 = bitcast_ln8_1902_fu_105893_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2854_fu_105861_p4() {
tmp_2854_fu_105861_p4 = bitcast_ln8_1903_fu_105857_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2856_fu_105949_p4() {
tmp_2856_fu_105949_p4 = bitcast_ln8_1904_fu_105945_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2857_fu_105985_p4() {
tmp_2857_fu_105985_p4 = bitcast_ln8_1905_fu_105981_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2859_fu_106037_p4() {
tmp_2859_fu_106037_p4 = bitcast_ln8_1906_fu_106033_p1.read().range(30, 23);
}
void kernel7::thread_tmp_285_fu_29103_p4() {
tmp_285_fu_29103_p4 = bitcast_ln8_190_fu_29099_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2860_fu_106073_p4() {
tmp_2860_fu_106073_p4 = bitcast_ln8_1907_fu_106069_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2862_fu_106161_p4() {
tmp_2862_fu_106161_p4 = bitcast_ln8_1908_fu_106157_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2863_fu_106125_p4() {
tmp_2863_fu_106125_p4 = bitcast_ln8_1909_fu_106121_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2865_fu_106213_p4() {
tmp_2865_fu_106213_p4 = bitcast_ln8_1910_fu_106209_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2866_fu_106231_p4() {
tmp_2866_fu_106231_p4 = bitcast_ln8_1911_fu_106227_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2868_fu_106299_p4() {
tmp_2868_fu_106299_p4 = bitcast_ln8_1912_fu_106295_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2869_fu_106317_p4() {
tmp_2869_fu_106317_p4 = bitcast_ln8_1913_fu_106313_p1.read().range(30, 23);
}
void kernel7::thread_tmp_286_fu_29121_p4() {
tmp_286_fu_29121_p4 = bitcast_ln8_191_fu_29117_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2871_fu_106385_p4() {
tmp_2871_fu_106385_p4 = bitcast_ln8_1914_fu_106381_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2872_fu_106403_p4() {
tmp_2872_fu_106403_p4 = bitcast_ln8_1915_fu_106399_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2874_fu_106471_p4() {
tmp_2874_fu_106471_p4 = bitcast_ln8_1916_fu_106467_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2875_fu_106489_p4() {
tmp_2875_fu_106489_p4 = bitcast_ln8_1917_fu_106485_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2877_fu_106557_p4() {
tmp_2877_fu_106557_p4 = bitcast_ln8_1918_fu_106553_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2878_fu_106575_p4() {
tmp_2878_fu_106575_p4 = bitcast_ln8_1919_fu_106571_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2880_fu_106643_p4() {
tmp_2880_fu_106643_p4 = bitcast_ln8_1920_fu_106639_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2881_fu_106661_p4() {
tmp_2881_fu_106661_p4 = bitcast_ln8_1921_fu_106657_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2883_fu_106729_p4() {
tmp_2883_fu_106729_p4 = bitcast_ln8_1922_fu_106725_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2884_fu_106747_p4() {
tmp_2884_fu_106747_p4 = bitcast_ln8_1923_fu_106743_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2886_fu_106815_p4() {
tmp_2886_fu_106815_p4 = bitcast_ln8_1924_fu_106811_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2887_fu_106833_p4() {
tmp_2887_fu_106833_p4 = bitcast_ln8_1925_fu_106829_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2889_fu_106901_p4() {
tmp_2889_fu_106901_p4 = bitcast_ln8_1926_fu_106897_p1.read().range(30, 23);
}
void kernel7::thread_tmp_288_fu_29193_p4() {
tmp_288_fu_29193_p4 = bitcast_ln8_192_fu_29189_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2890_fu_106919_p4() {
tmp_2890_fu_106919_p4 = bitcast_ln8_1927_fu_106915_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2892_fu_106987_p4() {
tmp_2892_fu_106987_p4 = bitcast_ln8_1928_fu_106983_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2893_fu_107005_p4() {
tmp_2893_fu_107005_p4 = bitcast_ln8_1929_fu_107001_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2895_fu_107073_p4() {
tmp_2895_fu_107073_p4 = bitcast_ln8_1930_fu_107069_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2896_fu_107091_p4() {
tmp_2896_fu_107091_p4 = bitcast_ln8_1931_fu_107087_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2898_fu_107159_p4() {
tmp_2898_fu_107159_p4 = bitcast_ln8_1932_fu_107155_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2899_fu_107177_p4() {
tmp_2899_fu_107177_p4 = bitcast_ln8_1933_fu_107173_p1.read().range(30, 23);
}
void kernel7::thread_tmp_289_fu_29211_p4() {
tmp_289_fu_29211_p4 = bitcast_ln8_193_fu_29207_p1.read().range(30, 23);
}
void kernel7::thread_tmp_28_fu_21381_p4() {
tmp_28_fu_21381_p4 = bitcast_ln8_19_fu_21377_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2901_fu_107245_p4() {
tmp_2901_fu_107245_p4 = bitcast_ln8_1934_fu_107241_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2902_fu_107263_p4() {
tmp_2902_fu_107263_p4 = bitcast_ln8_1935_fu_107259_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2904_fu_107331_p4() {
tmp_2904_fu_107331_p4 = bitcast_ln8_1936_fu_107327_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2905_fu_107349_p4() {
tmp_2905_fu_107349_p4 = bitcast_ln8_1937_fu_107345_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2907_fu_107417_p4() {
tmp_2907_fu_107417_p4 = bitcast_ln8_1938_fu_107413_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2908_fu_107435_p4() {
tmp_2908_fu_107435_p4 = bitcast_ln8_1939_fu_107431_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2910_fu_107503_p4() {
tmp_2910_fu_107503_p4 = bitcast_ln8_1940_fu_107499_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2911_fu_107521_p4() {
tmp_2911_fu_107521_p4 = bitcast_ln8_1941_fu_107517_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2913_fu_107589_p4() {
tmp_2913_fu_107589_p4 = bitcast_ln8_1942_fu_107585_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2914_fu_107607_p4() {
tmp_2914_fu_107607_p4 = bitcast_ln8_1943_fu_107603_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2916_fu_107675_p4() {
tmp_2916_fu_107675_p4 = bitcast_ln8_1944_fu_107671_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2917_fu_107693_p4() {
tmp_2917_fu_107693_p4 = bitcast_ln8_1945_fu_107689_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2919_fu_107761_p4() {
tmp_2919_fu_107761_p4 = bitcast_ln8_1946_fu_107757_p1.read().range(30, 23);
}
void kernel7::thread_tmp_291_fu_29283_p4() {
tmp_291_fu_29283_p4 = bitcast_ln8_194_fu_29279_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2920_fu_107779_p4() {
tmp_2920_fu_107779_p4 = bitcast_ln8_1947_fu_107775_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2922_fu_107847_p4() {
tmp_2922_fu_107847_p4 = bitcast_ln8_1948_fu_107843_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2923_fu_107865_p4() {
tmp_2923_fu_107865_p4 = bitcast_ln8_1949_fu_107861_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2925_fu_107933_p4() {
tmp_2925_fu_107933_p4 = bitcast_ln8_1950_fu_107929_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2926_fu_107951_p4() {
tmp_2926_fu_107951_p4 = bitcast_ln8_1951_fu_107947_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2928_fu_108019_p4() {
tmp_2928_fu_108019_p4 = bitcast_ln8_1952_fu_108015_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2929_fu_108037_p4() {
tmp_2929_fu_108037_p4 = bitcast_ln8_1953_fu_108033_p1.read().range(30, 23);
}
void kernel7::thread_tmp_292_fu_29301_p4() {
tmp_292_fu_29301_p4 = bitcast_ln8_195_fu_29297_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2931_fu_108105_p4() {
tmp_2931_fu_108105_p4 = bitcast_ln8_1954_fu_108101_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2932_fu_108123_p4() {
tmp_2932_fu_108123_p4 = bitcast_ln8_1955_fu_108119_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2934_fu_108191_p4() {
tmp_2934_fu_108191_p4 = bitcast_ln8_1956_fu_108187_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2935_fu_108209_p4() {
tmp_2935_fu_108209_p4 = bitcast_ln8_1957_fu_108205_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2937_fu_108277_p4() {
tmp_2937_fu_108277_p4 = bitcast_ln8_1958_fu_108273_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2938_fu_108295_p4() {
tmp_2938_fu_108295_p4 = bitcast_ln8_1959_fu_108291_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2940_fu_108363_p4() {
tmp_2940_fu_108363_p4 = bitcast_ln8_1960_fu_108359_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2941_fu_108381_p4() {
tmp_2941_fu_108381_p4 = bitcast_ln8_1961_fu_108377_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2943_fu_108449_p4() {
tmp_2943_fu_108449_p4 = bitcast_ln8_1962_fu_108445_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2944_fu_108467_p4() {
tmp_2944_fu_108467_p4 = bitcast_ln8_1963_fu_108463_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2946_fu_108535_p4() {
tmp_2946_fu_108535_p4 = bitcast_ln8_1964_fu_108531_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2947_fu_108553_p4() {
tmp_2947_fu_108553_p4 = bitcast_ln8_1965_fu_108549_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2949_fu_108621_p4() {
tmp_2949_fu_108621_p4 = bitcast_ln8_1966_fu_108617_p1.read().range(30, 23);
}
void kernel7::thread_tmp_294_fu_29373_p4() {
tmp_294_fu_29373_p4 = bitcast_ln8_196_fu_29369_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2950_fu_108639_p4() {
tmp_2950_fu_108639_p4 = bitcast_ln8_1967_fu_108635_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2952_fu_108743_p4() {
tmp_2952_fu_108743_p4 = bitcast_ln8_1968_fu_108739_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2953_fu_108707_p4() {
tmp_2953_fu_108707_p4 = bitcast_ln8_1969_fu_108703_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2955_fu_108795_p4() {
tmp_2955_fu_108795_p4 = bitcast_ln8_1970_fu_108791_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2956_fu_108813_p4() {
tmp_2956_fu_108813_p4 = bitcast_ln8_1971_fu_108809_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2958_fu_108881_p4() {
tmp_2958_fu_108881_p4 = bitcast_ln8_1972_fu_108877_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2959_fu_108899_p4() {
tmp_2959_fu_108899_p4 = bitcast_ln8_1973_fu_108895_p1.read().range(30, 23);
}
void kernel7::thread_tmp_295_fu_29391_p4() {
tmp_295_fu_29391_p4 = bitcast_ln8_197_fu_29387_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2961_fu_108967_p4() {
tmp_2961_fu_108967_p4 = bitcast_ln8_1974_fu_108963_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2962_fu_108985_p4() {
tmp_2962_fu_108985_p4 = bitcast_ln8_1975_fu_108981_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2964_fu_109053_p4() {
tmp_2964_fu_109053_p4 = bitcast_ln8_1976_fu_109049_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2965_fu_109071_p4() {
tmp_2965_fu_109071_p4 = bitcast_ln8_1977_fu_109067_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2967_fu_109139_p4() {
tmp_2967_fu_109139_p4 = bitcast_ln8_1978_fu_109135_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2968_fu_109157_p4() {
tmp_2968_fu_109157_p4 = bitcast_ln8_1979_fu_109153_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2970_fu_109225_p4() {
tmp_2970_fu_109225_p4 = bitcast_ln8_1980_fu_109221_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2971_fu_109243_p4() {
tmp_2971_fu_109243_p4 = bitcast_ln8_1981_fu_109239_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2973_fu_109311_p4() {
tmp_2973_fu_109311_p4 = bitcast_ln8_1982_fu_109307_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2974_fu_109329_p4() {
tmp_2974_fu_109329_p4 = bitcast_ln8_1983_fu_109325_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2976_fu_109397_p4() {
tmp_2976_fu_109397_p4 = bitcast_ln8_1984_fu_109393_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2977_fu_109415_p4() {
tmp_2977_fu_109415_p4 = bitcast_ln8_1985_fu_109411_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2979_fu_109483_p4() {
tmp_2979_fu_109483_p4 = bitcast_ln8_1986_fu_109479_p1.read().range(30, 23);
}
void kernel7::thread_tmp_297_fu_29463_p4() {
tmp_297_fu_29463_p4 = bitcast_ln8_198_fu_29459_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2980_fu_109501_p4() {
tmp_2980_fu_109501_p4 = bitcast_ln8_1987_fu_109497_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2982_fu_109569_p4() {
tmp_2982_fu_109569_p4 = bitcast_ln8_1988_fu_109565_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2983_fu_109587_p4() {
tmp_2983_fu_109587_p4 = bitcast_ln8_1989_fu_109583_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2985_fu_109655_p4() {
tmp_2985_fu_109655_p4 = bitcast_ln8_1990_fu_109651_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2986_fu_109673_p4() {
tmp_2986_fu_109673_p4 = bitcast_ln8_1991_fu_109669_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2988_fu_109741_p4() {
tmp_2988_fu_109741_p4 = bitcast_ln8_1992_fu_109737_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2989_fu_109759_p4() {
tmp_2989_fu_109759_p4 = bitcast_ln8_1993_fu_109755_p1.read().range(30, 23);
}
void kernel7::thread_tmp_298_fu_29481_p4() {
tmp_298_fu_29481_p4 = bitcast_ln8_199_fu_29477_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2991_fu_109827_p4() {
tmp_2991_fu_109827_p4 = bitcast_ln8_1994_fu_109823_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2992_fu_109845_p4() {
tmp_2992_fu_109845_p4 = bitcast_ln8_1995_fu_109841_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2994_fu_109913_p4() {
tmp_2994_fu_109913_p4 = bitcast_ln8_1996_fu_109909_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2995_fu_109931_p4() {
tmp_2995_fu_109931_p4 = bitcast_ln8_1997_fu_109927_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2997_fu_109999_p4() {
tmp_2997_fu_109999_p4 = bitcast_ln8_1998_fu_109995_p1.read().range(30, 23);
}
void kernel7::thread_tmp_2998_fu_110017_p4() {
tmp_2998_fu_110017_p4 = bitcast_ln8_1999_fu_110013_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3000_fu_110085_p4() {
tmp_3000_fu_110085_p4 = bitcast_ln8_2000_fu_110081_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3001_fu_110103_p4() {
tmp_3001_fu_110103_p4 = bitcast_ln8_2001_fu_110099_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3003_fu_110171_p4() {
tmp_3003_fu_110171_p4 = bitcast_ln8_2002_fu_110167_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3004_fu_110189_p4() {
tmp_3004_fu_110189_p4 = bitcast_ln8_2003_fu_110185_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3006_fu_110257_p4() {
tmp_3006_fu_110257_p4 = bitcast_ln8_2004_fu_110253_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3007_fu_110275_p4() {
tmp_3007_fu_110275_p4 = bitcast_ln8_2005_fu_110271_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3009_fu_110343_p4() {
tmp_3009_fu_110343_p4 = bitcast_ln8_2006_fu_110339_p1.read().range(30, 23);
}
void kernel7::thread_tmp_300_fu_29553_p4() {
tmp_300_fu_29553_p4 = bitcast_ln8_200_fu_29549_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3010_fu_110361_p4() {
tmp_3010_fu_110361_p4 = bitcast_ln8_2007_fu_110357_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3012_fu_110429_p4() {
tmp_3012_fu_110429_p4 = bitcast_ln8_2008_fu_110425_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3013_fu_110447_p4() {
tmp_3013_fu_110447_p4 = bitcast_ln8_2009_fu_110443_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3015_fu_110515_p4() {
tmp_3015_fu_110515_p4 = bitcast_ln8_2010_fu_110511_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3016_fu_110533_p4() {
tmp_3016_fu_110533_p4 = bitcast_ln8_2011_fu_110529_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3018_fu_110601_p4() {
tmp_3018_fu_110601_p4 = bitcast_ln8_2012_fu_110597_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3019_fu_110619_p4() {
tmp_3019_fu_110619_p4 = bitcast_ln8_2013_fu_110615_p1.read().range(30, 23);
}
void kernel7::thread_tmp_301_fu_29571_p4() {
tmp_301_fu_29571_p4 = bitcast_ln8_201_fu_29567_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3021_fu_110687_p4() {
tmp_3021_fu_110687_p4 = bitcast_ln8_2014_fu_110683_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3022_fu_110705_p4() {
tmp_3022_fu_110705_p4 = bitcast_ln8_2015_fu_110701_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3024_fu_110773_p4() {
tmp_3024_fu_110773_p4 = bitcast_ln8_2016_fu_110769_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3025_fu_110791_p4() {
tmp_3025_fu_110791_p4 = bitcast_ln8_2017_fu_110787_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3027_fu_110859_p4() {
tmp_3027_fu_110859_p4 = bitcast_ln8_2018_fu_110855_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3028_fu_110877_p4() {
tmp_3028_fu_110877_p4 = bitcast_ln8_2019_fu_110873_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3030_fu_110945_p4() {
tmp_3030_fu_110945_p4 = bitcast_ln8_2020_fu_110941_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3031_fu_110963_p4() {
tmp_3031_fu_110963_p4 = bitcast_ln8_2021_fu_110959_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3033_fu_111031_p4() {
tmp_3033_fu_111031_p4 = bitcast_ln8_2022_fu_111027_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3034_fu_111049_p4() {
tmp_3034_fu_111049_p4 = bitcast_ln8_2023_fu_111045_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3036_fu_111117_p4() {
tmp_3036_fu_111117_p4 = bitcast_ln8_2024_fu_111113_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3037_fu_111135_p4() {
tmp_3037_fu_111135_p4 = bitcast_ln8_2025_fu_111131_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3039_fu_111203_p4() {
tmp_3039_fu_111203_p4 = bitcast_ln8_2026_fu_111199_p1.read().range(30, 23);
}
void kernel7::thread_tmp_303_fu_29643_p4() {
tmp_303_fu_29643_p4 = bitcast_ln8_202_fu_29639_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3040_fu_111221_p4() {
tmp_3040_fu_111221_p4 = bitcast_ln8_2027_fu_111217_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3042_fu_111289_p4() {
tmp_3042_fu_111289_p4 = bitcast_ln8_2028_fu_111285_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3043_fu_111307_p4() {
tmp_3043_fu_111307_p4 = bitcast_ln8_2029_fu_111303_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3045_fu_111375_p4() {
tmp_3045_fu_111375_p4 = bitcast_ln8_2030_fu_111371_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3046_fu_111393_p4() {
tmp_3046_fu_111393_p4 = bitcast_ln8_2031_fu_111389_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3048_fu_111461_p4() {
tmp_3048_fu_111461_p4 = bitcast_ln8_2032_fu_111457_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3049_fu_111479_p4() {
tmp_3049_fu_111479_p4 = bitcast_ln8_2033_fu_111475_p1.read().range(30, 23);
}
void kernel7::thread_tmp_304_fu_29661_p4() {
tmp_304_fu_29661_p4 = bitcast_ln8_203_fu_29657_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3051_fu_111547_p4() {
tmp_3051_fu_111547_p4 = bitcast_ln8_2034_fu_111543_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3052_fu_111565_p4() {
tmp_3052_fu_111565_p4 = bitcast_ln8_2035_fu_111561_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3054_fu_111633_p4() {
tmp_3054_fu_111633_p4 = bitcast_ln8_2036_fu_111629_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3055_fu_111651_p4() {
tmp_3055_fu_111651_p4 = bitcast_ln8_2037_fu_111647_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3057_fu_111719_p4() {
tmp_3057_fu_111719_p4 = bitcast_ln8_2038_fu_111715_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3058_fu_111737_p4() {
tmp_3058_fu_111737_p4 = bitcast_ln8_2039_fu_111733_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3060_fu_111805_p4() {
tmp_3060_fu_111805_p4 = bitcast_ln8_2040_fu_111801_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3061_fu_111823_p4() {
tmp_3061_fu_111823_p4 = bitcast_ln8_2041_fu_111819_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3063_fu_111891_p4() {
tmp_3063_fu_111891_p4 = bitcast_ln8_2042_fu_111887_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3064_fu_111909_p4() {
tmp_3064_fu_111909_p4 = bitcast_ln8_2043_fu_111905_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3066_fu_111977_p4() {
tmp_3066_fu_111977_p4 = bitcast_ln8_2044_fu_111973_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3067_fu_111995_p4() {
tmp_3067_fu_111995_p4 = bitcast_ln8_2045_fu_111991_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3069_fu_112063_p4() {
tmp_3069_fu_112063_p4 = bitcast_ln8_2046_fu_112059_p1.read().range(30, 23);
}
void kernel7::thread_tmp_306_fu_29733_p4() {
tmp_306_fu_29733_p4 = bitcast_ln8_204_fu_29729_p1.read().range(30, 23);
}
void kernel7::thread_tmp_3070_fu_112081_p4() {
tmp_3070_fu_112081_p4 = bitcast_ln8_2047_fu_112077_p1.read().range(30, 23);
}
void kernel7::thread_tmp_307_fu_29751_p4() {
tmp_307_fu_29751_p4 = bitcast_ln8_205_fu_29747_p1.read().range(30, 23);
}
void kernel7::thread_tmp_309_fu_29823_p4() {
tmp_309_fu_29823_p4 = bitcast_ln8_206_fu_29819_p1.read().range(30, 23);
}
void kernel7::thread_tmp_30_fu_21453_p4() {
tmp_30_fu_21453_p4 = bitcast_ln8_20_fu_21449_p1.read().range(30, 23);
}
void kernel7::thread_tmp_310_fu_29841_p4() {
tmp_310_fu_29841_p4 = bitcast_ln8_207_fu_29837_p1.read().range(30, 23);
}
void kernel7::thread_tmp_312_fu_29913_p4() {
tmp_312_fu_29913_p4 = bitcast_ln8_208_fu_29909_p1.read().range(30, 23);
}
void kernel7::thread_tmp_313_fu_29931_p4() {
tmp_313_fu_29931_p4 = bitcast_ln8_209_fu_29927_p1.read().range(30, 23);
}
void kernel7::thread_tmp_315_fu_30003_p4() {
tmp_315_fu_30003_p4 = bitcast_ln8_210_fu_29999_p1.read().range(30, 23);
}
void kernel7::thread_tmp_316_fu_30021_p4() {
tmp_316_fu_30021_p4 = bitcast_ln8_211_fu_30017_p1.read().range(30, 23);
}
void kernel7::thread_tmp_318_fu_30093_p4() {
tmp_318_fu_30093_p4 = bitcast_ln8_212_fu_30089_p1.read().range(30, 23);
}
void kernel7::thread_tmp_319_fu_30111_p4() {
tmp_319_fu_30111_p4 = bitcast_ln8_213_fu_30107_p1.read().range(30, 23);
}
void kernel7::thread_tmp_31_fu_21471_p4() {
tmp_31_fu_21471_p4 = bitcast_ln8_21_fu_21467_p1.read().range(30, 23);
}
void kernel7::thread_tmp_321_fu_30183_p4() {
tmp_321_fu_30183_p4 = bitcast_ln8_214_fu_30179_p1.read().range(30, 23);
}
void kernel7::thread_tmp_322_fu_30201_p4() {
tmp_322_fu_30201_p4 = bitcast_ln8_215_fu_30197_p1.read().range(30, 23);
}
void kernel7::thread_tmp_324_fu_30273_p4() {
tmp_324_fu_30273_p4 = bitcast_ln8_216_fu_30269_p1.read().range(30, 23);
}
void kernel7::thread_tmp_325_fu_30291_p4() {
tmp_325_fu_30291_p4 = bitcast_ln8_217_fu_30287_p1.read().range(30, 23);
}
void kernel7::thread_tmp_327_fu_30363_p4() {
tmp_327_fu_30363_p4 = bitcast_ln8_218_fu_30359_p1.read().range(30, 23);
}
void kernel7::thread_tmp_328_fu_30381_p4() {
tmp_328_fu_30381_p4 = bitcast_ln8_219_fu_30377_p1.read().range(30, 23);
}
void kernel7::thread_tmp_330_fu_30453_p4() {
tmp_330_fu_30453_p4 = bitcast_ln8_220_fu_30449_p1.read().range(30, 23);
}
void kernel7::thread_tmp_331_fu_30471_p4() {
tmp_331_fu_30471_p4 = bitcast_ln8_221_fu_30467_p1.read().range(30, 23);
}
void kernel7::thread_tmp_333_fu_30543_p4() {
tmp_333_fu_30543_p4 = bitcast_ln8_222_fu_30539_p1.read().range(30, 23);
}
void kernel7::thread_tmp_334_fu_30561_p4() {
tmp_334_fu_30561_p4 = bitcast_ln8_223_fu_30557_p1.read().range(30, 23);
}
void kernel7::thread_tmp_336_fu_30633_p4() {
tmp_336_fu_30633_p4 = bitcast_ln8_224_fu_30629_p1.read().range(30, 23);
}
void kernel7::thread_tmp_337_fu_30651_p4() {
tmp_337_fu_30651_p4 = bitcast_ln8_225_fu_30647_p1.read().range(30, 23);
}
void kernel7::thread_tmp_339_fu_30723_p4() {
tmp_339_fu_30723_p4 = bitcast_ln8_226_fu_30719_p1.read().range(30, 23);
}
void kernel7::thread_tmp_33_fu_21543_p4() {
tmp_33_fu_21543_p4 = bitcast_ln8_22_fu_21539_p1.read().range(30, 23);
}
void kernel7::thread_tmp_340_fu_30741_p4() {
tmp_340_fu_30741_p4 = bitcast_ln8_227_fu_30737_p1.read().range(30, 23);
}
void kernel7::thread_tmp_342_fu_30813_p4() {
tmp_342_fu_30813_p4 = bitcast_ln8_228_fu_30809_p1.read().range(30, 23);
}
void kernel7::thread_tmp_343_fu_30831_p4() {
tmp_343_fu_30831_p4 = bitcast_ln8_229_fu_30827_p1.read().range(30, 23);
}
void kernel7::thread_tmp_345_fu_30903_p4() {
tmp_345_fu_30903_p4 = bitcast_ln8_230_fu_30899_p1.read().range(30, 23);
}
void kernel7::thread_tmp_346_fu_30921_p4() {
tmp_346_fu_30921_p4 = bitcast_ln8_231_fu_30917_p1.read().range(30, 23);
}
void kernel7::thread_tmp_348_fu_30993_p4() {
tmp_348_fu_30993_p4 = bitcast_ln8_232_fu_30989_p1.read().range(30, 23);
}
void kernel7::thread_tmp_349_fu_31011_p4() {
tmp_349_fu_31011_p4 = bitcast_ln8_233_fu_31007_p1.read().range(30, 23);
}
void kernel7::thread_tmp_34_fu_21561_p4() {
tmp_34_fu_21561_p4 = bitcast_ln8_23_fu_21557_p1.read().range(30, 23);
}
void kernel7::thread_tmp_351_fu_31083_p4() {
tmp_351_fu_31083_p4 = bitcast_ln8_234_fu_31079_p1.read().range(30, 23);
}
void kernel7::thread_tmp_352_fu_31101_p4() {
tmp_352_fu_31101_p4 = bitcast_ln8_235_fu_31097_p1.read().range(30, 23);
}
void kernel7::thread_tmp_354_fu_31173_p4() {
tmp_354_fu_31173_p4 = bitcast_ln8_236_fu_31169_p1.read().range(30, 23);
}
void kernel7::thread_tmp_355_fu_31191_p4() {
tmp_355_fu_31191_p4 = bitcast_ln8_237_fu_31187_p1.read().range(30, 23);
}
void kernel7::thread_tmp_357_fu_31263_p4() {
tmp_357_fu_31263_p4 = bitcast_ln8_238_fu_31259_p1.read().range(30, 23);
}
void kernel7::thread_tmp_358_fu_31281_p4() {
tmp_358_fu_31281_p4 = bitcast_ln8_239_fu_31277_p1.read().range(30, 23);
}
void kernel7::thread_tmp_360_fu_31353_p4() {
tmp_360_fu_31353_p4 = bitcast_ln8_240_fu_31349_p1.read().range(30, 23);
}
void kernel7::thread_tmp_361_fu_31371_p4() {
tmp_361_fu_31371_p4 = bitcast_ln8_241_fu_31367_p1.read().range(30, 23);
}
void kernel7::thread_tmp_363_fu_31443_p4() {
tmp_363_fu_31443_p4 = bitcast_ln8_242_fu_31439_p1.read().range(30, 23);
}
void kernel7::thread_tmp_364_fu_31461_p4() {
tmp_364_fu_31461_p4 = bitcast_ln8_243_fu_31457_p1.read().range(30, 23);
}
void kernel7::thread_tmp_366_fu_31533_p4() {
tmp_366_fu_31533_p4 = bitcast_ln8_244_fu_31529_p1.read().range(30, 23);
}
void kernel7::thread_tmp_367_fu_31551_p4() {
tmp_367_fu_31551_p4 = bitcast_ln8_245_fu_31547_p1.read().range(30, 23);
}
void kernel7::thread_tmp_369_fu_31623_p4() {
tmp_369_fu_31623_p4 = bitcast_ln8_246_fu_31619_p1.read().range(30, 23);
}
void kernel7::thread_tmp_36_fu_21633_p4() {
tmp_36_fu_21633_p4 = bitcast_ln8_24_fu_21629_p1.read().range(30, 23);
}
void kernel7::thread_tmp_370_fu_31641_p4() {
tmp_370_fu_31641_p4 = bitcast_ln8_247_fu_31637_p1.read().range(30, 23);
}
void kernel7::thread_tmp_372_fu_31713_p4() {
tmp_372_fu_31713_p4 = bitcast_ln8_248_fu_31709_p1.read().range(30, 23);
}
void kernel7::thread_tmp_373_fu_31731_p4() {
tmp_373_fu_31731_p4 = bitcast_ln8_249_fu_31727_p1.read().range(30, 23);
}
void kernel7::thread_tmp_375_fu_31803_p4() {
tmp_375_fu_31803_p4 = bitcast_ln8_250_fu_31799_p1.read().range(30, 23);
}
void kernel7::thread_tmp_376_fu_31821_p4() {
tmp_376_fu_31821_p4 = bitcast_ln8_251_fu_31817_p1.read().range(30, 23);
}
void kernel7::thread_tmp_378_fu_31893_p4() {
tmp_378_fu_31893_p4 = bitcast_ln8_252_fu_31889_p1.read().range(30, 23);
}
void kernel7::thread_tmp_379_fu_31911_p4() {
tmp_379_fu_31911_p4 = bitcast_ln8_253_fu_31907_p1.read().range(30, 23);
}
void kernel7::thread_tmp_37_fu_21651_p4() {
tmp_37_fu_21651_p4 = bitcast_ln8_25_fu_21647_p1.read().range(30, 23);
}
void kernel7::thread_tmp_381_fu_31983_p4() {
tmp_381_fu_31983_p4 = bitcast_ln8_254_fu_31979_p1.read().range(30, 23);
}
void kernel7::thread_tmp_382_fu_32001_p4() {
tmp_382_fu_32001_p4 = bitcast_ln8_255_fu_31997_p1.read().range(30, 23);
}
void kernel7::thread_tmp_384_fu_32073_p4() {
tmp_384_fu_32073_p4 = bitcast_ln8_256_fu_32069_p1.read().range(30, 23);
}
void kernel7::thread_tmp_385_fu_32091_p4() {
tmp_385_fu_32091_p4 = bitcast_ln8_257_fu_32087_p1.read().range(30, 23);
}
void kernel7::thread_tmp_387_fu_32163_p4() {
tmp_387_fu_32163_p4 = bitcast_ln8_258_fu_32159_p1.read().range(30, 23);
}
void kernel7::thread_tmp_388_fu_32181_p4() {
tmp_388_fu_32181_p4 = bitcast_ln8_259_fu_32177_p1.read().range(30, 23);
}
void kernel7::thread_tmp_390_fu_32253_p4() {
tmp_390_fu_32253_p4 = bitcast_ln8_260_fu_32249_p1.read().range(30, 23);
}
void kernel7::thread_tmp_391_fu_32271_p4() {
tmp_391_fu_32271_p4 = bitcast_ln8_261_fu_32267_p1.read().range(30, 23);
}
void kernel7::thread_tmp_393_fu_32343_p4() {
tmp_393_fu_32343_p4 = bitcast_ln8_262_fu_32339_p1.read().range(30, 23);
}
void kernel7::thread_tmp_394_fu_32361_p4() {
tmp_394_fu_32361_p4 = bitcast_ln8_263_fu_32357_p1.read().range(30, 23);
}
void kernel7::thread_tmp_396_fu_32433_p4() {
tmp_396_fu_32433_p4 = bitcast_ln8_264_fu_32429_p1.read().range(30, 23);
}
void kernel7::thread_tmp_397_fu_32451_p4() {
tmp_397_fu_32451_p4 = bitcast_ln8_265_fu_32447_p1.read().range(30, 23);
}
void kernel7::thread_tmp_399_fu_32523_p4() {
tmp_399_fu_32523_p4 = bitcast_ln8_266_fu_32519_p1.read().range(30, 23);
}
void kernel7::thread_tmp_39_fu_21723_p4() {
tmp_39_fu_21723_p4 = bitcast_ln8_26_fu_21719_p1.read().range(30, 23);
}
void kernel7::thread_tmp_400_fu_32541_p4() {
tmp_400_fu_32541_p4 = bitcast_ln8_267_fu_32537_p1.read().range(30, 23);
}
void kernel7::thread_tmp_402_fu_32613_p4() {
tmp_402_fu_32613_p4 = bitcast_ln8_268_fu_32609_p1.read().range(30, 23);
}
void kernel7::thread_tmp_403_fu_32631_p4() {
tmp_403_fu_32631_p4 = bitcast_ln8_269_fu_32627_p1.read().range(30, 23);
}
void kernel7::thread_tmp_405_fu_32703_p4() {
tmp_405_fu_32703_p4 = bitcast_ln8_270_fu_32699_p1.read().range(30, 23);
}
void kernel7::thread_tmp_406_fu_32721_p4() {
tmp_406_fu_32721_p4 = bitcast_ln8_271_fu_32717_p1.read().range(30, 23);
}
void kernel7::thread_tmp_408_fu_32793_p4() {
tmp_408_fu_32793_p4 = bitcast_ln8_272_fu_32789_p1.read().range(30, 23);
}
void kernel7::thread_tmp_409_fu_32811_p4() {
tmp_409_fu_32811_p4 = bitcast_ln8_273_fu_32807_p1.read().range(30, 23);
}
void kernel7::thread_tmp_40_fu_21741_p4() {
tmp_40_fu_21741_p4 = bitcast_ln8_27_fu_21737_p1.read().range(30, 23);
}
void kernel7::thread_tmp_411_fu_32883_p4() {
tmp_411_fu_32883_p4 = bitcast_ln8_274_fu_32879_p1.read().range(30, 23);
}
void kernel7::thread_tmp_412_fu_32901_p4() {
tmp_412_fu_32901_p4 = bitcast_ln8_275_fu_32897_p1.read().range(30, 23);
}
void kernel7::thread_tmp_414_fu_32973_p4() {
tmp_414_fu_32973_p4 = bitcast_ln8_276_fu_32969_p1.read().range(30, 23);
}
void kernel7::thread_tmp_415_fu_32991_p4() {
tmp_415_fu_32991_p4 = bitcast_ln8_277_fu_32987_p1.read().range(30, 23);
}
void kernel7::thread_tmp_417_fu_33063_p4() {
tmp_417_fu_33063_p4 = bitcast_ln8_278_fu_33059_p1.read().range(30, 23);
}
void kernel7::thread_tmp_418_fu_33081_p4() {
tmp_418_fu_33081_p4 = bitcast_ln8_279_fu_33077_p1.read().range(30, 23);
}
void kernel7::thread_tmp_420_fu_33153_p4() {
tmp_420_fu_33153_p4 = bitcast_ln8_280_fu_33149_p1.read().range(30, 23);
}
void kernel7::thread_tmp_421_fu_33171_p4() {
tmp_421_fu_33171_p4 = bitcast_ln8_281_fu_33167_p1.read().range(30, 23);
}
void kernel7::thread_tmp_423_fu_33243_p4() {
tmp_423_fu_33243_p4 = bitcast_ln8_282_fu_33239_p1.read().range(30, 23);
}
void kernel7::thread_tmp_424_fu_33261_p4() {
tmp_424_fu_33261_p4 = bitcast_ln8_283_fu_33257_p1.read().range(30, 23);
}
void kernel7::thread_tmp_426_fu_33333_p4() {
tmp_426_fu_33333_p4 = bitcast_ln8_284_fu_33329_p1.read().range(30, 23);
}
void kernel7::thread_tmp_427_fu_33351_p4() {
tmp_427_fu_33351_p4 = bitcast_ln8_285_fu_33347_p1.read().range(30, 23);
}
void kernel7::thread_tmp_429_fu_33423_p4() {
tmp_429_fu_33423_p4 = bitcast_ln8_286_fu_33419_p1.read().range(30, 23);
}
void kernel7::thread_tmp_42_fu_21813_p4() {
tmp_42_fu_21813_p4 = bitcast_ln8_28_fu_21809_p1.read().range(30, 23);
}
void kernel7::thread_tmp_430_fu_33441_p4() {
tmp_430_fu_33441_p4 = bitcast_ln8_287_fu_33437_p1.read().range(30, 23);
}
}
|
974814561bec07046e4b33be3104da8681ce77eb | 492b86d65886ea7da419a7c4987cb0b599ea86ef | /15685_드래곤커브.cpp | 453d7a874e4f9b8b12fbf21ae8ad4340a9a94ed5 | [] | no_license | Jay-Ppark/Algorithm | c11a3cbc952b6f58ae08f5b603cee9278afd3ee1 | 99dc4d0a001f67c7189c728f084d4fd1e8333cd1 | refs/heads/master | 2023-04-30T13:19:19.766766 | 2023-04-25T08:23:11 | 2023-04-25T08:23:11 | 238,934,530 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 816 | cpp | 15685_드래곤커브.cpp | #include<iostream>
#include<vector>
using namespace std;
int N;
bool visited[101][101];
int dx[4]={1,0,-1,0};
int dy[4]={0,-1,0,1};
int countsquare(){
int cnt=0;
for(int i=0;i<=100;i++){
for(int j=0;j<=100;j++){
if(visited[i][j]){
if(i+1<=100&&j+1<=100){
if(visited[i+1][j]&&visited[i][j+1]&&visited[i+1][j+1]){
cnt++;
}
}
}
}
}
return cnt;
}
int main(void){
cin>>N;
for(int i=1;i<=N;i++){
int x,y,d,g;
cin>>x>>y>>d>>g;
vector<int> dragond;
dragond.push_back(d);
for(int j=1;j<=g;j++){
int dsize=dragond.size();
for(int k=dsize-1;k>=0;k--){
dragond.push_back((dragond[k]+1)%4);
}
}
visited[x][y]=true;
for(int j=0;j<dragond.size();j++){
x=x+dx[dragond[j]];
y=y+dy[dragond[j]];
visited[x][y]=true;
}
}
cout<<countsquare();
return 0;
} |
8d5e2bb251580e8f3ab3b5e53772295bbcc9f807 | c1720c81612dbd512dce413618d3cd246faa0a74 | /DEM/Src/L2/Physics/ExplosionAreaImpulse.h | 2b16a85eee401a0095888f39cd12d64c996d9329 | [
"MIT"
] | permissive | moltenguy1/deusexmachina | 307ba62a863034437cd77a6599c191ffe8ae953c | 134f4ca4087fff791ec30562cb250ccd50b69ee1 | refs/heads/master | 2021-01-23T21:35:42.122378 | 2012-10-03T23:33:16 | 2012-10-03T23:33:16 | 35,931,317 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,036 | h | ExplosionAreaImpulse.h | #pragma once
#ifndef __DEM_L2_PHYS_EXPL_AREA_IMPULSE_H__ //!!!to L1!
#define __DEM_L2_PHYS_EXPL_AREA_IMPULSE_H__
#include "AreaImpulse.h"
#include <Physics/Entity.h>
// Implements an area Impulse for a typical explosion. Applies an Impulse
// with exponentail falloff to all rigid bodies within the range of the
// explosion witch satisfy a line-of-sight test. After Apply() is called,
// the object can be asked about all physics entities which have been
// affected.
namespace Physics
{
class CContactPoint;
class CRigidBody;
class CExplosionAreaImpulse: public CAreaImpulse
{
DeclareRTTI;
DeclareFactory(CExplosionAreaImpulse);
private:
static nArray<CContactPoint> CollideContacts;
bool HandleRigidBody(CRigidBody* pBody, const vector3& Position);
public:
vector3 Position;
float Radius;
float Impulse;
CExplosionAreaImpulse(): Radius(1.0f), Impulse(1.0f) {}
virtual ~CExplosionAreaImpulse() {}
void Apply();
};
RegisterFactory(CExplosionAreaImpulse);
}
#endif
|
a77a8004c306c4bf783e0cfa4c57a0a6119b32b6 | e186df6ad5029e776330f6d3177212199f0e3bae | /nodeDisplay.h | c55b24623e55ad3392c8f930dde0a04a72a3435f | [
"MIT"
] | permissive | mkellydevv/vector_graphics_animator | 20c8ceb84a1791d5252a2b1b169269f39a8941a2 | fc46ec710138bd2220f7602e1aa6991d0153980e | refs/heads/master | 2020-04-25T07:39:53.737275 | 2019-03-27T10:17:57 | 2019-03-27T10:17:57 | 172,619,041 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,881 | h | nodeDisplay.h | #ifndef NODE_DISPLAY_H
#define NODE_DISPLAY_H
#include "display.h"
#include <sstream>
#include <string>
// FLTK
#include <FL/Fl_Button.H>
#include <FL/Fl_Color_Chooser.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Slider.H>
#include <Fl/Fl_Window.H>
class display; // Forward declaration
class nodeDisplay : public Fl_Window
{
private:
display* dis;
node* target; // The node that a chid will be added to or the node that will be edited
int displayType; // Determines if this is a new node display, or an edit node display
std::vector<gVector3> vertices; // The following are used to construct a new node, or edit the values of a node
std::string name;
int drawMode;
gVector3 originalColor;
public:
nodeDisplay(int x, int y, int w, int h, char* c, display* d, int type); // Constructor: Type - 0: New Node Display, 1: Edit Node Display
~nodeDisplay(); // Destructor
void loadWidgets(); // Instantiates FL Widgets
//Widgets
Fl_Input* nodeNameInput;
Fl_Input* vertexInput;
Fl_Button* addVertexButton;
Fl_Box* verticesBox;
Fl_Color_Chooser* colorChooser;
Fl_Slider* typeSlider;
Fl_Button* clearVerticesButton;
Fl_Input * widthInput;
Fl_Input* heightInput;
Fl_Button* addPolyButton;
Fl_Button* addQuadButton;
//Callback methods
static void addVertexCB(Fl_Widget* w, void* data); // Adds a vertex to this->vertices. Usage - "x y"
static void colorCB(Fl_Widget* w, void* data); // Choose original color of the node
static void sliderCB(Fl_Widget* w, void* data); // Choose the draw mode of the node
static void clearVerticesCB(Fl_Widget* w, void* data); // Clears all vertices from this->vertices
static void addPolyCB(Fl_Widget* w, void* data); // Adds or edits a node using this->vertices
static void addQuadCB(Fl_Widget* w, void* data); // Adds or edits a node using width and height values
};
#endif |
7398cc5e058c382217830430bcfd6b160cec76a5 | 046c3dc74e8d843382a05b09edfbbc569dbaf161 | /tpc/TpcGeo.cxx | c5229308588511ae4947d9f73625a328f1feb032 | [
"FSFUL"
] | permissive | nburmaso/mpdroot | 13d84e027b14754f5ff5d8ced7a47587319b97f5 | f49cc155cf6256cae619032820b3382604527e05 | refs/heads/master | 2023-07-15T20:06:59.386155 | 2017-04-03T13:55:17 | 2017-04-03T13:55:17 | 379,908,134 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,364 | cxx | TpcGeo.cxx | //-----------------------------------------------------------
// File and Version Information:
// $Id$
//
// Description:
// Implementation of class TpcGeo
// see TpcGeo.hh for details
//
// Environment:
// Software developed for the PANDA Detector at FAIR.
//
// Author List:
// Sebastian Neubert TUM (original author)
//
//
//-----------------------------------------------------------
// Panda Headers ----------------------
// This Class' Header ------------------
#include "TpcGeo.h"
// C/C++ Headers ----------------------
// Collaborating Class Headers --------
#include "FairGeoNode.h"
// Class Member definitions -----------
ClassImp(TpcGeo)
// ----- Default constructor -------------------------------------------
TpcGeo::TpcGeo() {
// Constructor
fName="tpc";
maxSectors=9;
maxModules=9;
}
// -------------------------------------------------------------------------
const char* TpcGeo::getModuleName(Int_t m) {
// Returns the module name of Tpc number m
// Setting tpc here means that all modules names in the ASCII file should start with tpc otherwise they will not be constructed
sprintf(modName,"tpcChamber%i",m+1);
return modName;
}
const char* TpcGeo::getEleName(Int_t m) {
// Returns the element name of Det number m
sprintf(eleName,"tpc0%i",m+1);
return eleName;
}
|
43698188e2d84e94e700aebacf656a54191a081f | 233091e92faa761844e27c61e14fcb83a7267d81 | /Lista3Lacos/Lista3SalaExer1.cpp | 11adab7ee6d6adda96187d5b2bbad39a8609dd3f | [] | no_license | jamilligioielli/LG1-LinguagemC | ad1d739eb6d46a7af4f5b2ddbc4a255667a0eed6 | db2afed242d1a180929a87098cafc9ccf5ac1c25 | refs/heads/main | 2023-05-31T03:44:55.703689 | 2021-06-10T15:48:07 | 2021-06-10T15:48:07 | 375,750,975 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 183 | cpp | Lista3SalaExer1.cpp | #include<stdio.h>
#include<conio.h>
int main()
{
int cont;
for(cont=0; cont<=20; ++cont)
{
if (cont%2 != 0)
printf ("%d \n", cont);
}
getch ();
return 0;
}
|
f33544a603190f747dc80c6adb52093134afeb96 | 5bef53b0dc9539a4953919f75fde1f0ebd20e9fb | /ALLAME_CONTEST/CNTST_3/A1D.cpp | ca0dae7ad0e117b7368a83d99b244a590b924d99 | [] | no_license | atrin-hojjat/CompetetiveProgramingCodes | 54c8b94092f7acf40d379e42e1f2c0fe8dab9b32 | 6a02071c3869b8e7cd873ddf7a3a2d678aec6d91 | refs/heads/master | 2020-11-25T10:51:23.200000 | 2020-10-08T11:12:09 | 2020-10-08T11:12:09 | 228,626,397 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,453 | cpp | A1D.cpp | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <cstring>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <math.h>
#include <stack>
#include <deque>
#define mp make_pair
#define F first
#define pb push_back
#define FOR(i,j,n) for(int i=j;i<n;i++)
#define F0R(i,j,n) for(int i=j;i<=n;i++)
#define RFOR(i,j,n) for(int i=n-1;i>=j;i--)
#define RF0R(i,j,n) for(int i=n;i>=j;i--)
#define FOREACH(x,v) for(auto x:v)
#define ITFOR(it,v) for(__typeof(v.begin()) it =v.begin();it!=v.end();++it)
#define __in_arr__(a,j,n) FOR(i,j,n)cin >> a[i];
#define __out_arr__(a,j,n) FOR(i,j,n)cout << a[i];
#define LOG cout << "[ !" << __LINE__ << "L ] " << endl;
#define PLOG(x) cout << "[ !" << __LINE__ << "L ] " <<x<<endl;
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
typedef pair<int,pii> piii;
typedef vector<int> vi;
typedef vector<pii> vii;
typedef vector<ll> vl;
const int MAXN = 752;
const int MOD = 1e9+7;
int dp[MAXN];
int tab[MAXN][MAXN];
struct BIT {
int *bit;
int n;
BIT(int n) : n(n) {
bit = new int[n+1]();
}
void add(int x,int v) {
while(x<=n)
bit[x] = (v+bit[x]*1LL)%MOD,x+=x&-x;
}
int get(int x) {
int ans = 0;
while(x)
ans=(ans+bit[x]*1LL)%MOD,x^=x&-x;
return ans;
}
};
struct RMBIT {
map<int,int> *m;//[1000];
// int **m;
int n;
RMBIT(int n,int k) : n(n) {
m = new map<int,int>[n+1]();
// F0R(i,0,n) m[i] = new int[k+1]();
}
void add(int x,int y,int val) {
while(x<=n)
m[x][y]=(m[x][y]*1LL+val*1LL)%MOD,x+=x&-x;
}
int get(int x,int y) {
int ans = 0;
while(x)
ans=(ans*1LL+m[x][y]*1LL)%MOD,x^=x&-x;
return ans;
}
} ;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);cout.tie(NULL);
int r,c,k;
cin>> r >> c >> k;
if(r<c) {
F0R(i,1,r) F0R(j,1,c) cin >> tab[j][i];
swap(r,c);
} else
F0R(i,1,r) F0R(j,1,c) cin >> tab[i][j];
BIT S = BIT(c);
RMBIT R = RMBIT(c,k);
S.add(1,1);
R.add(1,tab[1][1],1);
FOR(i,2,r) {
FOR(j,2,c)
dp[j] = (S.get(j-1)-R.get(j-1,tab[i][j])+MOD)%MOD;
FOR(j,2,c)
S.add(j,dp[j]),R.add(j,tab[i][j],dp[j]);
}
dp[c] = (S.get(c-1)-R.get(c-1,tab[r][c])+MOD)%MOD;
cout << dp[c] << endl;
return 0;
}
|
7375e283ef8aa43485aa4989abb5446fef536789 | 74de2479d5a8932c810a0cc37e48685fcd936fa5 | /facetracknoir/facetracknoir.cpp | bb0cef111882d1c1051815a246d2f415495c03b0 | [] | no_license | hfeeki/opentrack | 290593d9347b603cac91e005f490e9152c1e038f | 6fea9e0befc3f1d63bbdccaabaec767863972c46 | refs/heads/master | 2023-08-21T23:48:31.659691 | 2013-08-24T20:33:52 | 2013-08-24T20:33:52 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 52,554 | cpp | facetracknoir.cpp | /********************************************************************************
* FaceTrackNoIR This program is a private project of the some enthusiastic *
* gamers from Holland, who don't like to pay much for *
* head-tracking. *
* *
* Copyright (C) 2011 Wim Vriend (Developing) *
* Ron Hendriks (Researching and Testing) *
* *
* Homepage *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 3 of the License, or (at your *
* option) any later version. *
* *
* This program is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
* more details. *
* *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, see <http://www.gnu.org/licenses/>. *
*********************************************************************************/
/*
Modifications (last one on top):
20130101 - WVR: Added "None" to filter-listbox to remove "use advanced filtering".
20121209 - WVR: Pre-v170 DLLs will not be added to the Listbox. Initial selection was changed (made case-insensitive).
20121014 - WVR: Added second Tracker Source for Arduino solution. The two will be mutually exclusive.
20120929 - WVR: Disable button Filter-settings when StartTracker.
20120918 - WVR: When AutoStart is TRUE, the program is not directly minimized any more.
This now depends on the AutoMinimize time. Fixed the 'not showing' of the MIB.
Also disable combo and buttons after 'Start'.
20120917 - WVR: Added Mouse-buttons to ShortKeys.
20120717 - WVR: FunctionConfig is now used for the Curves, instead of BezierConfig.
20120427 - WVR: The Protocol-code was already in separate DLLs, but the ListBox was still filled 'statically'. Now, a Dir() of the
EXE-folder is done, to locate Protocol-DLLs. The Icons were also moved to the DLLs
20120317 - WVR: The Filter and Tracker-code was moved to separate DLLs. The calling-method
was changed accordingly. The save() and LoadSettings() functions were adapted.
The face-tracker member-functions NotifyZeroed and refreshVideo were added, as
requested by Stanislaw.
20110813 - WVR: Changed the presentation of the raw inputs: now a decimal digit will even show when '0'.
20110404 - WVR: Migrated the FlightGear protocol to a separate DLL. The rest must follow...
20110401 - WVR: The about-dialog was shown 'misplaced'. It was corrected.
20110328 - WVR: Added the display for output-pose.
20110207 - WVR: RadioButtons for 'Stop engine' added. It is now possible to choose Stop or Keep tracking.
20110109 - WVR: Added minimizeTaskBar option added. It is now possible to choose minimized or tray.
*/
#include "facetracknoir.h"
#include "tracker.h"
#include <ftnoir_tracker_ht/ht-api.h>
#include <QDebug>
#if defined(__WIN32) || defined(_WIN32)
# include <windows.h>
#endif
#if defined(__APPLE__)
# define SONAME "dylib"
#elif defined(_WIN32) || defined(__WIN32)
# define SONAME "dll"
#else
# define SONAME "so"
#endif
#include <iostream>
#if defined(__WIN32) || defined(_WIN32)
#undef DIRECTINPUT_VERSION
#define DIRECTINPUT_VERSION 0x0800
#include <dshow.h>
#include <dinput.h>
KeybindingWorkerDummy::~KeybindingWorkerDummy() {
if (dinkeyboard) {
dinkeyboard->Unacquire();
dinkeyboard->Release();
}
if (din)
din->Release();
}
KeybindingWorkerDummy::KeybindingWorkerDummy(FaceTrackNoIR& w, Key keyCenter)
: kCenter(keyCenter), window(w), should_quit(true), din(0), dinkeyboard(0)
{
if (DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&din, NULL) != DI_OK) {
qDebug() << "setup DirectInput8 Creation failed!" << GetLastError();
return;
}
if (din->CreateDevice(GUID_SysKeyboard, &dinkeyboard, NULL) != DI_OK) {
din->Release();
din = 0;
qDebug() << "setup CreateDevice function failed!" << GetLastError();
return;
}
if (dinkeyboard->SetDataFormat(&c_dfDIKeyboard) != DI_OK) {
qDebug() << "setup SetDataFormat function failed!" << GetLastError();
dinkeyboard->Release();
dinkeyboard = 0;
din->Release();
din = 0;
return;
}
if (dinkeyboard->SetCooperativeLevel(window.winId(), DISCL_NONEXCLUSIVE | DISCL_BACKGROUND) != DI_OK) {
dinkeyboard->Release();
din->Release();
din = 0;
dinkeyboard = 0;
qDebug() << "setup SetCooperativeLevel function failed!" << GetLastError();
return;
}
if (dinkeyboard->Acquire() != DI_OK)
{
dinkeyboard->Release();
din->Release();
din = 0;
dinkeyboard = 0;
qDebug() << "setup dinkeyboard Acquire failed!" << GetLastError();
return;
}
should_quit = false;
}
#define PROCESS_KEY(k, s) \
if (isKeyPressed(&k, keystate) && (!k.ever_pressed ? (k.timer.start(), k.ever_pressed = true) : k.timer.restart() > 100)) \
window.s();
static bool isKeyPressed( const Key *key, const BYTE *keystate ) {
bool shift;
bool ctrl;
bool alt;
if (keystate[key->keycode] & 0x80) {
shift = ( (keystate[DIK_LSHIFT] & 0x80) || (keystate[DIK_RSHIFT] & 0x80) );
ctrl = ( (keystate[DIK_LCONTROL] & 0x80) || (keystate[DIK_RCONTROL] & 0x80) );
alt = ( (keystate[DIK_LALT] & 0x80) || (keystate[DIK_RALT] & 0x80) );
//
// If one of the modifiers is needed and not pressed, return false.
//
if (key->shift && !shift) return false;
if (key->ctrl && !ctrl) return false;
if (key->alt && !alt) return false;
//
// All is well!
//
return true;
}
return false;
}
void KeybindingWorkerDummy::run() {
BYTE keystate[256];
while (!should_quit)
{
if (dinkeyboard->GetDeviceState(256, (LPVOID)keystate) != DI_OK) {
qDebug() << "Tracker::run GetDeviceState function failed!" << GetLastError();
Sleep(25);
continue;
}
PROCESS_KEY(kCenter, shortcutRecentered);
Sleep(25);
}
}
#else
#endif
#ifdef _MSC_VER
# define LIB_PREFIX ""
#else
# define LIB_PREFIX "lib"
#endif
//
// Setup the Main Dialog
//
FaceTrackNoIR::FaceTrackNoIR(QWidget *parent, Qt::WFlags flags) :
#if defined(__WIN32) || defined(_WIN32)
keybindingWorker(NULL),
#else
keyCenter(0),
#endif
QMainWindow(parent, flags),
pTrackerDialog(NULL),
pSecondTrackerDialog(NULL),
pProtocolDialog(NULL),
pFilterDialog(NULL),
looping(false),
timUpdateHeadPose(this)
{
ui.setupUi(this);
cameraDetected = false;
//
// Initialize Widget handles, to prevent memory-access errors.
//
_keyboard_shortcuts = 0;
_curve_config = 0;
tracker = 0;
setupFaceTrackNoIR();
//Q_INIT_RESOURCE(PoseWidget);
ui.lblX->setVisible(false);
ui.lblY->setVisible(false);
ui.lblZ->setVisible(false);
ui.lblRotX->setVisible(false);
ui.lblRotY->setVisible(false);
ui.lblRotZ->setVisible(false);
ui.lcdNumOutputPosX->setVisible(false);
ui.lcdNumOutputPosY->setVisible(false);
ui.lcdNumOutputPosZ->setVisible(false);
ui.lcdNumOutputRotX->setVisible(false);
ui.lcdNumOutputRotY->setVisible(false);
ui.lcdNumOutputRotZ->setVisible(false);
}
/** sets up all objects and connections to buttons */
void FaceTrackNoIR::setupFaceTrackNoIR() {
// if we simply place a global variable with THeadPoseData,
// it gets initialized and pulls in QSettings before
// main() starts. program can and will crash.
ui.headPoseWidget->show();
ui.video_frame->hide();
// menu objects will be connected with the functions in FaceTrackNoIR class
connect(ui.btnLoad, SIGNAL(clicked()), this, SLOT(open()));
connect(ui.btnSave, SIGNAL(clicked()), this, SLOT(save()));
connect(ui.btnSaveAs, SIGNAL(clicked()), this, SLOT(saveAs()));
connect(ui.btnEditCurves, SIGNAL(clicked()), this, SLOT(showCurveConfiguration()));
connect(ui.btnShortcuts, SIGNAL(clicked()), this, SLOT(showKeyboardShortcuts()));
connect(ui.btnShowEngineControls, SIGNAL(clicked()), this, SLOT(showTrackerSettings()));
connect(ui.btnShowSecondTrackerSettings, SIGNAL(clicked()), this, SLOT(showSecondTrackerSettings()));
connect(ui.btnShowServerControls, SIGNAL(clicked()), this, SLOT(showServerControls()));
connect(ui.btnShowFilterControls, SIGNAL(clicked()), this, SLOT(showFilterControls()));
// Connect checkboxes
connect(ui.chkInvertYaw, SIGNAL(stateChanged(int)), this, SLOT(setInvertYaw(int)));
connect(ui.chkInvertRoll, SIGNAL(stateChanged(int)), this, SLOT(setInvertRoll(int)));
connect(ui.chkInvertPitch, SIGNAL(stateChanged(int)), this, SLOT(setInvertPitch(int)));
connect(ui.chkInvertX, SIGNAL(stateChanged(int)), this, SLOT(setInvertX(int)));
connect(ui.chkInvertY, SIGNAL(stateChanged(int)), this, SLOT(setInvertY(int)));
connect(ui.chkInvertZ, SIGNAL(stateChanged(int)), this, SLOT(setInvertZ(int)));
// button methods connect with methods in this class
connect(ui.btnStartTracker, SIGNAL(clicked()), this, SLOT(startTracker()));
connect(ui.btnStopTracker, SIGNAL(clicked()), this, SLOT(stopTracker()));
//read the camera-name, using DirectShow
GetCameraNameDX();
//Create the system-tray and connect the events for that.
createIconGroupBox();
//Load the tracker-settings, from the INI-file
loadSettings();
connect(ui.iconcomboProtocol, SIGNAL(currentIndexChanged(int)), this, SLOT(protocolSelected(int)));
connect(ui.iconcomboProfile, SIGNAL(currentIndexChanged(int)), this, SLOT(profileSelected(int)));
connect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
connect(ui.iconcomboFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(filterSelected(int)));
//Setup the timer for showing the headpose.
connect(&timUpdateHeadPose, SIGNAL(timeout()), this, SLOT(showHeadPose()));
ui.txtTracking->setVisible(false);
settingsDirty = false;
}
/** destructor stops the engine and quits the faceapi **/
FaceTrackNoIR::~FaceTrackNoIR() {
//
// Stop the tracker, by simulating a button-push
//
stopTracker();
save();
}
//
// Update the Settings, after a value has changed. This way, the Tracker does not have to re-start.
//
void FaceTrackNoIR::updateSettings() {
if ( tracker != NULL ) {
tracker->loadSettings();
}
}
//
// Get a pointer to the video-widget, to use in the DLL
//
QFrame *FaceTrackNoIR::get_video_widget() {
return ui.video_frame;
}
/** read the name of the first video-capturing device at start up **/
/** FaceAPI can only use this first one... **/
void FaceTrackNoIR::GetCameraNameDX() {
#if defined(_WIN32)
ui.cameraName->setText("No video-capturing device was found in your system: check if it's connected!");
// Create the System Device Enumerator.
HRESULT hr;
ICreateDevEnum *pSysDevEnum = NULL;
hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, (void **)&pSysDevEnum);
if (FAILED(hr))
{
qDebug() << "GetWDM says: CoCreateInstance Failed!";
return;
}
qDebug() << "GetWDM says: CoCreateInstance succeeded!";
// Obtain a class enumerator for the video compressor category.
IEnumMoniker *pEnumCat = NULL;
hr = pSysDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pEnumCat, 0);
if (hr == S_OK) {
qDebug() << "GetWDM says: CreateClassEnumerator succeeded!";
// Enumerate the monikers.
IMoniker *pMoniker = NULL;
ULONG cFetched;
if (pEnumCat->Next(1, &pMoniker, &cFetched) == S_OK) {
IPropertyBag *pPropBag;
hr = pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void **)&pPropBag);
if (SUCCEEDED(hr)) {
// To retrieve the filter's friendly name, do the following:
VARIANT varName;
VariantInit(&varName);
hr = pPropBag->Read(L"FriendlyName", &varName, 0);
if (SUCCEEDED(hr))
{
// Display the name in your UI somehow.
QString str((QChar*)varName.bstrVal, wcslen(varName.bstrVal));
qDebug() << "GetWDM says: Moniker found:" << str;
ui.cameraName->setText(str);
}
VariantClear(&varName);
////// To create an instance of the filter, do the following:
////IBaseFilter *pFilter;
////hr = pMoniker->BindToObject(NULL, NULL, IID_IBaseFilter,
//// (void**)&pFilter);
// Now add the filter to the graph.
//Remember to release pFilter later.
pPropBag->Release();
}
pMoniker->Release();
}
pEnumCat->Release();
}
pSysDevEnum->Release();
#endif
}
//
// Open an INI-file with the QFileDialog
// If succesfull, the settings in it will be read
//
void FaceTrackNoIR::open() {
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::ExistingFile);
QString fileName = dialog.getOpenFileName(
this,
tr("Select one FTNoir settings file"),
QCoreApplication::applicationDirPath() + "/Settings/",
tr("Settings file (*.ini);;All Files (*)"),
NULL);
//
// If a file was selected, save it's name and read it's contents.
//
if (! fileName.isEmpty() ) {
QSettings settings("opentrack"); // Registry settings (in HK_USER)
settings.setValue ("SettingsFile", QFileInfo(fileName).absoluteFilePath());
loadSettings();
}
}
//
// Save the current Settings to the currently 'active' INI-file.
//
void FaceTrackNoIR::save() {
QSettings settings("opentrack"); // Registry settings (in HK_USER)
QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
iniFile.beginGroup ( "Tracking" );
iniFile.setValue ( "invertYaw", ui.chkInvertYaw->isChecked() );
iniFile.setValue ( "invertPitch", ui.chkInvertPitch->isChecked() );
iniFile.setValue ( "invertRoll", ui.chkInvertRoll->isChecked() );
iniFile.setValue ( "invertX", ui.chkInvertX->isChecked() );
iniFile.setValue ( "invertY", ui.chkInvertY->isChecked() );
iniFile.setValue ( "invertZ", ui.chkInvertZ->isChecked() );
iniFile.endGroup ();
iniFile.beginGroup ( "GameProtocol" );
{
DynamicLibrary* proto = dlopen_protocols.value( ui.iconcomboProtocol->currentIndex(), (DynamicLibrary*) NULL);
iniFile.setValue ( "DLL", proto == NULL ? "" : proto->filename);
}
iniFile.endGroup ();
iniFile.beginGroup ( "TrackerSource" );
{
DynamicLibrary* tracker = dlopen_trackers.value( ui.iconcomboTrackerSource->currentIndex(), (DynamicLibrary*) NULL);
iniFile.setValue ( "DLL", tracker == NULL ? "" : tracker->filename);
}
{
DynamicLibrary* tracker = dlopen_trackers.value( ui.cbxSecondTrackerSource->currentIndex() - 1, (DynamicLibrary*) NULL);
iniFile.setValue ( "2ndDLL", tracker == NULL ? "" : tracker->filename);
}
iniFile.endGroup ();
//
// Save the name of the filter in the INI-file.
//
iniFile.beginGroup ( "Filter" );
{
DynamicLibrary* filter = dlopen_filters.value( ui.iconcomboFilter->currentIndex(), (DynamicLibrary*) NULL);
iniFile.setValue ( "DLL", filter == NULL ? "" : filter->filename);
}
iniFile.endGroup ();
settingsDirty = false;
}
//
// Get the new name of the INI-file and save the settings to it.
//
// The user may choose to overwrite an existing file. This will be deleted, before copying the current file to it.
//
void FaceTrackNoIR::saveAs()
{
//
// Get the current filename of the INI-file.
//
QSettings settings("opentrack"); // Registry settings (in HK_USER)
QString oldFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
//
// Get the new filename of the INI-file.
//
QString fileName = QFileDialog::getSaveFileName(this, tr("Save file"),
oldFile,
// QCoreApplication::applicationDirPath() + "/Settings",
tr("Settings file (*.ini);;All Files (*)"));
if (!fileName.isEmpty()) {
//
// Remove the file, if it already exists.
//
QFileInfo newFileInfo ( fileName );
if ((newFileInfo.exists()) && (oldFile != fileName)) {
QFile newFileFile ( fileName );
newFileFile.remove();
}
//
// Copy the current INI-file to the new name.
//
QFileInfo oldFileInfo ( oldFile );
if (oldFileInfo.exists()) {
QFile oldFileFile ( oldFile );
oldFileFile.copy( fileName );
}
//
// Write the new name to the Registry and save the other INI-values.
//
settings.setValue ("SettingsFile", fileName);
save();
//
// Reload the settings, to get the GUI right again...
//
loadSettings();
}
}
//
// Load the current Settings from the currently 'active' INI-file.
//
void FaceTrackNoIR::loadSettings() {
looping = true;
qDebug() << "loadSettings says: Starting ";
QSettings settings("opentrack"); // Registry settings (in HK_USER)
QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
qDebug() << "Config file now" << currentFile;
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
//
// Put the filename in the window-title.
//
QFileInfo pathInfo ( currentFile );
setWindowTitle ( "opentrack (1.8 alpha) - " + pathInfo.fileName() );
//
// Get a List of all the INI-files in the (currently active) Settings-folder.
//
QDir settingsDir( pathInfo.dir() );
QStringList filters;
filters << "*.ini";
iniFileList.clear();
iniFileList = settingsDir.entryList( filters, QDir::Files, QDir::Name );
//
// Add strings to the Listbox.
//
ui.iconcomboProfile->clear();
for ( int i = 0; i < iniFileList.size(); i++) {
ui.iconcomboProfile->addItem(QIcon(":/images/settings16.png"), iniFileList.at(i));
if (iniFileList.at(i) == pathInfo.fileName()) {
ui.iconcomboProfile->setItemIcon(i, QIcon(":/images/settingsopen16.png"));
ui.iconcomboProfile->setCurrentIndex( i );
}
}
qDebug() << "loadSettings says: iniFile = " << currentFile;
iniFile.beginGroup ( "Tracking" );
ui.chkInvertYaw->setChecked (iniFile.value ( "invertYaw", 0 ).toBool());
ui.chkInvertPitch->setChecked (iniFile.value ( "invertPitch", 0 ).toBool());
ui.chkInvertRoll->setChecked (iniFile.value ( "invertRoll", 0 ).toBool());
ui.chkInvertX->setChecked (iniFile.value ( "invertX", 0 ).toBool());
ui.chkInvertY->setChecked (iniFile.value ( "invertY", 0 ).toBool());
ui.chkInvertZ->setChecked (iniFile.value ( "invertZ", 0 ).toBool());
iniFile.endGroup ();
// Read the currently selected Protocol from the INI-file.
// If the setting "DLL" isn't found (pre-1.7 version of INI), then the setting 'Selection' is evaluated.
//
iniFile.beginGroup ( "GameProtocol" );
QString selectedProtocolName = iniFile.value ( "DLL", "" ).toString();
iniFile.endGroup ();
//
// Find the Index of the DLL and set the selection.
//
for ( int i = 0; i < dlopen_protocols.size(); i++) {
if (dlopen_protocols.at(i)->filename.compare( selectedProtocolName, Qt::CaseInsensitive ) == 0) {
ui.iconcomboProtocol->setCurrentIndex( i );
break;
}
}
//
// Read the currently selected Tracker from the INI-file.
// If the setting "DLL" isn't found (pre-1.7 version), then the setting 'Selection' is evaluated.
//
iniFile.beginGroup ( "TrackerSource" );
QString selectedTrackerName = iniFile.value ( "DLL", "" ).toString();
qDebug() << "loadSettings says: selectedTrackerName = " << selectedTrackerName;
QString secondTrackerName = iniFile.value ( "2ndDLL", "None" ).toString();
qDebug() << "loadSettings says: secondTrackerName = " << secondTrackerName;
iniFile.endGroup ();
for ( int i = 0; i < dlopen_trackers.size(); i++) {
DynamicLibrary* foo = dlopen_trackers.at(i);
if (foo && foo->filename.compare( selectedTrackerName, Qt::CaseInsensitive ) == 0) {
ui.iconcomboTrackerSource->setCurrentIndex( i );
}
if (foo && foo->filename.compare( secondTrackerName, Qt::CaseInsensitive ) == 0) {
ui.cbxSecondTrackerSource->setCurrentIndex( i + 1 );
}
}
//
// Read the currently selected Filter from the INI-file.
//
iniFile.beginGroup ( "Filter" );
QString selectedFilterName = iniFile.value ( "DLL", "" ).toString();
qDebug() << "createIconGroupBox says: selectedFilterName = " << selectedFilterName;
iniFile.endGroup ();
//
// Find the Index of the DLL and set the selection.
//
for ( int i = 0; i < dlopen_filters.size(); i++) {
DynamicLibrary* foo = dlopen_filters.at(i);
if (foo && foo->filename.compare( selectedFilterName, Qt::CaseInsensitive ) == 0) {
ui.iconcomboFilter->setCurrentIndex( i );
break;
}
}
settingsDirty = false;
looping = false;
}
/** start tracking the face **/
void FaceTrackNoIR::startTracker( ) {
bindKeyboardShortcuts();
//
// Disable buttons
//
ui.iconcomboProfile->setEnabled ( false );
ui.btnLoad->setEnabled ( false );
ui.btnSave->setEnabled ( false );
ui.btnSaveAs->setEnabled ( false );
ui.btnShowFilterControls->setEnabled ( false );
//
// Create the Tracker and setup
//
if (Libraries)
delete Libraries;
Libraries = new SelectedLibraries(this);
if (!Libraries->correct)
{
QMessageBox::warning(this, "Something went wrong", "Tracking can't be initialized, probably protocol prerequisites missing", QMessageBox::Ok, QMessageBox::NoButton);
stopTracker();
return;
}
#if defined(_WIN32) || defined(__WIN32)
keybindingWorker = new KeybindingWorker(*this, keyCenter);
keybindingWorker->start();
#endif
if (tracker) {
tracker->wait();
delete tracker;
}
QSettings settings("opentrack"); // Registry settings (in HK_USER)
QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
for (int i = 0; i < 6; i++)
{
axis(i).curve.loadSettings(iniFile);
axis(i).curveAlt.loadSettings(iniFile);
}
static const char* names[] = {
"tx_alt",
"ty_alt",
"tz_alt",
"rx_alt",
"ry_alt",
"rz_alt",
};
static const char* invert_names[] = {
"invertX",
"invertY",
"invertZ",
"invertYaw",
"invertPitch",
"invertRoll"
};
iniFile.beginGroup("Tracking");
for (int i = 0; i < 6; i++) {
axis(i).altp = iniFile.value(names[i], false).toBool();
axis(i).invert = iniFile.value(invert_names[i], false).toBool() ? 1 : -1;
}
iniFile.endGroup();
tracker = new Tracker ( this );
//
// Setup the Tracker and send the settings.
// This is necessary, because the events are only triggered 'on change'
//
tracker->setInvertAxis(Yaw, ui.chkInvertYaw->isChecked() );
tracker->setInvertAxis(Pitch, ui.chkInvertPitch->isChecked() );
tracker->setInvertAxis(Roll, ui.chkInvertRoll->isChecked() );
tracker->setInvertAxis(TX, ui.chkInvertX->isChecked() );
tracker->setInvertAxis(TY, ui.chkInvertY->isChecked() );
tracker->setInvertAxis(TZ, ui.chkInvertZ->isChecked() );
tracker->start();
//
// Register the Tracker instance with the Tracker Dialog (if open)
//
if (pTrackerDialog && Libraries->pTracker) {
pTrackerDialog->registerTracker( Libraries->pTracker );
}
ui.headPoseWidget->show();
//
ui.btnStartTracker->setEnabled ( false );
ui.btnStopTracker->setEnabled ( true );
// Enable/disable Protocol-server Settings
ui.iconcomboTrackerSource->setEnabled ( false );
ui.cbxSecondTrackerSource->setEnabled ( false );
ui.iconcomboProtocol->setEnabled ( false );
ui.btnShowServerControls->setEnabled ( false );
ui.iconcomboFilter->setEnabled ( false );
//
// Update the camera-name, FaceAPI can only use the 1st one found!
//
GetCameraNameDX();
//
// Start the timer to update the head-pose (digits and 'man in black')
//
timUpdateHeadPose.start(40);
ui.lblX->setVisible(true);
ui.lblY->setVisible(true);
ui.lblZ->setVisible(true);
ui.lblRotX->setVisible(true);
ui.lblRotY->setVisible(true);
ui.lblRotZ->setVisible(true);
ui.lcdNumOutputPosX->setVisible(true);
ui.lcdNumOutputPosY->setVisible(true);
ui.lcdNumOutputPosZ->setVisible(true);
ui.lcdNumOutputRotX->setVisible(true);
ui.lcdNumOutputRotY->setVisible(true);
ui.lcdNumOutputRotZ->setVisible(true);
}
/** stop tracking the face **/
void FaceTrackNoIR::stopTracker( ) {
ui.game_name->setText("Not connected");
#if defined(_WIN32) || defined(__WIN32)
if (keybindingWorker)
{
keybindingWorker->should_quit = true;
keybindingWorker->wait();
delete keybindingWorker;
keybindingWorker = NULL;
}
#endif
//
// Stop displaying the head-pose.
//
timUpdateHeadPose.stop();
ui.pose_display->rotateBy(0, 0, 0);
ui.lblX->setVisible(false);
ui.lblY->setVisible(false);
ui.lblZ->setVisible(false);
ui.lblRotX->setVisible(false);
ui.lblRotY->setVisible(false);
ui.lblRotZ->setVisible(false);
ui.lcdNumOutputPosX->setVisible(false);
ui.lcdNumOutputPosY->setVisible(false);
ui.lcdNumOutputPosZ->setVisible(false);
ui.lcdNumOutputRotX->setVisible(false);
ui.lcdNumOutputRotY->setVisible(false);
ui.lcdNumOutputRotZ->setVisible(false);
ui.txtTracking->setVisible(false);
//
// Delete the tracker (after stopping things and all).
//
if ( tracker ) {
qDebug() << "Done with tracking";
tracker->should_quit = true;
tracker->wait();
qDebug() << "stopTracker says: Deleting tracker!";
delete tracker;
qDebug() << "stopTracker says: Tracker deleted!";
tracker = 0;
if (Libraries) {
delete Libraries;
Libraries = NULL;
}
}
//
// UnRegister the Tracker instance with the Tracker Dialog (if open)
//
if (pTrackerDialog) {
pTrackerDialog->unRegisterTracker();
}
if (pProtocolDialog) {
pProtocolDialog->unRegisterProtocol();
}
ui.btnStartTracker->setEnabled ( true );
ui.btnStopTracker->setEnabled ( false );
// ui.btnShowEngineControls->setEnabled ( false );
ui.iconcomboProtocol->setEnabled ( true );
ui.iconcomboTrackerSource->setEnabled ( true );
ui.cbxSecondTrackerSource->setEnabled ( true );
ui.iconcomboFilter->setEnabled ( true );
// Enable/disable Protocol-server Settings
ui.btnShowServerControls->setEnabled ( true );
ui.video_frame->hide();
//
ui.iconcomboProfile->setEnabled ( true );
ui.btnLoad->setEnabled ( true );
ui.btnSave->setEnabled ( true );
ui.btnSaveAs->setEnabled ( true );
ui.btnShowFilterControls->setEnabled ( true );
}
/** set the invert from the checkbox **/
void FaceTrackNoIR::setInvertAxis(Axis axis, int invert ) {
if (tracker)
tracker->setInvertAxis (axis, (invert != 0)?true:false );
settingsDirty = true;
}
/** Show the headpose in the widget (triggered by timer) **/
void FaceTrackNoIR::showHeadPose() {
double newdata[6];
ui.lblX->setVisible(true);
ui.lblY->setVisible(true);
ui.lblZ->setVisible(true);
ui.lblRotX->setVisible(true);
ui.lblRotY->setVisible(true);
ui.lblRotZ->setVisible(true);
ui.lcdNumOutputPosX->setVisible(true);
ui.lcdNumOutputPosY->setVisible(true);
ui.lcdNumOutputPosZ->setVisible(true);
ui.lcdNumOutputRotX->setVisible(true);
ui.lcdNumOutputRotY->setVisible(true);
ui.lcdNumOutputRotZ->setVisible(true);
//
// Get the pose and also display it.
// Updating the pose from within the Tracker-class caused crashes...
//
tracker->getHeadPose(newdata);
ui.lcdNumX->display(QString("%1").arg(newdata[TX], 0, 'f', 1));
ui.lcdNumY->display(QString("%1").arg(newdata[TY], 0, 'f', 1));
ui.lcdNumZ->display(QString("%1").arg(newdata[TZ], 0, 'f', 1));
ui.lcdNumRotX->display(QString("%1").arg(newdata[Yaw], 0, 'f', 1));
ui.lcdNumRotY->display(QString("%1").arg(newdata[Pitch], 0, 'f', 1));
ui.lcdNumRotZ->display(QString("%1").arg(newdata[Roll], 0, 'f', 1));
ui.txtTracking->setVisible(tracker->getTrackingActive());
//
// Get the output-pose and also display it.
//
tracker->getOutputHeadPose(newdata);
ui.pose_display->rotateBy(newdata[Yaw], newdata[Roll], newdata[Pitch]);
ui.lcdNumOutputPosX->display(QString("%1").arg(newdata[TX], 0, 'f', 1));
ui.lcdNumOutputPosY->display(QString("%1").arg(newdata[TY], 0, 'f', 1));
ui.lcdNumOutputPosZ->display(QString("%1").arg(newdata[TZ], 0, 'f', 1));
ui.lcdNumOutputRotX->display(QString("%1").arg(newdata[Yaw], 0, 'f', 1));
ui.lcdNumOutputRotY->display(QString("%1").arg(newdata[Pitch], 0, 'f', 1));
ui.lcdNumOutputRotZ->display(QString("%1").arg(newdata[Roll], 0, 'f', 1));
//
// Update the curves in the curve-configurator. This shows the ball with the red lines.
//
if (_curve_config) {
_curve_config->update();
}
if (Libraries->pProtocol)
{
QString name = Libraries->pProtocol->getGameName();
ui.game_name->setText(name);
}
}
/** toggles Video Widget **/
void FaceTrackNoIR::showVideoWidget() {
if(ui.video_frame->isHidden())
ui.video_frame->show();
else
ui.video_frame->hide();
}
/** toggles Video Widget **/
void FaceTrackNoIR::showHeadPoseWidget() {
if(ui.headPoseWidget->isHidden())
ui.headPoseWidget->show();
else
ui.headPoseWidget->hide();
}
/** toggles Engine Controls Dialog **/
void FaceTrackNoIR::showTrackerSettings() {
if (pTrackerDialog) {
delete pTrackerDialog;
pTrackerDialog = NULL;
}
DynamicLibrary* lib = dlopen_trackers.value(ui.iconcomboTrackerSource->currentIndex(), (DynamicLibrary*) NULL);
if (lib) {
pTrackerDialog = (ITrackerDialog*) lib->Dialog();
if (pTrackerDialog) {
pTrackerDialog->Initialize(this);
if (Libraries && Libraries->pTracker)
pTrackerDialog->registerTracker(Libraries->pTracker);
}
}
}
// Show the Settings dialog for the secondary Tracker
void FaceTrackNoIR::showSecondTrackerSettings() {
if (pSecondTrackerDialog) {
delete pSecondTrackerDialog;
pSecondTrackerDialog = NULL;
}
DynamicLibrary* lib = dlopen_trackers.value(ui.cbxSecondTrackerSource->currentIndex() - 1, (DynamicLibrary*) NULL);
if (lib) {
pSecondTrackerDialog = (ITrackerDialog*) lib->Dialog();
if (pSecondTrackerDialog) {
pSecondTrackerDialog->Initialize(this);
if (Libraries && Libraries->pSecondTracker)
pSecondTrackerDialog->registerTracker(Libraries->pSecondTracker);
}
}
}
/** toggles Server Controls Dialog **/
void FaceTrackNoIR::showServerControls() {
if (pProtocolDialog) {
delete pProtocolDialog;
pProtocolDialog = NULL;
}
DynamicLibrary* lib = dlopen_protocols.value(ui.iconcomboProtocol->currentIndex(), (DynamicLibrary*) NULL);
if (lib && lib->Dialog) {
pProtocolDialog = (IProtocolDialog*) lib->Dialog();
if (pProtocolDialog) {
pProtocolDialog->Initialize(this);
}
}
}
/** toggles Filter Controls Dialog **/
void FaceTrackNoIR::showFilterControls() {
if (pFilterDialog) {
delete pFilterDialog;
pFilterDialog = NULL;
}
DynamicLibrary* lib = dlopen_filters.value(ui.iconcomboFilter->currentIndex(), (DynamicLibrary*) NULL);
if (lib && lib->Dialog) {
pFilterDialog = (IFilterDialog*) lib->Dialog();
if (pFilterDialog) {
pFilterDialog->Initialize(this, Libraries ? Libraries->pFilter : NULL);
}
}
}
/** toggles Keyboard Shortcut Dialog **/
void FaceTrackNoIR::showKeyboardShortcuts() {
// Create if new
if (!_keyboard_shortcuts)
{
_keyboard_shortcuts = new KeyboardShortcutDialog( this, this, Qt::Dialog );
}
// Show if already created
if (_keyboard_shortcuts) {
_keyboard_shortcuts->show();
_keyboard_shortcuts->raise();
}
}
/** toggles Curve Configuration Dialog **/
void FaceTrackNoIR::showCurveConfiguration() {
// Create if new
if (!_curve_config)
{
_curve_config = new CurveConfigurationDialog( this, this, Qt::Dialog );
}
// Show if already created
if (_curve_config) {
_curve_config->show();
_curve_config->raise();
}
}
/** exit application **/
void FaceTrackNoIR::exit() {
QCoreApplication::exit(0);
}
//
// Setup the icons for the comboBoxes
//
void FaceTrackNoIR::createIconGroupBox()
{
QDir settingsDir( QCoreApplication::applicationDirPath() );
{
QStringList protocols = settingsDir.entryList( QStringList() << (LIB_PREFIX "opentrack-proto-*." SONAME), QDir::Files, QDir::Name );
for ( int i = 0; i < protocols.size(); i++) {
QIcon icon;
QString longName;
QString str = protocols.at(i);
DynamicLibrary* lib = new DynamicLibrary(str);
qDebug() << "Loading" << str;
std::cout.flush();
Metadata* meta;
if (!lib->Metadata || ((meta = lib->Metadata()), !meta))
{
delete lib;
continue;
}
meta->getFullName(&longName);
meta->getIcon(&icon);
delete meta;
dlopen_protocols.push_back(lib);
ui.iconcomboProtocol->addItem(icon, longName);
}
}
{
ui.cbxSecondTrackerSource->addItem(QIcon(), "None");
QStringList trackers = settingsDir.entryList( QStringList() << (LIB_PREFIX "opentrack-tracker-*." SONAME), QDir::Files, QDir::Name );
for ( int i = 0; i < trackers.size(); i++) {
QIcon icon;
QString longName;
QString str = trackers.at(i);
DynamicLibrary* lib = new DynamicLibrary(str);
qDebug() << "Loading" << str;
std::cout.flush();
Metadata* meta;
if (!lib->Metadata || ((meta = lib->Metadata()), !meta))
{
delete lib;
continue;
}
meta->getFullName(&longName);
meta->getIcon(&icon);
delete meta;
dlopen_trackers.push_back(lib);
ui.iconcomboTrackerSource->addItem(icon, longName);
ui.cbxSecondTrackerSource->addItem(icon, longName);
}
}
{
dlopen_filters.push_back((DynamicLibrary*) NULL);
ui.iconcomboFilter->addItem(QIcon(), "None");
QStringList filters = settingsDir.entryList( QStringList() << (LIB_PREFIX "opentrack-filter-*." SONAME), QDir::Files, QDir::Name );
for ( int i = 0; i < filters.size(); i++) {
QIcon icon;
QString fullName;
QString str = filters.at(i);
DynamicLibrary* lib = new DynamicLibrary(str);
qDebug() << "Loading" << str;
std::cout.flush();
Metadata* meta;
if (!lib->Metadata || ((meta = lib->Metadata()), !meta))
{
delete lib;
continue;
}
meta->getFullName(&fullName);
meta->getIcon(&icon);
delete meta;
dlopen_filters.push_back(lib);
ui.iconcomboFilter->addItem(icon, fullName);
}
}
connect(ui.iconcomboProtocol, SIGNAL(currentIndexChanged(int)), this, SLOT(protocolSelected(int)));
connect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
connect(ui.iconcomboFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(filterSelected(int)));
connect(ui.cbxSecondTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
}
//
// Handle changes of the Protocol selection
//
void FaceTrackNoIR::protocolSelected(int index)
{
settingsDirty = true;
ui.btnShowServerControls->setEnabled ( true );
//setWindowIcon(QIcon(":/images/FaceTrackNoIR.png"));
//breaks with transparency -sh
//ui.btnShowServerControls->setIcon(icon);]
}
//
// Handle changes of the Tracking Source selection
//
void FaceTrackNoIR::trackingSourceSelected(int index)
{
settingsDirty = true;
ui.btnShowEngineControls->setEnabled ( true );
}
//
// Handle changes of the Profile selection
//
void FaceTrackNoIR::profileSelected(int index)
{
if (looping)
return;
//
// Read the current INI-file setting, to get the folder in which it's located...
//
QSettings settings("opentrack"); // Registry settings (in HK_USER)
QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
QFileInfo pathInfo ( currentFile );
//
// Save the name of the INI-file in the Registry.
//
settings.setValue ("SettingsFile", pathInfo.absolutePath() + "/" + iniFileList.value(ui.iconcomboProfile->currentIndex(), ""));
loadSettings();
}
//
// Handle changes of the Filter selection
//
void FaceTrackNoIR::filterSelected(int index)
{
settingsDirty = true;
//QSettings settings("opentrack"); // Registry settings (in HK_USER)
//QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
//QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
ui.btnShowFilterControls->setEnabled ( true );
}
//**************************************************************************************************//
//**************************************************************************************************//
//
// Constructor for Keyboard-shortcuts-dialog
//
KeyboardShortcutDialog::KeyboardShortcutDialog( FaceTrackNoIR *ftnoir, QWidget *parent, Qt::WindowFlags f ) :
QWidget( parent , f)
{
ui.setupUi( this );
QPoint offsetpos(100, 100);
this->move(parent->pos() + offsetpos);
mainApp = ftnoir; // Preserve a pointer to FTNoIR
// Connect Qt signals to member-functions
connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
connect(ui.cbxCenterKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int )));
connect(ui.chkCenterShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
connect(ui.chkCenterCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
connect(ui.chkCenterAlt, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
// Clear the Lists with key-descriptions and keycodes and build the Lists
// The strings will all be added to the ListBoxes for each Shortkey
//
// Add strings to the Listboxes.
//
for ( int i = 0; i < global_key_sequences.size(); i++) {
ui.cbxCenterKey->addItem(global_key_sequences.at(i));
}
// Load the settings from the current .INI-file
loadSettings();
}
//
// Destructor for server-dialog
//
KeyboardShortcutDialog::~KeyboardShortcutDialog() {
qDebug() << "~KeyboardShortcutDialog() says: started";
}
//
// OK clicked on server-dialog
//
void KeyboardShortcutDialog::doOK() {
save();
this->close();
mainApp->bindKeyboardShortcuts();
}
// override show event
void KeyboardShortcutDialog::showEvent ( QShowEvent * event ) {
loadSettings();
}
//
// Cancel clicked on server-dialog
//
void KeyboardShortcutDialog::doCancel() {
//
// Ask if changed Settings should be saved
//
if (settingsDirty) {
int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard );
qDebug() << "doCancel says: answer =" << ret;
switch (ret) {
case QMessageBox::Save:
save();
this->close();
break;
case QMessageBox::Discard:
this->close();
break;
case QMessageBox::Cancel:
// Cancel was clicked
break;
default:
// should never be reached
break;
}
}
else {
this->close();
}
}
void FaceTrackNoIR::bindKeyboardShortcuts()
{
QSettings settings("opentrack"); // Registry settings (in HK_USER)
QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
iniFile.beginGroup ( "KB_Shortcuts" );
int idxCenter = iniFile.value("Key_index_Center", 0).toInt();
#if !defined(_WIN32) && !defined(__WIN32)
if (keyCenter) {
delete keyCenter;
keyCenter = NULL;
}
if (idxCenter > 0)
{
QString seq(global_key_sequences.value(idxCenter, ""));
if (!seq.isEmpty())
{
if (iniFile.value("Shift_Center", false).toBool())
seq = "Shift+" + seq;
if (iniFile.value("Alt_Center", false).toBool())
seq = "Alt+" + seq;
if (iniFile.value("Ctrl_Center", false).toBool())
seq = "Ctrl+" + seq;
keyCenter = new QxtGlobalShortcut(QKeySequence(seq));
connect(keyCenter, SIGNAL(activated()), this, SLOT(shortcutRecentered()));
}
}
#else
keyCenter.keycode = 0;
keyCenter.shift = keyCenter.alt = keyCenter.ctrl = 0;
if (idxCenter > 0 && idxCenter < global_windows_key_sequences.size())
keyCenter.keycode = global_windows_key_sequences[idxCenter];
keyCenter.shift = iniFile.value("Shift_Center", false).toBool();
keyCenter.alt = iniFile.value("Alt_Center", false).toBool();
keyCenter.ctrl = iniFile.value("Ctrl_Center", false).toBool();
#endif
iniFile.endGroup ();
}
//
// Load the current Settings from the currently 'active' INI-file.
//
void KeyboardShortcutDialog::loadSettings() {
qDebug() << "loadSettings says: Starting ";
QSettings settings("opentrack"); // Registry settings (in HK_USER)
QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
qDebug() << "loadSettings says: iniFile = " << currentFile;
iniFile.beginGroup ( "KB_Shortcuts" );
ui.chkCenterShift->setChecked (iniFile.value ( "Shift_Center", 0 ).toBool());
ui.chkCenterCtrl->setChecked (iniFile.value ( "Ctrl_Center", 0 ).toBool());
ui.chkCenterAlt->setChecked (iniFile.value ( "Alt_Center", 0 ).toBool());
ui.cbxCenterKey->setCurrentIndex(iniFile.value("Key_index_Center", 0).toInt());
iniFile.endGroup ();
settingsDirty = false;
}
//
// Save the current Settings to the currently 'active' INI-file.
//
void KeyboardShortcutDialog::save() {
qDebug() << "save() says: started";
QSettings settings("opentrack"); // Registry settings (in HK_USER)
QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
iniFile.beginGroup ( "KB_Shortcuts" );
iniFile.setValue ( "Key_index_Center", ui.cbxCenterKey->currentIndex() );
iniFile.setValue ( "Shift_Center", ui.chkCenterShift->isChecked() );
iniFile.setValue ( "Ctrl_Center", ui.chkCenterCtrl->isChecked() );
iniFile.setValue ( "Alt_Center", ui.chkCenterAlt->isChecked() );
iniFile.endGroup ();
settingsDirty = false;
//
// Send a message to the main program, to update the Settings (for the tracker)
//
mainApp->updateSettings();
}
//**************************************************************************************************//
//**************************************************************************************************//
//
// Constructor for Curve-configuration-dialog
//
CurveConfigurationDialog::CurveConfigurationDialog( FaceTrackNoIR *ftnoir, QWidget *parent, Qt::WindowFlags f ) :
QWidget( parent , f)
{
ui.setupUi( this );
QPoint offsetpos(120, 30);
this->move(parent->pos() + offsetpos);
mainApp = ftnoir; // Preserve a pointer to FTNoIR
QSettings settings("opentrack"); // Registry settings (in HK_USER)
QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
QFunctionConfigurator* configs[6] = {
ui.txconfig,
ui.tyconfig,
ui.tzconfig,
ui.rxconfig,
ui.ryconfig,
ui.rzconfig
};
QFunctionConfigurator* alt_configs[6] = {
ui.txconfig_alt,
ui.tyconfig_alt,
ui.tzconfig_alt,
ui.rxconfig_alt,
ui.ryconfig_alt,
ui.rzconfig_alt
};
QCheckBox* checkboxes[6] = {
ui.rx_altp,
ui.ry_altp,
ui.rz_altp,
ui.tx_altp,
ui.ty_altp,
ui.tz_altp
};
for (int i = 0; i < 6; i++)
{
configs[i]->setConfig(&mainApp->axis(i).curve, currentFile);
alt_configs[i]->setConfig(&mainApp->axis(i).curveAlt, currentFile);
connect(configs[i], SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
connect(alt_configs[i], SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
connect(checkboxes[i], SIGNAL(stateChanged(int)), this, SLOT(curveChanged(int)));
}
// Connect Qt signals to member-functions
connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
// Load the settings from the current .INI-file
loadSettings();
}
//
// Destructor for server-dialog
//
CurveConfigurationDialog::~CurveConfigurationDialog() {
qDebug() << "~CurveConfigurationDialog() says: started";
}
//
// OK clicked on server-dialog
//
void CurveConfigurationDialog::doOK() {
save();
this->close();
}
// override show event
void CurveConfigurationDialog::showEvent ( QShowEvent * event ) {
loadSettings();
}
//
// Cancel clicked on server-dialog
//
void CurveConfigurationDialog::doCancel() {
//
// Ask if changed Settings should be saved
//
if (settingsDirty) {
int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard );
qDebug() << "doCancel says: answer =" << ret;
switch (ret) {
case QMessageBox::Save:
save();
this->close();
break;
case QMessageBox::Discard:
this->close();
break;
case QMessageBox::Cancel:
// Cancel was clicked
break;
default:
// should never be reached
break;
}
}
else {
this->close();
}
}
//
// Load the current Settings from the currently 'active' INI-file.
//
void CurveConfigurationDialog::loadSettings() {
qDebug() << "loadSettings says: Starting ";
QSettings settings("opentrack"); // Registry settings (in HK_USER)
QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
qDebug() << "loadSettings says: iniFile = " << currentFile;
static const char* names[] = {
"tx_alt",
"ty_alt",
"tz_alt",
"rx_alt",
"ry_alt",
"rz_alt"
};
iniFile.beginGroup("Tracking");
for (int i = 0; i < 6; i++)
mainApp->axis(i).altp = iniFile.value(names[i], false).toBool();
QCheckBox* widgets[] = {
ui.tx_altp,
ui.ty_altp,
ui.tz_altp,
ui.rx_altp,
ui.ry_altp,
ui.rz_altp
};
for (int i = 0; i < 6; i++)
widgets[i]->setChecked(mainApp->axis(i).altp);
QDoubleSpinBox* widgets2[] = {
ui.pos_tx,
ui.pos_ty,
ui.pos_tz,
ui.pos_tx,
ui.pos_ry,
ui.pos_rz
};
const char* names2[] = {
"zero_tx",
"zero_ty",
"zero_tz",
"zero_rx",
"zero_ry",
"zero_rz"
};
for (int i = 0; i < 6; i++)
widgets2[i]->setValue(iniFile.value(names2[i], 0).toDouble());
iniFile.endGroup();
settingsDirty = false;
}
//
// Save the current Settings to the currently 'active' INI-file.
//
void CurveConfigurationDialog::save() {
qDebug() << "save() says: started";
QSettings settings("opentrack"); // Registry settings (in HK_USER)
QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
ui.rxconfig->saveSettings(currentFile);
ui.ryconfig->saveSettings(currentFile);
ui.rzconfig->saveSettings(currentFile);
ui.txconfig->saveSettings(currentFile);
ui.tyconfig->saveSettings(currentFile);
ui.tzconfig->saveSettings(currentFile);
ui.txconfig_alt->saveSettings(currentFile);
ui.tyconfig_alt->saveSettings(currentFile);
ui.tzconfig_alt->saveSettings(currentFile);
ui.rxconfig_alt->saveSettings(currentFile);
ui.ryconfig_alt->saveSettings(currentFile);
ui.rzconfig_alt->saveSettings(currentFile);
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
iniFile.beginGroup("Tracking");
iniFile.setValue("rx_alt", ui.rx_altp->checkState() != Qt::Unchecked);
iniFile.setValue("ry_alt", ui.ry_altp->checkState() != Qt::Unchecked);
iniFile.setValue("rz_alt", ui.rz_altp->checkState() != Qt::Unchecked);
iniFile.setValue("tx_alt", ui.tx_altp->checkState() != Qt::Unchecked);
iniFile.setValue("ty_alt", ui.ty_altp->checkState() != Qt::Unchecked);
iniFile.setValue("tz_alt", ui.tz_altp->checkState() != Qt::Unchecked);
QDoubleSpinBox* widgets2[] = {
ui.pos_tx,
ui.pos_ty,
ui.pos_tz,
ui.pos_tx,
ui.pos_ry,
ui.pos_rz
};
const char* names2[] = {
"zero_tx",
"zero_ty",
"zero_tz",
"zero_rx",
"zero_ry",
"zero_rz"
};
for (int i = 0; i < 6; i++)
iniFile.setValue(names2[i], widgets2[i]->value());
iniFile.endGroup();
settingsDirty = false;
//
// Send a message to the main program, to update the Settings (for the tracker)
//
mainApp->updateSettings();
}
void FaceTrackNoIR::shortcutRecentered()
{
if (tracker)
{
#if defined(__WIN32) || defined(_WIN32)
MessageBeep(MB_OK);
#else
QApplication::beep();
#endif
qDebug() << "Center";
tracker->do_center = true;
}
}
|
9fee63e9d61d91a0e2ffe51c23afa37c6ff6675e | 24a8323d5505f4e859747a0e24fb0a7e6f826241 | /LightOpenCV/oldStyleFilter.cpp | 95d15d7113d1a9dddbe79d781a97069966b3c1a0 | [
"MIT"
] | permissive | aleen42/LightOpenCV | 47c620d327c23e4a56992ad355c8ce286fb8fdd0 | f3d53d55f3eb7128aa7cdb23d16134f9cf78519b | refs/heads/master | 2021-01-17T15:24:52.546511 | 2016-06-12T12:02:46 | 2016-06-12T12:02:46 | 47,057,595 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,148 | cpp | oldStyleFilter.cpp | /***********************************************************************
* _
* _____ _ ____ _ |_|
* | _ |/ \ ____ ____ __ ___ / ___\/ \ __ _ ____ _
* | |_| || | / __ \/ __ \\ '_ \ _ / / | |___\ \ | |/ __ \| |
* | _ || |__. ___/. ___/| | | ||_|\ \___ | _ | |_| |. ___/| |
* |_/ \_|\___/\____|\____||_| |_| \____/|_| |_|_____|\____||_|
*
* ================================================================
* More than a coder, More than a designer
* ================================================================
*
*
* - Document: oldStyleFilter.cpp
* - Author: aleen42
* - Description: Old Style Filter algorithmn
* - Create Time: Nov 29th, 2015
* - Update Time: Feb 2nd, 2016
*
**********************************************************************/
#include "filter.h"
class oldStyleFilter : public Filter
{
private:
/* Override the method filter() */
Mat filter(Image img) {
/* create a reserved image */
Mat reservedImage(img.getSize(), CV_8UC3);
for (int y = 0; y < img.getHeight(); y++)
{
uchar* P0 = img.getPtr(y);
uchar* P1 = reservedImage.ptr<uchar>(y);
for (int x = 0; x < img.getWidth(); x++)
{
/* get the RGB of the old image */
double B = P0[3 * x];
double G = P0[3 * x + 1];
double R = P0[3 * x + 2];
/* calculate the new RGB of the new image */
double newB = 0.272 * R + 0.534 * G + 0.131 * B;
double newG = 0.349 * R + 0.686 * G + 0.168 * B;
double newR = 0.393 * R + 0.769 * G + 0.189 * B;
/* check legality of RGB */
this->checkRGB(newR, newG, newB);
/* set the RGB of the new image */
P1[3 * x] = (uchar)newB;
P1[3 * x + 1] = (uchar)newG;
P1[3 * x + 2] = (uchar)newR;
}
}
return reservedImage;
}
public:
/* Constructor of the class oldStyleFilter */
oldStyleFilter(Image img) {
this->img = this->filter(img);
}
};
|
7b48b813ddda69e213138109b521e2c89f389ca8 | 3de2a746243ad1cb000994a06a0f9699db9a901f | /abc217d.cpp | a4126e65adb036fff9f2540f488c59f4bd84e612 | [] | no_license | takumi152/atcoder | 71d726ffdf2542d8abac0d9817afaff911db7c6c | ebac94f1227974aa2e6bf372e18605518de46441 | refs/heads/master | 2022-10-30T12:14:41.742596 | 2022-09-29T19:49:32 | 2022-09-29T19:49:32 | 181,502,518 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 856 | cpp | abc217d.cpp | #include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>
#include <queue>
#include <stack>
#include <set>
using namespace std;
typedef long long int ll;
typedef pair<int, int> Pii;
const ll mod = 998244353;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int l, q;
cin >> l >> q;
vector<Pii> query(q);
for (auto &x: query) cin >> x.first >> x.second;
set<int> wood;
wood.insert(0);
wood.insert(l);
vector<int> ans;
for (int i = 0; i < q; i++) {
if (query[i].first == 1) {
wood.insert(query[i].second);
}
else {
auto it1 = wood.lower_bound(query[i].second);
auto it2 = it1;
it1--;
ans.push_back(*it2 - *it1);
}
}
for (auto &x: ans) cout << x << endl;
return 0;
}
|
aea7749e31e57ff9adb259e053eed365dd8a2705 | a6387825d91d0ffdaf3e2ee8640832e6ac8ae924 | /lib/tokenize/include/tokenize/TokenizerPolicy.h | ee55c32096dd6cf735ba98fbe15dce6953131e1c | [
"MIT"
] | permissive | rkaminsk/plasp | 37bd140778f09d52a6c6bad39ac3f33813ad665e | 02b00cba67e4fe1f1edc0e31d8be70388fcef866 | refs/heads/master | 2023-06-11T07:28:10.713668 | 2021-07-09T12:08:59 | 2021-07-09T12:08:59 | 384,195,996 | 0 | 0 | MIT | 2021-07-08T17:07:44 | 2021-07-08T17:07:43 | null | UTF-8 | C++ | false | false | 1,256 | h | TokenizerPolicy.h | #ifndef __TOKENIZE__TOKENIZER_POLICY_H
#define __TOKENIZE__TOKENIZER_POLICY_H
#include <iostream>
namespace tokenize
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// TokenizerPolicy
//
////////////////////////////////////////////////////////////////////////////////////////////////////
struct CaseSensitiveTokenizerPolicy
{
static constexpr char transformCharacter(char c) noexcept
{
return c;
}
static bool isWhiteSpaceCharacter(char c)
{
return std::iswspace(c);
}
static bool isBlankCharacter(char c)
{
return std::isblank(c);
}
static bool isIdentifierCharacter(char c)
{
return std::isgraph(c);
}
};
////////////////////////////////////////////////////////////////////////////////////////////////////
struct CaseInsensitiveTokenizerPolicy
{
static char transformCharacter(char c) noexcept
{
return std::tolower(c);
}
static bool isWhiteSpaceCharacter(char c)
{
return std::iswspace(c);
}
static bool isBlankCharacter(char c)
{
return std::isblank(c);
}
static bool isIdentifierCharacter(char c)
{
return std::isgraph(c);
}
};
////////////////////////////////////////////////////////////////////////////////////////////////////
}
#endif
|
8ffd9b3a12239759243fcf589c8666b27985cbcf | a147eef2d6420b02d093a7145e7976f4f04fc669 | /Module - Client Hors-Ligne/variable_static.h | 5560a06a7c13d2e5698cbe53aad6b9023e6eca17 | [] | no_license | Sea5hd0w/gameJam7seven | 6df8f89c49d8fb9da288fc449f6d7fae5d480746 | 7e5fe1c334d9fc1d5f0cf2da656fa062faa92d84 | refs/heads/master | 2021-08-30T01:18:44.251488 | 2017-12-15T14:08:40 | 2017-12-15T14:08:40 | 114,092,244 | 0 | 0 | null | null | null | null | WINDOWS-1250 | C++ | false | false | 307 | h | variable_static.h | #pragma once
class variable
{
public :
static const int SIZE_CASE_X = 64;
static const int SIZE_CASE_Y = 64;
static const int SIZE_HERO_X = 1; //en unité de block
static const int SIZE_HERO_Y = 2; //en unité de block
static const int VITESSE_HERO_X = 3;
static const int VITESSE_HERO_JUMP = 8;
}; |
269a9371371c3ef0886fd5452f8b0464c02e2088 | 245ceae27f0fbb5185d57976317c5bb376c9b617 | /Languages/C++/Anagram_Bit_Manipulation.cpp | 4e71338215776e57bdfccc011a34a3be48fff566 | [
"MIT"
] | permissive | ABHISHEK-AMRUTE/Hacktoberfest-1 | e9a6e1a3abe1b8d038f856a1aaa6c9b8da313301 | 38f7381c16fb35e10bbc32c7105414073cc3e8d2 | refs/heads/master | 2022-09-20T07:15:26.707100 | 2019-10-28T09:44:15 | 2019-10-28T09:44:15 | 218,013,374 | 2 | 0 | MIT | 2022-09-10T15:11:27 | 2019-10-28T09:43:41 | C++ | UTF-8 | C++ | false | false | 717 | cpp | Anagram_Bit_Manipulation.cpp | #include <bits/stdc++.h>
using namespace std;
// Function to check whether two strings are anagram of
// each other
bool areAnagram(string str1, string str2)
{
// If two strings have different size
if (str1.size() != str2.size()) {
return false;
}
// To store the xor value
int value = 0;
for (int i = 0; i < str1.size(); i++) {
value = value ^ (int) str1[i];
value = value ^ (int) str2[i];
}
return value == 0;
}
// Driver code
int main()
{
string str1 = "geeksforgeeks";
string str2 = "forgeeksgeeks";
if (areAnagram(str1, str2))
cout << "The two strings are anagram of each other";
else
cout << "The two strings are not anagram of each other";
return 0;
}
|
ed1bd4cd40e3b5bfb77ca0398ab1519e7576279f | 13c9d5b567de397de46d5070d038caf33c610b9b | /CalculadoraFinanças.cpp | 30b3e74fbcf1c579768e5cef0c7d9106e17fdd10 | [] | no_license | LuizGadelha/CalcFin | ddb41490d2e15dce86072629055f899180e5f971 | 9bc63fc48a184f5241c35bba212e06409c5c1809 | refs/heads/master | 2021-01-10T01:12:14.021990 | 2014-10-30T12:30:44 | 2014-10-30T12:30:44 | null | 0 | 0 | null | null | null | null | ISO-8859-1 | C++ | false | false | 422 | cpp | CalculadoraFinanças.cpp | // CalculadoraFinanças.cpp : Define o ponto de entrada para a aplicação de console.
//
#include "stdafx.h"
int main(int argc, _TCHAR* argv[])
{
int i = 0;
double st = 100000, p = 8792, tj = 0.0083333333333333333333333333333333333334, j[2] = { 0, 0 };
char s[50];
while (i++ < 12) {
j[0] = st*tj;
j[1] += j[0];
st = st + j[0];
/*bla*/
st -= p;
}
printf("Acúmulo de juros %f", j[1]);
gets_s(s);
}
|
f9706e8419b22384440bebee652b97e54ac82a95 | 1cac8f001142353af4839c5b68c9cd3b4f491627 | /31-40/36 Heaps Challenges/hostel_visit.cpp | 3cc68cde00b0e1eea6fa3ac826690398e2925eef | [] | no_license | Sumendra2906/DS-ALGO | 28933495a2903fd932b81f984ab426bfab7b009f | 6ad794bbb5309e4437dfb3de4c66d91d48a7a9bb | refs/heads/master | 2023-08-13T23:55:13.277016 | 2021-10-16T17:27:32 | 2021-10-16T17:27:32 | 399,010,533 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 645 | cpp | hostel_visit.cpp | #include <iostream>
#include <queue>
using namespace std;
int main()
{
int n, k;
cin >> n >> k;
priority_queue<int> pq;
while (n--)
{
int q_type, x, y;
cin >> q_type;
if (q_type == 1)
{
cin >> x >> y;
int dist = x * x + y * y;
if (pq.size() < k)
{
pq.push(dist);
}
else if(pq.size()==k and dist<pq.top()){
pq.pop();
pq.push(dist);
}
}
else
{
cout << pq.top() << endl;
//pq.pop();
}
}
return 0;
} |
fc1c29f430c26aa940b29c1caccc9ce7f716a81e | 932e1c352e478043d31095e72d632f1ac34ccb23 | /CCF/命令行选项.cpp | 3e923fc00c9b26322839dbd1c8e53e587c18dbfe | [] | no_license | liqiang311/oj | 738c078653ed6b2613b45c20bc588650336e42b2 | 09095e13f6cb88ccb249b5d9a64735185ee0b7d9 | refs/heads/master | 2021-01-01T18:44:23.573671 | 2017-10-12T12:31:50 | 2017-10-12T12:31:50 | 98,419,451 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 5,803 | cpp | 命令行选项.cpp | #include <iostream>
#include <memory.h>
#include <string.h>
#include <map>
#include <vector>
using namespace std;
int main()
{
char buf[256];
cin>>buf;
//分析输入
map<char,char> table;//0表示无参,1表示有参
for (int i=0; i<strlen(buf); i++)
{
if (i == strlen(buf)-1 && buf[i] != ':')
{
table[buf[i]] = 0;
}
else
{
if (buf[i] != ':' && buf[i+1] != ':')
table[buf[i]] = 0;
else if (buf[i] != ':' && buf[i+1] == ':')
table[buf[i]] = 1;
else
continue;
}
}
/*
map<char,char>::iterator it;
for (it=table.begin(); it!=table.end(); it++)
{
cout<<it->first<<" "<<(int)it->second<<endl;
}
*/
int cmdNum;
cin>>cmdNum;
getchar();
char ** cmdArr = new char*[cmdNum];
vector<string> *cmd = new vector<string>[cmdNum];
for (int i=0; i<cmdNum; i++)
{
cmdArr[i] = new char[256];
cin.getline(cmdArr[i],256,'\n');
//解析命令
for (int j=0; j<strlen(cmdArr[i]); j++)
{
if (cmdArr[i][j] == ' ')
{
//找下一个空格
for (int k=j+1; k<strlen(cmdArr[i]); k++)
{
if (cmdArr[i][k] == ' ' || k == strlen(cmdArr[i])-1)
{
//j到k
string s;
if (cmdArr[i][k] == ' ')
s.append(cmdArr[i]+j+1,k-j-1);
else
s.append(cmdArr[i]+j+1,k-j);
//cout<<s<<endl;
cmd[i].push_back(s);
j = k-1;
break;
}
}
}
}
}
/*
cout<<cmdNum<<endl;
for (int i=0; i<cmdNum; i++)
cout<<cmdArr[i]<<endl;
*/
//分析,命令在cmd中存放
//遍历每个cmd,在map中查找,找到无参,直接加入新map,找到有参,判断下一个是否有效,找到其他,则退出判断
map<char,string> *res = new map<char,string>[cmdNum];
for (int i=0; i<cmdNum; i++)
{
for (int j=0; j<cmd[i].size(); j++)
{
//参数形式
if (cmd[i][j].size() == 2 && cmd[i][j][0] == '-')
{
map<char,char>::iterator it = table.find(cmd[i][j][1]);
char b=0;
if (it == table.end())
{
break;
}
else
{
b = it->second;
}
if (b == 1)//有参
{
bool isValid = true;
for (int k=0; k<cmd[i][j+1].size(); k++)
{
if (!((cmd[i][j+1][k] >= 'a' && cmd[i][j+1][k] <= 'z') ||
(cmd[i][j+1][k] >= '0' && cmd[i][j+1][k] <= '9') ||
(cmd[i][j+1][k] == '-')
))
{
isValid = false;
break;
}
}
if (isValid)
{
string s;
s.append(cmd[i][j+1]);
res[i][cmd[i][j][1]] = s;
j++;
}
else break;
}
else//无参
{
res[i][cmd[i][j][1]] = "";
}
}
else
break;
}
}
//输出
for (int i=0; i<cmdNum; i++)
{
cout<<"Case "<<i+1<<":";
for (map<char,string>::iterator it=res[i].begin(); it!=res[i].end(); it++)
{
cout<<" -"<<it->first<<" "<<it->second;
}
cout<<endl;
}
return 0;
}
/*
albw:x
4
ls -a -l -a documents -b
ls
ls -w 10 -x -w 15
ls1 -a -b -c -d -e -l
样例输出
Case 1: -a -l
Case 2:
Case 3: -w 15 -x
Case 4: -a -b
问题描述
请你写一个命令行分析程序,用以分析给定的命令行里包含哪些选项。
每个命令行由若干个字符串组成,它们之间恰好由一个空格分隔。
这些字符串中的第一个为该命令行工具的名字,由小写字母组成,你的程序不用对它进行处理。
在工具名字之后可能会包含若干选项,然后可能会包含一 些不是选项的参数。
选项有两类:带参数的选项和不带参数的选项。
一个合法的无参数选项的形式是一个减号后面跟单个小写字母,如"-a" 或"-b"。
而带参数选项则由两个由空格分隔的字符串构成,前者的格式要求与无参数选项相同,
后者则是该选项的参数,是由小写字母,数字和减号组成的非空字符串。
该命令行工具的作者提供给你一个格式字符串以指定他的命令行工具需要接受哪些选项。
这个字符串由若干小写字母和冒号组成,其中的每个小写字母表示一个该程序接受的选项。
如果该小写字母后面紧跟了一个冒号,它就表示一个带参数的选项,否则则为不带参数的选项。
例如, "ab:m:" 表示该程序接受三种选项,即"-a"(不带参数),"-b"(带参数), 以及"-m"(带参数)。
命令行工具的作者准备了若干条命令行用以测试你的程序。
对于每个命令行,你的工具应当一直向后分析。当你的工具遇到某个字符串既不是合法的选项,
又不是某个合法选项的参数时,分析就停止。命令行剩余的未分析部分不构成该命令的选项,因此你的程序应当忽略它们。
输入格式
输入的第一行是一个格式字符串,它至少包含一个字符,且长度不超过 52。
格式字符串只包含小写字母和冒号,保证每个小写字母至多出现一次,不会有两个相邻的冒号,也不会以冒号开头。
输入的第二行是一个正整数 N(1 ≤ N ≤ 20),表示你需要处理的命令行的个数。
接下来有 N 行,每行是一个待处理的命令行,它包括不超过 256 个字符。
该命令行一定是若干个由单个空格分隔的字符串构成,每个字符串里只包含小写字母,数字和减号。
输出格式
输出有 N 行。其中第 i 行以"Case i:" 开始,然后应当有恰好一个空格,
然后应当按照字母升序输出该命令行中用到的所有选项的名称,对于带参数的选项,在
输出它的名称之后还要输出它的参数。如果一个选项在命令行中出现了多次,只输出一次。
如果一个带参数的选项在命令行中出 现了多次,只输出最后一次出现时所带的参数。
样例输入
albw:x
4
ls -a -l -a documents -b
ls
ls -w 10 -x -w 15
ls -a -b -c -d -e -l
样例输出
Case 1: -a -l
Case 2:
Case 3: -w 15 -x
Case 4: -a -b
*/
|
3ffd21c6782bebadc4df6bf3705a76f2fd411dab | 68f344bbfe75b90712a1a172983bf07580771825 | /staticdb/values.hpp | ed1da951eb155522ab6409e7faff23ab989f72fa | [
"MIT"
] | permissive | TyRoXx/staticdb | 43f3b610b6abfe8bf88621c047e81f2df1974123 | de855406252198729deb3f9b5a677ab965398df4 | refs/heads/master | 2016-08-12T10:37:19.258089 | 2016-03-17T16:40:11 | 2016-03-17T16:40:11 | 43,260,732 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 12,626 | hpp | values.hpp | #ifndef STATICDB_VALUES_HPP
#define STATICDB_VALUES_HPP
#include <staticdb/types.hpp>
#include <staticdb/copy.hpp>
#include <silicium/variant.hpp>
#include <silicium/to_unique.hpp>
#include <silicium/sink/append.hpp>
#include <silicium/optional.hpp>
#include <silicium/make_unique.hpp>
#include <cstdint>
namespace staticdb
{
namespace values
{
struct unit
{
unit copy() const
{
return unit();
}
};
inline std::ostream &operator<<(std::ostream &out, unit)
{
return out << "unit";
}
struct bit
{
bool is_set;
bit()
{
}
explicit bit(bool is_set)
: is_set(is_set)
{
}
bit copy() const
{
return *this;
}
};
inline bool operator==(bit left, bit right)
{
return left.is_set == right.is_set;
}
inline std::ostream &operator<<(std::ostream &out, bit value)
{
return out << value.is_set;
}
template <class Value>
struct basic_tuple
{
std::vector<Value> elements;
basic_tuple()
{
}
explicit basic_tuple(std::vector<Value> elements)
: elements(std::move(elements))
{
}
basic_tuple copy() const
{
basic_tuple result;
result.elements.resize(elements.size());
for (size_t i = 0; i < result.elements.size(); ++i)
{
result.elements[i] = elements[i].copy();
}
return result;
}
#if SILICIUM_COMPILER_GENERATES_MOVES
SILICIUM_DEFAULT_MOVE(basic_tuple)
#else
basic_tuple(basic_tuple &&other) BOOST_NOEXCEPT : elements(std::move(other.elements))
{
}
basic_tuple &operator=(basic_tuple &&other) BOOST_NOEXCEPT
{
elements = std::move(other.elements);
return *this;
}
#endif
SILICIUM_DISABLE_COPY(basic_tuple)
};
template <class Value>
bool operator==(basic_tuple<Value> const &left, basic_tuple<Value> const &right)
{
return left.elements == right.elements;
}
template <class Value>
inline std::ostream &operator<<(std::ostream &out, basic_tuple<Value> const &value)
{
out << "{";
for (auto &element : value.elements)
{
out << element << ", ";
}
return out << "}";
}
template <class Value>
struct basic_variant
{
std::unique_ptr<Value> content;
basic_variant()
{
}
explicit basic_variant(std::unique_ptr<Value> content)
: content(std::move(content))
{
assert(this->content);
}
basic_variant copy() const
{
assert(content);
basic_variant result;
result.content = Si::to_unique(content->copy());
return result;
}
#if SILICIUM_COMPILER_GENERATES_MOVES
SILICIUM_DEFAULT_MOVE(basic_variant)
#else
basic_variant(basic_variant &&other) BOOST_NOEXCEPT : content(std::move(other.content))
{
}
basic_variant &operator=(basic_variant &&other) BOOST_NOEXCEPT
{
content = std::move(other.content);
return *this;
}
#endif
SILICIUM_DISABLE_COPY(basic_variant)
};
template <class Value>
inline std::ostream &operator<<(std::ostream &out, basic_variant<Value> const &value)
{
return out << *value.content;
}
struct closure_body
{
virtual ~closure_body()
{
}
virtual std::unique_ptr<closure_body> clone() const = 0;
};
template <class Value>
struct basic_closure
{
std::unique_ptr<closure_body> body;
std::unique_ptr<Value> bound;
basic_closure()
{
}
explicit basic_closure(std::unique_ptr<closure_body> body, std::unique_ptr<Value> bound)
: body(std::move(body))
, bound(std::move(bound))
{
assert(this->body);
assert(this->bound);
}
basic_closure copy() const
{
assert(this->body);
assert(this->bound);
basic_closure result;
result.body = body->clone();
result.bound = Si::to_unique(bound->copy());
return result;
}
#if SILICIUM_COMPILER_GENERATES_MOVES
SILICIUM_DEFAULT_MOVE(basic_closure)
#else
basic_closure(basic_closure &&other) BOOST_NOEXCEPT : body(std::move(other.body)),
bound(std::move(other.bound))
{
}
basic_closure &operator=(basic_closure &&other) BOOST_NOEXCEPT
{
body = std::move(other.body);
bound = std::move(other.bound);
return *this;
}
#endif
SILICIUM_DISABLE_COPY(basic_closure)
};
template <class Value>
inline std::ostream &operator<<(std::ostream &out, basic_closure<Value> const &value)
{
return out << "closure(" << *value.bound << ")";
}
template <class Value>
struct make_value_type
{
typedef Si::non_copyable_variant<unit, bit, basic_tuple<Value>, basic_variant<Value>, basic_closure<Value>>
type;
};
struct value : make_value_type<value>::type
{
typedef make_value_type<value>::type base;
value()
{
}
template <
class A0, class... Args
#ifdef _MSC_VER
,
class = typename std::enable_if<!std::is_same<typename std::decay<A0>::type, value>::value, void>::type
#endif
>
value(A0 &&a0, Args &&... args)
: base(std::forward<A0>(a0), std::forward<Args>(args)...)
{
}
base &as_variant()
{
return *this;
}
base const &as_variant() const
{
return *this;
}
value copy() const
{
return as_variant().apply_visitor(copying_visitor<value>());
}
#if SILICIUM_COMPILER_GENERATES_MOVES
SILICIUM_DEFAULT_MOVE(value)
#else
value(value &&other) BOOST_NOEXCEPT : base(std::move(other.as_variant()))
{
}
value &operator=(value &&other) BOOST_NOEXCEPT
{
as_variant() = std::move(other.as_variant());
return *this;
}
#endif
SILICIUM_DISABLE_COPY(value)
};
typedef basic_tuple<value> tuple;
typedef basic_variant<value> variant;
typedef basic_closure<value> closure;
inline bool operator==(value const &first, value const &second)
{
return Si::visit<bool>(first,
[&second](unit) -> bool
{
return Si::try_get_ptr<unit>(second) != nullptr;
},
[&second](bit first_bit) -> bool
{
bit const *const second_bit = Si::try_get_ptr<bit>(second);
return second_bit && (*second_bit == first_bit);
},
[&second](tuple const &first_tuple) -> bool
{
tuple const *const second_tuple = Si::try_get_ptr<tuple>(second);
return second_tuple && (*second_tuple == first_tuple);
},
[](variant const &) -> bool
{
throw std::logic_error("not implemented");
},
[](closure const &) -> bool
{
throw std::logic_error("not implemented");
});
}
inline std::ostream &operator<<(std::ostream &out, value const &v)
{
return out << v.as_variant();
}
template <class Unsigned>
inline tuple make_unsigned_integer(Unsigned value)
{
tuple result;
std::size_t const bits = CHAR_BIT * sizeof(value);
result.elements.resize(bits);
for (size_t i = 0; i < bits; ++i)
{
result.elements[i] = bit(((value >> (bits - 1 - i)) & 1) != 0);
}
return result;
}
template <class Unsigned>
inline Si::optional<Unsigned> parse_unsigned_integer(tuple const &big_endian)
{
Unsigned result = 0;
std::size_t parsed_bits = 0;
for (;;)
{
if (parsed_bits >= big_endian.elements.size())
{
return result;
}
if (parsed_bits == (CHAR_BIT * sizeof(result)))
{
return Si::none;
}
bit const *const bit_element = Si::try_get_ptr<bit>(big_endian.elements[parsed_bits]);
if (!bit_element)
{
return Si::none;
}
result = static_cast<Unsigned>(result << 1u);
result = static_cast<Unsigned>(result | (bit_element->is_set ? 1u : 0u));
++parsed_bits;
}
}
inline variant make_some(value content)
{
variant result;
result.content = Si::to_unique(std::move(content));
return result;
}
inline variant make_none()
{
variant result;
result.content = Si::make_unique<value>(unit());
return result;
}
inline bool conforms_to_type(value const &object, types::type const &expected)
{
return Si::visit<bool>(object,
[&expected](unit)
{
return Si::try_get_ptr<types::unit>(expected.as_variant()) != nullptr;
},
[&expected](bit)
{
return Si::try_get_ptr<types::bit>(expected.as_variant()) != nullptr;
},
[&expected](tuple const &value) -> bool
{
types::tuple const *const expected_tuple =
Si::try_get_ptr<types::tuple>(expected.as_variant());
if (!expected_tuple)
{
types::array const *const expected_array =
Si::try_get_ptr<types::array>(expected.as_variant());
if (!expected_array)
{
return false;
}
for (values::value const &element : value.elements)
{
if (!conforms_to_type(element, *expected_array->elements))
{
return false;
}
}
return true;
}
if (expected_tuple->elements.size() != value.elements.size())
{
return false;
}
for (size_t i = 0, c = value.elements.size(); i < c; ++i)
{
if (!conforms_to_type(value.elements[i], expected_tuple->elements[i]))
{
return false;
}
}
return true;
},
[&expected](variant const &value) -> bool
{
assert(value.content);
types::variant const *const expected_variant =
Si::try_get_ptr<types::variant>(expected.as_variant());
if (!expected_variant)
{
return false;
}
for (types::type const &possibility : expected_variant->possibilities)
{
if (conforms_to_type(*value.content, possibility))
{
return true;
}
}
return false;
},
[&expected](closure const &) -> bool
{
return Si::try_get_ptr<types::function>(expected.as_variant()) != nullptr;
});
}
template <class BitSink>
inline void serialize(BitSink &&destination, value const &object)
{
return Si::visit<void>(object,
[](unit)
{
},
[&destination](bit value)
{
Si::append(destination, value);
},
[&destination](tuple const &t)
{
for (value const &element : t.elements)
{
serialize(destination, element);
}
},
[&destination](variant const &value)
{
assert(value.content);
return serialize(destination, *value.content);
},
[](closure const &)
{
throw std::logic_error("not implemented");
});
}
}
}
#endif
|
f41c89d2fddeb6b62ab25dd8a541aec5c4d69664 | 537ea40bc78a9023aec02c5ebe7aef3aba2e4390 | /src/tools/SceneLoader/SampleComponents/DummyComponent.cpp | b863916f49ec08442d77d2dc873ff476de1ddd44 | [
"MIT"
] | permissive | elix22/urho3d-blender-runtime | 73222daa8d96968432b276660d030b711ceedcdc | 9c495cb9f1c64e2d904085212bcf59b25e557d76 | refs/heads/master | 2020-06-13T04:34:36.609609 | 2019-12-12T17:40:58 | 2019-12-12T17:40:58 | 194,536,413 | 0 | 0 | MIT | 2019-12-12T17:40:59 | 2019-06-30T16:15:36 | C++ | UTF-8 | C++ | false | false | 3,341 | cpp | DummyComponent.cpp | //
// Copyright (c) 2008-2019 the Urho3D project.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#include "DummyComponent.h"
#include <Urho3D/Urho3DAll.h>
DummyComponent::DummyComponent(Context* context) :
LogicComponent(context),
boolValue_(DEFAULT_BOOL_VALUE),
intValue_(DEFAULT_INT_VALUE),
floatValue_(DEFAULT_FLOAT_VALUE),
stringValue_(DEFAULT_STRING_VALUE)
{
// Only the physics update event is needed: unsubscribe from the rest for optimization
SetUpdateEventMask(USE_UPDATE);
}
void DummyComponent::RegisterObject(Context* context)
{
context->RegisterFactory<DummyComponent>("Sample Component");
// These macros register the class attributes to the Context for automatic load / save handling.
// We specify the Default attribute mode which means it will be used both for saving into file, and network replication
URHO3D_ATTRIBUTE("BOOL VALUE", bool, boolValue_, DEFAULT_BOOL_VALUE, AM_FILE);
URHO3D_ATTRIBUTE("INT VALUE", int, intValue_, DEFAULT_INT_VALUE, AM_FILE);
URHO3D_ATTRIBUTE("FLOAT VALUE", float, floatValue_, DEFAULT_FLOAT_VALUE, AM_FILE);
URHO3D_ATTRIBUTE("STRING VALUE", String, stringValue_, DEFAULT_STRING_VALUE, AM_FILE);
//URHO3D_ATTRIBUTE("Anim Run", String, animRun_, "", AM_DEFAULT);
URHO3D_MIXED_ACCESSOR_ATTRIBUTE("Animation", GetAnimation, SetAnimation, ResourceRef, ResourceRef(Animation::GetTypeStatic()), AM_DEFAULT);
URHO3D_MIXED_ACCESSOR_ATTRIBUTE("Texture", GetTexture, SetTexture, ResourceRef, ResourceRef(Texture2D::GetTypeStatic()), AM_DEFAULT);
}
void DummyComponent::DelayedStart()
{
// init whatever you want. at this point all nodes are already handled
URHO3D_LOGINFO("STARTED");
int a=0;
}
void DummyComponent::Update(float timeStep)
{
// do the logic here
}
ResourceRef DummyComponent::GetAnimation() const
{
return ResourceRef(Animation::GetTypeStatic(),animationName_);
}
void DummyComponent::SetAnimation(const ResourceRef &value)
{
animationName_ = value.name_;
}
ResourceRef DummyComponent::GetTexture() const
{
return ResourceRef(Texture::GetTypeStatic(),textureName_);
}
void DummyComponent::SetTexture(const ResourceRef &value)
{
textureName_ = value.name_;
}
|
cc0f5472a521a94b4e2973a4d894c71eb13be73c | 66a953acee4e398d3fc9e6487a23cef26a0b8de7 | /이길주/MapleStory_v2.0/cArcana.h | 0b5197c09580bf22e1ff4258a83cdffe02dd41fd | [] | no_license | lgj8502/maple | 713ef38fa933fbc6d3ef3893dace353e47203b53 | 005e7dac28bcde7eaba3381dfd3715e940026308 | refs/heads/master | 2020-03-18T06:47:47.924592 | 2018-08-16T16:06:13 | 2018-08-16T16:06:13 | 134,415,758 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 139 | h | cArcana.h | #pragma once
class cArcana : public cMap
{
public:
~cArcana();
D2D1_POINT_2F m_Portal_1_Pos = {100, 585};
void Init();
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.