blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
201
content_id
stringlengths
40
40
detected_licenses
sequencelengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
7
100
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
260 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
11.4k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
80 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
8
9.86M
extension
stringclasses
52 values
content
stringlengths
8
9.86M
authors
sequencelengths
1
1
author
stringlengths
0
119
91f6ac576c01a542a73198e7d7c8772b12bf8570
3a78fcd2c9a66789f995513d9beba219c8a45fe8
/Hardware/krnl_cornertracker.build/link/vivado/vpl/prj/prj.srcs/sources_1/bd/zcu104_base/ip/zcu104_base_auto_us_df_0/sim/zcu104_base_auto_us_df_0.h
642ef4a0e72616adb2db9f12f2ea1bf070c0cad5
[]
no_license
msimpsonbbx/test_fast
d25a36e3c067a75c1bae7163ece026879f1cb2aa
01b00070b2d4165c7796726f5a32be93bfee8482
refs/heads/main
2023-03-26T00:04:16.541544
2021-03-25T16:15:28
2021-03-25T16:15:28
351,492,336
0
0
null
null
null
null
UTF-8
C++
false
false
25,750
h
#ifndef IP_ZCU104_BASE_AUTO_US_DF_0_H_ #define IP_ZCU104_BASE_AUTO_US_DF_0_H_ // (c) Copyright 1995-2021 Xilinx, Inc. All rights reserved. // // This file contains confidential and proprietary information // of Xilinx, Inc. and is protected under U.S. and // international copyright and other intellectual property // laws. // // DISCLAIMER // This disclaimer is not a license and does not grant any // rights to the materials distributed herewith. Except as // otherwise provided in a valid license issued to you by // Xilinx, and to the maximum extent permitted by applicable // law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND // WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES // AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING // BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- // INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and // (2) Xilinx shall not be liable (whether in contract or tort, // including negligence, or under any other theory of // liability) for any loss or damage of any kind or nature // related to, arising under or in connection with these // materials, including for any direct, or any indirect, // special, incidental, or consequential loss or damage // (including loss of data, profits, goodwill, or any type of // loss or damage suffered as a result of any action brought // by a third party) even if such damage or loss was // reasonably foreseeable or Xilinx had been advised of the // possibility of the same. // // CRITICAL APPLICATIONS // Xilinx products are not designed or intended to be fail- // safe, or for use in any application requiring fail-safe // performance, such as life-support or safety devices or // systems, Class III medical devices, nuclear facilities, // applications related to the deployment of airbags, or any // other applications that could lead to death, personal // injury, or severe property or environmental damage // (individually and collectively, "Critical // Applications"). Customer assumes the sole risk and // liability of any use of Xilinx products in Critical // Applications, subject only to applicable laws and // regulations governing limitations on product liability. // // THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS // PART OF THIS FILE AT ALL TIMES. // // DO NOT MODIFY THIS FILE. #ifndef XTLM #include "xtlm.h" #endif #ifndef SYSTEMC_INCLUDED #include <systemc> #endif #if defined(_MSC_VER) #define DllExport __declspec(dllexport) #elif defined(__GNUC__) #define DllExport __attribute__ ((visibility("default"))) #else #define DllExport #endif #include "zcu104_base_auto_us_df_0_sc.h" #ifdef XILINX_SIMULATOR class DllExport zcu104_base_auto_us_df_0 : public zcu104_base_auto_us_df_0_sc { public: zcu104_base_auto_us_df_0(const sc_core::sc_module_name& nm); virtual ~zcu104_base_auto_us_df_0(); // module pin-to-pin RTL interface sc_core::sc_in< bool > s_axi_aclk; sc_core::sc_in< bool > s_axi_aresetn; sc_core::sc_in< sc_dt::sc_bv<64> > s_axi_awaddr; sc_core::sc_in< sc_dt::sc_bv<8> > s_axi_awlen; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_awsize; sc_core::sc_in< sc_dt::sc_bv<2> > s_axi_awburst; sc_core::sc_in< sc_dt::sc_bv<1> > s_axi_awlock; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_awcache; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_awprot; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_awregion; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_awqos; sc_core::sc_in< bool > s_axi_awvalid; sc_core::sc_out< bool > s_axi_awready; sc_core::sc_in< sc_dt::sc_bv<32> > s_axi_wdata; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_wstrb; sc_core::sc_in< bool > s_axi_wlast; sc_core::sc_in< bool > s_axi_wvalid; sc_core::sc_out< bool > s_axi_wready; sc_core::sc_out< sc_dt::sc_bv<2> > s_axi_bresp; sc_core::sc_out< bool > s_axi_bvalid; sc_core::sc_in< bool > s_axi_bready; sc_core::sc_in< sc_dt::sc_bv<64> > s_axi_araddr; sc_core::sc_in< sc_dt::sc_bv<8> > s_axi_arlen; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_arsize; sc_core::sc_in< sc_dt::sc_bv<2> > s_axi_arburst; sc_core::sc_in< sc_dt::sc_bv<1> > s_axi_arlock; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_arcache; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_arprot; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_arregion; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_arqos; sc_core::sc_in< bool > s_axi_arvalid; sc_core::sc_out< bool > s_axi_arready; sc_core::sc_out< sc_dt::sc_bv<32> > s_axi_rdata; sc_core::sc_out< sc_dt::sc_bv<2> > s_axi_rresp; sc_core::sc_out< bool > s_axi_rlast; sc_core::sc_out< bool > s_axi_rvalid; sc_core::sc_in< bool > s_axi_rready; sc_core::sc_out< sc_dt::sc_bv<64> > m_axi_awaddr; sc_core::sc_out< sc_dt::sc_bv<8> > m_axi_awlen; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_awsize; sc_core::sc_out< sc_dt::sc_bv<2> > m_axi_awburst; sc_core::sc_out< sc_dt::sc_bv<1> > m_axi_awlock; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_awcache; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_awprot; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_awregion; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_awqos; sc_core::sc_out< bool > m_axi_awvalid; sc_core::sc_in< bool > m_axi_awready; sc_core::sc_out< sc_dt::sc_bv<128> > m_axi_wdata; sc_core::sc_out< sc_dt::sc_bv<16> > m_axi_wstrb; sc_core::sc_out< bool > m_axi_wlast; sc_core::sc_out< bool > m_axi_wvalid; sc_core::sc_in< bool > m_axi_wready; sc_core::sc_in< sc_dt::sc_bv<2> > m_axi_bresp; sc_core::sc_in< bool > m_axi_bvalid; sc_core::sc_out< bool > m_axi_bready; sc_core::sc_out< sc_dt::sc_bv<64> > m_axi_araddr; sc_core::sc_out< sc_dt::sc_bv<8> > m_axi_arlen; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_arsize; sc_core::sc_out< sc_dt::sc_bv<2> > m_axi_arburst; sc_core::sc_out< sc_dt::sc_bv<1> > m_axi_arlock; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_arcache; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_arprot; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_arregion; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_arqos; sc_core::sc_out< bool > m_axi_arvalid; sc_core::sc_in< bool > m_axi_arready; sc_core::sc_in< sc_dt::sc_bv<128> > m_axi_rdata; sc_core::sc_in< sc_dt::sc_bv<2> > m_axi_rresp; sc_core::sc_in< bool > m_axi_rlast; sc_core::sc_in< bool > m_axi_rvalid; sc_core::sc_out< bool > m_axi_rready; protected: virtual void before_end_of_elaboration(); private: xtlm::xaximm_pin2xtlm_t<32,64,1,1,1,1,1,1>* mp_S_AXI_transactor; xsc::common::vectorN2scalar_converter<1>* mp_s_axi_awlock_converter; sc_signal< bool > m_s_axi_awlock_converter_signal; xsc::common::vectorN2scalar_converter<1>* mp_s_axi_arlock_converter; sc_signal< bool > m_s_axi_arlock_converter_signal; sc_signal< bool > m_S_AXI_transactor_rst_signal; xtlm::xaximm_xtlm2pin_t<128,64,1,1,1,1,1,1>* mp_M_AXI_transactor; xsc::common::scalar2vectorN_converter<1>* mp_m_axi_awlock_converter; sc_signal< bool > m_m_axi_awlock_converter_signal; xsc::common::scalar2vectorN_converter<1>* mp_m_axi_arlock_converter; sc_signal< bool > m_m_axi_arlock_converter_signal; sc_signal< bool > m_M_AXI_transactor_rst_signal; }; #endif // XILINX_SIMULATOR #ifdef XM_SYSTEMC class DllExport zcu104_base_auto_us_df_0 : public zcu104_base_auto_us_df_0_sc { public: zcu104_base_auto_us_df_0(const sc_core::sc_module_name& nm); virtual ~zcu104_base_auto_us_df_0(); // module pin-to-pin RTL interface sc_core::sc_in< bool > s_axi_aclk; sc_core::sc_in< bool > s_axi_aresetn; sc_core::sc_in< sc_dt::sc_bv<64> > s_axi_awaddr; sc_core::sc_in< sc_dt::sc_bv<8> > s_axi_awlen; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_awsize; sc_core::sc_in< sc_dt::sc_bv<2> > s_axi_awburst; sc_core::sc_in< sc_dt::sc_bv<1> > s_axi_awlock; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_awcache; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_awprot; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_awregion; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_awqos; sc_core::sc_in< bool > s_axi_awvalid; sc_core::sc_out< bool > s_axi_awready; sc_core::sc_in< sc_dt::sc_bv<32> > s_axi_wdata; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_wstrb; sc_core::sc_in< bool > s_axi_wlast; sc_core::sc_in< bool > s_axi_wvalid; sc_core::sc_out< bool > s_axi_wready; sc_core::sc_out< sc_dt::sc_bv<2> > s_axi_bresp; sc_core::sc_out< bool > s_axi_bvalid; sc_core::sc_in< bool > s_axi_bready; sc_core::sc_in< sc_dt::sc_bv<64> > s_axi_araddr; sc_core::sc_in< sc_dt::sc_bv<8> > s_axi_arlen; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_arsize; sc_core::sc_in< sc_dt::sc_bv<2> > s_axi_arburst; sc_core::sc_in< sc_dt::sc_bv<1> > s_axi_arlock; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_arcache; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_arprot; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_arregion; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_arqos; sc_core::sc_in< bool > s_axi_arvalid; sc_core::sc_out< bool > s_axi_arready; sc_core::sc_out< sc_dt::sc_bv<32> > s_axi_rdata; sc_core::sc_out< sc_dt::sc_bv<2> > s_axi_rresp; sc_core::sc_out< bool > s_axi_rlast; sc_core::sc_out< bool > s_axi_rvalid; sc_core::sc_in< bool > s_axi_rready; sc_core::sc_out< sc_dt::sc_bv<64> > m_axi_awaddr; sc_core::sc_out< sc_dt::sc_bv<8> > m_axi_awlen; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_awsize; sc_core::sc_out< sc_dt::sc_bv<2> > m_axi_awburst; sc_core::sc_out< sc_dt::sc_bv<1> > m_axi_awlock; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_awcache; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_awprot; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_awregion; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_awqos; sc_core::sc_out< bool > m_axi_awvalid; sc_core::sc_in< bool > m_axi_awready; sc_core::sc_out< sc_dt::sc_bv<128> > m_axi_wdata; sc_core::sc_out< sc_dt::sc_bv<16> > m_axi_wstrb; sc_core::sc_out< bool > m_axi_wlast; sc_core::sc_out< bool > m_axi_wvalid; sc_core::sc_in< bool > m_axi_wready; sc_core::sc_in< sc_dt::sc_bv<2> > m_axi_bresp; sc_core::sc_in< bool > m_axi_bvalid; sc_core::sc_out< bool > m_axi_bready; sc_core::sc_out< sc_dt::sc_bv<64> > m_axi_araddr; sc_core::sc_out< sc_dt::sc_bv<8> > m_axi_arlen; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_arsize; sc_core::sc_out< sc_dt::sc_bv<2> > m_axi_arburst; sc_core::sc_out< sc_dt::sc_bv<1> > m_axi_arlock; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_arcache; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_arprot; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_arregion; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_arqos; sc_core::sc_out< bool > m_axi_arvalid; sc_core::sc_in< bool > m_axi_arready; sc_core::sc_in< sc_dt::sc_bv<128> > m_axi_rdata; sc_core::sc_in< sc_dt::sc_bv<2> > m_axi_rresp; sc_core::sc_in< bool > m_axi_rlast; sc_core::sc_in< bool > m_axi_rvalid; sc_core::sc_out< bool > m_axi_rready; protected: virtual void before_end_of_elaboration(); private: xtlm::xaximm_pin2xtlm_t<32,64,1,1,1,1,1,1>* mp_S_AXI_transactor; xsc::common::vectorN2scalar_converter<1>* mp_s_axi_awlock_converter; sc_signal< bool > m_s_axi_awlock_converter_signal; xsc::common::vectorN2scalar_converter<1>* mp_s_axi_arlock_converter; sc_signal< bool > m_s_axi_arlock_converter_signal; sc_signal< bool > m_S_AXI_transactor_rst_signal; xtlm::xaximm_xtlm2pin_t<128,64,1,1,1,1,1,1>* mp_M_AXI_transactor; xsc::common::scalar2vectorN_converter<1>* mp_m_axi_awlock_converter; sc_signal< bool > m_m_axi_awlock_converter_signal; xsc::common::scalar2vectorN_converter<1>* mp_m_axi_arlock_converter; sc_signal< bool > m_m_axi_arlock_converter_signal; sc_signal< bool > m_M_AXI_transactor_rst_signal; }; #endif // XM_SYSTEMC #ifdef RIVIERA class DllExport zcu104_base_auto_us_df_0 : public zcu104_base_auto_us_df_0_sc { public: zcu104_base_auto_us_df_0(const sc_core::sc_module_name& nm); virtual ~zcu104_base_auto_us_df_0(); // module pin-to-pin RTL interface sc_core::sc_in< bool > s_axi_aclk; sc_core::sc_in< bool > s_axi_aresetn; sc_core::sc_in< sc_dt::sc_bv<64> > s_axi_awaddr; sc_core::sc_in< sc_dt::sc_bv<8> > s_axi_awlen; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_awsize; sc_core::sc_in< sc_dt::sc_bv<2> > s_axi_awburst; sc_core::sc_in< sc_dt::sc_bv<1> > s_axi_awlock; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_awcache; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_awprot; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_awregion; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_awqos; sc_core::sc_in< bool > s_axi_awvalid; sc_core::sc_out< bool > s_axi_awready; sc_core::sc_in< sc_dt::sc_bv<32> > s_axi_wdata; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_wstrb; sc_core::sc_in< bool > s_axi_wlast; sc_core::sc_in< bool > s_axi_wvalid; sc_core::sc_out< bool > s_axi_wready; sc_core::sc_out< sc_dt::sc_bv<2> > s_axi_bresp; sc_core::sc_out< bool > s_axi_bvalid; sc_core::sc_in< bool > s_axi_bready; sc_core::sc_in< sc_dt::sc_bv<64> > s_axi_araddr; sc_core::sc_in< sc_dt::sc_bv<8> > s_axi_arlen; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_arsize; sc_core::sc_in< sc_dt::sc_bv<2> > s_axi_arburst; sc_core::sc_in< sc_dt::sc_bv<1> > s_axi_arlock; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_arcache; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_arprot; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_arregion; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_arqos; sc_core::sc_in< bool > s_axi_arvalid; sc_core::sc_out< bool > s_axi_arready; sc_core::sc_out< sc_dt::sc_bv<32> > s_axi_rdata; sc_core::sc_out< sc_dt::sc_bv<2> > s_axi_rresp; sc_core::sc_out< bool > s_axi_rlast; sc_core::sc_out< bool > s_axi_rvalid; sc_core::sc_in< bool > s_axi_rready; sc_core::sc_out< sc_dt::sc_bv<64> > m_axi_awaddr; sc_core::sc_out< sc_dt::sc_bv<8> > m_axi_awlen; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_awsize; sc_core::sc_out< sc_dt::sc_bv<2> > m_axi_awburst; sc_core::sc_out< sc_dt::sc_bv<1> > m_axi_awlock; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_awcache; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_awprot; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_awregion; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_awqos; sc_core::sc_out< bool > m_axi_awvalid; sc_core::sc_in< bool > m_axi_awready; sc_core::sc_out< sc_dt::sc_bv<128> > m_axi_wdata; sc_core::sc_out< sc_dt::sc_bv<16> > m_axi_wstrb; sc_core::sc_out< bool > m_axi_wlast; sc_core::sc_out< bool > m_axi_wvalid; sc_core::sc_in< bool > m_axi_wready; sc_core::sc_in< sc_dt::sc_bv<2> > m_axi_bresp; sc_core::sc_in< bool > m_axi_bvalid; sc_core::sc_out< bool > m_axi_bready; sc_core::sc_out< sc_dt::sc_bv<64> > m_axi_araddr; sc_core::sc_out< sc_dt::sc_bv<8> > m_axi_arlen; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_arsize; sc_core::sc_out< sc_dt::sc_bv<2> > m_axi_arburst; sc_core::sc_out< sc_dt::sc_bv<1> > m_axi_arlock; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_arcache; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_arprot; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_arregion; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_arqos; sc_core::sc_out< bool > m_axi_arvalid; sc_core::sc_in< bool > m_axi_arready; sc_core::sc_in< sc_dt::sc_bv<128> > m_axi_rdata; sc_core::sc_in< sc_dt::sc_bv<2> > m_axi_rresp; sc_core::sc_in< bool > m_axi_rlast; sc_core::sc_in< bool > m_axi_rvalid; sc_core::sc_out< bool > m_axi_rready; protected: virtual void before_end_of_elaboration(); private: xtlm::xaximm_pin2xtlm_t<32,64,1,1,1,1,1,1>* mp_S_AXI_transactor; xsc::common::vectorN2scalar_converter<1>* mp_s_axi_awlock_converter; sc_signal< bool > m_s_axi_awlock_converter_signal; xsc::common::vectorN2scalar_converter<1>* mp_s_axi_arlock_converter; sc_signal< bool > m_s_axi_arlock_converter_signal; sc_signal< bool > m_S_AXI_transactor_rst_signal; xtlm::xaximm_xtlm2pin_t<128,64,1,1,1,1,1,1>* mp_M_AXI_transactor; xsc::common::scalar2vectorN_converter<1>* mp_m_axi_awlock_converter; sc_signal< bool > m_m_axi_awlock_converter_signal; xsc::common::scalar2vectorN_converter<1>* mp_m_axi_arlock_converter; sc_signal< bool > m_m_axi_arlock_converter_signal; sc_signal< bool > m_M_AXI_transactor_rst_signal; }; #endif // RIVIERA #ifdef VCSSYSTEMC #include "utils/xtlm_aximm_initiator_stub.h" #include "utils/xtlm_aximm_target_stub.h" class DllExport zcu104_base_auto_us_df_0 : public zcu104_base_auto_us_df_0_sc { public: zcu104_base_auto_us_df_0(const sc_core::sc_module_name& nm); virtual ~zcu104_base_auto_us_df_0(); // module pin-to-pin RTL interface sc_core::sc_in< bool > s_axi_aclk; sc_core::sc_in< bool > s_axi_aresetn; sc_core::sc_in< sc_dt::sc_bv<64> > s_axi_awaddr; sc_core::sc_in< sc_dt::sc_bv<8> > s_axi_awlen; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_awsize; sc_core::sc_in< sc_dt::sc_bv<2> > s_axi_awburst; sc_core::sc_in< sc_dt::sc_bv<1> > s_axi_awlock; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_awcache; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_awprot; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_awregion; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_awqos; sc_core::sc_in< bool > s_axi_awvalid; sc_core::sc_out< bool > s_axi_awready; sc_core::sc_in< sc_dt::sc_bv<32> > s_axi_wdata; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_wstrb; sc_core::sc_in< bool > s_axi_wlast; sc_core::sc_in< bool > s_axi_wvalid; sc_core::sc_out< bool > s_axi_wready; sc_core::sc_out< sc_dt::sc_bv<2> > s_axi_bresp; sc_core::sc_out< bool > s_axi_bvalid; sc_core::sc_in< bool > s_axi_bready; sc_core::sc_in< sc_dt::sc_bv<64> > s_axi_araddr; sc_core::sc_in< sc_dt::sc_bv<8> > s_axi_arlen; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_arsize; sc_core::sc_in< sc_dt::sc_bv<2> > s_axi_arburst; sc_core::sc_in< sc_dt::sc_bv<1> > s_axi_arlock; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_arcache; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_arprot; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_arregion; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_arqos; sc_core::sc_in< bool > s_axi_arvalid; sc_core::sc_out< bool > s_axi_arready; sc_core::sc_out< sc_dt::sc_bv<32> > s_axi_rdata; sc_core::sc_out< sc_dt::sc_bv<2> > s_axi_rresp; sc_core::sc_out< bool > s_axi_rlast; sc_core::sc_out< bool > s_axi_rvalid; sc_core::sc_in< bool > s_axi_rready; sc_core::sc_out< sc_dt::sc_bv<64> > m_axi_awaddr; sc_core::sc_out< sc_dt::sc_bv<8> > m_axi_awlen; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_awsize; sc_core::sc_out< sc_dt::sc_bv<2> > m_axi_awburst; sc_core::sc_out< sc_dt::sc_bv<1> > m_axi_awlock; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_awcache; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_awprot; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_awregion; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_awqos; sc_core::sc_out< bool > m_axi_awvalid; sc_core::sc_in< bool > m_axi_awready; sc_core::sc_out< sc_dt::sc_bv<128> > m_axi_wdata; sc_core::sc_out< sc_dt::sc_bv<16> > m_axi_wstrb; sc_core::sc_out< bool > m_axi_wlast; sc_core::sc_out< bool > m_axi_wvalid; sc_core::sc_in< bool > m_axi_wready; sc_core::sc_in< sc_dt::sc_bv<2> > m_axi_bresp; sc_core::sc_in< bool > m_axi_bvalid; sc_core::sc_out< bool > m_axi_bready; sc_core::sc_out< sc_dt::sc_bv<64> > m_axi_araddr; sc_core::sc_out< sc_dt::sc_bv<8> > m_axi_arlen; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_arsize; sc_core::sc_out< sc_dt::sc_bv<2> > m_axi_arburst; sc_core::sc_out< sc_dt::sc_bv<1> > m_axi_arlock; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_arcache; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_arprot; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_arregion; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_arqos; sc_core::sc_out< bool > m_axi_arvalid; sc_core::sc_in< bool > m_axi_arready; sc_core::sc_in< sc_dt::sc_bv<128> > m_axi_rdata; sc_core::sc_in< sc_dt::sc_bv<2> > m_axi_rresp; sc_core::sc_in< bool > m_axi_rlast; sc_core::sc_in< bool > m_axi_rvalid; sc_core::sc_out< bool > m_axi_rready; protected: virtual void before_end_of_elaboration(); private: xtlm::xaximm_pin2xtlm_t<32,64,1,1,1,1,1,1>* mp_S_AXI_transactor; xsc::common::vectorN2scalar_converter<1>* mp_s_axi_awlock_converter; sc_signal< bool > m_s_axi_awlock_converter_signal; xsc::common::vectorN2scalar_converter<1>* mp_s_axi_arlock_converter; sc_signal< bool > m_s_axi_arlock_converter_signal; sc_signal< bool > m_S_AXI_transactor_rst_signal; xtlm::xaximm_xtlm2pin_t<128,64,1,1,1,1,1,1>* mp_M_AXI_transactor; xsc::common::scalar2vectorN_converter<1>* mp_m_axi_awlock_converter; sc_signal< bool > m_m_axi_awlock_converter_signal; xsc::common::scalar2vectorN_converter<1>* mp_m_axi_arlock_converter; sc_signal< bool > m_m_axi_arlock_converter_signal; sc_signal< bool > m_M_AXI_transactor_rst_signal; // Transactor stubs xtlm::xtlm_aximm_initiator_stub * M_AXI_transactor_initiator_rd_socket_stub; xtlm::xtlm_aximm_initiator_stub * M_AXI_transactor_initiator_wr_socket_stub; xtlm::xtlm_aximm_target_stub * S_AXI_transactor_target_rd_socket_stub; xtlm::xtlm_aximm_target_stub * S_AXI_transactor_target_wr_socket_stub; // Socket stubs }; #endif // VCSSYSTEMC #ifdef MTI_SYSTEMC #include "utils/xtlm_aximm_initiator_stub.h" #include "utils/xtlm_aximm_target_stub.h" class DllExport zcu104_base_auto_us_df_0 : public zcu104_base_auto_us_df_0_sc { public: zcu104_base_auto_us_df_0(const sc_core::sc_module_name& nm); virtual ~zcu104_base_auto_us_df_0(); // module pin-to-pin RTL interface sc_core::sc_in< bool > s_axi_aclk; sc_core::sc_in< bool > s_axi_aresetn; sc_core::sc_in< sc_dt::sc_bv<64> > s_axi_awaddr; sc_core::sc_in< sc_dt::sc_bv<8> > s_axi_awlen; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_awsize; sc_core::sc_in< sc_dt::sc_bv<2> > s_axi_awburst; sc_core::sc_in< sc_dt::sc_bv<1> > s_axi_awlock; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_awcache; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_awprot; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_awregion; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_awqos; sc_core::sc_in< bool > s_axi_awvalid; sc_core::sc_out< bool > s_axi_awready; sc_core::sc_in< sc_dt::sc_bv<32> > s_axi_wdata; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_wstrb; sc_core::sc_in< bool > s_axi_wlast; sc_core::sc_in< bool > s_axi_wvalid; sc_core::sc_out< bool > s_axi_wready; sc_core::sc_out< sc_dt::sc_bv<2> > s_axi_bresp; sc_core::sc_out< bool > s_axi_bvalid; sc_core::sc_in< bool > s_axi_bready; sc_core::sc_in< sc_dt::sc_bv<64> > s_axi_araddr; sc_core::sc_in< sc_dt::sc_bv<8> > s_axi_arlen; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_arsize; sc_core::sc_in< sc_dt::sc_bv<2> > s_axi_arburst; sc_core::sc_in< sc_dt::sc_bv<1> > s_axi_arlock; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_arcache; sc_core::sc_in< sc_dt::sc_bv<3> > s_axi_arprot; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_arregion; sc_core::sc_in< sc_dt::sc_bv<4> > s_axi_arqos; sc_core::sc_in< bool > s_axi_arvalid; sc_core::sc_out< bool > s_axi_arready; sc_core::sc_out< sc_dt::sc_bv<32> > s_axi_rdata; sc_core::sc_out< sc_dt::sc_bv<2> > s_axi_rresp; sc_core::sc_out< bool > s_axi_rlast; sc_core::sc_out< bool > s_axi_rvalid; sc_core::sc_in< bool > s_axi_rready; sc_core::sc_out< sc_dt::sc_bv<64> > m_axi_awaddr; sc_core::sc_out< sc_dt::sc_bv<8> > m_axi_awlen; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_awsize; sc_core::sc_out< sc_dt::sc_bv<2> > m_axi_awburst; sc_core::sc_out< sc_dt::sc_bv<1> > m_axi_awlock; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_awcache; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_awprot; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_awregion; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_awqos; sc_core::sc_out< bool > m_axi_awvalid; sc_core::sc_in< bool > m_axi_awready; sc_core::sc_out< sc_dt::sc_bv<128> > m_axi_wdata; sc_core::sc_out< sc_dt::sc_bv<16> > m_axi_wstrb; sc_core::sc_out< bool > m_axi_wlast; sc_core::sc_out< bool > m_axi_wvalid; sc_core::sc_in< bool > m_axi_wready; sc_core::sc_in< sc_dt::sc_bv<2> > m_axi_bresp; sc_core::sc_in< bool > m_axi_bvalid; sc_core::sc_out< bool > m_axi_bready; sc_core::sc_out< sc_dt::sc_bv<64> > m_axi_araddr; sc_core::sc_out< sc_dt::sc_bv<8> > m_axi_arlen; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_arsize; sc_core::sc_out< sc_dt::sc_bv<2> > m_axi_arburst; sc_core::sc_out< sc_dt::sc_bv<1> > m_axi_arlock; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_arcache; sc_core::sc_out< sc_dt::sc_bv<3> > m_axi_arprot; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_arregion; sc_core::sc_out< sc_dt::sc_bv<4> > m_axi_arqos; sc_core::sc_out< bool > m_axi_arvalid; sc_core::sc_in< bool > m_axi_arready; sc_core::sc_in< sc_dt::sc_bv<128> > m_axi_rdata; sc_core::sc_in< sc_dt::sc_bv<2> > m_axi_rresp; sc_core::sc_in< bool > m_axi_rlast; sc_core::sc_in< bool > m_axi_rvalid; sc_core::sc_out< bool > m_axi_rready; protected: virtual void before_end_of_elaboration(); private: xtlm::xaximm_pin2xtlm_t<32,64,1,1,1,1,1,1>* mp_S_AXI_transactor; xsc::common::vectorN2scalar_converter<1>* mp_s_axi_awlock_converter; sc_signal< bool > m_s_axi_awlock_converter_signal; xsc::common::vectorN2scalar_converter<1>* mp_s_axi_arlock_converter; sc_signal< bool > m_s_axi_arlock_converter_signal; sc_signal< bool > m_S_AXI_transactor_rst_signal; xtlm::xaximm_xtlm2pin_t<128,64,1,1,1,1,1,1>* mp_M_AXI_transactor; xsc::common::scalar2vectorN_converter<1>* mp_m_axi_awlock_converter; sc_signal< bool > m_m_axi_awlock_converter_signal; xsc::common::scalar2vectorN_converter<1>* mp_m_axi_arlock_converter; sc_signal< bool > m_m_axi_arlock_converter_signal; sc_signal< bool > m_M_AXI_transactor_rst_signal; // Transactor stubs xtlm::xtlm_aximm_initiator_stub * M_AXI_transactor_initiator_rd_socket_stub; xtlm::xtlm_aximm_initiator_stub * M_AXI_transactor_initiator_wr_socket_stub; xtlm::xtlm_aximm_target_stub * S_AXI_transactor_target_rd_socket_stub; xtlm::xtlm_aximm_target_stub * S_AXI_transactor_target_wr_socket_stub; // Socket stubs }; #endif // MTI_SYSTEMC #endif // IP_ZCU104_BASE_AUTO_US_DF_0_H_
fb68cac0243822ecd163a0a108168426b76e6de7
8117773d24f922aac3d80d04392f62f74aab1f8c
/node_modules/react-native-windows/Microsoft.ReactNative/Views/DevMenu.h
707d0ae90b9a695395a6005442d33ab99cf7d729
[ "MIT" ]
permissive
micarthur/wend
bb7b34c8137ff2cfdad8a22d5e8565497be877b3
dcf44ba1d5968958d39e69c86367b4ca038aca98
refs/heads/main
2023-05-13T19:04:10.169152
2021-06-11T19:28:35
2021-06-11T19:28:35
374,455,909
1
0
null
null
null
null
UTF-8
C++
false
false
1,572
h
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #pragma once #include <cxxreact/CxxModule.h> #include <functional/functor.h> #include <NativeModules.h> #include <ReactHost/React.h> namespace Microsoft::ReactNative { struct DevMenuManager : public std::enable_shared_from_this<DevMenuManager> { DevMenuManager(Mso::CntPtr<Mso::React::IReactContext> const &reactContext); static void InitDevMenu(Mso::CntPtr<Mso::React::IReactContext> const &reactContext) noexcept; static void Show(React::IReactPropertyBag const &properties) noexcept; static void Hide(React::IReactPropertyBag const &properties) noexcept; private: void CreateAndShowUI() noexcept; void Hide() noexcept; void Init() noexcept; const Mso::CntPtr<Mso::React::IReactContext> m_context; xaml::Controls::Primitives::Popup m_popup{nullptr}; xaml::Controls::Flyout m_flyout{nullptr}; xaml::Controls::Button::Click_revoker m_remoteDebugJSRevoker{}; xaml::Controls::Button::Click_revoker m_cancelRevoker{}; xaml::Controls::Button::Click_revoker m_toggleInspectorRevoker{}; xaml::Controls::Button::Click_revoker m_reloadJSRevoker{}; xaml::Controls::Button::Click_revoker m_fastRefreshRevoker{}; xaml::Controls::Button::Click_revoker m_directDebuggingRevoker{}; xaml::Controls::Button::Click_revoker m_breakOnNextLineRevoker{}; winrt::CoreDispatcher::AcceleratorKeyActivated_revoker m_coreDispatcherAKARevoker{}; xaml::UIElement::KeyDown_revoker m_keyDownRevoker; }; } // namespace Microsoft::ReactNative
f01acf90f2b2162b505e22e2c0b9f5355ad996fc
39ad116dab0ba316a6e7f737a031a0f853685d41
/838/a.cpp
a761738168fd1f5bd5f6735c736839e19026dd07
[]
no_license
Abunyawa/contests
e0f9d157ce93d3fc5fbff0e3e576f15286272c98
9923df8f167e8091e23f890b01368a3a8f61e452
refs/heads/master
2023-05-31T14:20:31.983437
2023-05-11T14:19:58
2023-05-11T14:19:58
251,015,695
10
0
null
null
null
null
UTF-8
C++
false
false
1,233
cpp
// chrono::system_clock::now().time_since_epoch().count() #include <bits/stdc++.h> #define pb push_back #define eb emplace_back #define mp make_pair #define fi first #define se second #define all(x) (x).begin(), (x).end() #define sz(x) (int)(x).size() #define rep(i, a, b) for (int i = (a); i < (b); ++i) #define debug(x) cerr << #x << " = " << x << endl using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<ll> vl; void yes(){ cout<<"YES"<<'\n'; } void no(){ cout<<"NO"<<'\n'; } void solve() { int n; cin>>n; vi a(n); int sum = 0; int ans = 1e6; for(int i=0;i<n;i++){ cin>>a[i]; sum+=a[i]; } if(sum%2==0){ cout<<0<<'\n'; return; } for(int i=0;i<n;i++){ ll left = sum-a[i]; int ctr = 0; while(a[i]>0){ ctr++; a[i]/=2; if((left+a[i])%2==0){ ans = min(ans,ctr); break; } } } cout<<ans<<'\n'; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int tt = 1; cin>>tt; while (tt--) { solve(); } return 0; }
f9368354f01adf6f45735662099dfe05e058ba62
ae840e20b19056a8712844e1331dd3b5cf0937aa
/MiniSlam/MiniSlam/System.cpp
f020f2dbe3fee220990c190680b1aaea8c9094ee
[]
no_license
wchen61/MiniSlam
ed715c2fdcfa0b8504b33e214195479517502276
87d03d332fada932e95aebda55c4255b7f74b914
refs/heads/master
2021-09-16T21:38:34.874127
2018-06-25T11:50:11
2018-06-25T11:50:11
109,693,084
1
0
null
null
null
null
UTF-8
C++
false
false
1,207
cpp
// // System.cpp // MiniSlam // // Created by weiwu.cww on 2017/11/12. // Copyright © 2017年 weiwu.cww. All rights reserved. // #include "System.hpp" #include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp> using namespace cv; namespace MiniSlam { System::System() : mPubFrame(false), mFirstPubTime(0.0f), mFreq(10), mFirstImage(true), mPubFrameCount(0) { mState = NOT_INITIALIZED; mTracking = new Tracking(); } void System::ProcessFrame(const cv::Mat &im, const double &timestamp) { if (mState == NOT_INITIALIZED) { Initialize(); mState = INITIALIZING; } if (mFirstImage) { mFirstImage = false; mFirstPubTime = timestamp; } if (round(1.0 * mPubFrameCount / ((timestamp - mFirstPubTime) * 10e-6)) <= mFreq) { mPubFrame = true; if (abs(1.0 * mPubFrameCount / ((timestamp - mFirstPubTime) * 10e-6) - mFreq) < 0.01 * mFreq) { mFirstPubTime = timestamp; mPubFrameCount = 0; } } else { mPubFrame = false; } mTracking->GrabImage(im, timestamp, mPubFrame); //mInitializer.Initialize(mCurrentFrame); } void System::Initialize() { } }
d72619c9462861c40f100c02b6c3399bc8b50d5e
a80f9892194bb0a4e2262e116f6c81df1149ab4d
/Linear_Lights_FastLED_11/Linear_Lights_FastLED_11.ino
b44318ea71304aab0aed51d54ff0c7b5469a83ed
[]
no_license
stevedudek/Arduino
f4bfe975c5da7148d67a20f3103d9de01fec6ae7
9025714324190f7b8b352185d3455f8b88636419
refs/heads/master
2023-01-08T00:14:57.236175
2022-12-27T00:40:37
2022-12-27T00:40:37
29,985,600
1
0
null
null
null
null
UTF-8
C++
false
false
15,338
ino
#include <FastLED.h> // // Linear Lights with FastLED // // HSV - got rid of palettes // Noise // // 3/28/2018 // #define NUM_LEDS 11 #define BRIGHTNESS 255 // (0-255) #define DELAY_TIME 40 // in milliseconds #define DATA_PIN 12 #define CLOCK_PIN 11 CRGB leds[NUM_LEDS]; CHSV current_frame[NUM_LEDS]; // framebuffers CHSV next_frame[NUM_LEDS]; // framebuffers uint8_t shuffle[NUM_LEDS]; // For random-fill show (nasty global) // Light colors #define MAX_COLOR 256 // Colors are 0-255 uint8_t foreColor = 0; // Starting foreground color uint8_t backColor = MAX_COLOR / 2; // Starting background color CHSV BLACK = CHSV( 0, 0, 0); #define MIN_COLOR_SPEED 2 // Higher = slower #define MAX_COLOR_SPEED 10 // Higher = slower uint8_t foreColorSpeed = MAX_COLOR_SPEED / 2; // Lower = faster uint8_t backColorSpeed = MAX_COLOR_SPEED / 2; // Lower = faster // Palettes #define CAN_CHANGE_PALETTES true uint8_t palette_start = 0; // 0-255 (hue) uint8_t palette_width = 255; // 255 = full RGB #define PALETTE_DURATION 300 // seconds between palettes // Shows - now enumerated #define NUM_SHOWS 9 uint8_t current_show = 0; #define SHOW_DURATION 60 // seconds uint16_t MAX_SMALL_CYCLE = SHOW_DURATION * (1000 / DELAY_TIME); #define FADE_OUT_TIME 3 // seconds to fade out #define FADE_IN_TIME 3 // seconds to fade out // Clocks and time uint8_t morph = 0; uint32_t small_cycle = 0; uint16_t cycle = 0; uint8_t bands_bpm_1, bands_bpm_2; uint8_t band_min_1, band_min_2; #define MIN_BPM 5 #define MAX_BPM 60 // wait times #define WAIT_DURATION 20 // second between increasing wait time #define MIN_WAIT 2 // Minimum number of morph steps in a cycle #define MAX_WAIT 50 // Maximum number of morph steps in a cycle #define NUM_WAIT_VALUES 10 // Number of stored delay times uint8_t wait = NUM_WAIT_VALUES / 2; uint8_t total_frames; // noise #define HAVE_NOISE true // set to false to suppress noise #define MAX_HUE_NOISE 64 // 255 max #define MAX_SAT_NOISE 64 // 255 max uint8_t noise_hue_intense = MAX_HUE_NOISE / 2; uint8_t noise_sat_intense = MAX_SAT_NOISE / 2; static uint16_t noise_x; static uint16_t noise_y; static uint16_t noise_z; uint16_t noise_speed = 20; // speed is set dynamically once we've started up uint16_t noise_scale = 30; // scale is set dynamically once we've started up uint8_t noise[2][NUM_LEDS]; const uint8_t noise_param_set[] PROGMEM = { 0,0, 20,30, 10,50, 8,120, 4,30, 8,50, 20,90, 20,30, 20,20, 50,50, 90,90, 30,20 }; // // Setup // void setup() { delay( 3000 ); // power-up safety delay randomSeed(analogRead(0)); Serial.begin(9600); Serial.println("Start"); FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN>(leds, NUM_LEDS); FastLED.setBrightness( BRIGHTNESS ); noise_x = random16(); noise_y = random16(); noise_z = random16(); set_all_black(); total_frames = getNumFrames(wait); } void loop() { switch (current_show) { case 0: allOn(); break; case 1: morphChain(); break; case 2: randomfill(); break; case 3: randomcolors(); break; case 4: twocolor(); break; case 5: lightwave(); break; case 6: sawtooth(); break; case 7: noisyshow(); break; default: bands(); break; } morph_frame(); // Morph the display and update the LEDs delay(DELAY_TIME); // The only delay morph++; small_cycle++; fill_noise(); if (small_cycle % foreColorSpeed == 0) { foreColor = IncColor(foreColor, 1); } if (small_cycle % backColorSpeed == 0) { backColor = IncColor(backColor, 1); } if (morph >= total_frames) { // Finished morphing morph = 0; if (cycle++ > 10000) { cycle = 0; // Advance the cycle clock } push_frame(); change_it_up(); } if (small_cycle >= MAX_SMALL_CYCLE) { next_show(); } } // // change_it_up // void change_it_up() { EVERY_N_SECONDS(PALETTE_DURATION) { change_palette(); } EVERY_N_SECONDS(WAIT_DURATION) { wait = up_or_down(wait, 0, MAX_WAIT); total_frames = getNumFrames(wait); } } // // next_show // #define ARRAY_SIZE(A) (sizeof(A) / sizeof((A)[0])) void next_show() { current_show = random8(NUM_SHOWS); morph = 0; small_cycle = 0; cycle = 0; set_noise_parameters(); set_all_black(); foreColorSpeed = up_or_down(foreColorSpeed, MIN_COLOR_SPEED, MAX_COLOR_SPEED); backColorSpeed = up_or_down(backColorSpeed, MIN_COLOR_SPEED, MAX_COLOR_SPEED); } // // is_show_start // boolean is_show_start() { return (cycle == 0 && morph == 0); } // // change_palette // void change_palette() { if (CAN_CHANGE_PALETTES) { palette_start = random8(255); palette_width = random8(20, 255); } } void set_all_black() { for (int i = 0; i < NUM_LEDS; i++) { current_frame[i] = BLACK; next_frame[i] = BLACK; leds[i] = BLACK; } FastLED.show(); } void fill(CHSV color) { for (int i = 0; i < NUM_LEDS; i++) { setPixelColor(i, color); } } // // All On - turns all the pixels on the foreColor // void allOn() { fill(Wheel(foreColor)); } // // randomly fill in pixels from blank to all on, then takes them away // void randomfill() { int i, j, save, pos; pos = cycle % (NUM_LEDS*2); // Where we are in the show if (pos == 0) { // Start of show shuffle_leds(); } if (pos > NUM_LEDS) { pos = (2 * NUM_LEDS) - pos; } for (i=0; i < NUM_LEDS; i++) { if (i < pos) { setPixelColor(shuffle[i], Wheel(foreColor)); // Turning on lights one at a time } else { setPixelColor(shuffle[NUM_LEDS-(i % NUM_LEDS)-1], BLACK); // Turning off lights one at a time } } } // // Shuffle LEDS // void shuffle_leds() { int i, j, save; for (i=0; i < NUM_LEDS; i++) { shuffle[i] = i; // before shuffle } for (i=0; i < NUM_LEDS; i++) { // here's position j = random8(NUM_LEDS); // there's position save = shuffle[i]; shuffle[i] = shuffle[j]; // first swap shuffle[j] = save; // second swap } } // // random colors - turns each pixel on to a random color // void randomcolors() { if (is_show_start()) { // Start of show: assign lights to random colors for (int i=0; i < NUM_LEDS; i++) { shuffle[i] = random8(MAX_COLOR); } } // Otherwise, fill lights with their color for (int i=0; i < NUM_LEDS; i++) { setPixelColor(i, Wheel(shuffle[i])); } } // // two color - alternates the color of pixels between two colors // void twocolor() { for (int i = 0; i < NUM_LEDS; i++) { if (i % 2) { setPixelColor(i, Wheel(foreColor)); } else { setPixelColor(i, Wheel(backColor)); } } } // // Morph Chain - morphs color 1 from position x to color 2 at position x+n // void morphChain() { for (int i=0; i < NUM_LEDS; i++) { uint8_t fract = map((i+(cycle % NUM_LEDS)) % NUM_LEDS, 0, NUM_LEDS, 0, 255); setPixelColor(NUM_LEDS-i-1, Wheel(interpolate_wrap(foreColor, backColor, fract))); } } // // Saw tooth - Fills in pixels with a sawtooth of intensity // void sawtooth() { for (int i=0; i < NUM_LEDS; i++) { uint16_t fract = map((i+(cycle % NUM_LEDS)) % NUM_LEDS, 0, NUM_LEDS, 0, 512); if (fract >= 256) { fract = 512 - fract; // the subtraction creates the sawtooth } // "i" will have pattern move up; "NUM_LEDS-i-1'' will have pattern move down setPixelColor(NUM_LEDS-i-1, Gradient_Wheel(foreColor, fract)); } } // // bands // void bands() { if (is_show_start()) { noise_hue_intense = 0; // Turn off regular noise noise_sat_intense = 0; bands_bpm_1 = random8(MIN_BPM, MAX_BPM); bands_bpm_2 = random8(MIN_BPM, MAX_BPM); band_min_1 = random8(64, 192); band_min_2 = random8(64, 192); } uint8_t wave; for (int i=0; i < NUM_LEDS; i++) { wave = beatsin8(bands_bpm_1, 0, 255, 0, map(i, 0, NUM_LEDS, 0, 255) ); wave = (wave > band_min_1) ? map(wave, band_min_1, 255, 0, 255) : 0; if (wave > 0) { setPixelColor(i, CHSV(foreColor, 255, wave) ); } else { setPixelColor(i, BLACK); } wave = beatsin8(bands_bpm_2, 0, 255, 0, map(i, 0, NUM_LEDS, 0, 255) ); wave = (wave > band_min_2) ? map(wave, band_min_2, 255, 0, 255) : 0; if (wave > 0) { addPixelColor(NUM_LEDS - i - 1, CHSV(backColor, 255, wave) ); } } } // // noisyshow // void noisyshow() { if (is_show_start()) { noise_hue_intense = 0; // Turn off regular noise noise_sat_intense = 0; } for (int i=0; i < NUM_LEDS; i++) { setPixelColor(i, CHSV(noise[0][i], 255, noise[1][NUM_LEDS-i-1])); } } // // lightwave - just one pixel traveling along the chain // void lightwave() { for (int i=0; i < NUM_LEDS; i++) { if (i == cycle % NUM_LEDS) { setPixelColor(i, Wheel(foreColor)); } else { setPixelColor(i, BLACK); } } } // // lightrunup -lights fill up one at time // void lightrunup() { int pos = cycle % (NUM_LEDS*2); // Where we are in the show if (pos >= NUM_LEDS) { pos = (NUM_LEDS*2) - pos; } for (int i=0; i < NUM_LEDS; i++) { if (i < pos) { setPixelColor(i, Wheel(foreColor)); // Turning on lights one at a time } else { setPixelColor(i, BLACK); // black } } } // // morph_frame // void morph_frame() { uint8_t fract = map(morph, 0, total_frames-1, 0, 255); // 0 - 255 for (int i = 0; i < NUM_LEDS; i++) { setLEDinterpHSV(i, current_frame[i], next_frame[i], fract); } check_fades(); FastLED.show(); // Update the display } // // push_frame // void push_frame() { for (int i = 0; i < NUM_LEDS; i++) { current_frame[i] = next_frame[i]; } } // // constrain_palette // CHSV constrain_palette(uint8_t i, CHSV color) { if (HAVE_NOISE) { color.s = add_noise_to_channel(noise[1][NUM_LEDS - i - 1], color.s, noise_sat_intense); color.h = add_noise_to_channel(noise[0][i], color.h, noise_hue_intense); } color.h = map8(sin8(color.h), palette_start, (palette_start + palette_width) % 256); return color; } // // add_noise_to_channel // uint8_t add_noise_to_channel(uint8_t noise_amount, uint8_t value, uint8_t noise_intense) { int new_value = value + (map8(noise_amount, 0, noise_intense) / 2) - (noise_intense / 2); return new_value % 256; } // // check_fades - check the fade-to-blacks at beginning and end of show // void check_fades() { uint8_t fade_amount = 0; if (small_cycle <= (FADE_IN_TIME * 1000 / DELAY_TIME)) { fade_amount = map(small_cycle, 0, (FADE_IN_TIME * 1000 / DELAY_TIME), 256, 0); } else if ((MAX_SMALL_CYCLE - small_cycle) <= (FADE_OUT_TIME * 1000 / DELAY_TIME)) { fade_amount = map((MAX_SMALL_CYCLE - small_cycle), 0, (FADE_OUT_TIME * 1000 / DELAY_TIME), 256, 0); } if (fade_amount > 0) { for (int i = 0; i < NUM_LEDS; i++) { leds[i].fadeToBlackBy(fade_amount); } } } void setPixelColor(int pos, CHSV color) { next_frame[pos] = color; } // // addPixelColor - add color to the existing color in next_frame // void addPixelColor(int pos, CHSV c2) { CHSV c1 = next_frame[pos]; if (c1.v > c2.v) { next_frame[pos] = c1; } else { next_frame[pos] = c2; } } // // IncColor - adds amount to color // uint8_t IncColor(uint8_t c, uint8_t amount) { return (c + amount ) % MAX_COLOR; } // // up_or_down - increase on decrease a counter randomly within bounds // uint8_t up_or_down(uint8_t counter, uint8_t min_value, uint8_t max_value) { counter += (random8(2) * 2 - 1); // 0-1 -> 0,2 -> -1 or +1 if (counter < min_value) { return min_value + 1; } else if (counter > max_value) { return max_value - 1; } else { return counter; } } // // getNumFrames - convert a wait value into a number of morph frames // uint8_t getNumFrames(uint8_t wait_value) { return map(wait_value, 0, NUM_WAIT_VALUES-1, MIN_WAIT, MAX_WAIT); } // // Wheel - Input a hue (0-255) to get a color // CHSV Wheel(uint8_t hue) { return Gradient_Wheel(hue, 255); // 255 = full brightness } // // Gradient_Wheel - Input a hue and intensity (0-255) to get a CHSV from the palette // CHSV Gradient_Wheel(uint8_t hue, uint8_t intensity) { return CHSV(hue, 255, intensity); } // // setLEDinterpHSV - Set LED i to the interpolate of two HSV colors // void setLEDinterpHSV(int i, CHSV c1, CHSV c2, uint8_t fract) { if (c1 == c2) { leds[i] = constrain_palette(i, c1); } else if (fract == 0) { leds[i] = constrain_palette(i, c1); return; } else if (fract == 255) { leds[i] = constrain_palette(i, c2); return; } else if (is_black(c1)) { leds[i] = constrain_palette(i, c2); leds[i].fadeToBlackBy(255 - fract); return; } else if (is_black(c2)) { leds[i] = constrain_palette(i, c1); leds[i].fadeToBlackBy(fract); return; } else { leds[i] = constrain_palette(i, CHSV(interpolate_wrap(c1.h, c2.h, fract), interpolate(c1.s, c2.s, fract), interpolate(c1.v, c2.v, fract) )); return; } } // is_black boolean is_black(CHSV color) { return color == BLACK; } // // Interpolate - returns the fractional point from a to b // float interpolate(uint8_t a, uint8_t b, uint8_t fract) { return lerp8by8(a, b, fract); } // // Interpolate Wrap - returns the fractional point from a to b, checking both ways around a circle // uint8_t interpolate_wrap(uint8_t a, uint8_t b, uint8_t fract) { uint8_t distCCW, distCW; if (a >= b) { distCW = 256 + b - a; distCCW = a - b; } else { distCW = b - a; distCCW = 256 + a - b; } if (distCW <= distCCW) { return a + map8(fract, 0, distCW); } else { return a - map8(fract, 0, distCCW); } } // // set_noise_parameters - at the end of each show, change the noise parameters // void set_noise_parameters() { if (!HAVE_NOISE) { return; } noise_hue_intense = random8(MAX_HUE_NOISE); noise_sat_intense = random8(MAX_SAT_NOISE); uint8_t noise_set = random8(ARRAY_SIZE(noise_param_set) / 2); noise_speed = pgm_read_byte_near(noise_param_set + (noise_set * 2)); noise_scale = pgm_read_byte_near(noise_param_set + (noise_set * 2) + 1); return; } // // fill_noise - see Examples: FastLed / NoisePlusPalette // void fill_noise() { uint8_t dataSmoothing = 0; if( noise_speed < 50) { dataSmoothing = 200 - (noise_speed * 4); } for(int i = 0; i < 2; i++) { // 0 = hue, 1 = sat int ioffset = noise_scale * i; for(int j = 0; j < NUM_LEDS; j++) { int joffset = noise_scale * j; uint8_t data = inoise8(noise_x + ioffset, noise_y + joffset, noise_z); // The range of the inoise8 function is roughly 16-238. // These two operations expand those values out to roughly 0..255 // You can comment them out if you want the raw noise data. data = qsub8(data,16); data = qadd8(data,scale8(data,39)); if( dataSmoothing ) { uint8_t olddata = noise[i][j]; uint8_t newdata = scale8( olddata, dataSmoothing) + scale8( data, 256 - dataSmoothing); data = newdata; } noise[i][j] = data; } } noise_z += noise_speed; // apply slow drift to X and Y, just for visual variation. noise_x += noise_speed / 8; noise_y -= noise_speed / 16; }
a17d7cbe0b682d12ce4f1351de18557e401496ac
54a3c75066411580002bc984664883e52932a908
/Program Assignments/Chapter 10/Calendar/main.cpp
6b4f1e980c90e852105d9607cc9569887fb62e8d
[]
no_license
tyler-cranmer/Data_Structures
5287c9b5c22109b621c944d716ad43aa015b3dbc
da855c2c9489e7fffd5972601dffdb4440bf9780
refs/heads/main
2023-06-27T12:32:01.304357
2021-07-30T22:23:02
2021-07-30T22:23:02
391,179,891
0
0
null
null
null
null
UTF-8
C++
false
false
3,495
cpp
/*Chapter 11 Program: George Tyler Cranmer 2.10.2020. This file contains the 'main' function. This program promps the user to set the month, day and year. This will print out the given date entered, test to see if the given year is a leap year, calculate how many days have passed this year, calculate the days left in the year and how many days are in the entered month. */ #include <iostream> #include<string> #include "dateType.h" #include "dayType.h" using namespace std; int main() { dateType date; //creating an object called date int month = 0; int day = 0; int year = 0; int choice = 0; while (choice != 9) //run menu until user presses 9 to quit. { cout << "Enter 1 to set the month." << endl; cout << "Enter 2 to set the day." << endl; cout << "Enter 3 to set the year." << endl; cout << "Enter 4 to see that date entered." << endl; cout << "Enter 5 if you are looking to test if its a leap year." << endl; cout << "Enter 6 to check how many days have passed this year." << endl; cout << "Enter 7 to find out the number of days left in the year." << endl; cout << "Enter 8 if you are looking to find out the number of days in the month." << endl; cout << "Enter 9 if you would like to quit." << endl; cin >> choice; switch (choice) { case 1: //prompting the user to set the month cout << "What month is it: "; cin >> month; date.setMonth(month); break; case 2://prompting the user to set the day cout << "What is the day today: "; cin >> day; date.setDay(day); break; case 3://prompting the user to set the year cout << "What year is it: "; cin >> year; date.setYear(year); break; case 4://prints date date.printDate(); break; case 5://checks to see if it is a leap year if (date.isLeapYear() == true) { cout << "This is a Leap Year." << endl; break; } else cout << "This is not a Leap Year." << endl; break; case 6: //checks to see how many days have past this year cout << "We have been through " << date.daysPast() << " days this year." << endl; break; case 7://checks to see how many days are left in the year cout << "We have " << date.daysRemain() << " days left in the year" << endl; break; case 8://checks to see how many days are in the month cout << "There are : " << date.daysInMonth() << " days this month." << endl; break; case 9: break; } } return 0; } // Run program: Ctrl + F5 or Debug > Start Without Debugging menu // Debug program: F5 or Debug > Start Debugging menu // Tips for Getting Started: // 1. Use the Solution Explorer window to add/manage files // 2. Use the Team Explorer window to connect to source control // 3. Use the Output window to see build output and other messages // 4. Use the Error List window to view errors // 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project // 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
93f8adb82fbc9acefd95b1752f8fc12acbaccd70
44a1382fbb4f566a933ff2ad3a864d6f6f4dcaf2
/Rotate_List.cpp
fc9cb4a3c201dc2a492b2f9dc0bfe9370009fa84
[]
no_license
yashparmar15/Cpp-Codes
e3f15c5f6bb626d5b8e8115a14a3a825ed138630
7016ef17f03f9d493ee7866785f27e73b09779e7
refs/heads/master
2023-04-19T02:39:19.138477
2021-05-09T18:12:55
2021-05-09T18:12:55
276,151,617
2
0
null
null
null
null
UTF-8
C++
false
false
787
cpp
class Solution { public: ListNode* rotateRight(ListNode* head, int k) { if(head==NULL|| head->next==NULL) return head; ListNode* temp=head; int n=1; while(temp->next!=NULL) { n++; temp=temp->next; } if(k%n==0) return head; int rot=k%n; rot=(n-rot); ListNode* temp1=head; for(int i=1;i<rot;i++) temp1=temp1->next; ListNode* newhead=temp1->next; temp1->next=NULL; temp = newhead; while(temp != NULL){ if(temp->next == NULL){ temp->next = head; break; } temp = temp->next; } return newhead; } };
55c515a1f2b161dde86838d6171130a18753d8bc
3fc19c271eca0fbbb423aae28cb0ef53c0c3a291
/codeforces/1466/D.cpp
19edfb3348dc851a223ea469613a2717f25995bc
[]
no_license
tstanvir/mySolutionRepo
09373dccc86ac8a6d1992a6761a81b98035a8977
0b635d689424bc8f55f0efd54ed028638d81a0e2
refs/heads/master
2023-08-11T01:53:53.320511
2021-05-22T18:06:00
2021-09-14T15:18:55
353,521,176
1
0
null
null
null
null
UTF-8
C++
false
false
5,171
cpp
/// Bismillahir Rahmanir Rahim //Author: Tanvir Hussain //ICE,NSTU #include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; const long long MOD = 1000000007; const double rad=(acos(-1)/180.00); #define IOS ios::sync_with_stdio(false); #define SET(x) memset(x, 0, sizeof(x)) #define SET2d(x,m,n) memset(x, 0, sizeof(x[0][0]) * m * n) #define SETBOOL(x) memset(x,false,sizeof(x)) #define CLR(x) memset(x, -1, sizeof(x)) #define CLR2d(x,m,n) memset(x, -1, sizeof(x[0][0]) * m * n) #define mp make_pair #define PII pair<int, int> #define pf printf #define sf scanf #define ALL(x) x.begin(),x.end() #define pb push_back #define np std::string::npos #define highest(x) numeric_limits<x>::max() #define lowest(x) numeric_limits<x>::min() #define Inf INFINITY #define minv(v) *min_element(v.begin(),v.end()) #define maxv(v) *max_element(v.begin(),v.end()) #define cases(cs,t) for(int cs=1;cs<=t;cs++) #define PI acos(-1) #define no1 __builtin_popcount #define BOUNDARY(i, j) ((i >= 0 && i < row) && (j >= 0 && j < column)) #define uniq(vec) vec.resize(distance(vec.begin(),unique(vec.begin(),vec.end()))) #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> #define sz(a) int(a.size()) #define ff first #define ss second #define endl "\n" #define forch(it,s) for(auto it:s) #define each(it,s) for(auto it = s.begin(); it != s.end(); ++it) #define rep(i,a) for(int i=0; i<a;i++) #define rep1(i,a,b) for(int i=(a);i<=(b);++i) #define irep(i,b,a) for(int i=(b);i>=(a);--i) #define bits(n) __builtin_popcount(n) #define maxpq priority_queue<int> #define minpq priority_queue<int, vector<int>, greater<int> > #define preci cout<<fixed<<setprecision(9); vector<string> vec_splitter(string s) { s += ','; vector<string> res; while(!s.empty()) { res.push_back(s.substr(0, s.find(','))); s = s.substr(s.find(',') + 1); } return res; } void debug_out( vector<string> __attribute__ ((unused)) args, __attribute__ ((unused)) int idx, __attribute__ ((unused)) int LINE_NUM) { cerr << endl; } template <typename Head, typename... Tail> void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) { if(idx > 0) cerr << ", "; else cerr << "Line(" << LINE_NUM << ") "; stringstream ss; ss << H; cerr << args[idx] << " = " << ss.str(); debug_out(args, idx + 1, LINE_NUM, T...); } int gcd(int a, int b) { if (a == 0) return b; return gcd(b % a, a);} typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<pair<int,int>> vpii; typedef vector<pair<ll,ll>> vpll; typedef tree<pair<int, int>,null_type,less<pair<int, int>>,rb_tree_tag,tree_order_statistics_node_update> ordered_multiset; int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1}; int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1}; int dx4[] = {0, 0, 1, -1}; int dy4[] = {1, -1, 0, 0}; const int maxx=100005; inline void normal(ll &a) { a %= MOD; (a < 0) && (a += MOD); } inline ll modMul(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); return (a*b)%MOD; } inline ll modAdd(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); return (a+b)%MOD; } inline ll modSub(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); a -= b; normal(a); return a; } inline ll modPow(ll b, ll p) { ll r = 1; while(p) { if(p&1) r = modMul(r, b); b = modMul(b, b); p >>= 1; } return r; } inline ll modInverse(ll a) { return modPow(a, MOD-2); } /// When MOD is prime. inline ll modDiv(ll a, ll b) { return modMul(a, modInverse(b)); } //this fuction sorts vector pair according to first element in descending order. bool sortinrev(const pair<int,int> &a,const pair<int,int> &b) { return a.first>b.first; } template<typename T>inline T Bigmod(T base, T power, T MOD){ T ret=1; while(power) { if(power & 1)ret=(ret*base)%MOD; base=(base*base)%MOD; power>>=1; } return ret; } double sq(double x) {return x*x;} ll po(ll b,ll p){ ll res=1; while(p){ res*=b; p--; } return res; } ll lg2(ll x){ ll res=0; while(x>1){ res++; x/=2ll; } return res; } #define XOX #ifdef XOX #define debug(...) debug_out(vec_splitter(#__VA_ARGS__), 0, __LINE__, __VA_ARGS__) #else #define debug(...) 42 #endif void solve(){ int n; cin>>n; vll cost(n); ll ans=0; rep(i,n) cin>>cost[i],ans+=cost[i]; vi deg(n); rep(i,n-1){ int u,v; cin>>u>>v; u--,v--; deg[u]++; deg[v]++; } priority_queue<pair<ll,ll>>q; rep(i,n){ q.push({cost[i],i}); deg[i]--; } vll res; res.pb(ans); rep1(i,1,n-2){ while(!q.empty() and deg[(q.top()).ss]==0) q.pop(); pair<int,int>u=q.top(); q.pop(); //debug(u.ff,u.ss); res.pb(res.back()+u.ff); deg[u.ss]--; q.push({cost[u.ss],u.ss}); } forch(it,res) cout<<it<<" "; cout<<endl; } signed main() { #ifndef ONLINE_JUDGE freopen ("input.txt","r",stdin); freopen ("output.txt","w",stdout); #endif IOS; int t; cin>>t; while(t--){ solve(); } return 0; } ///Alhamdulillah
6f2d840e9d83125124a4355acd1de22fa629828e
699f7c7ee5774e8ccbf7bcce5abce9b037770908
/delta/core/metrics/pairwise.cpp
0904422ab5715cd725cfd5e5a627b8fffa01fb19
[ "MIT" ]
permissive
KonstantinosKr/delta
ad0a3e51ffbb210cc3c3f65ec8d1e8d8bc533811
ed650a59b8723f4aa2d145ef2accc885414d1261
refs/heads/master
2022-11-06T20:54:49.124269
2022-10-19T09:05:26
2022-10-19T09:05:26
46,390,503
6
1
MIT
2022-10-19T09:09:06
2015-11-18T02:44:00
C++
UTF-8
C++
false
false
5,142
cpp
/* * pairwise.cpp * * Created on: 12 Jun 2018 * Author: konstantinos */ #include "pairwise.h" void delta::metrics::pairwise::pointToMeshDistance( iREAL xV, iREAL yV, iREAL zV, std::vector<iREAL>& xCoordinates, std::vector<iREAL>& yCoordinates, std::vector<iREAL>& zCoordinates, std::vector<iREAL>& xP, std::vector<iREAL>& yP, std::vector<iREAL>& zP, std::vector<iREAL>& distance) { for(int i=0; i<xCoordinates.size(); i+=3) { iREAL xA = xCoordinates[i]; iREAL yA = yCoordinates[i]; iREAL zA = zCoordinates[i]; iREAL xB = xCoordinates[i+1]; iREAL yB = yCoordinates[i+1]; iREAL zB = zCoordinates[i+1]; iREAL xC = xCoordinates[i+2]; iREAL yC = yCoordinates[i+2]; iREAL zC = zCoordinates[i+2]; iREAL xP,yP,zP; delta::metrics::pairwise::pointToTriangleDistance(xV, yV, zV, xA,yA,zA, xB,yB,zB, xC,yC,zC, xP,yP,zP); } } iREAL delta::metrics::pairwise::pointToTriangleDistance( iREAL xV, iREAL yV, iREAL zV, iREAL& xA, iREAL& yA, iREAL& zA, iREAL& xB, iREAL& yB, iREAL& zB, iREAL& xC, iREAL& yC, iREAL& zC, iREAL &xP, iREAL &yP, iREAL &zP) { double TP1[3] = {xA, yA, zA}; double TP2[3] = {xB, yB, zB}; double TP3[3] = {xC, yC, zC}; double E0[3]; E0[0] = TP2[0] - TP1[0]; E0[1] = TP2[1] - TP1[1]; E0[2] = TP2[2] - TP1[2]; double E1[3]; E1[0] = TP3[0] - TP1[0]; E1[1] = TP3[1] - TP1[1]; E1[2] = TP3[2] - TP1[2]; double D[3]; D[0] = TP1[0] - xV; D[1] = TP1[1] - yV; D[2] = TP1[2] - zV; double a = DOT(E0,E0); double b = DOT(E0,E1); double c = DOT(E1,E1); double d = DOT(E0,D); double e = DOT(E1,D); double f = DOT(D,D); double det = a*c - b*b; //% do we have to use abs here? double s = b*e - c*d; double t = b*d - a*e; double sqrDistance=0; if ((s+t) <= det){ if (s < 0){ if (t < 0){ //region4 if (d < 0){ t = 0; if (-d >= a){ s = 1; sqrDistance = a + 2*d + f; }else { s = -d/a; sqrDistance = d*s + f; } }else { s = 0; if (e >= 0){ t = 0; sqrDistance = f; }else{ if (-e >= c){ t = 1; sqrDistance = c + 2*e + f; } else { t = -e/c; sqrDistance = e*t + f; } } } //end of region 4 }else { // region 3 s = 0; if (e >= 0){ t = 0; sqrDistance = f; }else { if (-e >= c){ t = 1; sqrDistance = c + 2*e +f; }else { t = -e/c; sqrDistance = e*t + f; } } } //end of region 3 }else { if (t < 0){ // region 5 t = 0; if (d >= 0){ s = 0; sqrDistance = f; }else { if (-d >= a){ s = 1; sqrDistance = a + 2*d + f;// GF 20101013 fixed typo d*s ->2*d }else { s = -d/a; sqrDistance = d*s + f; } } }else { // region 0 double invDet = 1/det; s = s*invDet; t = t*invDet; sqrDistance = s*(a*s + b*t + 2*d) + t*(b*s + c*t + 2*e) + f; } } }else { if (s < 0){ // region 2 double tmp0 = b + d; double tmp1 = c + e; if (tmp1 > tmp0){ // minimum on edge s+t=1 double numer = tmp1 - tmp0; double denom = a - 2*b + c; if (numer >= denom){ s = 1; t = 0; sqrDistance = a + 2*d + f; // GF 20101014 fixed typo 2*b -> 2*d }else { s = numer/denom; t = 1-s; sqrDistance = s*(a*s + b*t + 2*d) + t*(b*s + c*t + 2*e) + f; } }else { // minimum on edge s=0 s = 0; if (tmp1 <= 0) { t = 1; sqrDistance = c + 2*e + f; }else { if (e >= 0){ t = 0; sqrDistance = f; }else { t = -e/c; sqrDistance = e*t + f; } } } //end of region 2 }else { if (t < 0) { //region6 double tmp0 = b + e; double tmp1 = a + d; if (tmp1 > tmp0){ double numer = tmp1 - tmp0; double denom = a-2*b+c; if (numer >= denom){ t = 1; s = 0; sqrDistance = c + 2*e + f; }else { t = numer/denom; s = 1 - t; sqrDistance = s*(a*s + b*t + 2*d) + t*(b*s + c*t + 2*e) + f; } }else { t = 0; if (tmp1 <= 0){ s = 1; sqrDistance = a + 2*d + f; }else { if (d >= 0) { s = 0; sqrDistance = f; }else { s = -d/a; sqrDistance = d*s + f; } } } //end of region 6 }else { // region 1 double numer = c + e - b - d; if (numer <= 0){ s = 0; t = 1; sqrDistance = c + 2*e + f; }else { double denom = a - 2*b + c; if (numer >= denom){ s = 1; t = 0; sqrDistance = a + 2*d + f; }else { s = numer/denom; t = 1-s; sqrDistance = s*(a*s + b*t + 2*d) + t*(b*s + c*t + 2*e) + f; } } //end of region 1 } } } // account for numerical round-off error if (sqrDistance < 0){ sqrDistance = 0;} xP = TP1[0] + (E1[0] * t) + (E0[0] * s); yP = TP1[1] + (E1[1] * t) + (E0[1] * s); zP = TP1[2] + (E1[2] * t) + (E0[2] * s); return sqrt(sqrDistance); }
04b3f9c8dce4a4c4ece10bcbe401ec81c23ad69a
0969a99e1c037421abff66940a3f971cc9706d19
/core/include/utility.h
16cf772adb03a3411fc9fdc93adeabcce046e433
[ "Apache-2.0" ]
permissive
Champii/SourcetrailDB
a651733b7af7dbc9daa39e35e9af8015b9fa5e8d
2cf447281a2457b0b4755efe3fd9b7b519a12056
refs/heads/master
2020-09-13T10:42:32.696442
2019-11-20T05:01:27
2019-11-20T05:01:27
222,746,005
1
0
Apache-2.0
2019-11-19T16:58:12
2019-11-19T16:58:12
null
UTF-8
C++
false
false
970
h
/* * Copyright 2018 Coati Software KG * * 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 SOURCETRAIL_UTILITY_H #define SOURCETRAIL_UTILITY_H #include <string> #include <time.h> namespace sourcetrail { namespace utility { bool getFileExists(const std::string& filePath); std::string getFileContent(const std::string& filePath); std::string getDateTimeString(const time_t& time); int getLineCount(const std::string s); } } #endif // SOURCETRAIL_UTILITY_H
484c63451265e03a9c24bd6bd7b64ccf305f7a6c
7323076e12015fc40f372cafa8f350f91cbef1eb
/src/shared.cpp
463afea8959b66e6c66ecce0cdf4a9fd3ae2fea2
[ "MIT" ]
permissive
JAYRANRAIN/AppImageLauncher
557b0784319a9190023476fba604f3d87ff0bdca
a7d25e2d0c5ec844e9f46065991fab8e748435cd
refs/heads/master
2020-03-20T17:09:50.324052
2018-06-10T15:26:38
2018-06-14T16:00:22
137,553,437
1
0
null
2018-06-16T04:42:09
2018-06-16T04:42:09
null
UTF-8
C++
false
false
18,164
cpp
// system includes #include <iostream> #include <sstream> extern "C" { #include <appimage/appimage.h> #include <glib.h> // #include <libgen.h> #include <sys/stat.h> #include <unistd.h> #include <xdg-basedir.h> } // library includes #include <QDebug> #include <QDirIterator> #include <QJsonDocument> #include <QJsonObject> #include <QJsonParseError> #include <QLibraryInfo> #include <QMap> #include <QMapIterator> #include <QMessageBox> #include <QObject> #include <QRegularExpression> // local headers #include "shared.h" #include "translationmanager.h" bool makeExecutable(const std::string& path) { struct stat fileStat{}; if (stat(path.c_str(), &fileStat) != 0) { std::cerr << "Failed to call stat() on " << path << std::endl; return false; } // no action required when file is executable already // this could happen in scenarios when an AppImage is in a read-only location if ((fileStat.st_uid == getuid() && fileStat.st_mode & 0100) || (fileStat.st_gid == getgid() && fileStat.st_mode & 0010) || (fileStat.st_mode & 0001)) { return true; } return chmod(path.c_str(), fileStat.st_mode | 0111) == 0; } QString buildPathToIntegratedAppImage(const QString& pathToAppImage) { // if type 2 AppImage, we can build a "content-aware" filename // see #7 for details auto digest = getAppImageDigestMd5(pathToAppImage); const QFileInfo appImageInfo(pathToAppImage); QString baseName = appImageInfo.completeBaseName(); // if digest is available, append a separator if (!digest.isEmpty()) { const auto digestSuffix = "_" + digest; // check whether digest is already contained in filename if (!pathToAppImage.contains(digestSuffix)) baseName += "_" + digest; } auto fileName = baseName; // must not use completeSuffix() in combination with completeBasename(), otherwise the final filename is composed // incorrectly if (!appImageInfo.suffix().isEmpty()) { fileName += "." + appImageInfo.suffix(); } return integratedAppImagesDestination + "/" + fileName; } QMap<QString, QString> findCollisions(const QString& currentNameEntry) { QMap<QString, QString> collisions; // default locations of desktop files on systems const auto directories = {QString("/usr/share/applications/"), QString(xdg_data_home()) + "/applications/"}; for (const auto& directory : directories) { QDirIterator iterator(directory, QDirIterator::FollowSymlinks); while (iterator.hasNext()) { const auto& filename = iterator.next(); if (!QFileInfo(filename).isFile() || !filename.endsWith(".desktop")) continue; GKeyFile* desktopFile = g_key_file_new(); GError* error = nullptr; auto cleanup = [&desktopFile, &error]() { if (desktopFile != nullptr) { g_key_file_free(desktopFile); desktopFile = nullptr; } if (error != nullptr) { g_error_free(error); error = nullptr; } }; // if the key file parser can't load the file, it's most likely not a valid desktop file, so we just skip this file if (!g_key_file_load_from_file(desktopFile, filename.toStdString().c_str(), G_KEY_FILE_KEEP_TRANSLATIONS, &error)) { cleanup(); continue; } auto* nameEntry = g_key_file_get_string(desktopFile, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_NAME, &error); // invalid desktop file, needs to be skipped if (nameEntry == nullptr) { cleanup(); continue; } if (QString(nameEntry).trimmed().startsWith(currentNameEntry.trimmed())) { collisions[filename] = QString(nameEntry); } cleanup(); } } return collisions; } bool installDesktopFile(const QString& pathToAppImage, bool resolveCollisions) { if (appimage_register_in_system(pathToAppImage.toStdString().c_str(), false) != 0) { QMessageBox::critical( nullptr, QObject::tr("Error"), QObject::tr("Failed to register AppImage in system via libappimage") ); return INTEGRATION_FAILED; } const auto* desktopFilePath = appimage_registered_desktop_file_path(pathToAppImage.toStdString().c_str(), nullptr, false); // sanity check -- if the file doesn't exist, the function returns NULL if (desktopFilePath == nullptr) { QMessageBox::critical( nullptr, QObject::tr("Error"), QObject::tr("Failed to find integrated desktop file") ); return INTEGRATION_FAILED; } // check that file exists if (!QFile(desktopFilePath).exists()) { QMessageBox::critical( nullptr, QObject::tr("Error"), QObject::tr("Couldn't find integrated AppImage's desktop file") ); return INTEGRATION_FAILED; } /* write AppImageLauncher specific entries to desktop file * * unfortunately, QSettings doesn't work as a desktop file reader/writer, and libqtxdg isn't really meant to be * used by projects via add_subdirectory/ExternalProject * a system dependency is not an option for this project, and we link to glib already anyway, so let's just use * glib, which is known to work */ auto desktopFile = g_key_file_new(); GError *error = nullptr; const auto flags = GKeyFileFlags(G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS); // for people who don't want to create memory leaks when using C APIs, C++11's lambdas provide a great option to // clean up those data auto cleanup = [&error, &desktopFile]() { if (desktopFile != nullptr) g_key_file_free(desktopFile); if (error != nullptr) g_error_free(error); }; auto handleError = [&error, &desktopFile, &cleanup]() { std::ostringstream ss; ss << QObject::tr("Failed to load desktop file:").toStdString() << std::endl << error->message; QMessageBox::critical( nullptr, QObject::tr("Error"), QString::fromStdString(ss.str()) ); cleanup(); }; if (!g_key_file_load_from_file(desktopFile, desktopFilePath, flags, &error)) { handleError(); return INTEGRATION_FAILED; } const auto* nameEntry = g_key_file_get_string(desktopFile, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_NAME, &error); if (nameEntry == nullptr) { QMessageBox::warning( nullptr, QObject::tr("Warning"), QObject::tr("AppImage has invalid desktop file") ); } if (resolveCollisions) { // TODO: support multilingual collisions auto collisions = findCollisions(nameEntry); // make sure to remove own entry collisions.remove(QString(desktopFilePath)); if (!collisions.empty()) { // collisions are resolved like in the filesystem: a monotonically increasing number in brackets is // appended to the Name in order to keep the number monotonically increasing, we look for the highest // number in brackets in the existing entries, add 1 to it, and append it in brackets to the current // desktop file's Name entry unsigned int currentNumber = 1; QRegularExpression regex("^.*([0-9]+)$"); for (const auto& fileName : collisions) { const auto& currentNameEntry = collisions[fileName]; auto match = regex.match(currentNameEntry); if (match.hasMatch()) { const unsigned int num = match.captured(0).toUInt(); if (num >= currentNumber) currentNumber = num + 1; } } auto newName = QString(nameEntry) + " (" + QString::number(currentNumber) + ")"; g_key_file_set_string(desktopFile, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_NAME, newName.toStdString().c_str()); } } auto convertToCharPointerList = [](const std::vector<std::string>& stringList) { std::vector<const char*> pointerList; // reserve space to increase efficiency pointerList.reserve(stringList.size()); // convert string list to list of const char pointers for (const auto& action : stringList) { pointerList.push_back(action.c_str()); } return pointerList; }; std::vector<std::string> desktopActions = {"Remove", "Update"}; g_key_file_set_string_list( desktopFile, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_ACTIONS, convertToCharPointerList(desktopActions).data(), desktopActions.size() ); // load translations from JSON file(s) QMap<QString, QString> removeActionNameTranslations; QMap<QString, QString> updateActionNameTranslations; { QDirIterator i18nDirIterator(TranslationManager::getTranslationDir()); while(i18nDirIterator.hasNext()) { const auto& filePath = i18nDirIterator.next(); const auto& fileName = QFileInfo(filePath).fileName(); auto x = strdup(fileName.toStdString().c_str()); if (!QFileInfo(filePath).isFile() || !(fileName.startsWith("desktopfiles.") && fileName.endsWith(".json"))) continue; // check whether filename's format is alright, otherwise parsing the locale might try to access a // non-existing (or the wrong) member auto splitFilename = fileName.split("."); if (splitFilename.size() != 3) continue; // parse locale from filename auto locale = splitFilename[1]; QFile jsonFile(filePath); if (!jsonFile.open(QIODevice::ReadOnly)) { QMessageBox::warning( nullptr, QMessageBox::tr("Warning"), QMessageBox::tr("Could not parse desktop file translations:\nCould not open file for reading:\n\n%1").arg(fileName) ); } // TODO: need to make sure that this doesn't try to read huge files at once auto data = jsonFile.readAll(); QJsonParseError parseError{}; auto jsonDoc = QJsonDocument::fromJson(data, &parseError); // show warning on syntax errors and continue if (parseError.error != QJsonParseError::NoError || jsonDoc.isNull() || !jsonDoc.isObject()) { QMessageBox::warning( nullptr, QMessageBox::tr("Warning"), QMessageBox::tr("Could not parse desktop file translations:\nInvalid syntax:\n\n%1").arg(parseError.errorString()) ); } auto jsonObj = jsonDoc.object(); for (const auto& key : jsonObj.keys()) { auto value = jsonObj[key].toString(); auto splitKey = key.split("/"); if (key.startsWith("Desktop Action update")) { qDebug() << "update: adding" << value << "for locale" << locale; updateActionNameTranslations[locale] = value; } else if (key.startsWith("Desktop Action remove")) { qDebug() << "remove: adding" << value << "for locale" << locale; removeActionNameTranslations[locale] = value; } } } } // add Remove action { const auto removeSectionName = "Desktop Action Remove"; g_key_file_set_string(desktopFile, removeSectionName, "Name", "Remove AppImage from system"); std::ostringstream removeExecPath; removeExecPath << CMAKE_INSTALL_PREFIX << "/lib/appimagelauncher/remove " << pathToAppImage.toStdString(); g_key_file_set_string(desktopFile, removeSectionName, "Exec", removeExecPath.str().c_str()); // install translations auto it = QMapIterator<QString, QString>(removeActionNameTranslations); while (it.hasNext()) { auto entry = it.next(); g_key_file_set_locale_string(desktopFile, removeSectionName, "Name", entry.key().toStdString().c_str(), entry.value().toStdString().c_str()); } } // add Update action { const auto updateSectionName = "Desktop Action Update"; g_key_file_set_string(desktopFile, updateSectionName, "Name", "Update AppImage"); std::ostringstream updateExecPath; updateExecPath << CMAKE_INSTALL_PREFIX << "/lib/appimagelauncher/update " << pathToAppImage.toStdString(); g_key_file_set_string(desktopFile, updateSectionName, "Exec", updateExecPath.str().c_str()); // install translations auto it = QMapIterator<QString, QString>(updateActionNameTranslations); while (it.hasNext()) { auto entry = it.next(); g_key_file_set_locale_string(desktopFile, updateSectionName, "Name", entry.key().toStdString().c_str(), entry.value().toStdString().c_str()); } } if (!g_key_file_save_to_file(desktopFile, desktopFilePath, &error)) { handleError(); return false; } cleanup(); return true; } bool updateDesktopFile(const QString& pathToAppImage) { return installDesktopFile(pathToAppImage, true); } IntegrationState integrateAppImage(const QString& pathToAppImage, const QString& pathToIntegratedAppImage) { // need std::strings to get working pointers with .c_str() const auto oldPath = pathToAppImage.toStdString(); const auto newPath = pathToIntegratedAppImage.toStdString(); // create target directory QDir().mkdir(QFileInfo(QFile(pathToIntegratedAppImage)).dir().absolutePath()); // check whether AppImage is in integration directory already if (QFileInfo(pathToAppImage).absoluteFilePath() != QFileInfo(pathToIntegratedAppImage).absoluteFilePath()) { // need to check whether file exists // if it does, the existing AppImage needs to be removed before rename can be called if (QFile(pathToIntegratedAppImage).exists()) { std::ostringstream message; message << QObject::tr("AppImage with same filename has already been integrated.").toStdString() << std::endl << std::endl << QObject::tr("Do you wish to overwrite the existing AppImage?").toStdString() << std::endl << QObject::tr("Choosing No will run the AppImage once, and leave the system in its current state.").toStdString(); auto rv = QMessageBox::warning( nullptr, QObject::tr("Warning"), QString::fromStdString(message.str()), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes ); if (rv == QMessageBox::No) { return INTEGRATION_ABORTED; } QFile(pathToIntegratedAppImage).remove(); } if (!QFile(pathToAppImage).rename(pathToIntegratedAppImage)) { auto result = QMessageBox::critical( nullptr, QObject::tr("Error"), QObject::tr("Failed to move AppImage to target location.\n" "Try to copy AppImage instead?"), QMessageBox::Ok | QMessageBox::Cancel ); if (result == QMessageBox::Cancel) return INTEGRATION_FAILED; if (!QFile(pathToAppImage).copy(pathToIntegratedAppImage)) { QMessageBox::critical( nullptr, QObject::tr("Error"), QObject::tr("Failed to copy AppImage to target location") ); return INTEGRATION_FAILED; } } } if (!installDesktopFile(pathToIntegratedAppImage)) return INTEGRATION_FAILED; return INTEGRATION_SUCCESSFUL; } QString getAppImageDigestMd5(const QString& path) { // try to read embedded MD5 digest unsigned long offset = 0, length = 0; // first of all, digest calculation is supported only for type 2 if (appimage_get_type(path.toStdString().c_str(), false) != 2) return ""; auto rv = appimage_get_elf_section_offset_and_length(path.toStdString().c_str(), ".digest_md5", &offset, &length); QByteArray buffer(16, '\0'); if (rv && offset != 0 && length != 0) { // open file and read digest from ELF header section QFile file(path); if (!file.open(QFile::ReadOnly)) return ""; if (!file.seek(static_cast<qint64>(offset))) return ""; if (!file.read(buffer.data(), buffer.size())) return ""; file.close(); } else { // calculate digest if (!appimage_type2_digest_md5(path.toStdString().c_str(), buffer.data())) return ""; } // create hexadecimal representation auto hexDigest = appimage_hexlify(buffer, static_cast<size_t>(buffer.size())); QString hexDigestStr(hexDigest); free(hexDigest); return hexDigestStr; } bool hasAlreadyBeenIntegrated(const QString& pathToAppImage) { return appimage_is_registered_in_system(pathToAppImage.toStdString().c_str()); } bool isInOldApplicationsDirectory(const QString& pathToAppImage) { const auto homeDirPath = QDir(getenv("HOME")).absolutePath(); auto oldApplicationsDirectories = { homeDirPath + "/.bin" }; for (const auto& dirPath : oldApplicationsDirectories) { // the QDirs need to be built from the absolute paths, or the comparison won't work reliably if (QDir(dirPath) == QFileInfo(pathToAppImage).dir()) return true; } return false; }
509a404eef7a3192988e8e9f00b3bfbd096f79f0
11bb2fbebc41cbbdb8c72e2cf21688dae53dbb2f
/ArduinoLibraries/LinearDeltaCom/LinearDeltaCom.h
62ee9f1b59374bc2381187cc6d10758d97a9d0ed
[]
no_license
RThardware/HorizontalLinearDelta
02d1fd9db5e21afa8e83f4605ab5ee128d433b29
9cd2f9415a3849b1fb0c8631e6fd792ac8dad193
refs/heads/master
2020-05-18T09:11:37.173176
2014-05-09T14:29:28
2014-05-09T14:29:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,702
h
// LinearDeltaCom.h // Written by Michael Pauly // Version 1.1 // Latest Revision May 4, 2014 // This library contains the functions necessary to map callbacks to the LinearDelta library. // It uses ASCII communication to parse the following formatted commands: // // Input Associated Callbacks // --------------------------------------------------------------------------------- // MOVE XX.XXX YY.YYY ZZ.ZZZ => moveCallback(XX.XXX,YY.YYY,ZZ.ZZZ); // XMOVE XX.XXX => xMoveCallback(XX.XXX); // YMOVE YY.YYY => yMoveCallback(YY.YYY); // ZMOVE ZZ.ZZZ => zMoveCallback(ZZ.ZZZ); // SMOOTHMOVE XX.XXX YY.YYY ZZ.ZZZ => smoothMoveCallback(XX.XXX,YY.YYY,ZZ.ZZZ); // SPEED SS.SSS => setSpeedCallback(SS.SSS); // SMOOTHSPEED SS.SSS => setSmoothSpeedCallback(SS.SSS); // HOME => homeCallback(); // POSITION => requestPositionCallback(); // // All inputs are assumed to be floats. It is not required that they have a tens digit or 3 decimal // precision. // Based off of the RobotAsciiCom library by Dr. Fisher #ifndef LinearDeltaCom_h #define LinearDeltaCom_h #include "Arduino.h" #define MAX_ASCII_MESSAGE_LENGTH 64 // If you have longer message change this! #define MESSAGE_TERMINATOR 10 class LinearDeltaCom { public: LinearDeltaCom(); // Communication Functions void handleRxByte(byte newRxByte); void handleRxBytes(byte newRxBytes[], int length); // Callbacks void registerMoveCallback(void (* moveCallback)(float x, float y, float z)); void registerXMoveCallback(void (* xMoveCallback)(float x)); void registerYMoveCallback(void (* yMoveCallback)(float y)); void registerZMoveCallback(void (* zMoveCallback)(float z)); void registerSmoothMoveCallback(void (* smoothMoveCallback)(float x, float y, float z)); void registerSetSpeedCallback(void (* setSpeedCallback)(float speed)); void registerSetSmoothSpeedCallback(void (* setSmoothSpeedCallback)(float smoothSpeed)); void registerHomeCallback(void (* homeCallback)()); void registerRequestPositionCallback(void (requestPositionCallback)()); private: // Communication char _rxMessageBuffer[MAX_ASCII_MESSAGE_LENGTH]; int _nextOpenByteInMessageBuffer; void _parseStringCommand(String command); // Callbacks void (* _moveCallback)(float x, float y, float z); void (* _xMoveCallback)(float x); void (* _yMoveCallback)(float y); void (* _zMoveCallback)(float z); void (* _smoothMoveCallback)(float x, float y, float z); void (* _setSpeedCallback)(float speed); void (* _setSmoothSpeedCallback)(float smoothSpeed); void (* _homeCallback)(); void (* _requestPositionCallback)(); // Helper float _str2flt(String inputString); }; #endif
5f9335045cd7a71d849838c87bab50a52b29117d
4ab78ac4e1d2bd226ad62ba33ccadc796208786c
/ortools/sat/sat_inprocessing.cc
50867282ad4eea1dbb18b0701b06f50d7b497d77
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bthomas50/or-tools
04612ed0b57916ca45801d1d9df62177e5ec861a
cfd6623559de0eb517549202e468fdc481dc1c88
refs/heads/master
2021-06-13T00:42:34.265174
2021-06-04T22:31:43
2021-06-04T22:31:43
142,228,918
0
0
Apache-2.0
2019-01-17T19:19:48
2018-07-25T01:01:20
C++
UTF-8
C++
false
false
58,239
cc
// Copyright 2010-2018 Google LLC // 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 "ortools/sat/sat_inprocessing.h" #include "absl/container/inlined_vector.h" #include "ortools/base/stl_util.h" #include "ortools/base/timer.h" #include "ortools/sat/probing.h" namespace operations_research { namespace sat { void PostsolveClauses::AddClauseWithSpecialLiteral( Literal literal, absl::Span<const Literal> clause) { bool found = false; clauses.emplace_back(clause.begin(), clause.end()); for (int i = 0; i < clause.size(); ++i) { if (clause[i] == literal) { found = true; std::swap(clauses.back()[0], clauses.back()[i]); break; } } CHECK(found); } #define RETURN_IF_FALSE(f) \ if (!(f)) return false; bool Inprocessing::PresolveLoop(SatPresolveOptions options) { WallTimer wall_timer; wall_timer.Start(); const bool log_info = options.log_info || VLOG_IS_ON(1); const bool log_round_info = VLOG_IS_ON(1); // Mainly useful for development. double probing_time = 0.0; // We currently do the transformations in a given order and restart each time // we did something to make sure that the earlier step cannot srengthen more. // This might not be the best, but it is really good during development phase // to make sure each individual functions is as incremental and as fast as // possible. const double start_dtime = time_limit_->GetElapsedDeterministicTime(); const double stop_dtime = start_dtime + options.deterministic_time_limit; while (!time_limit_->LimitReached() && time_limit_->GetElapsedDeterministicTime() <= stop_dtime) { CHECK_EQ(sat_solver_->CurrentDecisionLevel(), 0); if (!LevelZeroPropagate()) return false; // This one is fast since only newly fixed variables are considered. implication_graph_->RemoveFixedVariables(); // This also prepare the stamping below so that we do that on a DAG and do // not consider potential new implications added by // RemoveFixedAndEquivalentVariables(). RETURN_IF_FALSE(DetectEquivalencesAndStamp(options.use_transitive_reduction, log_round_info)); // TODO(user): This should/could be integrated with the stamping since it // seems better to do just one loop instead of two over all clauses. Because // of memory access. it isn't that clear though. RETURN_IF_FALSE(RemoveFixedAndEquivalentVariables(log_round_info)); RETURN_IF_FALSE(stamping_simplifier_->DoOneRound(log_round_info)); // We wait for the fix-point to be reached before doing the other // simplifications below. if (MoreFixedVariableToClean() || MoreRedundantVariableToClean() || !implication_graph_->IsDag()) { continue; } RETURN_IF_FALSE(SubsumeAndStrenghtenRound(log_round_info)); if (MoreFixedVariableToClean() || MoreRedundantVariableToClean() || !implication_graph_->IsDag()) { continue; } // TODO(user): Combine the two? this way we don't create a full literal <-> // clause graph twice. It might make sense to reach the BCE fix point which // is unique before each variable elimination. blocked_clause_simplifier_->DoOneRound(log_round_info); RETURN_IF_FALSE(bounded_variable_elimination_->DoOneRound(log_round_info)); RETURN_IF_FALSE(LevelZeroPropagate()); // Probing. const double saved_wtime = wall_timer.Get(); const double time_left = stop_dtime - time_limit_->GetElapsedDeterministicTime(); if (time_left <= 0) break; ProbingOptions probing_options; probing_options.log_info = log_round_info; probing_options.deterministic_limit = time_left; probing_options.extract_binary_clauses = options.extract_binary_clauses_in_probing; RETURN_IF_FALSE(FailedLiteralProbingRound(probing_options, model_)); probing_time += wall_timer.Get() - saved_wtime; if (MoreFixedVariableToClean() || MoreRedundantVariableToClean() || !implication_graph_->IsDag()) { continue; } break; } // TODO(user): Maintain the total number of literals in the watched clauses. if (!LevelZeroPropagate()) return false; LOG_IF(INFO, log_info) << "Presolve." << " num_fixed: " << trail_->Index() << " num_redundant: " << implication_graph_->num_redundant_literals() / 2 << "/" << sat_solver_->NumVariables() << " num_implications: " << implication_graph_->num_implications() << " num_watched_clauses: " << clause_manager_->num_watched_clauses() << " dtime: " << time_limit_->GetElapsedDeterministicTime() - start_dtime << "/" << options.deterministic_time_limit << " wtime: " << wall_timer.Get() << " non-probing time: " << (wall_timer.Get() - probing_time); return true; } bool Inprocessing::InprocessingRound() { WallTimer wall_timer; wall_timer.Start(); const bool log_info = true || VLOG_IS_ON(1); const bool log_round_info = VLOG_IS_ON(1); // Mainly useful for development. double probing_time = 0.0; const double start_dtime = time_limit_->GetElapsedDeterministicTime(); // Try to spend a given ratio of time in the inprocessing. if (total_dtime_ > 0.1 * start_dtime) return true; // We make sure we do not "pollute" the current saved polarities. We will // restore them at the end. // // TODO(user): We should probably also disable the variable/clauses activity // updates. trail_->SavePolarities(&polarities_); RETURN_IF_FALSE(DetectEquivalencesAndStamp(true, log_round_info)); RETURN_IF_FALSE(RemoveFixedAndEquivalentVariables(log_round_info)); RETURN_IF_FALSE(LevelZeroPropagate()); // Probing. const double saved_wtime = wall_timer.Get(); ProbingOptions probing_options; probing_options.log_info = log_round_info; probing_options.deterministic_limit = 5; probing_options.extract_binary_clauses = true; RETURN_IF_FALSE(FailedLiteralProbingRound(probing_options, model_)); probing_time += wall_timer.Get() - saved_wtime; RETURN_IF_FALSE(DetectEquivalencesAndStamp(true, log_round_info)); RETURN_IF_FALSE(RemoveFixedAndEquivalentVariables(log_round_info)); RETURN_IF_FALSE(LevelZeroPropagate()); RETURN_IF_FALSE(stamping_simplifier_->DoOneRound(log_round_info)); RETURN_IF_FALSE(RemoveFixedAndEquivalentVariables(log_round_info)); // TODO(user): Add a small wrapper function to time this. RETURN_IF_FALSE(LevelZeroPropagate()); sat_solver_->MinimizeSomeClauses(/*decisions_budget=*/1000); RETURN_IF_FALSE(LevelZeroPropagate()); RETURN_IF_FALSE(SubsumeAndStrenghtenRound(log_round_info)); RETURN_IF_FALSE(RemoveFixedAndEquivalentVariables(log_round_info)); blocked_clause_simplifier_->DoOneRound(log_round_info); RETURN_IF_FALSE(bounded_variable_elimination_->DoOneRound(log_round_info)); RETURN_IF_FALSE(LevelZeroPropagate()); total_dtime_ += time_limit_->GetElapsedDeterministicTime() - start_dtime; LOG_IF(INFO, log_info) << "Presolve." << " num_fixed: " << trail_->Index() << " num_redundant: " << implication_graph_->num_redundant_literals() / 2 << "/" << sat_solver_->NumVariables() << " num_implications: " << implication_graph_->num_implications() << " num_watched_clauses: " << clause_manager_->num_watched_clauses() << " dtime: " << time_limit_->GetElapsedDeterministicTime() - start_dtime << " wtime: " << wall_timer.Get() << " non-probing time: " << (wall_timer.Get() - probing_time); trail_->RestorePolarities(polarities_); return true; } #undef RETURN_IF_FALSE bool Inprocessing::MoreFixedVariableToClean() const { const int64 new_num_fixed_variables = trail_->Index(); return last_num_fixed_variables_ < new_num_fixed_variables; } bool Inprocessing::MoreRedundantVariableToClean() const { const int64 new_num_redundant_literals = implication_graph_->num_redundant_literals(); return last_num_redundant_literals_ < new_num_redundant_literals; } bool Inprocessing::LevelZeroPropagate() { CHECK_EQ(sat_solver_->CurrentDecisionLevel(), 0); clause_manager_->AttachAllClauses(); return sat_solver_->Propagate(); } // It make sense to do the pre-stamping right after the equivalence detection // since it needs a DAG and can detect extra failed literal. bool Inprocessing::DetectEquivalencesAndStamp(bool use_transitive_reduction, bool log_info) { if (!LevelZeroPropagate()) return false; implication_graph_->RemoveFixedVariables(); if (!implication_graph_->IsDag()) { // TODO(user): consider doing the transitive reduction after each SCC. // It might be slow but we could try to make it more incremental to // compensate and it should allow further reduction. if (!implication_graph_->DetectEquivalences(log_info)) return false; if (!LevelZeroPropagate()) return false; if (use_transitive_reduction) { if (!implication_graph_->ComputeTransitiveReduction(log_info)) { return false; } if (!LevelZeroPropagate()) return false; } } if (!stamping_simplifier_->ComputeStampsForNextRound(log_info)) return false; return LevelZeroPropagate(); } bool Inprocessing::RemoveFixedAndEquivalentVariables(bool log_info) { // Preconditions. // // TODO(user): The level zero is required because we remove fixed variables // but if we split this into two functions, we could rewrite clause at any // level. CHECK_EQ(sat_solver_->CurrentDecisionLevel(), 0); if (!LevelZeroPropagate()) return false; // Test if some work is needed. // // TODO(user): If only new fixed variables are there, we can use a faster // function. We should also merge the code with the deletion code in // sat_solver_.cc, but that require some refactoring of the dependence between // files. const int64 new_num_redundant_literals = implication_graph_->num_redundant_literals(); const int64 new_num_fixed_variables = trail_->Index(); if (last_num_redundant_literals_ == new_num_redundant_literals && last_num_fixed_variables_ == new_num_fixed_variables) { return true; } last_num_fixed_variables_ = new_num_fixed_variables; last_num_redundant_literals_ = new_num_redundant_literals; // Start the round. WallTimer wall_timer; wall_timer.Start(); int64 num_removed_literals = 0; int64 num_inspected_literals = 0; // We need this temporary vector for the DRAT proof settings, otherwise // we could just have done an in-place transformation. std::vector<Literal> new_clause; // Used to mark clause literals. const int num_literals(sat_solver_->NumVariables() * 2); gtl::ITIVector<LiteralIndex, bool> marked(num_literals, false); clause_manager_->DeleteRemovedClauses(); clause_manager_->DetachAllClauses(); for (SatClause* clause : clause_manager_->AllClausesInCreationOrder()) { bool removed = false; bool need_rewrite = false; // We first do a loop to see if there is anything to do. for (const Literal l : clause->AsSpan()) { if (assignment_.LiteralIsTrue(l)) { // TODO(user): we should output literal to the proof right away, // currently if we remove clauses before fixing literal the proof is // wrong. if (!clause_manager_->InprocessingFixLiteral(l)) return false; clause_manager_->InprocessingRemoveClause(clause); num_removed_literals += clause->size(); removed = true; break; } if (assignment_.LiteralIsFalse(l) || implication_graph_->IsRedundant(l)) { need_rewrite = true; break; } } num_inspected_literals += clause->size(); if (removed || !need_rewrite) continue; num_inspected_literals += clause->size(); // Rewrite the clause. new_clause.clear(); for (const Literal l : clause->AsSpan()) { const Literal r = implication_graph_->RepresentativeOf(l); if (marked[r.Index()] || assignment_.LiteralIsFalse(r)) { continue; } if (marked[r.NegatedIndex()] || assignment_.LiteralIsTrue(r)) { clause_manager_->InprocessingRemoveClause(clause); num_removed_literals += clause->size(); removed = true; break; } marked[r.Index()] = true; new_clause.push_back(r); } // Restore marked. for (const Literal l : new_clause) marked[l.Index()] = false; if (removed) continue; num_removed_literals += clause->size() - new_clause.size(); if (!clause_manager_->InprocessingRewriteClause(clause, new_clause)) { return false; } } // TODO(user): find a way to auto-tune that after a run on borg... const double dtime = static_cast<double>(num_inspected_literals) * 1e-8; time_limit_->AdvanceDeterministicTime(dtime); LOG_IF(INFO, log_info) << "Cleanup. num_removed_literals: " << num_removed_literals << " dtime: " << dtime << " wtime: " << wall_timer.Get(); return true; } // TODO(user): Use better work limits, see SAT09.CRAFTED.ramseycube.Q3inK12 // // TODO(user): Be more incremental, each time a clause is added/reduced track // which literal are impacted? Also try to do orthogonal reductions from one // round to the next. bool Inprocessing::SubsumeAndStrenghtenRound(bool log_info) { WallTimer wall_timer; wall_timer.Start(); int64 num_subsumed_clauses = 0; int64 num_removed_literals = 0; int64 num_inspected_signatures = 0; int64 num_inspected_literals = 0; // We need this temporary vector for the DRAT proof settings, otherwise // we could just have done an in-place transformation. std::vector<Literal> new_clause; // This function needs the watcher to be detached as we might remove some // of the watched literals. // // TODO(user): We could do that only if we do some reduction, but this is // quite fast though. clause_manager_->DeleteRemovedClauses(); clause_manager_->DetachAllClauses(); // Process clause by increasing sizes. // TODO(user): probably faster without the size indirection. std::vector<SatClause*> clauses = clause_manager_->AllClausesInCreationOrder(); std::sort(clauses.begin(), clauses.end(), [](SatClause* a, SatClause* b) { return a->size() < b->size(); }); // Used to mark clause literals. const LiteralIndex num_literals(sat_solver_->NumVariables() * 2); SparseBitset<LiteralIndex> marked(num_literals); // Clause index in clauses. // TODO(user): Storing signatures here might be faster? gtl::ITIVector<LiteralIndex, absl::InlinedVector<int, 6>> one_watcher( num_literals.value()); // Clause signatures in the same order as clauses. std::vector<uint64> signatures(clauses.size()); std::vector<Literal> candidates_for_removal; for (int clause_index = 0; clause_index < clauses.size(); ++clause_index) { SatClause* clause = clauses[clause_index]; // TODO(user): Better abort limit. We could also limit the watcher sizes and // never look at really long clauses. Note that for an easier // incrementality, it is better to reach some kind of completion so we know // what new stuff need to be done. if (num_inspected_literals + num_inspected_signatures > 1e9) { break; } // Check for subsumption, note that this currently ignore all clauses in the // binary implication graphs. Stamping is doing some of that (and some also // happen during probing), but we could consider only direct implications // here and be a bit more exhaustive than what stamping do with them (at // least for node with many incoming and outgoing implications). // // TODO(user): Do some reduction using binary clauses. Note that only clause // that never propagated since last round need to be checked for binary // subsumption. // Compute hash and mark literals. uint64 signature = 0; marked.SparseClearAll(); for (const Literal l : clause->AsSpan()) { marked.Set(l.Index()); signature |= (uint64{1} << (l.Variable().value() % 64)); } // Look for clause that subsumes this one. Note that because we inspect // all one watcher lists for the literals of this clause, if a clause is // included inside this one, it must appear in one of these lists. bool removed = false; candidates_for_removal.clear(); const uint64 mask = ~signature; for (const Literal l : clause->AsSpan()) { num_inspected_signatures += one_watcher[l.Index()].size(); for (const int i : one_watcher[l.Index()]) { if ((mask & signatures[i]) != 0) continue; bool subsumed = true; bool stengthen = true; LiteralIndex to_remove = kNoLiteralIndex; num_inspected_literals += clauses[i]->size(); for (const Literal o : clauses[i]->AsSpan()) { if (!marked[o.Index()]) { subsumed = false; if (to_remove == kNoLiteralIndex && marked[o.NegatedIndex()]) { to_remove = o.NegatedIndex(); } else { stengthen = false; break; } } } if (subsumed) { ++num_subsumed_clauses; num_removed_literals += clause->size(); clause_manager_->InprocessingRemoveClause(clause); removed = true; break; } if (stengthen) { CHECK_NE(kNoLiteralIndex, to_remove); candidates_for_removal.push_back(Literal(to_remove)); } } if (removed) break; } if (removed) continue; // For strengthenning we also need to check the negative watcher lists. for (const Literal l : clause->AsSpan()) { num_inspected_signatures += one_watcher[l.NegatedIndex()].size(); for (const int i : one_watcher[l.NegatedIndex()]) { if ((mask & signatures[i]) != 0) continue; bool stengthen = true; num_inspected_literals += clauses[i]->size(); for (const Literal o : clauses[i]->AsSpan()) { if (o == l.Negated()) continue; if (!marked[o.Index()]) { stengthen = false; break; } } if (stengthen) { candidates_for_removal.push_back(l); } } } // Any literal here can be removed, but afterwards the other might not. For // now we just remove the first one. // // TODO(user): remove first and see if other still removable. Alternatively // use a "removed" marker and redo a check for each clause that simplifies // this one? Or just remove the first one, and wait for next round. if (!candidates_for_removal.empty()) { new_clause.clear(); for (const Literal l : clause->AsSpan()) { new_clause.push_back(l); } int new_size = 0; for (const Literal l : new_clause) { if (l == candidates_for_removal[0]) continue; new_clause[new_size++] = l; } CHECK_EQ(new_size + 1, new_clause.size()); new_clause.resize(new_size); num_removed_literals += clause->size() - new_clause.size(); if (!clause_manager_->InprocessingRewriteClause(clause, new_clause)) { return false; } if (clause->size() == 0) continue; // Recompute signature. signature = 0; for (const Literal l : clause->AsSpan()) { signature |= (uint64{1} << (l.Variable().value() % 64)); } } // Register one literal to watch. Any literal works, but we choose the // smallest list. // // TODO(user): No need to add this clause if we know it cannot subsume // any new clause since last round. i.e. unchanged clause that do not // contains any literals of newly added clause do not need to be added // here. We can track two bitset in LiteralWatchers via a register // mechanism: // - literal of newly watched clauses since last clear. // - literal of reduced clauses since last clear. // // Important: we can only use this clause to subsume/strenghten others if // it cannot be deleted later. if (!clause_manager_->IsRemovable(clause)) { int min_size = kint32max; LiteralIndex min_literal = kNoLiteralIndex; for (const Literal l : clause->AsSpan()) { if (one_watcher[l.Index()].size() < min_size) { min_size = one_watcher[l.Index()].size(); min_literal = l.Index(); } } // TODO(user): We could/should sort the literal in this clause by // using literals that appear in a small number of clauses first so that // we maximize the chance of early abort in the critical loops above. // // TODO(user): We could also move the watched literal first so we always // skip it. signatures[clause_index] = signature; one_watcher[min_literal].push_back(clause_index); } } // We might have fixed variables, finish the propagation. if (!LevelZeroPropagate()) return false; // TODO(user): tune the deterministic time. const double dtime = static_cast<double>(num_inspected_signatures) * 1e-8 + static_cast<double>(num_inspected_literals) * 5e-9; time_limit_->AdvanceDeterministicTime(dtime); LOG_IF(INFO, log_info) << "Subsume. num_removed_literals: " << num_removed_literals << " num_subsumed: " << num_subsumed_clauses << " dtime: " << dtime << " wtime: " << wall_timer.Get(); return true; } bool StampingSimplifier::DoOneRound(bool log_info) { WallTimer wall_timer; wall_timer.Start(); dtime_ = 0.0; num_subsumed_clauses_ = 0; num_removed_literals_ = 0; num_fixed_ = 0; if (implication_graph_->literal_size() == 0) return true; if (implication_graph_->num_implications() == 0) return true; if (!stamps_are_already_computed_) { // We need a DAG so that we don't have cycle while we sample the tree. // TODO(user): We could probably deal with it if needed so that we don't // need to do equivalence detetion each time we want to run this. implication_graph_->RemoveFixedVariables(); if (!implication_graph_->DetectEquivalences(log_info)) return true; SampleTreeAndFillParent(); if (!ComputeStamps()) return false; } stamps_are_already_computed_ = false; if (!ProcessClauses()) return false; // Note that num_removed_literals_ do not count the literals of the subsumed // clauses. time_limit_->AdvanceDeterministicTime(dtime_); log_info |= VLOG_IS_ON(1); LOG_IF(INFO, log_info) << "Stamping. num_removed_literals: " << num_removed_literals_ << " num_subsumed: " << num_subsumed_clauses_ << " num_fixed: " << num_fixed_ << " dtime: " << dtime_ << " wtime: " << wall_timer.Get(); return true; } bool StampingSimplifier::ComputeStampsForNextRound(bool log_info) { WallTimer wall_timer; wall_timer.Start(); dtime_ = 0.0; num_fixed_ = 0; if (implication_graph_->literal_size() == 0) return true; if (implication_graph_->num_implications() == 0) return true; implication_graph_->RemoveFixedVariables(); if (!implication_graph_->DetectEquivalences(log_info)) return true; SampleTreeAndFillParent(); if (!ComputeStamps()) return false; stamps_are_already_computed_ = true; // TODO(user): compute some dtime, it is always zero currently. time_limit_->AdvanceDeterministicTime(dtime_); log_info |= VLOG_IS_ON(1); LOG_IF(INFO, log_info) << "Prestamping." << " num_fixed: " << num_fixed_ << " dtime: " << dtime_ << " wtime: " << wall_timer.Get(); return true; } void StampingSimplifier::SampleTreeAndFillParent() { const int size = implication_graph_->literal_size(); CHECK(implication_graph_->IsDag()); // so we don't have cycle. parents_.resize(size); for (LiteralIndex i(0); i < size; ++i) { parents_[i] = i; // default. if (implication_graph_->IsRedundant(Literal(i))) continue; if (assignment_.LiteralIsAssigned(Literal(i))) continue; // TODO(user): Better algo to not select redundant parent. // // TODO(user): if parents_[x] = y, try not to have parents_[not(y)] = not(x) // because this is not as useful for the simplification power. // // TODO(user): More generally, we could sample a parent while probing so // that we consider all hyper binary implications (in the case we don't add // them to the implication graph already). const auto& children_of_not_l = implication_graph_->DirectImplications(Literal(i).Negated()); if (children_of_not_l.empty()) continue; for (int num_tries = 0; num_tries < 10; ++num_tries) { const Literal candidate = children_of_not_l[absl::Uniform<int>(*random_, 0, children_of_not_l.size())] .Negated(); if (implication_graph_->IsRedundant(candidate)) continue; if (i == candidate.Index()) continue; // We found an interesting parent. parents_[i] = candidate.Index(); break; } } } bool StampingSimplifier::ComputeStamps() { const int size = implication_graph_->literal_size(); // Compute sizes. sizes_.assign(size, 0); for (LiteralIndex i(0); i < size; ++i) { if (parents_[i] == i) continue; // leaf. sizes_[parents_[i]]++; } // Compute starts in the children_ vector for each node. starts_.resize(size + 1); // We use a sentinel. starts_[LiteralIndex(0)] = 0; for (LiteralIndex i(1); i <= size; ++i) { starts_[i] = starts_[i - 1] + sizes_[i - 1]; } // Fill children. This messes up starts_. children_.resize(size); for (LiteralIndex i(0); i < size; ++i) { if (parents_[i] == i) continue; // leaf. children_[starts_[parents_[i]]++] = i; } // Reset starts to correct value. for (LiteralIndex i(0); i < size; ++i) { starts_[i] -= sizes_[i]; } if (DEBUG_MODE) { CHECK_EQ(starts_[LiteralIndex(0)], 0); for (LiteralIndex i(1); i <= size; ++i) { CHECK_EQ(starts_[i], starts_[i - 1] + sizes_[i - 1]); } } // Perform a DFS from each root to compute the stamps. int64 stamp = 0; first_stamps_.resize(size); last_stamps_.resize(size); marked_.assign(size, false); for (LiteralIndex i(0); i < size; ++i) { if (parents_[i] != i) continue; // Not a root. DCHECK(!marked_[i]); const LiteralIndex tree_root = i; dfs_stack_.push_back(i); while (!dfs_stack_.empty()) { const LiteralIndex top = dfs_stack_.back(); if (marked_[top]) { dfs_stack_.pop_back(); last_stamps_[top] = stamp++; continue; } first_stamps_[top] = stamp++; marked_[top] = true; // Failed literal detection. If the negation of top is in the same // tree, we can fix the LCA of top and its negation to false. if (marked_[Literal(top).NegatedIndex()] && first_stamps_[Literal(top).NegatedIndex()] >= first_stamps_[tree_root]) { // Find the LCA. const int first_stamp = first_stamps_[Literal(top).NegatedIndex()]; LiteralIndex lca = top; while (first_stamps_[lca] > first_stamp) { lca = parents_[lca]; } ++num_fixed_; if (!clause_manager_->InprocessingFixLiteral(Literal(lca).Negated())) { return false; } } const int end = starts_[top + 1]; // Ok with sentinel. for (int j = starts_[top]; j < end; ++j) { DCHECK_NE(top, children_[j]); // We removed leaf self-loop. DCHECK(!marked_[children_[j]]); // This is a tree. dfs_stack_.push_back(children_[j]); } } } DCHECK_EQ(stamp, 2 * size); return true; } bool StampingSimplifier::ProcessClauses() { struct Entry { int i; // Index in the clause. bool is_negated; // Correspond to clause[i] or clause[i].Negated(); int start; // Note that all start stamps are different. int end; bool operator<(const Entry& o) const { return start < o.start; } }; std::vector<int> to_remove; std::vector<Literal> new_clause; std::vector<Entry> entries; clause_manager_->DeleteRemovedClauses(); clause_manager_->DetachAllClauses(); for (SatClause* clause : clause_manager_->AllClausesInCreationOrder()) { const auto span = clause->AsSpan(); if (span.empty()) continue; // Note that we might fix literal as we perform the loop here, so we do // need to deal with them. // // For a and b in the clause, if not(a) => b is present, then the clause is // subsumed. If a => b, then a can be removed, and if not(a) => not(b) then // b can be removed. Nothing can be done if a => not(b). entries.clear(); for (int i = 0; i < span.size(); ++i) { if (assignment_.LiteralIsTrue(span[i])) { clause_manager_->InprocessingRemoveClause(clause); break; } if (assignment_.LiteralIsFalse(span[i])) continue; entries.push_back({i, false, first_stamps_[span[i].Index()], last_stamps_[span[i].Index()]}); entries.push_back({i, true, first_stamps_[span[i].NegatedIndex()], last_stamps_[span[i].NegatedIndex()]}); } if (clause->empty()) continue; // The sort should be dominant. if (!entries.empty()) { const double n = static_cast<double>(entries.size()); dtime_ += 1.5e-8 * n * std::log(n); std::sort(entries.begin(), entries.end()); } Entry top_entry; top_entry.end = -1; // Sentinel. to_remove.clear(); for (const Entry& e : entries) { if (e.end < top_entry.end) { // We found an implication: top_entry => this entry. const Literal lhs = top_entry.is_negated ? span[top_entry.i].Negated() : span[top_entry.i]; const Literal rhs = e.is_negated ? span[e.i].Negated() : span[e.i]; DCHECK(ImplicationIsInTree(lhs, rhs)); if (top_entry.is_negated != e.is_negated) { // Failed literal? if (top_entry.i == e.i) { ++num_fixed_; if (top_entry.is_negated) { // not(span[i]) => span[i] so span[i] true. // And the clause is satisfied (so we count as as subsumed). if (!clause_manager_->InprocessingFixLiteral(span[top_entry.i])) { return false; } } else { // span[i] => not(span[i]) so span[i] false. if (!clause_manager_->InprocessingFixLiteral( span[top_entry.i].Negated())) { return false; } to_remove.push_back(top_entry.i); continue; } } // not(a) => b : subsumption. // a => not(b), we cannot deduce anything, but it might make sense // to see if not(b) implies anything instead of just keeping // top_entry. See TODO below. if (top_entry.is_negated) { num_subsumed_clauses_++; clause_manager_->InprocessingRemoveClause(clause); break; } } else { CHECK_NE(top_entry.i, e.i); if (top_entry.is_negated) { // not(a) => not(b), we can remove b. to_remove.push_back(e.i); } else { // a => b, we can remove a. // // TODO(user): Note that it is okay to still use top_entry, but we // might miss the removal of b if b => c. Also the paper do things // differently. Make sure we don't miss any simplification // opportunites by not changing top_entry. Same in the other // branches. to_remove.push_back(top_entry.i); } } } else { top_entry = e; } } if (clause->empty()) continue; // Strengthen the clause. if (!to_remove.empty() || entries.size() < span.size()) { new_clause.clear(); gtl::STLSortAndRemoveDuplicates(&to_remove); int to_remove_index = 0; for (int i = 0; i < span.size(); ++i) { if (to_remove_index < to_remove.size() && i == to_remove[to_remove_index]) { ++to_remove_index; continue; } if (assignment_.LiteralIsTrue(span[i])) { clause_manager_->InprocessingRemoveClause(clause); continue; } if (assignment_.LiteralIsFalse(span[i])) continue; new_clause.push_back(span[i]); } num_removed_literals_ += span.size() - new_clause.size(); if (!clause_manager_->InprocessingRewriteClause(clause, new_clause)) { return false; } } } return true; } void BlockedClauseSimplifier::DoOneRound(bool log_info) { WallTimer wall_timer; wall_timer.Start(); dtime_ = 0.0; num_blocked_clauses_ = 0; num_inspected_literals_ = 0; InitializeForNewRound(); while (!time_limit_->LimitReached() && !queue_.empty()) { const Literal l = queue_.front(); in_queue_[l.Index()] = false; queue_.pop_front(); ProcessLiteral(l); } // Release some memory. literal_to_clauses_.clear(); dtime_ += 1e-8 * num_inspected_literals_; time_limit_->AdvanceDeterministicTime(dtime_); log_info |= VLOG_IS_ON(1); LOG_IF(INFO, log_info) << "Blocked clause. num_blocked_clauses: " << num_blocked_clauses_ << " dtime: " << dtime_ << " wtime: " << wall_timer.Get(); } void BlockedClauseSimplifier::InitializeForNewRound() { clauses_.clear(); clause_manager_->DeleteRemovedClauses(); clause_manager_->DetachAllClauses(); for (SatClause* c : clause_manager_->AllClausesInCreationOrder()) { // We ignore redundant clause. This shouldn't cause any validity issue. if (clause_manager_->IsRemovable(c)) continue; clauses_.push_back(c); } const int num_literals = clause_manager_->literal_size(); // TODO(user): process in order of increasing number of clause that contains // not(l)? in_queue_.assign(num_literals, true); for (LiteralIndex l(0); l < num_literals; ++l) { queue_.push_back(Literal(l)); } marked_.resize(num_literals); DCHECK( std::all_of(marked_.begin(), marked_.end(), [](bool b) { return !b; })); // TODO(user): because we don't create new clause here we can use a flat // vector for literal_to_clauses_. literal_to_clauses_.clear(); literal_to_clauses_.resize(num_literals); for (ClauseIndex i(0); i < clauses_.size(); ++i) { for (const Literal l : clauses_[i]->AsSpan()) { literal_to_clauses_[l.Index()].push_back(i); } num_inspected_literals_ += clauses_[i]->size(); } } void BlockedClauseSimplifier::ProcessLiteral(Literal current_literal) { if (assignment_.LiteralIsAssigned(current_literal)) return; if (implication_graph_->IsRemoved(current_literal)) return; // We want to check first that this clause will resolve to trivial clause with // all binary containing not(current_literal). So mark all literal l so that // current_literal => l. // // TODO(user): We do not need to redo that each time we reprocess // current_literal. // // TODO(user): Ignore redundant literals. That might require pushing // equivalence to the postsolve stack though. Better to simply remove // these equivalence if we are allowed to and update the postsolve then. // // TODO(user): Make this work in the presence of at most ones. int num_binary = 0; const std::vector<Literal>& implications = implication_graph_->DirectImplications(current_literal); for (const Literal l : implications) { if (l == current_literal) continue; ++num_binary; marked_[l.Index()] = true; } // TODO(user): We could also mark a small clause containing // current_literal.Negated(), and make sure we only include in // clauses_to_process clauses that resolve trivially with that clause. std::vector<ClauseIndex> clauses_to_process; for (const ClauseIndex i : literal_to_clauses_[current_literal.Index()]) { if (clauses_[i]->empty()) continue; // Blocked with respect to binary clause only? all marked binary should have // their negation in clause. // // TODO(user): Abort if size left is too small. if (num_binary > 0) { if (clauses_[i]->size() <= num_binary) continue; int num_with_negation_marked = 0; for (const Literal l : clauses_[i]->AsSpan()) { if (l == current_literal) continue; if (marked_[l.NegatedIndex()]) { ++num_with_negation_marked; } } num_inspected_literals_ += clauses_[i]->size(); if (num_with_negation_marked < num_binary) continue; } clauses_to_process.push_back(i); } // Clear marked. for (const Literal l : implications) { marked_[l.Index()] = false; } // TODO(user): There is a possible optimization: If we mark all literals of // all the clause to process, we can check that each clause containing // current_literal.Negated() contains at least one of these literal negated // other than current_literal. Otherwise none of the clause are blocked. // // TODO(user): If a clause cannot be blocked because of another clause, then // when we call ProcessLiteral(current_literal.Negated()) we can skip some // inspection. for (const ClauseIndex i : clauses_to_process) { const auto c = clauses_[i]->AsSpan(); if (ClauseIsBlocked(current_literal, c)) { // Reprocess all clauses that have a negated literal in this one as // some might be blocked now. // // TODO(user): Maybe we can remember for which (literal, clause) pair this // was used as a certificate for "not-blocked" and just reprocess those, // but it might be memory intensive. for (const Literal l : c) { if (!in_queue_[l.NegatedIndex()]) { in_queue_[l.NegatedIndex()] = true; queue_.push_back(l.Negated()); } } // Add the clause to the postsolving set. postsolve_->AddClauseWithSpecialLiteral(current_literal, c); // We can remove a blocked clause. ++num_blocked_clauses_; clause_manager_->InprocessingRemoveClause(clauses_[i]); } } } // Note that this assume that the binary clauses have already been checked. bool BlockedClauseSimplifier::ClauseIsBlocked( Literal current_literal, absl::Span<const Literal> clause) { bool is_blocked = true; for (const Literal l : clause) marked_[l.Index()] = true; // TODO(user): For faster reprocessing of the same literal, we should move // all clauses that are used in a non-blocked certificate first in the list. for (const ClauseIndex i : literal_to_clauses_[current_literal.NegatedIndex()]) { if (clauses_[i]->empty()) continue; bool some_marked = false; for (const Literal l : clauses_[i]->AsSpan()) { // TODO(user): we can be faster here by only updating it at the end? ++num_inspected_literals_; if (l == current_literal.Negated()) continue; if (marked_[l.NegatedIndex()]) { some_marked = true; break; } } if (!some_marked) { is_blocked = false; break; } } for (const Literal l : clause) marked_[l.Index()] = false; return is_blocked; } bool BoundedVariableElimination::DoOneRound(bool log_info) { WallTimer wall_timer; wall_timer.Start(); dtime_ = 0.0; num_inspected_literals_ = 0; num_eliminated_variables_ = 0; num_literals_diff_ = 0; num_clauses_diff_ = 0; num_simplifications_ = 0; num_blocked_clauses_ = 0; clauses_.clear(); clause_manager_->DeleteRemovedClauses(); clause_manager_->DetachAllClauses(); for (SatClause* c : clause_manager_->AllClausesInCreationOrder()) { // We ignore redundant clause. This shouldn't cause any validity issue. // TODO(user): but we shouldn't keep clauses containing removed literals. // It is still valid to do so, but it should be less efficient. if (clause_manager_->IsRemovable(c)) continue; clauses_.push_back(c); } const int num_literals = clause_manager_->literal_size(); const int num_variables = num_literals / 2; literal_to_clauses_.clear(); literal_to_clauses_.resize(num_literals); literal_to_num_clauses_.assign(num_literals, 0); for (ClauseIndex i(0); i < clauses_.size(); ++i) { for (const Literal l : clauses_[i]->AsSpan()) { literal_to_clauses_[l.Index()].push_back(i); literal_to_num_clauses_[l.Index()]++; } num_inspected_literals_ += clauses_[i]->size(); } const int saved_trail_index = trail_->Index(); propagation_index_ = trail_->Index(); need_to_be_updated_.clear(); in_need_to_be_updated_.resize(num_variables); queue_.Reserve(num_variables); for (BooleanVariable v(0); v < num_variables; ++v) { if (assignment_.VariableIsAssigned(v)) continue; if (implication_graph_->IsRemoved(Literal(v, true))) continue; UpdatePriorityQueue(v); } marked_.resize(num_literals); DCHECK( std::all_of(marked_.begin(), marked_.end(), [](bool b) { return !b; })); // TODO(user): add a local dtime limit for the corner case where this take too // much time. We can adapt the limit depending on how much we want to spend on // inprocessing. while (!time_limit_->LimitReached() && !queue_.IsEmpty()) { const BooleanVariable top = queue_.Top().var; queue_.Pop(); // Make sure we fix variables first if needed. Note that because new binary // clause might appear when we fix variables, we need a loop here. // // TODO(user): we might also find new equivalent variable l => var => l // here, but for now we ignore those. bool is_unsat = false; if (!Propagate()) return false; while (implication_graph_->FindFailedLiteralAroundVar(top, &is_unsat)) { if (!Propagate()) return false; } if (is_unsat) return false; if (!CrossProduct(top)) return false; for (const BooleanVariable v : need_to_be_updated_) { in_need_to_be_updated_[v] = false; // Currently we never re-add top if we just processed it. if (v != top) UpdatePriorityQueue(v); } in_need_to_be_updated_.clear(); need_to_be_updated_.clear(); } implication_graph_->CleanupAllRemovedVariables(); // Remove all redundant clause containing a removed literal. This avoid to // re-introduce a removed literal via conflict learning. for (SatClause* c : clause_manager_->AllClausesInCreationOrder()) { if (!clause_manager_->IsRemovable(c)) continue; bool remove = false; for (const Literal l : c->AsSpan()) { if (implication_graph_->IsRemoved(l)) { remove = true; break; } } if (remove) clause_manager_->InprocessingRemoveClause(c); } // Release some memory. literal_to_clauses_.clear(); literal_to_num_clauses_.clear(); dtime_ += 1e-8 * num_inspected_literals_; time_limit_->AdvanceDeterministicTime(dtime_); log_info |= VLOG_IS_ON(1); LOG_IF(INFO, log_info) << "BVE." << " num_fixed: " << trail_->Index() - saved_trail_index << " num_simplified_literals: " << num_simplifications_ << " num_blocked_clauses_: " << num_blocked_clauses_ << " num_eliminations: " << num_eliminated_variables_ << " num_literals_diff: " << num_literals_diff_ << " num_clause_diff: " << num_clauses_diff_ << " dtime: " << dtime_ << " wtime: " << wall_timer.Get(); return true; } bool BoundedVariableElimination::RemoveLiteralFromClause( Literal lit, SatClause* sat_clause) { num_literals_diff_ -= sat_clause->size(); resolvant_.clear(); for (const Literal l : sat_clause->AsSpan()) { if (l == lit || assignment_.LiteralIsFalse(l)) { literal_to_num_clauses_[l.Index()]--; continue; } if (assignment_.LiteralIsTrue(l)) { num_clauses_diff_--; clause_manager_->InprocessingRemoveClause(sat_clause); return true; } resolvant_.push_back(l); } if (!clause_manager_->InprocessingRewriteClause(sat_clause, resolvant_)) { return false; } if (sat_clause->empty()) { --num_clauses_diff_; for (const Literal l : resolvant_) literal_to_num_clauses_[l.Index()]--; } else { num_literals_diff_ += sat_clause->size(); } return true; } bool BoundedVariableElimination::Propagate() { for (; propagation_index_ < trail_->Index(); ++propagation_index_) { // Make sure we always propagate the binary clauses first. if (!implication_graph_->Propagate(trail_)) return false; const Literal l = (*trail_)[propagation_index_]; for (const ClauseIndex index : literal_to_clauses_[l.Index()]) { if (clauses_[index]->empty()) continue; num_clauses_diff_--; num_literals_diff_ -= clauses_[index]->size(); clause_manager_->InprocessingRemoveClause(clauses_[index]); } literal_to_clauses_[l.Index()].clear(); for (const ClauseIndex index : literal_to_clauses_[l.NegatedIndex()]) { if (clauses_[index]->empty()) continue; if (!RemoveLiteralFromClause(l.Negated(), clauses_[index])) return false; } literal_to_clauses_[l.NegatedIndex()].clear(); } return true; } // Note that we use the estimated size here to make it fast. It is okay if the // order of elimination is not perfect... We can improve on this later. int BoundedVariableElimination::NumClausesContaining(Literal l) { return literal_to_num_clauses_[l.Index()] + implication_graph_->DirectImplicationsEstimatedSize(l.Negated()); } // TODO(user): Only enqueue variable that can be removed. void BoundedVariableElimination::UpdatePriorityQueue(BooleanVariable var) { if (assignment_.VariableIsAssigned(var)) return; const int priority = -NumClausesContaining(Literal(var, true)) - NumClausesContaining(Literal(var, false)); if (queue_.Contains(var.value())) { queue_.ChangePriority({var, priority}); } else { queue_.Add({var, priority}); } } void BoundedVariableElimination::DeleteClause(SatClause* sat_clause) { const auto clause = sat_clause->AsSpan(); num_clauses_diff_--; num_literals_diff_ -= clause.size(); // Update literal <-> clause graph. for (const Literal l : clause) { literal_to_num_clauses_[l.Index()]--; if (!in_need_to_be_updated_[l.Variable()]) { in_need_to_be_updated_[l.Variable()] = true; need_to_be_updated_.push_back(l.Variable()); } } // Lazy deletion of the clause. clause_manager_->InprocessingRemoveClause(sat_clause); } void BoundedVariableElimination::DeleteAllClausesContaining(Literal literal) { for (const ClauseIndex i : literal_to_clauses_[literal.Index()]) { const auto clause = clauses_[i]->AsSpan(); if (clause.empty()) continue; postsolve_->AddClauseWithSpecialLiteral(literal, clause); DeleteClause(clauses_[i]); } literal_to_clauses_[literal.Index()].clear(); } void BoundedVariableElimination::AddClause(absl::Span<const Literal> clause) { SatClause* pt = clause_manager_->InprocessingAddClause(clause); if (pt == nullptr) return; num_clauses_diff_++; num_literals_diff_ += clause.size(); const ClauseIndex index(clauses_.size()); clauses_.push_back(pt); for (const Literal l : clause) { literal_to_num_clauses_[l.Index()]++; literal_to_clauses_[l.Index()].push_back(index); if (!in_need_to_be_updated_[l.Variable()]) { in_need_to_be_updated_[l.Variable()] = true; need_to_be_updated_.push_back(l.Variable()); } } } template <bool score_only, bool with_binary_only> bool BoundedVariableElimination::ResolveAllClauseContaining(Literal lit) { const int clause_weight = parameters_.presolve_bve_clause_weight(); const std::vector<Literal>& implications = implication_graph_->DirectImplications(lit); auto& clause_containing_lit = literal_to_clauses_[lit.Index()]; for (int i = 0; i < clause_containing_lit.size(); ++i) { const ClauseIndex clause_index = clause_containing_lit[i]; const auto clause = clauses_[clause_index]->AsSpan(); if (clause.empty()) continue; if (!score_only) resolvant_.clear(); for (const Literal l : clause) { if (!score_only && l != lit) resolvant_.push_back(l); marked_[l.Index()] = true; } num_inspected_literals_ += clause.size() + implications.size(); // If this is true, then "clause" is subsumed by one of its resolvant and we // can just remove lit from it. Then it doesn't need to be acounted at all. bool clause_can_be_simplified = false; const int64 saved_score = new_score_; // Resolution with binary clauses. for (const Literal l : implications) { CHECK_NE(l, lit); if (marked_[l.NegatedIndex()]) continue; // trivial. if (marked_[l.Index()]) { clause_can_be_simplified = true; break; } else { if (score_only) { new_score_ += clause_weight + clause.size(); } else { resolvant_.push_back(l); AddClause(resolvant_); resolvant_.pop_back(); } } } // Resolution with non-binary clauses. if (!with_binary_only && !clause_can_be_simplified) { auto& clause_containing_not_lit = literal_to_clauses_[lit.NegatedIndex()]; for (int j = 0; j < clause_containing_not_lit.size(); ++j) { if (score_only && new_score_ > score_threshold_) break; const ClauseIndex other_index = clause_containing_not_lit[j]; const auto other = clauses_[other_index]->AsSpan(); if (other.empty()) continue; bool trivial = false; int extra_size = 0; for (const Literal l : other) { // TODO(user): we can optimize this by updating it outside the loop. ++num_inspected_literals_; if (l == lit.Negated()) continue; if (marked_[l.NegatedIndex()]) { trivial = true; break; } if (!marked_[l.Index()]) { ++extra_size; if (!score_only) resolvant_.push_back(l); } } if (trivial) { if (!score_only) resolvant_.resize(resolvant_.size() - extra_size); continue; } // If this is the case, the other clause is subsumed by the resolvant. // We can just remove not_lit from it and ignore it. if (score_only && clause.size() + extra_size <= other.size()) { CHECK_EQ(clause.size() + extra_size, other.size()); ++num_simplifications_; // Note that we update the threshold since this clause was counted in // it. score_threshold_ -= clause_weight + other.size(); if (extra_size == 0) { // We have a double self-subsumption. We can just remove this // clause since it will be subsumed by the clause created in the // "clause_can_be_simplified" case below. DeleteClause(clauses_[other_index]); } else { if (!RemoveLiteralFromClause(lit.Negated(), clauses_[other_index])) { return false; } std::swap(clause_containing_not_lit[j], clause_containing_not_lit.back()); clause_containing_not_lit.pop_back(); --j; // Reprocess the new position. continue; } } if (extra_size == 0) { clause_can_be_simplified = true; break; } else { if (score_only) { // Hack. We do not want to create long clauses during BVE. if (clause.size() - 1 + extra_size > 100) { new_score_ = score_threshold_ + 1; break; } new_score_ += clause_weight + clause.size() - 1 + extra_size; } else { AddClause(resolvant_); resolvant_.resize(resolvant_.size() - extra_size); } } } } // Note that we need to clear marked before aborting. for (const Literal l : clause) marked_[l.Index()] = false; // In this case, we simplify and remove the clause from here. if (clause_can_be_simplified) { ++num_simplifications_; // Note that we update the threshold as if this was simplified before. new_score_ = saved_score; score_threshold_ -= clause_weight + clause.size(); if (!RemoveLiteralFromClause(lit, clauses_[clause_index])) return false; std::swap(clause_containing_lit[i], clause_containing_lit.back()); clause_containing_lit.pop_back(); --i; // Reprocess the new position. } if (score_only && new_score_ > score_threshold_) return true; // When this happen, then the clause is blocked (i.e. all its resolvant are // trivial). So even if we do not actually perform the variable elimination, // we can still remove this clause. Note that we treat the score as if the // clause was removed before. // // Tricky: The detection only work if we didn't abort the computation above, // so we do that after the score_threshold_ check. // // TODO(user): Also detect blocked clause for not(lit)? It is not as cheap // though and require more code. if (score_only && !with_binary_only && !clause_can_be_simplified && new_score_ == saved_score) { ++num_blocked_clauses_; score_threshold_ -= clause_weight + clause.size(); postsolve_->AddClauseWithSpecialLiteral(lit, clause); DeleteClause(clauses_[clause_index]); } } return true; } bool BoundedVariableElimination::CrossProduct(BooleanVariable var) { if (assignment_.VariableIsAssigned(var)) return true; const Literal lit(var, true); const Literal not_lit(var, false); { const int s1 = NumClausesContaining(lit); const int s2 = NumClausesContaining(not_lit); if (s1 == 0 && s2 == 0) return true; if (s1 > 0 && s2 == 0) { num_eliminated_variables_++; if (!clause_manager_->InprocessingFixLiteral(lit)) return false; DeleteAllClausesContaining(lit); return true; } if (s1 == 0 && s2 > 0) { num_eliminated_variables_++; if (!clause_manager_->InprocessingFixLiteral(not_lit)) return false; DeleteAllClausesContaining(not_lit); return true; } if (implication_graph_->IsRedundant(lit)) { // TODO(user): do that elsewhere? CHECK_EQ(s1, 1); CHECK_EQ(s2, 1); CHECK_EQ(implication_graph_->NumImplicationOnVariableRemoval(var), 0); num_eliminated_variables_++; implication_graph_->RemoveBooleanVariable(var, &postsolve_->clauses); return true; } // Heuristic. Abort if the work required to decide if var should be removed // seems to big. if (s1 > 1 && s2 > 1 && s1 * s2 > parameters_.presolve_bve_threshold()) { return true; } } // TODO(user): swap lit and not_lit for speed? it is unclear if we prefer // to minimize the number of clause containing lit or not_lit though. Also, // we might want to alternate since we also detect blocked clause containing // lit, but don't do it for not_lit. // Compute the current score. // TODO(user): cleanup the list lazily at the same time? int64 score = 0; const int clause_weight = parameters_.presolve_bve_clause_weight(); score += implication_graph_->DirectImplications(lit).size() * (clause_weight + 2); score += implication_graph_->DirectImplications(not_lit).size() * (clause_weight + 2); for (const ClauseIndex i : literal_to_clauses_[lit.Index()]) { const auto c = clauses_[i]->AsSpan(); if (!c.empty()) score += clause_weight + c.size(); } for (const ClauseIndex i : literal_to_clauses_[not_lit.Index()]) { const auto c = clauses_[i]->AsSpan(); if (!c.empty()) score += clause_weight + c.size(); } // Compute the new score after BVE. // Abort as soon as it crosses the threshold. // // TODO(user): Experiment with leaving the implications graph as is. This will // not remove the variable completely, but it seems interesting since after // equivalent variable removal and failed literal probing, the cross product // of the implication always add a quadratic number of implication, except if // the in (or out) degree is zero or one. score_threshold_ = score; new_score_ = implication_graph_->NumImplicationOnVariableRemoval(var) * (clause_weight + 2); if (new_score_ > score_threshold_) return true; if (!ResolveAllClauseContaining</*score_only=*/true, /*with_binary_only=*/true>(not_lit)) { return false; } if (new_score_ > score_threshold_) return true; if (!ResolveAllClauseContaining</*score_only=*/true, /*with_binary_only=*/false>(lit)) { return false; } if (new_score_ > score_threshold_) return true; // Perform BVE. if (new_score_ > 0) { if (!ResolveAllClauseContaining</*score_only=*/false, /*with_binary_only=*/false>(lit)) { return false; } if (!ResolveAllClauseContaining</*score_only=*/false, /*with_binary_only=*/true>(not_lit)) { return false; } } ++num_eliminated_variables_; implication_graph_->RemoveBooleanVariable(var, &postsolve_->clauses); DeleteAllClausesContaining(lit); DeleteAllClausesContaining(not_lit); return true; } } // namespace sat } // namespace operations_research
ba058452d1b5d09c247caa93fdcadd3c2476e116
b97469c73de4198dfcac2f4ce4b263f032b4f7e1
/glfwApp/glfwApp.cpp
bcddd423c8c05507cfefe65ba2de647eac4d8fa8
[ "MIT" ]
permissive
jianbinghuang/CppOpenGLWebAssemblyCMake
8f2b2e57304629c54708bb95f0cc5517eadb5683
5a3d7f474a3c1ad5f776bb9a2f51ab4a817f4e6b
refs/heads/master
2022-04-16T15:10:47.606029
2020-02-17T02:28:23
2020-02-17T02:28:23
null
0
0
null
null
null
null
UTF-8
C++
false
false
28,320
cpp
#include "glfwApp.h" #include <galaga/Frame.h> #include <galaga/ScreenDevice.h> #include <array> #include <chrono> #include <iostream> #include <map> #include <thread> #if defined(EMSCRIPTEN) #include <emscripten.h> #include <emscripten/bind.h> #endif #include "GameStateTracker.h" #include "galaga/GalagaMachine.h" #include "glObjects.h" #if defined(EMSCRIPTEN) // Binding code EMSCRIPTEN_BINDINGS(galaga_machine) { emscripten::class_<Galaga::GalagaMachine>("GalagaMachine") .function("set_InsertCoin", &Galaga::GalagaMachine::set_InsertCoin) .function("set_Start1Player", &Galaga::GalagaMachine::set_Start1Player) .function("set_Start2Player", &Galaga::GalagaMachine::set_Start2Player) .function("set_MoveLeft", &Galaga::GalagaMachine::set_MoveLeft) .function("set_MoveRight", &Galaga::GalagaMachine::set_MoveRight) .function("set_Button1", &Galaga::GalagaMachine::set_Button1); emscripten::class_<glfwApp>("glfwApp") .constructor<>() .function("initialize", &glfwApp::initialize) .function("runStep", &glfwApp::runStep) .function("handleAcceleration", &glfwApp::handleAcceleration) .function("handleRotation", &glfwApp::handleRotation) .function("getGalagaMachine", &glfwApp::getGalagaMachine, emscripten::allow_raw_pointers()) .function("enterFullscreen", &glfwApp::enterFullscreen); function("get_app", &glfwApp::get_app, emscripten::allow_raw_pointers()); } #endif glfwApp glfwApp::_app; glfwApp *glfwApp::get_app() { return &_app; }; void glfwApp::step() { glfwApp::get_app()->runStep(); } const glm::vec3 glfwApp::globalUpAxis = glm::vec3(0, 1, 0); // Global globalUpAxis axis. void error_callback(int error, const char *description) { std::cout << "glfw error: " << description << "\n"; } #if defined(EMSCRIPTEN) static int canvasWidth; static int canvasHeight; EM_BOOL updateFramebufferSize(int eventType, const EmscriptenUiEvent *uiEvent, void *userData) { double width(0), height(0); emscripten_get_element_css_size("GLCanvas", &width, &height); emscripten_set_canvas_element_size("GLCanvas", int(width), int(height)); PRINTIFCHANGED("width", width); return EM_TRUE; } EM_BOOL updateCanvasResize(int eventType, const void *reserved, void *userData) { double width, height; emscripten_get_element_css_size("GLCanvas", &width, &height); PRINTIFCHANGED("width", width); canvasWidth = width; canvasHeight = height; double pixelRatio = emscripten_get_device_pixel_ratio(); glfwApp::get_app()->setWindowSize(width * pixelRatio, height * pixelRatio); return EM_TRUE; } EM_BOOL updateFullscreenStatus( int eventType, const EmscriptenFullscreenChangeEvent *fullscreenChangeEvent, void *userData) { std::cout << __FUNCTION__ << ":" << fullscreenChangeEvent->fullscreenEnabled << "\n"; return EM_TRUE; } static EmscriptenTouchPoint firstTouch; static EmscriptenTouchPoint currentTouch; static size_t movementMemory = 0; EM_BOOL touchStartCb(int eventType, const EmscriptenTouchEvent *touchEvent, void *userData) { Galaga::GalagaMachine *gM = glfwApp::get_app()->getGalagaMachine(); if (touchEvent->numTouches > 0) { if (GameStateTracker::gameState == GameStateTracker::INTRO) { // Start the game with a tap. gM->set_Start1Player(true); } else if (GameStateTracker::gameState == GameStateTracker::HIGHSCORE && touchEvent->numTouches > 1) // Double tap? { // Press button in highscore mode only with double tap. gM->set_Button1(true); } else // any state is ok. { firstTouch = touchEvent->touches[0]; // Store a copy. gM->set_MoveLeft(firstTouch.canvasX < (canvasWidth / 2.)); gM->set_MoveRight(firstTouch.canvasX > (canvasWidth / 2.)); } } return true; // Consume the event, i.e. preventDefault(); } EM_BOOL touchMoveCb(int eventType, const EmscriptenTouchEvent *touchEvent, void *userData) { Galaga::GalagaMachine *gM = glfwApp::get_app()->getGalagaMachine(); if (touchEvent->numTouches > 0) { if (GameStateTracker::gameState == GameStateTracker::HIGHSCORE && touchEvent->numTouches > 1) { // Hold donw the button in highscore mode. gM->set_Button1(true); } else // any state is ok. { firstTouch = touchEvent->touches[0]; // Store a copy. gM->set_MoveLeft(firstTouch.canvasX < (canvasWidth / 2.)); gM->set_MoveRight(firstTouch.canvasX > (canvasWidth / 2.)); } } return true; } EM_BOOL touchEndCb(int eventType, const EmscriptenTouchEvent *touchEvent, void *userData) { currentTouch = firstTouch; Galaga::GalagaMachine *gM = glfwApp::get_app()->getGalagaMachine(); // Unpress button in highscore mode. if ((GameStateTracker::gameState == GameStateTracker::HIGHSCORE) && (touchEvent->numTouches > 1)) // Double tap? { gM->set_Button1(false); } else // any state is ok. { gM->set_MoveLeft(false); gM->set_MoveRight(false); } return true; } EM_BOOL touchCancelCb(int eventType, const EmscriptenTouchEvent *touchEvent, void *userData) { Galaga::GalagaMachine *gM = glfwApp::get_app()->getGalagaMachine(); gM->set_MoveLeft(false); gM->set_MoveRight(false); std::cout << "touchCanceled:" << eventType << "\n"; return true; } #endif glfwApp::glfwApp() : _graphicsFrame(Galaga::ScreenDevice::Width, Galaga::ScreenDevice::Height), _window(nullptr), _galagaMachine(), _audioApp(std::make_unique<Audio>()), _lastAcc(glHelper::ZERO), _relativeMovement(glHelper::ZERO), _lastRelativeMovement(glHelper::ZERO), _lastRelAcc(glHelper::ZERO) { } glfwApp::~glfwApp() { // Intentionally void. } void glfwApp::step(double sec) { static double oldT = 0; static double stopT[4] = {}; stopT[0] = glfwGetTime(); // Spin the galaga machine _galagaMachine.Run(sec * 1e6 /* convert sec to usec */, _graphicsFrame, _audioFrame); stopT[1] = glfwGetTime(); // Render graphics. onRender(sec); stopT[2] = glfwGetTime(); // Play sound. onPlay(sec); stopT[3] = glfwGetTime(); totalSimulatedTime += sec; totalRenderingTime += stopT[2] - stopT[1]; totalMachineTime += stopT[1] - stopT[0]; totalPlayTime += stopT[3] - stopT[2]; totalStepTime += stopT[3] - stopT[0]; totalTime += stopT[3] - oldT; frameTime = frameTime + ((stopT[3] - stopT[0]) - frameTime) * 0.01; oldT = stopT[0]; this->handleKeys(); } void glfwApp::runStep() { static double oldT = 0; double currT = glfwGetTime(); double deltaTimeSec = oldT ? (currT - oldT) : 0.016; this->step(deltaTimeSec); glfwSwapBuffers(_window); #if defined(EMSCRIPTEN) // No need to sleep with emscripten, the run_main_loop() do that for us. #else #if defined(DEBUG) /// double glfwWaitTime = glfwGetTime(); #endif deltaTimeSec = std::min(deltaTimeSec, 0.016); glfwWaitEventsTimeout(deltaTimeSec * .75); #if defined(DEBUG) // std::cout << "glfwWaitTime=" << glfwGetTime() - glfwWaitTime << "\n"; #endif #endif oldT = currT; } void glfwApp::runMessageLoop() { #if defined(EMSCRIPTEN) enterFullscreen(); emscripten_set_main_loop(glfwApp::step, 0 /* fps */, 1 /* simulate_infinite_loop */); #else while (!glfwWindowShouldClose(_window)) { runStep(); } #endif } void glfwApp::handleRotation(float intervalTime, float alpha, float beta, float gamma) { float accRad = 0; float currRot = _oldAccRad + ((beta - _oldAccRad) * .2f); if (abs(currRot) > .7) { float radSecSpeedRot = (currRot > 0 ? 0.01f : -0.01f); _radSecSpeedRot = _radSecSpeedRot + ((radSecSpeedRot - _radSecSpeedRot) * .3); } _oldAccRad = currRot; } void glfwApp::handleAcceleration(float intervalTime, float ax, float ay, float az) { glm::vec3 acc(ax, ay, az); if (_lastAcc == glHelper::ZERO) _lastAcc = acc; // Low pass filter on acceleration vector. glm::vec3 currAcc = _lastAcc + ((acc - _lastAcc) * .5f); float angleRad = acos(glm::clamp( glm::dot(glm::normalize(_lastAcc), glm::normalize(acc)), -1.f, 1.f)); float speedRadSec = 0; if (intervalTime > 0) speedRadSec = angleRad / intervalTime; if (speedRadSec > 0.004) { glm::vec3 relAcc = currAcc - _lastAcc; if (_relativeMovement == glHelper::ZERO) { _lastRelAcc = currAcc; _relativeMovement = relAcc; } else { _relativeMovement += relAcc; float relMovLen = glm::length(_relativeMovement); if (relMovLen > 0.05) { auto currDot = glm::dot(glm::vec3(1, 0, 0), currAcc); auto lastDot = glm::dot(glm::vec3(1, 0, 0), _lastRelAcc); speedRadSec = currDot > lastDot ? 0.02 : -0.02; _radSecSpeedRot = _radSecSpeedRot + ((speedRadSec - _radSecSpeedRot) * .1); } } } else { // Clear it out. _relativeMovement = glHelper::ZERO; _lastRelativeMovement = glHelper::ZERO; } _lastAcc = currAcc; } static void wndResizeCb(GLFWwindow *wnd, int w, int h) { glfwApp::get_app()->updateWindowSize(w, h); PRINTIFCHANGED("wndResizeCb", w); } void glfwApp::updateWindowSize(int w, int h) { _wndSize = glm::vec2(w, h); #if defined(DEBUG) PRINTIFCHANGED("_wndSize.x", _wndSize.x); #endif } void glfwApp::setWindowSize(int w, int h) { PRINTIFCHANGED("SetWindowSizeWidth", w); glfwSetWindowSize(_window, w, h); } bool glfwApp::initialize() { bool ret = true; // Initialize the glfw library glfwSetErrorCallback(error_callback); ret = glfwInit(); if (ret) { // Output glfw version. std::cout << glfwGetVersionString() << "\n"; // Create main window. glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_RESIZABLE, 1); glfwWindowHint(GLFW_MAXIMIZED, 1); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, 1); _window = glfwCreateWindow(Galaga::ScreenDevice::Width, Galaga::ScreenDevice::Height, "app [glfw]", 0, 0); glfwSetWindowSizeCallback(_window, &wndResizeCb); glfwGetWindowSize(_window, &_wndSize.x, &_wndSize.y); // // Init OpenGL glfwMakeContextCurrent(_window); #if defined(EMSCRIPTEN) EMSCRIPTEN_RESULT res = emscripten_set_touchstart_callback( "#canvas", 0 /*void *userData*/, true /* useCapture */, touchStartCb); res |= emscripten_set_touchmove_callback( "#canvas", 0 /*void *userData*/, true /* useCapture */, touchMoveCb); res |= emscripten_set_touchend_callback( "#canvas", 0 /*void *userData*/, true /* useCapture */, touchEndCb); res |= emscripten_set_touchcancel_callback( "#canvas", 0 /*void *userData*/, true /* useCapture */, touchCancelCb); if (res == EMSCRIPTEN_RESULT_SUCCESS) autofireEnabled = true; // Autofire needed. #endif glfwSetKeyCallback(_window, glfwApp::keysCallback); glfwSetInputMode(_window, GLFW_STICKY_KEYS, GLFW_TRUE); ret = initGL(); } #if defined(EMSCRIPTEN) // Init resize callback. double width, height; emscripten_get_element_css_size("GLCanvas", &width, &height); canvasWidth = width; canvasHeight = height; emscripten_set_canvas_element_size("GLCanvas", int(width), int(height)); emscripten_set_resize_callback(nullptr, nullptr, false, &updateFramebufferSize); emscripten_set_fullscreenchange_callback(nullptr, nullptr, false, &updateFullscreenStatus); #endif // Set the callback to keep track the game state based upon the program // counter register. std::function<void(uint16_t)> programCounterListener( GameStateTracker::identifyGameState); _galagaMachine.SetProgramCounterListener(programCounterListener); return ret; } bool glfwApp::finalize() { glfwTerminate(); return true; } GLchar const _vertexShaderSrc[] = R"(layout(location = 1) in vec3 vertexPosition_modelspace; layout(location = 0) in vec2 vertexUV; uniform mat4 viewProjection; uniform mat4 world; out vec2 uv; void main() { gl_Position = viewProjection * world * vec4(vertexPosition_modelspace, 1.f); uv = vertexUV; } )"; GLchar const _fragmentShaderSrc[] = R"(precision mediump float; in vec2 uv; uniform sampler2D appTexture; out vec4 color; void main() { color = texture(appTexture, uv).rgba; } )"; bool glfwApp::initGL() { bool ret = true; glfwMakeContextCurrent(_window); #if !defined(EMSCRIPTEN) ret = gladLoadGLLoader((GLADloadproc)glfwGetProcAddress); #endif if (ret) { glViewport(0, 0, _wndSize.x, _wndSize.y); // VBO & VAO glGenVertexArrays(1, &_vao); glBindVertexArray(_vao); glGenBuffers(1, &_vertices); glGenBuffers(1, &_texcoords); glGenBuffers(1, &_indices); glBindBuffer(GL_ARRAY_BUFFER, _vertices); glBufferData(GL_ARRAY_BUFFER, sizeof(_vertexArray), _vertexArray, GL_STATIC_DRAW); glEnableVertexAttribArray(1); glVertexAttribPointer(1, 3, GL_FLOAT, false, 0, 0); glBindBuffer(GL_ARRAY_BUFFER, _texcoords); glBufferData(GL_ARRAY_BUFFER, sizeof(_texcoordsArray), _texcoordsArray, GL_STATIC_DRAW); glEnableVertexAttribArray(0); glVertexAttribPointer(0, 2, GL_FLOAT, false, 0, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indices); glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indexArray), _indexArray, GL_STATIC_DRAW); glVertexAttribPointer(2, 1, GL_UNSIGNED_INT, false, 0, 0); glEnableVertexAttribArray(2); std::string vertexShaderSrcStr(_vertexShaderSrc); glHelper::prependShaderVersion(vertexShaderSrcStr); std::string fragmentShaderSrcStr(_fragmentShaderSrc); glHelper::prependShaderVersion(fragmentShaderSrcStr); // Screen vertex shader _screenVertexShader = glHelper::createShader(GL_VERTEX_SHADER, vertexShaderSrcStr.c_str(), vertexShaderSrcStr.size()); // Screen fragment shader _screenFragmentShader = glHelper::createShader( GL_FRAGMENT_SHADER, fragmentShaderSrcStr.c_str(), fragmentShaderSrcStr.size()); // Screen program shader _screenProgramShader = glCreateProgram(); glAttachShader(_screenProgramShader, _screenFragmentShader); glAttachShader(_screenProgramShader, _screenVertexShader); glLinkProgram(_screenProgramShader); glHelper::checkProgram(_screenProgramShader); // Screen texture glGenTextures(1, &_texture); glBindTexture(GL_TEXTURE_2D, _texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); #if defined(EMPSCRIPTEN) // This is available in ES 3.0 and WebGL2, but not on OGL 4.0 glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA8, _appScreenPixelSize[0], _appScreenPixelSize[1]); #else // In OGL 4.0 glTexStorage is not avail. glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, Galaga::ScreenDevice::Width, Galaga::ScreenDevice::Height, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); #endif // Shader input locations _screenTextureLocation = glGetUniformLocation(_screenProgramShader, "appTexture"); _screenWorldLocation = glGetUniformLocation(_screenProgramShader, "world"); _viewProjectionLocation = glGetUniformLocation(_screenProgramShader, "viewProjection"); CHECK_OGL; // Create the animated objects. constexpr float pngFontRatio = 18.f / 20.f; animObjects.resize(6); animObjects[0].create("./data/font"); animObjects[0].setPosition(glm::vec3(-5, -.9, 0)); animObjects[0].setTarget(glm::vec3(-.42, -.95, 0)); animObjects[0].setSpeed(glm::vec3(0, .4, 0)); animObjects[0].setZoom((1. / 288.f) * pngFontRatio); animObjects[0].setDrawBackground(false); animObjects[1].create("./data/font"); animObjects[1].setPosition(glm::vec3(5, -.9, 0)); animObjects[1].setTarget(glm::vec3(.5, -.95, 0)); animObjects[1].setSpeed(glm::vec3(0, .4, 0)); animObjects[1].setZoom((1. / 288.f) * pngFontRatio); animObjects[1].setDrawBackground(false); animObjects[2].create("./data/font"); animObjects[2].setPosition(glm::vec3(0, -5, 0)); animObjects[2].setTarget(glm::vec3(0, 1, 0)); animObjects[2].setSpeed(glm::vec3(0, .5, 0)); animObjects[2].setBehavior(AnimatedObject::RANDOM); animObjects[2].setZoom((1. / 288.f) * pngFontRatio); animObjects[2].setBoundingBox(glm::vec3(-.1, .8, 0), glm::vec3(.1, .9, 0)); animObjects[4].create("./data/font"); animObjects[4].setPosition(glm::vec3(-4, .8, 0)); animObjects[4].setTarget(glm::vec3(0, .8, 0)); animObjects[4].setSpeed(glm::vec3(0, .5, 0)); animObjects[4].setBehavior(AnimatedObject::RANDOM); animObjects[4].setBoundingBox(glm::vec3(-.6, .8, 0), glm::vec3(-.55, .9, 0)); animObjects[4].setZoom((1. / 288.f) * pngFontRatio); animObjects[4].setText(" Tap left\n halfscreen\n to move left"); animObjects[5].create("./data/font"); animObjects[5].setPosition(glm::vec3(4, .8, 0)); animObjects[5].setTarget(glm::vec3(0, .8, 0)); animObjects[5].setSpeed(glm::vec3(0, .5, 0)); animObjects[5].setBehavior(AnimatedObject::RANDOM); animObjects[5].setBoundingBox(glm::vec3(.55, .8, 0), glm::vec3(.6, .9, 0)); animObjects[5].setZoom((1. / 288.f) * pngFontRatio); animObjects[5].setText(" Tap right\n halfscreen\n to move right"); ret = (glGetError() == GL_NO_ERROR); } return ret; } // Note Height and Width are swapped in ScreenDevice... static constexpr float W_TO_H = Galaga::ScreenDevice::Height / static_cast<float>(Galaga::ScreenDevice::Width); static constexpr float H_TO_W = Galaga::ScreenDevice::Width / static_cast<float>(Galaga::ScreenDevice::Height); bool glfwApp::onRender(float secDeltaTime) { bool ret = true; CHECK_OGL; // Ensure no outstanding OGL errors. _animation.advance(secDeltaTime); if (!_animation.isAnimationRunning()) { _displayQuat *= glm::angleAxis( _radSecSpeedRot * (secDeltaTime * 1000 /*sec to msec*/), glm::vec3(0., 1, 0)); // Apply 'friction' to rotation. _radSecSpeedRot -= (_radSecSpeedRot * .5f); } // // Canvas size management #if defined(EMSCRIPTEN) double width, height; emscripten_get_element_css_size("GLCanvas", &width, &height); _wndSize.x = width; _wndSize.y = height; PRINTIFCHANGED("_wndSize.x", _wndSize.x); #endif glViewport(0, 0, _wndSize.x, _wndSize.y); glClear(GL_COLOR_BUFFER_BIT); glUseProgram(_screenProgramShader); // // Compute and set 'display' position in world space.. // glm::mat4 model; if (_animation.isAnimationRunning()) { model = _animation.getMatrix(); } else { model = glm::toMat4(_displayQuat); } glUniformMatrix4fv(_screenWorldLocation, 1, GL_FALSE, glm::value_ptr(model)); // // Compute camera view. // // Camera distance according this formula: // tan(fovy/2.) = (edgeX / 2) / cameraDistance float cameraDistance = 1.f; float edgeX = 1.f; float aspectRatio = _wndSize.x / static_cast<float>(_wndSize.y); if (aspectRatio < W_TO_H) // actual window's height greater { edgeX = 0.78f / aspectRatio + 0.05f; } else // actual window's width greater { edgeX = (W_TO_H * (1.f / 0.78f)) + 0.05f; } static constexpr float FOV = glm::radians(45.f); cameraDistance = (edgeX) / tan(FOV / 2.f); #if defined(DEBUG) // std::cout <<"camDist="<< cameraDistance << "\n"; #endif float cosAngle = 0.9f; float alpha = 0.5512502f - 0.2813567f * cosAngle - 0.2488394f * pow(cosAngle, 2); if (!_animation.isAnimationRunning()) _cameraQuat = glm::slerp(_cameraQuat, _displayQuat, alpha); glm::vec4 cameraPos = glm::vec4(0, 0, cameraDistance + 0.1f, 1); cameraPos = _cameraQuat * cameraPos; glm::mat4 cameraMat = glm::lookAt(glm::vec3(cameraPos), glm::vec3(0, 0, 0), globalUpAxis); glm::mat4 proj = glm::perspective(FOV, aspectRatio, .1f, 100.0f); glm::mat4 viewProj = glm::mat4(proj * cameraMat); glUniformMatrix4fv(_viewProjectionLocation, 1, GL_FALSE, glm::value_ptr(viewProj)); // // Render the display. // glUniform1i(_screenTextureLocation, 0); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, _texture); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, _appScreenPixelSize[0], _appScreenPixelSize[1], GL_RGBA, GL_UNSIGNED_BYTE, _graphicsFrame.Pixels); glBindVertexArray(_vao); glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_INT, 0); glBindVertexArray(0); glBindTexture(GL_TEXTURE_2D, 0); // // Render text objects. if (!_animation.isAnimationRunning(2)) { animObjects[0].update(secDeltaTime); animObjects[0].setViewProjectionMatrix(viewProj); animObjects[1].update(secDeltaTime); animObjects[1].setViewProjectionMatrix(viewProj); std::array<char, 32> shownFPS; std::array<char, 32> shownRealOverSimulTime; snprintf( shownRealOverSimulTime.data(), shownRealOverSimulTime.size(), "SimTime:%d%%", static_cast<int>((totalMachineTime / totalSimulatedTime) * 100.)); snprintf(shownFPS.data(), shownFPS.size(), "FPS:%d", static_cast<int>(1.f / frameTime)); animObjects[0].setText(shownRealOverSimulTime.data()); animObjects[0].render(); animObjects[1].setText(shownFPS.data()); animObjects[1].render(); if (GameStateTracker::gameState == GameStateTracker::INTRO) { animObjects[2].setViewProjectionMatrix(viewProj); animObjects[2].setText(" Tap\n to\nstart"); animObjects[2].update(secDeltaTime); animObjects[2].render(); animObjects[4].setViewProjectionMatrix(viewProj); animObjects[4].update(secDeltaTime); animObjects[4].render(); animObjects[5].setViewProjectionMatrix(viewProj); animObjects[5].update(secDeltaTime); animObjects[5].render(); } else if (GameStateTracker::gameState == GameStateTracker::HIGHSCORE) { animObjects[2].setText(" Double Tap\nto Next Letter"); animObjects[2].setViewProjectionMatrix(viewProj); animObjects[2].update(secDeltaTime); animObjects[2].render(); } } return ret; } bool glfwApp::onPlay(float us) { bool ret = true; _audioApp->RenderAudio(_audioFrame.Samples, _audioFrame.Size); return ret; } void glfwApp::keysCallback(GLFWwindow *window, int key, int scancode, int action, int mods) { if (key == GLFW_KEY_F && action == GLFW_RELEASE) { glfwApp::get_app()->enterFullscreen(); } } void glfwApp::handleKeys() { _galagaMachine.set_InsertCoin(glfwGetKey(_window, GLFW_KEY_0) == GLFW_PRESS); _galagaMachine.set_Start1Player(glfwGetKey(_window, GLFW_KEY_1) == GLFW_PRESS); _galagaMachine.set_Start2Player(glfwGetKey(_window, GLFW_KEY_2) == GLFW_PRESS); if (!autofireEnabled) { _galagaMachine.set_MoveLeft(glfwGetKey(_window, GLFW_KEY_A) == GLFW_PRESS); _galagaMachine.set_MoveRight(glfwGetKey(_window, GLFW_KEY_D) == GLFW_PRESS); } _galagaMachine.set_Button1(glfwGetKey(_window, GLFW_KEY_K) == GLFW_PRESS); if (autofireEnabled && (GameStateTracker::gameState == GameStateTracker::PLAY)) { static size_t autofire = 0; static size_t clickFire = 0; if ((autofire++ & 15) == 0) // each # of frame, click fire once. clickFire = 2; // Press 2 cycles long. _galagaMachine.set_Button1(--clickFire > 0); } } void glfwApp::enterFullscreen() { #if defined(EMSCRIPTEN) EmscriptenFullscreenStrategy fsStrategy = {}; fsStrategy.scaleMode = EMSCRIPTEN_FULLSCREEN_SCALE_DEFAULT; fsStrategy.canvasResolutionScaleMode = EMSCRIPTEN_FULLSCREEN_CANVAS_SCALE_STDDEF; fsStrategy.filteringMode = EMSCRIPTEN_FULLSCREEN_FILTERING_NEAREST; fsStrategy.canvasResizedCallback = &updateCanvasResize; fsStrategy.canvasResizedCallbackUserData = nullptr; EMSCRIPTEN_RESULT res; res = emscripten_request_fullscreen_strategy(nullptr, false, &fsStrategy); std::cout << __FUNCTION__ << ":" << res << "\n"; #else static glm::ivec2 oldSize; static glm::ivec2 oldPos; auto primaryMonitor = glfwGetPrimaryMonitor(); GLFWmonitor *monitor = glfwGetWindowMonitor(_window); GLFWvidmode const *mode = glfwGetVideoMode(monitor ? monitor : primaryMonitor); if (monitor) glfwSetWindowMonitor(_window, 0, oldPos.x, oldPos.y, oldSize.x, oldSize.y, mode->refreshRate); else { oldSize = glm::vec2(_wndSize); glfwGetWindowPos(_window, &oldPos.x, &oldPos.y); glfwSetWindowMonitor(_window, primaryMonitor, 0, 0, mode->width, mode->height, mode->refreshRate); } #endif } int main() { int ret = 1; if (glfwApp::get_app()->initialize()) { glfwApp::get_app()->runMessageLoop(); ret = 0; } return ret; }
f493af85f6f2733305cdcaa678440b03fdf303ed
76cda73a0a93febe666d229daaa328060b6c3165
/GEOUIAppl.cpp
3f4263340d23b861c76fed5fb39884bba699288a
[]
no_license
VB6Hobbyst7/geo_ui2015
e2d7b907791e37d4404a211a9940ce4ee473cd72
48be755f43bd8a1fdc50c4ef8fe46cdc6f635e6a
refs/heads/master
2021-10-21T11:54:28.569969
2019-03-04T08:50:51
2019-03-04T08:50:51
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,477
cpp
// GEOUIAppl.cpp: implementation of the GEOUIAppl class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #define INITGUID #import "msado15.dll" no_namespace rename ("EOF", "EndOfFile") rename ("EOS", "ADOEOS") #include <stdio.h> #include <stdlib.h> #include <io.h> #include <fcntl.h> #include <string.h> /* per wcscat() wcscmp() */ #include "resource.h" #include <rxmfcapi.h> // ACAD MFC stuff #include "gs_list.h" #include "gs_def.h" // definizioni globali #include "gs_error.h" // codici errori #include "gs_resbf.h" // gestione resbuf #include "gs_init.h" // direttori globali #include "gs_utily.h" #include "GEOUIAppl.h" #include "gs_ui_utily.h" #include "gs_ui_WrkSession.h" #include "resource.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// GEOUIAppl::GEOUIAppl() { } GEOUIAppl::~GEOUIAppl() { terminate(); } /*********************************************************/ /*.doc GEOUIAppl::init <external> */ /*+ Questa funzione inizializza GEOUI. Restituisce GS_GOOD in caso di successo altrimenti restituisce GS_BAD. -*/ /*********************************************************/ int GEOUIAppl::init(void) { acutPrintf(_T("\nCaricamento interfaccia grafica GEOsim.")); if (gsc_register_all_controls() != GS_GOOD) acutPrintf(_T("Registrazione controlli fallita.\n")); // aggiungo reattore contestuale cmdAddInputContextReactor(); return GS_GOOD; } /*********************************************************/ /*.doc GEOUIAppl::terminate <external> */ /*+ Questa funzione termina GEOUI. La procedura: Restituisce GS_GOOD in caso di successo altrimenti restituisce GS_BAD. -*/ /*********************************************************/ int GEOUIAppl::terminate(void) { if (pDockPaneWrkSession) { delete pDockPaneWrkSession; pDockPaneWrkSession = NULL; } // rimuovo reattore contestuale cmdRemoveInputContextReactor(); return GS_GOOD; } //inizializzazione membri statici C_GEOUICMDLIST GEOUIAppl::GEOUICMD_LIST;
f5b89a8c2e31d31c2036cbbbf8772dd10fe87e09
e5358ad1d643e8c73d1c674153af6caa842e6554
/deque.cpp
ce843fd7177c669e41b5e30ae1080c7caca51b1c
[]
no_license
DeveloperArthur/Programacao-CPP
e5c698b8d6676d2c51f473201139e861d269af5d
16ad60bc8c7f1ad824e1c328cd10e0517e94b3d0
refs/heads/master
2020-05-05T04:15:38.267404
2019-05-09T16:59:07
2019-05-09T16:59:07
179,704,633
3
0
null
null
null
null
UTF-8
C++
false
false
733
cpp
#include <iostream> #include <deque> using namespace std; int main(int argc, char *argv[]){ deque<int> fila; cout << "Antes de inserir os elementos: "; if(fila.empty()){ cout << "Fila vazia\n"; }else{ cout << "Fila nao vazia\n"; } fila.push_back(10); fila.push_back(20); fila.push_front(30); cout << "Depois de inserir os elementos: "; if(fila.empty()){ cout << "Fila vazia\n"; }else{ cout << "Fila nao vazia\n"; } deque<int>::iterator it = fila.begin(); while(it != fila.end()){ cout << *it++ << " "; } cout << endl; fila.clear(); cout << "limpando a fila" << endl; if(fila.empty()){ cout << "Fila vazia\n"; }else{ cout << "Fila nao vazia\n"; } }
5724ee4b6ef90eedc2d07961824ccb66fc3cffef
4daa015d45c62feff3808d0bd18b2e16fab02e4f
/examples/print_platform/main.cpp
d9d25af6d9cbe8763a78003c4370af9ab3e66f90
[ "BSD-3-Clause" ]
permissive
steinwurf/platform
41b1ff05445858265e324560e8dcf172d7474c20
89ee6e96dbfd90b0acd1deb917bbb6ba44023029
refs/heads/master
2023-08-31T14:52:49.764298
2023-08-23T07:41:17
2023-08-23T07:41:17
17,145,269
19
5
NOASSERTION
2023-06-22T11:25:48
2014-02-24T17:58:48
C++
UTF-8
C++
false
false
9,320
cpp
// Copyright (c) 2013 Steinwurf ApS // All Rights Reserved // // Distributed under the "BSD License". See the accompanying LICENSE.rst file. #include <iostream> #include <platform/config.hpp> int main() { std::cout << "PLATFORM_LINUX "; #if defined(PLATFORM_LINUX) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_ANDROID "; #if defined(PLATFORM_ANDROID) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_WINDOWS "; #if defined(PLATFORM_WINDOWS) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_WINDOWS_PHONE "; #if defined(PLATFORM_WINDOWS_PHONE) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_IOS "; #if defined(PLATFORM_IOS) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_MAC "; #if defined(PLATFORM_MAC) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_EMSCRIPTEN "; #if defined(PLATFORM_EMSCRIPTEN) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_CLANG "; #if defined(PLATFORM_CLANG) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_GCC_COMPATIBLE "; #if defined(PLATFORM_GCC_COMPATIBLE) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_X86 "; #if defined(PLATFORM_X86) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_CLANG_X86 "; #if defined(PLATFORM_CLANG_X86) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_GCC_COMPATIBLE_X86 "; #if defined(PLATFORM_GCC_COMPATIBLE_X86) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_ARM "; #if defined(PLATFORM_ARM) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_CLANG_ARM "; #if defined(PLATFORM_CLANG_ARM) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_GCC_COMPATIBLE_ARM "; #if defined(PLATFORM_GCC_COMPATIBLE_ARM) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_MIPS "; #if defined(PLATFORM_MIPS) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_CLANG_MIPS "; #if defined(PLATFORM_CLANG_MIPS) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_GCC_COMPATIBLE_MIPS "; #if defined(PLATFORM_GCC_COMPATIBLE_MIPS) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_ASMJS "; #if defined(PLATFORM_ASMJS) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_CLANG_ASMJS "; #if defined(PLATFORM_CLANG_ASMJS) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_GCC_COMPATIBLE_ASMJS "; #if defined(PLATFORM_GCC_COMPATIBLE_ASMJS) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_GCC "; #if defined(PLATFORM_GCC) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_GCC_COMPATIBLE "; #if defined(PLATFORM_GCC_COMPATIBLE) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_X86 "; #if defined(PLATFORM_X86) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_GCC_X86 "; #if defined(PLATFORM_GCC_X86) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_GCC_COMPATIBLE_X86 "; #if defined(PLATFORM_GCC_COMPATIBLE_X86) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_ARM "; #if defined(PLATFORM_ARM) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_GCC_ARM "; #if defined(PLATFORM_GCC_ARM) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_GCC_COMPATIBLE_ARM "; #if defined(PLATFORM_GCC_COMPATIBLE_ARM) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_MIPS "; #if defined(PLATFORM_MIPS) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_GCC_MIPS "; #if defined(PLATFORM_GCC_MIPS) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_GCC_COMPATIBLE_MIPS "; #if defined(PLATFORM_GCC_COMPATIBLE_MIPS) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_MSVC "; #if defined(PLATFORM_MSVC) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_X86 "; #if defined(PLATFORM_X86) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_MSVC_X86 "; #if defined(PLATFORM_MSVC_X86) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_ARM "; #if defined(PLATFORM_ARM) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_MSVC_ARM "; #if defined(PLATFORM_MSVC_ARM) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_MMX "; #if defined(PLATFORM_MMX) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_SSE "; #if defined(PLATFORM_SSE) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_SSE2 "; #if defined(PLATFORM_SSE2) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_SSE3 "; #if defined(PLATFORM_SSE3) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_SSSE3 "; #if defined(PLATFORM_SSSE3) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_SSE41 "; #if defined(PLATFORM_SSE41) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_SSE42 "; #if defined(PLATFORM_SSE42) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_PCLMUL "; #if defined(PLATFORM_PCLMUL) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_AVX "; #if defined(PLATFORM_AVX) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_AVX2 "; #if defined(PLATFORM_AVX2) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_NEON "; #if defined(PLATFORM_NEON) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_NEON "; #if defined(PLATFORM_NEON) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_MMX "; #if defined(PLATFORM_MMX) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_SSE "; #if defined(PLATFORM_SSE) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_SSE2 "; #if defined(PLATFORM_SSE2) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_SSE3 "; #if defined(PLATFORM_SSE3) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_SSSE3 "; #if defined(PLATFORM_SSSE3) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_SSE41 "; #if defined(PLATFORM_SSE41) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_SSE42 "; #if defined(PLATFORM_SSE42) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_PCLMUL "; #if defined(PLATFORM_PCLMUL) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_AVX "; #if defined(PLATFORM_AVX) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; std::cout << "PLATFORM_AVX2 "; #if defined(PLATFORM_AVX2) std::cout << "1"; #else std::cout << "0"; #endif std::cout << std::endl; return 0; }
a0742dabab2eee3c157ff3c13bede49466f9b5b2
e6cd763cd6f611f56f338cd06365e0fdf536d4c7
/sclib/src/SC_BaggenstossEM.h
dfdd4790036703db68fd5fcefb0c56843fb751e3
[]
no_license
stdm/time_model
1f732b85d64eeff006ff103d096081da5ae1383d
0ac567d18b98e636eba3f5b63a27069eea00ee52
refs/heads/master
2021-08-22T23:16:22.977678
2017-12-01T16:09:44
2017-12-01T16:09:44
112,759,438
2
0
null
null
null
null
UTF-8
C++
false
false
5,209
h
/**************************************************************************/ /* Derived from: */ /* - */ /* */ /* Responsibility: */ /* - implementations of P.M.Baggenstoss' enhanced EM-Agorithm */ /* - based on his own Matlab-implementation */ /* */ /* Author : Thilo Stadelmann */ /* Date : 14.02.2005 */ /**************************************************************************/ #ifndef __SC_BaggenstossEM_H__ #define __SC_BaggenstossEM_H__ #include "SC_TweakableParameters.h" #include "SC_MatrixFunctions.h" #include <SV_Data.h> #include <SV_DataIO.h> class SC_BaggenstossEM { private : protected: bool verbose; //controls whether full cholsky-covars are plotted via '<<' or just their determinants unsigned short int maxMixtureCount; //upper bound for mixture-splitting unsigned short int mixtureCount; //count of mixture-components unsigned short int dim; //dimension of feature-vectors double* minStd; //minimum standard-deviation double* weight; //mixture weight vector double** mean; //array of mean-vectors double*** choleskyCovar; //array of cholesky-covariance-matrices; variance = std^2; std = sqrt(variance) unsigned long int trainingDataCount; //count of feature-vectors used for training double ***U, ***V, ***S; //cache for the results of Singular Value Decomposition of the cholesky-covariances; is filled on demand and set to zero if a choleskyCovar is altered double ***transposedInvertedCholeskyCovar, *logDet; //cache for the transposed-inverted covar and the covar's log-determinant to speed up lqrEval(); is computed on demand and set to NULL whenever the cholesky-covar is changed SC_TweakableParameters* pTweak; SC_MatrixFunctions* pMatrixFunc; double lqrEval(double *x, double *mean, double **choleskyCovar, unsigned short dim); double lqrEval(float *x, double *mean, double **choleskyCovar, unsigned short dim); double lqrEval(float *x, double *mean, double **choleskyCovar, double** &transposedInvertedCholeskyCovar, unsigned short dim, double &logDet); double lqrEval(double *x, double *mean, double **choleskyCovar, double** &transposedInvertedCholeskyCovar, unsigned short dim, double &logDet); virtual double mixtureCloseness(double* mean1, double* mean2, double** choleskyCovar1, double** choleskyCovar2, unsigned short int dim, double** &S1, double** &S2, double** &V1, double** &V2, double** &U1, double** &U2, double** transposedInvertedCholesky1 = NULL, double** transposedInvertedCholesky2 = NULL, double logDet1 = 0.0, double logDet2 = 0.0); virtual double emStep(SV_Data *pData, bool bias = false); virtual unsigned short int deflate(double minWeightOne, double minWeightAll); virtual unsigned short int merge(double maxCloseness); virtual unsigned short int split(SV_Data *pData, double threshold = 1.0); public : SC_BaggenstossEM(SC_TweakableParameters *pTweak = NULL, bool verbose = false); SC_BaggenstossEM(const SC_BaggenstossEM& pParent); virtual ~SC_BaggenstossEM(); virtual void init(SV_Data *pData, unsigned short int mixtureCount, double minStd, bool randInit = true); virtual void init(SV_Data *pData, unsigned short int mixtureCount, double* minStd, bool randInit = true); virtual double train(SV_Data *pData, unsigned int &actualIterations, unsigned long int maxIterations = 150, long int samplesPerMode = -1, bool bias = false, double maxCloseness = 1.0, bool addModes = true, double splitThresh = -1.0); virtual double test(SV_Data *pData); virtual double** getCovar(unsigned short int mixture); //computes and returnes the covariance-matrix out of its stored cholesky-decomposition virtual void setMaxMixtureCount(unsigned short int maxMixtureCount) {this->maxMixtureCount = maxMixtureCount;} virtual void setVerboseMode(bool verbose) {this->verbose = verbose;} friend ostream& operator<<(ostream& os, SC_BaggenstossEM& Data); virtual unsigned short int getMaxMixtureCount(void) {return this->maxMixtureCount;} virtual unsigned short int getMixtureCount(void) {return this->mixtureCount;} virtual unsigned short int getDim(void) {return this->dim;} virtual double* getMinStd(void) {return this->minStd;} virtual double* getWeight(void) {return this->weight;} virtual double** getMean(void) {return this->mean;} virtual double*** getCholeskyCovar(void) {return this->choleskyCovar;} virtual SC_MatrixFunctions* getMatrixFunctions(void) {return this->pMatrixFunc;} virtual void setMean(double **newMean) {MFree_2D(this->mean); this->mean = newMean;} virtual void setWeight(double *newWeight) {MFree_1D(this->weight); this->weight = newWeight;} virtual unsigned int write(fstream *file); virtual unsigned int read(fstream *file, SV_DataIO::SV_DatatypeSizes *fileSizes); }; #endif
18de220601d633229e86fd9cdfc682dfa170e368
1b59754b9c26e19626a2498c4f4d0fa5015c1575
/src/node.h
60a50b27028b81e1b010b35e4726cee520d7caec
[]
no_license
zephinzer/Graphs-ADT
05da85a17acae4dbb9e71ba48391f6a311547e8e
5aaeb3254030c1d5c7bf82d6da66204181d5e13b
refs/heads/master
2016-09-03T01:11:43.129135
2014-04-18T05:42:37
2014-04-18T05:42:37
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,053
h
/** node.h this file specifies the Node ADT author: zeph|nzer aka Joseph Matthias Goh website: http://zephinzer.sg github: https://github.com/zephinzer **/ #ifndef Z_NODE_H #define Z_NODE_H #include <sstream> #include <string> template <class T> class Node { T value; Node* next; public: Node(); Node(T value); void setValue(T value); T getValue(); String toString(); }; /** /// constructors **/ template <class T> Node<T>::Node() : value(NULL) {} template <> Node<int>::Node() : value(0) {} template <> Node<char>::Node() : value('\0') {} template <class T> Node<T>::Node(T value) : value(value) {} /** /// sets the internal value of this node **/ template <class T> void Node<T>::setValue(T value) { this->value = value; } /** /// gets the internal value of this node **/ template <class T> T Node<T>::getValue() { return this->value; } /** /// converts the value within this node instance to a string **/ template <class T> String Node<T>::toString() { std::stringstream retval; retval << value; return retval.str(); } #endif
0afdc40da819fc4c4b5490cabc8251a9d2e9d35b
8fdd170d3e39fd4eeffea5ec2d61bd0c06eab16f
/1_Manager/xPLduino-Manager/bin/Debug/Firmware/xplduino_controller_RF/eth_com.cpp
72fb33a53c8ae413cf9b838650dd659099a46ba7
[]
no_license
TheGrumpy/xPLduinoProject
6fc07b3cc1ecaa726f07ec7b72eb0c9ef35c1885
35a4fa354d9052a79b4f9d2baebe2ea536b890bd
refs/heads/master
2020-05-30T11:00:21.467230
2015-06-30T13:02:03
2015-06-30T13:02:03
24,757,977
3
0
null
null
null
null
UTF-8
C++
false
false
6,044
cpp
#include <Eth_com.h> #include <xPL.h> #include <EtherCard.h> #include <Arduino.h> #include <xPL_Message.h> #include "config.h" #include "WebServerSD.h" #ifdef WITH_LIGHTING #include "lighting_xpl.h" #endif #include "shutter_xpl.h" #include "switch_xpl.h" #include "temperature_xpl.h" #define ETH_COM_VERSION 2 // v1: ajout dhcp/static // v2: ajout temp // byte Ethernet::buffer[XPL_MESSAGE_BUFFER_MAX]; xPL xpl; extern char vendor_id[]; // vendor id extern char instance_id[]; // instance id /// déplacé dans customer.ino //~ #define STATIC 1 // set to 1 to disable DHCP (adjust myip/gwip values below) // Init du serveur HTTP //~ #if STATIC //~ static byte myip[] = { 192,168,1,55 }; //~ static byte gwip[] = { 192,168,1,1 }; //~ #endif extern byte myip[]; extern byte gwip[]; //~ static byte mymac[] = { 0x62,0x68,0x68,0x1D,0x31,0x35 }; extern byte mymac[]; byte Ethernet::buffer[1200]; // tcp/ip send and receive buffer // Ethercard seems to only send broadcast on this addr // If using xpl-perl, don't forget to add "--define broadcast=0.0.0.0" to the xpl-hub uint8_t broadcast[4] = { 255,255,255,255}; #define SS_PIN 10 void AfterParseAction(xPL_Message * message) { //~ if (xpl.TargetIsMe(message)) //~ { #ifdef WITH_LIGHTING if (message->IsSchema_P(PSTR("lighting"), PSTR("basic"))){ Serial.println(F("new lighting.basic")); lighting_basic(message); }else if (message->IsSchema_P(PSTR("lighting"), PSTR("request"))){ Serial.println(F("new lighting.request")); lighting_request(message); }else #endif if (message->IsSchema_P(PSTR("shutter"), PSTR("basic"))){ Serial.println(F("new shutter.basic")); shutter_basic(message); }else if (message->IsSchema_P(PSTR("shutter"), PSTR("request"))){ Serial.println(F("new lighting.request")); shutter_request(message); }else if (message->IsSchema_P(PSTR("switch"), PSTR("request"))){ Serial.println(F("new switch.request")); switch_request(message); }else if (message->IsSchema_P(PSTR("sensor"), PSTR("request"))){ Serial.println(F("new sensor.request")); sensor_request(message); } #ifdef DEBUG_INCOMING // show message Serial.println(F("---------- xPL mess reception -----------")); Serial.println(message->toString()); #endif } void SendUdPMessage(char *buffer) { ether.sendUdp (buffer, strlen(buffer), xpl.udp_port, broadcast, xpl.udp_port); } boolean isXpl( uint8_t *buffer) { return ( buffer[IP_PROTO_P] == IP_PROTO_UDP_V && buffer[UDP_DST_PORT_L_P] == XPL_PORT_L && buffer[UDP_DST_PORT_H_P] == XPL_PORT_H); } // convert byte* to char* void ByteToChar(byte* bytes, char* chars, unsigned int count) { for(unsigned int j = 0, i = UDP_DATA_P; i < count; i++) { chars[j++] = (char)bytes[i]; } } void setup_Udp() { #if WEBSERVER Serial.println(F("------------ setup SD ------------")); setup_WebServerSD(); #endif Serial.println(F("------------ setup UDP ------------")); // Serial.print(F("IP=")); // Serial.print(myip[0]); // Serial.print(F(".")); // Serial.print(myip[1]); // Serial.print(F(".")); // Serial.print(myip[2]); // Serial.print(F(".")); // Serial.println(myip[3]); // Serial.print(F("GW=")); // Serial.print(gwip[0]); // Serial.print(F(".")); // Serial.print(gwip[1]); // Serial.print(F(".")); // Serial.print(gwip[2]); // Serial.print(F(".")); // Serial.println(gwip[3]); // Serial.print(F("MAC=")); // Serial.print(mymac[0], HEX); // Serial.print(F(".")); // Serial.print(mymac[1], HEX); // Serial.print(F(".")); // Serial.print(mymac[2], HEX); // Serial.print(F(".")); // Serial.print(mymac[3], HEX); // Serial.print(F(".")); // Serial.print(mymac[4], HEX); // Serial.print(F(".")); // Serial.println(mymac[5], HEX); Serial.print( "Access Ethernet controller..."); if (ether.begin(sizeof Ethernet::buffer, mymac, SS_PIN) == 0){ Serial.println( "Failed");} else Serial.println( "ok"); #if STATIC Serial.print( "static setup..."); ether.staticSetup(myip, gwip); Serial.println( "ok"); #else Serial.print("DHCP request..."); if (!ether.dhcpSetup()) Serial.println( "Failed"); else Serial.println( "ok"); #endif ether.printIp("IP: ", ether.myip); ether.printIp("GW: ", ether.gwip); ether.printIp("DNS: ", ether.dnsip); Serial.println(F("------------ setup XPL layer ------------")); Serial.print(F("vendor_id= '")); Serial.print(vendor_id); Serial.println(F("'")); Serial.print(F("instance_id= '")); Serial.print(instance_id); Serial.println(F("'")); xpl.SendExternal = &SendUdPMessage; // pointer to the send callback xpl.AfterParseAction = &AfterParseAction; // pointer to a post parsing action callback //~ xpl.SetSource_P(PSTR("xplduino"), PSTR("config"), PSTR("test")); // parameters for hearbeat message xpl.SetSource_P(PSTR("xplduino"), PSTR("config"), instance_id); // parameters for hearbeat message Serial.println(F("----------- setup XPL layer done -----------")); } void loop_Udp() { xpl.Process(); // heartbeat management word len = ether.packetReceive(); if(len) { // Serial.print("receive bytes:"); // Serial.print(len); // Check if Xpl UDP packet if( isXpl( Ethernet::buffer ) ) { // Serial.println(" of xpl"); char xPLMessageBuff[XPL_MESSAGE_BUFFER_MAX]; ByteToChar(Ethernet::buffer, xPLMessageBuff, len); // parse message xpl.ParseInputMessage(xPLMessageBuff); } #if WEBSERVER else{ // it's probably a tcp packet // Serial.println(" of tcp"); loop_WebServerSD(len); } #endif } }
85d83beab128bdb1618df8cf925b2041a628fa34
d19ec44aeeba2cf891d88c9914a6899dd5bcbcd5
/Model/GameModel.cpp
cb21e166f9502ab136d065b7a59457bf85729802
[]
no_license
matthewchiborak/SudsyHD
f06b99add089cca8db4482d79f83e6523ff397ba
e811d33455300a730ecd5d9a8c41aa830ac163e9
refs/heads/main
2023-07-16T17:02:42.790226
2021-08-29T02:02:23
2021-08-29T02:02:23
392,882,464
0
0
null
null
null
null
UTF-8
C++
false
false
475
cpp
#include "GameModel.h" GameModel::GameModel(ILevelFactory& levelFactory) : IGameModel(levelFactory) { } void GameModel::move(const Point direction) { this->state.get()->move(direction); } void GameModel::interact() { this->state.get()->interact(); } void GameModel::advance() { this->state.get()->advance(); } void GameModel::change(bool next) { this->state.get()->change(next); } void GameModel::changeMenu(bool next) { this->state.get()->menuChange(next); }
95cd31f16e5193de309918b35f29a9b994a92061
5e7e5ebfc9385b07995bee5654fafd5d91696ef4
/Pong/include/Ball.h
69a62307c89342080ebd58d76a69b1468e201465
[]
no_license
Zephiranos/Pong
346068ca35b1ea064f2fb2ea901db21f69afbe34
bab8705e9f100c0e9e12306b03794d61619491aa
refs/heads/master
2021-01-11T19:18:50.060887
2017-01-18T15:18:33
2017-01-18T15:18:33
79,335,250
0
0
null
null
null
null
UTF-8
C++
false
false
768
h
#pragma once /// // Ball class header // /// #ifndef _BALL_H_ #include "Point.h" #include "SDL.h" class Ball { private: int m_resetX; int m_resetY; int m_X; int m_Y; int m_Width; int m_Height; int m_dX; int m_dY; int m_speedLaunch; int m_speedMax; //Control class copy Ball(const Ball & ball); Ball & operator= (const Ball & ball); void Accelerate(); public: Ball(int x, int y, int width, int height); const int GetX() { return m_X; } const int GetY() { return m_Y; } const int GetWidth() { return m_Width; } const int GetHeight() { return m_Height; } SDL_Rect GetBoundingBox(); void Reset(); void Launch(int side); void Update(); bool Collide(const SDL_Rect); void BounceOffWall(); void BounceOffPaddle(); }; #endif // !_BALL_H_
681167ff74cee8c91e34751e596166db59018fcd
e679dfd1c7253d385a7e0937c7d2218d78baea5d
/MyCodeSrc/Algorithms/sort/AllSort.cpp
8ac2ee8227947a8c12fc418c621cef557091ed64
[]
no_license
TheNhatAT/Data-structures-and-Algorithms-code-in-C
c61e0544cbf7276b55668281c37f7c852fe67fc5
3a9509a20191957b7f9ce13648574dca0b5604fb
refs/heads/main
2023-02-04T09:00:20.147277
2020-12-30T15:58:37
2020-12-30T15:58:37
322,018,970
0
0
null
null
null
null
UTF-8
C++
false
false
3,261
cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <algorithm> void swap(int* a, int* b) { int c = *a; *a = *b; *b = c; } void InsertionSort(int a[], int size) { for (int i = 1; i < size; i++) { int temp = a[i]; int pos = i; while (i > 0 && a[i - 1] > temp) { a[i] = a[i - 1]; // bước lặp k: liên tục đổi chỗ phần tử thứ k và phần tử kề bên trái nó nếu phần tử k còn nhỏ hơn phần tử đó i--; } a[i] = temp; } } void SelectionSort(int a[], int size) { int index_min; for (int i = 0; i < size - 1; i++) { index_min = i; // tìm phần tử nhỏ nhất trong mảng từ i + 1 -> n for (int j = i + 1; j < size; j++) { if (a[j] < a[index_min]) index_min = j; } //đổi chỗ phần từ nhỏ nhất vừa tìm được về vị trí thứ i swap(&a[i], &a[index_min]); } } void BubbleSort(int a[], int size) { int sorted = 1; // dùng để ghi nhận xem bước lặp không có phép hoán đổi nào được thực hiện -> thực hiện xong for (int i = 0; i < size; i++) { if (sorted == 1) { sorted = 0; for (int j = 0; j < size - i - 1; j++) { if (a[j] > a[j + 1]) { swap(&a[j], &a[j + 1]); sorted = 1; } } } } } void Merge1(int a[], int front, int mid, int end) { int n1 = mid - front + 1; int n2 = end - mid; int* left = (int*)malloc((n1 + 1) * sizeof(int)); int* right = (int*)malloc((n2 + 1) * sizeof(int)); for (int i = 0; i < n1; i++) { left[i] = a[front + i]; } left[n1] = INT_MAX; right[n2] = INT_MAX; // must set this line to recursive merge sort for (int j = 0; j < n2; j++) { right[j] = a[mid + 1 + j]; } int i = 0, j = 0; for (int k = front; k <= end; k++) { if (left[i] >= right[j]) { a[k] = right[j]; j++; } else { a[k] = left[i]; i++; } } } void MergeSort(int a[], int front, int end) { if (front < end) { int mid = (front + end) / 2; MergeSort(a, front, mid); MergeSort(a, mid + 1, end); Merge1(a, front, mid, end); //Merge2(a, front, mid, end); } } int Partition(int a[], int left, int right) { int i = left, j = right + 1; int pivot = a[left]; // pivot is the first element of array (sorted) while (true) { i++; //find from left to right to find the first element >= pivot while (i <= right && a[i] < pivot) i++; j--; //find from right to left to find the first element <= pivot while (j >= left && pivot < a[j]) j--; if (i >= j) break; swap(a + i, a + j); } swap(a + j, a + left); // swap a[j] with a[left] +> return pivot -> a[j] return j; } void QuickSort(int a[], int left, int right ) { int pivot; if (left < right) { pivot = Partition(a, left, right); QuickSort(a, left, pivot - 1); // all elements of left array is smaller than pivot QuickSort(a, pivot + 1, right);// all elements of right array is bigger than pivot } } int main() { int a[9] = { 1, 5, 4, 7, 2, 9, 4, 3, 5 }; //InsertionSort(a, 9); //SelectionSort(a, 9); //BubbleSort(a, 9); //MergeSort(a, 0, 8); QuickSort(a, 0, 8); for (int i = 0; i < 9; i++) { printf("%d ", a[i]); } return 0; }
e10ad606745fdeb7ffad791a58aaaf2a2391f78b
9a3b4683bc7ea44fe4c222861066daf5d96a6ff8
/final/include/ui/sensor/Sensor.h
52b4bd80d970d1aa8c1c0232f5b01524da4e40ce
[]
no_license
theo-kim/game-design
fb1b701232173d98c94663a0b768a4387e90e8a5
1d33744b1fa9e955724299cc5d39435d24c9d2b5
refs/heads/master
2020-07-30T11:29:33.585982
2020-01-28T20:24:09
2020-01-28T20:24:09
210,213,203
0
1
null
null
null
null
UTF-8
C++
false
false
265
h
#ifndef SENSOR_DEF #define SENSOR_DEF #include "standard.h" #include "ui/transformation/Transformation.h" class Sensor { public: Sensor(Transformation position); int Check(Sensor *other); private: Transformation position; }; class SensorState { }; #endif
3d700d9545cbb4f6eca543a038eb3e22576c6cf8
5b8f110384e866d8d04af48daab3f3ef49946b3e
/Utilities/inputdlg.cpp
d09d213aa2ef037ba78a49530da22d4bfdd000b9
[]
no_license
towhee/Winnow64
1ddc5fdcc860635a297f23a089780443a57e758c
4976cb60a5cbeb50bf32d0bbd069dad62cd3e309
refs/heads/master
2023-08-25T19:36:16.286438
2023-08-24T21:04:40
2023-08-24T21:04:40
48,884,756
1
0
null
null
null
null
UTF-8
C++
false
false
1,504
cpp
#include "inputdlg.h" #include "ui_inputdlg.h" #include <QDebug> InputDlg::InputDlg(QString windowTitle, QString description, QString &input, QStringList &doNotUse, QWidget *parent) : QDialog(parent), ui(new Ui::InputDlg), input(input), doNotUse(doNotUse) { ui->setupUi(this); setWindowTitle(windowTitle); setStyleSheet(G::css); int b = G::backgroundShade - 10; ui->inputText->setStyleSheet("QLineEdit {background: " + QColor(b,b,b).name() + ";}"); ui->inputText->setText(input); ui->descriptionText->setText(description); if (doNotUse.contains(input)) doNotUse.removeAt(doNotUse.indexOf(input)); connect(ui->inputText, &QLineEdit::textChanged, this, &InputDlg::checkDoNotUse); connect(ui->okBtn, &QPushButton::clicked, this, &InputDlg::ok); connect(ui->cancelBtn, &QPushButton::clicked, this, &InputDlg::cancel); #ifdef Q_OS_WIN Win::setTitleBarColor(winId(), G::backgroundColor); #endif } InputDlg::~InputDlg() { delete ui; } void InputDlg::checkDoNotUse(QString text) { if (doNotUse.contains(text.trimmed())) { ui->msg->setText("Duplicate text. Please try again."); okToSave = false; } else { ui->msg->setText(""); okToSave = true; } } void InputDlg::ok() { input = ui->inputText->text().trimmed(); if (okToSave) accept(); } void InputDlg::cancel() { input = ""; reject(); }
ccc70fcfc86e565b41534ea435cb5ee9a430ec56
a30371357857195bc421bb14f55774cf02839783
/ManuvrOS/XenoSession/Manuvr/XenoManuvrMessage.cpp
f44724b3efa648bd8c0e94f8e76f5cf268911077
[ "Apache-2.0" ]
permissive
jspark311/ManuvrOS
4f646867b4334aa4134fabd2eaa667fb2339eda0
35f241ed0e1aa1d5abd1211cdee2cc4502303b53
refs/heads/master
2021-01-23T19:29:54.196320
2017-09-09T05:39:59
2017-09-09T05:39:59
57,365,724
3
0
null
2016-04-29T07:43:32
2016-04-29T07:43:32
null
UTF-8
C++
false
false
18,423
cpp
/* File: XenoManuvrMessage.cpp Author: J. Ian Lindsay Date: 2014.11.20 Copyright 2016 Manuvr, Inc 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. XenoManuvrMessage is the class that is the interface between ManuvrMsgs and XenoSessions. ---J. Ian Lindsay */ #include "../XenoSession.h" #include <Kernel.h> #include <Platform/Platform.h> // TODO: This is temporary until the session is fully-abstracted. #include "ManuvrSession.h" /**************************************************************************************************** * _______.___________. ___ .___________. __ ______ _______. * / | | / \ | || | / | / | * | (----`---| |----` / ^ \ `---| |----`| | | ,----' | (----` * \ \ | | / /_\ \ | | | | | | \ \ * .----) | | | / _____ \ | | | | | `----.----) | * |_______/ |__| /__/ \__\ |__| |__| \______|_______/ * * Static members and initializers should be located here. Initializers first, functions second. ****************************************************************************************************/ /* This is what a sync packet looks like. Always. So common, we'll hard-code it. */ const uint8_t XenoManuvrMessage::SYNC_PACKET_BYTES[4] = {0x04, 0x00, 0x00, CHECKSUM_PRELOAD_BYTE}; // TODO: This is probably useless except in debug builds. uint32_t XenoManuvrMessage::_heap_instantiations = 0; uint32_t XenoManuvrMessage::_heap_freeds = 0; uint16_t _ring_buf_idx = 0; XenoManuvrMessage XenoManuvrMessage::__prealloc_pool[XENOMSG_M_PREALLOC_COUNT]; XenoMessage* XenoManuvrMessage::fetchPreallocation(XenoSession* _ses) { XenoManuvrMessage* return_value; for (int i = 0; i < XENOMSG_M_PREALLOC_COUNT; i++) { if (XENO_MSG_PROC_STATE_UNINITIALIZED == __prealloc_pool[_ring_buf_idx % XENOMSG_M_PREALLOC_COUNT].getState()) { __prealloc_pool[_ring_buf_idx % XENOMSG_M_PREALLOC_COUNT].claim(_ses); return &__prealloc_pool[_ring_buf_idx++ % XENOMSG_M_PREALLOC_COUNT]; } _ring_buf_idx++; } // We have exhausted our preallocated pool. Note it. return_value = new XenoManuvrMessage(); return_value->claim(_ses); _heap_instantiations++; return (XenoMessage*) return_value; } /** * At present, our criteria for preallocation is if the pointer address passed in * falls within the range of our __prealloc_pool array. I see nothing "non-portable" * about this, it doesn't require a flag or class member, and it is fast to check. * However, this strategy only works for types that are never used in DMA or code * execution on the STM32F4. It may work for other architectures (PIC32, x86?). * I also feel like it ought to be somewhat slower than a flag or member, but not * by such an amount that the memory savings are not worth the CPU trade-off. * Consider writing all new cyclical queues with preallocated members to use this * strategy. Also, consider converting the most time-critical types to this strategy * up until we hit the boundaries of the STM32 CCM. * ---J. Ian Lindsay Mon Apr 13 10:51:54 MST 2015 * * @param XenoManuvrMessage* obj is the pointer to the object to be reclaimed. */ void XenoManuvrMessage::reclaimPreallocation(XenoMessage* obj) { uintptr_t obj_addr = ((uintptr_t) obj); uintptr_t pre_min = ((uintptr_t) __prealloc_pool); uintptr_t pre_max = pre_min + (sizeof(XenoManuvrMessage) * XENOMSG_M_PREALLOC_COUNT); if ((obj_addr < pre_max) && (obj_addr >= pre_min)) { // If we are in this block, it means obj was preallocated. wipe and reclaim it. #ifdef MANUVR_DEBUG StringBuilder local_log; local_log.concatf("reclaim via prealloc. addr: %p\n", obj_addr); Kernel::log(&local_log); #endif obj->wipe(); } else { #ifdef MANUVR_DEBUG StringBuilder local_log; local_log.concatf("reclaim via delete. addr: %p\n", obj_addr); Kernel::log(&local_log); #endif // We were created because our prealloc was starved. we are therefore a transient heap object. _heap_freeds++; delete (XenoManuvrMessage*) obj; } } /** * Scan a buffer for the protocol's sync pattern. * * @param buf The buffer to search through. * @param len How far should we go? * @return The offset of the sync pattern, or -1 if the buffer contained no such pattern. */ int XenoManuvrMessage::contains_sync_pattern(uint8_t* buf, int len) { int i = 0; while (i < len-3) { if (*(buf + i + 0) == XenoManuvrMessage::SYNC_PACKET_BYTES[0]) { if (*(buf + i + 1) == XenoManuvrMessage::SYNC_PACKET_BYTES[1]) { if (*(buf + i + 2) == XenoManuvrMessage::SYNC_PACKET_BYTES[2]) { if (*(buf + i + 3) == XenoManuvrMessage::SYNC_PACKET_BYTES[3]) { return i; } } } } i++; } return -1; } /** * Scan a buffer for the protocol's sync pattern, returning the offset of the * first byte that breaks the pattern. * * @param buf The buffer to search through. * @param len How far should we go? * @return The offset of the first byte that is NOT sync-stream. */ int XenoManuvrMessage::locate_sync_break(uint8_t* buf, int len) { int i = 0; while (i < len-3) { if (*(buf + i + 0) != XenoManuvrMessage::SYNC_PACKET_BYTES[0]) return i; if (*(buf + i + 1) != XenoManuvrMessage::SYNC_PACKET_BYTES[1]) return i; if (*(buf + i + 2) != XenoManuvrMessage::SYNC_PACKET_BYTES[2]) return i; if (*(buf + i + 3) != XenoManuvrMessage::SYNC_PACKET_BYTES[3]) return i; i += 4; } return i; } /**************************************************************************************************** * ___ _ ___ _ _ _ _ * / __| |__ _ ______ | _ ) ___(_) |___ _ _ _ __| |__ _| |_ ___ * | (__| / _` (_-<_-< | _ \/ _ \ | / -_) '_| '_ \ / _` | _/ -_) * \___|_\__,_/__/__/ |___/\___/_|_\___|_| | .__/_\__,_|\__\___| * |_| * Constructors/destructors, class initialization functions and so-forth... ****************************************************************************************************/ XenoManuvrMessage::XenoManuvrMessage() : XenoMessage() { wipe(); } XenoManuvrMessage::XenoManuvrMessage(ManuvrMsg* existing_event) : XenoMessage(existing_event) { wipe(); // Should maybe set a flag in the event to indicate that we are now responsible // for memory upkeep? Don't want it to get jerked out from under us and cause a crash. provideEvent(existing_event); } /** * Sometimes we might want to re-use this allocated object rather than free it. * Do not change the unique_id. One common use-case for this fxn is to reply to a message. */ void XenoManuvrMessage::wipe() { XenoMessage::wipe(); session = nullptr; checksum_c = CHECKSUM_PRELOAD_BYTE; // The checksum of the data that we calculate. retries = 0; // How many times have we retried this packet? arg_count = 0; unique_id = 0; checksum_i = 0; // The checksum of the data that we receive. message_code = 0; // millis_at_begin = 0; // This is the milliseconds reading when we sent. time_created = millis(); } /** * Calling this fxn will cause this Message to be populated with the given Event and unique_id. * Calling this converts this XenoManuvrMessage into an outbound, and has the same general effect as * calling the constructor with an Event argument. * TODO: For safety's sake, the Event is not retained. This has caused us some grief. Re-evaluate... * * @param ManuvrMsg* The Event that is to be communicated. * @param uint16_t An explicitly-provided unique_id so that a dialog can be perpetuated. */ void XenoManuvrMessage::provideEvent(ManuvrMsg* existing_event, uint16_t manual_id) { XenoMessage::provideEvent(existing_event); unique_id = manual_id; message_code = event->eventCode(); // } /** * We need to ACK certain messages. This converts this message to an ACK of the message * that it used to be. Then it can be simply fed back into the outbound queue. * * @return nonzero if there was a problem. */ int8_t XenoManuvrMessage::ack() { ManuvrMsg temp_event(MANUVR_MSG_REPLY); provideEvent(&temp_event, unique_id); awaitingSend(true); return 0; } /** * Calling this sends a message to the counterparty asking them to retransmit the same message. * * @return nonzero if there was a problem. */ int8_t XenoManuvrMessage::retry() { ManuvrMsg temp_event(MANUVR_MSG_REPLY_RETRY); provideEvent(&temp_event, unique_id); awaitingSend(true); retries++; return 0; } /** * Calling this will mark this message as critical fail and send a reply to the counterparty * telling them that we can't cope with it. * * @return nonzero if there was a problem. */ int8_t XenoManuvrMessage::fail() { ManuvrMsg temp_event(MANUVR_MSG_REPLY_FAIL); provideEvent(&temp_event, unique_id); awaitingSend(true); return 0; } /** * This method is called to flatten this message (and its Event) into a string * so that the session can provide it to the transport. * * @return The total size of the string that is meant for the transport, * or -1 if something went wrong. */ int XenoManuvrMessage::serialize(StringBuilder* buffer) { if (nullptr == event) { return 0; } awaitingSend(true); int arg_count = event->serialize(buffer); if (arg_count >= 0) { bytes_total = (uint32_t) buffer->length() + 8; // +8 because: checksum byte unsigned char* prepend_array = (unsigned char*) alloca(8); *(prepend_array + 4) = (uint8_t) (unique_id & 0xFF); *(prepend_array + 5) = (uint8_t) (unique_id >> 8); *(prepend_array + 6) = (uint8_t) (event->eventCode() & 0xFF); *(prepend_array + 7) = (uint8_t) (event->eventCode() >> 8); // Calculate and append checksum. uint8_t checksum_temp = CHECKSUM_PRELOAD_BYTE; checksum_temp = (uint8_t) checksum_temp + *(prepend_array + 4); checksum_temp = (uint8_t) checksum_temp + *(prepend_array + 5); checksum_temp = (uint8_t) checksum_temp + *(prepend_array + 6); checksum_temp = (uint8_t) checksum_temp + *(prepend_array + 7); unsigned char* full_xport_array = buffer->string(); for (int i = 0; i < buffer->length(); i++) { checksum_temp = (uint8_t) checksum_temp + *(full_xport_array + i); } checksum_c = checksum_temp; *(prepend_array + 0) = (uint8_t) (bytes_total & 0xFF); *(prepend_array + 1) = (uint8_t) (bytes_total >> 8); *(prepend_array + 2) = (uint8_t) (bytes_total >> 16); *(prepend_array + 3) = (uint8_t) checksum_temp; buffer->prepend(prepend_array, 8); } return buffer->length(); } /** * This function should be called by the session to feed bytes to a message. * * @return The number of bytes consumed, or a negative value on failure. */ int XenoManuvrMessage::feedBuffer(StringBuilder *sb_buf) { if (nullptr == sb_buf) return 0; return accumulate((uint8_t*) sb_buf->string(), sb_buf->length()); } /** * This function should be called by the session to feed bytes to a message. * * @return The number of bytes consumed, or a negative value on failure. */ int XenoManuvrMessage::accumulate(unsigned char* buf, int buf_len){ int return_value = 0; StringBuilder output; /* Ok... by this point, we know we are eligible to receive data. So stop worrying about that. */ if (0 == bytes_received) { // If we haven't been fed any bytes yet... if (buf_len < 4) { // Not enough to act on, since we have none buffered ourselves. // Return 0 to indicate we've taken no bytes, and have not errored. return 0; } else { // We have at least enough for a sync-check... if (0 == XenoManuvrMessage::contains_sync_pattern(buf, 4)) { // Get the offset of the last instance in this sync-stream relative to (buf+0) (we already know there is at least one). int x = XenoManuvrMessage::locate_sync_break(buf+4, buf_len-4) + 4; #ifdef MANUVR_DEBUG output.concatf("About to cull %d bytes of sync stream from the buffer..\n", x); #endif proc_state = XENO_MSG_PROC_STATE_SYNC_PACKET; // Mark ourselves as a sync packet. bytes_received = 4; if (output.length() > 0) Kernel::log(&output); return x; } else { // It isn't sync, and we have at least 4 bytes. Let's take those... bytes_total = parseUint32Fromchars(buf); checksum_i = (bytes_total & 0xFF000000) >> 24; bytes_total = (bytes_total & 0x00FFFFFF); bytes_received += 4; return_value += 4; } } /* Adjust buffer for down-stream code. */ buf_len -= 4; buf += 4; } /* Partial-packet case... */ if (4 == bytes_received) { // Do we have a whole minimum packet yet? if (buf_len < 4) { // Not enough to act on. if (output.length() > 0) Kernel::log(&output); return return_value; } else { // Take the bytes remaining unique_id = parseUint16Fromchars(buf); buf += 2; message_code = parseUint16Fromchars(buf); bytes_received += 4; return_value += 4; // TODO: Now that we have a message code, we can go get a message def, and possible arg // forms in anticipation of the parse being accurate and the message valid. Not sure if // that is a good idea at this point. ---J. Ian Lindsay Thu Feb 04 12:01:54 PST 2016 /* Adjust buffer for down-stream code. */ buf += 2; buf_len -= 4; } } /* Do we have the whole packet yet? */ int bytes_remaining = bytesRemaining(); if ((bytes_received >= 8) && (buf_len >= bytes_remaining)) { /* We might be done... */ StringBuilder argbuf(buf, bytes_remaining); bytes_received += bytes_remaining; return_value += bytes_remaining; buf_len -= bytes_remaining; buf += bytes_remaining; // Test the checksum... checksum_c = (checksum_c + (unique_id >> 8) + (unique_id & 0x00FF) ) % 256; checksum_c = (checksum_c + (message_code >> 8) + (message_code & 0x00FF) ) % 256; uint8_t* temp = argbuf.string(); uint8_t temp_len = argbuf.length(); for (int i = 0; i < temp_len; i++) checksum_c = (checksum_c + *(temp+i) ) % 256; if (checksum_c == checksum_i) { // Checksum passes. Build the event. if (event) { #ifdef MANUVR_DEBUG output.concat("XenoManuvrMessage::feedBuffer(): Ooops. Clobbered a runnable pointer. Expect leaks...\n"); #endif } event = Kernel::returnEvent(message_code); if (event->eventCode()) { proc_state = XENO_MSG_PROC_STATE_AWAITING_PROC; // The event code was found. Do something about it. if (temp_len > 0) { if (event->inflateArgumentsFromBuffer(temp, temp_len) <= 0) { output.concat("XenoManuvrMessage::inflateArgs():\t inflate fxn returned failure...\n"); } } else { output.concat("XenoManuvrMessage::inflateArgs():\t argbuf was zero-length.\n"); } } else { /* By convention, 0x0000 is the message code for "Undefined event". In this case it means that we understood what our counterparty said, but ve used a phrase or idiom that we don't understand. We might at this point choose to do any of the following: a) Check against an independently-tracked message legend in a session somewhere. b) Ask the counterparty for a message legend if we don't have one yet. c) NACK the message with a fail condition so he quits using that idiom. */ proc_state = XENO_MSG_PROC_STATE_AWAITING_REAP | XENO_MSG_PROC_STATE_ERROR; #ifdef MANUVR_DEBUG output.concatf("XenoManuvrMessage::feedBuffer(): Couldn't find a message definition for the code 0x%04x.\n", message_code); #endif } } else { // TODO: We might send a retry request at this point... proc_state = XENO_MSG_PROC_STATE_AWAITING_REAP | XENO_MSG_PROC_STATE_ERROR; #ifdef MANUVR_DEBUG output.concatf("XenoManuvrMessage::feedBuffer() Message failed to checksum. Got 0x%02x. Expected 0x%02x. \n", checksum_c, checksum_i); #endif } } if (output.length() > 0) Kernel::log(&output); return return_value; } /** * Is this a reply to a message we previously sent? Only considers the Message ID. * * @return true if this message is a reply to a prior message. */ bool XenoManuvrMessage::isReply() { if (nullptr == event) return false; switch (event->eventCode()) { case MANUVR_MSG_REPLY: case MANUVR_MSG_REPLY_RETRY: case MANUVR_MSG_REPLY_FAIL: return true; default: return false; } } /** * Does this message type demand an ACK? * * @return true if this message demands an ACK. */ bool XenoManuvrMessage::expectsACK() { if (event) { return event->demandsACK(); } return false; } /** * Called by a session object to claim the message. * * @param XenoSession* The session that is claiming us. */ void XenoManuvrMessage::claim(XenoSession* _ses) { proc_state = XENO_MSG_PROC_STATE_RECEIVING; session = _ses; } /** * Debug support method. This fxn is only present in debug builds. * * @param StringBuilder* The buffer into which this fxn should write its output. */ void XenoManuvrMessage::printDebug(StringBuilder *output) { XenoMessage::printDebug(output); output->concatf("\t unique_id 0x%04x\n", unique_id); output->concatf("\t checksum_i 0x%02x\n", checksum_i); output->concatf("\t checksum_c 0x%02x\n", checksum_c); output->concatf("\t arg_count %d\n", arg_count); output->concatf("\t time_created 0x%08x\n", time_created); output->concatf("\t retries %d\n\n", retries); }
6ec4ffaf7d5e1587e4afecdafab924cf5c2793f8
2e46458d931aa6be39ecd9712f62a9311106c017
/exam2/week4/findMedian.cpp
fcf57b1d400dea2bfc79916de31776cfef4ff515
[ "MIT", "LicenseRef-scancode-other-permissive" ]
permissive
WeiChienHsu/CS165
9448fb1731e698b5078e1dd76f62ad51481f2a2c
65e95efc90415c8acc707e2d544eb384d3982e18
refs/heads/master
2020-03-08T12:48:24.158676
2019-01-06T22:33:12
2019-01-06T22:33:12
128,137,823
2
0
null
null
null
null
UTF-8
C++
false
false
742
cpp
#include <iostream> void bubbleSort(int *arr, int size) { for(int i = 0; i < size; i++) { for(int j = 0; j < size - 1; j++) { if(arr[j] > arr[j+1]) { int temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp; } } } } double findMedian(int *arr, int size) { bubbleSort(arr, size); for(int i = 0; i < size; i++) { std::cout << arr[i] << " "; } std::cout << "\n"; if(size % 2 != 0) { return arr[(size / 2)]; } else { int mid = size / 2; return (arr[mid] + arr[mid - 1]) / 2.0; } } int main() { int arr[5] = {1, 6, 7, 3 ,2}; int arr2[4] = {1, 4, 2, 3}; std::cout << findMedian(arr, 5) << std::endl; std::cout << findMedian(arr, 4) << std::endl; return 0; }
b4b76b1e8a68bad9b824c31fe79c8dbe93166ba4
08042519aa130c823317bc6c05a6bc04b518e82f
/source/4.4.cpp
43c74132af6625b95c4048dc8f86bcbc0130802a
[]
no_license
xuyoujun/leetcode
a49ecbae75646c4a942b0e3146b8fcc35c0aeebf
8dac14f876671d78a3a3155fab719e83a248766c
refs/heads/master
2021-01-10T01:19:47.131490
2016-04-06T06:15:54
2016-04-06T06:15:54
43,555,059
0
0
null
null
null
null
UTF-8
C++
false
false
1,195
cpp
// 4.4.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<stdio.h> #include<stdlib.h> #include<ctype.h> int Evaluate_Reverse_Polish_Notation(char **, int len); int main() { char *exp[] = { "2","1","+","3","*" }; printf("%d\n", sizeof(exp)/sizeof(char *)); //printf("%d\n", Evaluate_Reverse_Polish_Notation(exp, 5)); while (1); return 0; } bool is_operator(char *ch) { return ('+' == *ch || '-' == *ch || '*' == *ch || '/' == *ch); } int comp(int a, int b, char opr) { if ('+' == opr)return a + b; else if ('-' == opr) return a - b; else if ('*' == opr) return a * b; else return a / b; } int Evaluate_Reverse_Polish_Notation(char **str, int len) { int top = -1; int *stk = new int[len]; int i; int operand_a; int operand_b; int temp = 0; for (i = 0; i < len; i++) { if (is_operator(str[i])) { operand_b = stk[top--]; operand_a = stk[top--]; stk[++top] = comp(operand_a, operand_b, *str[i]); } else { while (isdigit(*str[i])) { temp = temp * 10 + (*str[i] - '0'); str[i] ++; } //printf("%d\n", top); stk[++top] = temp; //i--; temp = 0; } } temp = stk[top]; delete stk; return temp; }
20004f1fc57e0440c5567f351244157ff5fe7f1a
b9a78610b06b0836b9a2ea796d45587c9c1267d5
/Aula15/15-01/exercicio1.inl
d6907cb59761617200923013e5c9e77c33100730
[]
no_license
wilsonsf/TI-LP1
ecaf6d0f4af63d509e0f665fd409db194de8c988
805333df924f851ec4d873d753294163c3b99da9
refs/heads/master
2021-01-10T02:19:42.888987
2015-11-25T13:35:46
2015-11-25T13:35:46
43,001,208
0
0
null
2015-11-25T13:35:46
2015-09-23T13:03:23
C++
UTF-8
C++
false
false
512
inl
#include <iostream> template <typename T> void preencheArranjo(T &arranjo, int tamanho) { for (int i = 0; i < tamanho; i ++){ std::cout << "Elemento " << i+1 << ": "; std::cin >> arranjo[i]; } } template <typename T> void imprimeArranjo(T &arranjo, int tamanho) { for (int i = 0; i < tamanho; i++) { std::cout << arranjo[i] << (i != tamanho-1 ? ", " : "\n"); } } template <typename T> void liberaArranjo(T *arranjo) { if (arranjo) { delete arranjo; } }
a451e91ba45d76007ea2e0df3ee9466b77953e05
f11743bea2ae62701a28a746d16561313460e880
/mainwindow.cpp
d2d0f6cb0bca1d2b41218ce52e1bacf70c18f6ae
[]
no_license
z52c/VEXedrTimer
8dfafaeb9dfae1cc8ed881dd6cfb4ea0e1542cff
afd2d62086a5d038570870299ef0c6f1b33f9867
refs/heads/master
2020-04-07T02:19:42.171155
2018-12-30T15:05:23
2018-12-30T15:05:23
157,972,035
0
0
null
null
null
null
UTF-8
C++
false
false
4,061
cpp
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); timer1=new QTimer(this); connect(timer1,SIGNAL(timeout()),this,SLOT(timerOut())); showLCD(0); pause=false; working=false; ui->pushButtonPause->setEnabled(false); shortcutZidong= new QShortcut(this); shortcutZidong->setKey(tr("1")); shortcutZidong->setAutoRepeat(false); connect(shortcutZidong,SIGNAL(activated()),this,SLOT(on_pushButtonZidong_clicked())); shortcutShoudong= new QShortcut(this); shortcutShoudong->setKey(tr("2")); shortcutShoudong->setAutoRepeat(false); connect(shortcutShoudong,SIGNAL(activated()),this,SLOT(on_pushButtonShoudong_clicked())); shortcutJineng= new QShortcut(this); shortcutJineng->setKey(tr("3")); shortcutJineng->setAutoRepeat(false); connect(shortcutJineng,SIGNAL(activated()),this,SLOT(on_pushButtonJineng_clicked())); shortcutZanting= new QShortcut(this); shortcutZanting->setKey(tr(" ")); shortcutZanting->setAutoRepeat(false); connect(shortcutZanting,SIGNAL(activated()),this,SLOT(on_pushButtonPause_clicked())); } MainWindow::~MainWindow() { delete ui; } void MainWindow::showLCD(int a) { int minute=a/60; int second=a%60; QString mString,sString; if(minute<10) mString=QString("0%1").arg(minute); else mString=QString("%1").arg(minute); if(second<10) sString=QString("0%1").arg(second); else sString=QString("%1").arg(second); QString tmp=QString("%1:%2").arg(mString).arg(sString); ui->lcdNumber->display(tmp); } void MainWindow::on_pushButtonZidong_clicked() { pause=false; ui->pushButtonPause->setText("暂停"); if(working) { timer1->stop(); } working=true; end=15; showLCD(end); timer1->start(1000); ui->pushButtonJineng->setEnabled(false); ui->pushButtonShoudong->setEnabled(false); ui->pushButtonZidong->setEnabled(false); ui->pushButtonPause->setEnabled(true); } void MainWindow::on_pushButtonShoudong_clicked() { pause=false; ui->pushButtonPause->setText("暂停"); if(working) { timer1->stop(); } working=true; end=105; showLCD(end); timer1->start(1000); ui->pushButtonJineng->setEnabled(false); ui->pushButtonShoudong->setEnabled(false); ui->pushButtonZidong->setEnabled(false); ui->pushButtonPause->setEnabled(true); } void MainWindow::on_pushButtonJineng_clicked() { pause=false; ui->pushButtonPause->setText("暂停"); if(working) { timer1->stop(); } working=true; end=60; showLCD(end); timer1->start(1000); ui->pushButtonJineng->setEnabled(false); ui->pushButtonShoudong->setEnabled(false); ui->pushButtonZidong->setEnabled(false); ui->pushButtonPause->setEnabled(true); } void MainWindow::timerOut() { end-=1; showLCD(end); if(end==0) { timer1->stop(); ui->pushButtonJineng->setEnabled(true); ui->pushButtonShoudong->setEnabled(true); ui->pushButtonZidong->setEnabled(true); ui->pushButtonPause->setEnabled(false); } } void MainWindow::on_pushButton_clicked() { working=false; timer1->stop(); showLCD(0); ui->pushButtonJineng->setEnabled(true); ui->pushButtonShoudong->setEnabled(true); ui->pushButtonZidong->setEnabled(true); ui->pushButtonPause->setEnabled(false); pause=false; ui->pushButtonPause->setText("暂停"); } void MainWindow::on_pushButtonPause_clicked() { if(!working) return; if(pause) { timer1->start(); pause=false; ui->pushButtonPause->setText("暂停"); }else{ timer1->stop(); pause=true; ui->pushButtonPause->setText("继续"); } }
e0c304ac58fcf00caee2cba7466167e9b6d02c5d
f3d628043cf15afe9c7074035322f850dfbd836d
/codeforces/1538/b/b.cpp
d21bb31fc2babbc5199397fa5d6caed840aab642
[ "MIT" ]
permissive
Shahraaz/CP_S5
6f812c37700400ea8b5ea07f3eff8dcf21a8f468
2cfb5467841d660c1e47cb8338ea692f10ca6e60
refs/heads/master
2021-07-26T13:19:34.205574
2021-06-30T07:34:30
2021-06-30T07:34:30
197,087,890
5
2
null
null
null
null
UTF-8
C++
false
false
801
cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "/debug.h" #else #define db(...) #endif #define all(v) v.begin(), v.end() #define pb push_back using ll = long long; const int NAX = 2e5 + 5, MOD = 1000000007; void solveCase() { int n; cin >> n; vector<ll> a(n); for (auto &x : a) cin >> x; ll sum = accumulate(all(a), 0LL); if (sum % n) { cout << -1 << '\n'; return; } sum /= n; sort(all(a)); vector<int> b; for (auto &x : a) if (x > sum) { b.pb(x); } cout << b.size() << '\n'; } int32_t main() { #ifndef LOCAL ios_base::sync_with_stdio(0); cin.tie(0); #endif int t = 1; cin >> t; for (int i = 1; i <= t; ++i) solveCase(); return 0; }
e8877149d0ecb5a00af3483fa993ee1c733969a3
cde72953df2205c2322aac3debf058bb31d4f5b9
/win10.19042/SysWOW64/kbdibm02.DLL.cpp
9c686be64df98d097bf6712aa8dc07627f225b61
[]
no_license
v4nyl/dll-exports
928355082725fbb6fcff47cd3ad83b7390c60c5a
4ec04e0c8f713f6e9a61059d5d87abc5c7db16cf
refs/heads/main
2023-03-30T13:49:47.617341
2021-04-10T20:01:34
2021-04-10T20:01:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
191
cpp
#print comment(linker, "/export:KbdLayerDescriptor=\"C:\\Windows\\SysWOW64\\kbdibm02.DLL\"") #print comment(linker, "/export:KbdNlsLayerDescriptor=\"C:\\Windows\\SysWOW64\\kbdibm02.DLL\"")
a0faea7fd3fdd7fb8d25b432ec6e90ae0b19f9a9
087d25fadcd330790dc0254ae74779523d4d182b
/Bomberman/Src/GameObjects/Map.cpp
6658b840aa6364cd9108298522638284483eec51
[]
no_license
BenjaminHamon/ClassicBomberman
1d0932ea5e0b6742fc348c2560fe83bd16c2b783
f420659f55dd127955880f50a91dc04503abb6c6
refs/heads/master
2016-09-15T23:00:14.264797
2013-04-10T16:32:04
2013-04-10T16:32:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,248
cpp
#include <Bomberman/Src/GameObjects/Map.h> #include <Bomberman/Src/Rectangle.h> #include <Bomberman/Src/Utils.h> namespace Bomberman { Map::Map(const AssetManager& assets) : GameObject(Rectangle(0, 0, 13 * CellWidth, 13 * CellHeight), 1), mapWidth_(13), mapHeight_(13), cells_() { for (int j = 0; j < mapHeight_; ++j) { for (int i = 0; i < mapWidth_; ++i) { cells_.push_back(MapCell(assets, i * CellWidth, j * CellHeight, (i % 2 == 1) && (j % 2 == 1))); } } } Map::~Map(void) { } void Map::Render(GraphicsManager& graphicsManager) { for (std::vector<MapCell>::iterator it = cells_.begin(); it != cells_.end(); ++it) { it->Render(graphicsManager); } } bool Map::IsCollidingWith(const GameObject& object) const { for (std::vector<MapCell>::const_iterator it = cells_.cbegin(); it != cells_.cend(); ++it) { if (it->IsCollidingWith(object) == true) return true; } return false; } bool Map::IsCollidingWith(const Rectangle& rect) const { return false; //return CanMoveTo(rect); } bool Map::CanMoveTo(const GameObject* movingObject, const Rectangle& position, const std::list<GameObject*>& objects) const { if (IsInMapBounds(position) == false) return false; const MapCell* cell = GetCellFromRealPosition(position.Left(), position.Top()); if (cell->GetIsObstacle() == true) return false; cell = GetCellFromRealPosition(position.Right() - 1, position.Top()); if (cell->GetIsObstacle() == true) return false; cell = GetCellFromRealPosition(position.Left(), position.Bottom() - 1); if (cell->GetIsObstacle() == true) return false; cell = GetCellFromRealPosition(position.Right() - 1, position.Bottom() - 1); if (cell->GetIsObstacle() == true) return false; for (std::list<GameObject*>::const_iterator it = objects.cbegin(); it != objects.cend(); ++it) { if ((*it != movingObject) && ((*it)->IsCollidable() == true) && (*it)->IsCollidingWith(position) == true) return false; } return true; } bool Map::IsInMapBounds(const Rectangle& rectangle) const { return (rectangle.Left() >= 0) && (rectangle.Top() >= 0) && (rectangle.Right() <= (mapWidth_ * CellWidth)) && (rectangle.Bottom() <= (mapHeight_ * CellHeight)); } }
08ffe1b6386f6f93f2288669ba57d0c33146b219
8dde89055d9c161a154f9a1970cd2079b575dff2
/Sparky/src/maths/vec4.h
3cdead0c2c35ac0cd555372e42754ccfd421b1a0
[]
no_license
FrazLaw/GameEngine
1b2ca248869de0f3aed800c448a533aad2c01d70
6133a20f0112f260195c4fcf3010e21a7cfe3e91
refs/heads/master
2023-01-21T07:13:11.605255
2020-12-01T22:05:05
2020-12-01T22:05:05
310,074,257
0
0
null
null
null
null
UTF-8
C++
false
false
897
h
#pragma once #include <iostream> namespace sparky { namespace maths { struct vec4 { float x, y, z, w; vec4(); vec4(const float& x, const float& y, const float& z, const float& w); vec4& add(const vec4& other); vec4& subtract(const vec4& other); vec4& multiply(const vec4& other); vec4& divide(const vec4& other); friend vec4 operator+(vec4 left,const vec4& right); friend vec4 operator-(vec4 left, const vec4& right); friend vec4 operator*(vec4 left, const vec4& right); friend vec4 operator/(vec4 left, const vec4& right); bool operator==(const vec4& other); bool operator!=(const vec4& other); vec4& operator+=(const vec4& other); vec4& operator-=(const vec4& other); vec4& operator*=(const vec4& other); vec4& operator/=(const vec4& other); friend std::ostream& operator<<(std::ostream& stream, const vec4& vector); }; } }
31f4e023a3ca07541eab9b8dcfcb1ee186218653
164e709dcf03ce4769c3ba8f874da0666c35bc03
/include/RtTpsRenderLibrary/tps_rl_antialiased_circle_painter.h
80ece4b231b1cbdd2a086c7b82dd3130a03bb33d
[]
no_license
liq07lzucn/tps
b343894bcfd59a71be48bd47d6eff6e010464457
a3be6dc50c5f9a2ff448ecff3f5df1956e26ad4f
refs/heads/master
2021-06-23T16:35:01.349523
2017-08-30T08:09:02
2017-08-30T08:09:02
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,753
h
//////////////////////////////////////////////////////////////// /// Copyright (c) Shanghai United Imaging Healthcare Inc., 2014 /// All rights reserved. /// /// \author GONG Maoliang [email protected] /// /// \file tps_rl_antialiased_circle_painter.h /// /// \brief class AntialiasedCirclePainter declaration /// /// \version 1.0 /// /// \date 2014/12/11 //////////////////////////////////////////////////////////////// #ifndef TPS_RL_ANTIALIASED_CIRCLE_PAINTER_H_ #define TPS_RL_ANTIALIASED_CIRCLE_PAINTER_H_ #include "tps_rl_defs.h" TPS_BEGIN_NAMESPACE // begin namespace tps class GLProgram; /// \class AntialiasedCirclePainter /// /// \brief ***** class TPS_RL_DECLSPEC AntialiasedCirclePainter{ public: //the constructor and destructor AntialiasedCirclePainter(); ~AntialiasedCirclePainter(); bool Initialize(); //void SetMVPMatrix(const Mcsf::MedViewer3D::Matrix4x4& mvp); //the screen coordinate(pixel unit), centers(x, y), radius(x), colors(r, g, b) void SetParas(float* centers, float* radius, float* colors, bool* isFilledFlag, int count, bool drawShadow = true); void Render(); private: bool mInitialized; int mCount; bool mDrawShadow; GLProgram* mProgram; unsigned int mVAOID; unsigned int mUniformLocations[7]; unsigned int mTexID[4]; unsigned int mBufferID[2]; private: // the default copy and assign method are not allowed. TPS_DISALLOW_COPY_AND_ASSIGN(AntialiasedCirclePainter); }; TPS_END_NAMESPACE // end namespace tps #endif
2c065283ee1810f08c132b9d5d25202ef4f2a8cd
c72b312147605e56a05e621cdad8eb59ced763fd
/A7/Q7.cpp
15d28ac6ef772890287d97dfddab639f871e87ee
[]
no_license
amritpalsingh123/cpp-assignment
59039bf6b873e6e5c98bc628ca63aec48f73dcec
2f2a120418797d0cbbff3800fd5733a6a6b9641b
refs/heads/master
2023-02-06T19:34:19.699312
2020-12-07T00:33:20
2020-12-07T00:33:20
295,268,342
0
0
null
null
null
null
UTF-8
C++
false
false
2,532
cpp
// Assignment 7.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <string> #include <iostream> #include <cstdio> using namespace std; class Student { protected: string student_name; string student_number; int age; public: Student() {} Student(string name,string number,int year) { this->student_name = name; this->student_number; this->age = age; } void printStudent() { cout << "Student Name:" << student_name << endl; cout << "Student Number:" << student_number << endl; cout << "Student Age: " << age << endl; } string getStudentName() { return student_name; } string getStudentNumber() { return student_number; } int getStudentAge() { return age; } }; class KpuStudent : public Student { protected: string major; string campus; int year; public: KpuStudent() :Student() {} KpuStudent(string name, string number, int age, string m, string c, int year) :Student(name, number, age) { this->major = m; this->campus = c; this->year = year; } void setKpuStudent(string name, string number, int age, string m, string c, int year) { this->major = m; this->campus = c; this->year = year; Student(name, number, age); } void printKpuStudent() { cout << "===================Details for KpuStudent=============" << endl; printStudent(); cout << "Major:" << major << endl; cout << "campus" << campus << endl; cout << "Year" << year << endl; cout << "=============End==============" << endl; } string getMajor() { return major; } string getCampus() { return campus; } int getYear() { return year; } }; int main() { //input from constructor KpuStudent ks("Sam","100385307" "Computer Information system", 2020); ks.printKpuStudent(); Student s("John", "100385307", 23); cout << endl; cout << "Age of" << s.getStudentName() << " is:" << s.getStudentAge() << endl; cout << "Age of" <<ks.getStudentName() << " is:" << ks.getStudentAge() << endl; cout << endl; KpuStudent ks2; string sname, snumber, ksmajor, kscampus; int sage, ksyear; cout << "Enter Your Name:"; getline(cin, sname);//used to get a string in console with space cout << "Enter Your Student number:"; cin >> snumber; cout <<"Enter Your Age:"; cin >> sage; cout << "Enter Your Major:"; cin >> ksmajor; cout << "Enter Your Campus:"; cin >> kscampus; cout << "Enter Your Year:"; cin >> ksyear; //input from function ks2.setKpuStudent(sname, snumber, sage, ksmajor, kscampus, ksyear); ks2.printKpuStudent(); }
54dd358da8ce8775407edb1075432c2641ab5092
bbe0fdc391b325ec0ec6cb899f133a2b7ffacd14
/cs215s17/Lab12/card.cpp
97b6c96a9074d4ea8f216455fea84a986fc79d9a
[]
no_license
juanm707/SonomaStateCourseWork
fe9795c0c268628a64aafa4643a89426f13f6b34
970123554d5ac692547fc3c09faea52670844d60
refs/heads/master
2023-05-25T17:56:33.791972
2020-05-13T08:14:24
2020-05-13T08:14:24
263,552,635
2
0
null
2023-05-22T22:19:27
2020-05-13T07:09:04
Python
UTF-8
C++
false
false
1,622
cpp
#include "card.h" card::card () { rank = suit = '?'; sortval = 0; } card::card (const card & other) { rank = other.rank; suit = other.suit; sortval = other.sortval; } card::~card () { } card & card::operator = (const card & other) { if (this == &other) return * this; rank = other.rank; suit = other.suit; sortval = other.sortval; return * this; } bool card::operator == (const card & other) const { return sortval == other.sortval; } bool card::operator != (const card & other) const { return sortval != other.sortval; } bool card::operator < (const card & other) const { return sortval < other.sortval; } bool card::operator > (const card & other) const { return sortval > other.sortval; } bool card::operator <= (const card & other) const { return sortval <= other.sortval; } bool card::operator >= (const card & other) const { return sortval >= other.sortval; } istream & operator >> (istream & ins, card & C) { card T; ins >> T.rank; ins >> T.suit; T.evaluate(); if (T.sortval) C = T; else ins.setstate(ios::failbit); return ins; return ins; } ostream & operator << (ostream & outs, const card & C) { outs << C.rank << C.suit; return outs; } void card::evaluate () { rank = toupper(rank); suit = toupper(suit); sortval = 0; char r[] = {'A','2','3','4','5','6','7','8','9','T','J','Q','K'}; char s[] = {'C', 'D', 'H', 'S'}; int i; for (i = 0; i < 13 && rank != r[i]; i++); sortval = (i+1) * 100; for (i = 0; i < 4 && suit != s[i]; i++); sortval += i+1; if (sortval / 100 < 1 || sortval / 100 > 13 || sortval % 100 < 1 || sortval % 100 > 4) sortval = 0; }
9b4b593a835a6e79c8180a32b816e3f0f3684e54
1836b579333725b8b38422e8388aea26f8e60201
/src/choco/choco_test.cpp
e39ad950a11773ec202e0b89653410195f565a1c
[]
no_license
decster/choco
9c74260672fd07d3e01c0096bacf738cf74471b6
640d3f31848952bf65685181fd3f24decabc25df
refs/heads/master
2022-04-22T02:02:03.298543
2020-04-23T02:43:59
2020-04-23T02:43:59
257,894,521
0
0
null
null
null
null
UTF-8
C++
false
false
263
cpp
#include "gtest/gtest.h" #include "common.h" int main(int argc, char** argv) { google::InitGoogleLogging(argv[0]); google::InstallFailureSignalHandler(); google::LogToStderr(); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }
efa273b2acfccfb1377ab65ef63b78067d8ff3ea
58f60306f9f5638fbb23ec8b6ff896c191da48d4
/3rd_party/asio/src/tests/unit/serial_port_base.cpp
3949761a02ba3302c5a36c572a239c0d0c30b5be
[ "BSL-1.0", "MIT" ]
permissive
mojmir-svoboda/BlackBoxTT
650cd9da608a9909da32dc88a362affe3df50320
0c87b989827107695538e1bf1266c08b083dda44
refs/heads/master
2021-01-23T22:00:11.999135
2018-01-04T20:54:42
2018-01-04T20:54:42
58,350,784
11
3
null
null
null
null
UTF-8
C++
false
false
2,795
cpp
// // serial_port_base.cpp // ~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. ([email protected]) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // Disable autolinking for unit tests. #if !defined(BOOST_ALL_NO_LIB) #define BOOST_ALL_NO_LIB 1 #endif // !defined(BOOST_ALL_NO_LIB) // Test that header file is self-contained. #include "asio/serial_port_base.hpp" #include "asio/io_context.hpp" #include "asio/serial_port.hpp" #include "unit_test.hpp" //------------------------------------------------------------------------------ // serial_port_base_compile test // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Verify that all options and and their accessors compile. Runtime failures are // ignored. namespace serial_port_base_compile { void test() { #if defined(ASIO_HAS_SERIAL_PORT) using namespace asio; try { io_context ioc; serial_port port(ioc); // baud_rate class. serial_port_base::baud_rate baud_rate1(9600); port.set_option(baud_rate1); serial_port_base::baud_rate baud_rate2; port.get_option(baud_rate2); (void)static_cast<unsigned int>(baud_rate2.value()); // flow_control class. serial_port_base::flow_control flow_control1( serial_port_base::flow_control::none); port.set_option(flow_control1); serial_port_base::flow_control flow_control2; port.get_option(flow_control2); (void)static_cast<serial_port_base::flow_control::type>( flow_control2.value()); // parity class. serial_port_base::parity parity1(serial_port_base::parity::none); port.set_option(parity1); serial_port_base::parity parity2; port.get_option(parity2); (void)static_cast<serial_port_base::parity::type>(parity2.value()); // stop_bits class. serial_port_base::stop_bits stop_bits1(serial_port_base::stop_bits::one); port.set_option(stop_bits1); serial_port_base::stop_bits stop_bits2; port.get_option(stop_bits2); (void)static_cast<serial_port_base::stop_bits::type>(stop_bits2.value()); // character_size class. serial_port_base::character_size character_size1(8); port.set_option(character_size1); serial_port_base::character_size character_size2; port.get_option(character_size2); (void)static_cast<unsigned int>(character_size2.value()); } catch (std::exception&) { } #endif // defined(ASIO_HAS_SERIAL_PORT) } } // namespace serial_port_base_compile //------------------------------------------------------------------------------ ASIO_TEST_SUITE ( "serial_port_base", ASIO_TEST_CASE(serial_port_base_compile::test) )
b5eeafd345243709d800c74d4533959d9f66445d
30bdd8ab897e056f0fb2f9937dcf2f608c1fd06a
/Implementation/2674.cpp
634c2731b60ae627321b134169c5d735fae85c87
[]
no_license
thegamer1907/Code_Analysis
0a2bb97a9fb5faf01d983c223d9715eb419b7519
48079e399321b585efc8a2c6a84c25e2e7a22a61
refs/heads/master
2020-05-27T01:20:55.921937
2019-11-20T11:15:11
2019-11-20T11:15:11
188,403,594
2
1
null
null
null
null
UTF-8
C++
false
false
5,406
cpp
#include <bits/stdc++.h> using namespace std; #define clr(x , v) memset(x , v , sizeof(x)) #define debug(x) cerr << "line" << __LINE__ << ": " << #x << " = " << (x) << endl #define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end + 1) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end))) #define gt() (p1 == p2 && (p2 = (p1 = buf) + fread(buf , 1 , 100000 , stdin) , p1 == p2) ? EOF : *p1++) #define INF 1000000007 #define DOUBLEFORMAT "%f" #define pb push_back #define whole(a) a.begin(), a.end() #define argmax(a) (max_element(whole(a)) - (a).begin()) #define argmin(a) (min_element(whole(a)) - (a).begin()) #define tthti template<typename Head, typename... Tail> inline #define ttt12i template<typename T1, typename T2> inline #define ttti template<typename T> inline #define error(args...) {err(split(#args,',').begin(),args);} template <class Head, class... Tail> inline void writeln (Head head, Tail... tail); template <class Head, class... Tail> inline void writeln2(Head head, Tail... tail); template <class Head, class... Tail> inline void readln (Head& head, Tail&... tail); template <class Head, class... Tail> inline void read (Head& head, Tail&... tail); template <class Head, class... Tail> inline void print (Head& head, Tail&... tail); template <class Type1, class Type2> inline void print (pair<Type1, Type2>& p); template <class Type1, class Type2> inline void print_no_space(pair<Type1, Type2>& p); template <class Head, class... Tail> inline void print_no_space(Head& head, Tail&... tail); void inline writeln() {printf("\n");} void inline writeln2(){printf("\n");} void inline readln() {} void err(vector<string>::iterator it){++it;} tthti void err(vector<string>::iterator it,Head head,Tail...tail){writeln((*it).substr((*it)[0]==' ',INF),"=",head);err(++it, tail...);} vector<string>split(const string&s,char c){vector<string>v;stringstream ss(s);string x;while(getline(ss,x,c))v.pb(x);return move(v);} static char buf[100000] , *p1 = buf , *p2 = buf; static const int MAXN = 1e5 + 10; static const int OO = 0x3fffffff; typedef int ret_type; typedef long long ll; ret_type read1(){ ret_type ret = 0; char ch = gt(); while(ch < '0' || ch > '9') ch = gt(); while(ch >= '0' && ch <= '9') ret = ret * 10 + ch - '0' , ch = gt(); return ret; } /*-------------------------------*/ int n; int gift[MAXN]; int main(){ #ifdef ONLINE_JUDGE #else freopen("in.data","r",stdin); //freopen("out.data","w",stdout); #endif readln(n); rep(i , 1 , n) {int p = read1(); gift[p] = i; } rep(i , 1 , n) { printf("%d " , gift[i]); }puts(""); return 0; } inline void print(double a){printf(" " DOUBLEFORMAT,a);} inline void print(int a){printf(" %d",a);} inline void print(const char* a){printf(" %s",a);} inline void print(string a){printf(" %s",a.c_str());} inline void print(long long a){printf(" %lld",a);} inline void print(long a){printf(" %ld",a);} inline void print(unsigned long a){printf(" %ld",a);} inline void print(unsigned int a){printf(" %d",a);} inline void print(char a){printf(" %c",a);} inline void print_no_space(double a){printf(DOUBLEFORMAT, a);} inline void print_no_space(int a){printf("%d", a);} inline void print_no_space(const char* a){printf("%s", a);} inline void print_no_space(string a){printf("%s", a.c_str());} inline void print_no_space(long a){printf("%ld", a);} inline void print_no_space(long long a){printf("%lld", a);} inline void print_no_space(unsigned long a){printf("%ld", a);} inline void print_no_space(unsigned int a){printf("%d", a);} inline void print_no_space(char a){printf("%c", a);} template<class Type> inline void print(vector<Type>& a){for(register int i=0;i<(int)a.size();++i)print(a[i]);} template<class Type> inline void print(vector<vector<Type> >& a){if(a.size())(a.size()==1)?print(a[0]):writeln2(a[0]);for(register int i=1;i<(int)a.size()-1;++i)writeln2(a[i]);if(a.size()>=2)print_no_space(a.back());} template<class Type> inline void print_no_space(vector<Type>& a){if(a.size())print_no_space(a[0]);for(register int i=1;i<(int)a.size();++i)print(a[i]);} template<class Type> inline void print_no_space(vector<vector<Type> >&a){for(register int i=0;i<(int)a.size()-1;++i)writeln(a[i]);if(a.size())print_no_space(a.back());} template<class Type1, class Type2> inline void print_no_space(pair<Type1, Type2>&a){print_no_space(a.first); writeln2(a.second);} template<class Type1, class Type2> inline void print(pair<Type1, Type2>& a) {print_no_space(a.first); writeln2(a.second);} template <class Head, class... Tail> inline void writeln2(Head head, Tail... tail){print(head);writeln2(tail...);} template <class Head, class... Tail> inline void writeln(Head head, Tail... tail){print_no_space(head);writeln2(tail...);} inline void read(double &a){scanf("%lf",&a);} inline void read(int &a){scanf("%d",&a);} inline void read(string &a){cin>>a;} inline void read(long long &a){scanf("%lld",&a);} inline void read(char &a){scanf("%c",&a);} template<class Type1, class Type2> inline void read(pair<Type1, Type2>&a){readln(a.first, a.second);} template<class Type> inline void read(vector<Type> &a){if(a.size()==0){int n;read(n);a.resize(n);}for(register int i=0;i<(int)a.size();++i)readln(a[i]);} template <class Head,class... Tail> inline void readln(Head& head,Tail&... tail){read(head);readln(tail...);}
147a45f1b6c2ad5b6c06f3841ee766e187b2ffb6
b37d65854f9d0795580d4374dcf98f40a2840b98
/src/ds/triple.hpp
26f8ddfef1fe41f6923f827c40c42a104f9c9d9f
[ "BSD-3-Clause" ]
permissive
hmofrad/Graphite
c089389ee88cff3a4ad7fa967b1782cd954fadc1
eff39ab81d7aa8d718e06be1dffdf234e2834f29
refs/heads/master
2021-07-10T20:31:51.228944
2020-07-06T01:22:10
2020-07-06T01:22:10
168,009,534
4
0
null
null
null
null
UTF-8
C++
false
false
2,732
hpp
/* * triple.hpp: Triple data structure implementation * (c) Mohammad Hasanzadeh Mofrad, 2019 * (e) [email protected] */ #ifndef TRIPLE_HPP #define TRIPLE_HPP template <typename Weight, typename Integer_Type = uint32_t> struct Triple { Integer_Type row; Integer_Type col; Weight weight; Triple(Integer_Type row = 0, Integer_Type col = 0, Weight weight = 0); ~Triple(); void set_weight(Weight& w); Weight get_weight(); }; template <typename Weight, typename Integer_Type> Triple<Weight, Integer_Type>::Triple(Integer_Type row, Integer_Type col, Weight weight) : row(row), col(col), weight(weight) {}; template <typename Weight, typename Integer_Type> Triple<Weight, Integer_Type>::~Triple() {}; template <typename Weight, typename Integer_Type> void Triple<Weight, Integer_Type>::set_weight(Weight& w) { weight = w; } template <typename Weight, typename Integer_Type> Weight Triple<Weight, Integer_Type>::get_weight() { return(weight); } /* Triples with empty weight */ struct Empty {}; template <typename Integer_Type> struct Triple <Empty, Integer_Type> { Integer_Type row; union { Integer_Type col; Empty weight; }; void set_weight(Empty& w) {}; bool get_weight() {return(true);}; }; /* * Functor for passing to std::sort * It sorts the Triples using their row index * and then their column index */ template <typename Weight, typename Integer_Type> struct RowSort { bool operator()(const struct Triple<Weight, Integer_Type>& a, const struct Triple<Weight, Integer_Type>& b) { #ifdef HAS_WEIGHT if(a.row < b.row) return(true); if(b.row < a.row) return(false); // a == b if(a.weight < b.weight) return(true); if(b.weight < a.weight) return(false); #else return((a.row == b.row) ? (a.col < b.col) : (a.row < b.row)); #endif return(false); // To suppress -Wreturn-type } }; template <typename Weight, typename Integer_Type> struct ColSort { bool operator()(const struct Triple<Weight, Integer_Type>& a, const struct Triple<Weight, Integer_Type>& b) { #ifdef HAS_WEIGHT if(a.col < b.col) return(true); if(b.col < a.col) return(false); if(a.weight < b.weight) return(true); if(b.weight < a.weight) return(false); #else return((a.col == b.col) ? (a.row < b.row) : (a.col < b.col)); #endif return(false); // To suppress -Wreturn-type } }; #endif
c3a2cf50e25f8d48de2b46b44e4ae11f95fd6354
be3736d7c5ca549609d9a46b0b01dd1b7f52c04e
/cmake_public_depend.cpp
42a2a13a358f1868af31e66cc482e68f3f642f62
[]
no_license
ally3999/CMaizePublicDepend
acade122f6a339cb5cf5d8ab880d094e469fd8ef
4846af1d8b344b7e17f7bc9a80101f3dd2624032
refs/heads/master
2022-12-30T18:33:01.766568
2020-10-21T03:52:47
2020-10-21T03:52:47
286,499,226
0
0
null
2020-08-10T14:34:55
2020-08-10T14:34:54
null
UTF-8
C++
false
false
130
cpp
#include "cmake_public_depend.hpp" #include <cmake_public.hpp> int call_cmake_public_depend(){ return call_cmake_public()+2; }
ddb8f7e7106f3fee8f6a5f442d78f223a968adbd
58042988f4737b66a4208722edb0c39ac617e33c
/libraries/L3GGyroscope/L3GGyroscope.cpp
f30d4d32ca9f997586fdacfa968a477189cb9e25
[]
no_license
rcywongaa/FYP_Client
ac29d329d82128f6805019b75dfd55482f5dab86
d00246ff2de1d122251dfa10cf352a12dbe4e968
refs/heads/master
2016-09-11T00:36:18.859564
2015-05-08T16:51:39
2015-05-08T16:51:39
24,409,403
0
0
null
null
null
null
UTF-8
C++
false
false
1,732
cpp
#include "L3GGyroscope.h" #define ALPHA 1 Gyroscope::Gyroscope():I2CDevice(){ addr = 0x69; } Gyroscope::Gyroscope(uint8_t sdaPin, uint8_t sclPin):I2CDevice(sdaPin, sclPin){ addr = 0x69; } void Gyroscope::init(){ ByteWrite(addr, 0x20, 0xFF); ByteWrite(addr, 0x21, 0x00); ByteWrite(addr, 0x22, 0x00); ByteWrite(addr, 0x23, 0x10); ByteWrite(addr, 0x24, 0x00); delay(50); } void Gyroscope::update(){ raw = ByteRead6(addr, 0x28); } floatVec3 Gyroscope::getRaw(){ return raw; } floatVec3 Gyroscope::getFiltered(){ curr = raw; curr.x = (1-ALPHA)*prev.x + ALPHA*curr.x; curr.y = (1-ALPHA)*prev.y + ALPHA*curr.y; curr.z = (1-ALPHA)*prev.z + ALPHA*curr.z; prev = curr; return curr; } floatVec3 Gyroscope::ByteRead6(int I2C_Address, int Reg_Address){ floatVec3 result; if (isCustom){ i2c.beginTransmission(I2C_Address); i2c.send(byte(Reg_Address) | 0x80); i2c.endTransmission(); i2c.requestFrom(I2C_Address); result.x = i2c.receive(1) | (i2c.receive(1) << 8); result.y = i2c.receive(1) | (i2c.receive(1) << 8); result.z = i2c.receive(1) | (i2c.receive(0) << 8); i2c.endTransmission(); } else { Wire.beginTransmission(I2C_Address); Wire.write(byte(Reg_Address)); Wire.endTransmission(); Wire.requestFrom(I2C_Address, 6); result.x = Wire.read() | (Wire.read() << 8); result.y = Wire.read() | (Wire.read() << 8); result.z = Wire.read() | (Wire.read() << 8); } //Convert results to radians per second result.x *= 17.5/1000.0; result.y *= 17.5/1000.0; result.z *= 17.5/1000.0; result = degToRad(result); return result; } /***************** Deprecated *****************/ floatVec3 Gyroscope::getVal(){ return ByteRead6(addr, 0x28); } /**********************************************/
d051b52e8a797bb3188a411ec2d4aee4be002cad
8ad84e8c9ff528394cfaa36120a1f8a37a16f558
/qt/signal_slot/worker.cpp
c9416df7d61c9e7ed69f89322d1913d175f5a6e7
[]
no_license
cellist/dev
30378d031cbf2cc4ca23d8bdcd831679d6417786
3b59f54cafb2cfe97ff90caf127e165d866b9280
refs/heads/master
2023-08-19T03:43:30.494172
2023-08-12T14:43:46
2023-08-12T14:43:46
1,159,225
1
0
null
null
null
null
UTF-8
C++
false
false
327
cpp
#include <unistd.h> #include <QDebug> #include "worker.h" void Worker::doWork(const QString &parameter) { qDebug() << "Worker thread commences work."; QString result = QString::number(sleep(3)); qDebug() << "Worker thread done, sending result ready signal, result is: " << result; emit resultReady(result); }
0143789b15e21d04edc1b9f56d6c2826dd0215df
9a3f51d2a68d926ac7d69216da9a58fc6f0855cf
/John Welsby Game Lvl Assignment 2009/Lighting UI Skybox Tute starter/zSingleton.h
e8799e2bec1a4aa8fd15d94a38eafb21c13a0d73
[]
no_license
LogicalUnit/AIE_Portfolio
7bbe566568cb2f367760da8e846bf1a5ceb9cf9d
4ee3e431b621f0f8614e2b462b2fba77adc88e39
refs/heads/master
2020-06-14T03:23:27.775550
2016-12-04T02:47:25
2016-12-04T02:47:25
75,511,725
0
0
null
null
null
null
UTF-8
C++
false
false
1,589
h
#pragma once //! The zSingleton class is a template class for creating singleton objects. /*! When the static Instance() method is called for the first time, the singleton object is created. Every sequential call returns a reference to this instance. The class instance can be destroyed by calling the DestroyInstance() method. */ template <class T> class zSingleton { public: //! Gets a reference to the instance of the singleton class. /*! \return A reference to the instance of the singleton class. If there is no instance of the class yet, one will be created. */ static T* Instance() { if (m_instance == NULL) m_instance = new T; // assert(m_instance != NULL); return m_instance; }; //! Destroys the singleton class instance. /*! Be aware that all references to the single class instance will be invalid after this method has been executed! */ static int DestroyInstance() { delete m_instance; m_instance = NULL; return 0; }; protected: // shield the constructor and destructor to prevent outside sources // from creating or destroying a zSingleton instance. //! Default constructor. zSingleton() { }; //! Destructor. virtual ~zSingleton() { }; private: //! Copy constructor. zSingleton(const zSingleton& source) { }; static T* m_instance; //!< singleton class instance }; //! static class member initialisation. template <class T> T* zSingleton<T>::m_instance = NULL;
7499a248b538f9bc3bf43aee56d26e3a3f888e42
313709ee499c1440f2e2ba215cd7db45feea8d9a
/Алгоритмы и структуры данных/Лабораторная №6/Unit1.cpp
dfec575c3b7d3f259954119becc3e41a2a3cbaae
[]
no_license
Group2Project/universityLabs
9c933c62b088d0df2a83945c02ede46c32c16a57
0d1a785af937fd0d08750d0725ef8e257ee9fa35
refs/heads/master
2021-01-25T04:52:45.092891
2015-06-07T13:26:36
2015-06-07T13:26:36
31,965,191
0
0
null
null
null
null
WINDOWS-1251
C++
false
false
3,778
cpp
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include <ctime> #include <vector.h> #include <fstream.h> #include <math.h> #include "Unit1.h" vector<int> hash_tab; vector<int> source_mas; //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma link "CSPIN" #pragma resource "*.dfm" TForm1 *Form1; int _hash(int,int); void incr_vec(vector<int> *,int); //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm1::Button1Click(TObject *Sender) { ifstream F; F.open("rand.txt"); while(!F.eof()) { int a; F >> (int)a; source_mas.push_back(a); } F.close(); int l = 0; for(unsigned int i=0;i<source_mas.size();i++) { unsigned int hash_sum = _hash(source_mas[i],l); if(hash_sum >= hash_tab.size()) { incr_vec(&hash_tab,hash_sum); hash_tab.at(hash_sum)=source_mas.at(i); continue; } if(hash_tab[hash_sum]!=NULL) { l++; i--; continue; } else { hash_tab.at(hash_sum)=source_mas.at(i); l=0; continue; } } ofstream f1; f1.open("rand1.txt"); for(unsigned int i=0;i<hash_tab.size();i++) { int r; r = hash_tab[i]; f1 << r << '\n'; } f1.close(); } //--------------------------------------------------------------------------- int _hash(int k,int i) { double gold_sec = (1+sqrt(5))/2.0; double h = k*gold_sec + 3*i + 5*i*i; int m(0); while(k>0) { m++; k/=10; } int h1 =(int)h; h -=h1; for(int j=0;j<m;j++) h*=10; return (int)h; } //---------------------------------------------------------------------------- void incr_vec(vector<int> *a,int k) { int r = k - a->size(); if(!r) { a->push_back(NULL); return; } for(int i=0;i<=r;i++) a->push_back(NULL); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button2Click(TObject *Sender) { if(hash_tab.size()) { int n = CSpinEdit1->Value; int l=0; int r = _hash(n,l); int m = hash_tab[r]; for(;;) { if(hash_tab[r] && hash_tab[r]==n) { ShowMessage("Число найдено"); return; } if(hash_tab[r] && hash_tab[r]!=n) { l++; r = _hash(n,l); } if(!hash_tab[r]) { ShowMessage("Совпадения не найдены"); return; } } } } //---------------------------------------------------------------------------
8c6848a20afe4318b881c37e81daf7668c38a83f
3de7b6397b754a87a070c24232bd4b12508c1d99
/arm-cortex_a8-linux-gnueabihf/include/c++/4.8.4/arm-cortex_a8-linux-gnueabihf/bits/c++config.h
691a9383325f1faf541ac4d0781f0f6a988427bb
[]
no_license
yzr1989/arm-cortex_a8-linux-gnueabihf
c049a3efe3384fcfb81c58cc2a001f1b22a093fc
ff28056a7103633622d31cc1c106e7620eb555f3
refs/heads/master
2020-06-16T00:42:54.449360
2017-01-17T05:14:55
2017-01-17T05:14:55
75,255,687
0
0
null
null
null
null
UTF-8
C++
false
false
48,060
h
// Predefined symbols and macros -*- C++ -*- // Copyright (C) 1997-2013 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library 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, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/c++config.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iosfwd} */ #ifndef _GLIBCXX_CXX_CONFIG_H #define _GLIBCXX_CXX_CONFIG_H 1 // The current version of the C++ library in compressed ISO date format. #define __GLIBCXX__ 20141219 // Macros for various attributes. // _GLIBCXX_PURE // _GLIBCXX_CONST // _GLIBCXX_NORETURN // _GLIBCXX_NOTHROW // _GLIBCXX_VISIBILITY #ifndef _GLIBCXX_PURE # define _GLIBCXX_PURE __attribute__ ((__pure__)) #endif #ifndef _GLIBCXX_CONST # define _GLIBCXX_CONST __attribute__ ((__const__)) #endif #ifndef _GLIBCXX_NORETURN # define _GLIBCXX_NORETURN __attribute__ ((__noreturn__)) #endif // See below for C++ #ifndef _GLIBCXX_NOTHROW # ifndef __cplusplus # define _GLIBCXX_NOTHROW __attribute__((__nothrow__)) # endif #endif // Macros for visibility attributes. // _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY // _GLIBCXX_VISIBILITY # define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1 #if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY # define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V))) #else // If this is not supplied by the OS-specific or CPU-specific // headers included below, it will be defined to an empty default. # define _GLIBCXX_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY(V) #endif // Macros for deprecated attributes. // _GLIBCXX_USE_DEPRECATED // _GLIBCXX_DEPRECATED #ifndef _GLIBCXX_USE_DEPRECATED # define _GLIBCXX_USE_DEPRECATED 1 #endif #if defined(__DEPRECATED) && (__cplusplus >= 201103L) # define _GLIBCXX_DEPRECATED __attribute__ ((__deprecated__)) #else # define _GLIBCXX_DEPRECATED #endif // Macros for ABI tag attributes. #ifndef _GLIBCXX_ABI_TAG_CXX11 # define _GLIBCXX_ABI_TAG_CXX11 __attribute ((__abi_tag__ ("cxx11"))) #endif #if __cplusplus // Macro for constexpr, to support in mixed 03/0x mode. #ifndef _GLIBCXX_CONSTEXPR # if __cplusplus >= 201103L # define _GLIBCXX_CONSTEXPR constexpr # define _GLIBCXX_USE_CONSTEXPR constexpr # else # define _GLIBCXX_CONSTEXPR # define _GLIBCXX_USE_CONSTEXPR const # endif #endif // Macro for noexcept, to support in mixed 03/0x mode. #ifndef _GLIBCXX_NOEXCEPT # if __cplusplus >= 201103L # define _GLIBCXX_NOEXCEPT noexcept # define _GLIBCXX_USE_NOEXCEPT noexcept # define _GLIBCXX_THROW(_EXC) # else # define _GLIBCXX_NOEXCEPT # define _GLIBCXX_USE_NOEXCEPT throw() # define _GLIBCXX_THROW(_EXC) throw(_EXC) # endif #endif #ifndef _GLIBCXX_NOTHROW # define _GLIBCXX_NOTHROW _GLIBCXX_USE_NOEXCEPT #endif #ifndef _GLIBCXX_THROW_OR_ABORT # if __EXCEPTIONS # define _GLIBCXX_THROW_OR_ABORT(_EXC) (throw (_EXC)) # else # define _GLIBCXX_THROW_OR_ABORT(_EXC) (__builtin_abort()) # endif #endif // Macro for extern template, ie controling template linkage via use // of extern keyword on template declaration. As documented in the g++ // manual, it inhibits all implicit instantiations and is used // throughout the library to avoid multiple weak definitions for // required types that are already explicitly instantiated in the // library binary. This substantially reduces the binary size of // resulting executables. // Special case: _GLIBCXX_EXTERN_TEMPLATE == -1 disallows extern // templates only in basic_string, thus activating its debug-mode // checks even at -O0. # define _GLIBCXX_EXTERN_TEMPLATE 1 /* Outline of libstdc++ namespaces. namespace std { namespace __debug { } namespace __parallel { } namespace __profile { } namespace __cxx1998 { } namespace __detail { } namespace rel_ops { } namespace tr1 { namespace placeholders { } namespace regex_constants { } namespace __detail { } } namespace tr2 { } namespace decimal { } namespace chrono { } namespace placeholders { } namespace regex_constants { } namespace this_thread { } } namespace abi { } namespace __gnu_cxx { namespace __detail { } } For full details see: http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaces.html */ namespace std { typedef __SIZE_TYPE__ size_t; typedef __PTRDIFF_TYPE__ ptrdiff_t; #if __cplusplus >= 201103L typedef decltype(nullptr) nullptr_t; #endif } // Defined if inline namespaces are used for versioning. # define _GLIBCXX_INLINE_VERSION 0 // Inline namespace for symbol versioning. #if _GLIBCXX_INLINE_VERSION namespace std { inline namespace __7 { } namespace rel_ops { inline namespace __7 { } } namespace tr1 { inline namespace __7 { } namespace placeholders { inline namespace __7 { } } namespace regex_constants { inline namespace __7 { } } namespace __detail { inline namespace __7 { } } } namespace tr2 { inline namespace __7 { } } namespace decimal { inline namespace __7 { } } namespace chrono { inline namespace __7 { } } namespace placeholders { inline namespace __7 { } } namespace regex_constants { inline namespace __7 { } } namespace this_thread { inline namespace __7 { } } namespace __detail { inline namespace __7 { } } } namespace __gnu_cxx { inline namespace __7 { } namespace __detail { inline namespace __7 { } } } # define _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __7 { # define _GLIBCXX_END_NAMESPACE_VERSION } #else # define _GLIBCXX_BEGIN_NAMESPACE_VERSION # define _GLIBCXX_END_NAMESPACE_VERSION #endif // Inline namespaces for special modes: debug, parallel, profile. #if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL) \ || defined(_GLIBCXX_PROFILE) namespace std { // Non-inline namespace for components replaced by alternates in active mode. namespace __cxx1998 { #if _GLIBCXX_INLINE_VERSION inline namespace __7 { } #endif } // Inline namespace for debug mode. # ifdef _GLIBCXX_DEBUG inline namespace __debug { } # endif // Inline namespaces for parallel mode. # ifdef _GLIBCXX_PARALLEL inline namespace __parallel { } # endif // Inline namespaces for profile mode # ifdef _GLIBCXX_PROFILE inline namespace __profile { } # endif } // Check for invalid usage and unsupported mixed-mode use. # if defined(_GLIBCXX_DEBUG) && defined(_GLIBCXX_PARALLEL) # error illegal use of multiple inlined namespaces # endif # if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_DEBUG) # error illegal use of multiple inlined namespaces # endif # if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_PARALLEL) # error illegal use of multiple inlined namespaces # endif // Check for invalid use due to lack for weak symbols. # if __NO_INLINE__ && !__GXX_WEAK__ # warning currently using inlined namespace mode which may fail \ without inlining due to lack of weak symbols # endif #endif // Macros for namespace scope. Either namespace std:: or the name // of some nested namespace within it corresponding to the active mode. // _GLIBCXX_STD_A // _GLIBCXX_STD_C // // Macros for opening/closing conditional namespaces. // _GLIBCXX_BEGIN_NAMESPACE_ALGO // _GLIBCXX_END_NAMESPACE_ALGO // _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // _GLIBCXX_END_NAMESPACE_CONTAINER #if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PROFILE) # define _GLIBCXX_STD_C __cxx1998 # define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER \ namespace _GLIBCXX_STD_C { _GLIBCXX_BEGIN_NAMESPACE_VERSION # define _GLIBCXX_END_NAMESPACE_CONTAINER \ _GLIBCXX_END_NAMESPACE_VERSION } # undef _GLIBCXX_EXTERN_TEMPLATE # define _GLIBCXX_EXTERN_TEMPLATE -1 #endif #ifdef _GLIBCXX_PARALLEL # define _GLIBCXX_STD_A __cxx1998 # define _GLIBCXX_BEGIN_NAMESPACE_ALGO \ namespace _GLIBCXX_STD_A { _GLIBCXX_BEGIN_NAMESPACE_VERSION # define _GLIBCXX_END_NAMESPACE_ALGO \ _GLIBCXX_END_NAMESPACE_VERSION } #endif #ifndef _GLIBCXX_STD_A # define _GLIBCXX_STD_A std #endif #ifndef _GLIBCXX_STD_C # define _GLIBCXX_STD_C std #endif #ifndef _GLIBCXX_BEGIN_NAMESPACE_ALGO # define _GLIBCXX_BEGIN_NAMESPACE_ALGO #endif #ifndef _GLIBCXX_END_NAMESPACE_ALGO # define _GLIBCXX_END_NAMESPACE_ALGO #endif #ifndef _GLIBCXX_BEGIN_NAMESPACE_CONTAINER # define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #endif #ifndef _GLIBCXX_END_NAMESPACE_CONTAINER # define _GLIBCXX_END_NAMESPACE_CONTAINER #endif // GLIBCXX_ABI Deprecated // Define if compatibility should be provided for -mlong-double-64. #undef _GLIBCXX_LONG_DOUBLE_COMPAT // Inline namespace for long double 128 mode. #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ namespace std { inline namespace __gnu_cxx_ldbl128 { } } # define _GLIBCXX_NAMESPACE_LDBL __gnu_cxx_ldbl128:: # define _GLIBCXX_BEGIN_NAMESPACE_LDBL namespace __gnu_cxx_ldbl128 { # define _GLIBCXX_END_NAMESPACE_LDBL } #else # define _GLIBCXX_NAMESPACE_LDBL # define _GLIBCXX_BEGIN_NAMESPACE_LDBL # define _GLIBCXX_END_NAMESPACE_LDBL #endif // Assert. #if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL) # define __glibcxx_assert(_Condition) #else namespace std { // Avoid the use of assert, because we're trying to keep the <cassert> // include out of the mix. inline void __replacement_assert(const char* __file, int __line, const char* __function, const char* __condition) { __builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line, __function, __condition); __builtin_abort(); } } #define __glibcxx_assert(_Condition) \ do \ { \ if (! (_Condition)) \ std::__replacement_assert(__FILE__, __LINE__, __PRETTY_FUNCTION__, \ #_Condition); \ } while (false) #endif // Macros for race detectors. // _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) and // _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) should be used to explain // atomic (lock-free) synchronization to race detectors: // the race detector will infer a happens-before arc from the former to the // latter when they share the same argument pointer. // // The most frequent use case for these macros (and the only case in the // current implementation of the library) is atomic reference counting: // void _M_remove_reference() // { // _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&this->_M_refcount); // if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0) // { // _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&this->_M_refcount); // _M_destroy(__a); // } // } // The annotations in this example tell the race detector that all memory // accesses occurred when the refcount was positive do not race with // memory accesses which occurred after the refcount became zero. #ifndef _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE # define _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) #endif #ifndef _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER # define _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) #endif // Macros for C linkage: define extern "C" linkage only when using C++. # define _GLIBCXX_BEGIN_EXTERN_C extern "C" { # define _GLIBCXX_END_EXTERN_C } #else // !__cplusplus # define _GLIBCXX_BEGIN_EXTERN_C # define _GLIBCXX_END_EXTERN_C #endif // First includes. // Pick up any OS-specific definitions. #include <bits/os_defines.h> // Pick up any CPU-specific definitions. #include <bits/cpu_defines.h> // If platform uses neither visibility nor psuedo-visibility, // specify empty default for namespace annotation macros. #ifndef _GLIBCXX_PSEUDO_VISIBILITY # define _GLIBCXX_PSEUDO_VISIBILITY(V) #endif // Certain function definitions that are meant to be overridable from // user code are decorated with this macro. For some targets, this // macro causes these definitions to be weak. #ifndef _GLIBCXX_WEAK_DEFINITION # define _GLIBCXX_WEAK_DEFINITION #endif // The remainder of the prewritten config is automatic; all the // user hooks are listed above. // Create a boolean flag to be used to determine if --fast-math is set. #ifdef __FAST_MATH__ # define _GLIBCXX_FAST_MATH 1 #else # define _GLIBCXX_FAST_MATH 0 #endif // This marks string literals in header files to be extracted for eventual // translation. It is primarily used for messages in thrown exceptions; see // src/functexcept.cc. We use __N because the more traditional _N is used // for something else under certain OSes (see BADNAMES). #define __N(msgid) (msgid) // For example, <windows.h> is known to #define min and max as macros... #undef min #undef max // End of prewritten config; the settings discovered at configure time follow. /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the `acosf' function. */ #define _GLIBCXX_HAVE_ACOSF 1 /* Define to 1 if you have the `acosl' function. */ #define _GLIBCXX_HAVE_ACOSL 1 /* Define to 1 if you have the `asinf' function. */ #define _GLIBCXX_HAVE_ASINF 1 /* Define to 1 if you have the `asinl' function. */ #define _GLIBCXX_HAVE_ASINL 1 /* Define to 1 if the target assembler supports .symver directive. */ #define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1 /* Define to 1 if you have the `atan2f' function. */ #define _GLIBCXX_HAVE_ATAN2F 1 /* Define to 1 if you have the `atan2l' function. */ #define _GLIBCXX_HAVE_ATAN2L 1 /* Define to 1 if you have the `atanf' function. */ #define _GLIBCXX_HAVE_ATANF 1 /* Define to 1 if you have the `atanl' function. */ #define _GLIBCXX_HAVE_ATANL 1 /* Define to 1 if you have the `at_quick_exit' function. */ #define _GLIBCXX_HAVE_AT_QUICK_EXIT 1 /* Define to 1 if the target assembler supports thread-local storage. */ /* #undef _GLIBCXX_HAVE_CC_TLS */ /* Define to 1 if you have the `ceilf' function. */ #define _GLIBCXX_HAVE_CEILF 1 /* Define to 1 if you have the `ceill' function. */ #define _GLIBCXX_HAVE_CEILL 1 /* Define to 1 if you have the <complex.h> header file. */ #define _GLIBCXX_HAVE_COMPLEX_H 1 /* Define to 1 if you have the `cosf' function. */ #define _GLIBCXX_HAVE_COSF 1 /* Define to 1 if you have the `coshf' function. */ #define _GLIBCXX_HAVE_COSHF 1 /* Define to 1 if you have the `coshl' function. */ #define _GLIBCXX_HAVE_COSHL 1 /* Define to 1 if you have the `cosl' function. */ #define _GLIBCXX_HAVE_COSL 1 /* Define to 1 if you have the <dlfcn.h> header file. */ #define _GLIBCXX_HAVE_DLFCN_H 1 /* Define if EBADMSG exists. */ #define _GLIBCXX_HAVE_EBADMSG 1 /* Define if ECANCELED exists. */ #define _GLIBCXX_HAVE_ECANCELED 1 /* Define if ECHILD exists. */ #define _GLIBCXX_HAVE_ECHILD 1 /* Define if EIDRM exists. */ #define _GLIBCXX_HAVE_EIDRM 1 /* Define to 1 if you have the <endian.h> header file. */ #define _GLIBCXX_HAVE_ENDIAN_H 1 /* Define if ENODATA exists. */ #define _GLIBCXX_HAVE_ENODATA 1 /* Define if ENOLINK exists. */ #define _GLIBCXX_HAVE_ENOLINK 1 /* Define if ENOSPC exists. */ #define _GLIBCXX_HAVE_ENOSPC 1 /* Define if ENOSR exists. */ #define _GLIBCXX_HAVE_ENOSR 1 /* Define if ENOSTR exists. */ #define _GLIBCXX_HAVE_ENOSTR 1 /* Define if ENOTRECOVERABLE exists. */ #define _GLIBCXX_HAVE_ENOTRECOVERABLE 1 /* Define if ENOTSUP exists. */ #define _GLIBCXX_HAVE_ENOTSUP 1 /* Define if EOVERFLOW exists. */ #define _GLIBCXX_HAVE_EOVERFLOW 1 /* Define if EOWNERDEAD exists. */ #define _GLIBCXX_HAVE_EOWNERDEAD 1 /* Define if EPERM exists. */ #define _GLIBCXX_HAVE_EPERM 1 /* Define if EPROTO exists. */ #define _GLIBCXX_HAVE_EPROTO 1 /* Define if ETIME exists. */ #define _GLIBCXX_HAVE_ETIME 1 /* Define if ETIMEDOUT exists. */ #define _GLIBCXX_HAVE_ETIMEDOUT 1 /* Define if ETXTBSY exists. */ #define _GLIBCXX_HAVE_ETXTBSY 1 /* Define if EWOULDBLOCK exists. */ #define _GLIBCXX_HAVE_EWOULDBLOCK 1 /* Define to 1 if you have the <execinfo.h> header file. */ #define _GLIBCXX_HAVE_EXECINFO_H 1 /* Define to 1 if you have the `expf' function. */ #define _GLIBCXX_HAVE_EXPF 1 /* Define to 1 if you have the `expl' function. */ #define _GLIBCXX_HAVE_EXPL 1 /* Define to 1 if you have the `fabsf' function. */ #define _GLIBCXX_HAVE_FABSF 1 /* Define to 1 if you have the `fabsl' function. */ #define _GLIBCXX_HAVE_FABSL 1 /* Define to 1 if you have the <fenv.h> header file. */ #define _GLIBCXX_HAVE_FENV_H 1 /* Define to 1 if you have the `finite' function. */ #define _GLIBCXX_HAVE_FINITE 1 /* Define to 1 if you have the `finitef' function. */ #define _GLIBCXX_HAVE_FINITEF 1 /* Define to 1 if you have the `finitel' function. */ #define _GLIBCXX_HAVE_FINITEL 1 /* Define to 1 if you have the <float.h> header file. */ #define _GLIBCXX_HAVE_FLOAT_H 1 /* Define to 1 if you have the `floorf' function. */ #define _GLIBCXX_HAVE_FLOORF 1 /* Define to 1 if you have the `floorl' function. */ #define _GLIBCXX_HAVE_FLOORL 1 /* Define to 1 if you have the `fmodf' function. */ #define _GLIBCXX_HAVE_FMODF 1 /* Define to 1 if you have the `fmodl' function. */ #define _GLIBCXX_HAVE_FMODL 1 /* Define to 1 if you have the `fpclass' function. */ /* #undef _GLIBCXX_HAVE_FPCLASS */ /* Define to 1 if you have the <fp.h> header file. */ /* #undef _GLIBCXX_HAVE_FP_H */ /* Define to 1 if you have the `frexpf' function. */ #define _GLIBCXX_HAVE_FREXPF 1 /* Define to 1 if you have the `frexpl' function. */ #define _GLIBCXX_HAVE_FREXPL 1 /* Define if _Unwind_GetIPInfo is available. */ #define _GLIBCXX_HAVE_GETIPINFO 1 /* Define if gets is available in <stdio.h>. */ #define _GLIBCXX_HAVE_GETS 1 /* Define to 1 if you have the `hypot' function. */ #define _GLIBCXX_HAVE_HYPOT 1 /* Define to 1 if you have the `hypotf' function. */ #define _GLIBCXX_HAVE_HYPOTF 1 /* Define to 1 if you have the `hypotl' function. */ #define _GLIBCXX_HAVE_HYPOTL 1 /* Define if you have the iconv() function. */ #define _GLIBCXX_HAVE_ICONV 1 /* Define to 1 if you have the <ieeefp.h> header file. */ /* #undef _GLIBCXX_HAVE_IEEEFP_H */ /* Define if int64_t is available in <stdint.h>. */ #define _GLIBCXX_HAVE_INT64_T 1 /* Define if int64_t is a long. */ /* #undef _GLIBCXX_HAVE_INT64_T_LONG */ /* Define if int64_t is a long long. */ #define _GLIBCXX_HAVE_INT64_T_LONG_LONG 1 /* Define to 1 if you have the <inttypes.h> header file. */ #define _GLIBCXX_HAVE_INTTYPES_H 1 /* Define to 1 if you have the `isinf' function. */ #define _GLIBCXX_HAVE_ISINF 1 /* Define to 1 if you have the `isinff' function. */ #define _GLIBCXX_HAVE_ISINFF 1 /* Define to 1 if you have the `isinfl' function. */ #define _GLIBCXX_HAVE_ISINFL 1 /* Define to 1 if you have the `isnan' function. */ #define _GLIBCXX_HAVE_ISNAN 1 /* Define to 1 if you have the `isnanf' function. */ #define _GLIBCXX_HAVE_ISNANF 1 /* Define to 1 if you have the `isnanl' function. */ #define _GLIBCXX_HAVE_ISNANL 1 /* Defined if iswblank exists. */ #define _GLIBCXX_HAVE_ISWBLANK 1 /* Define if LC_MESSAGES is available in <locale.h>. */ #define _GLIBCXX_HAVE_LC_MESSAGES 1 /* Define to 1 if you have the `ldexpf' function. */ #define _GLIBCXX_HAVE_LDEXPF 1 /* Define to 1 if you have the `ldexpl' function. */ #define _GLIBCXX_HAVE_LDEXPL 1 /* Define to 1 if you have the <libintl.h> header file. */ /* #undef _GLIBCXX_HAVE_LIBINTL_H */ /* Only used in build directory testsuite_hooks.h. */ /* #undef _GLIBCXX_HAVE_LIMIT_AS */ /* Only used in build directory testsuite_hooks.h. */ /* #undef _GLIBCXX_HAVE_LIMIT_DATA */ /* Only used in build directory testsuite_hooks.h. */ /* #undef _GLIBCXX_HAVE_LIMIT_FSIZE */ /* Only used in build directory testsuite_hooks.h. */ /* #undef _GLIBCXX_HAVE_LIMIT_RSS */ /* Only used in build directory testsuite_hooks.h. */ /* #undef _GLIBCXX_HAVE_LIMIT_VMEM */ /* Define if futex syscall is available. */ #define _GLIBCXX_HAVE_LINUX_FUTEX 1 /* Define to 1 if you have the <locale.h> header file. */ #define _GLIBCXX_HAVE_LOCALE_H 1 /* Define to 1 if you have the `log10f' function. */ #define _GLIBCXX_HAVE_LOG10F 1 /* Define to 1 if you have the `log10l' function. */ #define _GLIBCXX_HAVE_LOG10L 1 /* Define to 1 if you have the `logf' function. */ #define _GLIBCXX_HAVE_LOGF 1 /* Define to 1 if you have the `logl' function. */ #define _GLIBCXX_HAVE_LOGL 1 /* Define to 1 if you have the <machine/endian.h> header file. */ /* #undef _GLIBCXX_HAVE_MACHINE_ENDIAN_H */ /* Define to 1 if you have the <machine/param.h> header file. */ /* #undef _GLIBCXX_HAVE_MACHINE_PARAM_H */ /* Define if mbstate_t exists in wchar.h. */ #define _GLIBCXX_HAVE_MBSTATE_T 1 /* Define to 1 if you have the <memory.h> header file. */ #define _GLIBCXX_HAVE_MEMORY_H 1 /* Define to 1 if you have the `modf' function. */ #define _GLIBCXX_HAVE_MODF 1 /* Define to 1 if you have the `modff' function. */ #define _GLIBCXX_HAVE_MODFF 1 /* Define to 1 if you have the `modfl' function. */ #define _GLIBCXX_HAVE_MODFL 1 /* Define to 1 if you have the <nan.h> header file. */ /* #undef _GLIBCXX_HAVE_NAN_H */ /* Define if poll is available in <poll.h>. */ #define _GLIBCXX_HAVE_POLL 1 /* Define to 1 if you have the `powf' function. */ #define _GLIBCXX_HAVE_POWF 1 /* Define to 1 if you have the `powl' function. */ #define _GLIBCXX_HAVE_POWL 1 /* Define to 1 if you have the `qfpclass' function. */ /* #undef _GLIBCXX_HAVE_QFPCLASS */ /* Define to 1 if you have the `quick_exit' function. */ #define _GLIBCXX_HAVE_QUICK_EXIT 1 /* Define to 1 if you have the `setenv' function. */ /* #undef _GLIBCXX_HAVE_SETENV */ /* Define to 1 if you have the `sincos' function. */ #define _GLIBCXX_HAVE_SINCOS 1 /* Define to 1 if you have the `sincosf' function. */ #define _GLIBCXX_HAVE_SINCOSF 1 /* Define to 1 if you have the `sincosl' function. */ #define _GLIBCXX_HAVE_SINCOSL 1 /* Define to 1 if you have the `sinf' function. */ #define _GLIBCXX_HAVE_SINF 1 /* Define to 1 if you have the `sinhf' function. */ #define _GLIBCXX_HAVE_SINHF 1 /* Define to 1 if you have the `sinhl' function. */ #define _GLIBCXX_HAVE_SINHL 1 /* Define to 1 if you have the `sinl' function. */ #define _GLIBCXX_HAVE_SINL 1 /* Defined if sleep exists. */ #define _GLIBCXX_HAVE_SLEEP 1 /* Define to 1 if you have the `sqrtf' function. */ #define _GLIBCXX_HAVE_SQRTF 1 /* Define to 1 if you have the `sqrtl' function. */ #define _GLIBCXX_HAVE_SQRTL 1 /* Define to 1 if you have the <stdalign.h> header file. */ #define _GLIBCXX_HAVE_STDALIGN_H 1 /* Define to 1 if you have the <stdbool.h> header file. */ #define _GLIBCXX_HAVE_STDBOOL_H 1 /* Define to 1 if you have the <stdint.h> header file. */ #define _GLIBCXX_HAVE_STDINT_H 1 /* Define to 1 if you have the <stdlib.h> header file. */ #define _GLIBCXX_HAVE_STDLIB_H 1 /* Define if strerror_l is available in <string.h>. */ #define _GLIBCXX_HAVE_STRERROR_L 1 /* Define if strerror_r is available in <string.h>. */ #define _GLIBCXX_HAVE_STRERROR_R 1 /* Define to 1 if you have the <strings.h> header file. */ #define _GLIBCXX_HAVE_STRINGS_H 1 /* Define to 1 if you have the <string.h> header file. */ #define _GLIBCXX_HAVE_STRING_H 1 /* Define to 1 if you have the `strtof' function. */ #define _GLIBCXX_HAVE_STRTOF 1 /* Define to 1 if you have the `strtold' function. */ #define _GLIBCXX_HAVE_STRTOLD 1 /* Define if strxfrm_l is available in <string.h>. */ #define _GLIBCXX_HAVE_STRXFRM_L 1 /* Define to 1 if the target runtime linker supports binding the same symbol to different versions. */ #define _GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT 1 /* Define to 1 if you have the <sys/filio.h> header file. */ /* #undef _GLIBCXX_HAVE_SYS_FILIO_H */ /* Define to 1 if you have the <sys/ioctl.h> header file. */ #define _GLIBCXX_HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the <sys/ipc.h> header file. */ #define _GLIBCXX_HAVE_SYS_IPC_H 1 /* Define to 1 if you have the <sys/isa_defs.h> header file. */ /* #undef _GLIBCXX_HAVE_SYS_ISA_DEFS_H */ /* Define to 1 if you have the <sys/machine.h> header file. */ /* #undef _GLIBCXX_HAVE_SYS_MACHINE_H */ /* Define to 1 if you have the <sys/param.h> header file. */ #define _GLIBCXX_HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the <sys/resource.h> header file. */ #define _GLIBCXX_HAVE_SYS_RESOURCE_H 1 /* Define to 1 if you have a suitable <sys/sdt.h> header file */ /* #undef _GLIBCXX_HAVE_SYS_SDT_H */ /* Define to 1 if you have the <sys/sem.h> header file. */ #define _GLIBCXX_HAVE_SYS_SEM_H 1 /* Define to 1 if you have the <sys/stat.h> header file. */ #define _GLIBCXX_HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/sysinfo.h> header file. */ #define _GLIBCXX_HAVE_SYS_SYSINFO_H 1 /* Define to 1 if you have the <sys/time.h> header file. */ #define _GLIBCXX_HAVE_SYS_TIME_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #define _GLIBCXX_HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <sys/uio.h> header file. */ #define _GLIBCXX_HAVE_SYS_UIO_H 1 /* Define if S_IFREG is available in <sys/stat.h>. */ /* #undef _GLIBCXX_HAVE_S_IFREG */ /* Define if S_IFREG is available in <sys/stat.h>. */ #define _GLIBCXX_HAVE_S_ISREG 1 /* Define to 1 if you have the `tanf' function. */ #define _GLIBCXX_HAVE_TANF 1 /* Define to 1 if you have the `tanhf' function. */ #define _GLIBCXX_HAVE_TANHF 1 /* Define to 1 if you have the `tanhl' function. */ #define _GLIBCXX_HAVE_TANHL 1 /* Define to 1 if you have the `tanl' function. */ #define _GLIBCXX_HAVE_TANL 1 /* Define to 1 if you have the <tgmath.h> header file. */ #define _GLIBCXX_HAVE_TGMATH_H 1 /* Define to 1 if the target supports thread-local storage. */ #define _GLIBCXX_HAVE_TLS 1 /* Define to 1 if you have the <unistd.h> header file. */ #define _GLIBCXX_HAVE_UNISTD_H 1 /* Defined if usleep exists. */ #define _GLIBCXX_HAVE_USLEEP 1 /* Defined if vfwscanf exists. */ #define _GLIBCXX_HAVE_VFWSCANF 1 /* Defined if vswscanf exists. */ #define _GLIBCXX_HAVE_VSWSCANF 1 /* Defined if vwscanf exists. */ #define _GLIBCXX_HAVE_VWSCANF 1 /* Define to 1 if you have the <wchar.h> header file. */ #define _GLIBCXX_HAVE_WCHAR_H 1 /* Defined if wcstof exists. */ #define _GLIBCXX_HAVE_WCSTOF 1 /* Define to 1 if you have the <wctype.h> header file. */ #define _GLIBCXX_HAVE_WCTYPE_H 1 /* Defined if Sleep exists. */ /* #undef _GLIBCXX_HAVE_WIN32_SLEEP */ /* Define if writev is available in <sys/uio.h>. */ #define _GLIBCXX_HAVE_WRITEV 1 /* Define to 1 if you have the `_acosf' function. */ /* #undef _GLIBCXX_HAVE__ACOSF */ /* Define to 1 if you have the `_acosl' function. */ /* #undef _GLIBCXX_HAVE__ACOSL */ /* Define to 1 if you have the `_asinf' function. */ /* #undef _GLIBCXX_HAVE__ASINF */ /* Define to 1 if you have the `_asinl' function. */ /* #undef _GLIBCXX_HAVE__ASINL */ /* Define to 1 if you have the `_atan2f' function. */ /* #undef _GLIBCXX_HAVE__ATAN2F */ /* Define to 1 if you have the `_atan2l' function. */ /* #undef _GLIBCXX_HAVE__ATAN2L */ /* Define to 1 if you have the `_atanf' function. */ /* #undef _GLIBCXX_HAVE__ATANF */ /* Define to 1 if you have the `_atanl' function. */ /* #undef _GLIBCXX_HAVE__ATANL */ /* Define to 1 if you have the `_ceilf' function. */ /* #undef _GLIBCXX_HAVE__CEILF */ /* Define to 1 if you have the `_ceill' function. */ /* #undef _GLIBCXX_HAVE__CEILL */ /* Define to 1 if you have the `_cosf' function. */ /* #undef _GLIBCXX_HAVE__COSF */ /* Define to 1 if you have the `_coshf' function. */ /* #undef _GLIBCXX_HAVE__COSHF */ /* Define to 1 if you have the `_coshl' function. */ /* #undef _GLIBCXX_HAVE__COSHL */ /* Define to 1 if you have the `_cosl' function. */ /* #undef _GLIBCXX_HAVE__COSL */ /* Define to 1 if you have the `_expf' function. */ /* #undef _GLIBCXX_HAVE__EXPF */ /* Define to 1 if you have the `_expl' function. */ /* #undef _GLIBCXX_HAVE__EXPL */ /* Define to 1 if you have the `_fabsf' function. */ /* #undef _GLIBCXX_HAVE__FABSF */ /* Define to 1 if you have the `_fabsl' function. */ /* #undef _GLIBCXX_HAVE__FABSL */ /* Define to 1 if you have the `_finite' function. */ /* #undef _GLIBCXX_HAVE__FINITE */ /* Define to 1 if you have the `_finitef' function. */ /* #undef _GLIBCXX_HAVE__FINITEF */ /* Define to 1 if you have the `_finitel' function. */ /* #undef _GLIBCXX_HAVE__FINITEL */ /* Define to 1 if you have the `_floorf' function. */ /* #undef _GLIBCXX_HAVE__FLOORF */ /* Define to 1 if you have the `_floorl' function. */ /* #undef _GLIBCXX_HAVE__FLOORL */ /* Define to 1 if you have the `_fmodf' function. */ /* #undef _GLIBCXX_HAVE__FMODF */ /* Define to 1 if you have the `_fmodl' function. */ /* #undef _GLIBCXX_HAVE__FMODL */ /* Define to 1 if you have the `_fpclass' function. */ /* #undef _GLIBCXX_HAVE__FPCLASS */ /* Define to 1 if you have the `_frexpf' function. */ /* #undef _GLIBCXX_HAVE__FREXPF */ /* Define to 1 if you have the `_frexpl' function. */ /* #undef _GLIBCXX_HAVE__FREXPL */ /* Define to 1 if you have the `_hypot' function. */ /* #undef _GLIBCXX_HAVE__HYPOT */ /* Define to 1 if you have the `_hypotf' function. */ /* #undef _GLIBCXX_HAVE__HYPOTF */ /* Define to 1 if you have the `_hypotl' function. */ /* #undef _GLIBCXX_HAVE__HYPOTL */ /* Define to 1 if you have the `_isinf' function. */ /* #undef _GLIBCXX_HAVE__ISINF */ /* Define to 1 if you have the `_isinff' function. */ /* #undef _GLIBCXX_HAVE__ISINFF */ /* Define to 1 if you have the `_isinfl' function. */ /* #undef _GLIBCXX_HAVE__ISINFL */ /* Define to 1 if you have the `_isnan' function. */ /* #undef _GLIBCXX_HAVE__ISNAN */ /* Define to 1 if you have the `_isnanf' function. */ /* #undef _GLIBCXX_HAVE__ISNANF */ /* Define to 1 if you have the `_isnanl' function. */ /* #undef _GLIBCXX_HAVE__ISNANL */ /* Define to 1 if you have the `_ldexpf' function. */ /* #undef _GLIBCXX_HAVE__LDEXPF */ /* Define to 1 if you have the `_ldexpl' function. */ /* #undef _GLIBCXX_HAVE__LDEXPL */ /* Define to 1 if you have the `_log10f' function. */ /* #undef _GLIBCXX_HAVE__LOG10F */ /* Define to 1 if you have the `_log10l' function. */ /* #undef _GLIBCXX_HAVE__LOG10L */ /* Define to 1 if you have the `_logf' function. */ /* #undef _GLIBCXX_HAVE__LOGF */ /* Define to 1 if you have the `_logl' function. */ /* #undef _GLIBCXX_HAVE__LOGL */ /* Define to 1 if you have the `_modf' function. */ /* #undef _GLIBCXX_HAVE__MODF */ /* Define to 1 if you have the `_modff' function. */ /* #undef _GLIBCXX_HAVE__MODFF */ /* Define to 1 if you have the `_modfl' function. */ /* #undef _GLIBCXX_HAVE__MODFL */ /* Define to 1 if you have the `_powf' function. */ /* #undef _GLIBCXX_HAVE__POWF */ /* Define to 1 if you have the `_powl' function. */ /* #undef _GLIBCXX_HAVE__POWL */ /* Define to 1 if you have the `_qfpclass' function. */ /* #undef _GLIBCXX_HAVE__QFPCLASS */ /* Define to 1 if you have the `_sincos' function. */ /* #undef _GLIBCXX_HAVE__SINCOS */ /* Define to 1 if you have the `_sincosf' function. */ /* #undef _GLIBCXX_HAVE__SINCOSF */ /* Define to 1 if you have the `_sincosl' function. */ /* #undef _GLIBCXX_HAVE__SINCOSL */ /* Define to 1 if you have the `_sinf' function. */ /* #undef _GLIBCXX_HAVE__SINF */ /* Define to 1 if you have the `_sinhf' function. */ /* #undef _GLIBCXX_HAVE__SINHF */ /* Define to 1 if you have the `_sinhl' function. */ /* #undef _GLIBCXX_HAVE__SINHL */ /* Define to 1 if you have the `_sinl' function. */ /* #undef _GLIBCXX_HAVE__SINL */ /* Define to 1 if you have the `_sqrtf' function. */ /* #undef _GLIBCXX_HAVE__SQRTF */ /* Define to 1 if you have the `_sqrtl' function. */ /* #undef _GLIBCXX_HAVE__SQRTL */ /* Define to 1 if you have the `_tanf' function. */ /* #undef _GLIBCXX_HAVE__TANF */ /* Define to 1 if you have the `_tanhf' function. */ /* #undef _GLIBCXX_HAVE__TANHF */ /* Define to 1 if you have the `_tanhl' function. */ /* #undef _GLIBCXX_HAVE__TANHL */ /* Define to 1 if you have the `_tanl' function. */ /* #undef _GLIBCXX_HAVE__TANL */ /* Define to 1 if you have the `__cxa_thread_atexit_impl' function. */ /* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */ /* Define as const if the declaration of iconv() needs const. */ #define _GLIBCXX_ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" /* Name of package */ /* #undef _GLIBCXX_PACKAGE */ /* Define to the address where bug reports for this package should be sent. */ #define _GLIBCXX_PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ #define _GLIBCXX_PACKAGE_NAME "package-unused" /* Define to the full name and version of this package. */ #define _GLIBCXX_PACKAGE_STRING "package-unused version-unused" /* Define to the one symbol short name of this package. */ #define _GLIBCXX_PACKAGE_TARNAME "libstdc++" /* Define to the home page for this package. */ #define _GLIBCXX_PACKAGE_URL "" /* Define to the version of this package. */ #define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ /* #undef SIZEOF_INT */ /* The size of `long', as computed by sizeof. */ /* #undef SIZEOF_LONG */ /* The size of `short', as computed by sizeof. */ /* #undef SIZEOF_SHORT */ /* The size of `void *', as computed by sizeof. */ /* #undef SIZEOF_VOID_P */ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ /* #undef _GLIBCXX_VERSION */ /* Define if the compiler supports C++11 atomics. */ #define _GLIBCXX_ATOMIC_BUILTINS 1 /* Define to use concept checking code from the boost libraries. */ /* #undef _GLIBCXX_CONCEPT_CHECKS */ /* Define to 1 if a fully dynamic basic_string is wanted, 0 to disable, undefined for platform defaults */ #define _GLIBCXX_FULLY_DYNAMIC_STRING 0 /* Define if gthreads library is available. */ #define _GLIBCXX_HAS_GTHREADS 1 /* Define to 1 if a full hosted library is built, or 0 if freestanding. */ #define _GLIBCXX_HOSTED 1 /* Define if compatibility should be provided for -mlong-double-64. */ /* Define if ptrdiff_t is int. */ #define _GLIBCXX_PTRDIFF_T_IS_INT 1 /* Define if using setrlimit to set resource limits during "make check" */ /* #undef _GLIBCXX_RES_LIMITS */ /* Define if size_t is unsigned int. */ #define _GLIBCXX_SIZE_T_IS_UINT 1 /* Define if the compiler is configured for setjmp/longjmp exceptions. */ /* #undef _GLIBCXX_SJLJ_EXCEPTIONS */ /* Define to the value of the EOF integer constant. */ #define _GLIBCXX_STDIO_EOF -1 /* Define to the value of the SEEK_CUR integer constant. */ #define _GLIBCXX_STDIO_SEEK_CUR 1 /* Define to the value of the SEEK_END integer constant. */ #define _GLIBCXX_STDIO_SEEK_END 2 /* Define to use symbol versioning in the shared library. */ #define _GLIBCXX_SYMVER 1 /* Define to use darwin versioning in the shared library. */ /* #undef _GLIBCXX_SYMVER_DARWIN */ /* Define to use GNU versioning in the shared library. */ #define _GLIBCXX_SYMVER_GNU 1 /* Define to use GNU namespace versioning in the shared library. */ /* #undef _GLIBCXX_SYMVER_GNU_NAMESPACE */ /* Define to use Sun versioning in the shared library. */ /* #undef _GLIBCXX_SYMVER_SUN */ /* Define if C99 functions or macros from <wchar.h>, <math.h>, <complex.h>, <stdio.h>, and <stdlib.h> can be used or exposed. */ #define _GLIBCXX_USE_C99 1 /* Define if C99 functions in <complex.h> should be used in <complex>. Using compiler builtins for these functions requires corresponding C99 library functions to be present. */ #define _GLIBCXX_USE_C99_COMPLEX 1 /* Define if C99 functions in <complex.h> should be used in <tr1/complex>. Using compiler builtins for these functions requires corresponding C99 library functions to be present. */ #define _GLIBCXX_USE_C99_COMPLEX_TR1 1 /* Define if C99 functions in <ctype.h> should be imported in <tr1/cctype> in namespace std::tr1. */ #define _GLIBCXX_USE_C99_CTYPE_TR1 1 /* Define if C99 functions in <fenv.h> should be imported in <tr1/cfenv> in namespace std::tr1. */ #define _GLIBCXX_USE_C99_FENV_TR1 1 /* Define if C99 functions in <inttypes.h> should be imported in <tr1/cinttypes> in namespace std::tr1. */ #define _GLIBCXX_USE_C99_INTTYPES_TR1 1 /* Define if wchar_t C99 functions in <inttypes.h> should be imported in <tr1/cinttypes> in namespace std::tr1. */ #define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1 /* Define if C99 functions or macros in <math.h> should be imported in <cmath> in namespace std. */ #define _GLIBCXX_USE_C99_MATH 1 /* Define if C99 functions or macros in <math.h> should be imported in <tr1/cmath> in namespace std::tr1. */ #define _GLIBCXX_USE_C99_MATH_TR1 1 /* Define if C99 types in <stdint.h> should be imported in <tr1/cstdint> in namespace std::tr1. */ #define _GLIBCXX_USE_C99_STDINT_TR1 1 /* Defined if clock_gettime has monotonic clock support. */ #define _GLIBCXX_USE_CLOCK_MONOTONIC 1 /* Defined if clock_gettime syscall has monotonic and realtime clock support. */ #define _GLIBCXX_USE_CLOCK_GETTIME_SYSCALL 1 /* Defined if clock_gettime has realtime clock support. */ #define _GLIBCXX_USE_CLOCK_REALTIME 1 /* Define if ISO/IEC TR 24733 decimal floating point types are supported on this host. */ /* #undef _GLIBCXX_USE_DECIMAL_FLOAT */ /* Define if __float128 is supported on this host. */ /* #undef _GLIBCXX_USE_FLOAT128 */ /* Defined if gettimeofday is available. */ #define _GLIBCXX_USE_GETTIMEOFDAY 1 /* Define if get_nprocs is available in <sys/sysinfo.h>. */ #define _GLIBCXX_USE_GET_NPROCS 1 /* Define if __int128 is supported on this host. */ /* #undef _GLIBCXX_USE_INT128 */ /* Define if LFS support is available. */ #define _GLIBCXX_USE_LFS 1 /* Define if code specialized for long long should be used. */ #define _GLIBCXX_USE_LONG_LONG 1 /* Defined if nanosleep is available. */ /* #undef _GLIBCXX_USE_NANOSLEEP */ /* Define if NLS translations are to be used. */ /* #undef _GLIBCXX_USE_NLS */ /* Define if pthreads_num_processors_np is available in <pthread.h>. */ /* #undef _GLIBCXX_USE_PTHREADS_NUM_PROCESSORS_NP */ /* Define if /dev/random and /dev/urandom are available for the random_device of TR1 (Chapter 5.1). */ #define _GLIBCXX_USE_RANDOM_TR1 1 /* Defined if sched_yield is available. */ /* #undef _GLIBCXX_USE_SCHED_YIELD */ /* Define if _SC_NPROCESSORS_ONLN is available in <unistd.h>. */ #define _GLIBCXX_USE_SC_NPROCESSORS_ONLN 1 /* Define if _SC_NPROC_ONLN is available in <unistd.h>. */ /* #undef _GLIBCXX_USE_SC_NPROC_ONLN */ /* Define if sysctl(), CTL_HW and HW_NCPU are available in <sys/sysctl.h>. */ /* #undef _GLIBCXX_USE_SYSCTL_HW_NCPU */ /* Define if code specialized for wchar_t should be used. */ #define _GLIBCXX_USE_WCHAR_T 1 /* Define to 1 if a verbose library is built, or 0 otherwise. */ #define _GLIBCXX_VERBOSE 1 /* Defined if as can handle rdrand. */ /* #undef _GLIBCXX_X86_RDRAND */ /* Define to 1 if mutex_timedlock is available. */ #define _GTHREAD_USE_MUTEX_TIMEDLOCK 1 #if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF) # define _GLIBCXX_HAVE_ACOSF 1 # define acosf _acosf #endif #if defined (_GLIBCXX_HAVE__ACOSL) && ! defined (_GLIBCXX_HAVE_ACOSL) # define _GLIBCXX_HAVE_ACOSL 1 # define acosl _acosl #endif #if defined (_GLIBCXX_HAVE__ASINF) && ! defined (_GLIBCXX_HAVE_ASINF) # define _GLIBCXX_HAVE_ASINF 1 # define asinf _asinf #endif #if defined (_GLIBCXX_HAVE__ASINL) && ! defined (_GLIBCXX_HAVE_ASINL) # define _GLIBCXX_HAVE_ASINL 1 # define asinl _asinl #endif #if defined (_GLIBCXX_HAVE__ATAN2F) && ! defined (_GLIBCXX_HAVE_ATAN2F) # define _GLIBCXX_HAVE_ATAN2F 1 # define atan2f _atan2f #endif #if defined (_GLIBCXX_HAVE__ATAN2L) && ! defined (_GLIBCXX_HAVE_ATAN2L) # define _GLIBCXX_HAVE_ATAN2L 1 # define atan2l _atan2l #endif #if defined (_GLIBCXX_HAVE__ATANF) && ! defined (_GLIBCXX_HAVE_ATANF) # define _GLIBCXX_HAVE_ATANF 1 # define atanf _atanf #endif #if defined (_GLIBCXX_HAVE__ATANL) && ! defined (_GLIBCXX_HAVE_ATANL) # define _GLIBCXX_HAVE_ATANL 1 # define atanl _atanl #endif #if defined (_GLIBCXX_HAVE__CEILF) && ! defined (_GLIBCXX_HAVE_CEILF) # define _GLIBCXX_HAVE_CEILF 1 # define ceilf _ceilf #endif #if defined (_GLIBCXX_HAVE__CEILL) && ! defined (_GLIBCXX_HAVE_CEILL) # define _GLIBCXX_HAVE_CEILL 1 # define ceill _ceill #endif #if defined (_GLIBCXX_HAVE__COSF) && ! defined (_GLIBCXX_HAVE_COSF) # define _GLIBCXX_HAVE_COSF 1 # define cosf _cosf #endif #if defined (_GLIBCXX_HAVE__COSHF) && ! defined (_GLIBCXX_HAVE_COSHF) # define _GLIBCXX_HAVE_COSHF 1 # define coshf _coshf #endif #if defined (_GLIBCXX_HAVE__COSHL) && ! defined (_GLIBCXX_HAVE_COSHL) # define _GLIBCXX_HAVE_COSHL 1 # define coshl _coshl #endif #if defined (_GLIBCXX_HAVE__COSL) && ! defined (_GLIBCXX_HAVE_COSL) # define _GLIBCXX_HAVE_COSL 1 # define cosl _cosl #endif #if defined (_GLIBCXX_HAVE__EXPF) && ! defined (_GLIBCXX_HAVE_EXPF) # define _GLIBCXX_HAVE_EXPF 1 # define expf _expf #endif #if defined (_GLIBCXX_HAVE__EXPL) && ! defined (_GLIBCXX_HAVE_EXPL) # define _GLIBCXX_HAVE_EXPL 1 # define expl _expl #endif #if defined (_GLIBCXX_HAVE__FABSF) && ! defined (_GLIBCXX_HAVE_FABSF) # define _GLIBCXX_HAVE_FABSF 1 # define fabsf _fabsf #endif #if defined (_GLIBCXX_HAVE__FABSL) && ! defined (_GLIBCXX_HAVE_FABSL) # define _GLIBCXX_HAVE_FABSL 1 # define fabsl _fabsl #endif #if defined (_GLIBCXX_HAVE__FINITE) && ! defined (_GLIBCXX_HAVE_FINITE) # define _GLIBCXX_HAVE_FINITE 1 # define finite _finite #endif #if defined (_GLIBCXX_HAVE__FINITEF) && ! defined (_GLIBCXX_HAVE_FINITEF) # define _GLIBCXX_HAVE_FINITEF 1 # define finitef _finitef #endif #if defined (_GLIBCXX_HAVE__FINITEL) && ! defined (_GLIBCXX_HAVE_FINITEL) # define _GLIBCXX_HAVE_FINITEL 1 # define finitel _finitel #endif #if defined (_GLIBCXX_HAVE__FLOORF) && ! defined (_GLIBCXX_HAVE_FLOORF) # define _GLIBCXX_HAVE_FLOORF 1 # define floorf _floorf #endif #if defined (_GLIBCXX_HAVE__FLOORL) && ! defined (_GLIBCXX_HAVE_FLOORL) # define _GLIBCXX_HAVE_FLOORL 1 # define floorl _floorl #endif #if defined (_GLIBCXX_HAVE__FMODF) && ! defined (_GLIBCXX_HAVE_FMODF) # define _GLIBCXX_HAVE_FMODF 1 # define fmodf _fmodf #endif #if defined (_GLIBCXX_HAVE__FMODL) && ! defined (_GLIBCXX_HAVE_FMODL) # define _GLIBCXX_HAVE_FMODL 1 # define fmodl _fmodl #endif #if defined (_GLIBCXX_HAVE__FPCLASS) && ! defined (_GLIBCXX_HAVE_FPCLASS) # define _GLIBCXX_HAVE_FPCLASS 1 # define fpclass _fpclass #endif #if defined (_GLIBCXX_HAVE__FREXPF) && ! defined (_GLIBCXX_HAVE_FREXPF) # define _GLIBCXX_HAVE_FREXPF 1 # define frexpf _frexpf #endif #if defined (_GLIBCXX_HAVE__FREXPL) && ! defined (_GLIBCXX_HAVE_FREXPL) # define _GLIBCXX_HAVE_FREXPL 1 # define frexpl _frexpl #endif #if defined (_GLIBCXX_HAVE__HYPOT) && ! defined (_GLIBCXX_HAVE_HYPOT) # define _GLIBCXX_HAVE_HYPOT 1 # define hypot _hypot #endif #if defined (_GLIBCXX_HAVE__HYPOTF) && ! defined (_GLIBCXX_HAVE_HYPOTF) # define _GLIBCXX_HAVE_HYPOTF 1 # define hypotf _hypotf #endif #if defined (_GLIBCXX_HAVE__HYPOTL) && ! defined (_GLIBCXX_HAVE_HYPOTL) # define _GLIBCXX_HAVE_HYPOTL 1 # define hypotl _hypotl #endif #if defined (_GLIBCXX_HAVE__ISINF) && ! defined (_GLIBCXX_HAVE_ISINF) # define _GLIBCXX_HAVE_ISINF 1 # define isinf _isinf #endif #if defined (_GLIBCXX_HAVE__ISINFF) && ! defined (_GLIBCXX_HAVE_ISINFF) # define _GLIBCXX_HAVE_ISINFF 1 # define isinff _isinff #endif #if defined (_GLIBCXX_HAVE__ISINFL) && ! defined (_GLIBCXX_HAVE_ISINFL) # define _GLIBCXX_HAVE_ISINFL 1 # define isinfl _isinfl #endif #if defined (_GLIBCXX_HAVE__ISNAN) && ! defined (_GLIBCXX_HAVE_ISNAN) # define _GLIBCXX_HAVE_ISNAN 1 # define isnan _isnan #endif #if defined (_GLIBCXX_HAVE__ISNANF) && ! defined (_GLIBCXX_HAVE_ISNANF) # define _GLIBCXX_HAVE_ISNANF 1 # define isnanf _isnanf #endif #if defined (_GLIBCXX_HAVE__ISNANL) && ! defined (_GLIBCXX_HAVE_ISNANL) # define _GLIBCXX_HAVE_ISNANL 1 # define isnanl _isnanl #endif #if defined (_GLIBCXX_HAVE__LDEXPF) && ! defined (_GLIBCXX_HAVE_LDEXPF) # define _GLIBCXX_HAVE_LDEXPF 1 # define ldexpf _ldexpf #endif #if defined (_GLIBCXX_HAVE__LDEXPL) && ! defined (_GLIBCXX_HAVE_LDEXPL) # define _GLIBCXX_HAVE_LDEXPL 1 # define ldexpl _ldexpl #endif #if defined (_GLIBCXX_HAVE__LOG10F) && ! defined (_GLIBCXX_HAVE_LOG10F) # define _GLIBCXX_HAVE_LOG10F 1 # define log10f _log10f #endif #if defined (_GLIBCXX_HAVE__LOG10L) && ! defined (_GLIBCXX_HAVE_LOG10L) # define _GLIBCXX_HAVE_LOG10L 1 # define log10l _log10l #endif #if defined (_GLIBCXX_HAVE__LOGF) && ! defined (_GLIBCXX_HAVE_LOGF) # define _GLIBCXX_HAVE_LOGF 1 # define logf _logf #endif #if defined (_GLIBCXX_HAVE__LOGL) && ! defined (_GLIBCXX_HAVE_LOGL) # define _GLIBCXX_HAVE_LOGL 1 # define logl _logl #endif #if defined (_GLIBCXX_HAVE__MODF) && ! defined (_GLIBCXX_HAVE_MODF) # define _GLIBCXX_HAVE_MODF 1 # define modf _modf #endif #if defined (_GLIBCXX_HAVE__MODFF) && ! defined (_GLIBCXX_HAVE_MODFF) # define _GLIBCXX_HAVE_MODFF 1 # define modff _modff #endif #if defined (_GLIBCXX_HAVE__MODFL) && ! defined (_GLIBCXX_HAVE_MODFL) # define _GLIBCXX_HAVE_MODFL 1 # define modfl _modfl #endif #if defined (_GLIBCXX_HAVE__POWF) && ! defined (_GLIBCXX_HAVE_POWF) # define _GLIBCXX_HAVE_POWF 1 # define powf _powf #endif #if defined (_GLIBCXX_HAVE__POWL) && ! defined (_GLIBCXX_HAVE_POWL) # define _GLIBCXX_HAVE_POWL 1 # define powl _powl #endif #if defined (_GLIBCXX_HAVE__QFPCLASS) && ! defined (_GLIBCXX_HAVE_QFPCLASS) # define _GLIBCXX_HAVE_QFPCLASS 1 # define qfpclass _qfpclass #endif #if defined (_GLIBCXX_HAVE__SINCOS) && ! defined (_GLIBCXX_HAVE_SINCOS) # define _GLIBCXX_HAVE_SINCOS 1 # define sincos _sincos #endif #if defined (_GLIBCXX_HAVE__SINCOSF) && ! defined (_GLIBCXX_HAVE_SINCOSF) # define _GLIBCXX_HAVE_SINCOSF 1 # define sincosf _sincosf #endif #if defined (_GLIBCXX_HAVE__SINCOSL) && ! defined (_GLIBCXX_HAVE_SINCOSL) # define _GLIBCXX_HAVE_SINCOSL 1 # define sincosl _sincosl #endif #if defined (_GLIBCXX_HAVE__SINF) && ! defined (_GLIBCXX_HAVE_SINF) # define _GLIBCXX_HAVE_SINF 1 # define sinf _sinf #endif #if defined (_GLIBCXX_HAVE__SINHF) && ! defined (_GLIBCXX_HAVE_SINHF) # define _GLIBCXX_HAVE_SINHF 1 # define sinhf _sinhf #endif #if defined (_GLIBCXX_HAVE__SINHL) && ! defined (_GLIBCXX_HAVE_SINHL) # define _GLIBCXX_HAVE_SINHL 1 # define sinhl _sinhl #endif #if defined (_GLIBCXX_HAVE__SINL) && ! defined (_GLIBCXX_HAVE_SINL) # define _GLIBCXX_HAVE_SINL 1 # define sinl _sinl #endif #if defined (_GLIBCXX_HAVE__SQRTF) && ! defined (_GLIBCXX_HAVE_SQRTF) # define _GLIBCXX_HAVE_SQRTF 1 # define sqrtf _sqrtf #endif #if defined (_GLIBCXX_HAVE__SQRTL) && ! defined (_GLIBCXX_HAVE_SQRTL) # define _GLIBCXX_HAVE_SQRTL 1 # define sqrtl _sqrtl #endif #if defined (_GLIBCXX_HAVE__STRTOF) && ! defined (_GLIBCXX_HAVE_STRTOF) # define _GLIBCXX_HAVE_STRTOF 1 # define strtof _strtof #endif #if defined (_GLIBCXX_HAVE__STRTOLD) && ! defined (_GLIBCXX_HAVE_STRTOLD) # define _GLIBCXX_HAVE_STRTOLD 1 # define strtold _strtold #endif #if defined (_GLIBCXX_HAVE__TANF) && ! defined (_GLIBCXX_HAVE_TANF) # define _GLIBCXX_HAVE_TANF 1 # define tanf _tanf #endif #if defined (_GLIBCXX_HAVE__TANHF) && ! defined (_GLIBCXX_HAVE_TANHF) # define _GLIBCXX_HAVE_TANHF 1 # define tanhf _tanhf #endif #if defined (_GLIBCXX_HAVE__TANHL) && ! defined (_GLIBCXX_HAVE_TANHL) # define _GLIBCXX_HAVE_TANHL 1 # define tanhl _tanhl #endif #if defined (_GLIBCXX_HAVE__TANL) && ! defined (_GLIBCXX_HAVE_TANL) # define _GLIBCXX_HAVE_TANL 1 # define tanl _tanl #endif #endif // _GLIBCXX_CXX_CONFIG_H
6a8d501c77340a6a38bad3496ed2052174e21d8f
6634c7674d9ec318d0e3bb709d666d9982b9bb4d
/Word Extractor.cpp
9b1c51675c9a408100268165c9c740de68ad95ec
[]
no_license
sharma-harshit/String-Manipulation
6976df613df4ddd1d46bcbbef4a3a46e3d2a4e88
32a8f863dd03c35daf1c3f180beee37a4786d272
refs/heads/master
2021-08-11T13:09:26.688923
2017-11-13T19:05:55
2017-11-13T19:05:55
109,602,146
0
0
null
null
null
null
UTF-8
C++
false
false
591
cpp
#include<bits/stdc++.h> using namespace std; int main() { int T; cin>>T>>ws; while(T) { cout<<"Enter any String\n"; string s; getline(cin,s); vector<string> word; int start = 0 , length = 0 ; for( int i = 0 ; i < s.size() ; i++ ) { if( s[i] == 32 ) { word.push_back(s.substr(start,length)); start = i + 1 ; length = 0 ; } else { length++; } } word.push_back(s.substr(start,length)); for(int i = 0 ; i < word.size(); i++) { cout<<word[i]<<endl; } T--; } }
774b97ce5163266bf2172f4144e55d55b6327a8b
2465d5aac8230436d3a08383a722d6437e97ac40
/SDK/PUBG_BP_FppWeaponListSlotWidget_parameters.hpp
a645eb41350c79ccbfbed5ddffe7785188efe36d
[]
no_license
xuhao1/PUBG-SDK
9684baf0471678eaf366de3b3ca5f933ace357ab
5f0041ef5ad7f16111361316fa8dff1ad4647993
refs/heads/master
2021-08-14T13:32:37.783490
2017-11-15T20:56:12
2017-11-15T20:56:12
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,080
hpp
#pragma once // PlayerUnknown's Battlegrounds SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace Classes { //--------------------------------------------------------------------------- //Parameters //--------------------------------------------------------------------------- // Function BP_FppWeaponListSlotWidget.BP_FppWeaponListSlotWidget_C.HIddenEnd__DelegateSignature struct UBP_FppWeaponListSlotWidget_C_HIddenEnd__DelegateSignature_Params { }; // Function BP_FppWeaponListSlotWidget.BP_FppWeaponListSlotWidget_C.HIddenStart__DelegateSignature struct UBP_FppWeaponListSlotWidget_C_HIddenStart__DelegateSignature_Params { }; // Function BP_FppWeaponListSlotWidget.BP_FppWeaponListSlotWidget_C.ShowEnd__DelegateSignature struct UBP_FppWeaponListSlotWidget_C_ShowEnd__DelegateSignature_Params { }; // Function BP_FppWeaponListSlotWidget.BP_FppWeaponListSlotWidget_C.ShowStart__DelegateSignature struct UBP_FppWeaponListSlotWidget_C_ShowStart__DelegateSignature_Params { }; } #ifdef _MSC_VER #pragma pack(pop) #endif
26db013b00820261f6d96b5ca08dab834a93b885
10c74e341557163d8bab584e079f6f8343c16bf5
/src/types/std/map.h
0339f7dba855e861396333e9201ad0b7625e6ede
[ "BSD-2-Clause" ]
permissive
starsnet83/reflect
c2bbbd1ad82c0b3d72167515ecda1b6a136da0ba
af90b130958a884bec071e61a49e1ae1d5b036a2
refs/heads/master
2021-01-15T09:52:28.001196
2014-05-30T18:28:57
2014-05-30T18:28:57
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,880
h
/* map.h -*- C++ -*- Rémi Attab ([email protected]), 20 Apr 2014 FreeBSD-style copyright and disclaimer apply std::map reflection. */ #pragma once #include "reflect.h" #include "dsl/basics.h" #include "dsl/template.h" #include "dsl/function.h" #include "dsl/operators.h" #include <map> namespace reflect { /******************************************************************************/ /* REFLECT MAP */ /******************************************************************************/ template<typename KeyT, typename ValueT> struct Reflect< std::map<KeyT, ValueT> > { typedef std::map<KeyT, ValueT> T_; static std::string id() { return "std::map<" + typeId<KeyT>() + "," + typeId<ValueT>() + ">"; } reflectTemplateLoader() static void reflect(Type* type_) { reflectPlumbing(); reflectTrait(map); reflectCustom(keyType) { return type<KeyT>(); }; reflectCustom(valueType) { return type<ValueT>(); }; reflectFn(size); reflectCustom(count) (const T_& value, const KeyT& k) -> size_t { return value.count(k); }; reflectCustom(operator[]) (T_& value, const KeyT& k) -> ValueT& { return value[k]; }; reflectCustom(operator[]) (const T_& value, const KeyT& k) -> const ValueT& { auto it = value.find(k); if (it != value.end()) return it->second; reflectError("accessing unknown key in const map"); }; reflectCustom(keys) (const T_& value) -> std::vector<KeyT> { std::vector<KeyT> result; result.reserve(value.size()); for (auto& item : value) result.push_back(item.first); return result; }; } }; } // reflect
f9fda6c646b5702d720e807053eabb459d793d90
bd1fea86d862456a2ec9f56d57f8948456d55ee6
/000/108/131/CWE590_Free_Memory_Not_on_Heap__free_char_alloca_72a.cpp
13cc8f26c20083be07f59024edcbdbba7f0a3625
[]
no_license
CU-0xff/juliet-cpp
d62b8485104d8a9160f29213368324c946f38274
d8586a217bc94cbcfeeec5d39b12d02e9c6045a2
refs/heads/master
2021-03-07T15:44:19.446957
2020-03-10T12:45:40
2020-03-10T12:45:40
246,275,244
0
1
null
null
null
null
UTF-8
C++
false
false
3,176
cpp
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE590_Free_Memory_Not_on_Heap__free_char_alloca_72a.cpp Label Definition File: CWE590_Free_Memory_Not_on_Heap__free.label.xml Template File: sources-sink-72a.tmpl.cpp */ /* * @description * CWE: 590 Free Memory Not on Heap * BadSource: alloca Data buffer is allocated on the stack with alloca() * GoodSource: Allocate memory on the heap * Sinks: * BadSink : Print then free data * Flow Variant: 72 Data flow: data passed in a vector from one function to another in different source files * * */ #include "std_testcase.h" #include <vector> #include <wchar.h> using namespace std; namespace CWE590_Free_Memory_Not_on_Heap__free_char_alloca_72 { #ifndef OMITBAD /* bad function declaration */ void badSink(vector<char *> dataVector); void bad() { char * data; vector<char *> dataVector; data = NULL; /* Initialize data */ { /* FLAW: data is allocated on the stack and deallocated in the BadSink */ char * dataBuffer = (char *)ALLOCA(100*sizeof(char)); memset(dataBuffer, 'A', 100-1); /* fill with 'A's */ dataBuffer[100-1] = '\0'; /* null terminate */ data = dataBuffer; } /* Put data in a vector */ dataVector.insert(dataVector.end(), 1, data); dataVector.insert(dataVector.end(), 1, data); dataVector.insert(dataVector.end(), 1, data); badSink(dataVector); } #endif /* OMITBAD */ #ifndef OMITGOOD /* good function declarations */ /* goodG2B uses the GoodSource with the BadSink */ void goodG2BSink(vector<char *> dataVector); static void goodG2B() { char * data; vector<char *> dataVector; data = NULL; /* Initialize data */ { /* FIX: data is allocated on the heap and deallocated in the BadSink */ char * dataBuffer = (char *)malloc(100*sizeof(char)); if (dataBuffer == NULL) { printLine("malloc() failed"); exit(1); } memset(dataBuffer, 'A', 100-1); /* fill with 'A's */ dataBuffer[100-1] = '\0'; /* null terminate */ data = dataBuffer; } /* Put data in a vector */ dataVector.insert(dataVector.end(), 1, data); dataVector.insert(dataVector.end(), 1, data); dataVector.insert(dataVector.end(), 1, data); goodG2BSink(dataVector); } void good() { goodG2B(); } #endif /* OMITGOOD */ } /* close namespace */ /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN using namespace CWE590_Free_Memory_Not_on_Heap__free_char_alloca_72; /* so that we can use good and bad easily */ int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
426f68c53bced5807552fa86efc0fe899daf3d4e
3965b2090cee7584aec75aa60183753d5b13b397
/Random.h
bb102ab13e710372f86b9d59ea941274fde2228e
[]
no_license
kevinyan0619/osb3
cc622c8a4adf21e8df6c7967aec1ffcd5b1980c4
66a2e576e0d8a698a4711041bbe4835d24b866af
refs/heads/master
2020-03-22T15:51:53.192818
2018-07-12T17:44:06
2018-07-12T17:44:06
140,284,940
0
0
null
null
null
null
UTF-8
C++
false
false
377
h
/* * Random.h * * Created on: Jul 7, 2018 * Author: kevinyan */ #ifndef RANDOM_H_ #define RANDOM_H_ #include "pager.h" #include "string" #include "random_generator.h" using namespace std; class Random: public Pager { public: Random_generator grt; Random(const string&); FrameTableEntry* get_frame(FrameTable*, vector<Process*>&); }; #endif /* RANDOM_H_ */
[ "=" ]
=
236dee46f8db9be02e1b97aa463650cb839cc5f0
21897e6a8199c0c1c3c2fff8f4e656e40b411699
/src/gui/UMainWindow_gurt_sklad.cpp
c88dd93acfd9c0837467a7b87c5c2078431b1883
[]
no_license
utech/ugurtsklad
dd276ba8685d089e16a2a5f59ddab162461ba06e
4fec8708aec3277a68d51a6f91223f8a2f507edc
refs/heads/master
2021-01-13T01:55:00.195880
2012-09-16T09:01:43
2012-09-16T09:01:43
null
0
0
null
null
null
null
WINDOWS-1251
C++
false
false
6,182
cpp
//-------------------------------------------------------------------------------------------------------- // // Copyright (C) 2005-2007 Utech Company. All rights reserved. // // Файл з головною функцією програми обліку товарів на складі // // Створений програмістами Компанії "Утех" 15.01.2008р. // Використані компоненти бібліотеки QT4.3.1 // //-------------------------------------------------------------------------------------------------------- #include "UMainWindow_gurt_sklad.h" #include <QDir> #include <QMessageBox> #include "UDialog_katalog_tovaru_sklad.h" #include "UForm_Partnery_sklad.h" #include "UForm_VhidniNakladni.h" #include "UForm_VyhidniNakladni.h" #include "UDialog_dateGroupIdFilter.h" #include "UDialog_zbutFilter.h" #include "UPrintDocs_Sklad.h" #include "UDialogFirmInfo_sklad.h" #include "../main/UGlobal_Sklad.h" //--------------------utech--------------------utech--------------------utech-------------------- UMainWindow_gurt_sklad::UMainWindow_gurt_sklad(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); ui.tabWidget_sklad->removeTab(0); UForm_Partnery_sklad *partneryForm = new UForm_Partnery_sklad(ui.tabWidget_sklad); UForm_VhidniNakladni *vhNakladni = new UForm_VhidniNakladni(ui.tabWidget_sklad); UForm_VyhidniNakladni *vyhNakladni = new UForm_VyhidniNakladni(ui.tabWidget_sklad); ui.tabWidget_sklad->insertTab(0, new UDialog_katalog_tovaru(ui.tabWidget_sklad), "Довідник товарів" ); ui.tabWidget_sklad->insertTab(1, partneryForm, "Партнери" ); ui.tabWidget_sklad->insertTab(2, vhNakladni, "Вхідні накладні" ); ui.tabWidget_sklad->insertTab(3, vyhNakladni, "Вихідні накладні" ); connect(partneryForm, SIGNAL(partnersDovChanged()), vhNakladni, SLOT(setTableWidgetPartnerDelegate())); connect(partneryForm, SIGNAL(partnersDovChanged()), vyhNakladni, SLOT(setTableWidgetPartnerDelegate())); connect(this, SIGNAL(mainWindowClosed()), vhNakladni, SIGNAL(mainWindowClosed())); connect(this, SIGNAL(mainWindowClosed()), vyhNakladni, SIGNAL(mainWindowClosed())); connect(vhNakladni, SIGNAL(mainWindowClosedThis()), this, SLOT(close())); connect(vyhNakladni, SIGNAL(mainWindowClosedThis()), this, SLOT(close())); setAttribute(Qt::WA_DeleteOnClose); date = QDate::currentDate(); QDir::setCurrent(QCoreApplication::applicationDirPath()); QSettings *settings = new QSettings("./gurtSklad.ini", QSettings::IniFormat); ui.tabWidget_sklad->setCurrentIndex(settings->value("GUI/PrevTabNumber").toInt()); delete settings; tabWidget_sklad_currentChanged(); //connectors connect(ui.action_show_debuger, SIGNAL(activated()), this, SLOT(request_debuger_window())); connect(ui.action_close_program, SIGNAL(activated()), this, SLOT(close())); connect(ui.action_printObigIZalyshky, SIGNAL(activated()), this, SLOT(action_printObigIZalyshky_activated())); connect(ui.action_printVidomistZbutuExt, SIGNAL(activated()), this, SLOT(action_printVidomistZbutuExt_activated())); connect(ui.action_options, SIGNAL(activated()), this, SLOT(action_options_activated())); connect(ui.action_about_programm, SIGNAL(activated()), this, SLOT(action_about_programm_activated())); connect(ui.tabWidget_sklad, SIGNAL(currentChanged(int)), this, SLOT(tabWidget_sklad_currentChanged())); } //--------------------utech--------------------utech--------------------utech-------------------- void UMainWindow_gurt_sklad::request_debuger_window() { emit requestDebugWindow(); } //--------------------utech--------------------utech--------------------utech-------------------- void UMainWindow_gurt_sklad::tabWidget_sklad_currentChanged() { USkladTabWidget * w = qobject_cast<USkladTabWidget *>(ui.tabWidget_sklad->currentWidget()); if (w){ ui.toolBar_printDocks->clear(); w->populateToolBar(ui.toolBar_printDocks); } } //--------------------utech--------------------utech--------------------utech-------------------- void UMainWindow_gurt_sklad::action_printObigIZalyshky_activated() { UDialog_dateGroupIdFilter * d = new UDialog_dateGroupIdFilter(this); if (d->exec()){ UPrintDocs_Sklad *printDocs = new UPrintDocs_Sklad(); printDocs->print_obigIZalyshky(d->begDate(), d->endDate(), d->groupId(), d->notNullOnly()); connect(this, SIGNAL(mainWindowClosed()), printDocs->printform, SLOT(close())); delete printDocs; } delete d; } //--------------------utech--------------------utech--------------------utech-------------------- void UMainWindow_gurt_sklad::action_printVidomistZbutuExt_activated() { UDialog_zbutFilter * d = new UDialog_zbutFilter(this); if (d->exec()){ UPrintDocs_Sklad *printDocs = new UPrintDocs_Sklad(); printDocs->print_vidomistZbutuExt(d->begDate(), d->endDate(), d->groupId(), d->tovarId(), d->klientId(), d->nakladnaId()); connect(this, SIGNAL(mainWindowClosed()), printDocs->printform, SLOT(close())); delete printDocs; } delete d; } //--------------------utech--------------------utech--------------------utech-------------------- void UMainWindow_gurt_sklad::action_options_activated() { UDialogFirmInfo_sklad *d = new UDialogFirmInfo_sklad(); d->exec(); delete d; } //--------------------utech--------------------utech--------------------utech-------------------- void UMainWindow_gurt_sklad::action_about_programm_activated() { QMessageBox::about(this,"Про програму",QString("Програма ")+QString(USklad::programName())+" версії "+QString(USklad::version())+" призначення для ведення обліку складу підприємства."); } //--------------------utech--------------------utech--------------------utech-------------------- UMainWindow_gurt_sklad::~UMainWindow_gurt_sklad() { QDir::setCurrent(QCoreApplication::applicationDirPath()); QSettings *settings = new QSettings("./gurtSklad.ini", QSettings::IniFormat); settings->setValue("GUI/PrevTabNumber", ui.tabWidget_sklad->currentIndex()); delete settings; emit mainWindowClosed(); } //--------------------utech--------------------utech--------------------utech--------------------
c075007a6136925d0933e1e81bb46a2b94a904fe
f6cf14142621b8c4709c6f2073172f39577b1964
/common/lib/rec/robotino3/iocom/tag/Bumper.h
ec6cfbfd1917a9366312f86737858fb975eb4c71
[]
no_license
BusHero/robotino_api2
f3eef6c1ace2ff5a8b93db691aa779db8a9ce3a1
9757814871aa90977c2548a8a558f4b2cb015e5d
refs/heads/master
2021-06-18T21:32:14.390621
2021-02-18T15:21:48
2021-02-18T15:21:48
165,231,765
1
0
null
null
null
null
UTF-8
C++
false
false
1,616
h
#ifndef _REC_ROBOTINO3_IOCOM_TAG_Bumper_H_ #define _REC_ROBOTINO3_IOCOM_TAG_Bumper_H_ #include "rec/robotino3/serialio/Tag.h" #include "rec/robotino3/iocom/tag/BumperFwd.h" #include "rec/robotino3/iocom/tag/tagenum.h" namespace rec { namespace robotino3 { namespace iocom { namespace tag { class Bumper : public rec::robotino3::serialio::Tag { public: static BumperPointer create() { return BumperPointer( new Bumper ); } QString print() const { return QString( "TAG_BUMPER: %1" ).arg( (_hit?"hit":"not hit") ); } static BumperPointer decode( QIODevice* buffer ) { unsigned char ch = 0; if( buffer->getChar( (char*)&ch ) ) { if( 1 != ch ) { throw rec::robotino3::serialio::TagException( QString( "Bumper length=%1 not allowed" ).arg( (quint32)ch ) ); } QByteArray ba = buffer->read( ch ); if( ba.size() != ch ) { throw rec::robotino3::serialio::TagException( QString( "Bumper length=%1 but only %2 bytes left in body" ).arg( (quint32)ch ).arg( ba.size() ) ); } BumperPointer Bumper = create(); Bumper->_hit = ( (unsigned char)ba[0] != 0 ); return Bumper; } else { throw rec::robotino3::serialio::TagException( QString( "Error getting length of Bumper tag" ) ); } } bool hit() const { return _hit; } private: Bumper() : Tag( TAG_BUMPER ) , _hit( false ) { } bool _hit; }; } } } } #endif //_REC_ROBOTINO3_IOCOM_TAG_Bumper_H_
fe0af97a5f3f75439a821a9001940dbc5031dfd4
38c10c01007624cd2056884f25e0d6ab85442194
/components/history/core/browser/visit_database_unittest.cc
936bb24c0daa10aa833c013aa2c54e2a012ba792
[ "BSD-3-Clause" ]
permissive
zenoalbisser/chromium
6ecf37b6c030c84f1b26282bc4ef95769c62a9b2
e71f21b9b4b9b839f5093301974a45545dad2691
refs/heads/master
2022-12-25T14:23:18.568575
2016-07-14T21:49:52
2016-07-23T08:02:51
63,980,627
0
2
BSD-3-Clause
2022-12-12T12:43:41
2016-07-22T20:14:04
null
UTF-8
C++
false
false
22,232
cc
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <set> #include <vector> #include "base/files/file_path.h" #include "base/files/scoped_temp_dir.h" #include "base/strings/string_util.h" #include "base/time/time.h" #include "components/history/core/browser/url_database.h" #include "components/history/core/browser/visit_database.h" #include "sql/connection.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" using base::Time; using base::TimeDelta; namespace history { namespace { bool IsVisitInfoEqual(const VisitRow& a, const VisitRow& b) { return a.visit_id == b.visit_id && a.url_id == b.url_id && a.visit_time == b.visit_time && a.referring_visit == b.referring_visit && a.transition == b.transition; } } // namespace class VisitDatabaseTest : public PlatformTest, public URLDatabase, public VisitDatabase { public: VisitDatabaseTest() { } private: // Test setup. void SetUp() override { PlatformTest::SetUp(); ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); base::FilePath db_file = temp_dir_.path().AppendASCII("VisitTest.db"); EXPECT_TRUE(db_.Open(db_file)); // Initialize the tables for this test. CreateURLTable(false); CreateMainURLIndex(); InitVisitTable(); } void TearDown() override { db_.Close(); PlatformTest::TearDown(); } // Provided for URL/VisitDatabase. sql::Connection& GetDB() override { return db_; } base::ScopedTempDir temp_dir_; sql::Connection db_; }; TEST_F(VisitDatabaseTest, Add) { // Add one visit. VisitRow visit_info1(1, Time::Now(), 0, ui::PAGE_TRANSITION_LINK, 0); EXPECT_TRUE(AddVisit(&visit_info1, SOURCE_BROWSED)); // Add second visit for the same page. VisitRow visit_info2(visit_info1.url_id, visit_info1.visit_time + TimeDelta::FromSeconds(1), 1, ui::PAGE_TRANSITION_TYPED, 0); EXPECT_TRUE(AddVisit(&visit_info2, SOURCE_BROWSED)); // Add third visit for a different page. VisitRow visit_info3(2, visit_info1.visit_time + TimeDelta::FromSeconds(2), 0, ui::PAGE_TRANSITION_LINK, 0); EXPECT_TRUE(AddVisit(&visit_info3, SOURCE_BROWSED)); // Query the first two. std::vector<VisitRow> matches; EXPECT_TRUE(GetVisitsForURL(visit_info1.url_id, &matches)); EXPECT_EQ(static_cast<size_t>(2), matches.size()); // Make sure we got both (order in result set is visit time). EXPECT_TRUE(IsVisitInfoEqual(matches[0], visit_info1) && IsVisitInfoEqual(matches[1], visit_info2)); } TEST_F(VisitDatabaseTest, Delete) { // Add three visits that form a chain of navigation, and then delete the // middle one. We should be left with the outer two visits, and the chain // should link them. static const int kTime1 = 1000; VisitRow visit_info1(1, Time::FromInternalValue(kTime1), 0, ui::PAGE_TRANSITION_LINK, 0); EXPECT_TRUE(AddVisit(&visit_info1, SOURCE_BROWSED)); static const int kTime2 = kTime1 + 1; VisitRow visit_info2(1, Time::FromInternalValue(kTime2), visit_info1.visit_id, ui::PAGE_TRANSITION_LINK, 0); EXPECT_TRUE(AddVisit(&visit_info2, SOURCE_BROWSED)); static const int kTime3 = kTime2 + 1; VisitRow visit_info3(1, Time::FromInternalValue(kTime3), visit_info2.visit_id, ui::PAGE_TRANSITION_LINK, 0); EXPECT_TRUE(AddVisit(&visit_info3, SOURCE_BROWSED)); // First make sure all the visits are there. std::vector<VisitRow> matches; EXPECT_TRUE(GetVisitsForURL(visit_info1.url_id, &matches)); EXPECT_EQ(static_cast<size_t>(3), matches.size()); EXPECT_TRUE(IsVisitInfoEqual(matches[0], visit_info1) && IsVisitInfoEqual(matches[1], visit_info2) && IsVisitInfoEqual(matches[2], visit_info3)); // Delete the middle one. DeleteVisit(visit_info2); // The outer two should be left, and the last one should have the first as // the referrer. visit_info3.referring_visit = visit_info1.visit_id; matches.clear(); EXPECT_TRUE(GetVisitsForURL(visit_info1.url_id, &matches)); EXPECT_EQ(static_cast<size_t>(2), matches.size()); EXPECT_TRUE(IsVisitInfoEqual(matches[0], visit_info1) && IsVisitInfoEqual(matches[1], visit_info3)); } TEST_F(VisitDatabaseTest, Update) { // Make something in the database. VisitRow original(1, Time::Now(), 23, ui::PageTransitionFromInt(0), 19); AddVisit(&original, SOURCE_BROWSED); // Mutate that row. VisitRow modification(original); modification.url_id = 2; modification.transition = ui::PAGE_TRANSITION_TYPED; modification.visit_time = Time::Now() + TimeDelta::FromDays(1); modification.referring_visit = 9292; UpdateVisitRow(modification); // Check that the mutated version was written. VisitRow final; GetRowForVisit(original.visit_id, &final); EXPECT_TRUE(IsVisitInfoEqual(modification, final)); } // TODO(brettw) write test for GetMostRecentVisitForURL! namespace { std::vector<VisitRow> GetTestVisitRows() { // Tests can be sensitive to the local timezone, so use a local time as the // basis for all visit times. base::Time base_time = Time::UnixEpoch().LocalMidnight(); // Add one visit. VisitRow visit_info1(1, base_time + TimeDelta::FromMinutes(1), 0, ui::PageTransitionFromInt( ui::PAGE_TRANSITION_LINK | ui::PAGE_TRANSITION_CHAIN_START | ui::PAGE_TRANSITION_CHAIN_END), 0); visit_info1.visit_id = 1; // Add second visit for the same page. VisitRow visit_info2(visit_info1.url_id, visit_info1.visit_time + TimeDelta::FromSeconds(1), 1, ui::PageTransitionFromInt( ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_CHAIN_START | ui::PAGE_TRANSITION_CHAIN_END), 0); visit_info2.visit_id = 2; // Add third visit for a different page. VisitRow visit_info3(2, visit_info1.visit_time + TimeDelta::FromSeconds(2), 0, ui::PageTransitionFromInt( ui::PAGE_TRANSITION_LINK | ui::PAGE_TRANSITION_CHAIN_START), 0); visit_info3.visit_id = 3; // Add a redirect visit from the last page. VisitRow visit_info4(3, visit_info1.visit_time + TimeDelta::FromSeconds(3), visit_info3.visit_id, ui::PageTransitionFromInt( ui::PAGE_TRANSITION_SERVER_REDIRECT | ui::PAGE_TRANSITION_CHAIN_END), 0); visit_info4.visit_id = 4; // Add a subframe visit. VisitRow visit_info5(4, visit_info1.visit_time + TimeDelta::FromSeconds(4), visit_info4.visit_id, ui::PageTransitionFromInt( ui::PAGE_TRANSITION_AUTO_SUBFRAME | ui::PAGE_TRANSITION_CHAIN_START | ui::PAGE_TRANSITION_CHAIN_END), 0); visit_info5.visit_id = 5; // Add third visit for the same URL as visit 1 and 2, but exactly a day // later than visit 2. VisitRow visit_info6(visit_info1.url_id, visit_info2.visit_time + TimeDelta::FromDays(1), 1, ui::PageTransitionFromInt( ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_CHAIN_START | ui::PAGE_TRANSITION_CHAIN_END), 0); visit_info6.visit_id = 6; std::vector<VisitRow> test_visit_rows; test_visit_rows.push_back(visit_info1); test_visit_rows.push_back(visit_info2); test_visit_rows.push_back(visit_info3); test_visit_rows.push_back(visit_info4); test_visit_rows.push_back(visit_info5); test_visit_rows.push_back(visit_info6); return test_visit_rows; } } // namespace TEST_F(VisitDatabaseTest, GetVisitsForTimes) { std::vector<VisitRow> test_visit_rows = GetTestVisitRows(); for (size_t i = 0; i < test_visit_rows.size(); ++i) { EXPECT_TRUE(AddVisit(&test_visit_rows[i], SOURCE_BROWSED)); } // Query the visits for all our times. We should get all visits. { std::vector<base::Time> times; for (size_t i = 0; i < test_visit_rows.size(); ++i) { times.push_back(test_visit_rows[i].visit_time); } VisitVector results; GetVisitsForTimes(times, &results); EXPECT_EQ(test_visit_rows.size(), results.size()); } // Query the visits for a single time. for (size_t i = 0; i < test_visit_rows.size(); ++i) { std::vector<base::Time> times; times.push_back(test_visit_rows[i].visit_time); VisitVector results; GetVisitsForTimes(times, &results); ASSERT_EQ(static_cast<size_t>(1), results.size()); EXPECT_TRUE(IsVisitInfoEqual(results[0], test_visit_rows[i])); } } TEST_F(VisitDatabaseTest, GetAllVisitsInRange) { std::vector<VisitRow> test_visit_rows = GetTestVisitRows(); for (size_t i = 0; i < test_visit_rows.size(); ++i) { EXPECT_TRUE(AddVisit(&test_visit_rows[i], SOURCE_BROWSED)); } // Query the visits for all time. We should get all visits. VisitVector results; GetAllVisitsInRange(Time(), Time(), 0, &results); ASSERT_EQ(test_visit_rows.size(), results.size()); for (size_t i = 0; i < test_visit_rows.size(); ++i) { EXPECT_TRUE(IsVisitInfoEqual(results[i], test_visit_rows[i])); } // Query a time range and make sure beginning is inclusive and ending is // exclusive. GetAllVisitsInRange(test_visit_rows[1].visit_time, test_visit_rows[3].visit_time, 0, &results); ASSERT_EQ(static_cast<size_t>(2), results.size()); EXPECT_TRUE(IsVisitInfoEqual(results[0], test_visit_rows[1])); EXPECT_TRUE(IsVisitInfoEqual(results[1], test_visit_rows[2])); // Query for a max count and make sure we get only that number. GetAllVisitsInRange(Time(), Time(), 1, &results); ASSERT_EQ(static_cast<size_t>(1), results.size()); EXPECT_TRUE(IsVisitInfoEqual(results[0], test_visit_rows[0])); } TEST_F(VisitDatabaseTest, GetVisibleVisitsInRange) { std::vector<VisitRow> test_visit_rows = GetTestVisitRows(); for (size_t i = 0; i < test_visit_rows.size(); ++i) { EXPECT_TRUE(AddVisit(&test_visit_rows[i], SOURCE_BROWSED)); } // Query the visits for all time. We should not get the first or the second // visit (duplicates of the sixth) or the redirect or subframe visits. VisitVector results; QueryOptions options; GetVisibleVisitsInRange(options, &results); ASSERT_EQ(static_cast<size_t>(2), results.size()); EXPECT_TRUE(IsVisitInfoEqual(results[0], test_visit_rows[5])); EXPECT_TRUE(IsVisitInfoEqual(results[1], test_visit_rows[3])); // Now try with only per-day de-duping -- the second visit should appear, // since it's a duplicate of visit6 but on a different day. options.duplicate_policy = QueryOptions::REMOVE_DUPLICATES_PER_DAY; GetVisibleVisitsInRange(options, &results); ASSERT_EQ(static_cast<size_t>(3), results.size()); EXPECT_TRUE(IsVisitInfoEqual(results[0], test_visit_rows[5])); EXPECT_TRUE(IsVisitInfoEqual(results[1], test_visit_rows[3])); EXPECT_TRUE(IsVisitInfoEqual(results[2], test_visit_rows[1])); // Now try without de-duping, expect to see all visible visits. options.duplicate_policy = QueryOptions::KEEP_ALL_DUPLICATES; GetVisibleVisitsInRange(options, &results); ASSERT_EQ(static_cast<size_t>(4), results.size()); EXPECT_TRUE(IsVisitInfoEqual(results[0], test_visit_rows[5])); EXPECT_TRUE(IsVisitInfoEqual(results[1], test_visit_rows[3])); EXPECT_TRUE(IsVisitInfoEqual(results[2], test_visit_rows[1])); EXPECT_TRUE(IsVisitInfoEqual(results[3], test_visit_rows[0])); // Set the end time to exclude the second visit. The first visit should be // returned. Even though the second is a more recent visit, it's not in the // query range. options.end_time = test_visit_rows[1].visit_time; GetVisibleVisitsInRange(options, &results); ASSERT_EQ(static_cast<size_t>(1), results.size()); EXPECT_TRUE(IsVisitInfoEqual(results[0], test_visit_rows[0])); options = QueryOptions(); // Reset to options to default. // Query for a max count and make sure we get only that number. options.max_count = 1; GetVisibleVisitsInRange(options, &results); ASSERT_EQ(static_cast<size_t>(1), results.size()); EXPECT_TRUE(IsVisitInfoEqual(results[0], test_visit_rows[5])); // Query a time range and make sure beginning is inclusive and ending is // exclusive. options.begin_time = test_visit_rows[1].visit_time; options.end_time = test_visit_rows[3].visit_time; options.max_count = 0; GetVisibleVisitsInRange(options, &results); ASSERT_EQ(static_cast<size_t>(1), results.size()); EXPECT_TRUE(IsVisitInfoEqual(results[0], test_visit_rows[1])); } TEST_F(VisitDatabaseTest, VisitSource) { // Add visits. VisitRow visit_info1(111, Time::Now(), 0, ui::PAGE_TRANSITION_LINK, 0); ASSERT_TRUE(AddVisit(&visit_info1, SOURCE_BROWSED)); VisitRow visit_info2(112, Time::Now(), 1, ui::PAGE_TRANSITION_TYPED, 0); ASSERT_TRUE(AddVisit(&visit_info2, SOURCE_SYNCED)); VisitRow visit_info3(113, Time::Now(), 0, ui::PAGE_TRANSITION_TYPED, 0); ASSERT_TRUE(AddVisit(&visit_info3, SOURCE_EXTENSION)); // Query each visit. std::vector<VisitRow> matches; ASSERT_TRUE(GetVisitsForURL(111, &matches)); ASSERT_EQ(1U, matches.size()); VisitSourceMap sources; GetVisitsSource(matches, &sources); EXPECT_EQ(0U, sources.size()); ASSERT_TRUE(GetVisitsForURL(112, &matches)); ASSERT_EQ(1U, matches.size()); GetVisitsSource(matches, &sources); ASSERT_EQ(1U, sources.size()); EXPECT_EQ(SOURCE_SYNCED, sources[matches[0].visit_id]); ASSERT_TRUE(GetVisitsForURL(113, &matches)); ASSERT_EQ(1U, matches.size()); GetVisitsSource(matches, &sources); ASSERT_EQ(1U, sources.size()); EXPECT_EQ(SOURCE_EXTENSION, sources[matches[0].visit_id]); } TEST_F(VisitDatabaseTest, GetVisibleVisitsForURL) { std::vector<VisitRow> test_visit_rows = GetTestVisitRows(); for (size_t i = 0; i < test_visit_rows.size(); ++i) { EXPECT_TRUE(AddVisit(&test_visit_rows[i], SOURCE_BROWSED)); } // Query the visits for the first url id. We should not get the first or the // second visit (duplicates of the sixth) or any other urls, redirects or // subframe visits. VisitVector results; QueryOptions options; int url_id = test_visit_rows[0].url_id; GetVisibleVisitsForURL(url_id, options, &results); ASSERT_EQ(static_cast<size_t>(1), results.size()); EXPECT_TRUE(IsVisitInfoEqual(results[0], test_visit_rows[5])); // Now try with only per-day de-duping -- the second visit should appear, // since it's a duplicate of visit6 but on a different day. options.duplicate_policy = QueryOptions::REMOVE_DUPLICATES_PER_DAY; GetVisibleVisitsForURL(url_id, options, &results); ASSERT_EQ(static_cast<size_t>(2), results.size()); EXPECT_TRUE(IsVisitInfoEqual(results[0], test_visit_rows[5])); EXPECT_TRUE(IsVisitInfoEqual(results[1], test_visit_rows[1])); // Now try without de-duping, expect to see all visible visits to url id 1. options.duplicate_policy = QueryOptions::KEEP_ALL_DUPLICATES; GetVisibleVisitsForURL(url_id, options, &results); ASSERT_EQ(static_cast<size_t>(3), results.size()); EXPECT_TRUE(IsVisitInfoEqual(results[0], test_visit_rows[5])); EXPECT_TRUE(IsVisitInfoEqual(results[1], test_visit_rows[1])); EXPECT_TRUE(IsVisitInfoEqual(results[2], test_visit_rows[0])); } TEST_F(VisitDatabaseTest, GetHistoryCount) { // Start with a day in the middle of summer, so that we are nowhere near // DST shifts. Time today; ASSERT_TRUE(Time::FromString("2015-07-07", &today)); Time yesterday = today - TimeDelta::FromDays(1); Time two_days_ago = yesterday - TimeDelta::FromDays(1); Time now = two_days_ago; ui::PageTransition standard_transition = ui::PageTransitionFromInt( ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_CHAIN_START | ui::PAGE_TRANSITION_CHAIN_END); // Add 5 visits (3 distinct URLs) for the day before yesterday. // Whether the URL was browsed on this machine or synced has no effect. VisitRow first_day_1(1, now, 0, standard_transition, 0); first_day_1.visit_id = 1; AddVisit(&first_day_1, SOURCE_BROWSED); now += TimeDelta::FromHours(1); VisitRow first_day_2(2, now, 0, standard_transition, 0); first_day_2.visit_id = 2; AddVisit(&first_day_2, SOURCE_BROWSED); now += TimeDelta::FromHours(1); VisitRow first_day_3(1, now, 0, standard_transition, 0); first_day_3.visit_id = 3; AddVisit(&first_day_3, SOURCE_SYNCED); now += TimeDelta::FromHours(1); VisitRow first_day_4(3, now, 0, standard_transition, 0); first_day_4.visit_id = 4; AddVisit(&first_day_4, SOURCE_SYNCED); now += TimeDelta::FromHours(1); VisitRow first_day_5(2, now, 0, standard_transition, 0); first_day_5.visit_id = 5; AddVisit(&first_day_5, SOURCE_BROWSED); now += TimeDelta::FromHours(1); // Add 4 more visits for yesterday. One of them is invalid, as it's not // a user-visible navigation. Of the remaining 3, only 2 are unique. now = yesterday; VisitRow second_day_1(1, now, 0, standard_transition, 0); second_day_1.visit_id = 6; AddVisit(&second_day_1, SOURCE_BROWSED); now += TimeDelta::FromHours(1); VisitRow second_day_2(1, now, 0, standard_transition, 0); second_day_2.visit_id = 7; AddVisit(&second_day_2, SOURCE_BROWSED); now += TimeDelta::FromHours(1); VisitRow second_day_3(2, now, 0, ui::PAGE_TRANSITION_AUTO_SUBFRAME, 0); second_day_3.visit_id = 8; AddVisit(&second_day_3, SOURCE_BROWSED); now += TimeDelta::FromHours(1); VisitRow second_day_4(3, now, 0, standard_transition, 0); second_day_4.visit_id = 9; AddVisit(&second_day_4, SOURCE_BROWSED); now += TimeDelta::FromHours(1); int result; // There were 3 distinct URLs two days ago. EXPECT_TRUE(GetHistoryCount(two_days_ago, yesterday, &result)); EXPECT_EQ(3, result); // For both previous days, there should be 5 per-day unique URLs. EXPECT_TRUE(GetHistoryCount(two_days_ago, today, &result)); EXPECT_EQ(5, result); // Since we only have entries for the two previous days, the infinite time // range should yield the same result. EXPECT_TRUE(GetHistoryCount(Time(), Time::Max(), &result)); EXPECT_EQ(5, result); // Narrowing the range to exclude |first_day_1| will still return 5, // because |first_day_1| is not unique. EXPECT_TRUE(GetHistoryCount( two_days_ago + TimeDelta::FromHours(2), today, &result)); EXPECT_EQ(5, result); // Narrowing the range to exclude |second_day_4| will return 4, // because |second_day_4| is unique. EXPECT_TRUE(GetHistoryCount( two_days_ago, yesterday + TimeDelta::FromHours(3), &result)); EXPECT_EQ(4, result); // Narrowing the range to exclude both |first_day_1| and |second_day_4| will // still return 4. EXPECT_TRUE(GetHistoryCount(two_days_ago + TimeDelta::FromHours(2), yesterday + TimeDelta::FromHours(3), &result)); EXPECT_EQ(4, result); // A range that contains no visits will return 0. EXPECT_TRUE(GetHistoryCount(two_days_ago + TimeDelta::FromMicroseconds(1), two_days_ago + TimeDelta::FromHours(1), &result)); EXPECT_EQ(0, result); // If this timezone uses DST, test the behavior on days when the time // is shifted forward and backward. Note that in this case we cannot use // TimeDelta::FromDays(1) to move one day, as this simply removes 24 hours and // thus does not work correctly with DST shifts. Instead, we'll go back // 1 second (i.e. somewhere in the middle of the previous day), and use // |LocalMidnight()| to round down to the beginning of the day in the local // time, taking timezones and DST into account. This is necessary to achieve // the same equivalence class on days as the DATE(..., 'localtime') function // in SQL. Time shift_forward; Time shift_backward; Time current_day = (two_days_ago - TimeDelta::FromSeconds(1)).LocalMidnight(); for (int i = 0; i < 366; i++) { current_day = (current_day - TimeDelta::FromSeconds(1)).LocalMidnight(); Time after_24_hours = current_day + TimeDelta::FromHours(24); if (current_day == after_24_hours.LocalMidnight()) { // More than 24 hours. Shift backward. shift_backward = current_day; } else if (after_24_hours > after_24_hours.LocalMidnight()) { // Less than 24 hours. Shift forward. shift_forward = current_day; } if (!shift_backward.is_null() && !shift_forward.is_null()) break; } // Test the backward shift. Add two visits for the same page on midnight and // 24 hours later. The count should be 1, not 2, because the day is longer // than 24 hours, and the two visits will be regarded as duplicate. if (!shift_backward.is_null()) { VisitRow backward_1(1, shift_backward, 0, standard_transition, 0); backward_1.visit_id = 10; AddVisit(&backward_1, SOURCE_BROWSED); VisitRow backward_2(1, shift_backward + TimeDelta::FromHours(24), 0, standard_transition, 0); backward_2.visit_id = 11; AddVisit(&backward_2, SOURCE_BROWSED); EXPECT_TRUE(GetHistoryCount(shift_backward, shift_backward + TimeDelta::FromHours(25), &result)); EXPECT_EQ(1, result); } // Test the forward shift. Add two visits for the same page at midnight and // almost 24 hours later. The count should be 2, not 1. The visits would be // regarded as duplicate in a normal 24 hour day, but in this case the second // visit is already in the next day. if (!shift_forward.is_null()) { VisitRow forward_1(1, shift_forward, 0, standard_transition, 0); forward_1.visit_id = 12; AddVisit(&forward_1, SOURCE_BROWSED); Time almost_24_hours_later = shift_forward + TimeDelta::FromHours(24) - TimeDelta::FromMicroseconds(1); VisitRow forward_2(1, almost_24_hours_later, 0, standard_transition, 0); forward_2.visit_id = 13; AddVisit(&forward_2, SOURCE_BROWSED); EXPECT_TRUE(GetHistoryCount(shift_forward, shift_forward + TimeDelta::FromHours(24), &result)); EXPECT_EQ(2, result); } } } // namespace history
eda95f6676169cf771bc0bcd037f48fe594d0567
e0171d0ab478799c545016d67ccbc964fd11520a
/ゲッターとセッター/block.cpp
5355c7a7a2d0bd998451f9a7f16a5799fc1c3105
[]
no_license
ryou62525/practice_code
2528ec60c9b90d207ef42d239efe84a3e6c58370
c48eed5a83e29fa78ec9c334dadf61d7bfa44c25
refs/heads/master
2021-01-10T03:54:26.282607
2016-01-28T02:06:59
2016-01-28T02:06:59
43,240,829
0
1
null
null
null
null
UTF-8
C++
false
false
366
cpp
#include "block.h" Block::Block() { pos = Vec2f(100, 100); size = Vec2f(32, 32); key_color = Color::blue; } void Block::update() { } void Block::setColor(Color color) { key_color = color; } void Block::draw() { drawFillBox(pos.x(), pos.y(), size.x(), size.y(), key_color); } Vec2f Block::getPos() { return pos; } Vec2f Block::getSize() { return size; }
5f344d04ee3abdd4064cbeb555d8b767e232645e
08b8cf38e1936e8cec27f84af0d3727321cec9c4
/data/crawl/squid/old_hunk_3740.cpp
03411b71599aad19052264c2c0af4d05555c9592
[]
no_license
ccdxc/logSurvey
eaf28e9c2d6307140b17986d5c05106d1fd8e943
6b80226e1667c1e0760ab39160893ee19b0e9fb1
refs/heads/master
2022-01-07T21:31:55.446839
2018-04-21T14:12:43
2018-04-21T14:12:43
null
0
0
null
null
null
null
UTF-8
C++
false
false
221
cpp
const String host = s.cfg().host; buf.Printf("Host: " SQUIDSTRINGPH ":%d\r\n", SQUIDSTRINGPRINT(host), s.cfg().port); buf.append(ICAP::crlf, 2); } void Adaptation::Icap::OptXact::handleCommWrote(size_t size)
1114274a2cf5977545d9bb2676dd8796ef3c3212
7f30cb109e574560873a5eb8bb398c027f85eeee
/src/wxPacsListBox.h
a1ffcff95788d76dd796669f322eb9882fbaeb6f
[]
no_license
svn2github/MITO
e8fd0e0b6eebf26f2382f62660c06726419a9043
71d1269d7666151df52d6b5a98765676d992349a
refs/heads/master
2021-01-10T03:13:55.083371
2011-10-14T15:40:14
2011-10-14T15:40:14
47,415,786
1
0
null
null
null
null
UTF-8
C++
false
false
2,360
h
/** * \file wxPacsListBox.h * \brief File per la gestione di una lista per la memorizzazione di informazioni provenienti dal PACS * \author ICAR-CNR Napoli */ #ifndef _wxPacsListBox_h_ #define _wxPacsListBox_h_ // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" #include "wx/listbox.h" #ifndef WX_PRECOMP #include "wx/wx.h" #endif /** * \brief Struttura che definisce un campo della lista */ struct PacsObject { wxString str; void* data; PacsObject* next; }; /** * \brief Definizione di un puntatore alla struttura PacsObject */ typedef PacsObject* Ptr; /** * \class wxPacsListBox * \brief Classe atta alla gestione di una lista. Deriva da wxListBox */ class wxPacsListBox : public wxListBox { private: /** * \var Ptr ptrPacsObject * \brief Puntatore alla struttura PacsObject */ Ptr ptrPacsObject; /** * \fn void* GetPacsDataRic(const Ptr p, const wxString str) * \brief Ottiene un dato dalla lista attraverso una ricerca ricorsiva * \param p Puntatore alla lista corrente * \param str Stringa da ricercare * \return Il dato trovato */ void* GetPacsDataRic(const Ptr p, const wxString str); public: /** Costruttore con parametri la finestra padre, l'identificativo, il titolo, la posizione, la dimensione, lo stile, il validator e il nome della finestra */ wxPacsListBox(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "listBox"); /** Distruttore */ ~wxPacsListBox(); /** * \fn void Add(const wxString str, void* data) * \brief Aggiunge un campo nella lista * \param str Stringa da inserire * \param data Dato da inserire */ void Add(const wxString str, void* data); /** * \fn void Add(const wxString str, void* data) * \brief Restituisce un elemento dalla lista, invocando il metodo privato GetPacsDataRic * \param str Stringa da ricercare * \return Il dato trovato */ void* GetPacsData(const wxString str); /** * \fn void Add(const wxString str, void* data) * \brief Restituisce il puntatore alla lista * \return Il puntatore alla lista */ inline Ptr GetPtrObject() const { return ptrPacsObject; } }; #endif _wxPacsListBox_h_
[ "kg_dexterp37@fde90bc1-0431-4138-8110-3f8199bc04de" ]
kg_dexterp37@fde90bc1-0431-4138-8110-3f8199bc04de
732b298316f9631e151dfba4d819d6fe9672daae
bd28405fc99ddebb04739e4be8f4fa79fb83a94d
/proj05/List.h
527a06251c4125ba9d4f87f5fac2777eb0582a92
[]
no_license
aafabiano01/cs112
8d2747a5eb1f4328791e4773f38b9dad0a935f87
815677e03d68dc72505877c94c8c42e416a8b542
refs/heads/master
2021-01-15T03:15:43.428670
2020-02-24T22:51:17
2020-02-24T22:51:17
242,860,494
0
0
null
null
null
null
UTF-8
C++
false
false
11,710
h
/* List.h declares and defines methods * Student Names: Benedict Jojo Arthur (TM 1) & ALexander Fabiano (TM 2) * Date:10/14/2019 * Proj 05 * */ #ifndef LIST_H_ #define LIST_H_ #include <iostream> #include <stdexcept> #include <cassert> #include <string> #include <sstream> #include <fstream> #include <cstdlib> using namespace std; typedef double Item; template <class Item> class List { public: List(); unsigned getSize() const; Item getFirst() const; Item getLast() const; void append(Item it); ~List(); List(const List<Item>& original); List<Item>& operator=(const List<Item>& l2); bool operator==(const List<Item>& l2); void readFrom(istream& cin); void writeTo(const string& fileName); void prepend(Item it); void insert(Item it, int index); bool operator!=(const List& original) const; void writeTo(ostream& out, string separate) const; void readFrom(const string fileName); int getIndexOf(const Item lookingFor) const; Item remove(unsigned index); private: unsigned mySize; struct Node { Node(); Node(Item it, Node* next); Item myItem; Node* myNext; ~Node(); }; Node* myFirst; Node* myLast; friend class ListTester; }; template <class Item> List<Item>::List() { mySize = 0; myFirst = NULL; myLast = NULL; } template <class Item> List<Item>::Node::Node() { myItem = 0; myNext = NULL; } template <class Item> List<Item>::Node::Node(Item it, Node* next) { myItem = it; myNext = next; } template <class Item> unsigned List<Item>::getSize() const { return mySize; } template <class Item> Item List<Item>::getFirst() const { if (mySize != 0) { return myFirst->myItem; } else { throw underflow_error("Cannot access values because list is empty"); } } template <class Item> Item List<Item>::getLast() const { if (mySize != 0) { return myLast->myItem; } else { throw underflow_error("Cannot access values because list is empty"); } } template <class Item> void List<Item>::append(Item it) { List::Node* newNodePtr = new List::Node(it, NULL); if (mySize == 0) { myFirst = newNodePtr; } else { myLast->myNext = newNodePtr; } myLast = newNodePtr; mySize++; } template <class Item> List<Item>::Node::~Node() { delete myNext; } template <class Item> List<Item>::~List() { delete myFirst; myFirst = myLast = NULL; mySize = 0; } template <class Item> List<Item>::List(const List& original) { myFirst = myLast = NULL; mySize = 0; if (original.mySize > 0) { Node* oPtr = original.myFirst; while (oPtr != NULL) { append(oPtr->myItem); oPtr = oPtr->myNext; } } } template <class Item> List<Item>& List<Item>::operator=(const List& original) { if (this != &original) { delete myFirst; mySize = 0; myFirst = myLast = NULL; if (original.mySize != 0) { Node* oPtr = original.myFirst; while (oPtr != NULL) { append(oPtr->myItem); oPtr = oPtr->myNext; } } } return *this; } /* Equality * @params: l2(const List<Item>) * Postcondition: Returns true if list objects are the same * Done By: Benedict Jojo Arthur */ template <class Item> bool List<Item>::operator==(const List<Item>& l2) { if (mySize != l2.mySize) { return false; } else { Node* myPtr = myFirst; Node* l2Ptr = l2.myFirst; while (myPtr != NULL) { if (myPtr->myItem != l2Ptr->myItem) { return false; } l2Ptr = l2Ptr->myNext; myPtr = myPtr->myNext; } return true; } } /* Stream Input * @params: cin (istream) * Postcondition: Reads users values and appends to a lists * Done By: Benedict Jojo Arthur */ template <class Item> void List<Item>::readFrom(istream& cin) { string line; getline(cin, line); stringstream streamLine(line); Item user; while (streamLine >> user) { append(user); } } /* File Output * @params: fileName (const string) * Postcondition: Outputs values in a list to a file * Done By: Benedict Jojo Arthur */ template <class Item> void List<Item>::writeTo(const string& fileName) { ofstream fout(fileName.c_str()); Node* myPtr = myFirst; for (unsigned i = 0; i < mySize; i++) { fout << myPtr->myItem << endl; myPtr = myPtr->myNext; } fout.close(); } /* Prepend * @params: it (Item) * Postcondition: Inserts it at the beginning of aList * Done By: Benedict Jojo Arthur */ template <class Item> void List<Item>::prepend(Item it) { Node* newNodePtr = new List<Item>::Node(it, NULL); if (mySize == 0) { myLast = newNodePtr; } else { newNodePtr->myNext = myFirst; } myFirst = newNodePtr; mySize++; } /* Insertion * @params: it (Item), index (int) * Postcondition: insert item it into aList at index index * Done By: Benedict Jojo Arthur */ template <class Item> void List<Item>::insert(Item it, int index) { if (index <= 0 || mySize == 0) { prepend(it); } else if (index >= mySize) { append(it); } else { Node* tempPtr = myFirst; for (unsigned i = 0; i < index-1; ++i) { tempPtr = tempPtr->myNext; } Node* newNodePtr = new List<Item>::Node(it, tempPtr->myNext); tempPtr->myNext = newNodePtr; mySize++; } } /* * operator!=() determines whether or not two lists are equal. * param: List to compare to other list. * precondition: none. * return: true or false, true if they are not equal, false if equal. * postcondition: neither lists are changed. * Made by Alex Fabiano */ template <class Item> bool List<Item>::operator!=(const List& original) const { if (mySize != original.mySize) { return true; } else { Node *ogPointer = original.myFirst; Node *myPointer = myFirst; for (unsigned i = 0; i < mySize; ++i) { if (ogPointer->myItem != myPointer->myItem){ return true; } ogPointer = ogPointer->myNext; myPointer = myPointer->myNext; } } return false; } /* * writeTo() writes a list to an ostream. * param: ostream to write to, separator between values. * precondition: ostream is already open. * return: nothing. * postcondition: the list is not changed, and it has now been printed * to the ostream given. * Made by Alex Fabiano */ template <class Item> void List<Item>::writeTo(ostream& out, string separate) const { Node *myPointer = myFirst; for (unsigned i = 0; i < mySize; ++i) { out << myPointer->myItem << separate; myPointer = myPointer->myNext; } } /* * readFrom() reads items from a file and makes a list out of them. * param: name of file with extension. * precondition: file exists. * return: nothing. * postcondition: the array readFrom() was enacted on is now a copy * of all the values in the file. * Made by Alex Fabiano */ template <class Item> void List<Item>::readFrom(const string fileName) { Item pickyAppend; /* * I named the item pickyAppend because I was mad, now I can't even * remember why I did. */ ifstream bin(fileName); assert( bin.is_open() ); /* * I open two streams, one acts as a counter, while the other takes in * values. * Because cin automatically increments to the next value, it can't be * used as both the counter and the method by which values are stored. */ ifstream fin(fileName); assert( fin.is_open() ); while ( bin >> pickyAppend ) { fin >> pickyAppend; append(pickyAppend); } } /* * getIndexOf() finds the index of a node given its item value. * param: Item to look for. * precondition: none. * return: The index of the item, or where it was first found if there are * more than one. -1 if the item was not found. * postcondition: the array is not changed. * Made by Alex Fabiano */ template <class Item> int List<Item>::getIndexOf(const Item lookingFor) const { int counter = 0; Node *myPointer = myFirst; for (unsigned i = 0; i < mySize; ++i) { if (lookingFor == myPointer->myItem) { return counter; } counter++; myPointer = myPointer->myNext; } return -1; } /* * remove() removes a node from a list of nodes. * param: index at which the node is to be removed. * precondition: none. * return: none. * postcondition: the array remove was enacted on has one less value * and whichever index was chosen is removed. * Made by Alex Fabiano */ template <class Item> Item List<Item>::remove(unsigned index) { if (mySize == 0) { /* * If size of List is 0, return -1 as the item at the position of the deletion * because nothing was there. * Very important that this goes first, because trying to do normal methods * on a completely null list causes some problems. */ return -1; } Item itemHolder = myFirst->myItem; Node *myPointer = myFirst; for (unsigned i = 0; i < index; i++) { /* * Finds value to return for deleted Item. * itemHolder will be the value at the index that was deleted. */ itemHolder = myPointer->myItem; myPointer = myPointer->myNext; } if (mySize == 1) { /* * Deleting the only value in a list makes it an empty list. * Outside of main if statement because its a special case. */ delete myFirst; myFirst = myLast = NULL; mySize = 0; return itemHolder; } Node *temp = new Node; if (index >= mySize) { //Deleting tail. Node *prev = myFirst; /* * Always two steps ahead... * Basically, the node prev will only advance if the value it will * advance to, as well as that value's next value are both not null. * If they are, because prev's next's next is null, it must mean * prev's next is the last value in the list. * So prev's next is "freed" (like a delete without calling the * destructor) and prev's myNext pointer becomes null, showing that * prev is now the last value in the list. */ while (prev->myNext->myNext != NULL) { prev = prev->myNext; } free(prev->myNext); prev->myNext = NULL; } else if (index == 0){ //Deleting head. temp = myFirst; myFirst = myFirst->myNext; free(temp); /* * Temp is a node, but also kind of an alias for the value at myFirst. * Setting temp equal to myFirst sets temp as an alias to the node that * is referenced by myFirst, so that way, when we change the pointer * myFirst to be pointing to the second node in the list, we still have * a way to get at the first value in the list and delete it so it is not * leaked. * 'Freeing' is a lot more important in this case, because if the * destructor was called, it would destroy every node in the list. */ } else { //Deleting from random position. temp = myFirst; Node *post; for (unsigned i = 0; i < index -1; ++i) { temp = temp->myNext; } /* * Temp is stopped one node before the node that is to be deleted. * Post is set to the node to be deleted. * Temp's myNext pointer is set to point to the node after post, the * node to be deleted. * Like before, post allows us to have a handle on a value that would * otherwise be marooned. * The value before post now points to the value after post. * When we free post, the destructor is not called, and the memory leak * is avoided. */ post = temp->myNext; temp->myNext = post->myNext; free(post); } mySize--; return itemHolder; } #endif /* LIST_H_ */
7cd4638524f4e9e0948dd55d33c2d56fe2d8c939
2ee4cf29eb351be6dbca38a61c1c97269751b44e
/CG_HW4_framework/CG_HW4/CG_HW4/main.cpp
932d5182287233e1de35031a934a765ce264bdb3
[]
no_license
clotha87762/Basic-Computer-Graphics
3071fb87781b0f1b2e785920f24575d87eb5e4e4
87b3ab378b19132e251b04767cfc5acb56d8d22b
refs/heads/master
2020-03-24T09:23:58.928515
2018-07-27T22:26:58
2018-07-27T22:26:58
142,628,252
0
0
null
null
null
null
UTF-8
C++
false
false
29,476
cpp
/* Computer Graphics 2015 * NTHU CS CGV Lab * Author: Yi-Hsiang Lo ([email protected]) * Last-modified: 5/21, 2015 */ #include <stdio.h> #include <stdlib.h> #include <GL/glew.h> #include <freeglut/glut.h> #include "textfile.h" #include "GLM.h" #include "Matrices.h" #include "Texture.h" #include "main.h" #define MAX_TEXTURE_NUM 50 #define MAXSIZE 300000 #define MAXGROUPSIZE 50 #define myMax(a,b) (((a)>(b))?(a):(b)) #pragma warning (disable: 4996) #ifndef GLUT_WHEEL_UP # define GLUT_WHEEL_UP 0x0003 # define GLUT_WHEEL_DOWN 0x0004 #endif int isModelLoading = 0; int isAutoRotating = 1; int shaderType = 0; // 0 = Vertex ; 1 = Fragment; int currentModel = 0; #define NUM_OF_MODEL 17 char* filename[NUM_OF_MODEL] = { "TextureModels/teemo.obj", "TextureModels/satellitetrap.obj", "TextureModels/morgana_fallenangel.obj", "TextureModels/ahri_pop.obj", "TextureModels/katarina_referee.obj", "TextureModels/nidalee_cat_2012.obj", //"TextureModels/duck.obj", //"TextureModels/ball.obj", //"TextureModels/Dog.obj", //"TextureModels/ZEBRA.obj", "TextureModels/Digda.obj", "TextureModels/Fushigidane.obj", "TextureModels/Golonya.obj", "TextureModels/Hitokage.obj", "TextureModels/laurana500.obj", "TextureModels/Mew.obj", "TextureModels/Nala.obj", "TextureModels/Nyarth.obj", "TextureModels/texturedknot.obj", "TextureModels/Zenigame.obj", "TextureModels/cube.obj", }; // textures GLuint texNum[MAX_TEXTURE_NUM]; unsigned char image[MAX_TEXTURE_NUM][MAXSIZE]; //image data array FileHeader FH[MAX_TEXTURE_NUM]; //BMP FileHeader InfoHeader IH[MAX_TEXTURE_NUM]; //BMP InfoHeader int isTextureMapping = 1; GLint iLocTexCoord; GLint texture_wrap_mode = GL_REPEAT; GLint texture_mag_filter = GL_LINEAR; GLint texture_min_filter = GL_LINEAR; GLint iLocNMVP; GLint iLocNormal; GLint iLocMDiffuse; GLint iLocMAmbient; GLint iLocMSpecular; GLint iLocMShininess; GLint iLocLType; GLint iLocEye; GLint iLocShader; GLint iLocLAmbient; GLint iLocLDiffuse; GLint iLocLSpecular; GLint iLocLConstatt; GLint iLocLLinatt; GLint iLocLPosition; GLint iLocLSpotDir; GLint iLocLSpotCosCutoff; GLint iLocLSpotExp; GLint iLocLightSwitch; GLfloat Lambient[4]={0.3f,0.3f,0.3f,1.0f}; GLfloat Ldiffuse[4]={0.8f,0.8f,0.8f,1.0f}; GLfloat Lspecular[4]={1.0f,1.0f,1.0f,1.0f}; GLfloat Lposition[4]={0,0,-2.0f,0.0}; GLfloat cutoff=0.93f; GLfloat spotExp=2.0f; GLint type=1; GLint lightSwitch=1; //GLfloat NMVP[16]; // window size const unsigned int uiWidth = 500; const unsigned int uiHeight = 500; int screenWidth; int screenHeight; // eye position GLfloat eyeVec[3] = {0.0f, 0.0f, 5.0f}; // option keys #define PROJECTION_PERS 0x01 #define PROJECTION_PARA 0x02 char projectionMode = PROJECTION_PERS; // projection matrix parameters const float xmin = -1.0, xmax = 1.0; const float ymin = -1.0, ymax = 1.0; const float znear = eyeVec[2]-sqrtf(3.0f), zfar = eyeVec[2]+sqrtf(3.0f); // normalization matrix Matrix4 normalization_matrix; // global view port matrix Matrix4 viewPort; // global projection matrix Matrix4 parallelProjectionMatrix = myParallelProjectionMatrix(xmin, xmax, ymin, ymax, znear, zfar); Matrix4 perspectiveProjectionMatrix = myFrustumMatrix(xmin, xmax, ymin, ymax, znear, zfar); // Shader attributes GLuint v, f, f2, p; // Shader Locations GLint iLocModelMatrix; GLint iLocIsTextureMapping; GLint iLocPosition; GLint iLocColour; GLint iLocMVP; float rotateDeltaX, rotateDeltaY; float rotateStartX, rotateStartY; float rotateX, rotateY; Matrix4 preM; int isRBtnDown = 0; int isMouseMoving = 0; float preTranslateX, preTranslateY; float translateX, translateY; float translateStartX, translateStartY; int isLBtnDown = 0; float vertices[MAXGROUPSIZE][MAXSIZE]; float vnormals[MAXGROUPSIZE][MAXSIZE]; float vtextures[MAXGROUPSIZE][MAXSIZE]; float aMVP[16]; GLMmodel* OBJ; GLfloat normalScale; GLfloat scale; // unpack bmp file void LoadTextures(char* filename, int index) { unsigned long size; char temp; FILE *file = fopen(filename, "rb"); fread(&FH[index], sizeof(FileHeader), 1, file); fread(&IH[index], sizeof(InfoHeader), 1, file); size = IH[index].Width * IH[index].Height * 3; // IH.Width * IH.Height * 3 //image[index] = (unsigned char*)malloc(size*sizeof(char)); fread(image[index], size*sizeof(char), 1, file); fclose(file); //Swap channel => BRG----->RGB for (unsigned int i = 0; i < size; i += 3) { temp = image[index][i]; image[index][i] = image[index][i+2]; image[index][i+2] = temp; } } void initTextures(int index) { glBindTexture(GL_TEXTURE_2D, texNum[index]); // TODO: Generate mipmap by using gl function NOT glu function. // TODO: A Text2D texture is created there. glEnable(GL_TEXTURE_2D); glGenerateMipmap(GL_TEXTURE_2D); glTexImage2D(GL_TEXTURE_2D,0,3,IH[index].Width,IH[index].Height,0,GL_RGB,GL_UNSIGNED_BYTE,image[index]); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 8); // Hint: texture width x height = IH[index].Width x IH[index].Height // image[index] means the texture image material used by which group } void setTexture() { int tex_count = 0; GLMgroup* group = OBJ->groups; while(group){ if(strlen(OBJ->materials[group->material].textureImageName) != 0){ char TexNameStr[200]; sprintf(TexNameStr, "TextureModels/%s", OBJ->materials[group->material].textureImageName); printf("read %s\n", TexNameStr); LoadTextures(TexNameStr, tex_count); } tex_count++; group = group->next; } glGenTextures(tex_count, texNum); for(int i = 0; i < tex_count; i++){ initTextures(i); } } // parse texture model and align the vertices void TextureModel() { GLMgroup* group = OBJ->groups; float maxx, maxy, maxz; float minx, miny, minz; float dx, dy, dz; maxx = minx = OBJ->vertices[3]; maxy = miny = OBJ->vertices[4]; maxz = minz = OBJ->vertices[5]; for(unsigned int i=2; i<=OBJ->numvertices; i++){ GLfloat vx, vy, vz; vx = OBJ->vertices[i*3+0]; vy = OBJ->vertices[i*3+1]; vz = OBJ->vertices[i*3+2]; if(vx > maxx) maxx = vx; if(vx < minx) minx = vx; if(vy > maxy) maxy = vy; if(vy < miny) miny = vy; if(vz > maxz) maxz = vz; if(vz < minz) minz = vz; } //printf("max\n%f %f, %f %f, %f %f\n", maxx, minx, maxy, miny, maxz, minz); dx = maxx - minx; dy = maxy - miny; dz = maxz - minz; //printf("dx,dy,dz = %f %f %f\n", dx, dy, dz); normalScale = myMax(myMax(dx, dy), dz)/2; OBJ->position[0] = (maxx + minx) / 2; OBJ->position[1] = (maxy + miny) / 2; OBJ->position[2] = (maxz + minz) / 2; int gCount = 0; while(group){ for(unsigned int i=0; i<group->numtriangles; i++){ // triangle index int triangleID = group->triangles[i]; // the index of each vertex int indv1 = OBJ->triangles[triangleID].vindices[0]; int indv2 = OBJ->triangles[triangleID].vindices[1]; int indv3 = OBJ->triangles[triangleID].vindices[2]; // vertices GLfloat vx, vy, vz; vx = OBJ->vertices[indv1*3]; vy = OBJ->vertices[indv1*3+1]; vz = OBJ->vertices[indv1*3+2]; //printf("%f %f %f\n", vx, vy, vz); vertices[gCount][i*9+0] = vx; vertices[gCount][i*9+1] = vy; vertices[gCount][i*9+2] = vz; //printf("%f %f %f\n",vertices[i*9], vertices[i*9+1], vertices[i*9+2]); vx = OBJ->vertices[indv2*3]; vy = OBJ->vertices[indv2*3+1]; vz = OBJ->vertices[indv2*3+2]; //printf("%f %f %f\n", vx, vy, vz); vertices[gCount][i*9+3] = vx; vertices[gCount][i*9+4] = vy; vertices[gCount][i*9+5] = vz; //printf("%f %f %f\n",vertices[i*9+3], vertices[i*9+4], vertices[i*9+5]); vx = OBJ->vertices[indv3*3]; vy = OBJ->vertices[indv3*3+1]; vz = OBJ->vertices[indv3*3+2]; //printf("%f %f %f\n", vx, vy, vz); vertices[gCount][i*9+6] = vx; vertices[gCount][i*9+7] = vy; vertices[gCount][i*9+8] = vz; //printf("%f %f %f\n",vertices[i*9+6], vertices[i*9+7], vertices[i*9+8]); //printf("\n"); int indt1 = OBJ->triangles[triangleID].tindices[0]; int indt2 = OBJ->triangles[triangleID].tindices[1]; int indt3 = OBJ->triangles[triangleID].tindices[2]; // TODO: texture coordinates should be aligned by yourself vtextures[gCount][i*6+0]=OBJ->texcoords[indt1*2]; vtextures[gCount][i*6+1]=OBJ->texcoords[indt1*2+1]; vtextures[gCount][i*6+2]=OBJ->texcoords[indt2*2]; vtextures[gCount][i*6+3]=OBJ->texcoords[indt2*2+1]; vtextures[gCount][i*6+4]=OBJ->texcoords[indt3*2]; vtextures[gCount][i*6+5]=OBJ->texcoords[indt3*2+1]; int indn1 = OBJ->triangles[triangleID].nindices[0]; int indn2 = OBJ->triangles[triangleID].nindices[1]; int indn3 = OBJ->triangles[triangleID].nindices[2]; // the vertex normal vnormals[gCount][i*9+0]=OBJ->normals[indn1*3]; vnormals[gCount][i*9+1]=OBJ->normals[indn1*3+1]; vnormals[gCount][i*9+2]=OBJ->normals[indn1*3+2]; vnormals[gCount][i*9+3]=OBJ->normals[indn2*3]; vnormals[gCount][(i)*9+4]=OBJ->normals[indn2*3+1]; vnormals[gCount][(i)*9+5]=OBJ->normals[indn2*3+2]; vnormals[gCount][(i)*9+6]=OBJ->normals[indn3*3]; vnormals[gCount][(i)*9+7]=OBJ->normals[indn3*3+1]; vnormals[gCount][(i)*9+8]=OBJ->normals[indn3*3+2]; } group = group->next; gCount++; } // custom normalization matrix for each loaded model normalization_matrix.identity(); normalization_matrix = normalization_matrix * myTranslateMatrix(-OBJ->position[0], -OBJ->position[1], -OBJ->position[2]); normalization_matrix = normalization_matrix * myScaleMatrix(1/normalScale, 1/normalScale, 1/normalScale); } void loadOBJModel(int index) { // load model through glm parser OBJ = glmReadOBJ(filename[index]); printf("%s\n", filename[index]); // uncomment them only if there is no vertex normal info in your .obj file // glm will calculate the vertex normals for you // glmFacetNormals(OBJ); //printf("%s\n",filename[index]); if(!strcmp(filename[index],"TextureModels/cube.obj")){ //printf("qqq\n"); glmFacetNormals(OBJ); glmVertexNormals(OBJ, 90.0); } // parse texture model and align the vertices TextureModel(); } void setViewPortMatrix() { glViewport(0, 0, screenWidth, screenHeight); viewPort.identity(); float ratio = (float)screenWidth / (float)screenHeight; if(ratio >= 1){ viewPort = viewPort * myScaleMatrix(1.0f/ratio, 1, 1); }else{ viewPort = viewPort * myScaleMatrix(1, ratio, 1); } } void loadModel(int i) { isModelLoading = 1; loadOBJModel(i); setTexture(); isModelLoading = 0; } // on window size changed callback void changeSize(int w, int h) { screenWidth = w; screenHeight = h; // view port matrix setViewPortMatrix(); } Matrix4 myTranslateMatrix(float tx, float ty, float tz) { Matrix4 mat; mat.identity(); mat[12] = tx; mat[13] = ty; mat[14] = tz; return mat; } Matrix4 myScaleMatrix(float sx, float sy, float sz) { Matrix4 mat; mat.identity(); mat[0] = sx; mat[5] = sy; mat[10] = sz; return mat; } Matrix4 myRotateMatrix(float angle, float x, float y, float z) { float c = cosf(angle / 180.0f * M_PI); // cos float s = sinf(angle / 180.0f * M_PI); // sin float xx = x * x; float xy = x * y; float xz = x * z; float yy = y * y; float yz = y * z; float zz = z * z; Matrix4 m; m[0] = xx * (1 - c) + c; m[1] = xy * (1 - c) - z * s; m[2] = xz * (1 - c) + y * s; m[3] = 0; m[4] = xy * (1 - c) + z * s; m[5] = yy * (1 - c) + c; m[6] = yz * (1 - c) - x * s; m[7] = 0; m[8] = xz * (1 - c) - y * s; m[9] = yz * (1 - c) + x * s; m[10]= zz * (1 - c) + c; m[11]= 0; m[12]= 0; m[13]= 0; m[14]= 0; m[15]= 1; return m; } /* glmDot: compute the dot product of two vectors * * u - array of 3 GLfloats (GLfloat u[3]) * v - array of 3 GLfloats (GLfloat v[3]) */ static GLfloat glmDot(GLfloat* u, GLfloat* v) { return u[0]*v[0] + u[1]*v[1] + u[2]*v[2]; } /* glmCross: compute the cross product of two vectors * * u - array of 3 GLfloats (GLfloat u[3]) * v - array of 3 GLfloats (GLfloat v[3]) * n - array of 3 GLfloats (GLfloat n[3]) to return the cross product in */ static GLvoid glmCross(GLfloat* u, GLfloat* v, GLfloat* n) { n[0] = u[1]*v[2] - u[2]*v[1]; n[1] = u[2]*v[0] - u[0]*v[2]; n[2] = u[0]*v[1] - u[1]*v[0]; } /* glmNormalize: normalize a vector * * v - array of 3 GLfloats (GLfloat v[3]) to be normalized */ static GLvoid glmNormalize(GLfloat* v) { GLfloat l; l = (GLfloat)sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]); v[0] /= l; v[1] /= l; v[2] /= l; } Matrix4 myLookAtMatrix( float eyex, float eyey, float eyez, float cx, float cy, float cz, float upx, float upy, float upz) { // http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.opengl/doc/openglrf/gluLookAt.htm /* Let E be the 3d column vector (eyeX, eyeY, eyeZ). Let C be the 3d column vector (centerX, centerY, centerZ). Let U be the 3d column vector (upX, upY, upZ). Compute L = C - E. Normalize L. Compute S = L x U. Normalize S. Compute U' = S x L. */ float E[3] = {eyex, eyey, eyez}; float L[3] = {cx-eyex, cy-eyey, cz-eyez}; glmNormalize(L); float U[3] = {upx, upy, upz}; glmNormalize(U); float S[3]; glmCross(L, U, S); glmNormalize(S); glmCross(S, L, U); Matrix4 m; m[0] = S[0]; m[1] = S[1]; m[2] = S[2]; m[3] = 0; m[4] = U[0]; m[5] = U[1]; m[6] = U[2]; m[7] = 0; m[8] = -L[0]; m[9] = -L[1]; m[10] = -L[2]; m[11] = 0; m[12] = -E[0]; m[13] = -E[1]; m[14] = -E[2]; m[15] = 1; return m; } Matrix4 myFrustumMatrix(float l, float r, float b, float t, float n, float f) { Matrix4 mat; mat[0] = 2 * n / (r - l); mat[1] = 0; mat[2] = 0; mat[3] = 0; mat[4] = 0; mat[5] = 2 * n / (t - b); mat[6] = 0; mat[7] = 0; mat[8] = (r + l) / (r - l); mat[9] = (t + b) / (t - b); mat[10] = -(f + n) / (f - n); mat[11] = -1; mat[12] = 0; mat[13] = 0; mat[14] = -(2 * f * n) / (f - n); mat[15] = 0; return mat; } Matrix4 myPerspectiveProjectionMatrix(float fovY, float aspect, float front, float back) { float tangent = tanf(fovY/2.0f * 180.0f/M_PI); // tangent of half fovY float height = front * tangent; // half height of near plane float width = height * aspect; // half width of near plane // params: left, right, bottom, top, near, far return myFrustumMatrix(-width, width, -height, height, front, back); } Matrix4 myParallelProjectionMatrix(float l, float r, float b, float t, float n, float f) { Matrix4 mat; mat[0] = 2 / (r - l); mat[1] = 0; mat[2] = 0; mat[3] = 0; mat[4] = 0; mat[5] = 2 / (t - b); mat[6] = 0; mat[7] = 0; mat[8] = 0; mat[9] = 0; mat[10] = -2 / (f - n); mat[11] = 0; mat[12] = -(r + l) / (r - l); mat[13] = -(t + b) / (t - b); mat[14] = -(f + n) / (f - n); mat[15] = 1; return mat; } void showMatrix(Matrix4 m) { printf("===========================\n"); printf("%lf %lf %lf %lf\n", m[0], m[4], m[8], m[12]); printf("%lf %lf %lf %lf\n", m[1], m[5], m[9], m[13]); printf("%lf %lf %lf %lf\n", m[2], m[6], m[10], m[14]); printf("%lf %lf %lf %lf\n", m[3], m[7], m[11], m[15]); } void renderScene(void) { while(isModelLoading == 1){ //printf("waiting\n"); } Matrix4 M; glClearColor(0.3f, 0.1f, 0.1f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); // aMVP = identity() * M_normalize(Tn*Sn) * M_transformation(S or R or T) * V(lookat) * P(projection) M.identity(); // normalize M = M * normalization_matrix; // previous rotate matrix M = M * preM; // mouse rotate if(isRBtnDown && isMouseMoving){ float temp = sqrt(rotateX * rotateX + rotateY * rotateY); if(temp != 0){ Matrix4 newM = myRotateMatrix(-temp / 4.0f, rotateY/temp, rotateX/temp, 0.0f); // divided by 4 in order to rotate slower M = M * newM; preM = preM * newM; } } // auto rotate if (isAutoRotating) { Matrix4 newM = myRotateMatrix(3.0f, 0.0f, 1.0f, 0.0f); M = M * newM; preM = preM * newM; } // scale M = M * myScaleMatrix(scale, scale, scale); // mouse translate M = M * myTranslateMatrix(preTranslateX, preTranslateY, 0); if(isMouseMoving && isLBtnDown){ float ratio = (float)screenWidth / (float)screenHeight; float alphaX = (xmax - xmin) / (float)screenWidth; float alphaY = (ymax - ymin) / (float)screenHeight; if(ratio >= 1){ alphaX *= ratio; }else{ alphaY /= ratio; } M = M * myTranslateMatrix(translateX*alphaX, translateY*alphaY, 0); preTranslateX += translateX * alphaX; preTranslateY += translateY * alphaY; } Matrix4 modelMatrix; // Model matrix ends here for(int i=0;i<16;i++){ modelMatrix[i] = M[i]; } // V (lookat) M = M * myLookAtMatrix(eyeVec[0],eyeVec[1],eyeVec[2], eyeVec[0],eyeVec[1],eyeVec[2]-1.0f, 0,1,0); // P (project) if(projectionMode == PROJECTION_PARA) { M = M * parallelProjectionMatrix; } else if(projectionMode == PROJECTION_PERS) { M = M * perspectiveProjectionMatrix; } else { fprintf(stderr, "ERROR!\n"); system("pause"); exit(-1); } // V (view port) M = M * viewPort; for(int i=0;i<16;i++) aMVP[i] = M[i]; glUniform1i(iLocIsTextureMapping, isTextureMapping); // Matrices glUniformMatrix4fv(iLocMVP, 1, GL_FALSE, M.get()); Matrix4 NMVP; NMVP= (M.invert()).transpose(); glUniformMatrix4fv(iLocNMVP,1,GL_FALSE,NMVP.get()); glUniformMatrix4fv(iLocModelMatrix, 1, GL_FALSE, modelMatrix.get()); glUniform4fv(iLocLAmbient,1,Lambient); glUniform4fv(iLocLDiffuse,1,Ldiffuse); glUniform4fv(iLocLSpecular,1,Lspecular); glUniform4fv(iLocLPosition,1,Lposition); glUniform4fv(iLocEye,1,eyeVec); glUniform1iv(iLocLType,1,&type); glUniform1fv(iLocLSpotCosCutoff,1,&cutoff); glUniform1fv(iLocLSpotExp,1,&spotExp); glUniform1iv(iLocLightSwitch,1,&lightSwitch); glUniform1iv(iLocShader,1,&shaderType); GLMgroup* group = OBJ->groups; int gCount = 0; while(group){ glUniform4fv(iLocMAmbient,1,OBJ->materials[group->material].ambient); glUniform4fv(iLocMDiffuse,1,OBJ->materials[group->material].diffuse); glUniform4fv(iLocMSpecular,1,OBJ->materials[group->material].specular); glUniform1fv(iLocMShininess,1,&OBJ->materials[group->material].shininess); // enable attributes array glEnableVertexAttribArray(iLocPosition); glEnableVertexAttribArray(iLocTexCoord); glEnableVertexAttribArray(iLocNormal); // TODO: texture VertexAttribArray is enabled here // bind attributes array glVertexAttribPointer(iLocPosition, 3, GL_FLOAT, GL_FALSE, 0, vertices[gCount]); glVertexAttribPointer(iLocTexCoord, 2,GL_FLOAT,GL_TRUE,0,vtextures[gCount]); glVertexAttribPointer(iLocNormal,3,GL_FLOAT,GL_FALSE,0,vnormals[gCount]); // TODO: bind texture vertex attribute pointer here // texture mag/min filter // TODO: texture mag/min filters are defined here glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, texture_mag_filter ); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, texture_min_filter ); // texture wrap mode s/t // TODO: texture wrap modes are defined here glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, texture_wrap_mode); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, texture_wrap_mode); // bind texture material group by group // TODO: bind texture here glBindTexture(GL_TEXTURE_2D, texNum[gCount]); glActiveTexture( texNum[gCount]); // draw arrays glDrawArrays(GL_TRIANGLES, 0, group->numtriangles*3); gCount++; group = group->next; } isMouseMoving = 0; Sleep(20); glutSwapBuffers(); } void showHelp() { printf("=============================\n"); printf("press H / h to show this menu\n"); printf("\n"); printf("PROJECTION: press P / p to switch perspective / orthographic projection\n"); printf("\n"); printf("TRANSLATION: press the left button and drag the mouse to translate\n"); printf("\n"); printf("ROTATION: press the right button and drag the mouse to rotate\n"); printf("\n"); printf("SCALE: scroll mouse wheel up and down to scale\n"); printf("\n"); printf("MODEL SWITCHING: press Z / z to switch previous model.\n"); printf(" press X / x to switch next model.\n"); printf("\n"); printf("Press V/v to change the Lighting mode between Vertex shader lighting and Per-pixel Lighting \n"); printf("Press M/m to change Texture Magnify/Minify(Case Sensitive) between Nearest and Linear \n"); printf("Press w/W to change Texture Wrap Mode between Repeat and Clamp \n"); printf("Press T/t to turn On/Off texture mapping \n"); printf("Press R/r to turn on/off the automatic rotation mode \n"); printf("Press 1 to switch to Directional Light \n"); printf("Press 2 to switch to Position Light \n"); printf("Press 3 to switch to Spot Light \n"); printf("Press 4 to Turn off the Light \n"); printf("Press 5 to add the X component of the Light position \n"); printf("Press 6 to subtract the X component of the Light position \n"); printf("Press 7 to add the Y component of the Light position \n"); printf("Press 8 to subtract the Y component of the Light position \n"); printf("Press 9 to add the Z component of the Light position \n"); printf("Press 0 to subtract the Z component of the Light position \n"); } void processSpecialKeys(int key, int x, int y){ /* GLUT_KEY_F1 F1 function key. GLUT_KEY_F2 F2 function key. GLUT_KEY_F3 F3 function key. GLUT_KEY_F4 F4 function key. GLUT_KEY_F5 F5 function key. GLUT_KEY_F6 F6 function key. GLUT_KEY_F7 F7 function key. GLUT_KEY_F8 F8 function key. GLUT_KEY_F9 F9 function key. GLUT_KEY_F10 F10 function key. GLUT_KEY_F11 F11 function key. GLUT_KEY_F12 F12 function key. GLUT_KEY_LEFT Left directional key. GLUT_KEY_UP Up directional key. GLUT_KEY_RIGHT Right directional key. GLUT_KEY_DOWN Down directional key. GLUT_KEY_PAGE_UP Page up directional key. GLUT_KEY_PAGE_DOWN Page down directional key. GLUT_KEY_HOME Home directional key. GLUT_KEY_END End directional key. GLUT_KEY_INSERT Inset directional key. */ } void processNormalKeys(unsigned char key, int x, int y) { int modifier = glutGetModifiers(); //printf("modifier = %d\n", modifier); //printf("key = %d\n", key); switch(modifier){ case GLUT_ACTIVE_CTRL:{ switch(key) { /* ctrl+q */ case 17: break; /* ctrl+a */ case 1: break; /* ctrl+w */ case 23: break; /* ctrl+s */ case 19: break; /* ctrl+e */ case 5: break; /* ctrl+d */ case 4: break; } break; } } // normal keys switch(key){ case 'r': case 'R': isAutoRotating = (isAutoRotating + 1 ) % 2; break; case 'Z': case 'z': currentModel = (currentModel + NUM_OF_MODEL - 1) % NUM_OF_MODEL; loadModel(currentModel); printf("loading %s\n", filename[currentModel]); break; case 'X': case 'x': currentModel = (currentModel + 1) % NUM_OF_MODEL; loadModel(currentModel); printf("loading %s\n", filename[currentModel]); break; case 'H': case 'h': showHelp(); break; case 'P': case 'p': if(projectionMode != PROJECTION_PERS){ projectionMode = PROJECTION_PERS; printf("perspective projection\n"); }else if(projectionMode != PROJECTION_PARA){ projectionMode = PROJECTION_PARA; printf("parallel projection\n"); } break; case 'm': if(texture_min_filter == GL_NEAREST) texture_min_filter = GL_LINEAR; else if(texture_min_filter==GL_LINEAR) texture_min_filter = GL_NEAREST; break; case 'M': if(texture_mag_filter == GL_NEAREST) texture_mag_filter = GL_LINEAR; else if(texture_mag_filter==GL_LINEAR) texture_mag_filter = GL_NEAREST; break; case 'w': case 'W': if(texture_wrap_mode == GL_CLAMP) texture_wrap_mode = GL_REPEAT; else if(texture_wrap_mode == GL_REPEAT) texture_wrap_mode = GL_CLAMP; break; case't': case'T': isTextureMapping = (isTextureMapping +1)%2; break; case'v': case'V': shaderType= (shaderType+1)%2; break; case 49: type=1; break; case 50: type=2; break; case 51: type=3; break; case 52: lightSwitch = (lightSwitch+1)%2; break; case 53: Lposition[0]+=0.1f; break; case 54: Lposition[0]-=0.1f; break; case 55: Lposition[1]+=0.1f; break; case 56: Lposition[1]-=0.1f; break; case 57: Lposition[2]+=0.1f; break; case 48: Lposition[2]-=0.1f; break; case 27: // esc key exit(0); } //glutPostRedisplay(); } void setShaders() { char *vs = NULL,*fs = NULL; v = glCreateShader(GL_VERTEX_SHADER); f = glCreateShader(GL_FRAGMENT_SHADER); vs = textFileRead("shader.vert"); fs = textFileRead("shader.frag"); const char * ff = fs; const char * vv = vs; glShaderSource(v, 1, &vv,NULL); glShaderSource(f, 1, &ff,NULL); free(vs);free(fs); glCompileShader(v); glCompileShader(f); GLint vCompiled; glGetShaderiv(v, GL_COMPILE_STATUS, &vCompiled); if (!vCompiled) { GLint length; GLchar* log; glGetShaderiv(v, GL_INFO_LOG_LENGTH, &length ); log = (GLchar*) malloc(length); glGetShaderInfoLog(v, length, &length, log); fprintf(stderr, "[v] compile log = '%s'\n", log); free(log); } GLint fCompiled; glGetShaderiv(f, GL_COMPILE_STATUS, &fCompiled); if (!fCompiled) { GLint length; GLchar* log; glGetShaderiv(f, GL_INFO_LOG_LENGTH, &length ); log = (GLchar*) malloc(length); glGetShaderInfoLog(f, length, &length, log); fprintf(stderr, "[f] compile log = '%s'\n", log); free(log); } p = glCreateProgram(); glAttachShader(p,f); glAttachShader(p,v); glLinkProgram(p); GLint linked = 0; glGetProgramiv(p, GL_LINK_STATUS, &linked ); if (linked) { glUseProgram(p); } else { GLint length; GLchar* log; glGetProgramiv(p, GL_INFO_LOG_LENGTH, &length ); log = (GLchar*) malloc(length); glGetProgramInfoLog(p, length, &length, log); fprintf(stderr, "link log = '%s'\n", log); free(log); } iLocPosition = glGetAttribLocation(p, "av4position"); iLocColour = glGetAttribLocation(p, "av3colour"); iLocTexCoord = glGetAttribLocation(p, "av2texCoord"); iLocMVP = glGetUniformLocation(p, "mvp"); iLocIsTextureMapping = glGetUniformLocation(p, "uiisTextureMapping"); iLocModelMatrix = glGetUniformLocation(p, "um4modelMatrix"); iLocNormal =glGetAttribLocation(p,"normal4"); iLocNMVP = glGetUniformLocation(p,"nmvp"); iLocShader = glGetUniformLocation(p,"shader"); iLocMDiffuse = glGetUniformLocation(p,"Material.diffuse"); iLocMAmbient = glGetUniformLocation(p,"Material.ambient"); iLocMSpecular = glGetUniformLocation(p,"Material.specular"); iLocMShininess = glGetUniformLocation(p,"Material.shininess"); iLocEye = glGetUniformLocation(p,"eye"); iLocLAmbient = glGetUniformLocation(p,"LightSource.ambient"); iLocLDiffuse = glGetUniformLocation(p,"LightSource.diffuse"); iLocLSpecular= glGetUniformLocation(p,"LightSource.specular"); iLocLConstatt= glGetUniformLocation(p,"LightSource.constantAttenuation"); iLocLLinatt= glGetUniformLocation(p,"LightSource.linearAttenuation"); iLocLPosition= glGetUniformLocation(p,"LightSource.position"); iLocLSpotDir= glGetUniformLocation(p,"LightSource.spotDirection"); iLocLSpotCosCutoff= glGetUniformLocation(p,"LightSource.spotCosCutoff"); iLocLSpotExp= glGetUniformLocation(p,"LightSource.spotExponent"); iLocLType=glGetUniformLocation(p,"type"); iLocLightSwitch=glGetUniformLocation(p,"lightSwitch"); glUseProgram(p); } void processMouse(int who, int state, int x, int y){ if(who == GLUT_RIGHT_BUTTON && state == GLUT_DOWN && isLBtnDown == 0) { rotateStartX = (float)x; rotateStartY = (float)y; isRBtnDown = 1; } else if(who == GLUT_RIGHT_BUTTON && state == GLUT_UP) { isRBtnDown = 0; } else if(who == GLUT_LEFT_BUTTON && state == GLUT_DOWN && isRBtnDown == 0) { translateX = x - translateStartX; translateY = -(y - translateStartY); translateStartX = (float)x; translateStartY = (float)y; isLBtnDown = 1; } else if(who == GLUT_LEFT_BUTTON && state == GLUT_UP) { isLBtnDown = 0; } else if(who == GLUT_MIDDLE_BUTTON && state == GLUT_DOWN) { scale = 1.0f; } else if(who == GLUT_WHEEL_UP && state == GLUT_DOWN) { if(scale < 2.29) scale *= 1.05f; } else if(who == GLUT_WHEEL_DOWN && state == GLUT_DOWN) { if(scale > 0.25) scale /= 1.05f; } } // callback on mouse drag void myMotionFunc(int x, int y) { if(isRBtnDown){ rotateX = x - rotateStartX; rotateY = y - rotateStartY; rotateStartX = (float)x; rotateStartY = (float)y; } if(isLBtnDown){ translateX = x - translateStartX; translateY = -(y - translateStartY); translateStartX = (float)x; translateStartY = (float)y; } isMouseMoving = 1; } int main(int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA); glutInitWindowPosition(0, 0); glutInitWindowSize(uiWidth, uiHeight); glutCreateWindow("CG HW4 TA"); glutDisplayFunc(renderScene); glutIdleFunc(renderScene); glutReshapeFunc(changeSize); glutKeyboardFunc(processNormalKeys); glutMouseFunc(processMouse); glutMotionFunc(myMotionFunc); glutSpecialFunc(processSpecialKeys); glewInit(); if(glewIsSupported("GL_VERSION_2_0")){ printf("Ready for OpenGL 2.0\n"); showHelp(); }else{ printf("OpenGL 2.0 not supported\n"); system("pause"); exit(123); } // init preTranslateX = preTranslateY = 0; scale = 1.0; currentModel = 0; loadModel(currentModel); setShaders(); glEnable(GL_DEPTH_TEST); glEnable(GL_CULL_FACE); glCullFace(GL_BACK); glutMainLoop(); glmDelete(OBJ); return 0; }
e7fc029e660988e9a031b2d7b8b93c76b98921c3
7ba3ebd1d42084f7733a584c9c54c44c02d1ac0d
/static_object.h
6612527cfc3466001ef3ada1779f95eda84dadb0
[ "MIT" ]
permissive
dlardi/mingw_static_test
3f5a5deb93176f8f79791ef1277a1c95c0440190
f9440696f83afaf57a072c28be33b44299fea509
refs/heads/master
2016-09-05T12:16:24.439199
2015-08-04T17:18:09
2015-08-04T17:18:09
40,180,350
0
0
null
null
null
null
UTF-8
C++
false
false
273
h
#pragma once #include <iostream> #include <typeinfo> template <class T> struct StaticObject { static T & getInstance() { static T t; std::cout << "static object " << typeid(T).name() << " at " << &t << " = "<< t << std::endl; return t; } };
db534903b8dec592b07192ba0c5d7f3703a90949
12c080b81ca5a7aaf87d4199e58dfe08b9670b7f
/230-Kth Smallest Element in a BST.cpp
81cf5b10f3aaa731b4e2d88d7c86e5224400a495
[]
no_license
PhoenixDD/LeetCode
23970d3d5485f0c67ecc46afbf07c296a14f7a4d
04d78870f56dc7c5057a8b22e5c3ed87ae04a8bf
refs/heads/master
2021-01-01T19:21:32.795867
2020-11-26T05:12:48
2020-11-26T05:12:48
98,563,765
0
0
null
null
null
null
UTF-8
C++
false
false
566
cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int kth(TreeNode* root, int &k) { if(!root) return INT_MIN; int num=INT_MIN; num=kth(root->left,k); k--; if(!k) return root->val; return num==INT_MIN?kth(root->right,k):num; } int kthSmallest(TreeNode* root, int k) { return kth(root,k); } };
7d56833ffac0044f071b9ac2a7ecd46682df9513
f359d190dd0fa43dc21772a0faccec89013e0e99
/export/windows/obj/include/openfl/ui/GameInputDevice.h
684880b497492b4296887c73d29b09718010ba85
[]
no_license
pedrohpe/terminal
0da838959f09c50550e629fa8c592dc364b1fa1f
49fdf9fd10a075ae083e9b31850788fbb814fea5
refs/heads/master
2020-03-25T09:18:50.578453
2018-08-05T21:42:33
2018-08-05T21:42:33
143,659,093
0
0
null
null
null
null
UTF-8
C++
false
true
3,165
h
// Generated by Haxe 3.4.4 #ifndef INCLUDED_openfl_ui_GameInputDevice #define INCLUDED_openfl_ui_GameInputDevice #ifndef HXCPP_H #include <hxcpp.h> #endif HX_DECLARE_CLASS1(haxe,IMap) HX_DECLARE_CLASS2(haxe,ds,IntMap) HX_DECLARE_CLASS2(haxe,io,Bytes) HX_DECLARE_CLASS2(lime,ui,Gamepad) HX_DECLARE_CLASS2(openfl,_Vector,IVector) HX_DECLARE_CLASS2(openfl,_Vector,ObjectVector) HX_DECLARE_CLASS2(openfl,events,EventDispatcher) HX_DECLARE_CLASS2(openfl,events,IEventDispatcher) HX_DECLARE_CLASS2(openfl,ui,GameInputControl) HX_DECLARE_CLASS2(openfl,ui,GameInputDevice) HX_DECLARE_CLASS2(openfl,utils,ByteArrayData) HX_DECLARE_CLASS2(openfl,utils,IDataInput) HX_DECLARE_CLASS2(openfl,utils,IDataOutput) namespace openfl{ namespace ui{ class HXCPP_CLASS_ATTRIBUTES GameInputDevice_obj : public hx::Object { public: typedef hx::Object super; typedef GameInputDevice_obj OBJ_; GameInputDevice_obj(); public: enum { _hx_ClassId = 0x0e491d6a }; void __construct(::String id,::String name); inline void *operator new(size_t inSize, bool inContainer=true,const char *inName="openfl.ui.GameInputDevice") { return hx::Object::operator new(inSize,inContainer,inName); } inline void *operator new(size_t inSize, int extra) { return hx::Object::operator new(inSize+extra,true,"openfl.ui.GameInputDevice"); } static hx::ObjectPtr< GameInputDevice_obj > __new(::String id,::String name); static hx::ObjectPtr< GameInputDevice_obj > __alloc(hx::Ctx *_hx_ctx,::String id,::String name); static void * _hx_vtable; static Dynamic __CreateEmpty(); static Dynamic __Create(hx::DynamicArray inArgs); //~GameInputDevice_obj(); HX_DO_RTTI_ALL; hx::Val __Field(const ::String &inString, hx::PropertyAccess inCallProp); static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp); hx::Val __SetField(const ::String &inString,const hx::Val &inValue, hx::PropertyAccess inCallProp); static bool __SetStatic(const ::String &inString, Dynamic &ioValue, hx::PropertyAccess inCallProp); void __GetFields(Array< ::String> &outFields); static void __register(); void __Mark(HX_MARK_PARAMS); void __Visit(HX_VISIT_PARAMS); bool _hx_isInstanceOf(int inClassId); ::String __ToString() const { return HX_HCSTRING("GameInputDevice","\x4e","\xe5","\xcf","\x03"); } static void __boot(); static int MAX_BUFFER_SIZE; bool enabled; ::String id; ::String name; int sampleInterval; ::haxe::ds::IntMap _hx___axis; ::haxe::ds::IntMap _hx___button; ::Array< ::Dynamic> _hx___controls; ::lime::ui::Gamepad _hx___gamepad; int getCachedSamples( ::openfl::utils::ByteArrayData data,hx::Null< bool > append); ::Dynamic getCachedSamples_dyn(); ::openfl::ui::GameInputControl getControlAt(int i); ::Dynamic getControlAt_dyn(); void startCachingSamples(int numSamples, ::openfl::_Vector::ObjectVector controls); ::Dynamic startCachingSamples_dyn(); void stopCachingSamples(); ::Dynamic stopCachingSamples_dyn(); int get_numControls(); ::Dynamic get_numControls_dyn(); }; } // end namespace openfl } // end namespace ui #endif /* INCLUDED_openfl_ui_GameInputDevice */
c0d09d8353d56c5599daea7b6e30c26f4ea50ca9
9df0ffa9989fa11452e306141d12293ed0bcc544
/PersonDetection/PersonDetection/CvMFCImage.cpp
9dd287bb6150240edd854c5b520c8e8424ad6965
[]
no_license
thaibinhco/PedestrianDetection
5d6161ae2e23c9420af1b81431e5fc426d48e2e8
6dd5d01e6572a0dba9b2cf8858a4bea961bbe220
refs/heads/master
2020-03-15T08:39:35.752379
2018-07-15T05:09:17
2018-07-15T05:09:17
132,056,336
0
0
null
null
null
null
UTF-8
C++
false
false
6,054
cpp
//If using MFC #include "stdafx.h" #include <windows.h> //#include <cxcore.h> #include <cv.h> #include <highgui.h> #include "CvMFCImage.h" static void FillBitmapInfo(BITMAPINFO* bmi, int width, int height, int bpp, int origin) { assert(bmi && width >= 0 && height >= 0 && (bpp == 8 || bpp == 24 || bpp == 32)); BITMAPINFOHEADER* bmih = &(bmi->bmiHeader); memset(bmih, 0, sizeof(*bmih)); bmih->biSize = sizeof(BITMAPINFOHEADER); bmih->biWidth = width; bmih->biHeight = origin ? abs(height) : -abs(height); bmih->biPlanes = 1; bmih->biBitCount = (unsigned short)bpp; bmih->biCompression = BI_RGB; if (bpp == 8) { RGBQUAD* palette = bmi->bmiColors; int i; for (i = 0; i < 256; i++) { palette[i].rgbBlue = palette[i].rgbGreen = palette[i].rgbRed = (BYTE)i; palette[i].rgbReserved = 0; } } } CvMFCImage::CvMFCImage(void) { m_img = 0; } void CvMFCImage::Destroy() { cvReleaseImage(&m_img); } CvMFCImage::~CvMFCImage(void) { Destroy(); } bool CvMFCImage::Create(int w, int h, int bpp, int origin) { const unsigned max_img_size = 10000; if ((bpp != 8 && bpp != 24 && bpp != 32) || (unsigned)w >= max_img_size || (unsigned)h >= max_img_size || (origin != IPL_ORIGIN_TL && origin != IPL_ORIGIN_BL)) { assert(0); // most probably, it is a programming error return false; } if (!m_img || Bpp() != bpp || m_img->width != w || m_img->height != h) { if (m_img && m_img->nSize == sizeof(IplImage)) Destroy(); /* prepare IPL header */ m_img = cvCreateImage(cvSize(w, h), IPL_DEPTH_8U, bpp / 8); } if (m_img) m_img->origin = origin == 0 ? IPL_ORIGIN_TL : IPL_ORIGIN_BL; return m_img != 0; } void CvMFCImage::CopyOf(CvMFCImage& image, int desired_color) { IplImage* img = image.GetImage(); if (img) { CopyOf(img, desired_color); } } #define HG_IS_IMAGE(img) \ ((img) != 0 && ((const IplImage*)(img))->nSize == sizeof(IplImage) && \ ((IplImage*)img)->imageData != 0) void CvMFCImage::CopyOf(IplImage* img, int desired_color) { if (HG_IS_IMAGE(img)) { int color = desired_color; CvSize size = cvGetSize(img); if (color < 0) color = img->nChannels > 1; if (Create(size.width, size.height, (!color ? 1 : img->nChannels > 1 ? img->nChannels : 3) * 8, img->origin)) { cvConvertImage(img, m_img, 0); } } } bool CvMFCImage::Load(const char* filename, int desired_color) { IplImage* img = cvLoadImage(filename, desired_color); if (!img) return false; CopyOf(img, desired_color); cvReleaseImage(&img); return true; } bool CvMFCImage::LoadRect(const char* filename, int desired_color, CvRect r) { if (r.width < 0 || r.height < 0) return false; IplImage* img = cvLoadImage(filename, desired_color); if (!img) return false; if (r.width == 0 || r.height == 0) { r.width = img->width; r.height = img->height; r.x = r.y = 0; } if (r.x > img->width || r.y > img->height || r.x + r.width < 0 || r.y + r.height < 0) { cvReleaseImage(&img); return false; } /* truncate r to source image */ if (r.x < 0) { r.width += r.x; r.x = 0; } if (r.y < 0) { r.height += r.y; r.y = 0; } if (r.x + r.width > img->width) r.width = img->width - r.x; if (r.y + r.height > img->height) r.height = img->height - r.y; cvSetImageROI(img, r); CopyOf(img, desired_color); cvReleaseImage(&img); return true; } bool CvMFCImage::Save(const char* filename) { if (!m_img) return false; cvSaveImage(filename, m_img); return true; } void CvMFCImage::Show(const char* window) { if (m_img) cvShowImage(window, m_img); } void CvMFCImage::Show(HDC dc, int x, int y, int w, int h, int from_x, int from_y) { if (m_img && m_img->depth == IPL_DEPTH_8U) { uchar buffer[sizeof(BITMAPINFOHEADER) + 1024]; BITMAPINFO* bmi = (BITMAPINFO*)buffer; int bmp_w = m_img->width, bmp_h = m_img->height; FillBitmapInfo(bmi, bmp_w, bmp_h, Bpp(), m_img->origin); from_x = MIN(MAX(from_x, 0), bmp_w - 1); from_y = MIN(MAX(from_y, 0), bmp_h - 1); int sw = MAX(MIN(bmp_w - from_x, w), 0); int sh = MAX(MIN(bmp_h - from_y, h), 0); SetDIBitsToDevice( dc, x, y, sw, sh, from_x, from_y, from_y, sh, m_img->imageData + from_y*m_img->widthStep, bmi, DIB_RGB_COLORS); } } CV_INLINE RECT NormalizeRect(RECT r); CV_INLINE RECT NormalizeRect(RECT r) { int t; if (r.left > r.right) { t = r.left; r.left = r.right; r.right = t; } if (r.top > r.bottom) { t = r.top; r.top = r.bottom; r.bottom = t; } return r; } CV_INLINE IplROI RectToROI(RECT r); CV_INLINE IplROI RectToROI(RECT r) { IplROI roi; r = NormalizeRect(r); roi.xOffset = r.left; roi.yOffset = r.top; roi.width = r.right - r.left; roi.height = r.bottom - r.top; roi.coi = 0; return roi; } CV_INLINE CvRect RectToCvRect(RECT sr); CV_INLINE CvRect RectToCvRect(RECT sr) { sr = NormalizeRect(sr); return cvRect(sr.left, sr.top, sr.right - sr.left, sr.bottom - sr.top); } void CvMFCImage::DrawToHDC(HDC hDCDst, RECT* pDstRect) { if (pDstRect && m_img && m_img->depth == IPL_DEPTH_8U && m_img->imageData) { uchar buffer[sizeof(BITMAPINFOHEADER) + 1024]; BITMAPINFO* bmi = (BITMAPINFO*)buffer; int bmp_w = m_img->width, bmp_h = m_img->height; CvRect roi = cvGetImageROI(m_img); CvRect dst = RectToCvRect(*pDstRect); if (roi.width == dst.width && roi.height == dst.height) { Show(hDCDst, dst.x, dst.y, dst.width, dst.height, roi.x, roi.y); return; } if (roi.width > dst.width) { SetStretchBltMode( hDCDst, // handle to device context HALFTONE); } else { SetStretchBltMode( hDCDst, // handle to device context COLORONCOLOR); } FillBitmapInfo(bmi, bmp_w, bmp_h, Bpp(), m_img->origin); ::StretchDIBits( hDCDst, dst.x, dst.y, dst.width, dst.height, roi.x, roi.y, roi.width, roi.height, m_img->imageData, bmi, DIB_RGB_COLORS, SRCCOPY); } } void CvMFCImage::Fill(int color) { cvSet(m_img, cvScalar(color & 255, (color >> 8) & 255, (color >> 16) & 255, (color >> 24) & 255)); }
b4039e1a1658cecbee7e6b71dcb5e9544993ce3f
e30253dd5b8e508d37c680b34740add366f16c73
/Libraries/xcdriver/Headers/xcdriver/HelpAction.h
dbecfd8c86f1ebc4d2501500f87d3255a504a68e
[ "LicenseRef-scancode-philippe-de-muyter", "BSD-3-Clause", "NCSA", "Zlib", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
darlinghq/xcbuild
e77e8d88ed42f1922afd7abad2a4508c18255a88
a903c6952fc5617816113cbb7b551ac701dba2ff
refs/heads/master
2023-08-03T03:18:18.383673
2023-07-26T18:15:17
2023-07-26T18:15:17
131,655,910
10
2
null
2018-04-30T23:15:55
2018-04-30T23:15:54
null
UTF-8
C++
false
false
678
h
/** Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. */ #ifndef __xcdriver_HelpAction_h #define __xcdriver_HelpAction_h namespace process { class Context; } namespace xcdriver { /* * Prints usage, as well as explanations of each invocation option. */ class HelpAction { private: HelpAction(); ~HelpAction(); public: static int Run(process::Context const *processContext); }; } #endif // !__xcdriver_HelpAction_h
21ed9a5b1a6ab73338ac5f4aacb61dc6d73a31bb
d93bbc3f9db8b24cbf7fa685c24f15cca3317d61
/src/components/application_manager/src/commands/hmi/request_to_hmi.cc
aa8c97408dff56cd5fc9813c6295231a2c699014
[]
no_license
babynewton/smartdevicelink
a98b99eb46219d1f994b19d7833d7d45263acdaa
c6524ea02b098c8474da29baafb9f7191409caf2
refs/heads/master
2021-01-20T00:58:27.584658
2014-06-17T08:36:08
2014-06-17T08:36:08
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,264
cc
/* Copyright (c) 2013, Ford Motor Company All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the Ford Motor Company 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 "application_manager/commands/hmi/request_to_hmi.h" #include "application_manager/application_manager_impl.h" namespace application_manager { namespace commands { RequestToHMI::RequestToHMI(const MessageSharedPtr& message) : CommandImpl(message) { } RequestToHMI::~RequestToHMI() { } bool RequestToHMI::Init() { return true; } bool RequestToHMI::CleanUp() { return true; } void RequestToHMI::Run() { } void RequestToHMI::SendRequest() { (*message_)[strings::params][strings::protocol_type] = hmi_protocol_type_; (*message_)[strings::params][strings::protocol_version] = protocol_version_; ApplicationManagerImpl::instance()->SendMessageToHMI(message_); } } // namespace commands } // namespace application_manager
29611e3a1eab60569219f8acda025518b42a4030
d5d94c992d0596080ba694c518dfdb58d3490847
/0419/answer.cpp
cdc6b5e078d6b9218e23c1d948aab7e76536b685
[]
no_license
calgagi/leetcode
1bf24b750e44c2c893935983e5d88e0f071d9f2d
431aba979d92e331f2f92a07eb80167a823a49bd
refs/heads/master
2022-11-17T11:26:01.596496
2020-07-19T06:56:04
2020-07-19T06:56:04
276,207,528
0
0
null
null
null
null
UTF-8
C++
false
false
1,290
cpp
class Solution { public: int countBattleships(vector<vector<char>>& board) { int r = 0; for (int i = 0; i < board.size(); i++) { for (int j = 0; j < board[0].size(); j++) { if (board[i][j] == 'X') { // BFS r++; queue<pair<int,int>> q; q.push(make_pair(i, j)); while (!q.empty()) { pair<int,int> x = q.front(); q.pop(); board[x.first][x.second] = 'O'; if (x.first-1 >= 0 && board[x.first-1][x.second] == 'X') q.push(make_pair(x.first-1, x.second)); if (x.second-1 >= 0 && board[x.first][x.second-1] == 'X') q.push(make_pair(x.first, x.second-1)); if (x.first+1 < board.size() && board[x.first+1][x.second] == 'X') q.push(make_pair(x.first+1, x.second)); if (x.second+1 < board[0].size() && board[x.first][x.second+1] == 'X') q.push(make_pair(x.first, x.second+1)); } } } } return r; } };
9069759e10c1940e72118a8e54c065cb57bbb262
640fdd19626197f2c5b2f08827118ac03f04dc80
/qtTetris/src/Controll/Controller.cpp
fbae2deb4a093aa20c7d45312201bdaf7b8742c3
[]
no_license
minddnim/testProject
fd6906413b462ac6726ad9324f9940e812634b3a
4d9ab2a42a7fcf3a00833715ec08183f19efd2d1
refs/heads/master
2021-01-23T13:52:55.550382
2016-11-16T15:48:04
2016-11-16T15:48:04
11,125,921
0
0
null
null
null
null
UTF-8
C++
false
false
720
cpp
#include "Controller.h" #include "GameManeger.h" void Controller::KeyPress_A() { GameManeger::GetInstance()->TryMoveLeft(); } void Controller::KeyPress_S() { GameManeger::GetInstance()->TryMoveDown(); } void Controller::KeyPress_D() { GameManeger::GetInstance()->TryMoveRight(); } void Controller::KeyPress_W() { GameManeger::GetInstance()->TryMoveButtom(); } void Controller::KeyPress_Right() { GameManeger::GetInstance()->TryRotateRight(); } void Controller::KeyPress_Left() { GameManeger::GetInstance()->TryRotateLeft(); } bool Controller::NotifyUpdate() { return GameManeger::GetInstance()->Update(); } void Controller::Restart() { GameManeger::GetInstance()->Initialize(); }
7daa7b9f5bb69ab06f71646c2c47d286911cd880
477c8309420eb102b8073ce067d8df0afc5a79b1
/VTK/Filtering/vtkHyperOctreeAlgorithm.h
3df12d05cac30a865af5171af0cbe66955b1be47
[ "LicenseRef-scancode-paraview-1.2", "BSD-3-Clause" ]
permissive
aashish24/paraview-climate-3.11.1
e0058124e9492b7adfcb70fa2a8c96419297fbe6
c8ea429f56c10059dfa4450238b8f5bac3208d3a
refs/heads/uvcdat-master
2021-07-03T11:16:20.129505
2013-05-10T13:14:30
2013-05-10T13:14:30
4,238,077
1
0
NOASSERTION
2020-10-12T21:28:23
2012-05-06T02:32:44
C++
UTF-8
C++
false
false
4,420
h
/*========================================================================= Program: Visualization Toolkit Module: vtkHyperOctreeAlgorithm.h Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ // .NAME vtkHyperOctreeAlgorithm - Superclass for algorithms that produce only octree as output // .SECTION Description // vtkOctreeAlgorithm is a convenience class to make writing algorithms // easier. It is also designed to help transition old algorithms to the new // pipeline architecture. Ther are some assumptions and defaults made by this // class you should be aware of. This class defaults such that your filter // will have one input port and one output port. If that is not the case // simply change it with SetNumberOfInputPorts etc. See this classes // constructor for the default. This class also provides a FillInputPortInfo // method that by default says that all inputs will be RectilinearGrid. If that // isn't the case then please override this method in your subclass. This // class breaks out the downstream requests into seperate functions such as // ExecuteData and ExecuteInformation. For new algorithms you should // implement RequestData( request, inputVec, outputVec) but for older filters // there is a default implementation that calls the old ExecuteData(output) // signature, for even older filters that don;t implement ExecuteData the // default implementation calls the even older Execute() signature. #ifndef __vtkHyperOctreeAlgorithm_h #define __vtkHyperOctreeAlgorithm_h #include "vtkAlgorithm.h" #include "vtkHyperOctree.h" // makes things a bit easier class vtkDataSet; class vtkHyperOctree; class VTK_FILTERING_EXPORT vtkHyperOctreeAlgorithm : public vtkAlgorithm { public: vtkTypeMacro(vtkHyperOctreeAlgorithm,vtkAlgorithm); void PrintSelf(ostream& os, vtkIndent indent); // Description: // Get the output data object for a port on this algorithm. vtkHyperOctree *GetOutput(); vtkHyperOctree *GetOutput(int); virtual void SetOutput(vtkDataObject* d); // Description: // see vtkAlgorithm for details virtual int ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*); // this method is not recommended for use, but lots of old style filters // use it vtkDataObject* GetInput(); vtkDataObject *GetInput(int port); vtkHyperOctree *GetHyperOctreeInput(int port); // Description: // Set an input of this algorithm. void SetInput(vtkDataObject *); void SetInput(int, vtkDataObject*); // Description: // Add an input of this algorithm. void AddInput(vtkDataObject *); void AddInput(int, vtkDataObject*); protected: vtkHyperOctreeAlgorithm(); ~vtkHyperOctreeAlgorithm(); // convenience method virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector); // Description: // This is called by the superclass. // This is the method you should override. virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector); // Description: // This is called by the superclass. // This is the method you should override. virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*); // Description: // This method is the old style execute method virtual void ExecuteData(vtkDataObject *output); virtual void Execute(); // see algorithm for more info virtual int FillOutputPortInformation(int port, vtkInformation* info); virtual int FillInputPortInformation(int port, vtkInformation* info); private: vtkHyperOctreeAlgorithm(const vtkHyperOctreeAlgorithm&); // Not implemented. void operator=(const vtkHyperOctreeAlgorithm&); // Not implemented. }; #endif
7871fa511c0196d8a7308c4f9b73aca5ef3efb83
20169b20a3ad48d6206d7bc6f83cd9da1446280e
/4M-C plus plus/ADTA/Greedy/哈夫曼编码.cpp
34b1e3814caaa0b1033d1681802828734c3f04e0
[]
no_license
McFly-byte/Tyro
57440f150ffe69440c5599bac0bdd2105eb1c405
b810cb65933370738a507a852af7eb710861dc4f
refs/heads/master
2023-04-19T14:06:24.632660
2021-05-12T02:43:23
2021-05-12T02:43:23
332,741,678
0
1
null
null
null
null
GB18030
C++
false
false
1,601
cpp
/** * author: 919106840423 刘明承 * created: 04.2021 * describ: 哈夫曼编码 **/ #include <bits/stdc++.h> using namespace std; struct node { char data; int weight; node * left; node * right; node * parent; bool operator < ( const node & n ) const{ return weight > n.weight; } } ; struct cmp { bool operator()( node* & a, node* & b ){ return a->weight > b->weight; } }; void PreTraversal( node * bt )//先序_递归(中后序一样) { if( bt ){ cout << bt->weight << endl; PreTraversal( bt->left ); PreTraversal( bt->right ); } } int main() { int n; cin >> n; priority_queue<node*,vector<node*>,cmp> q; vector<node*> v(n); for ( int i = 0; i < n; i++ ){ v[i] = (node*)malloc( sizeof( struct node ) ); cin >> v[i]->data >> v[i]->weight; v[i]->parent = NULL; v[i]->left = v[i]->right = NULL; q.push( v[i] ); } node *tmp, *tmp2; while( !q.empty() ){ tmp = q.top(); q.pop(); if( q.empty() ) break; tmp2 = q.top(); q.pop(); node * huff = (node*)malloc( sizeof( struct node ) ); huff->left = tmp; huff->right = tmp2; huff->parent = NULL; //很重要,与上面for循环中的不重合 huff->weight = tmp->weight + tmp2->weight; tmp->parent = tmp2->parent = huff; q.push( huff ); } node * fg; for ( int i = 0; i < v.size(); i++ ){ fg = v[i]; cout << fg->data << ": "; string s = ""; while( fg->parent!=NULL ){ if( fg->parent->left == fg ) s += '0'; else if( fg->parent->right == fg ) s += '1'; else break; fg = fg->parent; } reverse( s.begin(), s.end() ); cout << s << endl; } }
594dba51bd1f19a352b398430170885c5d6fced9
a0962c825f9fd6519b2865d8467900ac102a6b45
/amrex-master/Src/Base/Parser/AMReX_IParser_Exe.cpp
35a75a03e6ec6ac8995407cf1ed95313bb628cfa
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
msussman42/amrex_implicit_interfaces
ed160cb42e87cb6caa5269efe4c0ae12a79032ad
a91ddbc3ada2883f3ce7db352f25b610c73babd8
refs/heads/master
2023-08-31T23:12:49.462517
2023-08-31T19:55:58
2023-08-31T19:55:58
197,830,424
13
6
NOASSERTION
2020-09-01T16:19:43
2019-07-19T19:23:55
Fortran
UTF-8
C++
false
false
29,314
cpp
#include <AMReX_IParser_Exe.H> namespace amrex { static int iparser_local_symbol_index (struct iparser_symbol* sym, Vector<char*>& local_variables) { auto r = std::find_if(local_variables.rbegin(), local_variables.rend(), [=] (char* i) { return std::strcmp(sym->name, i) == 0; }); if (r != local_variables.rend()) { return std::distance(r, local_variables.rend()) - 1; } else { return -1; } } void iparser_compile_exe_size (struct iparser_node* node, char*& p, std::size_t& exe_size, int& max_stack_size, int& stack_size, Vector<char*>& local_variables) { // In iparser_exe_eval, we push to the stack for NUMBER, SYMBOL, VP, PV, PP, and NEG_P. // In iparser_exe_eval, we pop the stack for ADD, SUB, MUL, DIV, F2, and IF. switch (node->type) { case IPARSER_NUMBER: { if (p) { auto t = new(p) IParserExeNumber; p += sizeof(IParserExeNumber); t->v = ((struct iparser_number*)node)->value; } exe_size += sizeof(IParserExeNumber); ++stack_size; max_stack_size = std::max(max_stack_size, stack_size); break; } case IPARSER_SYMBOL: { if (p) { auto t = new(p) IParserExeSymbol; p += sizeof(IParserExeSymbol); int lidx = iparser_local_symbol_index((struct iparser_symbol*)node, local_variables); if (lidx >= 0) { t->i = AMREX_IPARSER_LOCAL_IDX0 + lidx; } else { t->i = ((struct iparser_symbol*)node)->ip; if (t->i < 0) { throw std::runtime_error(std::string("Unknown variable ") + ((struct iparser_symbol*)node)->name); } } } exe_size += sizeof(IParserExeSymbol); ++stack_size; max_stack_size = std::max(max_stack_size, stack_size); break; } case IPARSER_ADD: { if (node->l->type == IPARSER_NUMBER) { iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeADD_VN; p += sizeof(IParserExeADD_VN); t->v = ((struct iparser_number*)(node->l))->value; } exe_size += sizeof(IParserExeADD_VN); } else if (node->r->type == IPARSER_NUMBER) { iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeADD_VN; p += sizeof(IParserExeADD_VN); t->v = ((struct iparser_number*)(node->r))->value; } exe_size += sizeof(IParserExeADD_VN); } else if (node->l->type == IPARSER_SYMBOL) { iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeADD_PN; p += sizeof(IParserExeADD_PN); int lidx = iparser_local_symbol_index((struct iparser_symbol*)(node->l), local_variables); if (lidx >= 0) { t->i = AMREX_IPARSER_LOCAL_IDX0 + lidx; } else { t->i = ((struct iparser_symbol*)(node->l))->ip; if (t->i < 0) { throw std::runtime_error(std::string("Unknown variable ") + ((struct iparser_symbol*)node->l)->name); } } } exe_size += sizeof(IParserExeADD_PN); } else if (node->r->type == IPARSER_SYMBOL) { iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeADD_PN; p += sizeof(IParserExeADD_PN); int lidx = iparser_local_symbol_index((struct iparser_symbol*)(node->r), local_variables); if (lidx >= 0) { t->i = AMREX_IPARSER_LOCAL_IDX0 + lidx; } else { t->i = ((struct iparser_symbol*)(node->r))->ip; if (t->i < 0) { throw std::runtime_error(std::string("Unknown variable ") + ((struct iparser_symbol*)node->r)->name); } } } exe_size += sizeof(IParserExeADD_PN); } else { int d1 = iparser_ast_depth(node->l); int d2 = iparser_ast_depth(node->r); if (d1 < d2) { iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); } else { iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); } if (p) { new(p) IParserExeADD; p += sizeof(IParserExeADD); } exe_size += sizeof(IParserExeADD); --stack_size; } // no need to update max_stack_size break; } case IPARSER_SUB: { if (node->l->type == IPARSER_NUMBER) { iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeSUB_VN; p += sizeof(IParserExeSUB_VN); t->v = ((struct iparser_number*)(node->l))->value; } exe_size += sizeof(IParserExeSUB_VN); } else if (node->r->type == IPARSER_NUMBER) { iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeADD_VN; p += sizeof(IParserExeADD_VN); t->v = -(((struct iparser_number*)(node->r))->value); } exe_size += sizeof(IParserExeADD_VN); } else if (node->l->type == IPARSER_SYMBOL) { iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeSUB_PN; p += sizeof(IParserExeSUB_PN); int lidx = iparser_local_symbol_index((struct iparser_symbol*)(node->l), local_variables); if (lidx >= 0) { t->i = AMREX_IPARSER_LOCAL_IDX0 + lidx; } else { t->i = ((struct iparser_symbol*)(node->l))->ip; if (t->i < 0) { throw std::runtime_error(std::string("Unknown variable ") + ((struct iparser_symbol*)node->l)->name); } } t->sign = 1.0; } exe_size += sizeof(IParserExeSUB_PN); } else if (node->r->type == IPARSER_SYMBOL) { iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeSUB_PN; p += sizeof(IParserExeSUB_PN); int lidx = iparser_local_symbol_index((struct iparser_symbol*)(node->r), local_variables); if (lidx >= 0) { t->i = AMREX_IPARSER_LOCAL_IDX0 + lidx; } else { t->i = ((struct iparser_symbol*)(node->r))->ip; if (t->i < 0) { throw std::runtime_error(std::string("Unknown variable ") + ((struct iparser_symbol*)node->r)->name); } } t->sign = -1.0; } exe_size += sizeof(IParserExeSUB_PN); } else { int d1 = iparser_ast_depth(node->l); int d2 = iparser_ast_depth(node->r); if (d1 < d2) { iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); } else { iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); } if (p) { auto t = new(p) IParserExeSUB; p += sizeof(IParserExeSUB); t->sign = (d1 < d2) ? -1.0 : 1.0; } exe_size += sizeof(IParserExeSUB); --stack_size; } // no need to update max_stack_size break; } case IPARSER_MUL: { if (node->l->type == IPARSER_NUMBER) { iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeMUL_VN; p += sizeof(IParserExeMUL_VN); t->v = ((struct iparser_number*)(node->l))->value; } exe_size += sizeof(IParserExeMUL_VN); } else if (node->r->type == IPARSER_NUMBER) { iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeMUL_VN; p += sizeof(IParserExeMUL_VN); t->v = ((struct iparser_number*)(node->r))->value; } exe_size += sizeof(IParserExeMUL_VN); } else if (node->l->type == IPARSER_SYMBOL) { iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeMUL_PN; p += sizeof(IParserExeMUL_PN); int lidx = iparser_local_symbol_index((struct iparser_symbol*)(node->l), local_variables); if (lidx >= 0) { t->i = AMREX_IPARSER_LOCAL_IDX0 + lidx; } else { t->i = ((struct iparser_symbol*)(node->l))->ip; if (t->i < 0) { throw std::runtime_error(std::string("Unknown variable ") + ((struct iparser_symbol*)node->l)->name); } } } exe_size += sizeof(IParserExeMUL_PN); } else if (node->r->type == IPARSER_SYMBOL) { iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeMUL_PN; p += sizeof(IParserExeMUL_PN); int lidx = iparser_local_symbol_index((struct iparser_symbol*)(node->r), local_variables); if (lidx >= 0) { t->i = AMREX_IPARSER_LOCAL_IDX0 + lidx; } else { t->i = ((struct iparser_symbol*)(node->r))->ip; if (t->i < 0) { throw std::runtime_error(std::string("Unknown variable ") + ((struct iparser_symbol*)node->r)->name); } } } exe_size += sizeof(IParserExeMUL_PN); } else { int d1 = iparser_ast_depth(node->l); int d2 = iparser_ast_depth(node->r); if (d1 < d2) { iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); } else { iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); } if (p) { new(p) IParserExeMUL; p += sizeof(IParserExeMUL); } exe_size += sizeof(IParserExeMUL); --stack_size; } // no need to update max_stack_size break; } case IPARSER_DIV: { if (node->l->type == IPARSER_NUMBER) { iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeDIV_VN; p += sizeof(IParserExeDIV_VN); t->v = ((struct iparser_number*)(node->l))->value; } exe_size += sizeof(IParserExeDIV_VN); } else if (node->r->type == IPARSER_NUMBER) { iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeDIV_NV; p += sizeof(IParserExeDIV_NV); t->v = ((struct iparser_number*)(node->r))->value; } exe_size += sizeof(IParserExeDIV_NV); } else if (node->l->type == IPARSER_SYMBOL) { iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeDIV_PN; p += sizeof(IParserExeDIV_PN); int lidx = iparser_local_symbol_index((struct iparser_symbol*)(node->l), local_variables); if (lidx >= 0) { t->i = AMREX_IPARSER_LOCAL_IDX0 + lidx; } else { t->i = ((struct iparser_symbol*)(node->l))->ip; if (t->i < 0) { throw std::runtime_error(std::string("Unknown variable ") + ((struct iparser_symbol*)node->l)->name); } } t->reverse = false; } exe_size += sizeof(IParserExeDIV_PN); } else if (node->r->type == IPARSER_SYMBOL) { iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeDIV_PN; p += sizeof(IParserExeDIV_PN); int lidx = iparser_local_symbol_index((struct iparser_symbol*)(node->r), local_variables); if (lidx >= 0) { t->i = AMREX_IPARSER_LOCAL_IDX0 + lidx; } else { t->i = ((struct iparser_symbol*)(node->r))->ip; if (t->i < 0) { throw std::runtime_error(std::string("Unknown variable ") + ((struct iparser_symbol*)node->r)->name); } } t->reverse = true; } exe_size += sizeof(IParserExeDIV_PN); } else { int d1 = iparser_ast_depth(node->l); int d2 = iparser_ast_depth(node->r); if (d1 < d2) { iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { new(p) IParserExeDIV_B; p += sizeof(IParserExeDIV_B); } exe_size += sizeof(IParserExeDIV_B); } else { iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { new(p) IParserExeDIV_F; p += sizeof(IParserExeDIV_F); } exe_size += sizeof(IParserExeDIV_F); } --stack_size; } // no need to update max_grid_size break; } case IPARSER_NEG: { iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { new(p) IParserExeNEG; p += sizeof(IParserExeNEG); } exe_size += sizeof(IParserExeNEG); break; } case IPARSER_F1: { iparser_compile_exe_size(((struct iparser_f1*)node)->l, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeF1; p += sizeof(IParserExeF1); t->ftype = ((struct iparser_f1*)node)->ftype; } exe_size += sizeof(IParserExeF1); break; } case IPARSER_F2: { int d1 = iparser_ast_depth(((struct iparser_f2*)node)->l); int d2 = iparser_ast_depth(((struct iparser_f2*)node)->r); if (d1 < d2) { iparser_compile_exe_size(((struct iparser_f2*)node)->r, p, exe_size, max_stack_size, stack_size, local_variables); iparser_compile_exe_size(((struct iparser_f2*)node)->l, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeF2_B; p += sizeof(IParserExeF2_B); t->ftype = ((struct iparser_f2*)node)->ftype; } exe_size += sizeof(IParserExeF2_B); } else { iparser_compile_exe_size(((struct iparser_f2*)node)->l, p, exe_size, max_stack_size, stack_size, local_variables); iparser_compile_exe_size(((struct iparser_f2*)node)->r, p, exe_size, max_stack_size, stack_size, local_variables); if (p) { auto t = new(p) IParserExeF2_F; p += sizeof(IParserExeF2_F); t->ftype = ((struct iparser_f2*)node)->ftype; } exe_size += sizeof(IParserExeF2_F); } --stack_size; break; } case IPARSER_F3: { AMREX_ALWAYS_ASSERT_WITH_MESSAGE(((struct iparser_f3*)node)->ftype == IPARSER_IF, "iparser_compile: unknown f3 type"); iparser_compile_exe_size(((struct iparser_f3*)node)->n1, p, exe_size, max_stack_size, stack_size, local_variables); IParserExeIF* tif = nullptr; char* psave = nullptr; if (p) { tif = new(p) IParserExeIF; p += sizeof(IParserExeIF); psave = p; } exe_size += sizeof(IParserExeIF); --stack_size; auto stack_size_save = stack_size; iparser_compile_exe_size(((struct iparser_f3*)node)->n2, p, exe_size, max_stack_size, stack_size, local_variables); IParserExeJUMP* tjump = nullptr; if (p) { tjump = new(p) IParserExeJUMP; p += sizeof(IParserExeJUMP); } exe_size += sizeof(IParserExeJUMP); if (psave) { tif->offset = p-psave; } stack_size = stack_size_save; psave = p; iparser_compile_exe_size(((struct iparser_f3*)node)->n3, p, exe_size, max_stack_size, stack_size, local_variables); if (tjump) { tjump->offset = p-psave; } break; } case IPARSER_ASSIGN: { auto asgn = (struct iparser_assign*)node; local_variables.push_back(asgn->s->name); iparser_compile_exe_size(asgn->v, p, exe_size, max_stack_size, stack_size, local_variables); break; } case IPARSER_LIST: { iparser_compile_exe_size(node->l, p, exe_size, max_stack_size, stack_size, local_variables); iparser_compile_exe_size(node->r, p, exe_size, max_stack_size, stack_size, local_variables); break; } case IPARSER_ADD_VP: { if (p) { auto t = new(p) IParserExeADD_VP; p += sizeof(IParserExeADD_VP); int lidx = iparser_local_symbol_index((struct iparser_symbol*)(node->r), local_variables); if (lidx >= 0) { t->i = AMREX_IPARSER_LOCAL_IDX0 + lidx; } else { t->i = node->rip; } t->v = node->lvp.v; } exe_size += sizeof(IParserExeADD_VP); ++stack_size; max_stack_size = std::max(max_stack_size, stack_size); break; } case IPARSER_SUB_VP: { if (p) { auto t = new(p) IParserExeSUB_VP; p += sizeof(IParserExeSUB_VP); int lidx = iparser_local_symbol_index((struct iparser_symbol*)(node->r), local_variables); if (lidx >= 0) { t->i = AMREX_IPARSER_LOCAL_IDX0 + lidx; } else { t->i = node->rip; } t->v = node->lvp.v; } exe_size += sizeof(IParserExeSUB_VP); ++stack_size; max_stack_size = std::max(max_stack_size, stack_size); break; } case IPARSER_MUL_VP: { if (p) { auto t = new(p) IParserExeMUL_VP; p += sizeof(IParserExeMUL_VP); int lidx = iparser_local_symbol_index((struct iparser_symbol*)(node->r), local_variables); if (lidx >= 0) { t->i = AMREX_IPARSER_LOCAL_IDX0 + lidx; } else { t->i = node->rip; } t->v = node->lvp.v; } exe_size += sizeof(IParserExeMUL_VP); ++stack_size; max_stack_size = std::max(max_stack_size, stack_size); break; } case IPARSER_DIV_VP: { if (p) { auto t = new(p) IParserExeDIV_VP; p += sizeof(IParserExeDIV_VP); int lidx = iparser_local_symbol_index((struct iparser_symbol*)(node->r), local_variables); if (lidx >= 0) { t->i = AMREX_IPARSER_LOCAL_IDX0 + lidx; } else { t->i = node->rip; } t->v = node->lvp.v; } exe_size += sizeof(IParserExeDIV_VP); ++stack_size; max_stack_size = std::max(max_stack_size, stack_size); break; } case IPARSER_DIV_PV: { if (p) { auto t = new(p) IParserExeDIV_PV; p += sizeof(IParserExeDIV_PV); int lidx = iparser_local_symbol_index((struct iparser_symbol*)(node->r), local_variables); if (lidx >= 0) { t->i = AMREX_IPARSER_LOCAL_IDX0 + lidx; } else { t->i = node->rip; } t->v = node->lvp.v; } exe_size += sizeof(IParserExeDIV_PV); ++stack_size; max_stack_size = std::max(max_stack_size, stack_size); break; } case IPARSER_ADD_PP: { if (p) { auto t = new(p) IParserExeADD_PP; p += sizeof(IParserExeADD_PP); int li1 = iparser_local_symbol_index((struct iparser_symbol*)(node->l), local_variables); int li2 = iparser_local_symbol_index((struct iparser_symbol*)(node->r), local_variables); if (li1 >= 0) { t->i1 = AMREX_IPARSER_LOCAL_IDX0 + li1; } else { t->i1 = node->lvp.ip; } if (li2 >= 0) { t->i2 = AMREX_IPARSER_LOCAL_IDX0 + li2; } else { t->i2 = node->rip; } } exe_size += sizeof(IParserExeADD_PP); ++stack_size; max_stack_size = std::max(max_stack_size, stack_size); break; } case IPARSER_SUB_PP: { if (p) { auto t = new(p) IParserExeSUB_PP; p += sizeof(IParserExeSUB_PP); int li1 = iparser_local_symbol_index((struct iparser_symbol*)(node->l), local_variables); int li2 = iparser_local_symbol_index((struct iparser_symbol*)(node->r), local_variables); if (li1 >= 0) { t->i1 = AMREX_IPARSER_LOCAL_IDX0 + li1; } else { t->i1 = node->lvp.ip; } if (li2 >= 0) { t->i2 = AMREX_IPARSER_LOCAL_IDX0 + li2; } else { t->i2 = node->rip; } } exe_size += sizeof(IParserExeSUB_PP); ++stack_size; max_stack_size = std::max(max_stack_size, stack_size); break; } case IPARSER_MUL_PP: { if (p) { auto t = new(p) IParserExeMUL_PP; p += sizeof(IParserExeMUL_PP); int li1 = iparser_local_symbol_index((struct iparser_symbol*)(node->l), local_variables); int li2 = iparser_local_symbol_index((struct iparser_symbol*)(node->r), local_variables); if (li1 >= 0) { t->i1 = AMREX_IPARSER_LOCAL_IDX0 + li1; } else { t->i1 = node->lvp.ip; } if (li2 >= 0) { t->i2 = AMREX_IPARSER_LOCAL_IDX0 + li2; } else { t->i2 = node->rip; } } exe_size += sizeof(IParserExeMUL_PP); ++stack_size; max_stack_size = std::max(max_stack_size, stack_size); break; } case IPARSER_DIV_PP: { if (p) { auto t = new(p) IParserExeDIV_PP; p += sizeof(IParserExeDIV_PP); int li1 = iparser_local_symbol_index((struct iparser_symbol*)(node->l), local_variables); int li2 = iparser_local_symbol_index((struct iparser_symbol*)(node->r), local_variables); if (li1 >= 0) { t->i1 = AMREX_IPARSER_LOCAL_IDX0 + li1; } else { t->i1 = node->lvp.ip; } if (li2 >= 0) { t->i2 = AMREX_IPARSER_LOCAL_IDX0 + li2; } else { t->i2 = node->rip; } } exe_size += sizeof(IParserExeDIV_PP); ++stack_size; max_stack_size = std::max(max_stack_size, stack_size); break; } case IPARSER_NEG_P: { if (p) { auto t = new(p) IParserExeNEG_P; p += sizeof(IParserExeNEG_P); int lidx = iparser_local_symbol_index((struct iparser_symbol*)(node->l), local_variables); if (lidx >= 0) { t->i = AMREX_IPARSER_LOCAL_IDX0 + lidx; } else { t->i = node->lvp.ip; } } exe_size += sizeof(IParserExeNEG_P); ++stack_size; max_stack_size = std::max(max_stack_size, stack_size); break; } default: amrex::Abort("iparser_compile: unknown node type " + std::to_string(node->type)); } } }
3a460b7fd339bd55c4cf627b6b6b2adb2afac7b0
a5db05a373f489d05a7f2b8e06d2805ee711de17
/android/frameworks/native/services/surfaceflinger/Layer.cpp
f710413dcfc9805991eebfb1eb67bb0e70ecd3d3
[ "LicenseRef-scancode-unicode", "Apache-2.0" ]
permissive
BPI-SINOVOIP/BPI-H3-New-Android
7c0cdd50a23e62a204d4818954357868b4925945
5cbaa7ad4f73f615dcc4fbed07b52ae240743504
refs/heads/master
2023-02-25T15:43:36.633336
2018-07-18T10:56:14
2018-07-18T10:56:14
69,656,896
1
1
null
null
null
null
UTF-8
C++
false
false
45,467
cpp
/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define ATRACE_TAG ATRACE_TAG_GRAPHICS #include <stdlib.h> #include <stdint.h> #include <sys/types.h> #include <math.h> #include <cutils/compiler.h> #include <cutils/native_handle.h> #include <cutils/properties.h> #include <utils/Errors.h> #include <utils/Log.h> #include <utils/StopWatch.h> #include <utils/Trace.h> #include <ui/GraphicBuffer.h> #include <ui/PixelFormat.h> #include <gui/Surface.h> #include "clz.h" #include "Colorizer.h" #include "DisplayDevice.h" #include "Layer.h" #include "SurfaceFlinger.h" #include "SurfaceTextureLayer.h" #include "DisplayHardware/HWComposer.h" #include "RenderEngine/RenderEngine.h" #define DEBUG_RESIZE 0 namespace android { // --------------------------------------------------------------------------- int32_t Layer::sSequence = 1; Layer::Layer(SurfaceFlinger* flinger, const sp<Client>& client, const String8& name, uint32_t w, uint32_t h, uint32_t flags) : contentDirty(false), sequence(uint32_t(android_atomic_inc(&sSequence))), mFlinger(flinger), mTextureName(-1U), mPremultipliedAlpha(true), mName("unnamed"), mDebug(false), mFormat(PIXEL_FORMAT_NONE), mOpaqueLayer(true), mTransactionFlags(0), mQueuedFrames(0), mCurrentTransform(0), mCurrentScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE), mCurrentOpacity(true), mRefreshPending(false), mFrameLatencyNeeded(false), mFiltering(false), mNeedsFiltering(false), mMesh(Mesh::TRIANGLE_FAN, 4, 2, 2), mSecure(false), mProtectedByApp(false), mHasSurface(false), mClientRef(client) { mCurrentCrop.makeInvalid(); mFlinger->getRenderEngine().genTextures(1, &mTextureName); mTexture.init(Texture::TEXTURE_EXTERNAL, mTextureName); uint32_t layerFlags = 0; if (flags & ISurfaceComposerClient::eHidden) layerFlags = layer_state_t::eLayerHidden; if (flags & ISurfaceComposerClient::eNonPremultiplied) mPremultipliedAlpha = false; mName = name; mCurrentState.active.w = w; mCurrentState.active.h = h; mCurrentState.active.crop.makeInvalid(); mCurrentState.z = 0; mCurrentState.alpha = 0xFF; mCurrentState.layerStack = 0; mCurrentState.flags = layerFlags; mCurrentState.sequence = 0; mCurrentState.transform.set(0, 0); mCurrentState.requested = mCurrentState.active; // drawing state & current state are identical mDrawingState = mCurrentState; nsecs_t displayPeriod = flinger->getHwComposer().getRefreshPeriod(HWC_DISPLAY_PRIMARY); mFrameTracker.setDisplayRefreshPeriod(displayPeriod); } void Layer::onFirstRef() { // Creates a custom BufferQueue for SurfaceFlingerConsumer to use mBufferQueue = new SurfaceTextureLayer(mFlinger); mSurfaceFlingerConsumer = new SurfaceFlingerConsumer(mBufferQueue, mTextureName); mSurfaceFlingerConsumer->setConsumerUsageBits(getEffectiveUsage(0)); mSurfaceFlingerConsumer->setFrameAvailableListener(this); mSurfaceFlingerConsumer->setName(mName); #ifdef TARGET_DISABLE_TRIPLE_BUFFERING #warning "disabling triple buffering" mSurfaceFlingerConsumer->setDefaultMaxBufferCount(2); #else mSurfaceFlingerConsumer->setDefaultMaxBufferCount(3); #endif const sp<const DisplayDevice> hw(mFlinger->getDefaultDisplayDevice()); updateTransformHint(hw); } Layer::~Layer() { sp<Client> c(mClientRef.promote()); if (c != 0) { c->detachLayer(this); } mFlinger->deleteTextureAsync(mTextureName); mFrameTracker.logAndResetStats(mName); } // --------------------------------------------------------------------------- // callbacks // --------------------------------------------------------------------------- void Layer::onLayerDisplayed(const sp<const DisplayDevice>& hw, HWComposer::HWCLayerInterface* layer) { if (layer) { layer->onDisplayed(); mSurfaceFlingerConsumer->setReleaseFence(layer->getAndResetReleaseFence()); } } void Layer::onFrameAvailable() { android_atomic_inc(&mQueuedFrames); mFlinger->signalLayerUpdate(); } // called with SurfaceFlinger::mStateLock from the drawing thread after // the layer has been remove from the current state list (and just before // it's removed from the drawing state list) void Layer::onRemoved() { mSurfaceFlingerConsumer->abandon(); } // --------------------------------------------------------------------------- // set-up // --------------------------------------------------------------------------- const String8& Layer::getName() const { return mName; } status_t Layer::setBuffers( uint32_t w, uint32_t h, PixelFormat format, uint32_t flags) { uint32_t const maxSurfaceDims = min( mFlinger->getMaxTextureSize(), mFlinger->getMaxViewportDims()); // never allow a surface larger than what our underlying GL implementation // can handle. if ((uint32_t(w)>maxSurfaceDims) || (uint32_t(h)>maxSurfaceDims)) { ALOGE("dimensions too large %u x %u", uint32_t(w), uint32_t(h)); return BAD_VALUE; } mFormat = format; mSecure = (flags & ISurfaceComposerClient::eSecure) ? true : false; mProtectedByApp = (flags & ISurfaceComposerClient::eProtectedByApp) ? true : false; mOpaqueLayer = (flags & ISurfaceComposerClient::eOpaque); mCurrentOpacity = getOpacityForFormat(format); mSurfaceFlingerConsumer->setDefaultBufferSize(w, h); mSurfaceFlingerConsumer->setDefaultBufferFormat(format); mSurfaceFlingerConsumer->setConsumerUsageBits(getEffectiveUsage(0)); return NO_ERROR; } sp<IBinder> Layer::getHandle() { Mutex::Autolock _l(mLock); LOG_ALWAYS_FATAL_IF(mHasSurface, "Layer::getHandle() has already been called"); mHasSurface = true; /* * The layer handle is just a BBinder object passed to the client * (remote process) -- we don't keep any reference on our side such that * the dtor is called when the remote side let go of its reference. * * LayerCleaner ensures that mFlinger->onLayerDestroyed() is called for * this layer when the handle is destroyed. */ class Handle : public BBinder, public LayerCleaner { wp<const Layer> mOwner; public: Handle(const sp<SurfaceFlinger>& flinger, const sp<Layer>& layer) : LayerCleaner(flinger, layer), mOwner(layer) { } }; return new Handle(mFlinger, this); } sp<IGraphicBufferProducer> Layer::getBufferQueue() const { return mBufferQueue; } // --------------------------------------------------------------------------- // h/w composer set-up // --------------------------------------------------------------------------- Rect Layer::getContentCrop() const { // this is the crop rectangle that applies to the buffer // itself (as opposed to the window) Rect crop; if (!mCurrentCrop.isEmpty()) { // if the buffer crop is defined, we use that crop = mCurrentCrop; } else if (mActiveBuffer != NULL) { // otherwise we use the whole buffer crop = mActiveBuffer->getBounds(); } else { // if we don't have a buffer yet, we use an empty/invalid crop crop.makeInvalid(); } return crop; } static Rect reduce(const Rect& win, const Region& exclude) { if (CC_LIKELY(exclude.isEmpty())) { return win; } if (exclude.isRect()) { return win.reduce(exclude.getBounds()); } return Region(win).subtract(exclude).getBounds(); } Rect Layer::computeBounds() const { const Layer::State& s(getDrawingState()); Rect win(s.active.w, s.active.h); if (!s.active.crop.isEmpty()) { win.intersect(s.active.crop, &win); } // subtract the transparent region and snap to the bounds return reduce(win, s.activeTransparentRegion); } FloatRect Layer::computeCrop(const sp<const DisplayDevice>& hw) const { // the content crop is the area of the content that gets scaled to the // layer's size. FloatRect crop(getContentCrop()); // the active.crop is the area of the window that gets cropped, but not // scaled in any ways. const State& s(getDrawingState()); // apply the projection's clipping to the window crop in // layerstack space, and convert-back to layer space. // if there are no window scaling involved, this operation will map to full // pixels in the buffer. // FIXME: the 3 lines below can produce slightly incorrect clipping when we have // a viewport clipping and a window transform. we should use floating point to fix this. Rect activeCrop(s.active.w, s.active.h); if (!s.active.crop.isEmpty()) { activeCrop = s.active.crop; } activeCrop = s.transform.transform(activeCrop); activeCrop.intersect(hw->getViewport(), &activeCrop); activeCrop = s.transform.inverse().transform(activeCrop); // paranoia: make sure the window-crop is constrained in the // window's bounds activeCrop.intersect(Rect(s.active.w, s.active.h), &activeCrop); // subtract the transparent region and snap to the bounds activeCrop = reduce(activeCrop, s.activeTransparentRegion); if (!activeCrop.isEmpty()) { // Transform the window crop to match the buffer coordinate system, // which means using the inverse of the current transform set on the // SurfaceFlingerConsumer. uint32_t invTransform = mCurrentTransform; int winWidth = s.active.w; int winHeight = s.active.h; if (invTransform & NATIVE_WINDOW_TRANSFORM_ROT_90) { invTransform ^= NATIVE_WINDOW_TRANSFORM_FLIP_V | NATIVE_WINDOW_TRANSFORM_FLIP_H; winWidth = s.active.h; winHeight = s.active.w; } const Rect winCrop = activeCrop.transform( invTransform, s.active.w, s.active.h); // below, crop is intersected with winCrop expressed in crop's coordinate space float xScale = crop.getWidth() / float(winWidth); float yScale = crop.getHeight() / float(winHeight); float insetL = winCrop.left * xScale; float insetT = winCrop.top * yScale; float insetR = (winWidth - winCrop.right ) * xScale; float insetB = (winHeight - winCrop.bottom) * yScale; crop.left += insetL; crop.top += insetT; crop.right -= insetR; crop.bottom -= insetB; } return crop; } void Layer::setGeometry( const sp<const DisplayDevice>& hw, HWComposer::HWCLayerInterface& layer) { layer.setDefaultState(); // enable this layer layer.setSkip(false); if (isSecure() && !hw->isSecure()) { layer.setSkip(true); } // this gives us only the "orientation" component of the transform const State& s(getDrawingState()); if (!isOpaque() || s.alpha != 0xFF) { layer.setBlending(mPremultipliedAlpha ? HWC_BLENDING_PREMULT : HWC_BLENDING_COVERAGE); } // apply the layer's transform, followed by the display's global transform // here we're guaranteed that the layer's transform preserves rects Rect frame(s.transform.transform(computeBounds())); frame.intersect(hw->getViewport(), &frame); const Transform& tr(hw->getTransform()); layer.setFrame(tr.transform(frame)); layer.setCrop(computeCrop(hw)); layer.setPlaneAlpha(s.alpha); /* * Transformations are applied in this order: * 1) buffer orientation/flip/mirror * 2) state transformation (window manager) * 3) layer orientation (screen orientation) * (NOTE: the matrices are multiplied in reverse order) */ const Transform bufferOrientation(mCurrentTransform); Transform transform(tr * s.transform * bufferOrientation); if (mSurfaceFlingerConsumer->getTransformToDisplayInverse()) { /* * the code below applies the display's inverse transform to the buffer */ uint32_t invTransform = hw->getOrientationTransform(); // calculate the inverse transform if (invTransform & NATIVE_WINDOW_TRANSFORM_ROT_90) { invTransform ^= NATIVE_WINDOW_TRANSFORM_FLIP_V | NATIVE_WINDOW_TRANSFORM_FLIP_H; } // and apply to the current transform transform = transform * Transform(invTransform); } // this gives us only the "orientation" component of the transform const uint32_t orientation = transform.getOrientation(); if (orientation & Transform::ROT_INVALID) { // we can only handle simple transformation layer.setSkip(true); } else { layer.setTransform(orientation); } } void Layer::setPerFrameData(const sp<const DisplayDevice>& hw, HWComposer::HWCLayerInterface& layer) { // we have to set the visible region on every frame because // we currently free it during onLayerDisplayed(), which is called // after HWComposer::commit() -- every frame. // Apply this display's projection's viewport to the visible region // before giving it to the HWC HAL. const Transform& tr = hw->getTransform(); Region visible = tr.transform(visibleRegion.intersect(hw->getViewport())); layer.setVisibleRegionScreen(visible); // NOTE: buffer can be NULL if the client never drew into this // layer yet, or if we ran out of memory layer.setBuffer(mActiveBuffer); } void Layer::setAcquireFence(const sp<const DisplayDevice>& hw, HWComposer::HWCLayerInterface& layer) { int fenceFd = -1; // TODO: there is a possible optimization here: we only need to set the // acquire fence the first time a new buffer is acquired on EACH display. if (layer.getCompositionType() == HWC_OVERLAY) { sp<Fence> fence = mSurfaceFlingerConsumer->getCurrentFence(); if (fence->isValid()) { fenceFd = fence->dup(); if (fenceFd == -1) { ALOGW("failed to dup layer fence, skipping sync: %d", errno); } } } layer.setAcquireFenceFd(fenceFd); } // --------------------------------------------------------------------------- // drawing... // --------------------------------------------------------------------------- void Layer::draw(const sp<const DisplayDevice>& hw, const Region& clip) const { onDraw(hw, clip); } void Layer::draw(const sp<const DisplayDevice>& hw) { onDraw( hw, Region(hw->bounds()) ); } void Layer::onDraw(const sp<const DisplayDevice>& hw, const Region& clip) const { ATRACE_CALL(); if (CC_UNLIKELY(mActiveBuffer == 0)) { // the texture has not been created yet, this Layer has // in fact never been drawn into. This happens frequently with // SurfaceView because the WindowManager can't know when the client // has drawn the first time. // If there is nothing under us, we paint the screen in black, otherwise // we just skip this update. // figure out if there is something below us Region under; const SurfaceFlinger::LayerVector& drawingLayers( mFlinger->mDrawingState.layersSortedByZ); const size_t count = drawingLayers.size(); for (size_t i=0 ; i<count ; ++i) { const sp<Layer>& layer(drawingLayers[i]); if (layer.get() == static_cast<Layer const*>(this)) break; under.orSelf( hw->getTransform().transform(layer->visibleRegion) ); } // if not everything below us is covered, we plug the holes! Region holes(clip.subtract(under)); if (!holes.isEmpty()) { clearWithOpenGL(hw, holes, 0, 0, 0, 1); } return; } // Bind the current buffer to the GL texture, and wait for it to be // ready for us to draw into. status_t err = mSurfaceFlingerConsumer->bindTextureImage(); if (err != NO_ERROR) { ALOGW("onDraw: bindTextureImage failed (err=%d)", err); // Go ahead and draw the buffer anyway; no matter what we do the screen // is probably going to have something visibly wrong. } //bool blackOutLayer = isProtected() || (isSecure() && !hw->isSecure()); bool blackOutLayer = (isProtected() || isSecure()) && !hw->isSecure(); RenderEngine& engine(mFlinger->getRenderEngine()); if (!blackOutLayer) { // TODO: we could be more subtle with isFixedSize() const bool useFiltering = getFiltering() || needsFiltering(hw) || isFixedSize(); // Query the texture matrix given our current filtering mode. float textureMatrix[16]; mSurfaceFlingerConsumer->setFilteringEnabled(useFiltering); mSurfaceFlingerConsumer->getTransformMatrix(textureMatrix); if (mSurfaceFlingerConsumer->getTransformToDisplayInverse()) { /* * the code below applies the display's inverse transform to the texture transform */ // create a 4x4 transform matrix from the display transform flags const mat4 flipH(-1,0,0,0, 0,1,0,0, 0,0,1,0, 1,0,0,1); const mat4 flipV( 1,0,0,0, 0,-1,0,0, 0,0,1,0, 0,1,0,1); const mat4 rot90( 0,1,0,0, -1,0,0,0, 0,0,1,0, 1,0,0,1); mat4 tr; uint32_t transform = hw->getOrientationTransform(); if (transform & NATIVE_WINDOW_TRANSFORM_ROT_90) tr = tr * rot90; if (transform & NATIVE_WINDOW_TRANSFORM_FLIP_H) tr = tr * flipH; if (transform & NATIVE_WINDOW_TRANSFORM_FLIP_V) tr = tr * flipV; // calculate the inverse tr = inverse(tr); // and finally apply it to the original texture matrix const mat4 texTransform(mat4(static_cast<const float*>(textureMatrix)) * tr); memcpy(textureMatrix, texTransform.asArray(), sizeof(textureMatrix)); } // Set things up for texturing. mTexture.setDimensions(mActiveBuffer->getWidth(), mActiveBuffer->getHeight()); mTexture.setFiltering(useFiltering); mTexture.setMatrix(textureMatrix); engine.setupLayerTexturing(mTexture); } else { engine.setupLayerBlackedOut(); } drawWithOpenGL(hw, clip); engine.disableTexturing(); } void Layer::clearWithOpenGL(const sp<const DisplayDevice>& hw, const Region& clip, float red, float green, float blue, float alpha) const { RenderEngine& engine(mFlinger->getRenderEngine()); computeGeometry(hw, mMesh); engine.setupFillWithColor(red, green, blue, alpha); engine.drawMesh(mMesh); } void Layer::clearWithOpenGL( const sp<const DisplayDevice>& hw, const Region& clip) const { clearWithOpenGL(hw, clip, 0,0,0,0); } void Layer::drawWithOpenGL( const sp<const DisplayDevice>& hw, const Region& clip) const { const uint32_t fbHeight = hw->getHeight(); const State& s(getDrawingState()); computeGeometry(hw, mMesh); /* * NOTE: the way we compute the texture coordinates here produces * different results than when we take the HWC path -- in the later case * the "source crop" is rounded to texel boundaries. * This can produce significantly different results when the texture * is scaled by a large amount. * * The GL code below is more logical (imho), and the difference with * HWC is due to a limitation of the HWC API to integers -- a question * is suspend is whether we should ignore this problem or revert to * GL composition when a buffer scaling is applied (maybe with some * minimal value)? Or, we could make GL behave like HWC -- but this feel * like more of a hack. */ const Rect win(computeBounds()); float left = float(win.left) / float(s.active.w); float top = float(win.top) / float(s.active.h); float right = float(win.right) / float(s.active.w); float bottom = float(win.bottom) / float(s.active.h); // TODO: we probably want to generate the texture coords with the mesh // here we assume that we only have 4 vertices Mesh::VertexArray<vec2> texCoords(mMesh.getTexCoordArray<vec2>()); texCoords[0] = vec2(left, 1.0f - top); texCoords[1] = vec2(left, 1.0f - bottom); texCoords[2] = vec2(right, 1.0f - bottom); texCoords[3] = vec2(right, 1.0f - top); RenderEngine& engine(mFlinger->getRenderEngine()); engine.setupLayerBlending(mPremultipliedAlpha, isOpaque(), s.alpha); engine.drawMesh(mMesh); engine.disableBlending(); } void Layer::setFiltering(bool filtering) { mFiltering = filtering; } bool Layer::getFiltering() const { return mFiltering; } // As documented in libhardware header, formats in the range // 0x100 - 0x1FF are specific to the HAL implementation, and // are known to have no alpha channel // TODO: move definition for device-specific range into // hardware.h, instead of using hard-coded values here. #define HARDWARE_IS_DEVICE_FORMAT(f) ((f) >= 0x100 && (f) <= 0x1FF) bool Layer::getOpacityForFormat(uint32_t format) { if (HARDWARE_IS_DEVICE_FORMAT(format)) { return true; } switch (format) { case HAL_PIXEL_FORMAT_RGBA_8888: case HAL_PIXEL_FORMAT_BGRA_8888: case HAL_PIXEL_FORMAT_sRGB_A_8888: return false; } // in all other case, we have no blending (also for unknown formats) return true; } // ---------------------------------------------------------------------------- // local state // ---------------------------------------------------------------------------- void Layer::computeGeometry(const sp<const DisplayDevice>& hw, Mesh& mesh) const { const Layer::State& s(getDrawingState()); const Transform tr(hw->getTransform() * s.transform); const uint32_t hw_h = hw->getHeight(); Rect win(s.active.w, s.active.h); if (!s.active.crop.isEmpty()) { win.intersect(s.active.crop, &win); } // subtract the transparent region and snap to the bounds win = reduce(win, s.activeTransparentRegion); Mesh::VertexArray<vec2> position(mesh.getPositionArray<vec2>()); position[0] = tr.transform(win.left, win.top); position[1] = tr.transform(win.left, win.bottom); position[2] = tr.transform(win.right, win.bottom); position[3] = tr.transform(win.right, win.top); for (size_t i=0 ; i<4 ; i++) { position[i].y = hw_h - position[i].y; } } bool Layer::isOpaque() const { // if we don't have a buffer yet, we're translucent regardless of the // layer's opaque flag. if (mActiveBuffer == 0) { return false; } // if the layer has the opaque flag, then we're always opaque, // otherwise we use the current buffer's format. return mOpaqueLayer || mCurrentOpacity; } bool Layer::isProtected() const { const sp<GraphicBuffer>& activeBuffer(mActiveBuffer); return (activeBuffer != 0) && (activeBuffer->getUsage() & GRALLOC_USAGE_PROTECTED); } bool Layer::isFixedSize() const { return mCurrentScalingMode != NATIVE_WINDOW_SCALING_MODE_FREEZE; } bool Layer::isCropped() const { return !mCurrentCrop.isEmpty(); } bool Layer::needsFiltering(const sp<const DisplayDevice>& hw) const { return mNeedsFiltering || hw->needsFiltering(); } void Layer::setVisibleRegion(const Region& visibleRegion) { // always called from main thread this->visibleRegion = visibleRegion; } void Layer::setCoveredRegion(const Region& coveredRegion) { // always called from main thread this->coveredRegion = coveredRegion; } void Layer::setVisibleNonTransparentRegion(const Region& setVisibleNonTransparentRegion) { // always called from main thread this->visibleNonTransparentRegion = setVisibleNonTransparentRegion; } // ---------------------------------------------------------------------------- // transaction // ---------------------------------------------------------------------------- uint32_t Layer::doTransaction(uint32_t flags) { ATRACE_CALL(); const Layer::State& s(getDrawingState()); const Layer::State& c(getCurrentState()); const bool sizeChanged = (c.requested.w != s.requested.w) || (c.requested.h != s.requested.h); if (sizeChanged) { // the size changed, we need to ask our client to request a new buffer ALOGD_IF(DEBUG_RESIZE, "doTransaction: geometry (layer=%p '%s'), tr=%02x, scalingMode=%d\n" " current={ active ={ wh={%4u,%4u} crop={%4d,%4d,%4d,%4d} (%4d,%4d) }\n" " requested={ wh={%4u,%4u} crop={%4d,%4d,%4d,%4d} (%4d,%4d) }}\n" " drawing={ active ={ wh={%4u,%4u} crop={%4d,%4d,%4d,%4d} (%4d,%4d) }\n" " requested={ wh={%4u,%4u} crop={%4d,%4d,%4d,%4d} (%4d,%4d) }}\n", this, getName().string(), mCurrentTransform, mCurrentScalingMode, c.active.w, c.active.h, c.active.crop.left, c.active.crop.top, c.active.crop.right, c.active.crop.bottom, c.active.crop.getWidth(), c.active.crop.getHeight(), c.requested.w, c.requested.h, c.requested.crop.left, c.requested.crop.top, c.requested.crop.right, c.requested.crop.bottom, c.requested.crop.getWidth(), c.requested.crop.getHeight(), s.active.w, s.active.h, s.active.crop.left, s.active.crop.top, s.active.crop.right, s.active.crop.bottom, s.active.crop.getWidth(), s.active.crop.getHeight(), s.requested.w, s.requested.h, s.requested.crop.left, s.requested.crop.top, s.requested.crop.right, s.requested.crop.bottom, s.requested.crop.getWidth(), s.requested.crop.getHeight()); // record the new size, form this point on, when the client request // a buffer, it'll get the new size. mSurfaceFlingerConsumer->setDefaultBufferSize( c.requested.w, c.requested.h); } if (!isFixedSize()) { const bool resizePending = (c.requested.w != c.active.w) || (c.requested.h != c.active.h); if (resizePending) { // don't let Layer::doTransaction update the drawing state // if we have a pending resize, unless we are in fixed-size mode. // the drawing state will be updated only once we receive a buffer // with the correct size. // // in particular, we want to make sure the clip (which is part // of the geometry state) is latched together with the size but is // latched immediately when no resizing is involved. flags |= eDontUpdateGeometryState; } } // always set active to requested, unless we're asked not to // this is used by Layer, which special cases resizes. if (flags & eDontUpdateGeometryState) { } else { Layer::State& editCurrentState(getCurrentState()); editCurrentState.active = c.requested; } if (s.active != c.active) { // invalidate and recompute the visible regions if needed flags |= Layer::eVisibleRegion; } if (c.sequence != s.sequence) { // invalidate and recompute the visible regions if needed flags |= eVisibleRegion; this->contentDirty = true; // we may use linear filtering, if the matrix scales us const uint8_t type = c.transform.getType(); mNeedsFiltering = (!c.transform.preserveRects() || (type >= Transform::SCALE)); } // Commit the transaction commitTransaction(); return flags; } void Layer::commitTransaction() { mDrawingState = mCurrentState; } uint32_t Layer::getTransactionFlags(uint32_t flags) { return android_atomic_and(~flags, &mTransactionFlags) & flags; } uint32_t Layer::setTransactionFlags(uint32_t flags) { return android_atomic_or(flags, &mTransactionFlags); } bool Layer::setPosition(float x, float y) { if (mCurrentState.transform.tx() == x && mCurrentState.transform.ty() == y) return false; mCurrentState.sequence++; mCurrentState.transform.set(x, y); setTransactionFlags(eTransactionNeeded); return true; } bool Layer::setLayer(uint32_t z) { if (mCurrentState.z == z) return false; mCurrentState.sequence++; mCurrentState.z = z; setTransactionFlags(eTransactionNeeded); return true; } bool Layer::setSize(uint32_t w, uint32_t h) { if (mCurrentState.requested.w == w && mCurrentState.requested.h == h) return false; mCurrentState.requested.w = w; mCurrentState.requested.h = h; setTransactionFlags(eTransactionNeeded); return true; } bool Layer::setAlpha(uint8_t alpha) { if (mCurrentState.alpha == alpha) return false; mCurrentState.sequence++; mCurrentState.alpha = alpha; setTransactionFlags(eTransactionNeeded); return true; } bool Layer::setMatrix(const layer_state_t::matrix22_t& matrix) { mCurrentState.sequence++; mCurrentState.transform.set( matrix.dsdx, matrix.dsdy, matrix.dtdx, matrix.dtdy); setTransactionFlags(eTransactionNeeded); return true; } bool Layer::setTransparentRegionHint(const Region& transparent) { mCurrentState.requestedTransparentRegion = transparent; setTransactionFlags(eTransactionNeeded); return true; } bool Layer::setFlags(uint8_t flags, uint8_t mask) { const uint32_t newFlags = (mCurrentState.flags & ~mask) | (flags & mask); if (mCurrentState.flags == newFlags) return false; mCurrentState.sequence++; mCurrentState.flags = newFlags; setTransactionFlags(eTransactionNeeded); return true; } bool Layer::setCrop(const Rect& crop) { if (mCurrentState.requested.crop == crop) return false; mCurrentState.sequence++; mCurrentState.requested.crop = crop; setTransactionFlags(eTransactionNeeded); return true; } bool Layer::setLayerStack(uint32_t layerStack) { if (mCurrentState.layerStack == layerStack) return false; mCurrentState.sequence++; mCurrentState.layerStack = layerStack; setTransactionFlags(eTransactionNeeded); return true; } // ---------------------------------------------------------------------------- // pageflip handling... // ---------------------------------------------------------------------------- bool Layer::onPreComposition() { mRefreshPending = false; return mQueuedFrames > 0; } void Layer::onPostComposition() { if (mFrameLatencyNeeded) { nsecs_t desiredPresentTime = mSurfaceFlingerConsumer->getTimestamp(); mFrameTracker.setDesiredPresentTime(desiredPresentTime); sp<Fence> frameReadyFence = mSurfaceFlingerConsumer->getCurrentFence(); if (frameReadyFence->isValid()) { mFrameTracker.setFrameReadyFence(frameReadyFence); } else { // There was no fence for this frame, so assume that it was ready // to be presented at the desired present time. mFrameTracker.setFrameReadyTime(desiredPresentTime); } const HWComposer& hwc = mFlinger->getHwComposer(); sp<Fence> presentFence = hwc.getDisplayFence(HWC_DISPLAY_PRIMARY); if (presentFence->isValid()) { mFrameTracker.setActualPresentFence(presentFence); } else { // The HWC doesn't support present fences, so use the refresh // timestamp instead. nsecs_t presentTime = hwc.getRefreshTimestamp(HWC_DISPLAY_PRIMARY); mFrameTracker.setActualPresentTime(presentTime); } mFrameTracker.advanceFrame(); mFrameLatencyNeeded = false; } } bool Layer::isVisible() const { const Layer::State& s(mDrawingState); return !(s.flags & layer_state_t::eLayerHidden) && s.alpha && (mActiveBuffer != NULL); } Region Layer::latchBuffer(bool& recomputeVisibleRegions) { ATRACE_CALL(); Region outDirtyRegion; if (mQueuedFrames > 0) { // if we've already called updateTexImage() without going through // a composition step, we have to skip this layer at this point // because we cannot call updateTeximage() without a corresponding // compositionComplete() call. // we'll trigger an update in onPreComposition(). if (mRefreshPending) { return outDirtyRegion; } // Capture the old state of the layer for comparisons later const bool oldOpacity = isOpaque(); sp<GraphicBuffer> oldActiveBuffer = mActiveBuffer; struct Reject : public SurfaceFlingerConsumer::BufferRejecter { Layer::State& front; Layer::State& current; bool& recomputeVisibleRegions; Reject(Layer::State& front, Layer::State& current, bool& recomputeVisibleRegions) : front(front), current(current), recomputeVisibleRegions(recomputeVisibleRegions) { } virtual bool reject(const sp<GraphicBuffer>& buf, const IGraphicBufferConsumer::BufferItem& item) { if (buf == NULL) { return false; } uint32_t bufWidth = buf->getWidth(); uint32_t bufHeight = buf->getHeight(); // check that we received a buffer of the right size // (Take the buffer's orientation into account) if (item.mTransform & Transform::ROT_90) { swap(bufWidth, bufHeight); } bool isFixedSize = item.mScalingMode != NATIVE_WINDOW_SCALING_MODE_FREEZE; if (front.active != front.requested) { if (isFixedSize || (bufWidth == front.requested.w && bufHeight == front.requested.h)) { // Here we pretend the transaction happened by updating the // current and drawing states. Drawing state is only accessed // in this thread, no need to have it locked front.active = front.requested; // We also need to update the current state so that // we don't end-up overwriting the drawing state with // this stale current state during the next transaction // // NOTE: We don't need to hold the transaction lock here // because State::active is only accessed from this thread. current.active = front.active; // recompute visible region recomputeVisibleRegions = true; } ALOGD_IF(DEBUG_RESIZE, "latchBuffer/reject: buffer (%ux%u, tr=%02x), scalingMode=%d\n" " drawing={ active ={ wh={%4u,%4u} crop={%4d,%4d,%4d,%4d} (%4d,%4d) }\n" " requested={ wh={%4u,%4u} crop={%4d,%4d,%4d,%4d} (%4d,%4d) }}\n", bufWidth, bufHeight, item.mTransform, item.mScalingMode, front.active.w, front.active.h, front.active.crop.left, front.active.crop.top, front.active.crop.right, front.active.crop.bottom, front.active.crop.getWidth(), front.active.crop.getHeight(), front.requested.w, front.requested.h, front.requested.crop.left, front.requested.crop.top, front.requested.crop.right, front.requested.crop.bottom, front.requested.crop.getWidth(), front.requested.crop.getHeight()); } if (!isFixedSize) { if (front.active.w != bufWidth || front.active.h != bufHeight) { // reject this buffer //ALOGD("rejecting buffer: bufWidth=%d, bufHeight=%d, front.active.{w=%d, h=%d}", // bufWidth, bufHeight, front.active.w, front.active.h); return true; } } // if the transparent region has changed (this test is // conservative, but that's fine, worst case we're doing // a bit of extra work), we latch the new one and we // trigger a visible-region recompute. if (!front.activeTransparentRegion.isTriviallyEqual( front.requestedTransparentRegion)) { front.activeTransparentRegion = front.requestedTransparentRegion; // We also need to update the current state so that // we don't end-up overwriting the drawing state with // this stale current state during the next transaction // // NOTE: We don't need to hold the transaction lock here // because State::active is only accessed from this thread. current.activeTransparentRegion = front.activeTransparentRegion; // recompute visible region recomputeVisibleRegions = true; } return false; } }; Reject r(mDrawingState, getCurrentState(), recomputeVisibleRegions); status_t updateResult = mSurfaceFlingerConsumer->updateTexImage(&r, mFlinger->mPrimaryDispSync); if (updateResult == BufferQueue::PRESENT_LATER) { // Producer doesn't want buffer to be displayed yet. Signal a // layer update so we check again at the next opportunity. mFlinger->signalLayerUpdate(); return outDirtyRegion; } // Decrement the queued-frames count. Signal another event if we // have more frames pending. if (android_atomic_dec(&mQueuedFrames) > 1) { mFlinger->signalLayerUpdate(); } if (updateResult != NO_ERROR) { // something happened! recomputeVisibleRegions = true; return outDirtyRegion; } // update the active buffer mActiveBuffer = mSurfaceFlingerConsumer->getCurrentBuffer(); if (mActiveBuffer == NULL) { // this can only happen if the very first buffer was rejected. return outDirtyRegion; } mRefreshPending = true; mFrameLatencyNeeded = true; if (oldActiveBuffer == NULL) { // the first time we receive a buffer, we need to trigger a // geometry invalidation. recomputeVisibleRegions = true; } Rect crop(mSurfaceFlingerConsumer->getCurrentCrop()); const uint32_t transform(mSurfaceFlingerConsumer->getCurrentTransform()); const uint32_t scalingMode(mSurfaceFlingerConsumer->getCurrentScalingMode()); if ((crop != mCurrentCrop) || (transform != mCurrentTransform) || (scalingMode != mCurrentScalingMode)) { mCurrentCrop = crop; mCurrentTransform = transform; mCurrentScalingMode = scalingMode; recomputeVisibleRegions = true; } if (oldActiveBuffer != NULL) { uint32_t bufWidth = mActiveBuffer->getWidth(); uint32_t bufHeight = mActiveBuffer->getHeight(); if (bufWidth != uint32_t(oldActiveBuffer->width) || bufHeight != uint32_t(oldActiveBuffer->height)) { recomputeVisibleRegions = true; } } mCurrentOpacity = getOpacityForFormat(mActiveBuffer->format); if (oldOpacity != isOpaque()) { recomputeVisibleRegions = true; } // FIXME: postedRegion should be dirty & bounds const Layer::State& s(getDrawingState()); Region dirtyRegion(Rect(s.active.w, s.active.h)); // transform the dirty region to window-manager space outDirtyRegion = (s.transform.transform(dirtyRegion)); } return outDirtyRegion; } uint32_t Layer::getEffectiveUsage(uint32_t usage) const { // TODO: should we do something special if mSecure is set? if (mProtectedByApp) { // need a hardware-protected path to external video sink usage |= GraphicBuffer::USAGE_PROTECTED; } usage |= GraphicBuffer::USAGE_HW_COMPOSER; return usage; } void Layer::updateTransformHint(const sp<const DisplayDevice>& hw) const { uint32_t orientation = 0; if (!mFlinger->mDebugDisableTransformHint) { // The transform hint is used to improve performance, but we can // only have a single transform hint, it cannot // apply to all displays. const Transform& planeTransform(hw->getTransform()); orientation = planeTransform.getOrientation(); if (orientation & Transform::ROT_INVALID) { orientation = 0; } } mSurfaceFlingerConsumer->setTransformHint(orientation); } void Layer::setCompositionType(const sp<const DisplayDevice>& hw, HWComposer::HWCLayerInterface& layer) { mSurfaceFlingerConsumer->setCompositionType(hw->getDisplayType(), layer.getCompositionType()); } // ---------------------------------------------------------------------------- // debugging // ---------------------------------------------------------------------------- void Layer::dump(String8& result, Colorizer& colorizer) const { const Layer::State& s(getDrawingState()); colorizer.colorize(result, Colorizer::GREEN); result.appendFormat( "+ %s %p (%s)\n", getTypeId(), this, getName().string()); colorizer.reset(result); s.activeTransparentRegion.dump(result, "transparentRegion"); visibleRegion.dump(result, "visibleRegion"); sp<Client> client(mClientRef.promote()); result.appendFormat( " " "layerStack=%4d, z=%9d, pos=(%g,%g), size=(%4d,%4d), crop=(%4d,%4d,%4d,%4d), " "isOpaque=%1d, invalidate=%1d, " "alpha=0x%02x, flags=0x%08x, tr=[%.2f, %.2f][%.2f, %.2f]\n" " client=%p\n", s.layerStack, s.z, s.transform.tx(), s.transform.ty(), s.active.w, s.active.h, s.active.crop.left, s.active.crop.top, s.active.crop.right, s.active.crop.bottom, isOpaque(), contentDirty, s.alpha, s.flags, s.transform[0][0], s.transform[0][1], s.transform[1][0], s.transform[1][1], client.get()); sp<const GraphicBuffer> buf0(mActiveBuffer); uint32_t w0=0, h0=0, s0=0, f0=0; if (buf0 != 0) { w0 = buf0->getWidth(); h0 = buf0->getHeight(); s0 = buf0->getStride(); f0 = buf0->format; } result.appendFormat( " " "format=%2d, activeBuffer=[%4ux%4u:%4u,%3X]," " queued-frames=%d, mRefreshPending=%d\n", mFormat, w0, h0, s0,f0, mQueuedFrames, mRefreshPending); if (mSurfaceFlingerConsumer != 0) { mSurfaceFlingerConsumer->dump(result, " "); } } void Layer::dumpStats(String8& result) const { mFrameTracker.dump(result); } void Layer::clearStats() { mFrameTracker.clear(); } void Layer::logFrameStats() { mFrameTracker.logAndResetStats(mName); } // --------------------------------------------------------------------------- Layer::LayerCleaner::LayerCleaner(const sp<SurfaceFlinger>& flinger, const sp<Layer>& layer) : mFlinger(flinger), mLayer(layer) { } Layer::LayerCleaner::~LayerCleaner() { // destroy client resources mFlinger->onLayerDestroyed(mLayer); } // --------------------------------------------------------------------------- }; // namespace android #if defined(__gl_h_) #error "don't include gl/gl.h in this file" #endif #if defined(__gl2_h_) #error "don't include gl2/gl2.h in this file" #endif
[ "justin@justin-ThinkPad-T420.(none)" ]
justin@justin-ThinkPad-T420.(none)
1c9f8819d418c75e1ad595221147ae565ea47995
3aff7156207d7207ae84ff3870487509fa4a7ff5
/sdasdasdasd 2 2/Classes/Native/Il2CppCompilerCalculateTypeValuesTable.cpp
624523042a2611c6e2fc8fec1fa80d26963d3bd5
[]
no_license
huangliliu0917/iOS_wsl_mallbuy_for_vr
080ea5512fff6ff4665efab1216d8544d621404e
6f141c8cf255e655db38e1f98dda75a978dfe985
refs/heads/master
2020-04-07T10:07:55.773244
2017-08-08T12:23:42
2017-08-08T12:23:42
null
0
0
null
null
null
null
UTF-8
C++
false
false
284,249
cpp
#include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <cstring> #include <string.h> #include <stdio.h> #include <cmath> #include <limits> #include <assert.h> #include "class-internals.h" #include "codegen/il2cpp-codegen.h" extern const int32_t g_FieldOffsetTable5[3]; extern const int32_t g_FieldOffsetTable11[3]; extern const int32_t g_FieldOffsetTable12[1]; extern const int32_t g_FieldOffsetTable14[3]; extern const int32_t g_FieldOffsetTable15[1]; extern const int32_t g_FieldOffsetTable16[1]; extern const int32_t g_FieldOffsetTable17[1]; extern const int32_t g_FieldOffsetTable18[3]; extern const int32_t g_FieldOffsetTable19[1]; extern const int32_t g_FieldOffsetTable20[1]; extern const int32_t g_FieldOffsetTable21[3]; extern const int32_t g_FieldOffsetTable26[10]; extern const int32_t g_FieldOffsetTable27[4]; extern const int32_t g_FieldOffsetTable30[8]; extern const int32_t g_FieldOffsetTable31[14]; extern const int32_t g_FieldOffsetTable32[9]; extern const int32_t g_FieldOffsetTable33[3]; extern const int32_t g_FieldOffsetTable34[2]; extern const int32_t g_FieldOffsetTable36[2]; extern const int32_t g_FieldOffsetTable37[2]; extern const int32_t g_FieldOffsetTable38[9]; extern const int32_t g_FieldOffsetTable39[1]; extern const int32_t g_FieldOffsetTable41[2]; extern const int32_t g_FieldOffsetTable42[3]; extern const int32_t g_FieldOffsetTable43[1]; extern const int32_t g_FieldOffsetTable44[4]; extern const int32_t g_FieldOffsetTable51[8]; extern const int32_t g_FieldOffsetTable57[11]; extern const int32_t g_FieldOffsetTable59[1]; extern const int32_t g_FieldOffsetTable60[1]; extern const int32_t g_FieldOffsetTable63[2]; extern const int32_t g_FieldOffsetTable64[9]; extern const int32_t g_FieldOffsetTable65[7]; extern const int32_t g_FieldOffsetTable67[1]; extern const int32_t g_FieldOffsetTable71[2]; extern const int32_t g_FieldOffsetTable72[1]; extern const int32_t g_FieldOffsetTable74[1]; extern const int32_t g_FieldOffsetTable75[5]; extern const int32_t g_FieldOffsetTable76[1]; extern const int32_t g_FieldOffsetTable77[1]; extern const int32_t g_FieldOffsetTable80[3]; extern const int32_t g_FieldOffsetTable81[4]; extern const int32_t g_FieldOffsetTable82[1]; extern const int32_t g_FieldOffsetTable83[2]; extern const int32_t g_FieldOffsetTable86[1]; extern const int32_t g_FieldOffsetTable91[7]; extern const int32_t g_FieldOffsetTable92[8]; extern const int32_t g_FieldOffsetTable93[6]; extern const int32_t g_FieldOffsetTable94[8]; extern const int32_t g_FieldOffsetTable95[3]; extern const int32_t g_FieldOffsetTable96[1]; extern const int32_t g_FieldOffsetTable97[7]; extern const int32_t g_FieldOffsetTable99[1]; extern const int32_t g_FieldOffsetTable100[4]; extern const int32_t g_FieldOffsetTable101[5]; extern const int32_t g_FieldOffsetTable102[4]; extern const int32_t g_FieldOffsetTable103[3]; extern const int32_t g_FieldOffsetTable104[1]; extern const int32_t g_FieldOffsetTable105[2]; extern const int32_t g_FieldOffsetTable106[1]; extern const int32_t g_FieldOffsetTable107[22]; extern const int32_t g_FieldOffsetTable108[7]; extern const int32_t g_FieldOffsetTable109[13]; extern const int32_t g_FieldOffsetTable110[8]; extern const int32_t g_FieldOffsetTable111[2]; extern const int32_t g_FieldOffsetTable112[5]; extern const int32_t g_FieldOffsetTable113[6]; extern const int32_t g_FieldOffsetTable114[4]; extern const int32_t g_FieldOffsetTable115[22]; extern const int32_t g_FieldOffsetTable118[7]; extern const int32_t g_FieldOffsetTable120[4]; extern const int32_t g_FieldOffsetTable121[4]; extern const int32_t g_FieldOffsetTable122[2]; extern const int32_t g_FieldOffsetTable125[1]; extern const int32_t g_FieldOffsetTable126[4]; extern const int32_t g_FieldOffsetTable127[13]; extern const int32_t g_FieldOffsetTable129[9]; extern const int32_t g_FieldOffsetTable130[5]; extern const int32_t g_FieldOffsetTable131[4]; extern const int32_t g_FieldOffsetTable133[4]; extern const int32_t g_FieldOffsetTable134[4]; extern const int32_t g_FieldOffsetTable135[13]; extern const int32_t g_FieldOffsetTable137[12]; extern const int32_t g_FieldOffsetTable138[2]; extern const int32_t g_FieldOffsetTable139[17]; extern const int32_t g_FieldOffsetTable140[7]; extern const int32_t g_FieldOffsetTable141[15]; extern const int32_t g_FieldOffsetTable142[21]; extern const int32_t g_FieldOffsetTable144[1]; extern const int32_t g_FieldOffsetTable145[3]; extern const int32_t g_FieldOffsetTable146[1]; extern const int32_t g_FieldOffsetTable147[3]; extern const int32_t g_FieldOffsetTable151[2]; extern const int32_t g_FieldOffsetTable152[4]; extern const int32_t g_FieldOffsetTable153[6]; extern const int32_t g_FieldOffsetTable154[3]; extern const int32_t g_FieldOffsetTable155[13]; extern const int32_t g_FieldOffsetTable158[2]; extern const int32_t g_FieldOffsetTable159[2]; extern const int32_t g_FieldOffsetTable163[1]; extern const int32_t g_FieldOffsetTable166[2]; extern const int32_t g_FieldOffsetTable167[16]; extern const int32_t g_FieldOffsetTable168[1]; extern const int32_t g_FieldOffsetTable169[4]; extern const int32_t g_FieldOffsetTable170[1]; extern const int32_t g_FieldOffsetTable171[1]; extern const int32_t g_FieldOffsetTable173[1]; extern const int32_t g_FieldOffsetTable180[2]; extern const int32_t g_FieldOffsetTable181[5]; extern const int32_t g_FieldOffsetTable182[4]; extern const int32_t g_FieldOffsetTable183[2]; extern const int32_t g_FieldOffsetTable184[1]; extern const int32_t g_FieldOffsetTable185[5]; extern const int32_t g_FieldOffsetTable186[5]; extern const int32_t g_FieldOffsetTable187[1]; extern const int32_t g_FieldOffsetTable188[1]; extern const int32_t g_FieldOffsetTable191[3]; extern const int32_t g_FieldOffsetTable192[4]; extern const int32_t g_FieldOffsetTable193[3]; extern const int32_t g_FieldOffsetTable194[4]; extern const int32_t g_FieldOffsetTable195[1]; extern const int32_t g_FieldOffsetTable197[3]; extern const int32_t g_FieldOffsetTable198[2]; extern const int32_t g_FieldOffsetTable199[14]; extern const int32_t g_FieldOffsetTable200[2]; extern const int32_t g_FieldOffsetTable201[1]; extern const int32_t g_FieldOffsetTable202[4]; extern const int32_t g_FieldOffsetTable203[8]; extern const int32_t g_FieldOffsetTable204[1]; extern const int32_t g_FieldOffsetTable205[1]; extern const int32_t g_FieldOffsetTable206[1]; extern const int32_t g_FieldOffsetTable212[6]; extern const int32_t g_FieldOffsetTable213[2]; extern const int32_t g_FieldOffsetTable214[4]; extern const int32_t g_FieldOffsetTable215[9]; extern const int32_t g_FieldOffsetTable216[5]; extern const int32_t g_FieldOffsetTable217[3]; extern const int32_t g_FieldOffsetTable218[4]; extern const int32_t g_FieldOffsetTable219[4]; extern const int32_t g_FieldOffsetTable220[3]; extern const int32_t g_FieldOffsetTable221[6]; extern const int32_t g_FieldOffsetTable222[1]; extern const int32_t g_FieldOffsetTable223[4]; extern const int32_t g_FieldOffsetTable224[3]; extern const int32_t g_FieldOffsetTable226[1]; extern const int32_t g_FieldOffsetTable227[8]; extern const int32_t g_FieldOffsetTable228[3]; extern const int32_t g_FieldOffsetTable229[4]; extern const int32_t g_FieldOffsetTable233[6]; extern const int32_t g_FieldOffsetTable234[10]; extern const int32_t g_FieldOffsetTable235[40]; extern const int32_t g_FieldOffsetTable236[6]; extern const int32_t g_FieldOffsetTable237[58]; extern const int32_t g_FieldOffsetTable238[11]; extern const int32_t g_FieldOffsetTable239[3]; extern const int32_t g_FieldOffsetTable240[1]; extern const int32_t g_FieldOffsetTable241[7]; extern const int32_t g_FieldOffsetTable242[39]; extern const int32_t g_FieldOffsetTable243[18]; extern const int32_t g_FieldOffsetTable244[9]; extern const int32_t g_FieldOffsetTable245[5]; extern const int32_t g_FieldOffsetTable246[31]; extern const int32_t g_FieldOffsetTable248[6]; extern const int32_t g_FieldOffsetTable250[2]; extern const int32_t g_FieldOffsetTable254[4]; extern const int32_t g_FieldOffsetTable255[15]; extern const int32_t g_FieldOffsetTable256[1]; extern const int32_t g_FieldOffsetTable257[4]; extern const int32_t g_FieldOffsetTable258[7]; extern const int32_t g_FieldOffsetTable259[2]; extern const int32_t g_FieldOffsetTable260[8]; extern const int32_t g_FieldOffsetTable261[7]; extern const int32_t g_FieldOffsetTable262[14]; extern const int32_t g_FieldOffsetTable265[8]; extern const int32_t g_FieldOffsetTable266[4]; extern const int32_t g_FieldOffsetTable268[10]; extern const int32_t g_FieldOffsetTable269[6]; extern const int32_t g_FieldOffsetTable270[2]; extern const int32_t g_FieldOffsetTable271[25]; extern const int32_t g_FieldOffsetTable272[6]; extern const int32_t g_FieldOffsetTable273[8]; extern const int32_t g_FieldOffsetTable275[2]; extern const int32_t g_FieldOffsetTable276[4]; extern const int32_t g_FieldOffsetTable277[1]; extern const int32_t g_FieldOffsetTable279[6]; extern const int32_t g_FieldOffsetTable280[13]; extern const int32_t g_FieldOffsetTable282[10]; extern const int32_t g_FieldOffsetTable283[3]; extern const int32_t g_FieldOffsetTable284[1]; extern const int32_t g_FieldOffsetTable286[1]; extern const int32_t g_FieldOffsetTable287[2]; extern const int32_t g_FieldOffsetTable289[2]; extern const int32_t g_FieldOffsetTable290[2]; extern const int32_t g_FieldOffsetTable292[8]; extern const int32_t g_FieldOffsetTable293[7]; extern const int32_t g_FieldOffsetTable294[11]; extern const int32_t g_FieldOffsetTable295[1]; extern const int32_t g_FieldOffsetTable297[2]; extern const int32_t g_FieldOffsetTable298[5]; extern const int32_t g_FieldOffsetTable299[4]; extern const int32_t g_FieldOffsetTable300[2]; extern const int32_t g_FieldOffsetTable302[12]; extern const int32_t g_FieldOffsetTable303[3]; extern const int32_t g_FieldOffsetTable304[2]; extern const int32_t g_FieldOffsetTable305[12]; extern const int32_t g_FieldOffsetTable306[2]; extern const int32_t g_FieldOffsetTable307[6]; extern const int32_t g_FieldOffsetTable308[1]; extern const int32_t g_FieldOffsetTable309[8]; extern const int32_t g_FieldOffsetTable310[1]; extern const int32_t g_FieldOffsetTable311[226]; extern const int32_t g_FieldOffsetTable312[3]; extern const int32_t g_FieldOffsetTable313[30]; extern const int32_t g_FieldOffsetTable314[16]; extern const int32_t g_FieldOffsetTable315[9]; extern const int32_t g_FieldOffsetTable317[10]; extern const int32_t g_FieldOffsetTable319[1]; extern const int32_t g_FieldOffsetTable320[1]; extern const int32_t g_FieldOffsetTable321[1]; extern const int32_t g_FieldOffsetTable322[1]; extern const int32_t g_FieldOffsetTable323[1]; extern const int32_t g_FieldOffsetTable324[1]; extern const int32_t g_FieldOffsetTable325[1]; extern const int32_t g_FieldOffsetTable326[1]; extern const int32_t g_FieldOffsetTable327[1]; extern const int32_t g_FieldOffsetTable328[15]; extern const int32_t g_FieldOffsetTable329[6]; extern const int32_t g_FieldOffsetTable330[1]; extern const int32_t g_FieldOffsetTable331[1]; extern const int32_t g_FieldOffsetTable332[1]; extern const int32_t g_FieldOffsetTable333[1]; extern const int32_t g_FieldOffsetTable335[21]; extern const int32_t g_FieldOffsetTable336[6]; extern const int32_t g_FieldOffsetTable337[2]; extern const int32_t g_FieldOffsetTable338[3]; extern const int32_t g_FieldOffsetTable339[2]; extern const int32_t g_FieldOffsetTable340[2]; extern const int32_t g_FieldOffsetTable341[5]; extern const int32_t g_FieldOffsetTable342[1]; extern const int32_t g_FieldOffsetTable344[20]; extern const int32_t g_FieldOffsetTable346[5]; extern const int32_t g_FieldOffsetTable347[10]; extern const int32_t g_FieldOffsetTable348[25]; extern const int32_t g_FieldOffsetTable350[15]; extern const int32_t g_FieldOffsetTable352[1]; extern const int32_t g_FieldOffsetTable353[10]; extern const int32_t g_FieldOffsetTable354[8]; extern const int32_t g_FieldOffsetTable355[2]; extern const int32_t g_FieldOffsetTable356[5]; extern const int32_t g_FieldOffsetTable359[5]; extern const int32_t g_FieldOffsetTable360[3]; extern const int32_t g_FieldOffsetTable361[3]; extern const int32_t g_FieldOffsetTable362[5]; extern const int32_t g_FieldOffsetTable363[7]; extern const int32_t g_FieldOffsetTable364[5]; extern const int32_t g_FieldOffsetTable368[12]; extern const int32_t g_FieldOffsetTable369[7]; extern const int32_t g_FieldOffsetTable370[1]; extern const int32_t g_FieldOffsetTable371[2]; extern const int32_t g_FieldOffsetTable372[6]; extern const int32_t g_FieldOffsetTable373[9]; extern const int32_t g_FieldOffsetTable375[4]; extern const int32_t g_FieldOffsetTable379[32]; extern const int32_t g_FieldOffsetTable381[1]; extern const int32_t g_FieldOffsetTable382[5]; extern const int32_t g_FieldOffsetTable383[21]; extern const int32_t g_FieldOffsetTable384[13]; extern const int32_t g_FieldOffsetTable385[3]; extern const int32_t g_FieldOffsetTable386[2]; extern const int32_t g_FieldOffsetTable387[3]; extern const int32_t g_FieldOffsetTable388[4]; extern const int32_t g_FieldOffsetTable390[1]; extern const int32_t g_FieldOffsetTable391[2]; extern const int32_t g_FieldOffsetTable392[1]; extern const int32_t g_FieldOffsetTable393[1]; extern const int32_t g_FieldOffsetTable395[4]; extern const int32_t g_FieldOffsetTable397[4]; extern const int32_t g_FieldOffsetTable398[5]; extern const int32_t g_FieldOffsetTable400[2]; extern const int32_t g_FieldOffsetTable403[6]; extern const int32_t g_FieldOffsetTable404[5]; extern const int32_t g_FieldOffsetTable405[1]; extern const int32_t g_FieldOffsetTable406[4]; extern const int32_t g_FieldOffsetTable407[1]; extern const int32_t g_FieldOffsetTable408[4]; extern const int32_t g_FieldOffsetTable409[1]; extern const int32_t g_FieldOffsetTable410[1]; extern const int32_t g_FieldOffsetTable412[1]; extern const int32_t g_FieldOffsetTable413[5]; extern const int32_t g_FieldOffsetTable414[1]; extern const int32_t g_FieldOffsetTable415[2]; extern const int32_t g_FieldOffsetTable416[1]; extern const int32_t g_FieldOffsetTable418[4]; extern const int32_t g_FieldOffsetTable419[1]; extern const int32_t g_FieldOffsetTable420[2]; extern const int32_t g_FieldOffsetTable421[36]; extern const int32_t g_FieldOffsetTable443[1]; extern const int32_t g_FieldOffsetTable444[2]; extern const int32_t g_FieldOffsetTable446[1]; extern const int32_t g_FieldOffsetTable450[1]; extern const int32_t g_FieldOffsetTable451[1]; extern const int32_t g_FieldOffsetTable452[5]; extern const int32_t g_FieldOffsetTable453[3]; extern const int32_t g_FieldOffsetTable454[1]; extern const int32_t g_FieldOffsetTable455[3]; extern const int32_t g_FieldOffsetTable463[3]; extern const int32_t g_FieldOffsetTable464[14]; extern const int32_t g_FieldOffsetTable465[1]; extern const int32_t g_FieldOffsetTable466[2]; extern const int32_t g_FieldOffsetTable468[1]; extern const int32_t g_FieldOffsetTable479[5]; extern const int32_t g_FieldOffsetTable480[2]; extern const int32_t g_FieldOffsetTable481[2]; extern const int32_t g_FieldOffsetTable482[2]; extern const int32_t g_FieldOffsetTable483[1]; extern const int32_t g_FieldOffsetTable484[5]; extern const int32_t g_FieldOffsetTable485[3]; extern const int32_t g_FieldOffsetTable486[3]; extern const int32_t g_FieldOffsetTable487[15]; extern const int32_t g_FieldOffsetTable488[1]; extern const int32_t g_FieldOffsetTable489[7]; extern const int32_t g_FieldOffsetTable490[3]; extern const int32_t g_FieldOffsetTable491[1]; extern const int32_t g_FieldOffsetTable492[4]; extern const int32_t g_FieldOffsetTable502[2]; extern const int32_t g_FieldOffsetTable503[1]; extern const int32_t g_FieldOffsetTable504[11]; extern const int32_t g_FieldOffsetTable505[1]; extern const int32_t g_FieldOffsetTable506[6]; extern const int32_t g_FieldOffsetTable507[3]; extern const int32_t g_FieldOffsetTable508[2]; extern const int32_t g_FieldOffsetTable509[8]; extern const int32_t g_FieldOffsetTable512[4]; extern const int32_t g_FieldOffsetTable513[13]; extern const int32_t g_FieldOffsetTable515[1]; extern const int32_t g_FieldOffsetTable516[2]; extern const int32_t g_FieldOffsetTable517[3]; extern const int32_t g_FieldOffsetTable518[2]; extern const int32_t g_FieldOffsetTable519[6]; extern const int32_t g_FieldOffsetTable521[7]; extern const int32_t g_FieldOffsetTable523[1]; extern const int32_t g_FieldOffsetTable524[5]; extern const int32_t g_FieldOffsetTable525[5]; extern const int32_t g_FieldOffsetTable527[1]; extern const int32_t g_FieldOffsetTable528[2]; extern const int32_t g_FieldOffsetTable529[1]; extern const int32_t g_FieldOffsetTable530[1]; extern const int32_t g_FieldOffsetTable534[7]; extern const int32_t g_FieldOffsetTable535[1]; extern const int32_t g_FieldOffsetTable536[1]; extern const int32_t g_FieldOffsetTable537[9]; extern const int32_t g_FieldOffsetTable538[13]; extern const int32_t g_FieldOffsetTable539[10]; extern const int32_t g_FieldOffsetTable540[7]; extern const int32_t g_FieldOffsetTable541[5]; extern const int32_t g_FieldOffsetTable544[8]; extern const int32_t g_FieldOffsetTable545[3]; extern const int32_t g_FieldOffsetTable549[5]; extern const int32_t g_FieldOffsetTable550[2]; extern const int32_t g_FieldOffsetTable551[2]; extern const int32_t g_FieldOffsetTable552[3]; extern const int32_t g_FieldOffsetTable553[3]; extern const int32_t g_FieldOffsetTable554[3]; extern const int32_t g_FieldOffsetTable555[3]; extern const int32_t g_FieldOffsetTable556[4]; extern const int32_t g_FieldOffsetTable557[24]; extern const int32_t g_FieldOffsetTable558[9]; extern const int32_t g_FieldOffsetTable559[11]; extern const int32_t g_FieldOffsetTable560[5]; extern const int32_t g_FieldOffsetTable561[7]; extern const int32_t g_FieldOffsetTable563[12]; extern const int32_t g_FieldOffsetTable564[6]; extern const int32_t g_FieldOffsetTable565[1]; extern const int32_t g_FieldOffsetTable566[3]; extern const int32_t g_FieldOffsetTable567[4]; extern const int32_t g_FieldOffsetTable568[3]; extern const int32_t g_FieldOffsetTable577[9]; extern const int32_t g_FieldOffsetTable578[4]; extern const int32_t g_FieldOffsetTable579[1]; extern const int32_t g_FieldOffsetTable580[1]; extern const int32_t g_FieldOffsetTable581[1]; extern const int32_t g_FieldOffsetTable582[1]; extern const int32_t g_FieldOffsetTable583[5]; extern const int32_t g_FieldOffsetTable584[13]; extern const int32_t g_FieldOffsetTable590[6]; extern const int32_t g_FieldOffsetTable592[3]; extern const int32_t g_FieldOffsetTable594[5]; extern const int32_t g_FieldOffsetTable595[1]; extern const int32_t g_FieldOffsetTable596[2]; extern const int32_t g_FieldOffsetTable597[10]; extern const int32_t g_FieldOffsetTable598[5]; extern const int32_t g_FieldOffsetTable599[7]; extern const int32_t g_FieldOffsetTable600[2]; extern const int32_t g_FieldOffsetTable604[2]; extern const int32_t g_FieldOffsetTable605[6]; extern const int32_t g_FieldOffsetTable606[3]; extern const int32_t g_FieldOffsetTable609[5]; extern const int32_t g_FieldOffsetTable610[9]; extern const int32_t g_FieldOffsetTable611[2]; extern const int32_t g_FieldOffsetTable612[13]; extern const int32_t g_FieldOffsetTable615[7]; extern const int32_t g_FieldOffsetTable616[8]; extern const int32_t g_FieldOffsetTable617[1]; extern const int32_t g_FieldOffsetTable618[1]; extern const int32_t g_FieldOffsetTable620[5]; extern const int32_t g_FieldOffsetTable625[2]; extern const int32_t g_FieldOffsetTable626[2]; extern const int32_t g_FieldOffsetTable627[4]; extern const int32_t g_FieldOffsetTable630[3]; extern const int32_t g_FieldOffsetTable631[1]; extern const int32_t g_FieldOffsetTable632[3]; extern const int32_t g_FieldOffsetTable634[6]; extern const int32_t g_FieldOffsetTable635[6]; extern const int32_t g_FieldOffsetTable636[1]; extern const int32_t g_FieldOffsetTable638[7]; extern const int32_t g_FieldOffsetTable640[5]; extern const int32_t g_FieldOffsetTable641[2]; extern const int32_t g_FieldOffsetTable643[7]; extern const int32_t g_FieldOffsetTable644[2]; extern const int32_t g_FieldOffsetTable645[2]; extern const int32_t g_FieldOffsetTable646[2]; extern const int32_t g_FieldOffsetTable647[8]; extern const int32_t g_FieldOffsetTable649[6]; extern const int32_t g_FieldOffsetTable652[15]; extern const int32_t g_FieldOffsetTable653[2]; extern const int32_t g_FieldOffsetTable655[5]; extern const int32_t g_FieldOffsetTable656[1]; extern const int32_t g_FieldOffsetTable657[1]; extern const int32_t g_FieldOffsetTable659[5]; extern const int32_t g_FieldOffsetTable661[14]; extern const int32_t g_FieldOffsetTable663[14]; extern const int32_t g_FieldOffsetTable664[2]; extern const int32_t g_FieldOffsetTable665[4]; extern const int32_t g_FieldOffsetTable668[10]; extern const int32_t g_FieldOffsetTable669[1]; extern const int32_t g_FieldOffsetTable672[6]; extern const int32_t g_FieldOffsetTable673[3]; extern const int32_t g_FieldOffsetTable674[5]; extern const int32_t g_FieldOffsetTable677[3]; extern const int32_t g_FieldOffsetTable678[1]; extern const int32_t g_FieldOffsetTable679[17]; extern const int32_t g_FieldOffsetTable680[1]; extern const int32_t g_FieldOffsetTable681[1]; extern const int32_t g_FieldOffsetTable682[3]; extern const int32_t g_FieldOffsetTable683[3]; extern const int32_t g_FieldOffsetTable684[2]; extern const int32_t g_FieldOffsetTable687[3]; extern const int32_t g_FieldOffsetTable690[4]; extern const int32_t g_FieldOffsetTable691[5]; extern const int32_t g_FieldOffsetTable692[7]; extern const int32_t g_FieldOffsetTable698[1]; extern const int32_t g_FieldOffsetTable699[4]; extern const int32_t g_FieldOffsetTable700[1]; extern const int32_t g_FieldOffsetTable701[3]; extern const int32_t g_FieldOffsetTable702[9]; extern const int32_t g_FieldOffsetTable703[2]; extern const int32_t g_FieldOffsetTable704[8]; extern const int32_t g_FieldOffsetTable705[3]; extern const int32_t g_FieldOffsetTable706[5]; extern const int32_t g_FieldOffsetTable707[5]; extern const int32_t g_FieldOffsetTable708[3]; extern const int32_t g_FieldOffsetTable714[2]; extern const int32_t g_FieldOffsetTable717[3]; extern const int32_t g_FieldOffsetTable719[2]; extern const int32_t g_FieldOffsetTable720[1]; extern const int32_t g_FieldOffsetTable721[3]; extern const int32_t g_FieldOffsetTable724[3]; extern const int32_t g_FieldOffsetTable726[4]; extern const int32_t g_FieldOffsetTable727[1]; extern const int32_t g_FieldOffsetTable728[3]; extern const int32_t g_FieldOffsetTable729[28]; extern const int32_t g_FieldOffsetTable730[1]; extern const int32_t g_FieldOffsetTable732[5]; extern const int32_t g_FieldOffsetTable733[2]; extern const int32_t g_FieldOffsetTable734[3]; extern const int32_t g_FieldOffsetTable735[3]; extern const int32_t g_FieldOffsetTable736[1]; extern const int32_t g_FieldOffsetTable737[1]; extern const int32_t g_FieldOffsetTable738[2]; extern const int32_t g_FieldOffsetTable739[2]; extern const int32_t g_FieldOffsetTable740[2]; extern const int32_t g_FieldOffsetTable741[1]; extern const int32_t g_FieldOffsetTable742[3]; extern const int32_t g_FieldOffsetTable744[3]; extern const int32_t g_FieldOffsetTable751[52]; extern const int32_t g_FieldOffsetTable755[11]; extern const int32_t g_FieldOffsetTable757[7]; extern const int32_t g_FieldOffsetTable759[2]; extern const int32_t g_FieldOffsetTable760[4]; extern const int32_t g_FieldOffsetTable762[1]; extern const int32_t g_FieldOffsetTable764[21]; extern const int32_t g_FieldOffsetTable766[22]; extern const int32_t g_FieldOffsetTable768[1]; extern const int32_t g_FieldOffsetTable769[2]; extern const int32_t g_FieldOffsetTable770[1]; extern const int32_t g_FieldOffsetTable771[1]; extern const int32_t g_FieldOffsetTable773[1]; extern const int32_t g_FieldOffsetTable775[17]; extern const int32_t g_FieldOffsetTable776[2]; extern const int32_t g_FieldOffsetTable778[3]; extern const int32_t g_FieldOffsetTable779[5]; extern const int32_t g_FieldOffsetTable781[2]; extern const int32_t g_FieldOffsetTable782[1]; extern const int32_t g_FieldOffsetTable783[15]; extern const int32_t g_FieldOffsetTable784[5]; extern const int32_t g_FieldOffsetTable785[4]; extern const int32_t g_FieldOffsetTable786[4]; extern const int32_t g_FieldOffsetTable788[8]; extern const int32_t g_FieldOffsetTable789[2]; extern const int32_t g_FieldOffsetTable790[1]; extern const int32_t g_FieldOffsetTable791[7]; extern const int32_t g_FieldOffsetTable792[1]; extern const int32_t g_FieldOffsetTable793[1]; extern const int32_t g_FieldOffsetTable794[1]; extern const int32_t g_FieldOffsetTable795[11]; extern const int32_t g_FieldOffsetTable800[2]; extern const int32_t g_FieldOffsetTable801[24]; extern const int32_t g_FieldOffsetTable802[4]; extern const int32_t g_FieldOffsetTable803[1]; extern const int32_t g_FieldOffsetTable807[1]; extern const int32_t g_FieldOffsetTable809[14]; extern const int32_t g_FieldOffsetTable810[3]; extern const int32_t g_FieldOffsetTable814[1]; extern const int32_t g_FieldOffsetTable815[1]; extern const int32_t g_FieldOffsetTable816[7]; extern const int32_t g_FieldOffsetTable817[5]; extern const int32_t g_FieldOffsetTable820[1]; extern const int32_t g_FieldOffsetTable822[3]; extern const int32_t g_FieldOffsetTable823[1]; extern const int32_t g_FieldOffsetTable824[7]; extern const int32_t g_FieldOffsetTable825[3]; extern const int32_t g_FieldOffsetTable826[2]; extern const int32_t g_FieldOffsetTable827[1]; extern const int32_t g_FieldOffsetTable828[2]; extern const int32_t g_FieldOffsetTable829[1]; extern const int32_t g_FieldOffsetTable833[1]; extern const int32_t g_FieldOffsetTable834[1]; extern const int32_t g_FieldOffsetTable835[26]; extern const int32_t g_FieldOffsetTable836[14]; extern const int32_t g_FieldOffsetTable837[2]; extern const int32_t g_FieldOffsetTable838[3]; extern const int32_t g_FieldOffsetTable839[1]; extern const int32_t g_FieldOffsetTable840[1]; extern const int32_t g_FieldOffsetTable841[8]; extern const int32_t g_FieldOffsetTable842[1]; extern const int32_t g_FieldOffsetTable843[3]; extern const int32_t g_FieldOffsetTable845[1]; extern const int32_t g_FieldOffsetTable846[1]; extern const int32_t g_FieldOffsetTable847[4]; extern const int32_t g_FieldOffsetTable848[2]; extern const int32_t g_FieldOffsetTable849[1]; extern const int32_t g_FieldOffsetTable850[7]; extern const int32_t g_FieldOffsetTable851[3]; extern const int32_t g_FieldOffsetTable854[9]; extern const int32_t g_FieldOffsetTable855[3]; extern const int32_t g_FieldOffsetTable856[8]; extern const int32_t g_FieldOffsetTable857[19]; extern const int32_t g_FieldOffsetTable858[1]; extern const int32_t g_FieldOffsetTable859[3]; extern const int32_t g_FieldOffsetTable861[2]; extern const int32_t g_FieldOffsetTable862[3]; extern const int32_t g_FieldOffsetTable863[5]; extern const int32_t g_FieldOffsetTable864[5]; extern const int32_t g_FieldOffsetTable865[2]; extern const int32_t g_FieldOffsetTable883[53]; extern const int32_t g_FieldOffsetTable909[1]; extern const int32_t g_FieldOffsetTable910[5]; extern const int32_t g_FieldOffsetTable911[3]; extern const int32_t g_FieldOffsetTable912[3]; extern const int32_t g_FieldOffsetTable913[3]; extern const int32_t g_FieldOffsetTable914[3]; extern const int32_t g_FieldOffsetTable915[4]; extern const int32_t g_FieldOffsetTable916[3]; extern const int32_t g_FieldOffsetTable917[4]; extern const int32_t g_FieldOffsetTable918[10]; extern const int32_t g_FieldOffsetTable919[2]; extern const int32_t g_FieldOffsetTable920[2]; extern const int32_t g_FieldOffsetTable921[1]; extern const int32_t g_FieldOffsetTable922[2]; extern const int32_t g_FieldOffsetTable923[1]; extern const int32_t g_FieldOffsetTable924[4]; extern const int32_t g_FieldOffsetTable926[2]; extern const int32_t g_FieldOffsetTable927[4]; extern const int32_t g_FieldOffsetTable928[5]; extern const int32_t g_FieldOffsetTable929[32]; extern const int32_t g_FieldOffsetTable931[9]; extern const int32_t g_FieldOffsetTable934[11]; extern const int32_t g_FieldOffsetTable937[2]; extern const int32_t g_FieldOffsetTable938[24]; extern const int32_t g_FieldOffsetTable941[11]; extern const int32_t g_FieldOffsetTable942[5]; extern const int32_t g_FieldOffsetTable945[3]; extern const int32_t g_FieldOffsetTable946[11]; extern const int32_t g_FieldOffsetTable947[10]; extern const int32_t g_FieldOffsetTable948[2]; extern const int32_t g_FieldOffsetTable949[5]; extern const int32_t g_FieldOffsetTable950[5]; extern const int32_t g_FieldOffsetTable951[5]; extern const int32_t g_FieldOffsetTable952[6]; extern const int32_t g_FieldOffsetTable953[5]; extern const int32_t g_FieldOffsetTable954[3]; extern const int32_t g_FieldOffsetTable955[9]; extern const int32_t g_FieldOffsetTable956[1]; extern const int32_t g_FieldOffsetTable957[11]; extern const int32_t g_FieldOffsetTable958[6]; extern const int32_t g_FieldOffsetTable959[13]; extern const int32_t g_FieldOffsetTable961[1]; extern const int32_t g_FieldOffsetTable963[1]; extern const int32_t g_FieldOffsetTable964[15]; extern const int32_t g_FieldOffsetTable965[4]; extern const int32_t g_FieldOffsetTable966[1]; extern const int32_t g_FieldOffsetTable967[1]; extern const int32_t g_FieldOffsetTable968[8]; extern const int32_t g_FieldOffsetTable969[2]; extern const int32_t g_FieldOffsetTable970[24]; extern const int32_t g_FieldOffsetTable971[3]; extern const int32_t g_FieldOffsetTable972[1]; extern const int32_t g_FieldOffsetTable973[1]; extern const int32_t g_FieldOffsetTable974[1]; extern const int32_t g_FieldOffsetTable975[16]; extern const int32_t g_FieldOffsetTable976[5]; extern const int32_t g_FieldOffsetTable977[11]; extern const int32_t g_FieldOffsetTable978[7]; extern const int32_t g_FieldOffsetTable979[4]; extern const int32_t g_FieldOffsetTable980[4]; extern const int32_t g_FieldOffsetTable981[6]; extern const int32_t g_FieldOffsetTable982[5]; extern const int32_t g_FieldOffsetTable983[4]; extern const int32_t g_FieldOffsetTable984[15]; extern const int32_t g_FieldOffsetTable985[7]; extern const int32_t g_FieldOffsetTable986[3]; extern const int32_t g_FieldOffsetTable987[3]; extern const int32_t g_FieldOffsetTable988[2]; extern const int32_t g_FieldOffsetTable989[2]; extern const int32_t g_FieldOffsetTable990[1]; extern const int32_t g_FieldOffsetTable991[3]; extern const int32_t g_FieldOffsetTable992[1]; extern const int32_t g_FieldOffsetTable993[3]; extern const int32_t g_FieldOffsetTable994[2]; extern const int32_t g_FieldOffsetTable995[5]; extern const int32_t g_FieldOffsetTable996[2]; extern const int32_t g_FieldOffsetTable997[2]; extern const int32_t g_FieldOffsetTable998[9]; extern const int32_t g_FieldOffsetTable999[10]; extern const int32_t g_FieldOffsetTable1000[26]; extern const int32_t g_FieldOffsetTable1001[6]; extern const int32_t g_FieldOffsetTable1002[11]; extern const int32_t g_FieldOffsetTable1005[3]; extern const int32_t g_FieldOffsetTable1006[2]; extern const int32_t g_FieldOffsetTable1007[2]; extern const int32_t g_FieldOffsetTable1008[3]; extern const int32_t g_FieldOffsetTable1009[146]; extern const int32_t g_FieldOffsetTable1013[4]; extern const int32_t g_FieldOffsetTable1014[1]; extern const int32_t g_FieldOffsetTable1015[1]; extern const int32_t g_FieldOffsetTable1016[2]; extern const int32_t g_FieldOffsetTable1017[1]; extern const int32_t g_FieldOffsetTable1018[3]; extern const int32_t g_FieldOffsetTable1019[16]; extern const int32_t g_FieldOffsetTable1020[2]; extern const int32_t g_FieldOffsetTable1021[7]; extern const int32_t g_FieldOffsetTable1022[4]; extern const int32_t g_FieldOffsetTable1023[3]; extern const int32_t g_FieldOffsetTable1024[1]; extern const int32_t g_FieldOffsetTable1025[2]; extern const int32_t g_FieldOffsetTable1027[6]; extern const int32_t g_FieldOffsetTable1028[7]; extern const int32_t g_FieldOffsetTable1031[1]; extern const int32_t g_FieldOffsetTable1033[1]; extern const int32_t g_FieldOffsetTable1034[2]; extern const int32_t g_FieldOffsetTable1035[1]; extern const int32_t g_FieldOffsetTable1037[3]; extern const int32_t g_FieldOffsetTable1039[3]; extern const int32_t g_FieldOffsetTable1040[2]; extern const int32_t g_FieldOffsetTable1042[2]; extern const int32_t g_FieldOffsetTable1043[1]; extern const int32_t g_FieldOffsetTable1044[2]; extern const int32_t g_FieldOffsetTable1045[2]; extern const int32_t g_FieldOffsetTable1046[6]; extern const int32_t g_FieldOffsetTable1047[6]; extern const int32_t g_FieldOffsetTable1050[33]; extern const int32_t g_FieldOffsetTable1051[3]; extern const int32_t g_FieldOffsetTable1053[6]; extern const int32_t g_FieldOffsetTable1054[4]; extern const int32_t g_FieldOffsetTable1055[6]; extern const int32_t g_FieldOffsetTable1056[5]; extern const int32_t g_FieldOffsetTable1059[3]; extern const int32_t g_FieldOffsetTable1064[4]; extern const int32_t g_FieldOffsetTable1065[4]; extern const int32_t g_FieldOffsetTable1066[2]; extern const int32_t g_FieldOffsetTable1068[7]; extern const int32_t g_FieldOffsetTable1072[3]; extern const int32_t g_FieldOffsetTable1076[2]; extern const int32_t g_FieldOffsetTable1077[4]; extern const int32_t g_FieldOffsetTable1078[5]; extern const int32_t g_FieldOffsetTable1080[1]; extern const int32_t g_FieldOffsetTable1082[6]; extern const int32_t g_FieldOffsetTable1084[5]; extern const int32_t g_FieldOffsetTable1085[4]; extern const int32_t g_FieldOffsetTable1087[4]; extern const int32_t g_FieldOffsetTable1088[4]; extern const int32_t g_FieldOffsetTable1089[2]; extern const int32_t g_FieldOffsetTable1090[13]; extern const int32_t g_FieldOffsetTable1092[2]; extern const int32_t g_FieldOffsetTable1093[17]; extern const int32_t g_FieldOffsetTable1094[7]; extern const int32_t g_FieldOffsetTable1095[15]; extern const int32_t g_FieldOffsetTable1096[26]; extern const int32_t g_FieldOffsetTable1098[1]; extern const int32_t g_FieldOffsetTable1099[5]; extern const int32_t g_FieldOffsetTable1100[8]; extern const int32_t g_FieldOffsetTable1101[11]; extern const int32_t g_FieldOffsetTable1102[3]; extern const int32_t g_FieldOffsetTable1103[3]; extern const int32_t g_FieldOffsetTable1104[1]; extern const int32_t g_FieldOffsetTable1105[4]; extern const int32_t g_FieldOffsetTable1106[2]; extern const int32_t g_FieldOffsetTable1107[2]; extern const int32_t g_FieldOffsetTable1108[1]; extern const int32_t g_FieldOffsetTable1109[2]; extern const int32_t g_FieldOffsetTable1110[2]; extern const int32_t g_FieldOffsetTable1111[5]; extern const int32_t g_FieldOffsetTable1112[11]; extern const int32_t g_FieldOffsetTable1113[1]; extern const int32_t g_FieldOffsetTable1114[1]; extern const int32_t g_FieldOffsetTable1115[8]; extern const int32_t g_FieldOffsetTable1116[1]; extern const int32_t g_FieldOffsetTable1117[4]; extern const int32_t g_FieldOffsetTable1118[3]; extern const int32_t g_FieldOffsetTable1119[3]; extern const int32_t g_FieldOffsetTable1120[25]; extern const int32_t g_FieldOffsetTable1121[2]; extern const int32_t g_FieldOffsetTable1122[8]; extern const int32_t g_FieldOffsetTable1123[21]; extern const int32_t g_FieldOffsetTable1124[2]; extern const int32_t g_FieldOffsetTable1126[2]; extern const int32_t g_FieldOffsetTable1128[6]; extern const int32_t g_FieldOffsetTable1129[2]; extern const int32_t g_FieldOffsetTable1130[5]; extern const int32_t g_FieldOffsetTable1131[30]; extern const int32_t g_FieldOffsetTable1132[6]; extern const int32_t g_FieldOffsetTable1133[4]; extern const int32_t g_FieldOffsetTable1134[4]; extern const int32_t g_FieldOffsetTable1135[4]; extern const int32_t g_FieldOffsetTable1136[3]; extern const int32_t g_FieldOffsetTable1137[9]; extern const int32_t g_FieldOffsetTable1138[7]; extern const int32_t g_FieldOffsetTable1139[3]; extern const int32_t g_FieldOffsetTable1140[3]; extern const int32_t g_FieldOffsetTable1141[3]; extern const int32_t g_FieldOffsetTable1142[3]; extern const int32_t g_FieldOffsetTable1143[5]; extern const int32_t g_FieldOffsetTable1145[2]; extern const int32_t g_FieldOffsetTable1146[4]; extern const int32_t g_FieldOffsetTable1147[3]; extern const int32_t g_FieldOffsetTable1148[8]; extern const int32_t g_FieldOffsetTable1149[15]; extern const int32_t g_FieldOffsetTable1150[12]; extern const int32_t g_FieldOffsetTable1151[2]; extern const int32_t g_FieldOffsetTable1152[4]; extern const int32_t g_FieldOffsetTable1153[1]; extern const int32_t g_FieldOffsetTable1154[8]; extern const int32_t g_FieldOffsetTable1155[4]; extern const int32_t g_FieldOffsetTable1156[6]; extern const int32_t g_FieldOffsetTable1157[4]; extern const int32_t g_FieldOffsetTable1158[12]; extern const int32_t g_FieldOffsetTable1159[2]; extern const int32_t g_FieldOffsetTable1161[1]; extern const int32_t g_FieldOffsetTable1162[1]; extern const int32_t g_FieldOffsetTable1164[1]; extern const int32_t g_FieldOffsetTable1165[2]; extern const int32_t g_FieldOffsetTable1166[1]; extern const int32_t g_FieldOffsetTable1167[4]; extern const int32_t g_FieldOffsetTable1169[2]; extern const int32_t g_FieldOffsetTable1175[15]; extern const int32_t g_FieldOffsetTable1189[1]; extern const int32_t g_FieldOffsetTable1190[12]; extern const int32_t g_FieldOffsetTable1191[14]; extern const int32_t g_FieldOffsetTable1192[2]; extern const int32_t g_FieldOffsetTable1193[4]; extern const int32_t g_FieldOffsetTable1194[1]; extern const int32_t g_FieldOffsetTable1197[8]; extern const int32_t g_FieldOffsetTable1200[14]; extern const int32_t g_FieldOffsetTable1206[12]; extern const int32_t g_FieldOffsetTable1212[3]; extern const int32_t g_FieldOffsetTable1219[1]; extern const int32_t g_FieldOffsetTable1221[1]; extern const int32_t g_FieldOffsetTable1225[1]; extern const int32_t g_FieldOffsetTable1229[3]; extern const int32_t g_FieldOffsetTable1232[1]; extern const int32_t g_FieldOffsetTable1233[3]; extern const int32_t g_FieldOffsetTable1234[2]; extern const int32_t g_FieldOffsetTable1236[4]; extern const int32_t g_FieldOffsetTable1239[1]; extern const int32_t g_FieldOffsetTable1240[4]; extern const int32_t g_FieldOffsetTable1242[7]; extern const int32_t g_FieldOffsetTable1243[1]; extern const int32_t g_FieldOffsetTable1244[2]; extern const int32_t g_FieldOffsetTable1246[1]; extern const int32_t g_FieldOffsetTable1250[1]; extern const int32_t g_FieldOffsetTable1254[2]; extern const int32_t g_FieldOffsetTable1257[5]; extern const int32_t g_FieldOffsetTable1258[1]; extern const int32_t g_FieldOffsetTable1259[6]; extern const int32_t g_FieldOffsetTable1260[4]; extern const int32_t g_FieldOffsetTable1261[4]; extern const int32_t g_FieldOffsetTable1262[14]; extern const int32_t g_FieldOffsetTable1263[8]; extern const int32_t g_FieldOffsetTable1264[1]; extern const int32_t g_FieldOffsetTable1265[1]; extern const int32_t g_FieldOffsetTable1266[1]; extern const int32_t g_FieldOffsetTable1267[4]; extern const int32_t g_FieldOffsetTable1268[5]; extern const int32_t g_FieldOffsetTable1269[16]; extern const int32_t g_FieldOffsetTable1270[2]; extern const int32_t g_FieldOffsetTable1271[1]; extern const int32_t g_FieldOffsetTable1272[4]; extern const int32_t g_FieldOffsetTable1273[7]; extern const int32_t g_FieldOffsetTable1274[1]; extern const int32_t g_FieldOffsetTable1276[9]; extern const int32_t g_FieldOffsetTable1277[3]; extern const int32_t g_FieldOffsetTable1279[1]; extern const int32_t g_FieldOffsetTable1280[3]; extern const int32_t g_FieldOffsetTable1282[1]; extern const int32_t g_FieldOffsetTable1284[10]; extern const int32_t g_FieldOffsetTable1285[3]; extern const int32_t g_FieldOffsetTable1287[2]; extern const int32_t g_FieldOffsetTable1291[1]; extern const int32_t g_FieldOffsetTable1299[10]; extern const int32_t g_FieldOffsetTable1300[2]; extern const int32_t g_FieldOffsetTable1301[4]; extern const int32_t g_FieldOffsetTable1302[14]; extern const int32_t g_FieldOffsetTable1305[3]; extern const int32_t g_FieldOffsetTable1306[2]; extern const int32_t g_FieldOffsetTable1307[1]; extern const int32_t g_FieldOffsetTable1309[12]; extern const int32_t g_FieldOffsetTable1310[12]; extern const int32_t g_FieldOffsetTable1311[2]; extern const int32_t g_FieldOffsetTable1312[1]; extern const int32_t g_FieldOffsetTable1313[1]; extern const int32_t g_FieldOffsetTable1314[3]; extern const int32_t g_FieldOffsetTable1315[3]; extern const int32_t g_FieldOffsetTable1316[1]; extern const int32_t g_FieldOffsetTable1318[2]; extern const int32_t g_FieldOffsetTable1319[26]; extern const int32_t g_FieldOffsetTable1321[1]; extern const int32_t g_FieldOffsetTable1323[5]; extern const int32_t g_FieldOffsetTable1324[3]; extern const int32_t g_FieldOffsetTable1325[7]; extern const int32_t g_FieldOffsetTable1326[5]; extern const int32_t g_FieldOffsetTable1327[4]; extern const int32_t g_FieldOffsetTable1329[5]; extern const int32_t g_FieldOffsetTable1332[6]; extern const int32_t g_FieldOffsetTable1334[6]; extern const int32_t g_FieldOffsetTable1335[1]; extern const int32_t g_FieldOffsetTable1336[9]; extern const int32_t g_FieldOffsetTable1339[11]; extern const int32_t g_FieldOffsetTable1340[7]; extern const int32_t g_FieldOffsetTable1341[1]; extern const int32_t g_FieldOffsetTable1343[1]; extern const int32_t g_FieldOffsetTable1345[2]; extern const int32_t g_FieldOffsetTable1351[4]; extern const int32_t g_FieldOffsetTable1352[11]; extern const int32_t g_FieldOffsetTable1354[3]; extern const int32_t g_FieldOffsetTable1356[2]; extern const int32_t g_FieldOffsetTable1358[5]; extern const int32_t g_FieldOffsetTable1359[2]; extern const int32_t g_FieldOffsetTable1360[9]; extern const int32_t g_FieldOffsetTable1361[6]; extern const int32_t g_FieldOffsetTable1363[5]; extern const int32_t g_FieldOffsetTable1364[5]; extern const int32_t g_FieldOffsetTable1365[5]; extern const int32_t g_FieldOffsetTable1366[3]; extern const int32_t g_FieldOffsetTable1375[8]; extern const int32_t g_FieldOffsetTable1377[5]; extern const int32_t g_FieldOffsetTable1378[5]; extern const int32_t g_FieldOffsetTable1379[18]; extern const int32_t g_FieldOffsetTable1380[11]; extern const int32_t g_FieldOffsetTable1381[4]; extern const int32_t g_FieldOffsetTable1382[10]; extern const int32_t g_FieldOffsetTable1383[3]; extern const int32_t g_FieldOffsetTable1384[3]; extern const int32_t g_FieldOffsetTable1386[2]; extern const int32_t g_FieldOffsetTable1388[2]; extern const int32_t g_FieldOffsetTable1389[4]; extern const int32_t g_FieldOffsetTable1390[11]; extern const int32_t g_FieldOffsetTable1391[1]; extern const int32_t g_FieldOffsetTable1392[4]; extern const int32_t g_FieldOffsetTable1393[1]; extern const int32_t g_FieldOffsetTable1398[4]; extern const int32_t g_FieldOffsetTable1399[33]; extern const int32_t g_FieldOffsetTable1400[9]; extern const int32_t g_FieldOffsetTable1401[13]; extern const int32_t g_FieldOffsetTable1403[7]; extern const int32_t g_FieldOffsetTable1404[4]; extern const int32_t g_FieldOffsetTable1405[4]; extern const int32_t g_FieldOffsetTable1407[2]; extern const int32_t g_FieldOffsetTable1408[15]; extern const int32_t g_FieldOffsetTable1409[17]; extern const int32_t g_FieldOffsetTable1410[12]; extern const int32_t g_FieldOffsetTable1411[10]; extern const int32_t g_FieldOffsetTable1412[6]; extern const int32_t g_FieldOffsetTable1413[3]; extern const int32_t g_FieldOffsetTable1414[5]; extern const int32_t g_FieldOffsetTable1415[3]; extern const int32_t g_FieldOffsetTable1416[5]; extern const int32_t g_FieldOffsetTable1417[27]; extern const int32_t g_FieldOffsetTable1419[3]; extern const int32_t g_FieldOffsetTable1420[5]; extern const int32_t g_FieldOffsetTable1421[16]; extern const int32_t g_FieldOffsetTable1422[3]; extern const int32_t g_FieldOffsetTable1423[1]; extern const int32_t g_FieldOffsetTable1425[4]; extern const int32_t g_FieldOffsetTable1428[3]; extern const int32_t g_FieldOffsetTable1429[9]; extern const int32_t g_FieldOffsetTable1430[16]; extern const int32_t g_FieldOffsetTable1431[3]; extern const int32_t g_FieldOffsetTable1432[6]; extern const int32_t g_FieldOffsetTable1433[11]; extern const int32_t g_FieldOffsetTable1434[1]; extern const int32_t g_FieldOffsetTable1435[1]; extern const int32_t g_FieldOffsetTable1438[1]; extern const int32_t g_FieldOffsetTable1443[7]; extern const int32_t g_FieldOffsetTable1448[3]; extern const int32_t g_FieldOffsetTable1450[3]; extern const int32_t g_FieldOffsetTable1451[2]; extern const int32_t g_FieldOffsetTable1452[3]; extern const int32_t g_FieldOffsetTable1455[1]; extern const int32_t g_FieldOffsetTable1456[1]; extern const int32_t g_FieldOffsetTable1457[1]; extern const int32_t g_FieldOffsetTable1459[3]; extern const int32_t g_FieldOffsetTable1460[3]; extern const int32_t g_FieldOffsetTable1461[34]; extern const int32_t g_FieldOffsetTable1462[5]; extern const int32_t g_FieldOffsetTable1463[6]; extern const int32_t g_FieldOffsetTable1464[2]; extern const int32_t g_FieldOffsetTable1465[4]; extern const int32_t g_FieldOffsetTable1466[4]; extern const int32_t g_FieldOffsetTable1470[4]; extern const int32_t g_FieldOffsetTable1471[7]; extern const int32_t g_FieldOffsetTable1472[5]; extern const int32_t g_FieldOffsetTable1473[7]; extern const int32_t g_FieldOffsetTable1474[10]; extern const int32_t g_FieldOffsetTable1475[6]; extern const int32_t g_FieldOffsetTable1476[4]; extern const int32_t g_FieldOffsetTable1477[8]; extern const int32_t g_FieldOffsetTable1478[4]; extern const int32_t g_FieldOffsetTable1479[3]; extern const int32_t g_FieldOffsetTable1480[52]; extern const int32_t g_FieldOffsetTable1481[24]; extern const int32_t g_FieldOffsetTable1482[4]; extern const int32_t g_FieldOffsetTable1483[10]; extern const int32_t g_FieldOffsetTable1484[6]; extern const int32_t g_FieldOffsetTable1485[9]; extern const int32_t g_FieldOffsetTable1486[1]; extern const int32_t g_FieldOffsetTable1487[322]; extern const int32_t g_FieldOffsetTable1488[3]; extern const int32_t g_FieldOffsetTable1489[5]; extern const int32_t g_FieldOffsetTable1490[5]; extern const int32_t g_FieldOffsetTable1491[7]; extern const int32_t g_FieldOffsetTable1492[6]; extern const int32_t g_FieldOffsetTable1493[10]; extern const int32_t g_FieldOffsetTable1494[3]; extern const int32_t g_FieldOffsetTable1496[5]; extern const int32_t g_FieldOffsetTable1497[2]; extern const int32_t g_FieldOffsetTable1500[6]; extern const int32_t g_FieldOffsetTable1505[3]; extern const int32_t g_FieldOffsetTable1506[4]; extern const int32_t g_FieldOffsetTable1507[2]; extern const int32_t g_FieldOffsetTable1509[2]; extern const int32_t g_FieldOffsetTable1511[1]; extern const int32_t g_FieldOffsetTable1512[1]; extern const int32_t g_FieldOffsetTable1513[2]; extern const int32_t g_FieldOffsetTable1514[1]; extern const int32_t g_FieldOffsetTable1515[2]; extern const int32_t g_FieldOffsetTable1516[2]; extern const int32_t g_FieldOffsetTable1517[2]; extern const int32_t g_FieldOffsetTable1518[4]; extern const int32_t g_FieldOffsetTable1524[1]; extern const int32_t g_FieldOffsetTable1525[2]; extern const int32_t g_FieldOffsetTable1526[1]; extern const int32_t g_FieldOffsetTable1527[10]; extern const int32_t g_FieldOffsetTable1528[1]; extern const int32_t g_FieldOffsetTable1529[8]; extern const int32_t g_FieldOffsetTable1530[6]; extern const int32_t g_FieldOffsetTable1532[1]; extern const int32_t g_FieldOffsetTable1533[1]; extern const int32_t g_FieldOffsetTable1534[1]; extern const int32_t g_FieldOffsetTable1535[1]; extern const int32_t g_FieldOffsetTable1536[1]; extern const int32_t g_FieldOffsetTable1537[1]; extern const int32_t g_FieldOffsetTable1538[4]; extern const int32_t g_FieldOffsetTable1539[5]; extern const int32_t g_FieldOffsetTable1540[1]; extern const int32_t g_FieldOffsetTable1541[4]; extern const int32_t g_FieldOffsetTable1542[4]; extern const int32_t g_FieldOffsetTable1544[1]; extern const int32_t g_FieldOffsetTable1546[1]; extern const int32_t g_FieldOffsetTable1548[1]; extern const int32_t g_FieldOffsetTable1550[1]; extern const int32_t g_FieldOffsetTable1552[1]; extern const int32_t g_FieldOffsetTable1554[3]; extern const int32_t g_FieldOffsetTable1555[5]; extern const int32_t g_FieldOffsetTable1556[1]; extern const int32_t g_FieldOffsetTable1565[6]; extern const int32_t g_FieldOffsetTable1566[3]; extern const int32_t g_FieldOffsetTable1567[1]; extern const int32_t g_FieldOffsetTable1571[3]; extern const int32_t g_FieldOffsetTable1572[2]; extern const int32_t g_FieldOffsetTable1574[3]; extern const int32_t g_FieldOffsetTable1575[3]; extern const int32_t g_FieldOffsetTable1578[3]; extern const int32_t g_FieldOffsetTable1579[1]; extern const int32_t g_FieldOffsetTable1582[2]; extern const int32_t g_FieldOffsetTable1585[1]; extern const int32_t g_FieldOffsetTable1586[1]; extern const int32_t g_FieldOffsetTable1587[5]; extern const int32_t g_FieldOffsetTable1588[1]; extern const int32_t g_FieldOffsetTable1592[5]; extern const int32_t g_FieldOffsetTable1593[1]; extern const int32_t g_FieldOffsetTable1594[3]; extern const int32_t g_FieldOffsetTable1596[2]; extern const int32_t g_FieldOffsetTable1597[4]; extern const int32_t g_FieldOffsetTable1598[10]; extern const int32_t g_FieldOffsetTable1599[6]; extern const int32_t g_FieldOffsetTable1600[4]; extern const int32_t g_FieldOffsetTable1601[4]; extern const int32_t g_FieldOffsetTable1604[8]; extern const int32_t g_FieldOffsetTable1605[4]; extern const int32_t g_FieldOffsetTable1608[9]; extern const int32_t g_FieldOffsetTable1609[5]; extern const int32_t g_FieldOffsetTable1610[1]; extern const int32_t g_FieldOffsetTable1612[1]; extern const int32_t g_FieldOffsetTable1614[4]; extern const int32_t g_FieldOffsetTable1618[8]; extern const int32_t g_FieldOffsetTable1619[7]; extern const int32_t g_FieldOffsetTable1620[9]; extern const int32_t g_FieldOffsetTable1622[7]; extern const int32_t g_FieldOffsetTable1623[9]; extern const int32_t g_FieldOffsetTable1625[8]; extern const int32_t g_FieldOffsetTable1626[8]; extern const int32_t g_FieldOffsetTable1627[11]; extern const int32_t g_FieldOffsetTable1628[3]; extern const int32_t g_FieldOffsetTable1629[3]; extern const int32_t g_FieldOffsetTable1630[4]; extern const int32_t g_FieldOffsetTable1632[5]; extern const int32_t g_FieldOffsetTable1633[4]; extern const int32_t g_FieldOffsetTable1634[4]; extern const int32_t g_FieldOffsetTable1635[5]; extern const int32_t g_FieldOffsetTable1636[2]; extern const int32_t g_FieldOffsetTable1637[6]; extern const int32_t g_FieldOffsetTable1638[4]; extern const int32_t g_FieldOffsetTable1639[4]; extern const int32_t g_FieldOffsetTable1641[18]; extern const int32_t g_FieldOffsetTable1642[4]; extern const int32_t g_FieldOffsetTable1643[2]; extern const int32_t g_FieldOffsetTable1644[3]; extern const int32_t g_FieldOffsetTable1645[12]; extern const int32_t g_FieldOffsetTable1646[6]; extern const int32_t g_FieldOffsetTable1647[4]; extern const int32_t g_FieldOffsetTable1648[3]; extern const int32_t g_FieldOffsetTable1649[7]; extern const int32_t g_FieldOffsetTable1650[4]; extern const int32_t g_FieldOffsetTable1651[3]; extern const int32_t g_FieldOffsetTable1653[2]; extern const int32_t g_FieldOffsetTable1655[3]; extern const int32_t g_FieldOffsetTable1656[15]; extern const int32_t g_FieldOffsetTable1657[8]; extern const int32_t g_FieldOffsetTable1658[14]; extern const int32_t g_FieldOffsetTable1659[8]; extern const int32_t g_FieldOffsetTable1660[2]; extern const int32_t g_FieldOffsetTable1661[6]; extern const int32_t g_FieldOffsetTable1662[18]; extern const int32_t g_FieldOffsetTable1663[8]; extern const int32_t g_FieldOffsetTable1664[11]; extern const int32_t g_FieldOffsetTable1665[3]; extern const int32_t g_FieldOffsetTable1666[1]; extern const int32_t g_FieldOffsetTable1667[3]; extern const int32_t g_FieldOffsetTable1668[11]; extern const int32_t g_FieldOffsetTable1670[6]; extern const int32_t g_FieldOffsetTable1671[18]; extern const int32_t g_FieldOffsetTable1672[4]; extern const int32_t g_FieldOffsetTable1673[6]; extern const int32_t g_FieldOffsetTable1674[7]; extern const int32_t g_FieldOffsetTable1675[8]; extern const int32_t g_FieldOffsetTable1679[1]; extern const int32_t g_FieldOffsetTable1680[2]; extern const int32_t g_FieldOffsetTable1682[1]; extern const int32_t g_FieldOffsetTable1685[1]; extern const int32_t g_FieldOffsetTable1686[9]; extern const int32_t g_FieldOffsetTable1687[6]; extern const int32_t g_FieldOffsetTable1688[9]; extern const int32_t g_FieldOffsetTable1689[8]; extern const int32_t g_FieldOffsetTable1690[3]; extern const int32_t g_FieldOffsetTable1691[5]; extern const int32_t g_FieldOffsetTable1692[6]; extern const int32_t g_FieldOffsetTable1693[6]; extern const int32_t g_FieldOffsetTable1694[4]; extern const int32_t g_FieldOffsetTable1695[23]; extern const int32_t g_FieldOffsetTable1696[14]; extern const int32_t g_FieldOffsetTable1697[8]; extern const int32_t g_FieldOffsetTable1698[5]; extern const int32_t g_FieldOffsetTable1700[20]; extern const int32_t g_FieldOffsetTable1701[14]; extern const int32_t g_FieldOffsetTable1702[3]; extern const int32_t g_FieldOffsetTable1703[4]; extern const int32_t g_FieldOffsetTable1704[6]; extern const int32_t g_FieldOffsetTable1705[1]; extern const int32_t g_FieldOffsetTable1706[19]; extern const int32_t g_FieldOffsetTable1707[7]; extern const int32_t g_FieldOffsetTable1709[5]; extern const int32_t g_FieldOffsetTable1710[2]; extern const int32_t g_FieldOffsetTable1711[7]; extern const int32_t g_FieldOffsetTable1713[12]; extern const int32_t g_FieldOffsetTable1714[16]; extern const int32_t g_FieldOffsetTable1723[3]; extern const int32_t g_FieldOffsetTable1742[12]; extern const int32_t g_FieldOffsetTable1743[2]; extern const int32_t g_FieldOffsetTable1745[2]; extern const int32_t g_FieldOffsetTable1746[18]; extern const int32_t g_FieldOffsetTable1747[36]; extern const int32_t g_FieldOffsetTable1749[6]; extern const int32_t g_FieldOffsetTable1750[1]; extern const int32_t g_FieldOffsetTable1751[10]; extern const int32_t g_FieldOffsetTable1753[2]; extern const int32_t g_FieldOffsetTable1754[1]; extern const int32_t g_FieldOffsetTable1755[1]; extern const int32_t g_FieldOffsetTable1756[21]; extern const int32_t g_FieldOffsetTable1757[4]; extern const int32_t g_FieldOffsetTable1758[5]; extern const int32_t g_FieldOffsetTable1760[6]; extern const int32_t g_FieldOffsetTable1761[6]; extern const int32_t g_FieldOffsetTable1762[2]; extern const int32_t g_FieldOffsetTable1763[1]; extern const int32_t g_FieldOffsetTable1764[2]; extern const int32_t g_FieldOffsetTable1765[13]; extern const int32_t g_FieldOffsetTable1766[3]; extern const int32_t g_FieldOffsetTable1767[3]; extern const int32_t g_FieldOffsetTable1770[4]; extern const int32_t g_FieldOffsetTable1772[6]; extern const int32_t g_FieldOffsetTable1773[4]; extern const int32_t g_FieldOffsetTable1775[5]; extern const int32_t g_FieldOffsetTable1777[2]; extern const int32_t g_FieldOffsetTable1778[6]; extern const int32_t g_FieldOffsetTable1779[8]; extern const int32_t g_FieldOffsetTable1780[1]; extern const int32_t g_FieldOffsetTable1782[6]; extern const int32_t g_FieldOffsetTable1783[7]; extern const int32_t g_FieldOffsetTable1785[7]; extern const int32_t g_FieldOffsetTable1786[6]; extern const int32_t g_FieldOffsetTable1787[9]; extern const int32_t g_FieldOffsetTable1788[7]; extern const int32_t g_FieldOffsetTable1789[14]; extern const int32_t g_FieldOffsetTable1790[4]; extern const int32_t g_FieldOffsetTable1791[2]; extern const int32_t g_FieldOffsetTable1792[1]; extern const int32_t g_FieldOffsetTable1794[2]; extern const int32_t g_FieldOffsetTable1795[5]; extern const int32_t g_FieldOffsetTable1796[12]; extern const int32_t g_FieldOffsetTable1797[3]; extern const int32_t g_FieldOffsetTable1798[17]; extern const int32_t g_FieldOffsetTable1799[8]; extern const int32_t g_FieldOffsetTable1800[5]; extern const int32_t g_FieldOffsetTable1801[3]; extern const int32_t g_FieldOffsetTable1803[15]; extern const int32_t g_FieldOffsetTable1804[5]; extern const int32_t g_FieldOffsetTable1805[6]; extern const int32_t g_FieldOffsetTable1806[3]; extern const int32_t g_FieldOffsetTable1807[3]; extern const int32_t g_FieldOffsetTable1808[5]; extern const int32_t g_FieldOffsetTable1809[5]; extern const int32_t g_FieldOffsetTable1810[5]; extern const int32_t g_FieldOffsetTable1813[47]; extern const int32_t g_FieldOffsetTable1814[11]; extern const int32_t g_FieldOffsetTable1815[4]; extern const int32_t g_FieldOffsetTable1816[7]; extern const int32_t g_FieldOffsetTable1817[4]; extern const int32_t g_FieldOffsetTable1821[3]; extern const int32_t g_FieldOffsetTable1822[6]; extern const int32_t g_FieldOffsetTable1823[8]; extern const int32_t g_FieldOffsetTable1824[5]; extern const int32_t g_FieldOffsetTable1825[9]; extern const int32_t g_FieldOffsetTable1829[5]; extern const int32_t g_FieldOffsetTable1830[6]; extern const int32_t g_FieldOffsetTable1831[2]; extern const int32_t g_FieldOffsetTable1832[8]; extern const int32_t g_FieldOffsetTable1833[11]; extern const int32_t g_FieldOffsetTable1834[5]; extern const int32_t g_FieldOffsetTable1836[3]; extern const int32_t g_FieldOffsetTable1837[5]; extern const int32_t g_FieldOffsetTable1838[36]; extern const int32_t g_FieldOffsetTable1839[4]; extern const int32_t g_FieldOffsetTable1840[4]; extern const int32_t g_FieldOffsetTable1842[14]; extern const int32_t g_FieldOffsetTable1843[5]; extern const int32_t g_FieldOffsetTable1844[5]; extern const int32_t g_FieldOffsetTable1846[15]; extern const int32_t g_FieldOffsetTable1847[5]; extern const int32_t g_FieldOffsetTable1849[3]; extern const int32_t g_FieldOffsetTable1850[3]; extern const int32_t g_FieldOffsetTable1851[1]; extern const int32_t g_FieldOffsetTable1852[10]; extern const int32_t g_FieldOffsetTable1853[7]; extern const int32_t g_FieldOffsetTable1854[5]; extern const int32_t g_FieldOffsetTable1855[3]; extern const int32_t g_FieldOffsetTable1857[4]; extern const int32_t g_FieldOffsetTable1858[2]; extern const int32_t g_FieldOffsetTable1862[2]; extern const int32_t g_FieldOffsetTable1863[4]; extern const int32_t g_FieldOffsetTable1864[6]; extern const int32_t g_FieldOffsetTable1865[14]; extern const int32_t g_FieldOffsetTable1866[4]; extern const int32_t g_FieldOffsetTable1867[4]; extern const int32_t g_FieldOffsetTable1868[6]; extern const int32_t g_FieldOffsetTable1869[4]; extern const int32_t g_FieldOffsetTable1870[4]; extern const int32_t g_FieldOffsetTable1871[6]; extern const int32_t g_FieldOffsetTable1872[5]; extern const int32_t g_FieldOffsetTable1873[3]; extern const int32_t g_FieldOffsetTable1874[4]; extern const int32_t g_FieldOffsetTable1876[5]; extern const int32_t g_FieldOffsetTable1882[7]; extern const int32_t g_FieldOffsetTable1883[8]; extern const int32_t g_FieldOffsetTable1884[4]; extern const int32_t g_FieldOffsetTable1885[9]; extern const int32_t g_FieldOffsetTable1886[8]; extern const int32_t g_FieldOffsetTable1889[2]; extern const int32_t g_FieldOffsetTable1890[1]; extern const int32_t g_FieldOffsetTable1891[4]; extern const int32_t g_FieldOffsetTable1892[5]; extern const int32_t g_FieldOffsetTable1897[11]; extern const int32_t g_FieldOffsetTable1899[1]; extern const int32_t g_FieldOffsetTable1904[4]; extern const int32_t g_FieldOffsetTable1905[1]; extern const int32_t g_FieldOffsetTable1908[4]; extern const int32_t g_FieldOffsetTable1909[1]; extern const int32_t g_FieldOffsetTable1910[3]; extern const int32_t g_FieldOffsetTable1911[9]; extern const int32_t g_FieldOffsetTable1912[5]; extern const int32_t g_FieldOffsetTable1913[3]; extern const int32_t g_FieldOffsetTable1914[3]; extern const int32_t g_FieldOffsetTable1915[6]; extern const int32_t g_FieldOffsetTable1916[4]; extern const int32_t g_FieldOffsetTable1917[6]; extern const int32_t g_FieldOffsetTable1918[14]; extern const int32_t g_FieldOffsetTable1919[5]; extern const int32_t g_FieldOffsetTable1920[2]; extern const int32_t g_FieldOffsetTable1921[11]; extern const int32_t g_FieldOffsetTable1922[12]; extern const int32_t g_FieldOffsetTable1923[8]; extern const int32_t g_FieldOffsetTable1924[2]; extern const int32_t g_FieldOffsetTable1925[10]; extern const int32_t g_FieldOffsetTable1926[3]; extern const int32_t g_FieldOffsetTable1927[16]; extern const int32_t g_FieldOffsetTable1928[19]; extern const int32_t g_FieldOffsetTable1929[45]; extern const int32_t g_FieldOffsetTable1930[2]; extern const int32_t g_FieldOffsetTable1931[6]; extern const int32_t g_FieldOffsetTable1932[3]; extern const int32_t g_FieldOffsetTable1933[4]; extern const int32_t g_FieldOffsetTable1937[2]; extern const int32_t g_FieldOffsetTable1938[1]; extern const int32_t g_FieldOffsetTable1939[1]; extern const int32_t g_FieldOffsetTable1941[5]; extern const int32_t g_FieldOffsetTable1942[5]; extern const int32_t g_FieldOffsetTable1943[5]; extern const int32_t g_FieldOffsetTable1945[8]; extern const int32_t g_FieldOffsetTable1951[11]; extern const int32_t g_FieldOffsetTable1952[4]; extern const int32_t g_FieldOffsetTable1953[4]; extern const int32_t g_FieldOffsetTable1954[3]; extern const int32_t g_FieldOffsetTable1955[2]; extern const int32_t g_FieldOffsetTable1956[3]; extern const int32_t g_FieldOffsetTable1957[1]; extern const int32_t g_FieldOffsetTable1958[14]; extern const int32_t g_FieldOffsetTable1959[11]; extern const int32_t g_FieldOffsetTable1960[3]; extern const int32_t g_FieldOffsetTable1961[4]; extern const int32_t g_FieldOffsetTable1962[8]; extern const int32_t g_FieldOffsetTable1963[6]; extern const int32_t g_FieldOffsetTable1964[8]; extern const int32_t g_FieldOffsetTable1966[6]; extern const int32_t g_FieldOffsetTable1971[4]; extern const int32_t g_FieldOffsetTable1972[2]; extern const int32_t g_FieldOffsetTable1982[20]; extern const int32_t g_FieldOffsetTable1985[4]; extern const int32_t g_FieldOffsetTable1986[11]; extern const int32_t g_FieldOffsetTable1991[3]; extern const int32_t g_FieldOffsetTable1992[10]; extern const int32_t g_FieldOffsetTable1993[9]; extern const int32_t g_FieldOffsetTable1994[18]; extern const int32_t g_FieldOffsetTable1995[5]; extern const int32_t g_FieldOffsetTable1996[7]; extern const int32_t g_FieldOffsetTable1997[3]; extern const int32_t g_FieldOffsetTable1998[5]; extern const int32_t g_FieldOffsetTable2000[3]; extern const int32_t g_FieldOffsetTable2001[1]; extern const int32_t g_FieldOffsetTable2003[5]; extern const int32_t g_FieldOffsetTable2006[20]; extern const int32_t g_FieldOffsetTable2007[4]; extern const int32_t g_FieldOffsetTable2009[1]; extern const int32_t g_FieldOffsetTable2010[2]; extern const int32_t* g_FieldOffsetTable[2013] = { NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable5, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable11, g_FieldOffsetTable12, NULL, g_FieldOffsetTable14, g_FieldOffsetTable15, g_FieldOffsetTable16, g_FieldOffsetTable17, g_FieldOffsetTable18, g_FieldOffsetTable19, g_FieldOffsetTable20, g_FieldOffsetTable21, NULL, NULL, NULL, NULL, g_FieldOffsetTable26, g_FieldOffsetTable27, NULL, NULL, g_FieldOffsetTable30, g_FieldOffsetTable31, g_FieldOffsetTable32, g_FieldOffsetTable33, g_FieldOffsetTable34, NULL, g_FieldOffsetTable36, g_FieldOffsetTable37, g_FieldOffsetTable38, g_FieldOffsetTable39, NULL, g_FieldOffsetTable41, g_FieldOffsetTable42, g_FieldOffsetTable43, g_FieldOffsetTable44, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable51, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable57, NULL, g_FieldOffsetTable59, g_FieldOffsetTable60, NULL, NULL, g_FieldOffsetTable63, g_FieldOffsetTable64, g_FieldOffsetTable65, NULL, g_FieldOffsetTable67, NULL, NULL, NULL, g_FieldOffsetTable71, g_FieldOffsetTable72, NULL, g_FieldOffsetTable74, g_FieldOffsetTable75, g_FieldOffsetTable76, g_FieldOffsetTable77, NULL, NULL, g_FieldOffsetTable80, g_FieldOffsetTable81, g_FieldOffsetTable82, g_FieldOffsetTable83, NULL, NULL, g_FieldOffsetTable86, NULL, NULL, NULL, NULL, g_FieldOffsetTable91, g_FieldOffsetTable92, g_FieldOffsetTable93, g_FieldOffsetTable94, g_FieldOffsetTable95, g_FieldOffsetTable96, g_FieldOffsetTable97, NULL, g_FieldOffsetTable99, g_FieldOffsetTable100, g_FieldOffsetTable101, g_FieldOffsetTable102, g_FieldOffsetTable103, g_FieldOffsetTable104, g_FieldOffsetTable105, g_FieldOffsetTable106, g_FieldOffsetTable107, g_FieldOffsetTable108, g_FieldOffsetTable109, g_FieldOffsetTable110, g_FieldOffsetTable111, g_FieldOffsetTable112, g_FieldOffsetTable113, g_FieldOffsetTable114, g_FieldOffsetTable115, NULL, NULL, g_FieldOffsetTable118, NULL, g_FieldOffsetTable120, g_FieldOffsetTable121, g_FieldOffsetTable122, NULL, NULL, g_FieldOffsetTable125, g_FieldOffsetTable126, g_FieldOffsetTable127, NULL, g_FieldOffsetTable129, g_FieldOffsetTable130, g_FieldOffsetTable131, NULL, g_FieldOffsetTable133, g_FieldOffsetTable134, g_FieldOffsetTable135, NULL, g_FieldOffsetTable137, g_FieldOffsetTable138, g_FieldOffsetTable139, g_FieldOffsetTable140, g_FieldOffsetTable141, g_FieldOffsetTable142, NULL, g_FieldOffsetTable144, g_FieldOffsetTable145, g_FieldOffsetTable146, g_FieldOffsetTable147, NULL, NULL, NULL, g_FieldOffsetTable151, g_FieldOffsetTable152, g_FieldOffsetTable153, g_FieldOffsetTable154, g_FieldOffsetTable155, NULL, NULL, g_FieldOffsetTable158, g_FieldOffsetTable159, NULL, NULL, NULL, g_FieldOffsetTable163, NULL, NULL, g_FieldOffsetTable166, g_FieldOffsetTable167, g_FieldOffsetTable168, g_FieldOffsetTable169, g_FieldOffsetTable170, g_FieldOffsetTable171, NULL, g_FieldOffsetTable173, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable180, g_FieldOffsetTable181, g_FieldOffsetTable182, g_FieldOffsetTable183, g_FieldOffsetTable184, g_FieldOffsetTable185, g_FieldOffsetTable186, g_FieldOffsetTable187, g_FieldOffsetTable188, NULL, NULL, g_FieldOffsetTable191, g_FieldOffsetTable192, g_FieldOffsetTable193, g_FieldOffsetTable194, g_FieldOffsetTable195, NULL, g_FieldOffsetTable197, g_FieldOffsetTable198, g_FieldOffsetTable199, g_FieldOffsetTable200, g_FieldOffsetTable201, g_FieldOffsetTable202, g_FieldOffsetTable203, g_FieldOffsetTable204, g_FieldOffsetTable205, g_FieldOffsetTable206, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable212, g_FieldOffsetTable213, g_FieldOffsetTable214, g_FieldOffsetTable215, g_FieldOffsetTable216, g_FieldOffsetTable217, g_FieldOffsetTable218, g_FieldOffsetTable219, g_FieldOffsetTable220, g_FieldOffsetTable221, g_FieldOffsetTable222, g_FieldOffsetTable223, g_FieldOffsetTable224, NULL, g_FieldOffsetTable226, g_FieldOffsetTable227, g_FieldOffsetTable228, g_FieldOffsetTable229, NULL, NULL, NULL, g_FieldOffsetTable233, g_FieldOffsetTable234, g_FieldOffsetTable235, g_FieldOffsetTable236, g_FieldOffsetTable237, g_FieldOffsetTable238, g_FieldOffsetTable239, g_FieldOffsetTable240, g_FieldOffsetTable241, g_FieldOffsetTable242, g_FieldOffsetTable243, g_FieldOffsetTable244, g_FieldOffsetTable245, g_FieldOffsetTable246, NULL, g_FieldOffsetTable248, NULL, g_FieldOffsetTable250, NULL, NULL, NULL, g_FieldOffsetTable254, g_FieldOffsetTable255, g_FieldOffsetTable256, g_FieldOffsetTable257, g_FieldOffsetTable258, g_FieldOffsetTable259, g_FieldOffsetTable260, g_FieldOffsetTable261, g_FieldOffsetTable262, NULL, NULL, g_FieldOffsetTable265, g_FieldOffsetTable266, NULL, g_FieldOffsetTable268, g_FieldOffsetTable269, g_FieldOffsetTable270, g_FieldOffsetTable271, g_FieldOffsetTable272, g_FieldOffsetTable273, NULL, g_FieldOffsetTable275, g_FieldOffsetTable276, g_FieldOffsetTable277, NULL, g_FieldOffsetTable279, g_FieldOffsetTable280, NULL, g_FieldOffsetTable282, g_FieldOffsetTable283, g_FieldOffsetTable284, NULL, g_FieldOffsetTable286, g_FieldOffsetTable287, NULL, g_FieldOffsetTable289, g_FieldOffsetTable290, NULL, g_FieldOffsetTable292, g_FieldOffsetTable293, g_FieldOffsetTable294, g_FieldOffsetTable295, NULL, g_FieldOffsetTable297, g_FieldOffsetTable298, g_FieldOffsetTable299, g_FieldOffsetTable300, NULL, g_FieldOffsetTable302, g_FieldOffsetTable303, g_FieldOffsetTable304, g_FieldOffsetTable305, g_FieldOffsetTable306, g_FieldOffsetTable307, g_FieldOffsetTable308, g_FieldOffsetTable309, g_FieldOffsetTable310, g_FieldOffsetTable311, g_FieldOffsetTable312, g_FieldOffsetTable313, g_FieldOffsetTable314, g_FieldOffsetTable315, NULL, g_FieldOffsetTable317, NULL, g_FieldOffsetTable319, g_FieldOffsetTable320, g_FieldOffsetTable321, g_FieldOffsetTable322, g_FieldOffsetTable323, g_FieldOffsetTable324, g_FieldOffsetTable325, g_FieldOffsetTable326, g_FieldOffsetTable327, g_FieldOffsetTable328, g_FieldOffsetTable329, g_FieldOffsetTable330, g_FieldOffsetTable331, g_FieldOffsetTable332, g_FieldOffsetTable333, NULL, g_FieldOffsetTable335, g_FieldOffsetTable336, g_FieldOffsetTable337, g_FieldOffsetTable338, g_FieldOffsetTable339, g_FieldOffsetTable340, g_FieldOffsetTable341, g_FieldOffsetTable342, NULL, g_FieldOffsetTable344, NULL, g_FieldOffsetTable346, g_FieldOffsetTable347, g_FieldOffsetTable348, NULL, g_FieldOffsetTable350, NULL, g_FieldOffsetTable352, g_FieldOffsetTable353, g_FieldOffsetTable354, g_FieldOffsetTable355, g_FieldOffsetTable356, NULL, NULL, g_FieldOffsetTable359, g_FieldOffsetTable360, g_FieldOffsetTable361, g_FieldOffsetTable362, g_FieldOffsetTable363, g_FieldOffsetTable364, NULL, NULL, NULL, g_FieldOffsetTable368, g_FieldOffsetTable369, g_FieldOffsetTable370, g_FieldOffsetTable371, g_FieldOffsetTable372, g_FieldOffsetTable373, NULL, g_FieldOffsetTable375, NULL, NULL, NULL, g_FieldOffsetTable379, NULL, g_FieldOffsetTable381, g_FieldOffsetTable382, g_FieldOffsetTable383, g_FieldOffsetTable384, g_FieldOffsetTable385, g_FieldOffsetTable386, g_FieldOffsetTable387, g_FieldOffsetTable388, NULL, g_FieldOffsetTable390, g_FieldOffsetTable391, g_FieldOffsetTable392, g_FieldOffsetTable393, NULL, g_FieldOffsetTable395, NULL, g_FieldOffsetTable397, g_FieldOffsetTable398, NULL, g_FieldOffsetTable400, NULL, NULL, g_FieldOffsetTable403, g_FieldOffsetTable404, g_FieldOffsetTable405, g_FieldOffsetTable406, g_FieldOffsetTable407, g_FieldOffsetTable408, g_FieldOffsetTable409, g_FieldOffsetTable410, NULL, g_FieldOffsetTable412, g_FieldOffsetTable413, g_FieldOffsetTable414, g_FieldOffsetTable415, g_FieldOffsetTable416, NULL, g_FieldOffsetTable418, g_FieldOffsetTable419, g_FieldOffsetTable420, g_FieldOffsetTable421, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable443, g_FieldOffsetTable444, NULL, g_FieldOffsetTable446, NULL, NULL, NULL, g_FieldOffsetTable450, g_FieldOffsetTable451, g_FieldOffsetTable452, g_FieldOffsetTable453, g_FieldOffsetTable454, g_FieldOffsetTable455, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable463, g_FieldOffsetTable464, g_FieldOffsetTable465, g_FieldOffsetTable466, NULL, g_FieldOffsetTable468, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable479, g_FieldOffsetTable480, g_FieldOffsetTable481, g_FieldOffsetTable482, g_FieldOffsetTable483, g_FieldOffsetTable484, g_FieldOffsetTable485, g_FieldOffsetTable486, g_FieldOffsetTable487, g_FieldOffsetTable488, g_FieldOffsetTable489, g_FieldOffsetTable490, g_FieldOffsetTable491, g_FieldOffsetTable492, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable502, g_FieldOffsetTable503, g_FieldOffsetTable504, g_FieldOffsetTable505, g_FieldOffsetTable506, g_FieldOffsetTable507, g_FieldOffsetTable508, g_FieldOffsetTable509, NULL, NULL, g_FieldOffsetTable512, g_FieldOffsetTable513, NULL, g_FieldOffsetTable515, g_FieldOffsetTable516, g_FieldOffsetTable517, g_FieldOffsetTable518, g_FieldOffsetTable519, NULL, g_FieldOffsetTable521, NULL, g_FieldOffsetTable523, g_FieldOffsetTable524, g_FieldOffsetTable525, NULL, g_FieldOffsetTable527, g_FieldOffsetTable528, g_FieldOffsetTable529, g_FieldOffsetTable530, NULL, NULL, NULL, g_FieldOffsetTable534, g_FieldOffsetTable535, g_FieldOffsetTable536, g_FieldOffsetTable537, g_FieldOffsetTable538, g_FieldOffsetTable539, g_FieldOffsetTable540, g_FieldOffsetTable541, NULL, NULL, g_FieldOffsetTable544, g_FieldOffsetTable545, NULL, NULL, NULL, g_FieldOffsetTable549, g_FieldOffsetTable550, g_FieldOffsetTable551, g_FieldOffsetTable552, g_FieldOffsetTable553, g_FieldOffsetTable554, g_FieldOffsetTable555, g_FieldOffsetTable556, g_FieldOffsetTable557, g_FieldOffsetTable558, g_FieldOffsetTable559, g_FieldOffsetTable560, g_FieldOffsetTable561, NULL, g_FieldOffsetTable563, g_FieldOffsetTable564, g_FieldOffsetTable565, g_FieldOffsetTable566, g_FieldOffsetTable567, g_FieldOffsetTable568, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable577, g_FieldOffsetTable578, g_FieldOffsetTable579, g_FieldOffsetTable580, g_FieldOffsetTable581, g_FieldOffsetTable582, g_FieldOffsetTable583, g_FieldOffsetTable584, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable590, NULL, g_FieldOffsetTable592, NULL, g_FieldOffsetTable594, g_FieldOffsetTable595, g_FieldOffsetTable596, g_FieldOffsetTable597, g_FieldOffsetTable598, g_FieldOffsetTable599, g_FieldOffsetTable600, NULL, NULL, NULL, g_FieldOffsetTable604, g_FieldOffsetTable605, g_FieldOffsetTable606, NULL, NULL, g_FieldOffsetTable609, g_FieldOffsetTable610, g_FieldOffsetTable611, g_FieldOffsetTable612, NULL, NULL, g_FieldOffsetTable615, g_FieldOffsetTable616, g_FieldOffsetTable617, g_FieldOffsetTable618, NULL, g_FieldOffsetTable620, NULL, NULL, NULL, NULL, g_FieldOffsetTable625, g_FieldOffsetTable626, g_FieldOffsetTable627, NULL, NULL, g_FieldOffsetTable630, g_FieldOffsetTable631, g_FieldOffsetTable632, NULL, g_FieldOffsetTable634, g_FieldOffsetTable635, g_FieldOffsetTable636, NULL, g_FieldOffsetTable638, NULL, g_FieldOffsetTable640, g_FieldOffsetTable641, NULL, g_FieldOffsetTable643, g_FieldOffsetTable644, g_FieldOffsetTable645, g_FieldOffsetTable646, g_FieldOffsetTable647, NULL, g_FieldOffsetTable649, NULL, NULL, g_FieldOffsetTable652, g_FieldOffsetTable653, NULL, g_FieldOffsetTable655, g_FieldOffsetTable656, g_FieldOffsetTable657, NULL, g_FieldOffsetTable659, NULL, g_FieldOffsetTable661, NULL, g_FieldOffsetTable663, g_FieldOffsetTable664, g_FieldOffsetTable665, NULL, NULL, g_FieldOffsetTable668, g_FieldOffsetTable669, NULL, NULL, g_FieldOffsetTable672, g_FieldOffsetTable673, g_FieldOffsetTable674, NULL, NULL, g_FieldOffsetTable677, g_FieldOffsetTable678, g_FieldOffsetTable679, g_FieldOffsetTable680, g_FieldOffsetTable681, g_FieldOffsetTable682, g_FieldOffsetTable683, g_FieldOffsetTable684, NULL, NULL, g_FieldOffsetTable687, NULL, NULL, g_FieldOffsetTable690, g_FieldOffsetTable691, g_FieldOffsetTable692, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable698, g_FieldOffsetTable699, g_FieldOffsetTable700, g_FieldOffsetTable701, g_FieldOffsetTable702, g_FieldOffsetTable703, g_FieldOffsetTable704, g_FieldOffsetTable705, g_FieldOffsetTable706, g_FieldOffsetTable707, g_FieldOffsetTable708, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable714, NULL, NULL, g_FieldOffsetTable717, NULL, g_FieldOffsetTable719, g_FieldOffsetTable720, g_FieldOffsetTable721, NULL, NULL, g_FieldOffsetTable724, NULL, g_FieldOffsetTable726, g_FieldOffsetTable727, g_FieldOffsetTable728, g_FieldOffsetTable729, g_FieldOffsetTable730, NULL, g_FieldOffsetTable732, g_FieldOffsetTable733, g_FieldOffsetTable734, g_FieldOffsetTable735, g_FieldOffsetTable736, g_FieldOffsetTable737, g_FieldOffsetTable738, g_FieldOffsetTable739, g_FieldOffsetTable740, g_FieldOffsetTable741, g_FieldOffsetTable742, NULL, g_FieldOffsetTable744, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable751, NULL, NULL, NULL, g_FieldOffsetTable755, NULL, g_FieldOffsetTable757, NULL, g_FieldOffsetTable759, g_FieldOffsetTable760, NULL, g_FieldOffsetTable762, NULL, g_FieldOffsetTable764, NULL, g_FieldOffsetTable766, NULL, g_FieldOffsetTable768, g_FieldOffsetTable769, g_FieldOffsetTable770, g_FieldOffsetTable771, NULL, g_FieldOffsetTable773, NULL, g_FieldOffsetTable775, g_FieldOffsetTable776, NULL, g_FieldOffsetTable778, g_FieldOffsetTable779, NULL, g_FieldOffsetTable781, g_FieldOffsetTable782, g_FieldOffsetTable783, g_FieldOffsetTable784, g_FieldOffsetTable785, g_FieldOffsetTable786, NULL, g_FieldOffsetTable788, g_FieldOffsetTable789, g_FieldOffsetTable790, g_FieldOffsetTable791, g_FieldOffsetTable792, g_FieldOffsetTable793, g_FieldOffsetTable794, g_FieldOffsetTable795, NULL, NULL, NULL, NULL, g_FieldOffsetTable800, g_FieldOffsetTable801, g_FieldOffsetTable802, g_FieldOffsetTable803, NULL, NULL, NULL, g_FieldOffsetTable807, NULL, g_FieldOffsetTable809, g_FieldOffsetTable810, NULL, NULL, NULL, g_FieldOffsetTable814, g_FieldOffsetTable815, g_FieldOffsetTable816, g_FieldOffsetTable817, NULL, NULL, g_FieldOffsetTable820, NULL, g_FieldOffsetTable822, g_FieldOffsetTable823, g_FieldOffsetTable824, g_FieldOffsetTable825, g_FieldOffsetTable826, g_FieldOffsetTable827, g_FieldOffsetTable828, g_FieldOffsetTable829, NULL, NULL, NULL, g_FieldOffsetTable833, g_FieldOffsetTable834, g_FieldOffsetTable835, g_FieldOffsetTable836, g_FieldOffsetTable837, g_FieldOffsetTable838, g_FieldOffsetTable839, g_FieldOffsetTable840, g_FieldOffsetTable841, g_FieldOffsetTable842, g_FieldOffsetTable843, NULL, g_FieldOffsetTable845, g_FieldOffsetTable846, g_FieldOffsetTable847, g_FieldOffsetTable848, g_FieldOffsetTable849, g_FieldOffsetTable850, g_FieldOffsetTable851, NULL, NULL, g_FieldOffsetTable854, g_FieldOffsetTable855, g_FieldOffsetTable856, g_FieldOffsetTable857, g_FieldOffsetTable858, g_FieldOffsetTable859, NULL, g_FieldOffsetTable861, g_FieldOffsetTable862, g_FieldOffsetTable863, g_FieldOffsetTable864, g_FieldOffsetTable865, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable883, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable909, g_FieldOffsetTable910, g_FieldOffsetTable911, g_FieldOffsetTable912, g_FieldOffsetTable913, g_FieldOffsetTable914, g_FieldOffsetTable915, g_FieldOffsetTable916, g_FieldOffsetTable917, g_FieldOffsetTable918, g_FieldOffsetTable919, g_FieldOffsetTable920, g_FieldOffsetTable921, g_FieldOffsetTable922, g_FieldOffsetTable923, g_FieldOffsetTable924, NULL, g_FieldOffsetTable926, g_FieldOffsetTable927, g_FieldOffsetTable928, g_FieldOffsetTable929, NULL, g_FieldOffsetTable931, NULL, NULL, g_FieldOffsetTable934, NULL, NULL, g_FieldOffsetTable937, g_FieldOffsetTable938, NULL, NULL, g_FieldOffsetTable941, g_FieldOffsetTable942, NULL, NULL, g_FieldOffsetTable945, g_FieldOffsetTable946, g_FieldOffsetTable947, g_FieldOffsetTable948, g_FieldOffsetTable949, g_FieldOffsetTable950, g_FieldOffsetTable951, g_FieldOffsetTable952, g_FieldOffsetTable953, g_FieldOffsetTable954, g_FieldOffsetTable955, g_FieldOffsetTable956, g_FieldOffsetTable957, g_FieldOffsetTable958, g_FieldOffsetTable959, NULL, g_FieldOffsetTable961, NULL, g_FieldOffsetTable963, g_FieldOffsetTable964, g_FieldOffsetTable965, g_FieldOffsetTable966, g_FieldOffsetTable967, g_FieldOffsetTable968, g_FieldOffsetTable969, g_FieldOffsetTable970, g_FieldOffsetTable971, g_FieldOffsetTable972, g_FieldOffsetTable973, g_FieldOffsetTable974, g_FieldOffsetTable975, g_FieldOffsetTable976, g_FieldOffsetTable977, g_FieldOffsetTable978, g_FieldOffsetTable979, g_FieldOffsetTable980, g_FieldOffsetTable981, g_FieldOffsetTable982, g_FieldOffsetTable983, g_FieldOffsetTable984, g_FieldOffsetTable985, g_FieldOffsetTable986, g_FieldOffsetTable987, g_FieldOffsetTable988, g_FieldOffsetTable989, g_FieldOffsetTable990, g_FieldOffsetTable991, g_FieldOffsetTable992, g_FieldOffsetTable993, g_FieldOffsetTable994, g_FieldOffsetTable995, g_FieldOffsetTable996, g_FieldOffsetTable997, g_FieldOffsetTable998, g_FieldOffsetTable999, g_FieldOffsetTable1000, g_FieldOffsetTable1001, g_FieldOffsetTable1002, NULL, NULL, g_FieldOffsetTable1005, g_FieldOffsetTable1006, g_FieldOffsetTable1007, g_FieldOffsetTable1008, g_FieldOffsetTable1009, NULL, NULL, NULL, g_FieldOffsetTable1013, g_FieldOffsetTable1014, g_FieldOffsetTable1015, g_FieldOffsetTable1016, g_FieldOffsetTable1017, g_FieldOffsetTable1018, g_FieldOffsetTable1019, g_FieldOffsetTable1020, g_FieldOffsetTable1021, g_FieldOffsetTable1022, g_FieldOffsetTable1023, g_FieldOffsetTable1024, g_FieldOffsetTable1025, NULL, g_FieldOffsetTable1027, g_FieldOffsetTable1028, NULL, NULL, g_FieldOffsetTable1031, NULL, g_FieldOffsetTable1033, g_FieldOffsetTable1034, g_FieldOffsetTable1035, NULL, g_FieldOffsetTable1037, NULL, g_FieldOffsetTable1039, g_FieldOffsetTable1040, NULL, g_FieldOffsetTable1042, g_FieldOffsetTable1043, g_FieldOffsetTable1044, g_FieldOffsetTable1045, g_FieldOffsetTable1046, g_FieldOffsetTable1047, NULL, NULL, g_FieldOffsetTable1050, g_FieldOffsetTable1051, NULL, g_FieldOffsetTable1053, g_FieldOffsetTable1054, g_FieldOffsetTable1055, g_FieldOffsetTable1056, NULL, NULL, g_FieldOffsetTable1059, NULL, NULL, NULL, NULL, g_FieldOffsetTable1064, g_FieldOffsetTable1065, g_FieldOffsetTable1066, NULL, g_FieldOffsetTable1068, NULL, NULL, NULL, g_FieldOffsetTable1072, NULL, NULL, NULL, g_FieldOffsetTable1076, g_FieldOffsetTable1077, g_FieldOffsetTable1078, NULL, g_FieldOffsetTable1080, NULL, g_FieldOffsetTable1082, NULL, g_FieldOffsetTable1084, g_FieldOffsetTable1085, NULL, g_FieldOffsetTable1087, g_FieldOffsetTable1088, g_FieldOffsetTable1089, g_FieldOffsetTable1090, NULL, g_FieldOffsetTable1092, g_FieldOffsetTable1093, g_FieldOffsetTable1094, g_FieldOffsetTable1095, g_FieldOffsetTable1096, NULL, g_FieldOffsetTable1098, g_FieldOffsetTable1099, g_FieldOffsetTable1100, g_FieldOffsetTable1101, g_FieldOffsetTable1102, g_FieldOffsetTable1103, g_FieldOffsetTable1104, g_FieldOffsetTable1105, g_FieldOffsetTable1106, g_FieldOffsetTable1107, g_FieldOffsetTable1108, g_FieldOffsetTable1109, g_FieldOffsetTable1110, g_FieldOffsetTable1111, g_FieldOffsetTable1112, g_FieldOffsetTable1113, g_FieldOffsetTable1114, g_FieldOffsetTable1115, g_FieldOffsetTable1116, g_FieldOffsetTable1117, g_FieldOffsetTable1118, g_FieldOffsetTable1119, g_FieldOffsetTable1120, g_FieldOffsetTable1121, g_FieldOffsetTable1122, g_FieldOffsetTable1123, g_FieldOffsetTable1124, NULL, g_FieldOffsetTable1126, NULL, g_FieldOffsetTable1128, g_FieldOffsetTable1129, g_FieldOffsetTable1130, g_FieldOffsetTable1131, g_FieldOffsetTable1132, g_FieldOffsetTable1133, g_FieldOffsetTable1134, g_FieldOffsetTable1135, g_FieldOffsetTable1136, g_FieldOffsetTable1137, g_FieldOffsetTable1138, g_FieldOffsetTable1139, g_FieldOffsetTable1140, g_FieldOffsetTable1141, g_FieldOffsetTable1142, g_FieldOffsetTable1143, NULL, g_FieldOffsetTable1145, g_FieldOffsetTable1146, g_FieldOffsetTable1147, g_FieldOffsetTable1148, g_FieldOffsetTable1149, g_FieldOffsetTable1150, g_FieldOffsetTable1151, g_FieldOffsetTable1152, g_FieldOffsetTable1153, g_FieldOffsetTable1154, g_FieldOffsetTable1155, g_FieldOffsetTable1156, g_FieldOffsetTable1157, g_FieldOffsetTable1158, g_FieldOffsetTable1159, NULL, g_FieldOffsetTable1161, g_FieldOffsetTable1162, NULL, g_FieldOffsetTable1164, g_FieldOffsetTable1165, g_FieldOffsetTable1166, g_FieldOffsetTable1167, NULL, g_FieldOffsetTable1169, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1175, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1189, g_FieldOffsetTable1190, g_FieldOffsetTable1191, g_FieldOffsetTable1192, g_FieldOffsetTable1193, g_FieldOffsetTable1194, NULL, NULL, g_FieldOffsetTable1197, NULL, NULL, g_FieldOffsetTable1200, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1206, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1212, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1219, NULL, g_FieldOffsetTable1221, NULL, NULL, NULL, g_FieldOffsetTable1225, NULL, NULL, NULL, g_FieldOffsetTable1229, NULL, NULL, g_FieldOffsetTable1232, g_FieldOffsetTable1233, g_FieldOffsetTable1234, NULL, g_FieldOffsetTable1236, NULL, NULL, g_FieldOffsetTable1239, g_FieldOffsetTable1240, NULL, g_FieldOffsetTable1242, g_FieldOffsetTable1243, g_FieldOffsetTable1244, NULL, g_FieldOffsetTable1246, NULL, NULL, NULL, g_FieldOffsetTable1250, NULL, NULL, NULL, g_FieldOffsetTable1254, NULL, NULL, g_FieldOffsetTable1257, g_FieldOffsetTable1258, g_FieldOffsetTable1259, g_FieldOffsetTable1260, g_FieldOffsetTable1261, g_FieldOffsetTable1262, g_FieldOffsetTable1263, g_FieldOffsetTable1264, g_FieldOffsetTable1265, g_FieldOffsetTable1266, g_FieldOffsetTable1267, g_FieldOffsetTable1268, g_FieldOffsetTable1269, g_FieldOffsetTable1270, g_FieldOffsetTable1271, g_FieldOffsetTable1272, g_FieldOffsetTable1273, g_FieldOffsetTable1274, NULL, g_FieldOffsetTable1276, g_FieldOffsetTable1277, NULL, g_FieldOffsetTable1279, g_FieldOffsetTable1280, NULL, g_FieldOffsetTable1282, NULL, g_FieldOffsetTable1284, g_FieldOffsetTable1285, NULL, g_FieldOffsetTable1287, NULL, NULL, NULL, g_FieldOffsetTable1291, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1299, g_FieldOffsetTable1300, g_FieldOffsetTable1301, g_FieldOffsetTable1302, NULL, NULL, g_FieldOffsetTable1305, g_FieldOffsetTable1306, g_FieldOffsetTable1307, NULL, g_FieldOffsetTable1309, g_FieldOffsetTable1310, g_FieldOffsetTable1311, g_FieldOffsetTable1312, g_FieldOffsetTable1313, g_FieldOffsetTable1314, g_FieldOffsetTable1315, g_FieldOffsetTable1316, NULL, g_FieldOffsetTable1318, g_FieldOffsetTable1319, NULL, g_FieldOffsetTable1321, NULL, g_FieldOffsetTable1323, g_FieldOffsetTable1324, g_FieldOffsetTable1325, g_FieldOffsetTable1326, g_FieldOffsetTable1327, NULL, g_FieldOffsetTable1329, NULL, NULL, g_FieldOffsetTable1332, NULL, g_FieldOffsetTable1334, g_FieldOffsetTable1335, g_FieldOffsetTable1336, NULL, NULL, g_FieldOffsetTable1339, g_FieldOffsetTable1340, g_FieldOffsetTable1341, NULL, g_FieldOffsetTable1343, NULL, g_FieldOffsetTable1345, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1351, g_FieldOffsetTable1352, NULL, g_FieldOffsetTable1354, NULL, g_FieldOffsetTable1356, NULL, g_FieldOffsetTable1358, g_FieldOffsetTable1359, g_FieldOffsetTable1360, g_FieldOffsetTable1361, NULL, g_FieldOffsetTable1363, g_FieldOffsetTable1364, g_FieldOffsetTable1365, g_FieldOffsetTable1366, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1375, NULL, g_FieldOffsetTable1377, g_FieldOffsetTable1378, g_FieldOffsetTable1379, g_FieldOffsetTable1380, g_FieldOffsetTable1381, g_FieldOffsetTable1382, g_FieldOffsetTable1383, g_FieldOffsetTable1384, NULL, g_FieldOffsetTable1386, NULL, g_FieldOffsetTable1388, g_FieldOffsetTable1389, g_FieldOffsetTable1390, g_FieldOffsetTable1391, g_FieldOffsetTable1392, g_FieldOffsetTable1393, NULL, NULL, NULL, NULL, g_FieldOffsetTable1398, g_FieldOffsetTable1399, g_FieldOffsetTable1400, g_FieldOffsetTable1401, NULL, g_FieldOffsetTable1403, g_FieldOffsetTable1404, g_FieldOffsetTable1405, NULL, g_FieldOffsetTable1407, g_FieldOffsetTable1408, g_FieldOffsetTable1409, g_FieldOffsetTable1410, g_FieldOffsetTable1411, g_FieldOffsetTable1412, g_FieldOffsetTable1413, g_FieldOffsetTable1414, g_FieldOffsetTable1415, g_FieldOffsetTable1416, g_FieldOffsetTable1417, NULL, g_FieldOffsetTable1419, g_FieldOffsetTable1420, g_FieldOffsetTable1421, g_FieldOffsetTable1422, g_FieldOffsetTable1423, NULL, g_FieldOffsetTable1425, NULL, NULL, g_FieldOffsetTable1428, g_FieldOffsetTable1429, g_FieldOffsetTable1430, g_FieldOffsetTable1431, g_FieldOffsetTable1432, g_FieldOffsetTable1433, g_FieldOffsetTable1434, g_FieldOffsetTable1435, NULL, NULL, g_FieldOffsetTable1438, NULL, NULL, NULL, NULL, g_FieldOffsetTable1443, NULL, NULL, NULL, NULL, g_FieldOffsetTable1448, NULL, g_FieldOffsetTable1450, g_FieldOffsetTable1451, g_FieldOffsetTable1452, NULL, NULL, g_FieldOffsetTable1455, g_FieldOffsetTable1456, g_FieldOffsetTable1457, NULL, g_FieldOffsetTable1459, g_FieldOffsetTable1460, g_FieldOffsetTable1461, g_FieldOffsetTable1462, g_FieldOffsetTable1463, g_FieldOffsetTable1464, g_FieldOffsetTable1465, g_FieldOffsetTable1466, NULL, NULL, NULL, g_FieldOffsetTable1470, g_FieldOffsetTable1471, g_FieldOffsetTable1472, g_FieldOffsetTable1473, g_FieldOffsetTable1474, g_FieldOffsetTable1475, g_FieldOffsetTable1476, g_FieldOffsetTable1477, g_FieldOffsetTable1478, g_FieldOffsetTable1479, g_FieldOffsetTable1480, g_FieldOffsetTable1481, g_FieldOffsetTable1482, g_FieldOffsetTable1483, g_FieldOffsetTable1484, g_FieldOffsetTable1485, g_FieldOffsetTable1486, g_FieldOffsetTable1487, g_FieldOffsetTable1488, g_FieldOffsetTable1489, g_FieldOffsetTable1490, g_FieldOffsetTable1491, g_FieldOffsetTable1492, g_FieldOffsetTable1493, g_FieldOffsetTable1494, NULL, g_FieldOffsetTable1496, g_FieldOffsetTable1497, NULL, NULL, g_FieldOffsetTable1500, NULL, NULL, NULL, NULL, g_FieldOffsetTable1505, g_FieldOffsetTable1506, g_FieldOffsetTable1507, NULL, g_FieldOffsetTable1509, NULL, g_FieldOffsetTable1511, g_FieldOffsetTable1512, g_FieldOffsetTable1513, g_FieldOffsetTable1514, g_FieldOffsetTable1515, g_FieldOffsetTable1516, g_FieldOffsetTable1517, g_FieldOffsetTable1518, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1524, g_FieldOffsetTable1525, g_FieldOffsetTable1526, g_FieldOffsetTable1527, g_FieldOffsetTable1528, g_FieldOffsetTable1529, g_FieldOffsetTable1530, NULL, g_FieldOffsetTable1532, g_FieldOffsetTable1533, g_FieldOffsetTable1534, g_FieldOffsetTable1535, g_FieldOffsetTable1536, g_FieldOffsetTable1537, g_FieldOffsetTable1538, g_FieldOffsetTable1539, g_FieldOffsetTable1540, g_FieldOffsetTable1541, g_FieldOffsetTable1542, NULL, g_FieldOffsetTable1544, NULL, g_FieldOffsetTable1546, NULL, g_FieldOffsetTable1548, NULL, g_FieldOffsetTable1550, NULL, g_FieldOffsetTable1552, NULL, g_FieldOffsetTable1554, g_FieldOffsetTable1555, g_FieldOffsetTable1556, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1565, g_FieldOffsetTable1566, g_FieldOffsetTable1567, NULL, NULL, NULL, g_FieldOffsetTable1571, g_FieldOffsetTable1572, NULL, g_FieldOffsetTable1574, g_FieldOffsetTable1575, NULL, NULL, g_FieldOffsetTable1578, g_FieldOffsetTable1579, NULL, NULL, g_FieldOffsetTable1582, NULL, NULL, g_FieldOffsetTable1585, g_FieldOffsetTable1586, g_FieldOffsetTable1587, g_FieldOffsetTable1588, NULL, NULL, NULL, g_FieldOffsetTable1592, g_FieldOffsetTable1593, g_FieldOffsetTable1594, NULL, g_FieldOffsetTable1596, g_FieldOffsetTable1597, g_FieldOffsetTable1598, g_FieldOffsetTable1599, g_FieldOffsetTable1600, g_FieldOffsetTable1601, NULL, NULL, g_FieldOffsetTable1604, g_FieldOffsetTable1605, NULL, NULL, g_FieldOffsetTable1608, g_FieldOffsetTable1609, g_FieldOffsetTable1610, NULL, g_FieldOffsetTable1612, NULL, g_FieldOffsetTable1614, NULL, NULL, NULL, g_FieldOffsetTable1618, g_FieldOffsetTable1619, g_FieldOffsetTable1620, NULL, g_FieldOffsetTable1622, g_FieldOffsetTable1623, NULL, g_FieldOffsetTable1625, g_FieldOffsetTable1626, g_FieldOffsetTable1627, g_FieldOffsetTable1628, g_FieldOffsetTable1629, g_FieldOffsetTable1630, NULL, g_FieldOffsetTable1632, g_FieldOffsetTable1633, g_FieldOffsetTable1634, g_FieldOffsetTable1635, g_FieldOffsetTable1636, g_FieldOffsetTable1637, g_FieldOffsetTable1638, g_FieldOffsetTable1639, NULL, g_FieldOffsetTable1641, g_FieldOffsetTable1642, g_FieldOffsetTable1643, g_FieldOffsetTable1644, g_FieldOffsetTable1645, g_FieldOffsetTable1646, g_FieldOffsetTable1647, g_FieldOffsetTable1648, g_FieldOffsetTable1649, g_FieldOffsetTable1650, g_FieldOffsetTable1651, NULL, g_FieldOffsetTable1653, NULL, g_FieldOffsetTable1655, g_FieldOffsetTable1656, g_FieldOffsetTable1657, g_FieldOffsetTable1658, g_FieldOffsetTable1659, g_FieldOffsetTable1660, g_FieldOffsetTable1661, g_FieldOffsetTable1662, g_FieldOffsetTable1663, g_FieldOffsetTable1664, g_FieldOffsetTable1665, g_FieldOffsetTable1666, g_FieldOffsetTable1667, g_FieldOffsetTable1668, NULL, g_FieldOffsetTable1670, g_FieldOffsetTable1671, g_FieldOffsetTable1672, g_FieldOffsetTable1673, g_FieldOffsetTable1674, g_FieldOffsetTable1675, NULL, NULL, NULL, g_FieldOffsetTable1679, g_FieldOffsetTable1680, NULL, g_FieldOffsetTable1682, NULL, NULL, g_FieldOffsetTable1685, g_FieldOffsetTable1686, g_FieldOffsetTable1687, g_FieldOffsetTable1688, g_FieldOffsetTable1689, g_FieldOffsetTable1690, g_FieldOffsetTable1691, g_FieldOffsetTable1692, g_FieldOffsetTable1693, g_FieldOffsetTable1694, g_FieldOffsetTable1695, g_FieldOffsetTable1696, g_FieldOffsetTable1697, g_FieldOffsetTable1698, NULL, g_FieldOffsetTable1700, g_FieldOffsetTable1701, g_FieldOffsetTable1702, g_FieldOffsetTable1703, g_FieldOffsetTable1704, g_FieldOffsetTable1705, g_FieldOffsetTable1706, g_FieldOffsetTable1707, NULL, g_FieldOffsetTable1709, g_FieldOffsetTable1710, g_FieldOffsetTable1711, NULL, g_FieldOffsetTable1713, g_FieldOffsetTable1714, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1723, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1742, g_FieldOffsetTable1743, NULL, g_FieldOffsetTable1745, g_FieldOffsetTable1746, g_FieldOffsetTable1747, NULL, g_FieldOffsetTable1749, g_FieldOffsetTable1750, g_FieldOffsetTable1751, NULL, g_FieldOffsetTable1753, g_FieldOffsetTable1754, g_FieldOffsetTable1755, g_FieldOffsetTable1756, g_FieldOffsetTable1757, g_FieldOffsetTable1758, NULL, g_FieldOffsetTable1760, g_FieldOffsetTable1761, g_FieldOffsetTable1762, g_FieldOffsetTable1763, g_FieldOffsetTable1764, g_FieldOffsetTable1765, g_FieldOffsetTable1766, g_FieldOffsetTable1767, NULL, NULL, g_FieldOffsetTable1770, NULL, g_FieldOffsetTable1772, g_FieldOffsetTable1773, NULL, g_FieldOffsetTable1775, NULL, g_FieldOffsetTable1777, g_FieldOffsetTable1778, g_FieldOffsetTable1779, g_FieldOffsetTable1780, NULL, g_FieldOffsetTable1782, g_FieldOffsetTable1783, NULL, g_FieldOffsetTable1785, g_FieldOffsetTable1786, g_FieldOffsetTable1787, g_FieldOffsetTable1788, g_FieldOffsetTable1789, g_FieldOffsetTable1790, g_FieldOffsetTable1791, g_FieldOffsetTable1792, NULL, g_FieldOffsetTable1794, g_FieldOffsetTable1795, g_FieldOffsetTable1796, g_FieldOffsetTable1797, g_FieldOffsetTable1798, g_FieldOffsetTable1799, g_FieldOffsetTable1800, g_FieldOffsetTable1801, NULL, g_FieldOffsetTable1803, g_FieldOffsetTable1804, g_FieldOffsetTable1805, g_FieldOffsetTable1806, g_FieldOffsetTable1807, g_FieldOffsetTable1808, g_FieldOffsetTable1809, g_FieldOffsetTable1810, NULL, NULL, g_FieldOffsetTable1813, g_FieldOffsetTable1814, g_FieldOffsetTable1815, g_FieldOffsetTable1816, g_FieldOffsetTable1817, NULL, NULL, NULL, g_FieldOffsetTable1821, g_FieldOffsetTable1822, g_FieldOffsetTable1823, g_FieldOffsetTable1824, g_FieldOffsetTable1825, NULL, NULL, NULL, g_FieldOffsetTable1829, g_FieldOffsetTable1830, g_FieldOffsetTable1831, g_FieldOffsetTable1832, g_FieldOffsetTable1833, g_FieldOffsetTable1834, NULL, g_FieldOffsetTable1836, g_FieldOffsetTable1837, g_FieldOffsetTable1838, g_FieldOffsetTable1839, g_FieldOffsetTable1840, NULL, g_FieldOffsetTable1842, g_FieldOffsetTable1843, g_FieldOffsetTable1844, NULL, g_FieldOffsetTable1846, g_FieldOffsetTable1847, NULL, g_FieldOffsetTable1849, g_FieldOffsetTable1850, g_FieldOffsetTable1851, g_FieldOffsetTable1852, g_FieldOffsetTable1853, g_FieldOffsetTable1854, g_FieldOffsetTable1855, NULL, g_FieldOffsetTable1857, g_FieldOffsetTable1858, NULL, NULL, NULL, g_FieldOffsetTable1862, g_FieldOffsetTable1863, g_FieldOffsetTable1864, g_FieldOffsetTable1865, g_FieldOffsetTable1866, g_FieldOffsetTable1867, g_FieldOffsetTable1868, g_FieldOffsetTable1869, g_FieldOffsetTable1870, g_FieldOffsetTable1871, g_FieldOffsetTable1872, g_FieldOffsetTable1873, g_FieldOffsetTable1874, NULL, g_FieldOffsetTable1876, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1882, g_FieldOffsetTable1883, g_FieldOffsetTable1884, g_FieldOffsetTable1885, g_FieldOffsetTable1886, NULL, NULL, g_FieldOffsetTable1889, g_FieldOffsetTable1890, g_FieldOffsetTable1891, g_FieldOffsetTable1892, NULL, NULL, NULL, NULL, g_FieldOffsetTable1897, NULL, g_FieldOffsetTable1899, NULL, NULL, NULL, NULL, g_FieldOffsetTable1904, g_FieldOffsetTable1905, NULL, NULL, g_FieldOffsetTable1908, g_FieldOffsetTable1909, g_FieldOffsetTable1910, g_FieldOffsetTable1911, g_FieldOffsetTable1912, g_FieldOffsetTable1913, g_FieldOffsetTable1914, g_FieldOffsetTable1915, g_FieldOffsetTable1916, g_FieldOffsetTable1917, g_FieldOffsetTable1918, g_FieldOffsetTable1919, g_FieldOffsetTable1920, g_FieldOffsetTable1921, g_FieldOffsetTable1922, g_FieldOffsetTable1923, g_FieldOffsetTable1924, g_FieldOffsetTable1925, g_FieldOffsetTable1926, g_FieldOffsetTable1927, g_FieldOffsetTable1928, g_FieldOffsetTable1929, g_FieldOffsetTable1930, g_FieldOffsetTable1931, g_FieldOffsetTable1932, g_FieldOffsetTable1933, NULL, NULL, NULL, g_FieldOffsetTable1937, g_FieldOffsetTable1938, g_FieldOffsetTable1939, NULL, g_FieldOffsetTable1941, g_FieldOffsetTable1942, g_FieldOffsetTable1943, NULL, g_FieldOffsetTable1945, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1951, g_FieldOffsetTable1952, g_FieldOffsetTable1953, g_FieldOffsetTable1954, g_FieldOffsetTable1955, g_FieldOffsetTable1956, g_FieldOffsetTable1957, g_FieldOffsetTable1958, g_FieldOffsetTable1959, g_FieldOffsetTable1960, g_FieldOffsetTable1961, g_FieldOffsetTable1962, g_FieldOffsetTable1963, g_FieldOffsetTable1964, NULL, g_FieldOffsetTable1966, NULL, NULL, NULL, NULL, g_FieldOffsetTable1971, g_FieldOffsetTable1972, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, g_FieldOffsetTable1982, NULL, NULL, g_FieldOffsetTable1985, g_FieldOffsetTable1986, NULL, NULL, NULL, NULL, g_FieldOffsetTable1991, g_FieldOffsetTable1992, g_FieldOffsetTable1993, g_FieldOffsetTable1994, g_FieldOffsetTable1995, g_FieldOffsetTable1996, g_FieldOffsetTable1997, g_FieldOffsetTable1998, NULL, g_FieldOffsetTable2000, g_FieldOffsetTable2001, NULL, g_FieldOffsetTable2003, NULL, NULL, g_FieldOffsetTable2006, g_FieldOffsetTable2007, NULL, g_FieldOffsetTable2009, g_FieldOffsetTable2010, NULL, NULL, }; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize0; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize3; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize4; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize5; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize6; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize7; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize8; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize9; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize10; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize11; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize12; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize13; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize14; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize15; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize16; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize17; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize18; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize19; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize20; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize21; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize22; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize23; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize24; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize25; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize26; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize27; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize28; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize29; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize30; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize31; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize32; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize33; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize34; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize35; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize36; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize37; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize38; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize39; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize40; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize41; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize42; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize43; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize44; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize45; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize46; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize47; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize48; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize49; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize50; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize51; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize52; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize53; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize54; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize55; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize56; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize57; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize58; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize59; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize60; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize61; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize62; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize63; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize64; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize65; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize66; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize67; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize68; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize69; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize70; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize71; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize72; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize73; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize74; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize75; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize76; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize77; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize78; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize79; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize80; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize81; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize82; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize83; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize84; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize85; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize86; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize87; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize88; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize89; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize90; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize91; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize92; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize93; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize94; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize95; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize96; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize97; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize98; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize99; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize100; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize101; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize102; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize103; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize104; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize105; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize106; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize107; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize108; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize109; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize110; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize111; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize112; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize113; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize114; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize115; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize116; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize117; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize118; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize119; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize120; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize121; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize122; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize123; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize124; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize125; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize126; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize127; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize128; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize129; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize130; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize131; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize132; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize133; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize134; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize135; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize136; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize137; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize138; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize139; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize140; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize141; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize142; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize143; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize144; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize145; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize146; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize147; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize148; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize149; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize150; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize151; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize152; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize153; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize154; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize155; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize156; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize157; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize158; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize159; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize160; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize161; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize162; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize163; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize164; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize165; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize166; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize167; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize168; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize169; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize170; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize171; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize172; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize173; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize174; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize175; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize176; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize177; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize178; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize179; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize180; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize181; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize182; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize183; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize184; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize185; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize186; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize187; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize188; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize189; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize190; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize191; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize192; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize193; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize194; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize195; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize196; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize197; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize198; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize199; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize200; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize201; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize202; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize203; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize204; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize205; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize206; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize207; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize208; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize209; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize210; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize211; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize212; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize213; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize214; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize215; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize216; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize217; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize218; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize219; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize220; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize221; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize222; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize223; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize224; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize225; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize226; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize227; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize228; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize229; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize230; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize231; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize232; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize233; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize234; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize235; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize236; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize237; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize238; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize239; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize240; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize241; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize242; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize243; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize244; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize245; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize246; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize247; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize248; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize249; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize250; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize251; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize252; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize253; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize254; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize255; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize256; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize257; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize258; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize259; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize260; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize261; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize262; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize263; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize264; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize265; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize266; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize267; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize268; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize269; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize270; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize271; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize272; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize273; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize274; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize275; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize276; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize277; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize278; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize279; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize280; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize281; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize282; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize283; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize284; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize285; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize286; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize287; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize288; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize289; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize290; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize291; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize292; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize293; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize294; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize295; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize296; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize297; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize298; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize299; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize300; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize301; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize302; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize303; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize304; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize305; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize306; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize307; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize308; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize309; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize310; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize311; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize312; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize313; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize314; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize315; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize316; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize317; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize318; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize319; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize320; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize321; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize322; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize323; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize324; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize325; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize326; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize327; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize328; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize329; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize330; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize331; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize332; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize333; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize334; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize335; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize336; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize337; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize338; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize339; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize340; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize341; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize342; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize343; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize344; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize345; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize346; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize347; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize348; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize349; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize350; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize351; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize352; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize353; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize354; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize355; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize356; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize357; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize358; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize359; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize360; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize361; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize362; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize363; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize364; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize365; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize366; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize367; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize368; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize369; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize370; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize371; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize372; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize373; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize374; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize375; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize376; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize377; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize378; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize379; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize380; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize381; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize382; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize383; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize384; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize385; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize386; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize387; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize388; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize389; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize390; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize391; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize392; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize393; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize394; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize395; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize396; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize397; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize398; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize399; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize400; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize401; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize402; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize403; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize404; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize405; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize406; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize407; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize408; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize409; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize410; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize411; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize412; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize413; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize414; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize415; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize416; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize417; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize418; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize419; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize420; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize421; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize422; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize423; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize424; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize425; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize426; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize427; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize428; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize429; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize430; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize431; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize432; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize433; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize434; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize435; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize436; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize437; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize438; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize439; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize440; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize441; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize442; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize443; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize444; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize445; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize446; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize447; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize448; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize449; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize450; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize451; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize452; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize453; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize454; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize455; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize456; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize457; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize458; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize459; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize460; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize461; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize462; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize463; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize464; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize465; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize466; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize467; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize468; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize469; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize470; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize471; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize472; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize473; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize474; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize475; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize476; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize477; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize478; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize479; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize480; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize481; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize482; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize483; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize484; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize485; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize486; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize487; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize488; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize489; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize490; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize491; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize492; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize493; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize494; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize495; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize496; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize497; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize498; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize499; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize500; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize501; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize502; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize503; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize504; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize505; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize506; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize507; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize508; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize509; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize510; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize511; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize512; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize513; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize514; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize515; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize516; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize517; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize518; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize519; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize520; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize521; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize522; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize523; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize524; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize525; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize526; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize527; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize528; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize529; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize530; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize531; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize532; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize533; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize534; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize535; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize536; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize537; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize538; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize539; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize540; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize541; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize542; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize543; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize544; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize545; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize546; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize547; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize548; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize549; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize550; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize551; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize552; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize553; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize554; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize555; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize556; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize557; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize558; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize559; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize560; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize561; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize562; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize563; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize564; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize565; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize566; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize567; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize568; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize569; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize570; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize571; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize572; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize573; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize574; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize575; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize576; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize577; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize578; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize579; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize580; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize581; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize582; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize583; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize584; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize585; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize586; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize587; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize588; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize589; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize590; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize591; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize592; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize593; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize594; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize595; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize596; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize597; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize598; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize599; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize600; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize601; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize602; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize603; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize604; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize605; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize606; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize607; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize608; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize609; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize610; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize611; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize612; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize613; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize614; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize615; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize616; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize617; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize618; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize619; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize620; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize621; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize622; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize623; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize624; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize625; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize626; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize627; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize628; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize629; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize630; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize631; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize632; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize633; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize634; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize635; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize636; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize637; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize638; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize639; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize640; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize641; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize642; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize643; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize644; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize645; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize646; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize647; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize648; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize649; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize650; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize651; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize652; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize653; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize654; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize655; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize656; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize657; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize658; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize659; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize660; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize661; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize662; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize663; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize664; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize665; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize666; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize667; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize668; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize669; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize670; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize671; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize672; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize673; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize674; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize675; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize676; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize677; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize678; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize679; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize680; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize681; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize682; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize683; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize684; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize685; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize686; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize687; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize688; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize689; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize690; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize691; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize692; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize693; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize694; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize695; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize696; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize697; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize698; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize699; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize700; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize701; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize702; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize703; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize704; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize705; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize706; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize707; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize708; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize709; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize710; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize711; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize712; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize713; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize714; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize715; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize716; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize717; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize718; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize719; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize720; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize721; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize722; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize723; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize724; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize725; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize726; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize727; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize728; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize729; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize730; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize731; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize732; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize733; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize734; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize735; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize736; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize737; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize738; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize739; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize740; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize741; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize742; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize743; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize744; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize745; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize746; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize747; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize748; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize749; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize750; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize751; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize752; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize753; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize754; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize755; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize756; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize757; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize758; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize759; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize760; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize761; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize762; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize763; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize764; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize765; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize766; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize767; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize768; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize769; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize770; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize771; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize772; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize773; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize774; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize775; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize776; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize777; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize778; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize779; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize780; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize781; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize782; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize783; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize784; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize785; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize786; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize787; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize788; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize789; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize790; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize791; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize792; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize793; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize794; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize795; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize796; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize797; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize798; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize799; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize800; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize801; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize802; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize803; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize804; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize805; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize806; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize807; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize808; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize809; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize810; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize811; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize812; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize813; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize814; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize815; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize816; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize817; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize818; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize819; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize820; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize821; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize822; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize823; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize824; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize825; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize826; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize827; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize828; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize829; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize830; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize831; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize832; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize833; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize834; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize835; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize836; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize837; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize838; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize839; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize840; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize841; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize842; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize843; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize844; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize845; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize846; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize847; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize848; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize849; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize850; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize851; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize852; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize853; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize854; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize855; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize856; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize857; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize858; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize859; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize860; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize861; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize862; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize863; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize864; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize865; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize866; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize867; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize868; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize869; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize870; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize871; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize872; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize873; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize874; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize875; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize876; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize877; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize878; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize879; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize880; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize881; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize882; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize883; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize884; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize885; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize886; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize887; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize888; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize889; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize890; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize891; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize892; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize893; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize894; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize895; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize896; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize897; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize898; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize899; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize900; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize901; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize902; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize903; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize904; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize905; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize906; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize907; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize908; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize909; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize910; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize911; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize912; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize913; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize914; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize915; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize916; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize917; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize918; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize919; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize920; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize921; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize922; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize923; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize924; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize925; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize926; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize927; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize928; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize929; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize930; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize931; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize932; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize933; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize934; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize935; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize936; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize937; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize938; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize939; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize940; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize941; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize942; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize943; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize944; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize945; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize946; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize947; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize948; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize949; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize950; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize951; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize952; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize953; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize954; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize955; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize956; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize957; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize958; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize959; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize960; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize961; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize962; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize963; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize964; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize965; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize966; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize967; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize968; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize969; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize970; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize971; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize972; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize973; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize974; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize975; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize976; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize977; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize978; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize979; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize980; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize981; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize982; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize983; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize984; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize985; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize986; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize987; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize988; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize989; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize990; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize991; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize992; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize993; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize994; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize995; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize996; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize997; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize998; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize999; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1000; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1001; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1002; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1003; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1004; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1005; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1006; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1007; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1008; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1009; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1010; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1011; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1012; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1013; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1014; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1015; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1016; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1017; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1018; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1019; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1020; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1021; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1022; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1023; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1024; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1025; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1026; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1027; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1028; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1029; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1030; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1031; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1032; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1033; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1034; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1035; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1036; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1037; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1038; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1039; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1040; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1041; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1042; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1043; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1044; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1045; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1046; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1047; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1048; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1049; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1050; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1051; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1052; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1053; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1054; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1055; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1056; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1057; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1058; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1059; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1060; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1061; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1062; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1063; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1064; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1065; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1066; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1067; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1068; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1069; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1070; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1071; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1072; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1073; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1074; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1075; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1076; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1077; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1078; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1079; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1080; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1081; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1082; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1083; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1084; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1085; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1086; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1087; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1088; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1089; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1090; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1091; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1092; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1093; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1094; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1095; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1096; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1097; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1098; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1099; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1100; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1101; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1102; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1103; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1104; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1105; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1106; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1107; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1108; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1109; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1110; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1111; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1112; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1113; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1114; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1115; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1116; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1117; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1118; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1119; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1120; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1121; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1122; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1123; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1124; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1125; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1126; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1127; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1128; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1129; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1130; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1131; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1132; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1133; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1134; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1135; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1136; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1137; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1138; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1139; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1140; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1141; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1142; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1143; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1144; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1145; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1146; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1147; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1148; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1149; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1150; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1151; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1152; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1153; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1154; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1155; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1156; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1157; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1158; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1159; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1160; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1161; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1162; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1163; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1164; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1165; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1166; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1167; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1168; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1169; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1170; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1171; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1172; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1173; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1174; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1175; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1176; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1177; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1178; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1179; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1180; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1181; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1182; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1183; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1184; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1185; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1186; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1187; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1188; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1189; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1190; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1191; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1192; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1193; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1194; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1195; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1196; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1197; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1198; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1199; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1200; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1201; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1202; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1203; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1204; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1205; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1206; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1207; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1208; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1209; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1210; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1211; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1212; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1213; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1214; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1215; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1216; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1217; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1218; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1219; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1220; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1221; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1222; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1223; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1224; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1225; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1226; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1227; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1228; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1229; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1230; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1231; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1232; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1233; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1234; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1235; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1236; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1237; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1238; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1239; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1240; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1241; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1242; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1243; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1244; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1245; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1246; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1247; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1248; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1249; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1250; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1251; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1252; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1253; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1254; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1255; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1256; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1257; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1258; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1259; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1260; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1261; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1262; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1263; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1264; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1265; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1266; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1267; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1268; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1269; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1270; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1271; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1272; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1273; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1274; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1275; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1276; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1277; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1278; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1279; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1280; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1281; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1282; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1283; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1284; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1285; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1286; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1287; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1288; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1289; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1290; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1291; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1292; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1293; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1294; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1295; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1296; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1297; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1298; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1299; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1300; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1301; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1302; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1303; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1304; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1305; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1306; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1307; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1308; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1309; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1310; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1311; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1312; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1313; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1314; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1315; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1316; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1317; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1318; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1319; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1320; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1321; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1322; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1323; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1324; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1325; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1326; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1327; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1328; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1329; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1330; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1331; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1332; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1333; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1334; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1335; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1336; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1337; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1338; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1339; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1340; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1341; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1342; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1343; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1344; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1345; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1346; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1347; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1348; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1349; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1350; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1351; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1352; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1353; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1354; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1355; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1356; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1357; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1358; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1359; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1360; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1361; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1362; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1363; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1364; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1365; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1366; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1367; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1368; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1369; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1370; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1371; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1372; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1373; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1374; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1375; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1376; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1377; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1378; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1379; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1380; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1381; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1382; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1383; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1384; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1385; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1386; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1387; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1388; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1389; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1390; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1391; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1392; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1393; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1394; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1395; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1396; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1397; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1398; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1399; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1400; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1401; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1402; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1403; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1404; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1405; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1406; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1407; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1408; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1409; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1410; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1411; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1412; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1413; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1414; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1415; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1416; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1417; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1418; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1419; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1420; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1421; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1422; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1423; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1424; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1425; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1426; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1427; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1428; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1429; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1430; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1431; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1432; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1433; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1434; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1435; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1436; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1437; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1438; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1439; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1440; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1441; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1442; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1443; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1444; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1445; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1446; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1447; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1448; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1449; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1450; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1451; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1452; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1453; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1454; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1455; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1456; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1457; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1458; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1459; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1460; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1461; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1462; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1463; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1464; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1465; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1466; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1467; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1468; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1469; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1470; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1471; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1472; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1473; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1474; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1475; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1476; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1477; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1478; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1479; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1480; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1481; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1482; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1483; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1484; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1485; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1486; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1487; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1488; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1489; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1490; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1491; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1492; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1493; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1494; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1495; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1496; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1497; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1498; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1499; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1500; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1501; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1502; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1503; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1504; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1505; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1506; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1507; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1508; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1509; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1510; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1511; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1512; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1513; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1514; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1515; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1516; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1517; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1518; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1519; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1520; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1521; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1522; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1523; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1524; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1525; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1526; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1527; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1528; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1529; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1530; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1531; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1532; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1533; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1534; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1535; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1536; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1537; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1538; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1539; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1540; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1541; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1542; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1543; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1544; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1545; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1546; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1547; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1548; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1549; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1550; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1551; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1552; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1553; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1554; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1555; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1556; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1557; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1558; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1559; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1560; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1561; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1562; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1563; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1564; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1565; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1566; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1567; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1568; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1569; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1570; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1571; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1572; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1573; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1574; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1575; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1576; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1577; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1578; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1579; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1580; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1581; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1582; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1583; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1584; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1585; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1586; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1587; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1588; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1589; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1590; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1591; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1592; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1593; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1594; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1595; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1596; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1597; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1598; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1599; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1600; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1601; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1602; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1603; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1604; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1605; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1606; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1607; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1608; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1609; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1610; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1611; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1612; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1613; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1614; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1615; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1616; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1617; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1618; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1619; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1620; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1621; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1622; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1623; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1624; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1625; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1626; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1627; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1628; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1629; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1630; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1631; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1632; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1633; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1634; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1635; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1636; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1637; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1638; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1639; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1640; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1641; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1642; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1643; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1644; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1645; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1646; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1647; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1648; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1649; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1650; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1651; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1652; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1653; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1654; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1655; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1656; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1657; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1658; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1659; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1660; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1661; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1662; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1663; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1664; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1665; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1666; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1667; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1668; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1669; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1670; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1671; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1672; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1673; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1674; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1675; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1676; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1677; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1678; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1679; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1680; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1681; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1682; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1683; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1684; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1685; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1686; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1687; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1688; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1689; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1690; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1691; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1692; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1693; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1694; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1695; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1696; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1697; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1698; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1699; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1700; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1701; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1702; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1703; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1704; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1705; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1706; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1707; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1708; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1709; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1710; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1711; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1712; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1713; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1714; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1715; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1716; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1717; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1718; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1719; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1720; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1721; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1722; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1723; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1724; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1725; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1726; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1727; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1728; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1729; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1730; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1731; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1732; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1733; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1734; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1735; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1736; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1737; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1738; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1739; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1740; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1741; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1742; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1743; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1744; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1745; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1746; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1747; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1748; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1749; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1750; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1751; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1752; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1753; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1754; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1755; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1756; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1757; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1758; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1759; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1760; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1761; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1762; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1763; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1764; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1765; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1766; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1767; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1768; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1769; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1770; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1771; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1772; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1773; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1774; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1775; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1776; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1777; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1778; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1779; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1780; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1781; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1782; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1783; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1784; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1785; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1786; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1787; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1788; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1789; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1790; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1791; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1792; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1793; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1794; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1795; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1796; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1797; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1798; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1799; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1800; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1801; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1802; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1803; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1804; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1805; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1806; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1807; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1808; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1809; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1810; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1811; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1812; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1813; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1814; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1815; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1816; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1817; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1818; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1819; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1820; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1821; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1822; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1823; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1824; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1825; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1826; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1827; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1828; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1829; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1830; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1831; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1832; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1833; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1834; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1835; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1836; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1837; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1838; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1839; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1840; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1841; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1842; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1843; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1844; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1845; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1846; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1847; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1848; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1849; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1850; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1851; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1852; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1853; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1854; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1855; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1856; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1857; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1858; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1859; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1860; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1861; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1862; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1863; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1864; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1865; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1866; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1867; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1868; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1869; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1870; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1871; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1872; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1873; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1874; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1875; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1876; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1877; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1878; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1879; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1880; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1881; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1882; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1883; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1884; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1885; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1886; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1887; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1888; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1889; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1890; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1891; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1892; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1893; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1894; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1895; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1896; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1897; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1898; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1899; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1900; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1901; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1902; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1903; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1904; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1905; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1906; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1907; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1908; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1909; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1910; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1911; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1912; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1913; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1914; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1915; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1916; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1917; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1918; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1919; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1920; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1921; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1922; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1923; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1924; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1925; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1926; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1927; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1928; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1929; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1930; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1931; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1932; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1933; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1934; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1935; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1936; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1937; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1938; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1939; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1940; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1941; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1942; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1943; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1944; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1945; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1946; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1947; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1948; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1949; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1950; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1951; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1952; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1953; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1954; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1955; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1956; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1957; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1958; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1959; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1960; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1961; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1962; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1963; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1964; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1965; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1966; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1967; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1968; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1969; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1970; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1971; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1972; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1973; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1974; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1975; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1976; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1977; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1978; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1979; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1980; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1981; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1982; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1983; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1984; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1985; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1986; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1987; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1988; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1989; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1990; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1991; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1992; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1993; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1994; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1995; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1996; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1997; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1998; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize1999; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2000; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2001; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2002; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2003; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2004; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2005; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2006; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2007; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2008; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2009; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2010; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2011; extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2012; extern const Il2CppTypeDefinitionSizes* g_Il2CppTypeDefinitionSizesTable[2013] = { &g_typeDefinitionSize0, &g_typeDefinitionSize1, &g_typeDefinitionSize2, &g_typeDefinitionSize3, &g_typeDefinitionSize4, &g_typeDefinitionSize5, &g_typeDefinitionSize6, &g_typeDefinitionSize7, &g_typeDefinitionSize8, &g_typeDefinitionSize9, &g_typeDefinitionSize10, &g_typeDefinitionSize11, &g_typeDefinitionSize12, &g_typeDefinitionSize13, &g_typeDefinitionSize14, &g_typeDefinitionSize15, &g_typeDefinitionSize16, &g_typeDefinitionSize17, &g_typeDefinitionSize18, &g_typeDefinitionSize19, &g_typeDefinitionSize20, &g_typeDefinitionSize21, &g_typeDefinitionSize22, &g_typeDefinitionSize23, &g_typeDefinitionSize24, &g_typeDefinitionSize25, &g_typeDefinitionSize26, &g_typeDefinitionSize27, &g_typeDefinitionSize28, &g_typeDefinitionSize29, &g_typeDefinitionSize30, &g_typeDefinitionSize31, &g_typeDefinitionSize32, &g_typeDefinitionSize33, &g_typeDefinitionSize34, &g_typeDefinitionSize35, &g_typeDefinitionSize36, &g_typeDefinitionSize37, &g_typeDefinitionSize38, &g_typeDefinitionSize39, &g_typeDefinitionSize40, &g_typeDefinitionSize41, &g_typeDefinitionSize42, &g_typeDefinitionSize43, &g_typeDefinitionSize44, &g_typeDefinitionSize45, &g_typeDefinitionSize46, &g_typeDefinitionSize47, &g_typeDefinitionSize48, &g_typeDefinitionSize49, &g_typeDefinitionSize50, &g_typeDefinitionSize51, &g_typeDefinitionSize52, &g_typeDefinitionSize53, &g_typeDefinitionSize54, &g_typeDefinitionSize55, &g_typeDefinitionSize56, &g_typeDefinitionSize57, &g_typeDefinitionSize58, &g_typeDefinitionSize59, &g_typeDefinitionSize60, &g_typeDefinitionSize61, &g_typeDefinitionSize62, &g_typeDefinitionSize63, &g_typeDefinitionSize64, &g_typeDefinitionSize65, &g_typeDefinitionSize66, &g_typeDefinitionSize67, &g_typeDefinitionSize68, &g_typeDefinitionSize69, &g_typeDefinitionSize70, &g_typeDefinitionSize71, &g_typeDefinitionSize72, &g_typeDefinitionSize73, &g_typeDefinitionSize74, &g_typeDefinitionSize75, &g_typeDefinitionSize76, &g_typeDefinitionSize77, &g_typeDefinitionSize78, &g_typeDefinitionSize79, &g_typeDefinitionSize80, &g_typeDefinitionSize81, &g_typeDefinitionSize82, &g_typeDefinitionSize83, &g_typeDefinitionSize84, &g_typeDefinitionSize85, &g_typeDefinitionSize86, &g_typeDefinitionSize87, &g_typeDefinitionSize88, &g_typeDefinitionSize89, &g_typeDefinitionSize90, &g_typeDefinitionSize91, &g_typeDefinitionSize92, &g_typeDefinitionSize93, &g_typeDefinitionSize94, &g_typeDefinitionSize95, &g_typeDefinitionSize96, &g_typeDefinitionSize97, &g_typeDefinitionSize98, &g_typeDefinitionSize99, &g_typeDefinitionSize100, &g_typeDefinitionSize101, &g_typeDefinitionSize102, &g_typeDefinitionSize103, &g_typeDefinitionSize104, &g_typeDefinitionSize105, &g_typeDefinitionSize106, &g_typeDefinitionSize107, &g_typeDefinitionSize108, &g_typeDefinitionSize109, &g_typeDefinitionSize110, &g_typeDefinitionSize111, &g_typeDefinitionSize112, &g_typeDefinitionSize113, &g_typeDefinitionSize114, &g_typeDefinitionSize115, &g_typeDefinitionSize116, &g_typeDefinitionSize117, &g_typeDefinitionSize118, &g_typeDefinitionSize119, &g_typeDefinitionSize120, &g_typeDefinitionSize121, &g_typeDefinitionSize122, &g_typeDefinitionSize123, &g_typeDefinitionSize124, &g_typeDefinitionSize125, &g_typeDefinitionSize126, &g_typeDefinitionSize127, &g_typeDefinitionSize128, &g_typeDefinitionSize129, &g_typeDefinitionSize130, &g_typeDefinitionSize131, &g_typeDefinitionSize132, &g_typeDefinitionSize133, &g_typeDefinitionSize134, &g_typeDefinitionSize135, &g_typeDefinitionSize136, &g_typeDefinitionSize137, &g_typeDefinitionSize138, &g_typeDefinitionSize139, &g_typeDefinitionSize140, &g_typeDefinitionSize141, &g_typeDefinitionSize142, &g_typeDefinitionSize143, &g_typeDefinitionSize144, &g_typeDefinitionSize145, &g_typeDefinitionSize146, &g_typeDefinitionSize147, &g_typeDefinitionSize148, &g_typeDefinitionSize149, &g_typeDefinitionSize150, &g_typeDefinitionSize151, &g_typeDefinitionSize152, &g_typeDefinitionSize153, &g_typeDefinitionSize154, &g_typeDefinitionSize155, &g_typeDefinitionSize156, &g_typeDefinitionSize157, &g_typeDefinitionSize158, &g_typeDefinitionSize159, &g_typeDefinitionSize160, &g_typeDefinitionSize161, &g_typeDefinitionSize162, &g_typeDefinitionSize163, &g_typeDefinitionSize164, &g_typeDefinitionSize165, &g_typeDefinitionSize166, &g_typeDefinitionSize167, &g_typeDefinitionSize168, &g_typeDefinitionSize169, &g_typeDefinitionSize170, &g_typeDefinitionSize171, &g_typeDefinitionSize172, &g_typeDefinitionSize173, &g_typeDefinitionSize174, &g_typeDefinitionSize175, &g_typeDefinitionSize176, &g_typeDefinitionSize177, &g_typeDefinitionSize178, &g_typeDefinitionSize179, &g_typeDefinitionSize180, &g_typeDefinitionSize181, &g_typeDefinitionSize182, &g_typeDefinitionSize183, &g_typeDefinitionSize184, &g_typeDefinitionSize185, &g_typeDefinitionSize186, &g_typeDefinitionSize187, &g_typeDefinitionSize188, &g_typeDefinitionSize189, &g_typeDefinitionSize190, &g_typeDefinitionSize191, &g_typeDefinitionSize192, &g_typeDefinitionSize193, &g_typeDefinitionSize194, &g_typeDefinitionSize195, &g_typeDefinitionSize196, &g_typeDefinitionSize197, &g_typeDefinitionSize198, &g_typeDefinitionSize199, &g_typeDefinitionSize200, &g_typeDefinitionSize201, &g_typeDefinitionSize202, &g_typeDefinitionSize203, &g_typeDefinitionSize204, &g_typeDefinitionSize205, &g_typeDefinitionSize206, &g_typeDefinitionSize207, &g_typeDefinitionSize208, &g_typeDefinitionSize209, &g_typeDefinitionSize210, &g_typeDefinitionSize211, &g_typeDefinitionSize212, &g_typeDefinitionSize213, &g_typeDefinitionSize214, &g_typeDefinitionSize215, &g_typeDefinitionSize216, &g_typeDefinitionSize217, &g_typeDefinitionSize218, &g_typeDefinitionSize219, &g_typeDefinitionSize220, &g_typeDefinitionSize221, &g_typeDefinitionSize222, &g_typeDefinitionSize223, &g_typeDefinitionSize224, &g_typeDefinitionSize225, &g_typeDefinitionSize226, &g_typeDefinitionSize227, &g_typeDefinitionSize228, &g_typeDefinitionSize229, &g_typeDefinitionSize230, &g_typeDefinitionSize231, &g_typeDefinitionSize232, &g_typeDefinitionSize233, &g_typeDefinitionSize234, &g_typeDefinitionSize235, &g_typeDefinitionSize236, &g_typeDefinitionSize237, &g_typeDefinitionSize238, &g_typeDefinitionSize239, &g_typeDefinitionSize240, &g_typeDefinitionSize241, &g_typeDefinitionSize242, &g_typeDefinitionSize243, &g_typeDefinitionSize244, &g_typeDefinitionSize245, &g_typeDefinitionSize246, &g_typeDefinitionSize247, &g_typeDefinitionSize248, &g_typeDefinitionSize249, &g_typeDefinitionSize250, &g_typeDefinitionSize251, &g_typeDefinitionSize252, &g_typeDefinitionSize253, &g_typeDefinitionSize254, &g_typeDefinitionSize255, &g_typeDefinitionSize256, &g_typeDefinitionSize257, &g_typeDefinitionSize258, &g_typeDefinitionSize259, &g_typeDefinitionSize260, &g_typeDefinitionSize261, &g_typeDefinitionSize262, &g_typeDefinitionSize263, &g_typeDefinitionSize264, &g_typeDefinitionSize265, &g_typeDefinitionSize266, &g_typeDefinitionSize267, &g_typeDefinitionSize268, &g_typeDefinitionSize269, &g_typeDefinitionSize270, &g_typeDefinitionSize271, &g_typeDefinitionSize272, &g_typeDefinitionSize273, &g_typeDefinitionSize274, &g_typeDefinitionSize275, &g_typeDefinitionSize276, &g_typeDefinitionSize277, &g_typeDefinitionSize278, &g_typeDefinitionSize279, &g_typeDefinitionSize280, &g_typeDefinitionSize281, &g_typeDefinitionSize282, &g_typeDefinitionSize283, &g_typeDefinitionSize284, &g_typeDefinitionSize285, &g_typeDefinitionSize286, &g_typeDefinitionSize287, &g_typeDefinitionSize288, &g_typeDefinitionSize289, &g_typeDefinitionSize290, &g_typeDefinitionSize291, &g_typeDefinitionSize292, &g_typeDefinitionSize293, &g_typeDefinitionSize294, &g_typeDefinitionSize295, &g_typeDefinitionSize296, &g_typeDefinitionSize297, &g_typeDefinitionSize298, &g_typeDefinitionSize299, &g_typeDefinitionSize300, &g_typeDefinitionSize301, &g_typeDefinitionSize302, &g_typeDefinitionSize303, &g_typeDefinitionSize304, &g_typeDefinitionSize305, &g_typeDefinitionSize306, &g_typeDefinitionSize307, &g_typeDefinitionSize308, &g_typeDefinitionSize309, &g_typeDefinitionSize310, &g_typeDefinitionSize311, &g_typeDefinitionSize312, &g_typeDefinitionSize313, &g_typeDefinitionSize314, &g_typeDefinitionSize315, &g_typeDefinitionSize316, &g_typeDefinitionSize317, &g_typeDefinitionSize318, &g_typeDefinitionSize319, &g_typeDefinitionSize320, &g_typeDefinitionSize321, &g_typeDefinitionSize322, &g_typeDefinitionSize323, &g_typeDefinitionSize324, &g_typeDefinitionSize325, &g_typeDefinitionSize326, &g_typeDefinitionSize327, &g_typeDefinitionSize328, &g_typeDefinitionSize329, &g_typeDefinitionSize330, &g_typeDefinitionSize331, &g_typeDefinitionSize332, &g_typeDefinitionSize333, &g_typeDefinitionSize334, &g_typeDefinitionSize335, &g_typeDefinitionSize336, &g_typeDefinitionSize337, &g_typeDefinitionSize338, &g_typeDefinitionSize339, &g_typeDefinitionSize340, &g_typeDefinitionSize341, &g_typeDefinitionSize342, &g_typeDefinitionSize343, &g_typeDefinitionSize344, &g_typeDefinitionSize345, &g_typeDefinitionSize346, &g_typeDefinitionSize347, &g_typeDefinitionSize348, &g_typeDefinitionSize349, &g_typeDefinitionSize350, &g_typeDefinitionSize351, &g_typeDefinitionSize352, &g_typeDefinitionSize353, &g_typeDefinitionSize354, &g_typeDefinitionSize355, &g_typeDefinitionSize356, &g_typeDefinitionSize357, &g_typeDefinitionSize358, &g_typeDefinitionSize359, &g_typeDefinitionSize360, &g_typeDefinitionSize361, &g_typeDefinitionSize362, &g_typeDefinitionSize363, &g_typeDefinitionSize364, &g_typeDefinitionSize365, &g_typeDefinitionSize366, &g_typeDefinitionSize367, &g_typeDefinitionSize368, &g_typeDefinitionSize369, &g_typeDefinitionSize370, &g_typeDefinitionSize371, &g_typeDefinitionSize372, &g_typeDefinitionSize373, &g_typeDefinitionSize374, &g_typeDefinitionSize375, &g_typeDefinitionSize376, &g_typeDefinitionSize377, &g_typeDefinitionSize378, &g_typeDefinitionSize379, &g_typeDefinitionSize380, &g_typeDefinitionSize381, &g_typeDefinitionSize382, &g_typeDefinitionSize383, &g_typeDefinitionSize384, &g_typeDefinitionSize385, &g_typeDefinitionSize386, &g_typeDefinitionSize387, &g_typeDefinitionSize388, &g_typeDefinitionSize389, &g_typeDefinitionSize390, &g_typeDefinitionSize391, &g_typeDefinitionSize392, &g_typeDefinitionSize393, &g_typeDefinitionSize394, &g_typeDefinitionSize395, &g_typeDefinitionSize396, &g_typeDefinitionSize397, &g_typeDefinitionSize398, &g_typeDefinitionSize399, &g_typeDefinitionSize400, &g_typeDefinitionSize401, &g_typeDefinitionSize402, &g_typeDefinitionSize403, &g_typeDefinitionSize404, &g_typeDefinitionSize405, &g_typeDefinitionSize406, &g_typeDefinitionSize407, &g_typeDefinitionSize408, &g_typeDefinitionSize409, &g_typeDefinitionSize410, &g_typeDefinitionSize411, &g_typeDefinitionSize412, &g_typeDefinitionSize413, &g_typeDefinitionSize414, &g_typeDefinitionSize415, &g_typeDefinitionSize416, &g_typeDefinitionSize417, &g_typeDefinitionSize418, &g_typeDefinitionSize419, &g_typeDefinitionSize420, &g_typeDefinitionSize421, &g_typeDefinitionSize422, &g_typeDefinitionSize423, &g_typeDefinitionSize424, &g_typeDefinitionSize425, &g_typeDefinitionSize426, &g_typeDefinitionSize427, &g_typeDefinitionSize428, &g_typeDefinitionSize429, &g_typeDefinitionSize430, &g_typeDefinitionSize431, &g_typeDefinitionSize432, &g_typeDefinitionSize433, &g_typeDefinitionSize434, &g_typeDefinitionSize435, &g_typeDefinitionSize436, &g_typeDefinitionSize437, &g_typeDefinitionSize438, &g_typeDefinitionSize439, &g_typeDefinitionSize440, &g_typeDefinitionSize441, &g_typeDefinitionSize442, &g_typeDefinitionSize443, &g_typeDefinitionSize444, &g_typeDefinitionSize445, &g_typeDefinitionSize446, &g_typeDefinitionSize447, &g_typeDefinitionSize448, &g_typeDefinitionSize449, &g_typeDefinitionSize450, &g_typeDefinitionSize451, &g_typeDefinitionSize452, &g_typeDefinitionSize453, &g_typeDefinitionSize454, &g_typeDefinitionSize455, &g_typeDefinitionSize456, &g_typeDefinitionSize457, &g_typeDefinitionSize458, &g_typeDefinitionSize459, &g_typeDefinitionSize460, &g_typeDefinitionSize461, &g_typeDefinitionSize462, &g_typeDefinitionSize463, &g_typeDefinitionSize464, &g_typeDefinitionSize465, &g_typeDefinitionSize466, &g_typeDefinitionSize467, &g_typeDefinitionSize468, &g_typeDefinitionSize469, &g_typeDefinitionSize470, &g_typeDefinitionSize471, &g_typeDefinitionSize472, &g_typeDefinitionSize473, &g_typeDefinitionSize474, &g_typeDefinitionSize475, &g_typeDefinitionSize476, &g_typeDefinitionSize477, &g_typeDefinitionSize478, &g_typeDefinitionSize479, &g_typeDefinitionSize480, &g_typeDefinitionSize481, &g_typeDefinitionSize482, &g_typeDefinitionSize483, &g_typeDefinitionSize484, &g_typeDefinitionSize485, &g_typeDefinitionSize486, &g_typeDefinitionSize487, &g_typeDefinitionSize488, &g_typeDefinitionSize489, &g_typeDefinitionSize490, &g_typeDefinitionSize491, &g_typeDefinitionSize492, &g_typeDefinitionSize493, &g_typeDefinitionSize494, &g_typeDefinitionSize495, &g_typeDefinitionSize496, &g_typeDefinitionSize497, &g_typeDefinitionSize498, &g_typeDefinitionSize499, &g_typeDefinitionSize500, &g_typeDefinitionSize501, &g_typeDefinitionSize502, &g_typeDefinitionSize503, &g_typeDefinitionSize504, &g_typeDefinitionSize505, &g_typeDefinitionSize506, &g_typeDefinitionSize507, &g_typeDefinitionSize508, &g_typeDefinitionSize509, &g_typeDefinitionSize510, &g_typeDefinitionSize511, &g_typeDefinitionSize512, &g_typeDefinitionSize513, &g_typeDefinitionSize514, &g_typeDefinitionSize515, &g_typeDefinitionSize516, &g_typeDefinitionSize517, &g_typeDefinitionSize518, &g_typeDefinitionSize519, &g_typeDefinitionSize520, &g_typeDefinitionSize521, &g_typeDefinitionSize522, &g_typeDefinitionSize523, &g_typeDefinitionSize524, &g_typeDefinitionSize525, &g_typeDefinitionSize526, &g_typeDefinitionSize527, &g_typeDefinitionSize528, &g_typeDefinitionSize529, &g_typeDefinitionSize530, &g_typeDefinitionSize531, &g_typeDefinitionSize532, &g_typeDefinitionSize533, &g_typeDefinitionSize534, &g_typeDefinitionSize535, &g_typeDefinitionSize536, &g_typeDefinitionSize537, &g_typeDefinitionSize538, &g_typeDefinitionSize539, &g_typeDefinitionSize540, &g_typeDefinitionSize541, &g_typeDefinitionSize542, &g_typeDefinitionSize543, &g_typeDefinitionSize544, &g_typeDefinitionSize545, &g_typeDefinitionSize546, &g_typeDefinitionSize547, &g_typeDefinitionSize548, &g_typeDefinitionSize549, &g_typeDefinitionSize550, &g_typeDefinitionSize551, &g_typeDefinitionSize552, &g_typeDefinitionSize553, &g_typeDefinitionSize554, &g_typeDefinitionSize555, &g_typeDefinitionSize556, &g_typeDefinitionSize557, &g_typeDefinitionSize558, &g_typeDefinitionSize559, &g_typeDefinitionSize560, &g_typeDefinitionSize561, &g_typeDefinitionSize562, &g_typeDefinitionSize563, &g_typeDefinitionSize564, &g_typeDefinitionSize565, &g_typeDefinitionSize566, &g_typeDefinitionSize567, &g_typeDefinitionSize568, &g_typeDefinitionSize569, &g_typeDefinitionSize570, &g_typeDefinitionSize571, &g_typeDefinitionSize572, &g_typeDefinitionSize573, &g_typeDefinitionSize574, &g_typeDefinitionSize575, &g_typeDefinitionSize576, &g_typeDefinitionSize577, &g_typeDefinitionSize578, &g_typeDefinitionSize579, &g_typeDefinitionSize580, &g_typeDefinitionSize581, &g_typeDefinitionSize582, &g_typeDefinitionSize583, &g_typeDefinitionSize584, &g_typeDefinitionSize585, &g_typeDefinitionSize586, &g_typeDefinitionSize587, &g_typeDefinitionSize588, &g_typeDefinitionSize589, &g_typeDefinitionSize590, &g_typeDefinitionSize591, &g_typeDefinitionSize592, &g_typeDefinitionSize593, &g_typeDefinitionSize594, &g_typeDefinitionSize595, &g_typeDefinitionSize596, &g_typeDefinitionSize597, &g_typeDefinitionSize598, &g_typeDefinitionSize599, &g_typeDefinitionSize600, &g_typeDefinitionSize601, &g_typeDefinitionSize602, &g_typeDefinitionSize603, &g_typeDefinitionSize604, &g_typeDefinitionSize605, &g_typeDefinitionSize606, &g_typeDefinitionSize607, &g_typeDefinitionSize608, &g_typeDefinitionSize609, &g_typeDefinitionSize610, &g_typeDefinitionSize611, &g_typeDefinitionSize612, &g_typeDefinitionSize613, &g_typeDefinitionSize614, &g_typeDefinitionSize615, &g_typeDefinitionSize616, &g_typeDefinitionSize617, &g_typeDefinitionSize618, &g_typeDefinitionSize619, &g_typeDefinitionSize620, &g_typeDefinitionSize621, &g_typeDefinitionSize622, &g_typeDefinitionSize623, &g_typeDefinitionSize624, &g_typeDefinitionSize625, &g_typeDefinitionSize626, &g_typeDefinitionSize627, &g_typeDefinitionSize628, &g_typeDefinitionSize629, &g_typeDefinitionSize630, &g_typeDefinitionSize631, &g_typeDefinitionSize632, &g_typeDefinitionSize633, &g_typeDefinitionSize634, &g_typeDefinitionSize635, &g_typeDefinitionSize636, &g_typeDefinitionSize637, &g_typeDefinitionSize638, &g_typeDefinitionSize639, &g_typeDefinitionSize640, &g_typeDefinitionSize641, &g_typeDefinitionSize642, &g_typeDefinitionSize643, &g_typeDefinitionSize644, &g_typeDefinitionSize645, &g_typeDefinitionSize646, &g_typeDefinitionSize647, &g_typeDefinitionSize648, &g_typeDefinitionSize649, &g_typeDefinitionSize650, &g_typeDefinitionSize651, &g_typeDefinitionSize652, &g_typeDefinitionSize653, &g_typeDefinitionSize654, &g_typeDefinitionSize655, &g_typeDefinitionSize656, &g_typeDefinitionSize657, &g_typeDefinitionSize658, &g_typeDefinitionSize659, &g_typeDefinitionSize660, &g_typeDefinitionSize661, &g_typeDefinitionSize662, &g_typeDefinitionSize663, &g_typeDefinitionSize664, &g_typeDefinitionSize665, &g_typeDefinitionSize666, &g_typeDefinitionSize667, &g_typeDefinitionSize668, &g_typeDefinitionSize669, &g_typeDefinitionSize670, &g_typeDefinitionSize671, &g_typeDefinitionSize672, &g_typeDefinitionSize673, &g_typeDefinitionSize674, &g_typeDefinitionSize675, &g_typeDefinitionSize676, &g_typeDefinitionSize677, &g_typeDefinitionSize678, &g_typeDefinitionSize679, &g_typeDefinitionSize680, &g_typeDefinitionSize681, &g_typeDefinitionSize682, &g_typeDefinitionSize683, &g_typeDefinitionSize684, &g_typeDefinitionSize685, &g_typeDefinitionSize686, &g_typeDefinitionSize687, &g_typeDefinitionSize688, &g_typeDefinitionSize689, &g_typeDefinitionSize690, &g_typeDefinitionSize691, &g_typeDefinitionSize692, &g_typeDefinitionSize693, &g_typeDefinitionSize694, &g_typeDefinitionSize695, &g_typeDefinitionSize696, &g_typeDefinitionSize697, &g_typeDefinitionSize698, &g_typeDefinitionSize699, &g_typeDefinitionSize700, &g_typeDefinitionSize701, &g_typeDefinitionSize702, &g_typeDefinitionSize703, &g_typeDefinitionSize704, &g_typeDefinitionSize705, &g_typeDefinitionSize706, &g_typeDefinitionSize707, &g_typeDefinitionSize708, &g_typeDefinitionSize709, &g_typeDefinitionSize710, &g_typeDefinitionSize711, &g_typeDefinitionSize712, &g_typeDefinitionSize713, &g_typeDefinitionSize714, &g_typeDefinitionSize715, &g_typeDefinitionSize716, &g_typeDefinitionSize717, &g_typeDefinitionSize718, &g_typeDefinitionSize719, &g_typeDefinitionSize720, &g_typeDefinitionSize721, &g_typeDefinitionSize722, &g_typeDefinitionSize723, &g_typeDefinitionSize724, &g_typeDefinitionSize725, &g_typeDefinitionSize726, &g_typeDefinitionSize727, &g_typeDefinitionSize728, &g_typeDefinitionSize729, &g_typeDefinitionSize730, &g_typeDefinitionSize731, &g_typeDefinitionSize732, &g_typeDefinitionSize733, &g_typeDefinitionSize734, &g_typeDefinitionSize735, &g_typeDefinitionSize736, &g_typeDefinitionSize737, &g_typeDefinitionSize738, &g_typeDefinitionSize739, &g_typeDefinitionSize740, &g_typeDefinitionSize741, &g_typeDefinitionSize742, &g_typeDefinitionSize743, &g_typeDefinitionSize744, &g_typeDefinitionSize745, &g_typeDefinitionSize746, &g_typeDefinitionSize747, &g_typeDefinitionSize748, &g_typeDefinitionSize749, &g_typeDefinitionSize750, &g_typeDefinitionSize751, &g_typeDefinitionSize752, &g_typeDefinitionSize753, &g_typeDefinitionSize754, &g_typeDefinitionSize755, &g_typeDefinitionSize756, &g_typeDefinitionSize757, &g_typeDefinitionSize758, &g_typeDefinitionSize759, &g_typeDefinitionSize760, &g_typeDefinitionSize761, &g_typeDefinitionSize762, &g_typeDefinitionSize763, &g_typeDefinitionSize764, &g_typeDefinitionSize765, &g_typeDefinitionSize766, &g_typeDefinitionSize767, &g_typeDefinitionSize768, &g_typeDefinitionSize769, &g_typeDefinitionSize770, &g_typeDefinitionSize771, &g_typeDefinitionSize772, &g_typeDefinitionSize773, &g_typeDefinitionSize774, &g_typeDefinitionSize775, &g_typeDefinitionSize776, &g_typeDefinitionSize777, &g_typeDefinitionSize778, &g_typeDefinitionSize779, &g_typeDefinitionSize780, &g_typeDefinitionSize781, &g_typeDefinitionSize782, &g_typeDefinitionSize783, &g_typeDefinitionSize784, &g_typeDefinitionSize785, &g_typeDefinitionSize786, &g_typeDefinitionSize787, &g_typeDefinitionSize788, &g_typeDefinitionSize789, &g_typeDefinitionSize790, &g_typeDefinitionSize791, &g_typeDefinitionSize792, &g_typeDefinitionSize793, &g_typeDefinitionSize794, &g_typeDefinitionSize795, &g_typeDefinitionSize796, &g_typeDefinitionSize797, &g_typeDefinitionSize798, &g_typeDefinitionSize799, &g_typeDefinitionSize800, &g_typeDefinitionSize801, &g_typeDefinitionSize802, &g_typeDefinitionSize803, &g_typeDefinitionSize804, &g_typeDefinitionSize805, &g_typeDefinitionSize806, &g_typeDefinitionSize807, &g_typeDefinitionSize808, &g_typeDefinitionSize809, &g_typeDefinitionSize810, &g_typeDefinitionSize811, &g_typeDefinitionSize812, &g_typeDefinitionSize813, &g_typeDefinitionSize814, &g_typeDefinitionSize815, &g_typeDefinitionSize816, &g_typeDefinitionSize817, &g_typeDefinitionSize818, &g_typeDefinitionSize819, &g_typeDefinitionSize820, &g_typeDefinitionSize821, &g_typeDefinitionSize822, &g_typeDefinitionSize823, &g_typeDefinitionSize824, &g_typeDefinitionSize825, &g_typeDefinitionSize826, &g_typeDefinitionSize827, &g_typeDefinitionSize828, &g_typeDefinitionSize829, &g_typeDefinitionSize830, &g_typeDefinitionSize831, &g_typeDefinitionSize832, &g_typeDefinitionSize833, &g_typeDefinitionSize834, &g_typeDefinitionSize835, &g_typeDefinitionSize836, &g_typeDefinitionSize837, &g_typeDefinitionSize838, &g_typeDefinitionSize839, &g_typeDefinitionSize840, &g_typeDefinitionSize841, &g_typeDefinitionSize842, &g_typeDefinitionSize843, &g_typeDefinitionSize844, &g_typeDefinitionSize845, &g_typeDefinitionSize846, &g_typeDefinitionSize847, &g_typeDefinitionSize848, &g_typeDefinitionSize849, &g_typeDefinitionSize850, &g_typeDefinitionSize851, &g_typeDefinitionSize852, &g_typeDefinitionSize853, &g_typeDefinitionSize854, &g_typeDefinitionSize855, &g_typeDefinitionSize856, &g_typeDefinitionSize857, &g_typeDefinitionSize858, &g_typeDefinitionSize859, &g_typeDefinitionSize860, &g_typeDefinitionSize861, &g_typeDefinitionSize862, &g_typeDefinitionSize863, &g_typeDefinitionSize864, &g_typeDefinitionSize865, &g_typeDefinitionSize866, &g_typeDefinitionSize867, &g_typeDefinitionSize868, &g_typeDefinitionSize869, &g_typeDefinitionSize870, &g_typeDefinitionSize871, &g_typeDefinitionSize872, &g_typeDefinitionSize873, &g_typeDefinitionSize874, &g_typeDefinitionSize875, &g_typeDefinitionSize876, &g_typeDefinitionSize877, &g_typeDefinitionSize878, &g_typeDefinitionSize879, &g_typeDefinitionSize880, &g_typeDefinitionSize881, &g_typeDefinitionSize882, &g_typeDefinitionSize883, &g_typeDefinitionSize884, &g_typeDefinitionSize885, &g_typeDefinitionSize886, &g_typeDefinitionSize887, &g_typeDefinitionSize888, &g_typeDefinitionSize889, &g_typeDefinitionSize890, &g_typeDefinitionSize891, &g_typeDefinitionSize892, &g_typeDefinitionSize893, &g_typeDefinitionSize894, &g_typeDefinitionSize895, &g_typeDefinitionSize896, &g_typeDefinitionSize897, &g_typeDefinitionSize898, &g_typeDefinitionSize899, &g_typeDefinitionSize900, &g_typeDefinitionSize901, &g_typeDefinitionSize902, &g_typeDefinitionSize903, &g_typeDefinitionSize904, &g_typeDefinitionSize905, &g_typeDefinitionSize906, &g_typeDefinitionSize907, &g_typeDefinitionSize908, &g_typeDefinitionSize909, &g_typeDefinitionSize910, &g_typeDefinitionSize911, &g_typeDefinitionSize912, &g_typeDefinitionSize913, &g_typeDefinitionSize914, &g_typeDefinitionSize915, &g_typeDefinitionSize916, &g_typeDefinitionSize917, &g_typeDefinitionSize918, &g_typeDefinitionSize919, &g_typeDefinitionSize920, &g_typeDefinitionSize921, &g_typeDefinitionSize922, &g_typeDefinitionSize923, &g_typeDefinitionSize924, &g_typeDefinitionSize925, &g_typeDefinitionSize926, &g_typeDefinitionSize927, &g_typeDefinitionSize928, &g_typeDefinitionSize929, &g_typeDefinitionSize930, &g_typeDefinitionSize931, &g_typeDefinitionSize932, &g_typeDefinitionSize933, &g_typeDefinitionSize934, &g_typeDefinitionSize935, &g_typeDefinitionSize936, &g_typeDefinitionSize937, &g_typeDefinitionSize938, &g_typeDefinitionSize939, &g_typeDefinitionSize940, &g_typeDefinitionSize941, &g_typeDefinitionSize942, &g_typeDefinitionSize943, &g_typeDefinitionSize944, &g_typeDefinitionSize945, &g_typeDefinitionSize946, &g_typeDefinitionSize947, &g_typeDefinitionSize948, &g_typeDefinitionSize949, &g_typeDefinitionSize950, &g_typeDefinitionSize951, &g_typeDefinitionSize952, &g_typeDefinitionSize953, &g_typeDefinitionSize954, &g_typeDefinitionSize955, &g_typeDefinitionSize956, &g_typeDefinitionSize957, &g_typeDefinitionSize958, &g_typeDefinitionSize959, &g_typeDefinitionSize960, &g_typeDefinitionSize961, &g_typeDefinitionSize962, &g_typeDefinitionSize963, &g_typeDefinitionSize964, &g_typeDefinitionSize965, &g_typeDefinitionSize966, &g_typeDefinitionSize967, &g_typeDefinitionSize968, &g_typeDefinitionSize969, &g_typeDefinitionSize970, &g_typeDefinitionSize971, &g_typeDefinitionSize972, &g_typeDefinitionSize973, &g_typeDefinitionSize974, &g_typeDefinitionSize975, &g_typeDefinitionSize976, &g_typeDefinitionSize977, &g_typeDefinitionSize978, &g_typeDefinitionSize979, &g_typeDefinitionSize980, &g_typeDefinitionSize981, &g_typeDefinitionSize982, &g_typeDefinitionSize983, &g_typeDefinitionSize984, &g_typeDefinitionSize985, &g_typeDefinitionSize986, &g_typeDefinitionSize987, &g_typeDefinitionSize988, &g_typeDefinitionSize989, &g_typeDefinitionSize990, &g_typeDefinitionSize991, &g_typeDefinitionSize992, &g_typeDefinitionSize993, &g_typeDefinitionSize994, &g_typeDefinitionSize995, &g_typeDefinitionSize996, &g_typeDefinitionSize997, &g_typeDefinitionSize998, &g_typeDefinitionSize999, &g_typeDefinitionSize1000, &g_typeDefinitionSize1001, &g_typeDefinitionSize1002, &g_typeDefinitionSize1003, &g_typeDefinitionSize1004, &g_typeDefinitionSize1005, &g_typeDefinitionSize1006, &g_typeDefinitionSize1007, &g_typeDefinitionSize1008, &g_typeDefinitionSize1009, &g_typeDefinitionSize1010, &g_typeDefinitionSize1011, &g_typeDefinitionSize1012, &g_typeDefinitionSize1013, &g_typeDefinitionSize1014, &g_typeDefinitionSize1015, &g_typeDefinitionSize1016, &g_typeDefinitionSize1017, &g_typeDefinitionSize1018, &g_typeDefinitionSize1019, &g_typeDefinitionSize1020, &g_typeDefinitionSize1021, &g_typeDefinitionSize1022, &g_typeDefinitionSize1023, &g_typeDefinitionSize1024, &g_typeDefinitionSize1025, &g_typeDefinitionSize1026, &g_typeDefinitionSize1027, &g_typeDefinitionSize1028, &g_typeDefinitionSize1029, &g_typeDefinitionSize1030, &g_typeDefinitionSize1031, &g_typeDefinitionSize1032, &g_typeDefinitionSize1033, &g_typeDefinitionSize1034, &g_typeDefinitionSize1035, &g_typeDefinitionSize1036, &g_typeDefinitionSize1037, &g_typeDefinitionSize1038, &g_typeDefinitionSize1039, &g_typeDefinitionSize1040, &g_typeDefinitionSize1041, &g_typeDefinitionSize1042, &g_typeDefinitionSize1043, &g_typeDefinitionSize1044, &g_typeDefinitionSize1045, &g_typeDefinitionSize1046, &g_typeDefinitionSize1047, &g_typeDefinitionSize1048, &g_typeDefinitionSize1049, &g_typeDefinitionSize1050, &g_typeDefinitionSize1051, &g_typeDefinitionSize1052, &g_typeDefinitionSize1053, &g_typeDefinitionSize1054, &g_typeDefinitionSize1055, &g_typeDefinitionSize1056, &g_typeDefinitionSize1057, &g_typeDefinitionSize1058, &g_typeDefinitionSize1059, &g_typeDefinitionSize1060, &g_typeDefinitionSize1061, &g_typeDefinitionSize1062, &g_typeDefinitionSize1063, &g_typeDefinitionSize1064, &g_typeDefinitionSize1065, &g_typeDefinitionSize1066, &g_typeDefinitionSize1067, &g_typeDefinitionSize1068, &g_typeDefinitionSize1069, &g_typeDefinitionSize1070, &g_typeDefinitionSize1071, &g_typeDefinitionSize1072, &g_typeDefinitionSize1073, &g_typeDefinitionSize1074, &g_typeDefinitionSize1075, &g_typeDefinitionSize1076, &g_typeDefinitionSize1077, &g_typeDefinitionSize1078, &g_typeDefinitionSize1079, &g_typeDefinitionSize1080, &g_typeDefinitionSize1081, &g_typeDefinitionSize1082, &g_typeDefinitionSize1083, &g_typeDefinitionSize1084, &g_typeDefinitionSize1085, &g_typeDefinitionSize1086, &g_typeDefinitionSize1087, &g_typeDefinitionSize1088, &g_typeDefinitionSize1089, &g_typeDefinitionSize1090, &g_typeDefinitionSize1091, &g_typeDefinitionSize1092, &g_typeDefinitionSize1093, &g_typeDefinitionSize1094, &g_typeDefinitionSize1095, &g_typeDefinitionSize1096, &g_typeDefinitionSize1097, &g_typeDefinitionSize1098, &g_typeDefinitionSize1099, &g_typeDefinitionSize1100, &g_typeDefinitionSize1101, &g_typeDefinitionSize1102, &g_typeDefinitionSize1103, &g_typeDefinitionSize1104, &g_typeDefinitionSize1105, &g_typeDefinitionSize1106, &g_typeDefinitionSize1107, &g_typeDefinitionSize1108, &g_typeDefinitionSize1109, &g_typeDefinitionSize1110, &g_typeDefinitionSize1111, &g_typeDefinitionSize1112, &g_typeDefinitionSize1113, &g_typeDefinitionSize1114, &g_typeDefinitionSize1115, &g_typeDefinitionSize1116, &g_typeDefinitionSize1117, &g_typeDefinitionSize1118, &g_typeDefinitionSize1119, &g_typeDefinitionSize1120, &g_typeDefinitionSize1121, &g_typeDefinitionSize1122, &g_typeDefinitionSize1123, &g_typeDefinitionSize1124, &g_typeDefinitionSize1125, &g_typeDefinitionSize1126, &g_typeDefinitionSize1127, &g_typeDefinitionSize1128, &g_typeDefinitionSize1129, &g_typeDefinitionSize1130, &g_typeDefinitionSize1131, &g_typeDefinitionSize1132, &g_typeDefinitionSize1133, &g_typeDefinitionSize1134, &g_typeDefinitionSize1135, &g_typeDefinitionSize1136, &g_typeDefinitionSize1137, &g_typeDefinitionSize1138, &g_typeDefinitionSize1139, &g_typeDefinitionSize1140, &g_typeDefinitionSize1141, &g_typeDefinitionSize1142, &g_typeDefinitionSize1143, &g_typeDefinitionSize1144, &g_typeDefinitionSize1145, &g_typeDefinitionSize1146, &g_typeDefinitionSize1147, &g_typeDefinitionSize1148, &g_typeDefinitionSize1149, &g_typeDefinitionSize1150, &g_typeDefinitionSize1151, &g_typeDefinitionSize1152, &g_typeDefinitionSize1153, &g_typeDefinitionSize1154, &g_typeDefinitionSize1155, &g_typeDefinitionSize1156, &g_typeDefinitionSize1157, &g_typeDefinitionSize1158, &g_typeDefinitionSize1159, &g_typeDefinitionSize1160, &g_typeDefinitionSize1161, &g_typeDefinitionSize1162, &g_typeDefinitionSize1163, &g_typeDefinitionSize1164, &g_typeDefinitionSize1165, &g_typeDefinitionSize1166, &g_typeDefinitionSize1167, &g_typeDefinitionSize1168, &g_typeDefinitionSize1169, &g_typeDefinitionSize1170, &g_typeDefinitionSize1171, &g_typeDefinitionSize1172, &g_typeDefinitionSize1173, &g_typeDefinitionSize1174, &g_typeDefinitionSize1175, &g_typeDefinitionSize1176, &g_typeDefinitionSize1177, &g_typeDefinitionSize1178, &g_typeDefinitionSize1179, &g_typeDefinitionSize1180, &g_typeDefinitionSize1181, &g_typeDefinitionSize1182, &g_typeDefinitionSize1183, &g_typeDefinitionSize1184, &g_typeDefinitionSize1185, &g_typeDefinitionSize1186, &g_typeDefinitionSize1187, &g_typeDefinitionSize1188, &g_typeDefinitionSize1189, &g_typeDefinitionSize1190, &g_typeDefinitionSize1191, &g_typeDefinitionSize1192, &g_typeDefinitionSize1193, &g_typeDefinitionSize1194, &g_typeDefinitionSize1195, &g_typeDefinitionSize1196, &g_typeDefinitionSize1197, &g_typeDefinitionSize1198, &g_typeDefinitionSize1199, &g_typeDefinitionSize1200, &g_typeDefinitionSize1201, &g_typeDefinitionSize1202, &g_typeDefinitionSize1203, &g_typeDefinitionSize1204, &g_typeDefinitionSize1205, &g_typeDefinitionSize1206, &g_typeDefinitionSize1207, &g_typeDefinitionSize1208, &g_typeDefinitionSize1209, &g_typeDefinitionSize1210, &g_typeDefinitionSize1211, &g_typeDefinitionSize1212, &g_typeDefinitionSize1213, &g_typeDefinitionSize1214, &g_typeDefinitionSize1215, &g_typeDefinitionSize1216, &g_typeDefinitionSize1217, &g_typeDefinitionSize1218, &g_typeDefinitionSize1219, &g_typeDefinitionSize1220, &g_typeDefinitionSize1221, &g_typeDefinitionSize1222, &g_typeDefinitionSize1223, &g_typeDefinitionSize1224, &g_typeDefinitionSize1225, &g_typeDefinitionSize1226, &g_typeDefinitionSize1227, &g_typeDefinitionSize1228, &g_typeDefinitionSize1229, &g_typeDefinitionSize1230, &g_typeDefinitionSize1231, &g_typeDefinitionSize1232, &g_typeDefinitionSize1233, &g_typeDefinitionSize1234, &g_typeDefinitionSize1235, &g_typeDefinitionSize1236, &g_typeDefinitionSize1237, &g_typeDefinitionSize1238, &g_typeDefinitionSize1239, &g_typeDefinitionSize1240, &g_typeDefinitionSize1241, &g_typeDefinitionSize1242, &g_typeDefinitionSize1243, &g_typeDefinitionSize1244, &g_typeDefinitionSize1245, &g_typeDefinitionSize1246, &g_typeDefinitionSize1247, &g_typeDefinitionSize1248, &g_typeDefinitionSize1249, &g_typeDefinitionSize1250, &g_typeDefinitionSize1251, &g_typeDefinitionSize1252, &g_typeDefinitionSize1253, &g_typeDefinitionSize1254, &g_typeDefinitionSize1255, &g_typeDefinitionSize1256, &g_typeDefinitionSize1257, &g_typeDefinitionSize1258, &g_typeDefinitionSize1259, &g_typeDefinitionSize1260, &g_typeDefinitionSize1261, &g_typeDefinitionSize1262, &g_typeDefinitionSize1263, &g_typeDefinitionSize1264, &g_typeDefinitionSize1265, &g_typeDefinitionSize1266, &g_typeDefinitionSize1267, &g_typeDefinitionSize1268, &g_typeDefinitionSize1269, &g_typeDefinitionSize1270, &g_typeDefinitionSize1271, &g_typeDefinitionSize1272, &g_typeDefinitionSize1273, &g_typeDefinitionSize1274, &g_typeDefinitionSize1275, &g_typeDefinitionSize1276, &g_typeDefinitionSize1277, &g_typeDefinitionSize1278, &g_typeDefinitionSize1279, &g_typeDefinitionSize1280, &g_typeDefinitionSize1281, &g_typeDefinitionSize1282, &g_typeDefinitionSize1283, &g_typeDefinitionSize1284, &g_typeDefinitionSize1285, &g_typeDefinitionSize1286, &g_typeDefinitionSize1287, &g_typeDefinitionSize1288, &g_typeDefinitionSize1289, &g_typeDefinitionSize1290, &g_typeDefinitionSize1291, &g_typeDefinitionSize1292, &g_typeDefinitionSize1293, &g_typeDefinitionSize1294, &g_typeDefinitionSize1295, &g_typeDefinitionSize1296, &g_typeDefinitionSize1297, &g_typeDefinitionSize1298, &g_typeDefinitionSize1299, &g_typeDefinitionSize1300, &g_typeDefinitionSize1301, &g_typeDefinitionSize1302, &g_typeDefinitionSize1303, &g_typeDefinitionSize1304, &g_typeDefinitionSize1305, &g_typeDefinitionSize1306, &g_typeDefinitionSize1307, &g_typeDefinitionSize1308, &g_typeDefinitionSize1309, &g_typeDefinitionSize1310, &g_typeDefinitionSize1311, &g_typeDefinitionSize1312, &g_typeDefinitionSize1313, &g_typeDefinitionSize1314, &g_typeDefinitionSize1315, &g_typeDefinitionSize1316, &g_typeDefinitionSize1317, &g_typeDefinitionSize1318, &g_typeDefinitionSize1319, &g_typeDefinitionSize1320, &g_typeDefinitionSize1321, &g_typeDefinitionSize1322, &g_typeDefinitionSize1323, &g_typeDefinitionSize1324, &g_typeDefinitionSize1325, &g_typeDefinitionSize1326, &g_typeDefinitionSize1327, &g_typeDefinitionSize1328, &g_typeDefinitionSize1329, &g_typeDefinitionSize1330, &g_typeDefinitionSize1331, &g_typeDefinitionSize1332, &g_typeDefinitionSize1333, &g_typeDefinitionSize1334, &g_typeDefinitionSize1335, &g_typeDefinitionSize1336, &g_typeDefinitionSize1337, &g_typeDefinitionSize1338, &g_typeDefinitionSize1339, &g_typeDefinitionSize1340, &g_typeDefinitionSize1341, &g_typeDefinitionSize1342, &g_typeDefinitionSize1343, &g_typeDefinitionSize1344, &g_typeDefinitionSize1345, &g_typeDefinitionSize1346, &g_typeDefinitionSize1347, &g_typeDefinitionSize1348, &g_typeDefinitionSize1349, &g_typeDefinitionSize1350, &g_typeDefinitionSize1351, &g_typeDefinitionSize1352, &g_typeDefinitionSize1353, &g_typeDefinitionSize1354, &g_typeDefinitionSize1355, &g_typeDefinitionSize1356, &g_typeDefinitionSize1357, &g_typeDefinitionSize1358, &g_typeDefinitionSize1359, &g_typeDefinitionSize1360, &g_typeDefinitionSize1361, &g_typeDefinitionSize1362, &g_typeDefinitionSize1363, &g_typeDefinitionSize1364, &g_typeDefinitionSize1365, &g_typeDefinitionSize1366, &g_typeDefinitionSize1367, &g_typeDefinitionSize1368, &g_typeDefinitionSize1369, &g_typeDefinitionSize1370, &g_typeDefinitionSize1371, &g_typeDefinitionSize1372, &g_typeDefinitionSize1373, &g_typeDefinitionSize1374, &g_typeDefinitionSize1375, &g_typeDefinitionSize1376, &g_typeDefinitionSize1377, &g_typeDefinitionSize1378, &g_typeDefinitionSize1379, &g_typeDefinitionSize1380, &g_typeDefinitionSize1381, &g_typeDefinitionSize1382, &g_typeDefinitionSize1383, &g_typeDefinitionSize1384, &g_typeDefinitionSize1385, &g_typeDefinitionSize1386, &g_typeDefinitionSize1387, &g_typeDefinitionSize1388, &g_typeDefinitionSize1389, &g_typeDefinitionSize1390, &g_typeDefinitionSize1391, &g_typeDefinitionSize1392, &g_typeDefinitionSize1393, &g_typeDefinitionSize1394, &g_typeDefinitionSize1395, &g_typeDefinitionSize1396, &g_typeDefinitionSize1397, &g_typeDefinitionSize1398, &g_typeDefinitionSize1399, &g_typeDefinitionSize1400, &g_typeDefinitionSize1401, &g_typeDefinitionSize1402, &g_typeDefinitionSize1403, &g_typeDefinitionSize1404, &g_typeDefinitionSize1405, &g_typeDefinitionSize1406, &g_typeDefinitionSize1407, &g_typeDefinitionSize1408, &g_typeDefinitionSize1409, &g_typeDefinitionSize1410, &g_typeDefinitionSize1411, &g_typeDefinitionSize1412, &g_typeDefinitionSize1413, &g_typeDefinitionSize1414, &g_typeDefinitionSize1415, &g_typeDefinitionSize1416, &g_typeDefinitionSize1417, &g_typeDefinitionSize1418, &g_typeDefinitionSize1419, &g_typeDefinitionSize1420, &g_typeDefinitionSize1421, &g_typeDefinitionSize1422, &g_typeDefinitionSize1423, &g_typeDefinitionSize1424, &g_typeDefinitionSize1425, &g_typeDefinitionSize1426, &g_typeDefinitionSize1427, &g_typeDefinitionSize1428, &g_typeDefinitionSize1429, &g_typeDefinitionSize1430, &g_typeDefinitionSize1431, &g_typeDefinitionSize1432, &g_typeDefinitionSize1433, &g_typeDefinitionSize1434, &g_typeDefinitionSize1435, &g_typeDefinitionSize1436, &g_typeDefinitionSize1437, &g_typeDefinitionSize1438, &g_typeDefinitionSize1439, &g_typeDefinitionSize1440, &g_typeDefinitionSize1441, &g_typeDefinitionSize1442, &g_typeDefinitionSize1443, &g_typeDefinitionSize1444, &g_typeDefinitionSize1445, &g_typeDefinitionSize1446, &g_typeDefinitionSize1447, &g_typeDefinitionSize1448, &g_typeDefinitionSize1449, &g_typeDefinitionSize1450, &g_typeDefinitionSize1451, &g_typeDefinitionSize1452, &g_typeDefinitionSize1453, &g_typeDefinitionSize1454, &g_typeDefinitionSize1455, &g_typeDefinitionSize1456, &g_typeDefinitionSize1457, &g_typeDefinitionSize1458, &g_typeDefinitionSize1459, &g_typeDefinitionSize1460, &g_typeDefinitionSize1461, &g_typeDefinitionSize1462, &g_typeDefinitionSize1463, &g_typeDefinitionSize1464, &g_typeDefinitionSize1465, &g_typeDefinitionSize1466, &g_typeDefinitionSize1467, &g_typeDefinitionSize1468, &g_typeDefinitionSize1469, &g_typeDefinitionSize1470, &g_typeDefinitionSize1471, &g_typeDefinitionSize1472, &g_typeDefinitionSize1473, &g_typeDefinitionSize1474, &g_typeDefinitionSize1475, &g_typeDefinitionSize1476, &g_typeDefinitionSize1477, &g_typeDefinitionSize1478, &g_typeDefinitionSize1479, &g_typeDefinitionSize1480, &g_typeDefinitionSize1481, &g_typeDefinitionSize1482, &g_typeDefinitionSize1483, &g_typeDefinitionSize1484, &g_typeDefinitionSize1485, &g_typeDefinitionSize1486, &g_typeDefinitionSize1487, &g_typeDefinitionSize1488, &g_typeDefinitionSize1489, &g_typeDefinitionSize1490, &g_typeDefinitionSize1491, &g_typeDefinitionSize1492, &g_typeDefinitionSize1493, &g_typeDefinitionSize1494, &g_typeDefinitionSize1495, &g_typeDefinitionSize1496, &g_typeDefinitionSize1497, &g_typeDefinitionSize1498, &g_typeDefinitionSize1499, &g_typeDefinitionSize1500, &g_typeDefinitionSize1501, &g_typeDefinitionSize1502, &g_typeDefinitionSize1503, &g_typeDefinitionSize1504, &g_typeDefinitionSize1505, &g_typeDefinitionSize1506, &g_typeDefinitionSize1507, &g_typeDefinitionSize1508, &g_typeDefinitionSize1509, &g_typeDefinitionSize1510, &g_typeDefinitionSize1511, &g_typeDefinitionSize1512, &g_typeDefinitionSize1513, &g_typeDefinitionSize1514, &g_typeDefinitionSize1515, &g_typeDefinitionSize1516, &g_typeDefinitionSize1517, &g_typeDefinitionSize1518, &g_typeDefinitionSize1519, &g_typeDefinitionSize1520, &g_typeDefinitionSize1521, &g_typeDefinitionSize1522, &g_typeDefinitionSize1523, &g_typeDefinitionSize1524, &g_typeDefinitionSize1525, &g_typeDefinitionSize1526, &g_typeDefinitionSize1527, &g_typeDefinitionSize1528, &g_typeDefinitionSize1529, &g_typeDefinitionSize1530, &g_typeDefinitionSize1531, &g_typeDefinitionSize1532, &g_typeDefinitionSize1533, &g_typeDefinitionSize1534, &g_typeDefinitionSize1535, &g_typeDefinitionSize1536, &g_typeDefinitionSize1537, &g_typeDefinitionSize1538, &g_typeDefinitionSize1539, &g_typeDefinitionSize1540, &g_typeDefinitionSize1541, &g_typeDefinitionSize1542, &g_typeDefinitionSize1543, &g_typeDefinitionSize1544, &g_typeDefinitionSize1545, &g_typeDefinitionSize1546, &g_typeDefinitionSize1547, &g_typeDefinitionSize1548, &g_typeDefinitionSize1549, &g_typeDefinitionSize1550, &g_typeDefinitionSize1551, &g_typeDefinitionSize1552, &g_typeDefinitionSize1553, &g_typeDefinitionSize1554, &g_typeDefinitionSize1555, &g_typeDefinitionSize1556, &g_typeDefinitionSize1557, &g_typeDefinitionSize1558, &g_typeDefinitionSize1559, &g_typeDefinitionSize1560, &g_typeDefinitionSize1561, &g_typeDefinitionSize1562, &g_typeDefinitionSize1563, &g_typeDefinitionSize1564, &g_typeDefinitionSize1565, &g_typeDefinitionSize1566, &g_typeDefinitionSize1567, &g_typeDefinitionSize1568, &g_typeDefinitionSize1569, &g_typeDefinitionSize1570, &g_typeDefinitionSize1571, &g_typeDefinitionSize1572, &g_typeDefinitionSize1573, &g_typeDefinitionSize1574, &g_typeDefinitionSize1575, &g_typeDefinitionSize1576, &g_typeDefinitionSize1577, &g_typeDefinitionSize1578, &g_typeDefinitionSize1579, &g_typeDefinitionSize1580, &g_typeDefinitionSize1581, &g_typeDefinitionSize1582, &g_typeDefinitionSize1583, &g_typeDefinitionSize1584, &g_typeDefinitionSize1585, &g_typeDefinitionSize1586, &g_typeDefinitionSize1587, &g_typeDefinitionSize1588, &g_typeDefinitionSize1589, &g_typeDefinitionSize1590, &g_typeDefinitionSize1591, &g_typeDefinitionSize1592, &g_typeDefinitionSize1593, &g_typeDefinitionSize1594, &g_typeDefinitionSize1595, &g_typeDefinitionSize1596, &g_typeDefinitionSize1597, &g_typeDefinitionSize1598, &g_typeDefinitionSize1599, &g_typeDefinitionSize1600, &g_typeDefinitionSize1601, &g_typeDefinitionSize1602, &g_typeDefinitionSize1603, &g_typeDefinitionSize1604, &g_typeDefinitionSize1605, &g_typeDefinitionSize1606, &g_typeDefinitionSize1607, &g_typeDefinitionSize1608, &g_typeDefinitionSize1609, &g_typeDefinitionSize1610, &g_typeDefinitionSize1611, &g_typeDefinitionSize1612, &g_typeDefinitionSize1613, &g_typeDefinitionSize1614, &g_typeDefinitionSize1615, &g_typeDefinitionSize1616, &g_typeDefinitionSize1617, &g_typeDefinitionSize1618, &g_typeDefinitionSize1619, &g_typeDefinitionSize1620, &g_typeDefinitionSize1621, &g_typeDefinitionSize1622, &g_typeDefinitionSize1623, &g_typeDefinitionSize1624, &g_typeDefinitionSize1625, &g_typeDefinitionSize1626, &g_typeDefinitionSize1627, &g_typeDefinitionSize1628, &g_typeDefinitionSize1629, &g_typeDefinitionSize1630, &g_typeDefinitionSize1631, &g_typeDefinitionSize1632, &g_typeDefinitionSize1633, &g_typeDefinitionSize1634, &g_typeDefinitionSize1635, &g_typeDefinitionSize1636, &g_typeDefinitionSize1637, &g_typeDefinitionSize1638, &g_typeDefinitionSize1639, &g_typeDefinitionSize1640, &g_typeDefinitionSize1641, &g_typeDefinitionSize1642, &g_typeDefinitionSize1643, &g_typeDefinitionSize1644, &g_typeDefinitionSize1645, &g_typeDefinitionSize1646, &g_typeDefinitionSize1647, &g_typeDefinitionSize1648, &g_typeDefinitionSize1649, &g_typeDefinitionSize1650, &g_typeDefinitionSize1651, &g_typeDefinitionSize1652, &g_typeDefinitionSize1653, &g_typeDefinitionSize1654, &g_typeDefinitionSize1655, &g_typeDefinitionSize1656, &g_typeDefinitionSize1657, &g_typeDefinitionSize1658, &g_typeDefinitionSize1659, &g_typeDefinitionSize1660, &g_typeDefinitionSize1661, &g_typeDefinitionSize1662, &g_typeDefinitionSize1663, &g_typeDefinitionSize1664, &g_typeDefinitionSize1665, &g_typeDefinitionSize1666, &g_typeDefinitionSize1667, &g_typeDefinitionSize1668, &g_typeDefinitionSize1669, &g_typeDefinitionSize1670, &g_typeDefinitionSize1671, &g_typeDefinitionSize1672, &g_typeDefinitionSize1673, &g_typeDefinitionSize1674, &g_typeDefinitionSize1675, &g_typeDefinitionSize1676, &g_typeDefinitionSize1677, &g_typeDefinitionSize1678, &g_typeDefinitionSize1679, &g_typeDefinitionSize1680, &g_typeDefinitionSize1681, &g_typeDefinitionSize1682, &g_typeDefinitionSize1683, &g_typeDefinitionSize1684, &g_typeDefinitionSize1685, &g_typeDefinitionSize1686, &g_typeDefinitionSize1687, &g_typeDefinitionSize1688, &g_typeDefinitionSize1689, &g_typeDefinitionSize1690, &g_typeDefinitionSize1691, &g_typeDefinitionSize1692, &g_typeDefinitionSize1693, &g_typeDefinitionSize1694, &g_typeDefinitionSize1695, &g_typeDefinitionSize1696, &g_typeDefinitionSize1697, &g_typeDefinitionSize1698, &g_typeDefinitionSize1699, &g_typeDefinitionSize1700, &g_typeDefinitionSize1701, &g_typeDefinitionSize1702, &g_typeDefinitionSize1703, &g_typeDefinitionSize1704, &g_typeDefinitionSize1705, &g_typeDefinitionSize1706, &g_typeDefinitionSize1707, &g_typeDefinitionSize1708, &g_typeDefinitionSize1709, &g_typeDefinitionSize1710, &g_typeDefinitionSize1711, &g_typeDefinitionSize1712, &g_typeDefinitionSize1713, &g_typeDefinitionSize1714, &g_typeDefinitionSize1715, &g_typeDefinitionSize1716, &g_typeDefinitionSize1717, &g_typeDefinitionSize1718, &g_typeDefinitionSize1719, &g_typeDefinitionSize1720, &g_typeDefinitionSize1721, &g_typeDefinitionSize1722, &g_typeDefinitionSize1723, &g_typeDefinitionSize1724, &g_typeDefinitionSize1725, &g_typeDefinitionSize1726, &g_typeDefinitionSize1727, &g_typeDefinitionSize1728, &g_typeDefinitionSize1729, &g_typeDefinitionSize1730, &g_typeDefinitionSize1731, &g_typeDefinitionSize1732, &g_typeDefinitionSize1733, &g_typeDefinitionSize1734, &g_typeDefinitionSize1735, &g_typeDefinitionSize1736, &g_typeDefinitionSize1737, &g_typeDefinitionSize1738, &g_typeDefinitionSize1739, &g_typeDefinitionSize1740, &g_typeDefinitionSize1741, &g_typeDefinitionSize1742, &g_typeDefinitionSize1743, &g_typeDefinitionSize1744, &g_typeDefinitionSize1745, &g_typeDefinitionSize1746, &g_typeDefinitionSize1747, &g_typeDefinitionSize1748, &g_typeDefinitionSize1749, &g_typeDefinitionSize1750, &g_typeDefinitionSize1751, &g_typeDefinitionSize1752, &g_typeDefinitionSize1753, &g_typeDefinitionSize1754, &g_typeDefinitionSize1755, &g_typeDefinitionSize1756, &g_typeDefinitionSize1757, &g_typeDefinitionSize1758, &g_typeDefinitionSize1759, &g_typeDefinitionSize1760, &g_typeDefinitionSize1761, &g_typeDefinitionSize1762, &g_typeDefinitionSize1763, &g_typeDefinitionSize1764, &g_typeDefinitionSize1765, &g_typeDefinitionSize1766, &g_typeDefinitionSize1767, &g_typeDefinitionSize1768, &g_typeDefinitionSize1769, &g_typeDefinitionSize1770, &g_typeDefinitionSize1771, &g_typeDefinitionSize1772, &g_typeDefinitionSize1773, &g_typeDefinitionSize1774, &g_typeDefinitionSize1775, &g_typeDefinitionSize1776, &g_typeDefinitionSize1777, &g_typeDefinitionSize1778, &g_typeDefinitionSize1779, &g_typeDefinitionSize1780, &g_typeDefinitionSize1781, &g_typeDefinitionSize1782, &g_typeDefinitionSize1783, &g_typeDefinitionSize1784, &g_typeDefinitionSize1785, &g_typeDefinitionSize1786, &g_typeDefinitionSize1787, &g_typeDefinitionSize1788, &g_typeDefinitionSize1789, &g_typeDefinitionSize1790, &g_typeDefinitionSize1791, &g_typeDefinitionSize1792, &g_typeDefinitionSize1793, &g_typeDefinitionSize1794, &g_typeDefinitionSize1795, &g_typeDefinitionSize1796, &g_typeDefinitionSize1797, &g_typeDefinitionSize1798, &g_typeDefinitionSize1799, &g_typeDefinitionSize1800, &g_typeDefinitionSize1801, &g_typeDefinitionSize1802, &g_typeDefinitionSize1803, &g_typeDefinitionSize1804, &g_typeDefinitionSize1805, &g_typeDefinitionSize1806, &g_typeDefinitionSize1807, &g_typeDefinitionSize1808, &g_typeDefinitionSize1809, &g_typeDefinitionSize1810, &g_typeDefinitionSize1811, &g_typeDefinitionSize1812, &g_typeDefinitionSize1813, &g_typeDefinitionSize1814, &g_typeDefinitionSize1815, &g_typeDefinitionSize1816, &g_typeDefinitionSize1817, &g_typeDefinitionSize1818, &g_typeDefinitionSize1819, &g_typeDefinitionSize1820, &g_typeDefinitionSize1821, &g_typeDefinitionSize1822, &g_typeDefinitionSize1823, &g_typeDefinitionSize1824, &g_typeDefinitionSize1825, &g_typeDefinitionSize1826, &g_typeDefinitionSize1827, &g_typeDefinitionSize1828, &g_typeDefinitionSize1829, &g_typeDefinitionSize1830, &g_typeDefinitionSize1831, &g_typeDefinitionSize1832, &g_typeDefinitionSize1833, &g_typeDefinitionSize1834, &g_typeDefinitionSize1835, &g_typeDefinitionSize1836, &g_typeDefinitionSize1837, &g_typeDefinitionSize1838, &g_typeDefinitionSize1839, &g_typeDefinitionSize1840, &g_typeDefinitionSize1841, &g_typeDefinitionSize1842, &g_typeDefinitionSize1843, &g_typeDefinitionSize1844, &g_typeDefinitionSize1845, &g_typeDefinitionSize1846, &g_typeDefinitionSize1847, &g_typeDefinitionSize1848, &g_typeDefinitionSize1849, &g_typeDefinitionSize1850, &g_typeDefinitionSize1851, &g_typeDefinitionSize1852, &g_typeDefinitionSize1853, &g_typeDefinitionSize1854, &g_typeDefinitionSize1855, &g_typeDefinitionSize1856, &g_typeDefinitionSize1857, &g_typeDefinitionSize1858, &g_typeDefinitionSize1859, &g_typeDefinitionSize1860, &g_typeDefinitionSize1861, &g_typeDefinitionSize1862, &g_typeDefinitionSize1863, &g_typeDefinitionSize1864, &g_typeDefinitionSize1865, &g_typeDefinitionSize1866, &g_typeDefinitionSize1867, &g_typeDefinitionSize1868, &g_typeDefinitionSize1869, &g_typeDefinitionSize1870, &g_typeDefinitionSize1871, &g_typeDefinitionSize1872, &g_typeDefinitionSize1873, &g_typeDefinitionSize1874, &g_typeDefinitionSize1875, &g_typeDefinitionSize1876, &g_typeDefinitionSize1877, &g_typeDefinitionSize1878, &g_typeDefinitionSize1879, &g_typeDefinitionSize1880, &g_typeDefinitionSize1881, &g_typeDefinitionSize1882, &g_typeDefinitionSize1883, &g_typeDefinitionSize1884, &g_typeDefinitionSize1885, &g_typeDefinitionSize1886, &g_typeDefinitionSize1887, &g_typeDefinitionSize1888, &g_typeDefinitionSize1889, &g_typeDefinitionSize1890, &g_typeDefinitionSize1891, &g_typeDefinitionSize1892, &g_typeDefinitionSize1893, &g_typeDefinitionSize1894, &g_typeDefinitionSize1895, &g_typeDefinitionSize1896, &g_typeDefinitionSize1897, &g_typeDefinitionSize1898, &g_typeDefinitionSize1899, &g_typeDefinitionSize1900, &g_typeDefinitionSize1901, &g_typeDefinitionSize1902, &g_typeDefinitionSize1903, &g_typeDefinitionSize1904, &g_typeDefinitionSize1905, &g_typeDefinitionSize1906, &g_typeDefinitionSize1907, &g_typeDefinitionSize1908, &g_typeDefinitionSize1909, &g_typeDefinitionSize1910, &g_typeDefinitionSize1911, &g_typeDefinitionSize1912, &g_typeDefinitionSize1913, &g_typeDefinitionSize1914, &g_typeDefinitionSize1915, &g_typeDefinitionSize1916, &g_typeDefinitionSize1917, &g_typeDefinitionSize1918, &g_typeDefinitionSize1919, &g_typeDefinitionSize1920, &g_typeDefinitionSize1921, &g_typeDefinitionSize1922, &g_typeDefinitionSize1923, &g_typeDefinitionSize1924, &g_typeDefinitionSize1925, &g_typeDefinitionSize1926, &g_typeDefinitionSize1927, &g_typeDefinitionSize1928, &g_typeDefinitionSize1929, &g_typeDefinitionSize1930, &g_typeDefinitionSize1931, &g_typeDefinitionSize1932, &g_typeDefinitionSize1933, &g_typeDefinitionSize1934, &g_typeDefinitionSize1935, &g_typeDefinitionSize1936, &g_typeDefinitionSize1937, &g_typeDefinitionSize1938, &g_typeDefinitionSize1939, &g_typeDefinitionSize1940, &g_typeDefinitionSize1941, &g_typeDefinitionSize1942, &g_typeDefinitionSize1943, &g_typeDefinitionSize1944, &g_typeDefinitionSize1945, &g_typeDefinitionSize1946, &g_typeDefinitionSize1947, &g_typeDefinitionSize1948, &g_typeDefinitionSize1949, &g_typeDefinitionSize1950, &g_typeDefinitionSize1951, &g_typeDefinitionSize1952, &g_typeDefinitionSize1953, &g_typeDefinitionSize1954, &g_typeDefinitionSize1955, &g_typeDefinitionSize1956, &g_typeDefinitionSize1957, &g_typeDefinitionSize1958, &g_typeDefinitionSize1959, &g_typeDefinitionSize1960, &g_typeDefinitionSize1961, &g_typeDefinitionSize1962, &g_typeDefinitionSize1963, &g_typeDefinitionSize1964, &g_typeDefinitionSize1965, &g_typeDefinitionSize1966, &g_typeDefinitionSize1967, &g_typeDefinitionSize1968, &g_typeDefinitionSize1969, &g_typeDefinitionSize1970, &g_typeDefinitionSize1971, &g_typeDefinitionSize1972, &g_typeDefinitionSize1973, &g_typeDefinitionSize1974, &g_typeDefinitionSize1975, &g_typeDefinitionSize1976, &g_typeDefinitionSize1977, &g_typeDefinitionSize1978, &g_typeDefinitionSize1979, &g_typeDefinitionSize1980, &g_typeDefinitionSize1981, &g_typeDefinitionSize1982, &g_typeDefinitionSize1983, &g_typeDefinitionSize1984, &g_typeDefinitionSize1985, &g_typeDefinitionSize1986, &g_typeDefinitionSize1987, &g_typeDefinitionSize1988, &g_typeDefinitionSize1989, &g_typeDefinitionSize1990, &g_typeDefinitionSize1991, &g_typeDefinitionSize1992, &g_typeDefinitionSize1993, &g_typeDefinitionSize1994, &g_typeDefinitionSize1995, &g_typeDefinitionSize1996, &g_typeDefinitionSize1997, &g_typeDefinitionSize1998, &g_typeDefinitionSize1999, &g_typeDefinitionSize2000, &g_typeDefinitionSize2001, &g_typeDefinitionSize2002, &g_typeDefinitionSize2003, &g_typeDefinitionSize2004, &g_typeDefinitionSize2005, &g_typeDefinitionSize2006, &g_typeDefinitionSize2007, &g_typeDefinitionSize2008, &g_typeDefinitionSize2009, &g_typeDefinitionSize2010, &g_typeDefinitionSize2011, &g_typeDefinitionSize2012, };
7849c44f6fa6029a4b415f85a09ba7a4bbf2ce5a
564dbf5400f2f26a71b74b0bcfeb36b0b1e3dd87
/src/gfx/SimpleBlockVisual.cpp
d5452885eaf60366a858b7d08ad0fcd773a238a6
[ "BSD-2-Clause" ]
permissive
matthewbot/Kube
a2818b0caa0ea1b921e4cadeef03a707227d3425
a2420bcbbeb1f94844b7d9d592b2fc883870820a
refs/heads/master
2020-05-15T21:54:59.649849
2014-03-23T02:02:59
2014-03-23T02:02:59
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,787
cpp
#include "SimpleBlockVisual.h" #include "BlockVisualRegistry.h" SimpleBlockVisual::SimpleBlockVisual(const SimpleBlockVisualInfo &info, TextureArrayBuilder &block_tex_builder) { for (Face f : all_faces) { face_texes[f] = block_tex_builder.addImage(info.face_tex_filenames[f]); } } void SimpleBlockVisual::tesselate(MeshBuilder &builder, const BlockVisualRegistry &visuals, const Chunk &chunk, const ChunkIndex &pos, const Block &block) const { const glm::vec3 bfl{pos.getVec()}; const glm::vec3 bfr = bfl + glm::vec3{1, 0, 0}; const glm::vec3 bbl = bfl + glm::vec3{0, 1, 0}; const glm::vec3 bbr = bfl + glm::vec3{1, 1, 0}; const glm::vec3 tfl = bfl + glm::vec3{0, 0, 1}; const glm::vec3 tfr = bfl + glm::vec3{1, 0, 1}; const glm::vec3 tbl = bfl + glm::vec3{0, 1, 1}; const glm::vec3 tbr = bfl + glm::vec3{1, 1, 1}; for (auto face : all_faces) { if (block.getType().solid) { auto adjpos = pos.adjacent(face); if (adjpos) { auto visualptr = visuals.getVisual(chunk.getBlock(adjpos).getType().id); if (visualptr && !visualptr->isTransparent()) { continue; } } } const auto texnum = face_texes[face]; const glm::vec3 tex_bl{0, 0, texnum}; const glm::vec3 tex_br{1, 0, texnum}; const glm::vec3 tex_tl{0, 1, texnum}; const glm::vec3 tex_tr{1, 1, texnum}; auto normal = static_cast<glm::vec3>(faceNormal(face)); MeshBuilder::Index a; MeshBuilder::Index b; switch (face) { case Face::RIGHT: builder.makeVert(bfr, normal, tex_bl); a = builder.makeVert(bbr, normal, tex_br); b = builder.makeVert(tfr, normal, tex_tl); builder.repeatVert(a); builder.makeVert(tbr, normal, tex_tr); builder.repeatVert(b); break; case Face::LEFT: builder.makeVert(bfl, normal, tex_br); a = builder.makeVert(tfl, normal, tex_tr); b = builder.makeVert(bbl, normal, tex_bl); builder.repeatVert(a); builder.makeVert(tbl, normal, tex_tl); builder.repeatVert(b); break; case Face::BACK: builder.makeVert(bbl, normal, tex_br); a = builder.makeVert(tbl, normal, tex_tr); b = builder.makeVert(bbr, normal, tex_bl); builder.repeatVert(a); builder.makeVert(tbr, normal, tex_tl); builder.repeatVert(b); break; case Face::FRONT: builder.makeVert(bfl, normal, tex_bl); a = builder.makeVert(bfr, normal, tex_br); b = builder.makeVert(tfl, normal, tex_tl); builder.repeatVert(a); builder.makeVert(tfr, normal, tex_tr); builder.repeatVert(b); break; case Face::TOP: builder.makeVert(tfl, normal, tex_bl); a = builder.makeVert(tfr, normal, tex_br); b = builder.makeVert(tbl, normal, tex_tl); builder.repeatVert(a); builder.makeVert(tbr, normal, tex_tr); builder.repeatVert(b); break; case Face::BOTTOM: builder.makeVert(bfl, normal, tex_tl); a = builder.makeVert(bbl, normal, tex_bl); b = builder.makeVert(bfr, normal, tex_tr); builder.repeatVert(a); builder.makeVert(bbr, normal, tex_br); builder.repeatVert(b); break; } } }
e3b4443359651db6dc6ca5cbd78ea86c68b52965
4e22d261d7dcf5fe2731d77ba3cfb47c5568977c
/Source/ComponentCore/Public/ComponentType.hpp
68315758044563aa7f61720475eae9af54a22502
[]
no_license
SeraphinaMJ/Reformed
2d7424d6d38d1cfaf8d385fade474a27c02103a5
8563d35ab2b80ca403b3b57ad80db1173504cf55
refs/heads/master
2023-04-06T00:40:34.223840
2021-05-06T11:25:51
2021-05-06T11:25:51
364,884,928
0
0
null
null
null
null
UTF-8
C++
false
false
3,608
hpp
/*!*************************************************************************************** \file ComponentType.hpp \author Aaron Damyen \date 5/17/2018 \copyright All content © 2018-2019 DigiPen (USA) Corporation, all rights reserved. \par Project: Boomerang \brief Definition of the componentType datatype. *****************************************************************************************/ #pragma once //========1st Party Includes============================================================// //========3rd Party Includes============================================================// #include <typeindex> #include <string> #include <ComponentRegistrar.hpp> ////////==========================================================================//////// //////// Definitions //////// ////////==========================================================================//////// /*!*************************************************************************************** \par type: componentType \brief Creates a component type that is actually just the reflection type_index. *****************************************************************************************/ //typedef std::type_index componentType; class componentType { public: template<typename T> static componentType forConcrete() { return componentType(typeid(T), componentRegistrar<T>::getID()); } template<typename T> static componentType forAbstract(); template<typename Tchild, typename Tparent> static componentType forInherited() { auto l_result = componentType(typeid(Tchild), componentRegistrar<Tchild>::getID()); l_result.parent_getType = &Tparent::getType; return l_result; } std::string name() const { return m_type.name(); } std::size_t hash_code() const { return m_type.hash_code(); } bool operator==(const componentType & p_other) const { return m_type == p_other.m_type; } bool operator<=(const componentType & p_other) const { return m_type == p_other.m_type || (p_other.hasParent() && *this <= p_other.getParentType()); } bool hasParent() const { return parent_getType != nullptr; } componentType const getParentType() const { return parent_getType(); } int getComponentID() const { return id; } private: componentType(std::type_index p_type, int id_) : m_type{ p_type }, parent_getType{ nullptr }, id(id_) {} std::type_index m_type; componentType const (*parent_getType)() = nullptr; int id; }; template <> componentType componentType::forAbstract<void>(); template<typename T> componentType componentType::forAbstract() { return componentType(typeid(T), componentRegistrar<T>::getID()); } namespace std { /*!************************************************************************************* \par struct: hash<componentType> \brief Implementation of the has<componentType> template specialization so the componentType class can be used as an STL container key value type. ***************************************************************************************/ template<> struct hash<componentType> { /*!*************************************************************************************** \brief Executes the hash value calculation. \param p_key - The set to calculate the hash value for. \return std::size_t - The calculated hash value. *****************************************************************************************/ std::size_t operator()(const componentType & p_key) const { return p_key.hash_code(); } }; } // namespace std
dfc6d095c86c2483b40539631f453d96e09a5260
6f07e8bec80afaf0bbab07ef22a9eeaf7192f109
/Level1_5/1271.cpp
71b6ae338bef13bbbf5f078499724365cfc38e79
[]
no_license
face4/yukicoder
e525eb1d7e7ef987d4aaefcd32e9701ea4e41cff
2a3f9b9fb7ae4fe3ab96f698f1ead117714fe3ee
refs/heads/master
2021-06-03T03:33:41.935236
2020-12-06T06:09:11
2020-12-06T06:09:11
130,208,436
0
0
null
null
null
null
UTF-8
C++
false
false
367
cpp
#include<iostream> #include<iomanip> #include<cmath> using namespace std; int main(){ cout << fixed << setprecision(12); int k; cin >> k; if(k == 0){ const double PI = acos(0.0)*2.0; cout << PI*PI/6 << endl; return 0; } double d = 0; for(int i = 1; i <= k; i++) d += 1.0/i; cout << d/k << endl; return 0; }
f3c0839e207f7eee4cfcb870028bb744009545c2
51d2fe10eaf970e69b2bf84731727b259cc39e8e
/CPP VW/CPP VW/Sheep.cpp
e439409b53c3f48b0d5a7538f748b80e5546adfe
[]
no_license
zwojak/Virtual-World
2b77f8bf77928154be4ac3f9c5810686074cce65
4535dbdfce535a36b40485c1808b328dcd6bd3b8
refs/heads/master
2023-04-30T01:24:53.022685
2021-05-03T22:32:50
2021-05-03T22:32:50
null
0
0
null
null
null
null
UTF-8
C++
false
false
310
cpp
#include "Sheep.h" #include "World.h" Sheep::Sheep(World& worldref, int x, int y) : Animal(worldref, x, y) { this->power = 4; this->initiative = 4; this->sign = 'S'; } Sheep::~Sheep() {} bool Sheep::specialCollision(Organism* other) { return false; } bool Sheep::specialAction() { return false; }
bd4c92052fecb71e5032f5aafbaeee460196d280
e80750e64f5220fca7497d84a2cb116d29ff811f
/Automaton.cpp
0949cf0ae67a41c475ba8f2c5d5c5e3fae6aec09
[]
no_license
project4Tmura/project4
5519da262dcdc22e53adbc82086d0edbaf0714d5
bbf6828a7dffa742fc48ee13cc022ad013c1d8a0
refs/heads/master
2020-09-19T18:42:43.601787
2020-01-28T18:28:07
2020-01-28T18:28:07
224,266,545
0
0
null
2020-01-28T18:09:14
2019-11-26T19:08:48
C++
UTF-8
C++
false
false
3,584
cpp
#include "Automaton.h" #include <queue> Automaton::Automaton(char** arr, int length) { buildAutomat(arr, length); } // Builds the outomat. // arr - array of known errors. The index of each keyword is important: // "out[state] & (1 << i)" is > 0 if we just found word[i] // in the text. // Returns the number of states that the built machine has. // States are numbered 0 up to the return value - 1, inclusive. int Automaton::buildAutomat(char** arr, int k) { // Initialize all values in output function as 0. memset(out, 0, sizeof out); // Initialize all values in goto function as -1. memset(g, -1, sizeof g); // Initially, we just have the 0 state int states = 1; // Construct values for goto function, i.e., fill g[][] // This is same as building a Trie for arr[] for (int i = 0; i < k; ++i) { const string& word = arr[i]; int currentState = 0; // Insert all characters of current word in arr[] for (int j = 0; j < word.size(); ++j) { int ch = (word[j] == '1') ? 1 : 0; // Allocate a new node (create a new state) if a // node for ch doesn't exist. if (g[currentState][ch] == -1) g[currentState][ch] = states++; currentState = g[currentState][ch]; } // Add current word in output function out[currentState] |= (1 << i); } // For all characters which don't have an edge from // root (or state 0) in Trie, add a goto edge to state // 0 itself for (int ch = 0; ch < MAXC; ++ch) if (g[0][ch] == -1) g[0][ch] = 0; // Now, let's build the failure function // Initialize values in fail function memset(f, -1, sizeof f); // Failure function is computed in breadth first order // using a queue queue<int> q; // Iterate over every possible input for (int ch = 0; ch < MAXC; ++ch) { // All nodes of depth 1 have failure function value // as 0. For example, in above diagram we move to 0 // from states 1 and 3. if (g[0][ch] != 0) { f[g[0][ch]] = 0; q.push(g[0][ch]); } } // Now queue has states 1 and 3 while (q.size()) { // Remove the front state from queue int state = q.front(); q.pop(); // For the removed state, find failure function for // all those characters for which goto function is // not defined. for (int ch = 0; ch < MAXC; ++ch) { // If goto function is defined for character 'ch' // and 'state' if (g[state][ch] != -1) { // Find failure state of removed state int failure = f[state]; // Find the deepest node labeled by proper // suffix of string from root to current // state. while (g[failure][ch] == -1) failure = f[failure]; failure = g[failure][ch]; f[g[state][ch]] = failure; // Merge output values out[g[state][ch]] |= out[failure]; // Insert the next level node (of Trie) in Queue q.push(g[state][ch]); } } } return states; } // Returns the next state the machine will transition to using goto // and failure functions. // currentState - The current state of the machine. Must be between // 0 and the number of states - 1, inclusive. // nextInput - The next character that enters into the machine. int Automaton::findNextState(int currentState, char nextInput) { int answer = currentState; int ch = (nextInput == '1') ? 1 : 0; // If goto is not defined, use failure function while (g[answer][ch] == -1) { answer = f[answer]; } return g[answer][ch]; }
f1ce32293ac5a5c9c145ef72fe51b63b0f30bddb
182689c6476ac4bb1a56faa20864b787d646f135
/SpotLists/main.cpp
365367e9545140cd8c2903cb582536e8d9454612
[]
no_license
JimAlmeida/SpotLists
e1059a3ab94612da953164676b0551abdfa2c2a9
73fd572d30f6e6b4ceae6072a12465588a1db997
refs/heads/master
2023-05-01T14:10:31.069715
2021-05-18T13:22:31
2021-05-18T13:22:31
365,307,848
0
0
null
null
null
null
UTF-8
C++
false
false
716
cpp
#include "MainWindow.h" #include <QtWidgets/QApplication> #include <iostream> #include <cpr/cpr.h> #include "CURLDispatcher.h" #include "CURLRequest.h" #include "IHTTPRequest.h" #include "SpotifyAPI.h" #include "SpotifyFilter.h" #include <QtCore/qjsonobject.h> #include <QtCore/qjsondocument.h> #include "Tests.h" #include <QtWidgets/qlabel.h> #include <QtCore/qbytearray.h> #include <QtGui/qpixmap.h> #include <QtCore/qfile.h> int main(int argc, char *argv[]) { BETests::HTTPSTest(); QCoreApplication::addLibraryPath("."); QApplication a(argc, argv); a.setStyle("Fusion"); MainWindow w; w.showMaximized(); //QWidget* w = GUITests::artistPage(); //w->show(); return a.exec(); }
8aa3de6af052c270fa23f747f470c4802eee828e
730304a54837bf3db66850f67732426f655cec09
/src/c/AminoAcidMasses.h
bbad5ace94c7e29ef6688fd16dc5eab61d55bdaa
[]
no_license
wolski/bibliospec2.0
594e852dccad921ad9efe9c55c8616c0fd125f7b
c3a9b5d155e9c02fa0b7e9f1dcb15346dd78ee31
refs/heads/master
2021-01-10T01:54:58.755873
2015-09-28T11:16:59
2015-09-28T11:16:59
43,296,719
0
0
null
null
null
null
UTF-8
C++
false
false
2,069
h
/* Copyright (c) 2011, University of Washington All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the <ORGANIZATION> 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. */ /** * a program defines each amino acid mass * both avg. and mono. * */ #ifndef AMINOACIDMASS_H #define AMINOACIDMASS_H #include <string> #include <cstdlib> #include <cstdio> using namespace std; namespace BiblioSpec { const double PROTON_MASS = 1.007276; class AminoAcidMasses { public: AminoAcidMasses(); ~AminoAcidMasses(); static void initializeMass(double* pdAAMass, int bMassType); }; } // namespace #endif /* * Local Variables: * mode: c * c-basic-offset: 4 * End: */
70447d3be4982ed9568a8add9dca58b7555d7b46
61304bfb26ac0615629ebd44ecfcff2dce803fcb
/mixTheColors.cpp
cd7f5339ba777562b5a279a9d719409f3f917dda
[]
no_license
gokul1998/Codechef
c6109d5ade6c1fcfbb581647ed0ff8c97b441ccc
253a779a0c669cb2b41d3f1ede1bdf0f7259b40e
refs/heads/master
2020-06-23T09:48:58.653802
2019-07-24T08:11:33
2019-07-24T08:14:06
198,589,391
3
0
null
null
null
null
UTF-8
C++
false
false
363
cpp
#include<bits/stdc++.h> #define ll long long using namespace std; int main(){ int t; cin>>t; while(t--){ map<ll,ll> m; ll n,i,res=0,num; cin>>n; ll a[n]; for(i=0;i<n;i++){ cin>>num; a[i]=num; m[num]++; } map<ll,ll>::iterator p; for(p=m.begin();p!=m.end();p++){ res+=(p->second)-1; } cout<<res<<endl; } }
4cc6c3374d15135e1ebdd011d66b3c75274be6a1
18aee5d93a63eab684fe69e3aa0abd1372dd5d08
/paddle/phi/backends/dynload/flashattn.h
8948ec6a46988b980142ba2d90da3bb4109e873b
[ "Apache-2.0" ]
permissive
Shixiaowei02/Paddle
8d049f4f29e281de2fb1ffcd143997c88078eadb
3d4d995f26c48f7792b325806ec3d110fc59f6fc
refs/heads/develop
2023-06-26T06:25:48.074273
2023-06-14T06:40:21
2023-06-14T06:40:21
174,320,213
2
1
Apache-2.0
2022-12-28T05:14:30
2019-03-07T10:09:34
C++
UTF-8
C++
false
false
2,301
h
/* Copyright (c) 2023 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. */ #pragma once #include <mutex> // NOLINT #include "flashattn/include/flash_attn.h" #include "paddle/phi/backends/dynload/dynamic_loader.h" #include "paddle/phi/backends/dynload/port.h" namespace phi { namespace dynload { extern std::once_flag flashattn_dso_flag; extern void* flashattn_dso_handle; #define DYNAMIC_LOAD_FLASHATTN_WRAP(__name) \ struct DynLoad__##__name { \ template <typename... Args> \ auto operator()(Args... args) -> DECLARE_TYPE(__name, args...) { \ using flashattnFunc = decltype(&::__name); \ std::call_once(flashattn_dso_flag, []() { \ flashattn_dso_handle = phi::dynload::GetFlashAttnDsoHandle(); \ }); \ static void* p_##__name = dlsym(flashattn_dso_handle, #__name); \ return reinterpret_cast<flashattnFunc>(p_##__name)(args...); \ } \ }; \ extern DynLoad__##__name __name #define DECLARE_DYNAMIC_LOAD_FLASHATTN_WRAP(__name) \ DYNAMIC_LOAD_FLASHATTN_WRAP(__name) #define FLASHATTN_ROUTINE_EACH(__macro) \ __macro(flash_attn_fwd); \ __macro(flash_attn_bwd); \ __macro(flash_attn_fwd_with_bias_and_mask); \ __macro(flash_attn_bwd_with_bias_and_mask); \ __macro(flash_attn_error); FLASHATTN_ROUTINE_EACH(DECLARE_DYNAMIC_LOAD_FLASHATTN_WRAP); #undef DYNAMIC_LOAD_FLASHATTN_WRAP } // namespace dynload } // namespace phi
25ab233eb8655259b904912b60d980498be8e722
3233cb68829787101a7b6fb15ac4b1a0afd00a7e
/cp/Arithmetic_Square.cpp
eb2d75469b6a7a0270e78464091d2e0d663f4922
[]
no_license
Pyush146/competitive-programming
ce54997b59639acc9b676ccbcd885c7839723d11
6ae7bd7121d870117eb7a9ff32846b1df934c889
refs/heads/main
2023-07-29T10:53:16.426692
2021-09-12T11:45:02
2021-09-12T11:45:02
405,625,963
0
0
null
null
null
null
UTF-8
C++
false
false
1,101
cpp
#include<bits/stdc++.h> using namespace std; int main() { long t,r; cin>>t; for(r=1;r<=t;r++) { long long a[3][3],b[4],i,j,c=0; for(i=0;i<3;i++) { for(j=0;j<3;j++) { if(i==1 && j==1) { continue; } else { cin>>a[i][j]; } } } if(a[0][0]+a[2][0]==(a[1][0]*2)) c++; if(a[0][2]+a[2][2]==(a[1][2]*2)) c++; if(a[0][0]+a[0][2]==(a[0][1]*2)) c++; if(a[2][0]+a[2][2]==(a[2][1]*2)) c++; b[0]=a[0][0]+a[2][2]; b[1]=a[2][0]+a[0][2]; b[2]=a[1][0]+a[1][2]; b[3]=a[0][1]+a[2][1]; unordered_map<long long,long> mp; for(int k=0;k<4;k++) { mp[b[k]]++; } int m=0; for(auto k: mp) { if(k.first%2==0) { if(m<=k.second) m=k.second; } } cout<<"Case #"<<r<<": "<<c+m; cout<<endl; } }
6f110d19e3b6ce59a51269849119ddf138f4d403
7bae7dd19f8c36391f9a7688769bb4b401485a67
/include/cli/model/CardInfo.h
d2e2010159f93da17ea21e18f2d5de4d6f3f06fb
[ "LicenseRef-scancode-warranty-disclaimer", "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
vasilinab/virgil-cli
1c88010589b9b46491f7724a80675ab0e9b58cb7
3077f9f8d0c474265a1888cac8dd65a89becff5a
refs/heads/master
2020-05-03T01:32:46.365995
2017-04-12T12:35:08
2017-04-12T12:35:08
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,146
h
/** * Copyright (C) 2015-2017 Virgil Security Inc. * * Lead Maintainer: Virgil Security Inc. <[email protected]> * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * (1) Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * (2) Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * (3) Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''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 AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef VIRGIL_CLI_CARD_INFO_H #define VIRGIL_CLI_CARD_INFO_H #include <string> namespace cli { namespace model { class CardInfo { public: CardInfo(std::string device, std::string deviceName) : device_(std::move(device)), deviceName_(std::move(deviceName)) {} std::string device() const { return device_; } std::string deviceName() const { return deviceName_; } private: std::string device_; std::string deviceName_; }; }} #endif //VIRGIL_CLI_CARD_INFO_H
4d940b710400a600832a7a4aeab06da57a7e9b03
0f5c91dc15704a1b45415e7f9cfc6fb13af10ebe
/include/util.h
0adfbc62c37d807e3377dc13e4fcf484bfd3298f
[ "MIT" ]
permissive
Nixsm/fat16reader
4fe94fc027ad0a3b34b2095faef4906353c29457
b115ff02630cd98a67a6c1f1513cd1b6d35a75ce
refs/heads/master
2021-01-10T15:06:16.079127
2015-11-09T02:00:50
2015-11-09T02:00:50
45,808,255
0
0
null
null
null
null
UTF-8
C++
false
false
382
h
#ifndef FAT16_UTIL_H__ #define FAT16_UTIL_H__ typedef unsigned char uchar; /* * Expects little endian bytes */ namespace util { unsigned short toShort(uchar* bytes); unsigned short toShort(uchar b1, uchar b2); void toByte(unsigned short v, uchar* bytes); unsigned int toInt(uchar* bytes); void toByte(unsigned int v, uchar* bytes); } #endif//FAT16_UTIL_H__
5ae6b64fc5d56d4cbcc9f287c041ee66a3bb21fa
6bba5e0ed8aea730de624ce4afc56e8647675278
/src/xercesc/framework/XMLAttDefList.cpp
c5dde717ebdf2b5c0491f99495541879102196de
[ "Apache-2.0" ]
permissive
ksmyth/xerces-c
0b3d2b330389db2018f7d820c898be7f0a2f33f0
245d0f626041add542ab7deabd6ba9c3e4641f6d
refs/heads/master
2021-01-17T17:28:41.671391
2017-10-12T15:29:24
2017-10-12T15:39:21
61,400,297
0
0
null
null
null
null
UTF-8
C++
false
false
1,366
cpp
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * $Id: XMLAttDefList.cpp 568078 2007-08-21 11:43:25Z amassari $ */ // --------------------------------------------------------------------------- // Includes // --------------------------------------------------------------------------- #include <xercesc/framework/XMLAttDefList.hpp> XERCES_CPP_NAMESPACE_BEGIN /*** * Support for Serialization/De-serialization ***/ IMPL_XSERIALIZABLE_NOCREATE(XMLAttDefList) void XMLAttDefList::serialize(XSerializeEngine&) { //no data } XERCES_CPP_NAMESPACE_END
f366262348d3e74fd366e84555547cc184a87c9a
d0eac371071642185fd803e56985b41f2bfb1cc0
/example/less-than-4k/function/member3.cpp
219a0c85ecf067b9da336efb8e9abed1fc27c160
[ "Apache-2.0" ]
permissive
dmilos/reflection
43ce8e3d3cfce191b8c4fe463c9ecb835f0068a5
0d190d4c625f80dab2d0fde10914365695d2bcc7
refs/heads/master
2021-12-24T21:47:39.858028
2021-10-01T12:53:05
2021-10-10T22:06:34
55,215,559
2
1
null
null
null
null
UTF-8
C++
false
false
2,920
cpp
#include <iostream> #include <iomanip> #include <string> #include "reflection/reflection.hpp" class MyClassOriginal { public: MyClassOriginal() { } bool writer_int( int const& i ) { std::cout << __FUNCTION__ << std::endl; m_int = i; return true; } int const& reader_int() const{ return m_int; } private: int m_int; public: void member_void_int_string( int & i , std::string s ) { std::cout << __FUNCTION__ << std::endl; std::cout << i << std::endl; i = 12345; std::cout << s << std::endl; } int member_int_int_string( int & i, std::string s ) { std::cout << __FUNCTION__ << std::endl; std::cout << i << std::endl; i = 98765; std::cout << s << std::endl; return 10; } }; // Reflect to reflection reflection__CLASS_BEGIN_inherit( MyClassReflection, public, MyClassOriginal ) reflection__CLASS_FUNCTION_member( "member_void_int_string", MyClassOriginal, public, member_void_int_string ) reflection__CLASS_FUNCTION_member( "member_int_int_string", MyClassOriginal, public, member_int_int_string ) reflection__CLASS_MEMBER_guarded( "int-point", MyClassOriginal, writer_int , reader_int ) reflection__CLASS_END_inherit( MyClassReflection, MyClassOriginal ); int main( int argc, char *argv[] ) { MyClassReflection r; //!< Reflection of Original int i=20; // Classic "direct" call where c++ take care about arguments type check std::cout << i << std::endl; ::reflection::property::function::execute<int, int&, std::string >( r.get( "member_int_int_string" ), i, "asdasd" ); std::cout << i << std::endl; ::reflection::property::function::execute<void, int&, std::string >( r.get( "member_void_int_string" ), i, "asdasd" ); std::cout << i << std::endl; ::reflection::content::function::argument_struct<std::string>::container_type argument; argument.resize(3); auto p0i = ::reflection::content::trinity::simple<std::string,int>( 100 ); auto p0v = ::reflection::content::trinity::void_class<std::string,bool> {} ; auto p1 = ::reflection::content::trinity::simple<std::string,int>( 1024 ); auto p2 = ::reflection::content::trinity::simple<std::string,std::string>( "asaaaaa" ); argument[0]= &p0v; argument[1]= &p1; argument[2]= &p2; std::cout << p1.present() << std::endl; ::reflection::content::function::execute<std::string>( r.get("member_void_int_string"), argument ); std::cout << p1.present() << std::endl; argument[0]= &r.get("int-point"); p1.disclose() = 4567; std::cout << p1.present() << std::endl; ::reflection::content::function::execute<std::string>( r.get("member_int_int_string"), argument ); std::cout << p1.present() << std::endl; return EXIT_SUCCESS; }
0f0ed9f3489fbfe2f5747782728c3545410f639a
8cd2ff52c9db38065291337bc6c6670a40b42661
/jeuEnregistrement.h
da0b511c80fb47730b12c2820e92fe8e21dba5cf
[]
no_license
jouffreautheo/Atlantik
aa2ad670df51094a11513a5b242d89bed9d8a7c6
f372216aff0a083978a559ea2bd45f12b9c9b0d4
refs/heads/master
2020-03-10T11:48:58.379330
2018-04-13T07:19:57
2018-04-13T07:19:57
129,364,050
0
0
null
null
null
null
UTF-8
C++
false
false
793
h
#ifndef JEUENREGISTREMENT #define JEUENREGISTREMENT #include <iostream> #include <QVariant> #include <QSqlQuery> #include <QString> class JeuEnregistrement { private : QSqlQuery maRequete; public : JeuEnregistrement(QString chaineSQL);// Constructeur de la classe. Positionne le curseur sur le premier enregistrement. bool suivant();// Avance le curseur sur l’enregistrement suivant. QVariant getValeur(QString nomChamp);// Renvoie la valeur du champ nomChamp de l’enregistrement courant. Variant est un type // générique pouvant contenir tout type de valeur. On peut utiliser l’opérateur "+" pour // concaténer des valeurs ou variables de type Chaîne ou Variant. void fermer();// Ferme le curseur et libère les ressources. }; #endif
8185144665ffae2ea34d1ef182856d4808b8b657
73f88b9d8055c1bc5ed408319ffed9fa72af628b
/include/Pomdog/Application/Timer.hpp
700eca2ec9a0614221919b54fb6d5b0a8d6dcef4
[ "MIT" ]
permissive
Mourtz/pomdog
3841c015012f0bb8f4e45c3524a66ced11abd448
b3f678033b2b41ec5bbf9c5079810b1082aa293d
refs/heads/master
2020-12-25T04:01:47.810430
2015-09-10T11:57:25
2015-09-10T11:57:25
38,495,875
1
0
null
2015-07-07T09:48:00
2015-07-03T14:12:26
C++
UTF-8
C++
false
false
1,496
hpp
// Copyright (c) 2013-2015 mogemimi. // Distributed under the MIT license. See LICENSE.md file for details. #ifndef POMDOG_TIMER_CAC74AF2_HPP #define POMDOG_TIMER_CAC74AF2_HPP #include "Pomdog/Basic/Export.hpp" #include "Pomdog/Application/Duration.hpp" #include "Pomdog/Signals/ScopedConnection.hpp" #include "Pomdog/Signals/Signal.hpp" #include "Pomdog/Utility/Optional.hpp" #include <memory> namespace Pomdog { class GameClock; class POMDOG_EXPORT Timer { public: explicit Timer(GameClock & clock); explicit Timer(std::shared_ptr<GameClock> const& clock); Timer() = delete; Timer(Timer const&) = delete; Timer(Timer &&) = default; Timer & operator=(Timer const&) = delete; Timer & operator=(Timer &&) = default; ~Timer(); void Start(); void Stop(); void Reset(); bool IsEnabled() const; Duration GetTotalTime() const; Duration GetFrameDuration() const; bool IsSingleShot() const; void SetSingleShot(bool isSingleShot); double GetScale() const; void SetScale(double scale); Optional<Duration> GetInterval() const; void SetInterval(Duration const& interval); void SetInterval(Optional<Duration> const& interval); Signal<void()> Elapsed; private: ScopedConnection connection; Optional<Duration> interval; Duration totalTime; Duration frameDuration; double scale; bool enabled; bool isSingleShot; }; } // namespace Pomdog #endif // POMDOG_TIMER_CAC74AF2_HPP
4b4b7dbe24b22a6f891b863cf9bbbabbd7154e82
5f2762a92f90ad66fc5c0788a5ce1dff1c28592c
/3459.cpp
cab9447f07560cfbdc541f59ac9e866251586f9b
[]
no_license
KIMJUHEEEEE/SWEA
508a64ed11274c389c8ad5cf6d89875822c18866
40e6918a464bbf0217ec5c25a6598980caa2954a
refs/heads/master
2020-07-11T00:44:39.511835
2020-05-09T06:03:31
2020-05-09T06:03:31
204,411,419
1
0
null
null
null
null
UTF-8
C++
false
false
366
cpp
#include<stdio.h> int main() { int tc = 0; scanf("%d", &tc); for (int i = 1; i <= tc; i++) { unsigned long long n; scanf("%lld", &n); int check = 0; unsigned long long turn = 1; unsigned long long mul = 1; while (turn < n) { if (!check) mul *= 4; turn += mul; check = !check; } printf("#%d %s\n", i, check ? "Alice" : "Bob"); } }
097d9679c3c41b9eae44729c40e1b94531d46278
06bd829a0b316ff1a8b54b4fc1bb88c73a4fc68f
/动态规划/534.打劫房屋II.cpp
21f84285f1e45f6f13028f71513b1409155b1f50
[]
no_license
LiuYu0521/lintcode
148e763294f478f50858f8053cacf5478b5c60b4
97c90a2065c6bf6df76c43211af0db2da528b965
refs/heads/master
2021-01-22T21:53:32.924735
2017-08-13T02:51:25
2017-08-13T02:51:25
92,742,383
2
0
null
null
null
null
UTF-8
C++
false
false
953
cpp
class Solution { public: /** * @param nums: An array of non-negative integers. * return: The maximum amount of money you can rob tonight */ int houseRobber2(vector<int>& nums) { // write your code here int len = nums.size(); if(len == 0) return 0; if(len == 1) return nums[0]; vector<int> nums1 = nums; vector<int> nums2 = nums; nums1.pop_back(); nums2.erase(nums2.begin()); return max(houseRobber(nums1), houseRobber(nums2)); } int houseRobber(vector<int> A) { // write your code here int len = A.size(); if(len == 0) return 0; if(len == 1) return A[0]; int dp[len + 1]; dp[0] = 0; dp[1] = A[0]; for(int i = 2; i <= len; i++) { dp[i] = max(A[i - 1] + dp[i - 2], dp[i - 1]); } return dp[len]; } };
3f4ad48218bcc3b287d23747a537113d201437f7
1d64af0c2c662ebec47145c3eb9ca92533618d2f
/Framework/MachineLearning/Src/Datasets.cpp
07c4102bc41ca64348d9624613292dd39456e322
[]
no_license
Zaelgar/Klink-Engine
df7c2803b5bfbf77d8d3709b6ee4ad6caa4ee831
ed33381fded540f15e2f217ad20dc02ae4b6ff1c
refs/heads/main
2023-07-27T20:08:36.486125
2021-07-13T22:56:47
2021-07-13T22:56:47
368,299,861
1
0
null
null
null
null
UTF-8
C++
false
false
2,467
cpp
#include "Precompiled.h" #include "Datasets.h" using namespace Klink::ML; using namespace Klink::JMath::Random; Dataset Datasets::MakeLinear(size_t samples, float b0, float b1, float minX, float maxX, float noise) { DatasetProperties props; props.Initialize(1, samples, minX, maxX, noise, 2); Dataset dataset(props); dataset.properties.Initialize(1, samples, minX, maxX, noise, 1); dataset.X.resize(samples); dataset.y.resize(samples); for (size_t i = 0; i < samples; ++i) { dataset.X[0][i] = JMath::Random::RandomFloatUniform(minX, maxX); dataset.y[i] = b0 + (b1 * dataset.X[0][i]) + JMath::Random::RandomFloatNormal(0.0f, noise); } return dataset; } Dataset Datasets::MakeLinear(const DatasetProperties& props) { Dataset dataset(props); for (size_t i = 0; i < props.numSamples; ++i) { for (size_t j = 0; j < props.featureCount; ++j) { dataset.X[j][i] = JMath::Random::RandomFloatUniform(dataset.properties.minX, dataset.properties.maxX); } dataset.y[i] = props.b[0] + (props.b[1] * dataset.X[0][i]) + JMath::Random::RandomFloatNormal(0.0f, props.noise); } return dataset; } Dataset Datasets::MakeLogistic(size_t samples, float b0, float b1, float b2, float minX, float maxX, float noise) { DatasetProperties props; props.Initialize(2, samples, minX, maxX, noise, 3); Dataset dataset(props); const float m = -b1 / b2; const float b = -b0 / b2; for (size_t i = 0; i < samples; ++i) { const float x0 = RandomFloatUniform(minX, maxX); const float point = (m * x0) + b; const float delta = RandomFloatNormal(0.0f, noise); const float x1 = point + delta; const float y = (delta > 0.0f) ? 1.0f : 0.0f; dataset.X[0].push_back(x0); dataset.X[1].push_back(x1); dataset.y.push_back(y); } return dataset; } Dataset Datasets::MakeLogistic(const DatasetProperties& props) { Dataset dataset(props); dataset.X[0].reserve(props.numSamples); dataset.X[1].reserve(props.numSamples); dataset.y.reserve(props.numSamples); const float m = -props.b[1] / props.b[2]; const float b = -props.b[0] / props.b[2]; for (size_t i = 0; i < props.numSamples; ++i) { const float x0 = RandomFloatUniform(props.minX, props.maxX); const float point = (m * x0) + b; const float delta = RandomFloatNormal(0.0f, props.noise); const float x1 = point + delta; const float y = (delta > 0.0f) ? 1.0f : 0.0f; dataset.X[0].push_back(x0); dataset.X[1].push_back(x1); dataset.y.push_back(y); } return dataset; }
b262d01d0bea22787611e3fd023519cd40409d8e
556042e940157fab39715c4ecd63a9278b248298
/example/vgg16_test/inference_net/max_pool_acc_innerdf.h
08bff02bd3a54508c313caa96b1cad1b61055e7a
[]
no_license
microideax/FeedforwardNet
038acc46a0824ae04d72e974c8db395c873e51f3
ad3eaee45aaf659eb5c1863a759d2846ec272da0
refs/heads/master
2020-06-16T22:32:28.500019
2019-01-15T12:56:04
2019-01-15T12:56:04
75,061,642
17
3
null
null
null
null
UTF-8
C++
false
false
7,678
h
#ifndef _MAX_POOL_ACC_H_ #define _MAX_POOL_ACC_H_ #include <iostream> #include <fstream> #include "activation_functions.h" #if _C_DEBUG_MODE_ #include <algorithm> #endif using namespace std; template <typename T, typename W, typename G, int Tn, int Tr, int Tc, int S_max, int K_max> class max_pool_acc { private: int pool_layer_number; public: max_pool_acc() : pool_layer_number(0) {pool_layer_number = 0;}; ////------------------------------C++ debugging functions---------------------------------------//// // Reset output buffer void out_buf_reset(G buf[][Tr][Tc]){ for(int i = 0; i < Tn; i++){ for(int j = 0; j < Tr; j++){ for(int k = 0; k < Tc; k++){ buf[i][j][k] = G(0); } } } } ////-----------------------------Accelerator Functions---------------------------------------//// // Load input data void in_buf_load(T buf[][(Tr-1)*S_max + K_max][(Tc-1)*S_max + K_max],T *in_data_1,T *in_data_2, int n, int r, int c, int S, int K, int P, int R, int C, int N, int R_IN, int C_IN, int TR, int TC) { for (int i = n; i < n + Tn; i+=2){ for (int j = r * S - P; j < r * S + TR - P; j++) { for (int k = c * S - P; k < c * S + TC - P; k++) { if (j < 0 || j >= (R_IN - 2 * P) || k < 0 || k >= (C_IN - 2 * P)) { buf[i + 0 - n][j - r * S + P][k - c * S + P] = T(0); buf[i + 1 - n][j - r * S + P][k - c * S + P] = T(0); } else { if (N < n + Tn && i + 0 >= N) { buf[i + 0 - n][j - r * S + P][k - c * S + P] = T(0); }else { buf[i + 0 - n][j - r * S + P][k - c * S + P] = *(in_data_1 + i/2 * (R_IN - 2 * P) * (C_IN - 2 * P) + j * (C_IN - 2 * P) + k); } if (N < n + Tn && i + 1 >= N) { buf[i + 1 - n][j - r * S + P][k - c * S + P] = T(0); }else { buf[i + 1 - n][j - r * S + P][k - c * S + P] = *(in_data_2 + i/2 * (R_IN - 2 * P) * (C_IN - 2 * P) + j * (C_IN - 2 * P) + k); } } } } } } // Max pooling computation kernel void pool_engine(T in_buf[][(Tr-1)*S_max + K_max][(Tc-1)*S_max + K_max], G out_buf[][Tr][Tc], int S, int n, int r, int c, int K, int R, int C, int TR, int TC){ for(int i=0; i<K; i++){ for(int j=0; j<K; j++){ for(int tr=0; tr<Tr&&tr+r<R&&(S * tr + i)<TR; tr++){ for(int tc=0; tc<Tc&&tc+c<C&&(S * tc + j)<TC; tc++){ #pragma HLS PIPELINE for(int tn=0; tn<Tn; tn++){ #pragma HLS UNROLL out_buf[tn][tr][tc] = (i==0&&j==0)?in_buf[tn][S*tr][S*tc]:((out_buf[tn][tr][tc]>in_buf[tn][S*tr+i][S*tc+j])?out_buf[tn][tr][tc]:in_buf[tn][S*tr+i][S*tc+j]); } } } } } } // Ouput out_buf data to output interface void output_res(G out_buf[][Tr][Tc],G *out_data_1,G *out_data_2, int n, int r, int c, int N, int R, int C, bool act){ for (int i = n; i < n + Tn; i += 2) { if (N < n + Tn && i == N) { break; } for (int j = r; j < r + Tr; j++) { if (R < r + Tr && j == R) { break; } for (int k = c; k < c + Tc; k++) { if (C < c + Tc && k == C) { break; } if (act) { if (i + 0 <N) *(out_data_1 + (i/2) * R * C + j * C + k) = relu(out_buf[i + 0 - n][j - r][k - c]); if (i + 1 <N) *(out_data_2 + (i/2) * R * C + j * C + k) = relu(out_buf[i + 1 - n][j - r][k - c]); } else { if (i + 0 <N) *(out_data_1+ (i/2) * R * C + j * C + k) = out_buf[i + 0 - n][j - r][k - c]; if (i + 1 <N) *(out_data_2+ (i/2) * R * C + j * C + k) = out_buf[i + 1 - n][j - r][k - c]; } } } } } ///////////////////////------------------conv accelerator----------------////////////////////////// void max_pool_layer_acc( int R_IN,// input Row int C_IN,// input column int N, //input feature number int K, //input kernel size int R, // output Row int C, // output column int S, // stride size int P, // padding size bool act, // activation function bit (1-- with act, 0--without act) T *in_data_1, // in_data[N][(R-1)*S + K][(C-1)*S + K] --> [N][(R-1)*S + K - 2*P][(C-1)*S + K - 2*P] T *in_data_2, // in_data[N][(R-1)*S + K][(C-1)*S + K] --> [N][(R-1)*S + K - 2*P][(C-1)*S + K - 2*P] G *out_data_1, // out[M][R][C] G *out_data_2){ // out[M][R][C] /***************local data buffer******************************/ int TR=0; int TC=0; T in_buf[Tn][(Tr-1)*S_max + K_max][(Tc-1)*S_max + K_max]; G out_buf[Tn][Tr][Tc]; #if _HLS_MODE_ #pragma HLS ARRAY_PARTITION variable=in_buf complete dim=1 #pragma HLS ARRAY_PARTITION variable=out_buf complete dim=1 #endif #if _C_DEBUG_MODE_ #if _KERNEL_DEBUG_ cout << "Starting max_pool_acc_innerdf layer ...." << endl; //buffer local data initiallization: must do it in C++ debug! out_buf_reset(out_buf); #endif #endif for(int r = 0; r < R; r += Tr){ for(int c = 0; c < C; c += Tc){ TR=((r * S + (Tr - 1) * S + K)>R_IN?(R_IN - r * S):((Tr - 1) * S + K)); TC=((c * S + (Tc - 1) * S + K)>C_IN?(C_IN - c * S):((Tc - 1) * S + K)); for(int n = 0; n < N; n += Tn){ #if _HLS_MODE_ #pragma HLS DATAFLOW #endif //--------------------------Load input B W D in ping-pong manner-------------------------// // load input data in_buf_load(in_buf, in_data_1, in_data_2, n, r, c, S, K, P, R, C, N, R_IN, C_IN, TR, TC); //------------------------------compute buffered data -----------------------------------// pool_engine(in_buf, out_buf, S, n, r, c, K, R, C, TR, TC); //---------------------------transfer output data----------------------------------------// // transfer output data output_res(out_buf, out_data_1, out_data_2, n, r, c, N, R, C, act); } } } #if _C_DEBUG_MODE_ #if _KERNEL_DEBUG_ cout << "Finished max_pool_acc_innerdf layer ...." << endl; ofstream max_pool_out; max_pool_out.open("max_pool_out_data.txt", ios::app); max_pool_out <<"max_pool output: "<< endl; for (int i = 0; i < N/2; i++) { for (int j = 0; j < R; j++) { for(int k = 0; k < C; k++){ max_pool_out << *(out_data_1 + i*R*C + j*C + k) << " "; }max_pool_out << endl; }max_pool_out << endl; for (int j = 0; j < R; j++) { for(int k = 0; k < C; k++){ max_pool_out << *(out_data_2 + i*R*C + j*C + k) << " "; }max_pool_out << endl; }max_pool_out << endl; }max_pool_out.close(); #endif #endif } }; #endif
40555f13157c047a7f2900506ccbe48e25e19e53
a77cae61867e4fb947f88acb4e11603d9cd0f6d1
/SJTUOJ/SJTU1307_放球.cpp
ba643845eb53599be92c5a7294cf18008a0c22dd
[]
no_license
CHOcho-quan/OJ-Journey
cbad32f7ab52e59218ce4741097d6fa0ac9b462f
a9618891b5e14790ba65914783e26f8a7aa03497
refs/heads/master
2023-06-09T15:35:27.418405
2023-06-01T00:57:11
2023-06-01T00:57:11
166,665,271
1
0
null
null
null
null
UTF-8
C++
false
false
879
cpp
// // SJTU1307_放球.cpp // // // Created by 铨 on 2019/3/11. // // #include <iostream> #include <set> #include <vector> #include <string> #include <stack> #include <iomanip> #include <cmath> using namespace std; bool isSquare(int n) { return (int(sqrt(n)) * int(sqrt(n)) == n); } int main() { int n, now = 1; cin >> n; int *t; t = new int[n]; for (int i = 0;i < n;i++) t[i] = -1; bool flag = true; while (flag) { flag = false; for (int i = 0;i < n;i++) { if (t[i] == -1) { t[i] = now; now++; flag = true; break; } if (isSquare(t[i] + now)) { t[i] = now; now++; flag = true; break; } } } cout << now-1; }
c9d7522d054d701e69b42601cc29539d318132e9
2cb5646fdded8ea162fce7c171eb891d9a9495ac
/exportNF/release/windows/obj/src/__ASSET__flixel_flixel_ui_img_check_box_png.cpp
b25d68e84ee624d2048687622fa5c65d7c2a77ae
[ "BSD-3-Clause" ]
permissive
roythearsonist/NekoFreakMod-FridayNightFunkin
89b815177c82ef21e09d81268fb8aeff0e8baf01
232bcb08234cfe881fd6d52b13e6ae443e105fd1
refs/heads/main
2023-04-23T08:22:18.886103
2021-05-17T07:13:05
2021-05-17T07:13:05
null
0
0
null
null
null
null
UTF-8
C++
false
true
7,072
cpp
// Generated by Haxe 4.2.1+bf9ff69 #include <hxcpp.h> #ifndef INCLUDED___ASSET__flixel_flixel_ui_img_check_box_png #include <__ASSET__flixel_flixel_ui_img_check_box_png.h> #endif #ifndef INCLUDED_haxe_Resource #include <haxe/Resource.h> #endif #ifndef INCLUDED_haxe_io_Bytes #include <haxe/io/Bytes.h> #endif #ifndef INCLUDED_lime_graphics_Image #include <lime/graphics/Image.h> #endif #ifndef INCLUDED_lime_graphics_ImageBuffer #include <lime/graphics/ImageBuffer.h> #endif #ifndef INCLUDED_lime_graphics_ImageType #include <lime/graphics/ImageType.h> #endif HX_DEFINE_STACK_FRAME(_hx_pos_e866605334626d6d_346_new,"__ASSET__flixel_flixel_ui_img_check_box_png","new",0x50315bb9,"__ASSET__flixel_flixel_ui_img_check_box_png.new","lime/_internal/macros/AssetsMacro.hx",346,0xc651f030) HX_LOCAL_STACK_FRAME(_hx_pos_69fac2a5e82205e5_679_boot,"__ASSET__flixel_flixel_ui_img_check_box_png","boot",0xd317e6b9,"__ASSET__flixel_flixel_ui_img_check_box_png.boot","ManifestResources.hx",679,0xf77aa668) void __ASSET__flixel_flixel_ui_img_check_box_png_obj::__construct( ::lime::graphics::ImageBuffer buffer, ::Dynamic offsetX, ::Dynamic offsetY, ::Dynamic width, ::Dynamic height, ::Dynamic color, ::lime::graphics::ImageType type){ HX_STACKFRAME(&_hx_pos_e866605334626d6d_346_new) HXLINE( 375) super::__construct(null(),null(),null(),null(),null(),null(),null()); HXLINE( 377) this->_hx___fromBytes(::haxe::Resource_obj::getBytes(::__ASSET__flixel_flixel_ui_img_check_box_png_obj::resourceName),null()); } Dynamic __ASSET__flixel_flixel_ui_img_check_box_png_obj::__CreateEmpty() { return new __ASSET__flixel_flixel_ui_img_check_box_png_obj; } void *__ASSET__flixel_flixel_ui_img_check_box_png_obj::_hx_vtable = 0; Dynamic __ASSET__flixel_flixel_ui_img_check_box_png_obj::__Create(::hx::DynamicArray inArgs) { ::hx::ObjectPtr< __ASSET__flixel_flixel_ui_img_check_box_png_obj > _hx_result = new __ASSET__flixel_flixel_ui_img_check_box_png_obj(); _hx_result->__construct(inArgs[0],inArgs[1],inArgs[2],inArgs[3],inArgs[4],inArgs[5],inArgs[6]); return _hx_result; } bool __ASSET__flixel_flixel_ui_img_check_box_png_obj::_hx_isInstanceOf(int inClassId) { if (inClassId<=(int)0x10395087) { return inClassId==(int)0x00000001 || inClassId==(int)0x10395087; } else { return inClassId==(int)0x33f052f7; } } ::String __ASSET__flixel_flixel_ui_img_check_box_png_obj::resourceName; ::hx::ObjectPtr< __ASSET__flixel_flixel_ui_img_check_box_png_obj > __ASSET__flixel_flixel_ui_img_check_box_png_obj::__new( ::lime::graphics::ImageBuffer buffer, ::Dynamic offsetX, ::Dynamic offsetY, ::Dynamic width, ::Dynamic height, ::Dynamic color, ::lime::graphics::ImageType type) { ::hx::ObjectPtr< __ASSET__flixel_flixel_ui_img_check_box_png_obj > __this = new __ASSET__flixel_flixel_ui_img_check_box_png_obj(); __this->__construct(buffer,offsetX,offsetY,width,height,color,type); return __this; } ::hx::ObjectPtr< __ASSET__flixel_flixel_ui_img_check_box_png_obj > __ASSET__flixel_flixel_ui_img_check_box_png_obj::__alloc(::hx::Ctx *_hx_ctx, ::lime::graphics::ImageBuffer buffer, ::Dynamic offsetX, ::Dynamic offsetY, ::Dynamic width, ::Dynamic height, ::Dynamic color, ::lime::graphics::ImageType type) { __ASSET__flixel_flixel_ui_img_check_box_png_obj *__this = (__ASSET__flixel_flixel_ui_img_check_box_png_obj*)(::hx::Ctx::alloc(_hx_ctx, sizeof(__ASSET__flixel_flixel_ui_img_check_box_png_obj), true, "__ASSET__flixel_flixel_ui_img_check_box_png")); *(void **)__this = __ASSET__flixel_flixel_ui_img_check_box_png_obj::_hx_vtable; __this->__construct(buffer,offsetX,offsetY,width,height,color,type); return __this; } __ASSET__flixel_flixel_ui_img_check_box_png_obj::__ASSET__flixel_flixel_ui_img_check_box_png_obj() { } bool __ASSET__flixel_flixel_ui_img_check_box_png_obj::__GetStatic(const ::String &inName, Dynamic &outValue, ::hx::PropertyAccess inCallProp) { switch(inName.length) { case 12: if (HX_FIELD_EQ(inName,"resourceName") ) { outValue = ( resourceName ); return true; } } return false; } bool __ASSET__flixel_flixel_ui_img_check_box_png_obj::__SetStatic(const ::String &inName,Dynamic &ioValue,::hx::PropertyAccess inCallProp) { switch(inName.length) { case 12: if (HX_FIELD_EQ(inName,"resourceName") ) { resourceName=ioValue.Cast< ::String >(); return true; } } return false; } #ifdef HXCPP_SCRIPTABLE static ::hx::StorageInfo *__ASSET__flixel_flixel_ui_img_check_box_png_obj_sMemberStorageInfo = 0; static ::hx::StaticInfo __ASSET__flixel_flixel_ui_img_check_box_png_obj_sStaticStorageInfo[] = { {::hx::fsString,(void *) &__ASSET__flixel_flixel_ui_img_check_box_png_obj::resourceName,HX_("resourceName",39,7a,62,90)}, { ::hx::fsUnknown, 0, null()} }; #endif static void __ASSET__flixel_flixel_ui_img_check_box_png_obj_sMarkStatics(HX_MARK_PARAMS) { HX_MARK_MEMBER_NAME(__ASSET__flixel_flixel_ui_img_check_box_png_obj::resourceName,"resourceName"); }; #ifdef HXCPP_VISIT_ALLOCS static void __ASSET__flixel_flixel_ui_img_check_box_png_obj_sVisitStatics(HX_VISIT_PARAMS) { HX_VISIT_MEMBER_NAME(__ASSET__flixel_flixel_ui_img_check_box_png_obj::resourceName,"resourceName"); }; #endif ::hx::Class __ASSET__flixel_flixel_ui_img_check_box_png_obj::__mClass; static ::String __ASSET__flixel_flixel_ui_img_check_box_png_obj_sStaticFields[] = { HX_("resourceName",39,7a,62,90), ::String(null()) }; void __ASSET__flixel_flixel_ui_img_check_box_png_obj::__register() { __ASSET__flixel_flixel_ui_img_check_box_png_obj _hx_dummy; __ASSET__flixel_flixel_ui_img_check_box_png_obj::_hx_vtable = *(void **)&_hx_dummy; ::hx::Static(__mClass) = new ::hx::Class_obj(); __mClass->mName = HX_("__ASSET__flixel_flixel_ui_img_check_box_png",47,0b,21,43); __mClass->mSuper = &super::__SGetClass(); __mClass->mConstructEmpty = &__CreateEmpty; __mClass->mConstructArgs = &__Create; __mClass->mGetStaticField = &__ASSET__flixel_flixel_ui_img_check_box_png_obj::__GetStatic; __mClass->mSetStaticField = &__ASSET__flixel_flixel_ui_img_check_box_png_obj::__SetStatic; __mClass->mMarkFunc = __ASSET__flixel_flixel_ui_img_check_box_png_obj_sMarkStatics; __mClass->mStatics = ::hx::Class_obj::dupFunctions(__ASSET__flixel_flixel_ui_img_check_box_png_obj_sStaticFields); __mClass->mMembers = ::hx::Class_obj::dupFunctions(0 /* sMemberFields */); __mClass->mCanCast = ::hx::TCanCast< __ASSET__flixel_flixel_ui_img_check_box_png_obj >; #ifdef HXCPP_VISIT_ALLOCS __mClass->mVisitFunc = __ASSET__flixel_flixel_ui_img_check_box_png_obj_sVisitStatics; #endif #ifdef HXCPP_SCRIPTABLE __mClass->mMemberStorageInfo = __ASSET__flixel_flixel_ui_img_check_box_png_obj_sMemberStorageInfo; #endif #ifdef HXCPP_SCRIPTABLE __mClass->mStaticStorageInfo = __ASSET__flixel_flixel_ui_img_check_box_png_obj_sStaticStorageInfo; #endif ::hx::_hx_RegisterClass(__mClass->mName, __mClass); } void __ASSET__flixel_flixel_ui_img_check_box_png_obj::__boot() { { HX_STACKFRAME(&_hx_pos_69fac2a5e82205e5_679_boot) HXDLIN( 679) resourceName = HX_("__ASSET__:image___ASSET__flixel_flixel_ui_img_check_box_png",79,29,1e,5c); } }
327e3d5792bbf5b0a5fe390e0b7ec4466fe96650
e5a75731bf787d83db939eba8b13f859fd7c8cd4
/cppDay02/ex01/Fixed.hpp
2df9c6d949834764101001626bd2c124990f0db0
[]
no_license
ekiriche/cppPool
cf74f15534f82e86ad13e4287910e83f0a14535b
6ed66d1be410320aaedf420f04f722624fdbecad
refs/heads/master
2020-07-25T20:22:42.742159
2019-11-07T08:23:33
2019-11-07T08:23:33
208,412,631
0
0
null
null
null
null
UTF-8
C++
false
false
501
hpp
#ifndef FIXED_HPP #define FIXED_HPP #include <iostream> class Fixed { private: int _value; static const int _bitsNum; public: Fixed(); Fixed(const Fixed& fixedInstance); Fixed(int const value); Fixed(float const value); ~Fixed(); Fixed& operator=(Fixed const & rhs); int getRawBits() const; void setRawBits(int const raw); float toFloat(void) const; int toInt(void) const; }; std::ostream & operator<<(std::ostream & o, Fixed const & rhs); #endif
9e28db9678f099aa0a206077c00f4264cba6b82f
50b07ae70fe269dadfd9c433a14ff44182f77ee0
/Old Contest and Practice Problems/aniaminimizing.cpp
7b0484a7a31a7b29edda96b687a5d2a953e30aa5
[]
no_license
PrakharUniyal/CompiArchives
393d72695dcf393500d7dd95d8980f9005139385
d89d53ae06f47cd2e144aa1df2a255d4e67218a2
refs/heads/master
2022-11-24T15:26:35.536346
2020-07-30T16:55:40
2020-07-30T16:55:40
258,544,798
0
0
null
null
null
null
UTF-8
C++
false
false
492
cpp
#include <bits/stdc++.h> using namespace std; #define ios std::ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define mo %1000000007 int main() #define int long long { ios; int n,k; cin>>n>>k; string s; cin>>s; if(s.size()==1 && k==1){cout<<0<<endl; return 0;} if(s[0]!='1' && k>0) {s[0]='1';k--;} int i=1; while(k>0 && i!=n){if(s[i]!='0') {s[i]='0'; k--;} i++;} cout<<s<<endl; }
970a354fadea25cc4c706d32c57bdf982e22284e
1779764841fdbdb680e958bdfad5396b39352726
/PlaneGame/Enemy.cpp
e5586bc98c7c0e0189ceda5e58eda20722ef590c
[]
no_license
RockMeroll/PlaneGame
96121511d44328b586a68ebc46be16ffeecf2e18
a8e87f68159a6569096dc3e09618874ff1c53072
refs/heads/master
2020-12-02T22:42:32.835182
2017-07-04T02:30:47
2017-07-04T02:30:47
96,167,408
0
0
null
null
null
null
GB18030
C++
false
false
1,629
cpp
#include "StdAfx.h" #include "Enemy.h" #include "resource.h" CImageList CEnemy::m_Images; CImageList CEnemy::m_Images_blood; CEnemy::CEnemy(void) //构造函数 { m_blood=5; //随机确定X位置 m_ptPos.x = rand()%(GAME_WIDTH-ENEMY_HEIGHT)+1; //随机确定图像索引 //m_nImgIndex = rand()%2; m_nImgIndex = 0; //根据图像索引确定方向 m_nMotion=1; m_ptPos.y=-ENEMY_HEIGHT; /* if (m_nImgIndex%2!=0)//如果是图像索引是偶数,即m_nImgIndex是奇数=1的飞机图片是向上飞的 { m_nMotion=-1; m_ptPos.y = GAME_HEIGHT+ENEMY_HEIGHT; } */ //随机确定速度 m_V = rand()%6+2; m_nWait=0; ToBomb2=NULL; } CEnemy::~CEnemy(void) { } BOOL CEnemy::LoadImage() { return CGameObject::LoadImage(m_Images,IDB_ENEMY,RGB(0,0,0),35,35,2); //2表示图片里包括两个子图片,即两个敌机图片 } BOOL CEnemy::LoadImage2() { return CGameObject::LoadImage(m_Images_blood,IDB_BITMAP2,RGB(0,0,0),35,2,5); //2表示图片里包括两个子图片,即两个敌机图片 } BOOL CEnemy::Draw(CDC* pDC,BOOL bPause) { m_nWait++; if(m_nWait>20) //延迟20后绘制飞机 m_nWait=0; if(!bPause) { m_ptPos.y = m_ptPos.y + m_nMotion * m_V; //移动 } if(m_blood<1) return FALSE; //判断超出屏幕范围 if(m_ptPos.y > GAME_HEIGHT+ENEMY_HEIGHT ) return FALSE; if(m_ptPos.y < -ENEMY_HEIGHT) return FALSE; m_Images.Draw(pDC,m_nImgIndex,m_ptPos,ILD_TRANSPARENT); m_Images_blood.Draw(pDC,m_blood,m_ptPos,ILD_TRANSPARENT); return TRUE; } BOOL CEnemy::Fired() //敌机在移动过程中不能发射 { if(m_nWait==0) return TRUE; else return FALSE; }
a492f555fd0cc1a2adada4445ef38c85cc71cf9c
9e4aaa2a311df0d8ec99d2732d67d1e462c1dbc8
/tbb/cpp/parallel_for/tachyon/src/parse.cpp
e0e1f4622c7865c6d098e6be7c422685b9609b4f
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
intel-system-studio/samples
13eb9758f2c784604eddf54ce5fa872ee6b9a3f5
17c039aab5cd77ab5f4c3ba86e0664e7208bc537
refs/heads/iss2019-update4
2021-06-21T08:05:39.142335
2019-12-16T21:21:04
2019-12-16T21:21:04
97,175,652
22
12
null
2019-12-17T01:01:56
2017-07-14T00:21:51
C++
UTF-8
C++
false
false
19,120
cpp
/* ============================================================== SAMPLE SOURCE CODE - SUBJECT TO THE TERMS OF SAMPLE CODE LICENSE AGREEMENT, http://software.intel.com/en-us/articles/intel-sample-source-code-license-agreement/ Copyright (C) Intel Corporation THIS FILE IS PROVIDED "AS IS" WITH NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS. ============================================================= */ /* The original source for this example is Copyright (c) 1994-2008 John E. Stone All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */ /* * parse.cpp - an UltraLame (tm) parser for simple data files... */ // Try preventing lots of GCC warnings about ignored results of fscanf etc. #if !__INTEL_COMPILER #if __GNUC__<4 || __GNUC__==4 && __GNUC_MINOR__<5 // For older versions of GCC, disable use of __wur in GLIBC #undef _FORTIFY_SOURCE #define _FORTIFY_SOURCE 0 #else // Starting from 4.5, GCC has a suppression option #pragma GCC diagnostic ignored "-Wunused-result" #endif #endif //__INTEL_COMPILER #include <stdio.h> #include <math.h> #include <string.h> #include <stdlib.h> #include <ctype.h> /* needed for toupper(), macro.. */ #include "types.h" #include "api.h" /* rendering API */ #define PARSE_INTERNAL #include "parse.h" /* self protos */ #undef PARSE_INTERNAL static texentry textable[NUMTEXS]; /* texture lookup table */ static texentry defaulttex; /* The default texture when a lookup fails */ static int numtextures; /* number of TEXDEF textures */ static int numobjectsparsed; /* total number of objects parsed so far */ static color scenebackcol; /* scene background color */ static int stringcmp(const char * a, const char * b) { size_t i, s, l; s=strlen(a); l=strlen(b); if (s != l) return 1; for (i=0; i<s; i++) { if (toupper(a[i]) != toupper(b[i])) { return 1; } } return 0; } static void reset_tex_table(void) { apitexture apitex; numtextures=0; memset(&textable, 0, sizeof(textable)); apitex.col.r=1.0; apitex.col.g=1.0; apitex.col.b=1.0; apitex.ambient=0.1; apitex.diffuse=0.9; apitex.specular=0.0; apitex.opacity=1.0; apitex.texturefunc=0; defaulttex.tex=rt_texture(&apitex); } static errcode add_texture(void * tex, char name[TEXNAMELEN]) { textable[numtextures].tex=tex; strcpy(textable[numtextures].name, name); numtextures++; if (numtextures > NUMTEXS) { fprintf(stderr, "Parse: %d textures allocated, texture slots full!\n", numtextures); numtextures--; /* keep writing over last texture if we've run out.. */ return PARSEALLOCERR; } return PARSENOERR; } static void * find_texture(char name[TEXNAMELEN]) { int i; for (i=0; i<numtextures; i++) { if (strcmp(name, textable[i].name) == 0) return textable[i].tex; } fprintf(stderr, "Undefined texture '%s', using default. \n",name); return(defaulttex.tex); } apiflt degtorad(apiflt deg) { apiflt tmp; tmp=deg * 3.1415926 / 180.0; return tmp; } static void degvectoradvec(vector * degvec) { vector tmp; tmp.x=degtorad(degvec->x); tmp.y=degtorad(degvec->y); tmp.z=degtorad(degvec->z); *degvec=tmp; } static void InitRot3d(RotMat * rot, apiflt x, apiflt y, apiflt z) { rot->rx1=cos(y)*cos(z); rot->rx2=sin(x)*sin(y)*cos(z) - cos(x)*sin(z); rot->rx3=sin(x)*sin(z) + cos(x)*cos(z)*sin(y); rot->ry1=cos(y)*sin(z); rot->ry2=cos(x)*cos(z) + sin(x)*sin(y)*sin(z); rot->ry3=cos(x)*sin(y)*sin(z) - sin(x)*cos(z); rot->rz1=sin(y); rot->rz2=sin(x)*cos(y); rot->rz3=cos(x)*cos(y); } static void Rotate3d(RotMat * rot, vector * vec) { vector tmp; tmp.x=(vec->x*(rot->rx1) + vec->y*(rot->rx2) + vec->z*(rot->rx3)); tmp.y=(vec->x*(rot->ry1) + vec->y*(rot->ry2) + vec->z*(rot->ry3)); tmp.z=(vec->x*(rot->rz1) + vec->y*(rot->rz2) + vec->z*(rot->rz3)); *vec=tmp; } static void Scale3d(vector * scale, vector * vec) { vec->x=vec->x * scale->x; vec->y=vec->y * scale->y; vec->z=vec->z * scale->z; } static void Trans3d(vector * trans, vector * vec) { vec->x+=trans->x; vec->y+=trans->y; vec->z+=trans->z; } static errcode GetString(FILE * dfile, const char * string) { char data[255]; fscanf(dfile,"%s",data); if (stringcmp(data, string) != 0) { fprintf(stderr, "parse: Expected %s, got %s \n",string, data); fprintf(stderr, "parse: Error while parsing object: %d \n",numobjectsparsed); return PARSEBADSYNTAX; } return PARSENOERR; } unsigned int readmodel(char * modelfile, SceneHandle scene) { FILE * dfile; errcode rc; reset_tex_table(); dfile=NULL; dfile=fopen(modelfile,"r"); if (dfile==NULL) { return PARSEBADFILE; } rc = GetScenedefs(dfile, scene); if (rc != PARSENOERR) { fclose(dfile); return rc; } scenebackcol.r = 0.0; /* default background is black */ scenebackcol.g = 0.0; scenebackcol.b = 0.0; numobjectsparsed=0; while ((rc = GetObject(dfile, scene)) == PARSENOERR) { numobjectsparsed++; } fclose(dfile); if (rc == PARSEEOF) rc = PARSENOERR; rt_background(scene, scenebackcol); return rc; } static errcode GetScenedefs(FILE * dfile, SceneHandle scene) { vector Ccenter, Cview, Cup; apiflt zoom, aspectratio; int raydepth, antialiasing; char outfilename[200]; int xres, yres, verbose; float a,b,c; errcode rc = PARSENOERR; rc |= GetString(dfile, "BEGIN_SCENE"); rc |= GetString(dfile, "OUTFILE"); fscanf(dfile, "%s", outfilename); #ifdef _WIN32 if (strcmp (outfilename, "/dev/null") == 0) { strcpy (outfilename, "NUL:"); } #endif rc |= GetString(dfile, "RESOLUTION"); fscanf(dfile, "%d %d", &xres, &yres); rc |= GetString(dfile, "VERBOSE"); fscanf(dfile, "%d", &verbose); rt_scenesetup(scene, outfilename, xres, yres, verbose); rc |= GetString(dfile, "CAMERA"); rc |= GetString(dfile, "ZOOM"); fscanf(dfile, "%f", &a); zoom=a; rc |= GetString(dfile, "ASPECTRATIO"); fscanf(dfile, "%f", &b); aspectratio=b; rc |= GetString(dfile, "ANTIALIASING"); fscanf(dfile, "%d", &antialiasing); rc |= GetString(dfile, "RAYDEPTH"); fscanf(dfile, "%d", &raydepth); rc |= GetString(dfile, "CENTER"); fscanf(dfile,"%f %f %f", &a, &b, &c); Ccenter.x = a; Ccenter.y = b; Ccenter.z = c; rc |= GetString(dfile, "VIEWDIR"); fscanf(dfile,"%f %f %f", &a, &b, &c); Cview.x = a; Cview.y = b; Cview.z = c; rc |= GetString(dfile, "UPDIR"); fscanf(dfile,"%f %f %f", &a, &b, &c); Cup.x = a; Cup.y = b; Cup.z = c; rc |= GetString(dfile, "END_CAMERA"); rt_camerasetup(scene, zoom, aspectratio, antialiasing, raydepth, Ccenter, Cview, Cup); return rc; } static errcode GetObject(FILE * dfile, SceneHandle scene) { char objtype[80]; fscanf(dfile, "%s", objtype); if (!stringcmp(objtype, "END_SCENE")) { return PARSEEOF; /* end parsing */ } if (!stringcmp(objtype, "TEXDEF")) { return GetTexDef(dfile); } if (!stringcmp(objtype, "TEXALIAS")) { return GetTexAlias(dfile); } if (!stringcmp(objtype, "BACKGROUND")) { return GetBackGnd(dfile); } if (!stringcmp(objtype, "CYLINDER")) { return GetCylinder(dfile); } if (!stringcmp(objtype, "FCYLINDER")) { return GetFCylinder(dfile); } if (!stringcmp(objtype, "POLYCYLINDER")) { return GetPolyCylinder(dfile); } if (!stringcmp(objtype, "SPHERE")) { return GetSphere(dfile); } if (!stringcmp(objtype, "PLANE")) { return GetPlane(dfile); } if (!stringcmp(objtype, "RING")) { return GetRing(dfile); } if (!stringcmp(objtype, "BOX")) { return GetBox(dfile); } if (!stringcmp(objtype, "SCALARVOL")) { return GetVol(dfile); } if (!stringcmp(objtype, "TRI")) { return GetTri(dfile); } if (!stringcmp(objtype, "STRI")) { return GetSTri(dfile); } if (!stringcmp(objtype, "LIGHT")) { return GetLight(dfile); } if (!stringcmp(objtype, "SCAPE")) { return GetLandScape(dfile); } if (!stringcmp(objtype, "TPOLYFILE")) { return GetTPolyFile(dfile); } fprintf(stderr, "Found bad token: %s expected an object type\n", objtype); return PARSEBADSYNTAX; } static errcode GetVector(FILE * dfile, vector * v1) { float a, b, c; fscanf(dfile, "%f %f %f", &a, &b, &c); v1->x=a; v1->y=b; v1->z=c; return PARSENOERR; } static errcode GetColor(FILE * dfile, color * c1) { float r, g, b; int rc; rc = GetString(dfile, "COLOR"); fscanf(dfile, "%f %f %f", &r, &g, &b); c1->r=r; c1->g=g; c1->b=b; return rc; } static errcode GetTexDef(FILE * dfile) { char texname[TEXNAMELEN]; fscanf(dfile, "%s", texname); add_texture(GetTexBody(dfile), texname); return PARSENOERR; } static errcode GetTexAlias(FILE * dfile) { char texname[TEXNAMELEN]; char aliasname[TEXNAMELEN]; fscanf(dfile, "%s", texname); fscanf(dfile, "%s", aliasname); add_texture(find_texture(aliasname), texname); return PARSENOERR; } static errcode GetTexture(FILE * dfile, void ** tex) { char tmp[255]; errcode rc = PARSENOERR; fscanf(dfile, "%s", tmp); if (!stringcmp("TEXTURE", tmp)) { *tex = GetTexBody(dfile); } else *tex = find_texture(tmp); return rc; } void * GetTexBody(FILE * dfile) { char tmp[255]; float a,b,c,d, phong, phongexp, phongtype; apitexture tex; void * voidtex; errcode rc; rc = GetString(dfile, "AMBIENT"); fscanf(dfile, "%f", &a); tex.ambient=a; rc |= GetString(dfile, "DIFFUSE"); fscanf(dfile, "%f", &b); tex.diffuse=b; rc |= GetString(dfile, "SPECULAR"); fscanf(dfile, "%f", &c); tex.specular=c; rc |= GetString(dfile, "OPACITY"); fscanf(dfile, "%f", &d); tex.opacity=d; fscanf(dfile, "%s", tmp); if (!stringcmp("PHONG", tmp)) { fscanf(dfile, "%s", tmp); if (!stringcmp("METAL", tmp)) { phongtype = RT_PHONG_METAL; } else if (!stringcmp("PLASTIC", tmp)) { phongtype = RT_PHONG_PLASTIC; } else { phongtype = RT_PHONG_PLASTIC; } fscanf(dfile, "%f", &phong); GetString(dfile, "PHONG_SIZE"); fscanf(dfile, "%f", &phongexp); fscanf(dfile, "%s", tmp); } else { phong = 0.0; phongexp = 100.0; phongtype = RT_PHONG_PLASTIC; } fscanf(dfile, "%f %f %f", &a, &b, &c); tex.col.r = a; tex.col.g = b; tex.col.b = c; rc |= GetString(dfile, "TEXFUNC"); fscanf(dfile, "%d", &tex.texturefunc); if (tex.texturefunc >= 7) { /* if its an image map, we need a filename */ fscanf(dfile, "%s", tex.imap); } if (tex.texturefunc != 0) { rc |= GetString(dfile, "CENTER"); rc |= GetVector(dfile, &tex.ctr); rc |= GetString(dfile, "ROTATE"); rc |= GetVector(dfile, &tex.rot); rc |= GetString(dfile, "SCALE"); rc |= GetVector(dfile, &tex.scale); } if (tex.texturefunc == 9) { rc |= GetString(dfile, "UAXIS"); rc |= GetVector(dfile, &tex.uaxs); rc |= GetString(dfile, "VAXIS"); rc |= GetVector(dfile, &tex.vaxs); } voidtex = rt_texture(&tex); rt_tex_phong(voidtex, phong, phongexp, (int) phongtype); return voidtex; } static errcode GetLight(FILE * dfile) { apiflt rad; vector ctr; apitexture tex; float a; errcode rc; memset(&tex, 0, sizeof(apitexture)); rc = GetString(dfile,"CENTER"); rc |= GetVector(dfile, &ctr); rc |= GetString(dfile,"RAD"); fscanf(dfile,"%f",&a); /* read in radius */ rad=a; rc |= GetColor(dfile, &tex.col); rt_light(rt_texture(&tex), ctr, rad); return rc; } static errcode GetBackGnd(FILE * dfile) { float r,g,b; fscanf(dfile, "%f %f %f", &r, &g, &b); scenebackcol.r=r; scenebackcol.g=g; scenebackcol.b=b; return PARSENOERR; } static errcode GetCylinder(FILE * dfile) { apiflt rad; vector ctr, axis; void * tex; float a; errcode rc; rc = GetString(dfile, "CENTER"); rc |= GetVector(dfile, &ctr); rc |= GetString(dfile, "AXIS"); rc |= GetVector(dfile, &axis); rc |= GetString(dfile, "RAD"); fscanf(dfile, "%f", &a); rad=a; rc |= GetTexture(dfile, &tex); rt_cylinder(tex, ctr, axis, rad); return rc; } static errcode GetFCylinder(FILE * dfile) { apiflt rad; vector ctr, axis; vector pnt1, pnt2; void * tex; float a; errcode rc; rc = GetString(dfile, "BASE"); rc |= GetVector(dfile, &pnt1); rc |= GetString(dfile, "APEX"); rc |= GetVector(dfile, &pnt2); ctr=pnt1; axis.x=pnt2.x - pnt1.x; axis.y=pnt2.y - pnt1.y; axis.z=pnt2.z - pnt1.z; rc |= GetString(dfile, "RAD"); fscanf(dfile, "%f", &a); rad=a; rc |= GetTexture(dfile, &tex); rt_fcylinder(tex, ctr, axis, rad); return rc; } static errcode GetPolyCylinder(FILE * dfile) { apiflt rad; vector * temp; void * tex; float a; int numpts, i; errcode rc; rc = GetString(dfile, "POINTS"); fscanf(dfile, "%d", &numpts); temp = (vector *) malloc(numpts * sizeof(vector)); for (i=0; i<numpts; i++) { rc |= GetVector(dfile, &temp[i]); } rc |= GetString(dfile, "RAD"); fscanf(dfile, "%f", &a); rad=a; rc |= GetTexture(dfile, &tex); rt_polycylinder(tex, temp, numpts, rad); free(temp); return rc; } static errcode GetSphere(FILE * dfile) { apiflt rad; vector ctr; void * tex; float a; errcode rc; rc = GetString(dfile,"CENTER"); rc |= GetVector(dfile, &ctr); rc |= GetString(dfile, "RAD"); fscanf(dfile,"%f",&a); rad=a; rc |= GetTexture(dfile, &tex); rt_sphere(tex, ctr, rad); return rc; } static errcode GetPlane(FILE * dfile) { vector normal; vector ctr; void * tex; errcode rc; rc = GetString(dfile, "CENTER"); rc |= GetVector(dfile, &ctr); rc |= GetString(dfile, "NORMAL"); rc |= GetVector(dfile, &normal); rc |= GetTexture(dfile, &tex); rt_plane(tex, ctr, normal); return rc; } static errcode GetVol(FILE * dfile) { vector min, max; int x,y,z; char fname[255]; void * tex; errcode rc; rc = GetString(dfile, "MIN"); rc |= GetVector(dfile, &min); rc |= GetString(dfile, "MAX"); rc |= GetVector(dfile, &max); rc |= GetString(dfile, "DIM"); fscanf(dfile, "%d %d %d ", &x, &y, &z); rc |= GetString(dfile, "FILE"); fscanf(dfile, "%s", fname); rc |= GetTexture(dfile, &tex); rt_scalarvol(tex, min, max, x, y, z, fname, NULL); return rc; } static errcode GetBox(FILE * dfile) { vector min, max; void * tex; errcode rc; rc = GetString(dfile, "MIN"); rc |= GetVector(dfile, &min); rc |= GetString(dfile, "MAX"); rc |= GetVector(dfile, &max); rc |= GetTexture(dfile, &tex); rt_box(tex, min, max); return rc; } static errcode GetRing(FILE * dfile) { vector normal; vector ctr; void * tex; float a,b; errcode rc; rc = GetString(dfile, "CENTER"); rc |= GetVector(dfile, &ctr); rc |= GetString(dfile, "NORMAL"); rc |= GetVector(dfile, &normal); rc |= GetString(dfile, "INNER"); fscanf(dfile, " %f ", &a); rc |= GetString(dfile, "OUTER"); fscanf(dfile, " %f ", &b); rc |= GetTexture(dfile, &tex); rt_ring(tex, ctr, normal, a, b); return rc; } static errcode GetTri(FILE * dfile) { vector v0,v1,v2; void * tex; errcode rc; rc = GetString(dfile, "V0"); rc |= GetVector(dfile, &v0); rc |= GetString(dfile, "V1"); rc |= GetVector(dfile, &v1); rc |= GetString(dfile, "V2"); rc |= GetVector(dfile, &v2); rc |= GetTexture(dfile, &tex); rt_tri(tex, v0, v1, v2); return rc; } static errcode GetSTri(FILE * dfile) { vector v0,v1,v2,n0,n1,n2; void * tex; errcode rc; rc = GetString(dfile, "V0"); rc |= GetVector(dfile, &v0); rc |= GetString(dfile, "V1"); rc |= GetVector(dfile, &v1); rc |= GetString(dfile, "V2"); rc |= GetVector(dfile, &v2); rc |= GetString(dfile, "N0"); rc |= GetVector(dfile, &n0); rc |= GetString(dfile, "N1"); rc |= GetVector(dfile, &n1); rc |= GetString(dfile, "N2"); rc |= GetVector(dfile, &n2); rc |= GetTexture(dfile, &tex); rt_stri(tex, v0, v1, v2, n0, n1, n2); return rc; } static errcode GetLandScape(FILE * dfile) { void * tex; vector ctr; apiflt wx, wy; int m, n; float a,b; errcode rc; rc = GetString(dfile, "RES"); fscanf(dfile, "%d %d", &m, &n); rc |= GetString(dfile, "SCALE"); fscanf(dfile, "%f %f", &a, &b); wx=a; wy=b; rc |= GetString(dfile, "CENTER"); rc |= GetVector(dfile, &ctr); rc |= GetTexture(dfile, &tex); rt_landscape(tex, m, n, ctr, wx, wy); return rc; } static errcode GetTPolyFile(FILE * dfile) { void * tex; vector ctr, rot, scale; vector v1, v2, v0; char ifname[255]; FILE *ifp; int v, totalpolys; RotMat RotA; errcode rc; totalpolys=0; rc = GetString(dfile, "SCALE"); rc |= GetVector(dfile, &scale); rc |= GetString(dfile, "ROT"); rc |= GetVector(dfile, &rot); degvectoradvec(&rot); InitRot3d(&RotA, rot.x, rot.y, rot.z); rc |= GetString(dfile, "CENTER"); rc |= GetVector(dfile, &ctr); rc |= GetString(dfile, "FILE"); fscanf(dfile, "%s", ifname); rc |= GetTexture(dfile, &tex); if ((ifp=fopen(ifname, "r")) == NULL) { fprintf(stderr, "Can't open data file %s for input!! Aborting...\n", ifname); return PARSEBADSUBFILE; } while (!feof(ifp)) { fscanf(ifp, "%d", &v); if (v != 3) { break; } totalpolys++; v=0; rc |= GetVector(ifp, &v0); rc |= GetVector(ifp, &v1); rc |= GetVector(ifp, &v2); Scale3d(&scale, &v0); Scale3d(&scale, &v1); Scale3d(&scale, &v2); Rotate3d(&RotA, &v0); Rotate3d(&RotA, &v1); Rotate3d(&RotA, &v2); Trans3d(&ctr, &v0); Trans3d(&ctr, &v1); Trans3d(&ctr, &v2); rt_tri(tex, v1, v0, v2); } fclose(ifp); return rc; }
a90d2649ab875cfc2c94a95c1aff9233a3be2712
7641c1ec3178d1dfbd39f91b8f0d692b9cb04d78
/Tetris_Clover/high_score.h
742b32228ff74eb107f253d0e750e69de0c4b1ff
[]
no_license
qqqqzift/Tetris_Clover
5d8d6bb79ab50d5bfb4cdfcb5e3a62d9b946ac4a
5bd4981a51d89b28ded937f2e89f31cbfa9bf6fc
refs/heads/master
2020-04-11T06:00:36.629446
2014-02-25T13:53:38
2014-02-25T13:53:38
null
0
0
null
null
null
null
UTF-8
C++
false
false
235
h
#ifndef HIGH_SCORE #define HIGH_SCORE #include <list> using namespace std; class HighScore{ public: list<int> m_high_score; bool LoadHighScore(); void UpdateHighScore(int); void End(){ m_high_score.clear(); } }; #endif