hexsha stringlengths 40 40 | size int64 7 1.05M | ext stringclasses 13
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 269 | max_stars_repo_name stringlengths 5 109 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 9 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 269 | max_issues_repo_name stringlengths 5 116 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 9 | max_issues_count int64 1 48.5k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 269 | max_forks_repo_name stringlengths 5 116 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 9 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 7 1.05M | avg_line_length float64 1.21 330k | max_line_length int64 6 990k | alphanum_fraction float64 0.01 0.99 | author_id stringlengths 2 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4e0f1c6eb87b82cea1b56682a957f6a7adb696b1 | 245 | cc | C++ | Emscripten/em_asm_/em_asm_.cc | stephenfire/Book-DISO-WebAssembly | 35054b59caa4284680d7dd73bf2637de5631caa7 | [
"MIT"
] | 57 | 2018-02-14T02:12:00.000Z | 2022-03-04T09:12:26.000Z | Emscripten/em_asm_/em_asm_.cc | stephenfire/Book-DISO-WebAssembly | 35054b59caa4284680d7dd73bf2637de5631caa7 | [
"MIT"
] | 15 | 2018-08-23T12:37:53.000Z | 2021-05-09T10:22:27.000Z | Emscripten/em_asm_/em_asm_.cc | stephenfire/Book-DISO-WebAssembly | 35054b59caa4284680d7dd73bf2637de5631caa7 | [
"MIT"
] | 15 | 2019-01-27T09:35:19.000Z | 2022-02-03T13:56:03.000Z | #include <emscripten.h>
#include <iostream>
using namespace std;
int main (int argc, char **argv) {
int x = 100;
int y = EM_ASM_({
console.log("This value is from C++: ", $0);
return 10;
}, x);
cout << y << endl;
return 0;
}
| 16.333333 | 48 | 0.579592 | stephenfire |
4e1b0734caad480a361ef9049621f122aed0c125 | 876 | hpp | C++ | include/elasty/cloth-sim-object.hpp | 0x0c/elasty | 3995cacbefa8d7f39249e9f75fa291828e2e7c2d | [
"MIT"
] | null | null | null | include/elasty/cloth-sim-object.hpp | 0x0c/elasty | 3995cacbefa8d7f39249e9f75fa291828e2e7c2d | [
"MIT"
] | null | null | null | include/elasty/cloth-sim-object.hpp | 0x0c/elasty | 3995cacbefa8d7f39249e9f75fa291828e2e7c2d | [
"MIT"
] | null | null | null | #ifndef cloth_sim_object_hpp
#define cloth_sim_object_hpp
#include <elasty/sim-object.hpp>
#include <string>
#include <Eigen/Core>
#include <Eigen/Geometry>
namespace elasty
{
class ClothSimObject : public SimObject
{
public:
enum class Strategy
{
Bending,
IsometricBending,
Cross,
};
using TriangleList = Eigen::Matrix<int32_t, Eigen::Dynamic, 3, Eigen::RowMajor>;
ClothSimObject(const std::string& obj_path,
const double distance_stiffness = 0.90,
const double bending_stiffness = 0.50,
const Eigen::Affine3d& transform = Eigen::Affine3d::Identity(),
const Strategy strategy = Strategy::IsometricBending);
TriangleList m_triangle_list;
};
}
#endif /* cloth_sim_object_hpp */
| 25.028571 | 88 | 0.606164 | 0x0c |
4e206c705787e9fb8d030f1e407867ad49c4d54c | 226,423 | cpp | C++ | bnn/src/network/output/hls-syn/lfcW1A1-pynqZ1-Z2/sol1/syn/systemc/Matrix_Vector_Activa_1_2.cpp | IceyFong/Lutification | 3e42d34d6840d5deb84407aad5c58216527a4b0a | [
"BSD-3-Clause"
] | null | null | null | bnn/src/network/output/hls-syn/lfcW1A1-pynqZ1-Z2/sol1/syn/systemc/Matrix_Vector_Activa_1_2.cpp | IceyFong/Lutification | 3e42d34d6840d5deb84407aad5c58216527a4b0a | [
"BSD-3-Clause"
] | null | null | null | bnn/src/network/output/hls-syn/lfcW1A1-pynqZ1-Z2/sol1/syn/systemc/Matrix_Vector_Activa_1_2.cpp | IceyFong/Lutification | 3e42d34d6840d5deb84407aad5c58216527a4b0a | [
"BSD-3-Clause"
] | null | null | null | #include "Matrix_Vector_Activa_1.h"
#include "AESL_pkg.h"
using namespace std;
namespace ap_rtl {
void Matrix_Vector_Activa_1::thread_ap_clk_no_reset_() {
if ( ap_rst.read() == ap_const_logic_1) {
ap_CS_fsm = ap_ST_fsm_state1;
} else {
ap_CS_fsm = ap_NS_fsm.read();
}
if ( ap_rst.read() == ap_const_logic_1) {
ap_done_reg = ap_const_logic_0;
} else {
if (esl_seteq<1,1,1>(ap_const_logic_1, ap_continue.read())) {
ap_done_reg = ap_const_logic_0;
} else if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_state7.read()))) {
ap_done_reg = ap_const_logic_1;
}
}
if ( ap_rst.read() == ap_const_logic_1) {
ap_enable_reg_pp0_iter0 = ap_const_logic_0;
} else {
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_i_fu_1686_p2.read()))) {
ap_enable_reg_pp0_iter0 = ap_const_logic_0;
} else if ((esl_seteq<1,1,1>(ap_CS_fsm_state1.read(), ap_const_lv1_1) &&
!esl_seteq<1,1,1>(ap_condition_300.read(), ap_const_boolean_1))) {
ap_enable_reg_pp0_iter0 = ap_const_logic_1;
}
}
if ( ap_rst.read() == ap_const_logic_1) {
ap_enable_reg_pp0_iter1 = ap_const_logic_0;
} else {
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_i_fu_1686_p2.read()))) {
ap_enable_reg_pp0_iter1 = ap_const_logic_1;
} else if (((esl_seteq<1,1,1>(ap_CS_fsm_state1.read(), ap_const_lv1_1) &&
!esl_seteq<1,1,1>(ap_condition_300.read(), ap_const_boolean_1)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_i_fu_1686_p2.read())))) {
ap_enable_reg_pp0_iter1 = ap_const_logic_0;
}
}
if ( ap_rst.read() == ap_const_logic_1) {
ap_enable_reg_pp0_iter2 = ap_const_logic_0;
} else {
if (!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0)))) {
ap_enable_reg_pp0_iter2 = ap_enable_reg_pp0_iter1.read();
}
}
if ( ap_rst.read() == ap_const_logic_1) {
ap_enable_reg_pp0_iter3 = ap_const_logic_0;
} else {
if (!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0)))) {
ap_enable_reg_pp0_iter3 = ap_enable_reg_pp0_iter2.read();
}
}
if ( ap_rst.read() == ap_const_logic_1) {
ap_enable_reg_pp0_iter4 = ap_const_logic_0;
} else {
if (!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0)))) {
ap_enable_reg_pp0_iter4 = ap_enable_reg_pp0_iter3.read();
} else if ((esl_seteq<1,1,1>(ap_CS_fsm_state1.read(), ap_const_lv1_1) &&
!esl_seteq<1,1,1>(ap_condition_300.read(), ap_const_boolean_1))) {
ap_enable_reg_pp0_iter4 = ap_const_logic_0;
}
}
if (((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_7F)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_7E)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_7D)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_7C)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_7B)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_7A)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_79)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_78)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_77)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_76)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_75)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_74)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_73)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_72)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_71)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_70)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_6F)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_6E)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_6D)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_6C)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_6B)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_6A)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_69)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_68)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_67)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_66)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_65)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_64)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_63)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_62)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_61)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_60)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_5F)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_5E)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_5D)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_5C)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_5B)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_5A)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_59)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_58)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_57)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_56)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_55)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_54)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_53)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_52)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_51)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_50)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_4F)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_4E)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_4D)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_4C)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_4B)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_4A)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_49)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_48)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_47)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_46)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_45)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_44)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_43)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_42)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_41)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_40)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_3F)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_3E)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_3D)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_3C)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_3B)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_3A)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_39)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_38)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_37)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_36)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_35)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_34)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_33)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_32)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_31)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_30)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_2F)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_2E)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_2D)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_2C)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_2B)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_2A)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_29)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_28)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_27)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_26)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_25)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_24)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_23)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_22)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_21)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_20)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_1F)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_1E)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_1D)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_1C)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_1B)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_1A)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_19)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_18)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_17)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_16)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_15)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_14)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_13)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_12)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_11)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_10)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_F)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_E)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_D)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_C)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_B)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_A)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_9)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_8)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_7)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_6)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_5)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_4)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_3)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_2)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_1)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_0)))) {
ap_phi_precharge_reg_pp0_iter2_act_m_val_V_reg_1402 = in_V_V_dout.read();
} else if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))))) {
ap_phi_precharge_reg_pp0_iter2_act_m_val_V_reg_1402 = ap_phi_precharge_reg_pp0_iter1_act_m_val_V_reg_1402.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter0.read()) &&
esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_i_fu_1686_p2.read()))) {
i_i_reg_1391 = i_fu_1691_p2.read();
} else if ((esl_seteq<1,1,1>(ap_CS_fsm_state1.read(), ap_const_lv1_1) &&
!esl_seteq<1,1,1>(ap_condition_300.read(), ap_const_boolean_1))) {
i_i_reg_1391 = ap_const_lv32_0;
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter0.read()) &&
esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_i_fu_1686_p2.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_5_i_fu_1732_p2.read()))) {
nf_assign_fu_976 = p_i_fu_1758_p3.read();
} else if ((esl_seteq<1,1,1>(ap_CS_fsm_state1.read(), ap_const_lv1_1) &&
!esl_seteq<1,1,1>(ap_condition_300.read(), ap_const_boolean_1))) {
nf_assign_fu_976 = ap_const_lv32_0;
}
if ( ap_rst.read() == ap_const_logic_1) {
real_start_status_reg = ap_const_logic_0;
} else {
if (!esl_seteq<1,1,1>(ap_const_logic_0, start_full_n.read())) {
real_start_status_reg = ap_const_logic_0;
} else if ((esl_seteq<1,1,1>(ap_const_logic_0, start_full_n.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, internal_ap_ready.read()))) {
real_start_status_reg = ap_const_logic_1;
}
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter0.read()) &&
esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_i_fu_1686_p2.read()) &&
esl_seteq<1,1,1>(ap_const_lv1_0, tmp_5_i_fu_1732_p2.read()))) {
sf_3_fu_460 = sf_fu_1726_p2.read();
} else if (((esl_seteq<1,1,1>(ap_CS_fsm_state1.read(), ap_const_lv1_1) &&
!esl_seteq<1,1,1>(ap_condition_300.read(), ap_const_boolean_1)) ||
(esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter0.read()) &&
esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_i_fu_1686_p2.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_5_i_fu_1732_p2.read())))) {
sf_3_fu_460 = ap_const_lv32_0;
}
if ( ap_rst.read() == ap_const_logic_1) {
start_control_reg = ap_const_logic_0;
} else {
if ((esl_seteq<1,1,1>(ap_const_logic_1, real_start.read()) &&
(esl_seteq<1,1,1>(ap_const_logic_1, internal_ap_ready.read()) ||
esl_seteq<1,1,1>(ap_const_logic_0, start_once_reg.read())))) {
start_control_reg = ap_const_logic_1;
} else if ((esl_seteq<1,1,1>(ap_const_logic_1, start_control_reg.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, start_full_n.read()))) {
start_control_reg = ap_const_logic_0;
}
}
if ( ap_rst.read() == ap_const_logic_1) {
start_once_reg = ap_const_logic_0;
} else {
if (esl_seteq<1,1,1>(ap_const_logic_1, real_start.read())) {
start_once_reg = ap_const_logic_1;
} else if (esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read())) {
start_once_reg = ap_const_logic_0;
}
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, tmp_5_i_reg_8361.read()))) {
tile_assign_fu_456 = p_2_i_fu_3090_p3.read();
} else if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,1,1>(ap_const_lv1_0, tmp_5_i_reg_8361.read()))) {
tile_assign_fu_456 = tile_fu_3079_p2.read();
} else if ((esl_seteq<1,1,1>(ap_CS_fsm_state1.read(), ap_const_lv1_1) &&
!esl_seteq<1,1,1>(ap_condition_300.read(), ap_const_boolean_1))) {
tile_assign_fu_456 = ap_const_lv32_0;
}
if (!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0)))) {
accu_0_0_V_reg_9312 = accu_0_0_V_fu_5919_p2.read();
accu_0_10_V_reg_9362 = accu_0_10_V_fu_6799_p2.read();
accu_0_11_V_reg_9367 = accu_0_11_V_fu_6887_p2.read();
accu_0_12_V_reg_9372 = accu_0_12_V_fu_6975_p2.read();
accu_0_13_V_reg_9377 = accu_0_13_V_fu_7063_p2.read();
accu_0_14_V_reg_9382 = accu_0_14_V_fu_7151_p2.read();
accu_0_15_V_reg_9387 = accu_0_15_V_fu_7239_p2.read();
accu_0_1_V_reg_9317 = accu_0_1_V_fu_6007_p2.read();
accu_0_2_V_reg_9322 = accu_0_2_V_fu_6095_p2.read();
accu_0_3_V_reg_9327 = accu_0_3_V_fu_6183_p2.read();
accu_0_4_V_reg_9332 = accu_0_4_V_fu_6271_p2.read();
accu_0_5_V_reg_9337 = accu_0_5_V_fu_6359_p2.read();
accu_0_6_V_reg_9342 = accu_0_6_V_fu_6447_p2.read();
accu_0_7_V_reg_9347 = accu_0_7_V_fu_6535_p2.read();
accu_0_8_V_reg_9352 = accu_0_8_V_fu_6623_p2.read();
accu_0_9_V_reg_9357 = accu_0_9_V_fu_6711_p2.read();
ap_pipeline_reg_pp0_iter2_tmp_4_i_reg_8341 = ap_pipeline_reg_pp0_iter1_tmp_4_i_reg_8341.read();
ap_pipeline_reg_pp0_iter2_tmp_5_i_reg_8361 = ap_pipeline_reg_pp0_iter1_tmp_5_i_reg_8361.read();
ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361 = ap_pipeline_reg_pp0_iter2_tmp_5_i_reg_8361.read();
tmp_41_0_1_i_reg_8597 = tmp_41_0_1_i_fu_3144_p2.read();
tmp_41_0_2_i_reg_8602 = tmp_41_0_2_i_fu_3172_p2.read();
tmp_41_0_3_i_reg_8607 = tmp_41_0_3_i_fu_3200_p2.read();
tmp_41_0_4_i_reg_8612 = tmp_41_0_4_i_fu_3228_p2.read();
tmp_41_0_5_i_reg_8617 = tmp_41_0_5_i_fu_3256_p2.read();
tmp_41_0_6_i_reg_8622 = tmp_41_0_6_i_fu_3284_p2.read();
tmp_41_0_7_i_reg_8627 = tmp_41_0_7_i_fu_3312_p2.read();
tmp_41_0_i_reg_8592 = tmp_41_0_i_fu_3116_p2.read();
tmp_41_10_1_i_reg_8997 = tmp_41_10_1_i_fu_4752_p2.read();
tmp_41_10_2_i_reg_9002 = tmp_41_10_2_i_fu_4772_p2.read();
tmp_41_10_3_i_reg_9007 = tmp_41_10_3_i_fu_4792_p2.read();
tmp_41_10_4_i_reg_9012 = tmp_41_10_4_i_fu_4812_p2.read();
tmp_41_10_5_i_reg_9017 = tmp_41_10_5_i_fu_4832_p2.read();
tmp_41_10_6_i_reg_9022 = tmp_41_10_6_i_fu_4852_p2.read();
tmp_41_10_7_i_reg_9027 = tmp_41_10_7_i_fu_4872_p2.read();
tmp_41_10_i_reg_8992 = tmp_41_10_i_fu_4732_p2.read();
tmp_41_11_1_i_reg_9037 = tmp_41_11_1_i_fu_4908_p2.read();
tmp_41_11_2_i_reg_9042 = tmp_41_11_2_i_fu_4928_p2.read();
tmp_41_11_3_i_reg_9047 = tmp_41_11_3_i_fu_4948_p2.read();
tmp_41_11_4_i_reg_9052 = tmp_41_11_4_i_fu_4968_p2.read();
tmp_41_11_5_i_reg_9057 = tmp_41_11_5_i_fu_4988_p2.read();
tmp_41_11_6_i_reg_9062 = tmp_41_11_6_i_fu_5008_p2.read();
tmp_41_11_7_i_reg_9067 = tmp_41_11_7_i_fu_5028_p2.read();
tmp_41_11_i_reg_9032 = tmp_41_11_i_fu_4888_p2.read();
tmp_41_12_1_i_reg_9077 = tmp_41_12_1_i_fu_5064_p2.read();
tmp_41_12_2_i_reg_9082 = tmp_41_12_2_i_fu_5084_p2.read();
tmp_41_12_3_i_reg_9087 = tmp_41_12_3_i_fu_5104_p2.read();
tmp_41_12_4_i_reg_9092 = tmp_41_12_4_i_fu_5124_p2.read();
tmp_41_12_5_i_reg_9097 = tmp_41_12_5_i_fu_5144_p2.read();
tmp_41_12_6_i_reg_9102 = tmp_41_12_6_i_fu_5164_p2.read();
tmp_41_12_7_i_reg_9107 = tmp_41_12_7_i_fu_5184_p2.read();
tmp_41_12_i_reg_9072 = tmp_41_12_i_fu_5044_p2.read();
tmp_41_13_1_i_reg_9117 = tmp_41_13_1_i_fu_5220_p2.read();
tmp_41_13_2_i_reg_9122 = tmp_41_13_2_i_fu_5240_p2.read();
tmp_41_13_3_i_reg_9127 = tmp_41_13_3_i_fu_5260_p2.read();
tmp_41_13_4_i_reg_9132 = tmp_41_13_4_i_fu_5280_p2.read();
tmp_41_13_5_i_reg_9137 = tmp_41_13_5_i_fu_5300_p2.read();
tmp_41_13_6_i_reg_9142 = tmp_41_13_6_i_fu_5320_p2.read();
tmp_41_13_7_i_reg_9147 = tmp_41_13_7_i_fu_5340_p2.read();
tmp_41_13_i_reg_9112 = tmp_41_13_i_fu_5200_p2.read();
tmp_41_14_1_i_reg_9157 = tmp_41_14_1_i_fu_5376_p2.read();
tmp_41_14_2_i_reg_9162 = tmp_41_14_2_i_fu_5396_p2.read();
tmp_41_14_3_i_reg_9167 = tmp_41_14_3_i_fu_5416_p2.read();
tmp_41_14_4_i_reg_9172 = tmp_41_14_4_i_fu_5436_p2.read();
tmp_41_14_5_i_reg_9177 = tmp_41_14_5_i_fu_5456_p2.read();
tmp_41_14_6_i_reg_9182 = tmp_41_14_6_i_fu_5476_p2.read();
tmp_41_14_7_i_reg_9187 = tmp_41_14_7_i_fu_5496_p2.read();
tmp_41_14_i_reg_9152 = tmp_41_14_i_fu_5356_p2.read();
tmp_41_15_1_i_reg_9197 = tmp_41_15_1_i_fu_5532_p2.read();
tmp_41_15_2_i_reg_9202 = tmp_41_15_2_i_fu_5552_p2.read();
tmp_41_15_3_i_reg_9207 = tmp_41_15_3_i_fu_5572_p2.read();
tmp_41_15_4_i_reg_9212 = tmp_41_15_4_i_fu_5592_p2.read();
tmp_41_15_5_i_reg_9217 = tmp_41_15_5_i_fu_5612_p2.read();
tmp_41_15_6_i_reg_9222 = tmp_41_15_6_i_fu_5632_p2.read();
tmp_41_15_7_i_reg_9227 = tmp_41_15_7_i_fu_5652_p2.read();
tmp_41_15_i_reg_9192 = tmp_41_15_i_fu_5512_p2.read();
tmp_41_1_1_i_reg_8637 = tmp_41_1_1_i_fu_3348_p2.read();
tmp_41_1_2_i_reg_8642 = tmp_41_1_2_i_fu_3368_p2.read();
tmp_41_1_3_i_reg_8647 = tmp_41_1_3_i_fu_3388_p2.read();
tmp_41_1_4_i_reg_8652 = tmp_41_1_4_i_fu_3408_p2.read();
tmp_41_1_5_i_reg_8657 = tmp_41_1_5_i_fu_3428_p2.read();
tmp_41_1_6_i_reg_8662 = tmp_41_1_6_i_fu_3448_p2.read();
tmp_41_1_7_i_reg_8667 = tmp_41_1_7_i_fu_3468_p2.read();
tmp_41_1_i_reg_8632 = tmp_41_1_i_fu_3328_p2.read();
tmp_41_2_1_i_reg_8677 = tmp_41_2_1_i_fu_3504_p2.read();
tmp_41_2_2_i_reg_8682 = tmp_41_2_2_i_fu_3524_p2.read();
tmp_41_2_3_i_reg_8687 = tmp_41_2_3_i_fu_3544_p2.read();
tmp_41_2_4_i_reg_8692 = tmp_41_2_4_i_fu_3564_p2.read();
tmp_41_2_5_i_reg_8697 = tmp_41_2_5_i_fu_3584_p2.read();
tmp_41_2_6_i_reg_8702 = tmp_41_2_6_i_fu_3604_p2.read();
tmp_41_2_7_i_reg_8707 = tmp_41_2_7_i_fu_3624_p2.read();
tmp_41_2_i_reg_8672 = tmp_41_2_i_fu_3484_p2.read();
tmp_41_3_1_i_reg_8717 = tmp_41_3_1_i_fu_3660_p2.read();
tmp_41_3_2_i_reg_8722 = tmp_41_3_2_i_fu_3680_p2.read();
tmp_41_3_3_i_reg_8727 = tmp_41_3_3_i_fu_3700_p2.read();
tmp_41_3_4_i_reg_8732 = tmp_41_3_4_i_fu_3720_p2.read();
tmp_41_3_5_i_reg_8737 = tmp_41_3_5_i_fu_3740_p2.read();
tmp_41_3_6_i_reg_8742 = tmp_41_3_6_i_fu_3760_p2.read();
tmp_41_3_7_i_reg_8747 = tmp_41_3_7_i_fu_3780_p2.read();
tmp_41_3_i_reg_8712 = tmp_41_3_i_fu_3640_p2.read();
tmp_41_4_1_i_reg_8757 = tmp_41_4_1_i_fu_3816_p2.read();
tmp_41_4_2_i_reg_8762 = tmp_41_4_2_i_fu_3836_p2.read();
tmp_41_4_3_i_reg_8767 = tmp_41_4_3_i_fu_3856_p2.read();
tmp_41_4_4_i_reg_8772 = tmp_41_4_4_i_fu_3876_p2.read();
tmp_41_4_5_i_reg_8777 = tmp_41_4_5_i_fu_3896_p2.read();
tmp_41_4_6_i_reg_8782 = tmp_41_4_6_i_fu_3916_p2.read();
tmp_41_4_7_i_reg_8787 = tmp_41_4_7_i_fu_3936_p2.read();
tmp_41_4_i_reg_8752 = tmp_41_4_i_fu_3796_p2.read();
tmp_41_5_1_i_reg_8797 = tmp_41_5_1_i_fu_3972_p2.read();
tmp_41_5_2_i_reg_8802 = tmp_41_5_2_i_fu_3992_p2.read();
tmp_41_5_3_i_reg_8807 = tmp_41_5_3_i_fu_4012_p2.read();
tmp_41_5_4_i_reg_8812 = tmp_41_5_4_i_fu_4032_p2.read();
tmp_41_5_5_i_reg_8817 = tmp_41_5_5_i_fu_4052_p2.read();
tmp_41_5_6_i_reg_8822 = tmp_41_5_6_i_fu_4072_p2.read();
tmp_41_5_7_i_reg_8827 = tmp_41_5_7_i_fu_4092_p2.read();
tmp_41_5_i_reg_8792 = tmp_41_5_i_fu_3952_p2.read();
tmp_41_6_1_i_reg_8837 = tmp_41_6_1_i_fu_4128_p2.read();
tmp_41_6_2_i_reg_8842 = tmp_41_6_2_i_fu_4148_p2.read();
tmp_41_6_3_i_reg_8847 = tmp_41_6_3_i_fu_4168_p2.read();
tmp_41_6_4_i_reg_8852 = tmp_41_6_4_i_fu_4188_p2.read();
tmp_41_6_5_i_reg_8857 = tmp_41_6_5_i_fu_4208_p2.read();
tmp_41_6_6_i_reg_8862 = tmp_41_6_6_i_fu_4228_p2.read();
tmp_41_6_7_i_reg_8867 = tmp_41_6_7_i_fu_4248_p2.read();
tmp_41_6_i_reg_8832 = tmp_41_6_i_fu_4108_p2.read();
tmp_41_7_1_i_reg_8877 = tmp_41_7_1_i_fu_4284_p2.read();
tmp_41_7_2_i_reg_8882 = tmp_41_7_2_i_fu_4304_p2.read();
tmp_41_7_3_i_reg_8887 = tmp_41_7_3_i_fu_4324_p2.read();
tmp_41_7_4_i_reg_8892 = tmp_41_7_4_i_fu_4344_p2.read();
tmp_41_7_5_i_reg_8897 = tmp_41_7_5_i_fu_4364_p2.read();
tmp_41_7_6_i_reg_8902 = tmp_41_7_6_i_fu_4384_p2.read();
tmp_41_7_7_i_reg_8907 = tmp_41_7_7_i_fu_4404_p2.read();
tmp_41_7_i_reg_8872 = tmp_41_7_i_fu_4264_p2.read();
tmp_41_8_1_i_reg_8917 = tmp_41_8_1_i_fu_4440_p2.read();
tmp_41_8_2_i_reg_8922 = tmp_41_8_2_i_fu_4460_p2.read();
tmp_41_8_3_i_reg_8927 = tmp_41_8_3_i_fu_4480_p2.read();
tmp_41_8_4_i_reg_8932 = tmp_41_8_4_i_fu_4500_p2.read();
tmp_41_8_5_i_reg_8937 = tmp_41_8_5_i_fu_4520_p2.read();
tmp_41_8_6_i_reg_8942 = tmp_41_8_6_i_fu_4540_p2.read();
tmp_41_8_7_i_reg_8947 = tmp_41_8_7_i_fu_4560_p2.read();
tmp_41_8_i_reg_8912 = tmp_41_8_i_fu_4420_p2.read();
tmp_41_9_1_i_reg_8957 = tmp_41_9_1_i_fu_4596_p2.read();
tmp_41_9_2_i_reg_8962 = tmp_41_9_2_i_fu_4616_p2.read();
tmp_41_9_3_i_reg_8967 = tmp_41_9_3_i_fu_4636_p2.read();
tmp_41_9_4_i_reg_8972 = tmp_41_9_4_i_fu_4656_p2.read();
tmp_41_9_5_i_reg_8977 = tmp_41_9_5_i_fu_4676_p2.read();
tmp_41_9_6_i_reg_8982 = tmp_41_9_6_i_fu_4696_p2.read();
tmp_41_9_7_i_reg_8987 = tmp_41_9_7_i_fu_4716_p2.read();
tmp_41_9_i_reg_8952 = tmp_41_9_i_fu_4576_p2.read();
}
if ((!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter3.read()))) {
accu_V_0_0_i_fu_392 = accu_0_0_V_fu_5919_p2.read();
accu_V_0_10_i_fu_432 = accu_0_10_V_fu_6799_p2.read();
accu_V_0_11_i_fu_436 = accu_0_11_V_fu_6887_p2.read();
accu_V_0_12_i_fu_440 = accu_0_12_V_fu_6975_p2.read();
accu_V_0_13_i_fu_444 = accu_0_13_V_fu_7063_p2.read();
accu_V_0_14_i_fu_448 = accu_0_14_V_fu_7151_p2.read();
accu_V_0_15_i_fu_452 = accu_0_15_V_fu_7239_p2.read();
accu_V_0_1_i_fu_396 = accu_0_1_V_fu_6007_p2.read();
accu_V_0_2_i_fu_400 = accu_0_2_V_fu_6095_p2.read();
accu_V_0_3_i_fu_404 = accu_0_3_V_fu_6183_p2.read();
accu_V_0_4_i_fu_408 = accu_0_4_V_fu_6271_p2.read();
accu_V_0_5_i_fu_412 = accu_0_5_V_fu_6359_p2.read();
accu_V_0_6_i_fu_416 = accu_0_6_V_fu_6447_p2.read();
accu_V_0_7_i_fu_420 = accu_0_7_V_fu_6535_p2.read();
accu_V_0_8_i_fu_424 = accu_0_8_V_fu_6623_p2.read();
accu_V_0_9_i_fu_428 = accu_0_9_V_fu_6711_p2.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))))) {
ap_pipeline_reg_pp0_iter1_exitcond_i_reg_8319 = exitcond_i_reg_8319.read();
ap_pipeline_reg_pp0_iter1_nf_assign_load_reg_8365 = nf_assign_load_reg_8365.read();
ap_pipeline_reg_pp0_iter1_tmp_4_i_reg_8341 = tmp_4_i_reg_8341.read();
ap_pipeline_reg_pp0_iter1_tmp_5_i_reg_8361 = tmp_5_i_reg_8361.read();
ap_pipeline_reg_pp0_iter1_tmp_i_reg_8328 = tmp_i_reg_8328.read();
exitcond_i_reg_8319 = exitcond_i_fu_1686_p2.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))))) {
inElem_V_2_reg_8375 = inElem_V_2_fu_2155_p130.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_i_fu_1686_p2.read()) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_5_i_fu_1732_p2.read()))) {
nf_assign_load_reg_8365 = nf_assign_fu_976.read();
tmp_6_i_reg_8370 = tmp_6_i_fu_1752_p2.read();
}
if ((!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && !esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter2_tmp_5_i_reg_8361.read()))) {
threshs3_m_threshold_11_reg_9417 = threshs3_m_threshold_4_q0.read();
threshs3_m_threshold_13_reg_9422 = threshs3_m_threshold_3_q0.read();
threshs3_m_threshold_15_reg_9427 = threshs3_m_threshold_2_q0.read();
threshs3_m_threshold_17_reg_9432 = threshs3_m_threshold_1_q0.read();
threshs3_m_threshold_19_reg_9437 = threshs3_m_threshold_q0.read();
threshs3_m_threshold_1_reg_9392 = threshs3_m_threshold_15_q0.read();
threshs3_m_threshold_21_reg_9442 = threshs3_m_threshold_13_q0.read();
threshs3_m_threshold_23_reg_9447 = threshs3_m_threshold_12_q0.read();
threshs3_m_threshold_25_reg_9452 = threshs3_m_threshold_11_q0.read();
threshs3_m_threshold_27_reg_9457 = threshs3_m_threshold_10_q0.read();
threshs3_m_threshold_29_reg_9462 = threshs3_m_threshold_9_q0.read();
threshs3_m_threshold_31_reg_9467 = threshs3_m_threshold_8_q0.read();
threshs3_m_threshold_3_reg_9397 = threshs3_m_threshold_14_q0.read();
threshs3_m_threshold_5_reg_9402 = threshs3_m_threshold_7_q0.read();
threshs3_m_threshold_7_reg_9407 = threshs3_m_threshold_6_q0.read();
threshs3_m_threshold_9_reg_9412 = threshs3_m_threshold_5_q0.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_i_fu_1686_p2.read()))) {
tmp_4_i_reg_8341 = tmp_4_i_fu_1720_p2.read();
tmp_5_i_reg_8361 = tmp_5_i_fu_1732_p2.read();
tmp_i_reg_8328 = tmp_i_fu_1700_p2.read();
}
if ((esl_seteq<1,1,1>(ap_CS_fsm_state1.read(), ap_const_lv1_1) && !esl_seteq<1,1,1>(ap_condition_300.read(), ap_const_boolean_1))) {
tmp_6149_reg_8314 = tmp_6149_fu_1670_p2.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_i_fu_1686_p2.read()) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_fu_1700_p2.read()))) {
tmp_6150_reg_8337 = tmp_6150_fu_1713_p1.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_i_fu_1686_p2.read()) && esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_fu_1700_p2.read()))) {
tmp_6151_reg_8332 = tmp_6151_fu_1709_p1.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_2F))) {
tmp_V_100_fu_652 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_30))) {
tmp_V_101_fu_656 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_31))) {
tmp_V_102_fu_660 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_32))) {
tmp_V_103_fu_664 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_33))) {
tmp_V_104_fu_668 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_34))) {
tmp_V_105_fu_672 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_35))) {
tmp_V_106_fu_676 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_36))) {
tmp_V_107_fu_680 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_37))) {
tmp_V_108_fu_684 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_38))) {
tmp_V_109_fu_688 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_39))) {
tmp_V_110_fu_692 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_3A))) {
tmp_V_111_fu_696 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_3B))) {
tmp_V_112_fu_700 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_3C))) {
tmp_V_113_fu_704 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_3D))) {
tmp_V_114_fu_708 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_3E))) {
tmp_V_115_fu_712 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_3F))) {
tmp_V_116_fu_716 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_40))) {
tmp_V_117_fu_720 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_41))) {
tmp_V_118_fu_724 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_42))) {
tmp_V_119_fu_728 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_43))) {
tmp_V_120_fu_732 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_44))) {
tmp_V_121_fu_736 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_45))) {
tmp_V_122_fu_740 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_46))) {
tmp_V_123_fu_744 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_47))) {
tmp_V_124_fu_748 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_48))) {
tmp_V_125_fu_752 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_49))) {
tmp_V_126_fu_756 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_4A))) {
tmp_V_127_fu_760 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_4B))) {
tmp_V_128_fu_764 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_4C))) {
tmp_V_129_fu_768 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_4D))) {
tmp_V_130_fu_772 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_4E))) {
tmp_V_131_fu_776 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_4F))) {
tmp_V_132_fu_780 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_50))) {
tmp_V_133_fu_784 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_51))) {
tmp_V_134_fu_788 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_52))) {
tmp_V_135_fu_792 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_53))) {
tmp_V_136_fu_796 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_54))) {
tmp_V_137_fu_800 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_55))) {
tmp_V_138_fu_804 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_56))) {
tmp_V_139_fu_808 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_57))) {
tmp_V_140_fu_812 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_58))) {
tmp_V_141_fu_816 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_59))) {
tmp_V_142_fu_820 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_5A))) {
tmp_V_143_fu_824 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_5B))) {
tmp_V_144_fu_828 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_5C))) {
tmp_V_145_fu_832 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_5D))) {
tmp_V_146_fu_836 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_5E))) {
tmp_V_147_fu_840 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_5F))) {
tmp_V_148_fu_844 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_60))) {
tmp_V_149_fu_848 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_61))) {
tmp_V_150_fu_852 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_62))) {
tmp_V_151_fu_856 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_63))) {
tmp_V_152_fu_860 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_64))) {
tmp_V_153_fu_864 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_65))) {
tmp_V_154_fu_868 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_66))) {
tmp_V_155_fu_872 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_67))) {
tmp_V_156_fu_876 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_68))) {
tmp_V_157_fu_880 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_69))) {
tmp_V_158_fu_884 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_6A))) {
tmp_V_159_fu_888 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_6B))) {
tmp_V_160_fu_892 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_6C))) {
tmp_V_161_fu_896 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_6D))) {
tmp_V_162_fu_900 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_6E))) {
tmp_V_163_fu_904 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_6F))) {
tmp_V_164_fu_908 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_70))) {
tmp_V_165_fu_912 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_71))) {
tmp_V_166_fu_916 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_72))) {
tmp_V_167_fu_920 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_73))) {
tmp_V_168_fu_924 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_74))) {
tmp_V_169_fu_928 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_75))) {
tmp_V_170_fu_932 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_76))) {
tmp_V_171_fu_936 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_77))) {
tmp_V_172_fu_940 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_78))) {
tmp_V_173_fu_944 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_79))) {
tmp_V_174_fu_948 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_7A))) {
tmp_V_175_fu_952 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_7B))) {
tmp_V_176_fu_956 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_7C))) {
tmp_V_177_fu_960 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_7D))) {
tmp_V_178_fu_964 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_7E))) {
tmp_V_179_fu_968 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_7F))) {
tmp_V_180_fu_972 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_1))) {
tmp_V_54_fu_468 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_2))) {
tmp_V_55_fu_472 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_3))) {
tmp_V_56_fu_476 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_4))) {
tmp_V_57_fu_480 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_5))) {
tmp_V_58_fu_484 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_6))) {
tmp_V_59_fu_488 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_7))) {
tmp_V_60_fu_492 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_8))) {
tmp_V_61_fu_496 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_9))) {
tmp_V_62_fu_500 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_A))) {
tmp_V_63_fu_504 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_B))) {
tmp_V_64_fu_508 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_C))) {
tmp_V_65_fu_512 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_D))) {
tmp_V_66_fu_516 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_E))) {
tmp_V_67_fu_520 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_F))) {
tmp_V_68_fu_524 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_10))) {
tmp_V_69_fu_528 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_11))) {
tmp_V_70_fu_532 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_12))) {
tmp_V_71_fu_536 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_13))) {
tmp_V_72_fu_540 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_14))) {
tmp_V_73_fu_544 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_15))) {
tmp_V_74_fu_548 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_16))) {
tmp_V_75_fu_552 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_17))) {
tmp_V_76_fu_556 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_18))) {
tmp_V_77_fu_560 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_19))) {
tmp_V_78_fu_564 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_1A))) {
tmp_V_79_fu_568 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_1B))) {
tmp_V_80_fu_572 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_1C))) {
tmp_V_81_fu_576 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_1D))) {
tmp_V_82_fu_580 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_1E))) {
tmp_V_83_fu_584 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_1F))) {
tmp_V_84_fu_588 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_20))) {
tmp_V_85_fu_592 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_21))) {
tmp_V_86_fu_596 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_22))) {
tmp_V_87_fu_600 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_23))) {
tmp_V_88_fu_604 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_24))) {
tmp_V_89_fu_608 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_25))) {
tmp_V_90_fu_612 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_26))) {
tmp_V_91_fu_616 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_27))) {
tmp_V_92_fu_620 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_28))) {
tmp_V_93_fu_624 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_29))) {
tmp_V_94_fu_628 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_2A))) {
tmp_V_95_fu_632 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_2B))) {
tmp_V_96_fu_636 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_2C))) {
tmp_V_97_fu_640 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_2D))) {
tmp_V_98_fu_644 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_2E))) {
tmp_V_99_fu_648 = in_V_V_dout.read();
}
if ((esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm_pp0_stage0.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) && esl_seteq<1,1,1>(exitcond_i_reg_8319.read(), ap_const_lv1_0) && !esl_seteq<1,1,1>(ap_const_lv1_0, tmp_i_reg_8328.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,7,7>(tmp_6150_reg_8337.read(), ap_const_lv7_0))) {
tmp_V_fu_464 = in_V_V_dout.read();
}
}
void Matrix_Vector_Activa_1::thread_ap_NS_fsm() {
switch (ap_CS_fsm.read().to_uint64()) {
case 1 :
if (!esl_seteq<1,1,1>(ap_condition_300.read(), ap_const_boolean_1)) {
ap_NS_fsm = ap_ST_fsm_pp0_stage0;
} else {
ap_NS_fsm = ap_ST_fsm_state1;
}
break;
case 2 :
if ((!(esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) && !((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && !esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter3.read())) && !(!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) && esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter0.read()) && !esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_i_fu_1686_p2.read()) && !esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read())))) {
ap_NS_fsm = ap_ST_fsm_pp0_stage0;
} else if (((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
!esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter3.read())) || (!((esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read()) &&
esl_seteq<1,1,1>(ap_condition_308.read(), ap_const_boolean_1)) || (esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter4.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, ap_pipeline_reg_pp0_iter3_tmp_5_i_reg_8361.read()) &&
esl_seteq<1,1,1>(out_V_V_full_n.read(), ap_const_logic_0))) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter0.read()) &&
!esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_i_fu_1686_p2.read()) &&
!esl_seteq<1,1,1>(ap_const_logic_1, ap_enable_reg_pp0_iter1.read())))) {
ap_NS_fsm = ap_ST_fsm_state7;
} else {
ap_NS_fsm = ap_ST_fsm_pp0_stage0;
}
break;
case 4 :
ap_NS_fsm = ap_ST_fsm_state1;
break;
default :
ap_NS_fsm = "XXX";
break;
}
}
}
| 94.06855 | 341 | 0.713828 | IceyFong |
89ed9c9b2bee0a2efa6d1784ae4b2c1a3cc5f598 | 2,548 | cpp | C++ | tests/methodTask.cpp | DylanZA/eslang | 341ed66b3c1a5cfbb0f859bfe1146e88697f59fd | [
"MIT"
] | 15 | 2017-09-19T02:12:04.000Z | 2021-05-01T13:12:51.000Z | tests/methodTask.cpp | DylanZA/eslang | 341ed66b3c1a5cfbb0f859bfe1146e88697f59fd | [
"MIT"
] | null | null | null | tests/methodTask.cpp | DylanZA/eslang | 341ed66b3c1a5cfbb0f859bfe1146e88697f59fd | [
"MIT"
] | null | null | null | #include <eslang/Context.h>
#include <eslang/Logging.h>
#include <gtest/gtest.h>
#include "TestCommon.h"
namespace s {
class MethodCounter : public Process {
public:
int const kMax;
MethodCounter(ProcessArgs i, int m = 256) : Process(std::move(i)), kMax(m) {}
LIFETIMECHECK;
MethodTask<int> subRun(int n) {
LIFETIMECHECK;
if (n > 0) {
co_return co_await subRun(n - 1) + 1;
}
co_return 0;
}
ProcessTask run() {
int our_value = co_await subRun(kMax);
ASSERT_EQ(our_value, kMax);
}
};
class MethodBasic : public Process {
public:
using Process::Process;
LIFETIMECHECK;
MethodTask<int> retIntCoro(int i) {
LIFETIMECHECK;
co_return i;
}
MethodTask<> doNothingCoro() {
LIFETIMECHECK;
co_return;
}
ProcessTask run() {
auto a = WaitingYield{};
auto c = doNothingCoro();
ASSERT_EQ(5, co_await retIntCoro(5));
co_await a;
co_await c;
}
};
class MethodThrows : public Process {
public:
using Process::Process;
LIFETIMECHECK;
MethodTask<int> throwCoro(int i) {
LIFETIMECHECK;
co_await WaitingYield{};
ESLANGEXCEPT();
co_return i;
}
ProcessTask run() {
LIFETIMECHECK;
co_await throwCoro(5);
FAIL();
}
};
class MethodStackInversion : public Process {
public:
using Process::Process;
LIFETIMECHECK;
MethodTask<> C(bool should_sleep, int& finished) {
LIFETIMECHECK;
if (should_sleep) {
co_await sleep(std::chrono::milliseconds(1));
}
++finished;
}
MethodTask<> B(bool should_sleep, int& finished) {
LIFETIMECHECK;
int i = 0;
co_await C(true, i);
EXPECT_EQ(1, i);
if (should_sleep) {
co_await sleep(std::chrono::milliseconds(1));
}
co_await C(false, i);
EXPECT_EQ(2, i);
++finished;
}
MethodTask<> A(int& finished) {
LIFETIMECHECK;
int i = 0;
co_await B(false, i);
EXPECT_EQ(1, i);
co_await sleep(std::chrono::milliseconds(1));
co_await B(true, i);
EXPECT_EQ(2, i);
co_await B(true, i);
EXPECT_EQ(3, i);
++finished;
}
ProcessTask run() {
LIFETIMECHECK;
int i = 0;
ScopeRun sr([&] { EXPECT_EQ(i, 1); });
co_await A(i);
}
};
}
template <class T> void run() {
s::Context c;
auto starter = c.spawn<T>();
c.run();
lifetimeChecker.check();
}
TEST(MethodTask, Counter) { run<s::MethodCounter>(); }
TEST(MethodTask, Basic) { run<s::MethodBasic>(); }
TEST(MethodTask, Throws) { run<s::MethodThrows>(); }
TEST(MethodTask, StackInversion) { run<s::MethodStackInversion>(); }
| 19.751938 | 79 | 0.628728 | DylanZA |
89f43b6498c438f50f0e47087ae9536bb2b23999 | 6,209 | cpp | C++ | AntiAirborne/Sources/battle/ParatrooperNode.cpp | beardog-ukr/ubiquitous-spork | 7f75d8f40dff70a965e901a4190dd35d64599441 | [
"Unlicense"
] | null | null | null | AntiAirborne/Sources/battle/ParatrooperNode.cpp | beardog-ukr/ubiquitous-spork | 7f75d8f40dff70a965e901a4190dd35d64599441 | [
"Unlicense"
] | null | null | null | AntiAirborne/Sources/battle/ParatrooperNode.cpp | beardog-ukr/ubiquitous-spork | 7f75d8f40dff70a965e901a4190dd35d64599441 | [
"Unlicense"
] | null | null | null | #include "ParatrooperNode.h"
using namespace anti_airborne;
#include "ZOrderConstTypes.h"
#include "ZOrderConstValues.h"
#include "SixCatsLogger.h"
#include "SixCatsLoggerMacro.h"
#include <sstream>
USING_NS_CC;
using namespace std;
//static const int kAngleManipulationActionTag = 21;
//static const int kDistanceManipulationActionTag = 22;
//static const float kAngleChangeInterval = 0.5;
static const float kFadeinInterval = 3.0;
static const float kFallingInterval = 20.0;
static const struct {
string body;
string parachute;
} kElementSpriteFileNames = {
.body = "anti_aiborne/paratrooper/gunner_jump_00",
.parachute = "anti_aiborne/paratrooper/para",
};
static const int kJumpAnimationTag = 69;
static const string kJumpAnimationName = "paratrooper_jump";
static const string kRunAnimationName = "paratrooper_run";
static const int kScreenMiddle = 640;
static const int kEscapePointLeft = -30;
static const int kEscapePointRight = 1280 + 30;
static const float kEscapeVelocity = 75 / 1.0;
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ParatrooperNode::ParatrooperNode() {
alive = true;
}
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ParatrooperNode::~ParatrooperNode() {
C6_F1(c6, "here");
}
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ParatrooperNode* ParatrooperNode::create(shared_ptr<SixCatsLogger> inC6) {
ParatrooperNode *pRet = new(std::nothrow) ParatrooperNode();
if (pRet ==nullptr) {
return nullptr;
}
pRet->setLogger(inC6);
if (!pRet->initSelf()) {
delete pRet;
pRet = nullptr;
return nullptr;
}
pRet->autorelease();
return pRet;
}
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
void ParatrooperNode::doDie() {
alive = false;
parachute->stopAllActions();
body->stopAllActions();
stopAllActions();
body->runAction(FadeOut::create(kFadeinInterval));
parachute->runAction(FadeOut::create(kFadeinInterval));
}
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
void ParatrooperNode::doDrop(CallFunc *escapeNotifier) {
C6_D6(c6, "Do drop with delay: ", dropDelay,
"Drop point ", dropPoint.x, ":", dropPoint.y);
setPosition(dropPoint);
// --- para
Sequence* seqPara = Sequence::create(DelayTime::create(dropDelay),
FadeIn::create(kFadeinInterval),
DelayTime::create(kFallingInterval-kFadeinInterval*2),
FadeOut::create(kFadeinInterval),
nullptr);
parachute->runAction(seqPara);
// --- body
CallFunc* cf = CallFunc::create([this]() {
this->body->setOpacity(255);
});
Sequence* seqBody = Sequence::create(DelayTime::create(dropDelay), cf, nullptr);
body->runAction(seqBody);
// --- body animation
Animation* animationE = AnimationCache::getInstance()->getAnimation(kJumpAnimationName);
Animate* animateE = Animate::create(animationE);
Repeat* ra = Repeat::create(animateE, 100);
ra->setTag(kJumpAnimationTag);
body->runAction(ra);
// --- fall + escape
Vec2 destinationPoint(dropPoint.x, body->getContentSize().height/2);
MoveTo* fallMT = MoveTo::create(kFallingInterval, destinationPoint);
MoveTo* escapeMT;
CallFunc* animationLaunchCF = CallFunc::create([this] {
this->launchRunningAnimation();
});;
if (dropPoint.x < kScreenMiddle) {
Vec2 escapePoint(kEscapePointLeft, destinationPoint.y);
float escapeTime = (dropPoint.x - escapePoint.x)/kEscapeVelocity;
escapeMT = MoveTo::create(escapeTime, escapePoint);
}
else {
Vec2 escapePoint(kEscapePointRight, destinationPoint.y);
const float escapeTime = (escapePoint.x - dropPoint.x)/kEscapeVelocity;
escapeMT = MoveTo::create(escapeTime, escapePoint);
}
Sequence* seqFallEscape = Sequence::create(DelayTime::create(dropDelay), fallMT,
animationLaunchCF, escapeMT, escapeNotifier, nullptr);
runAction(seqFallEscape);
}
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
bool ParatrooperNode::initBaseSprites() {
body = Sprite::createWithSpriteFrameName(kElementSpriteFileNames.body);
if (body == nullptr) {
C6_W2(c6, "Failed to open: ", kElementSpriteFileNames.body);
return false;
}
body->setOpacity(0);
addChild(body, kBattleSceneZO.paraBody);
// ---
parachute = Sprite::createWithSpriteFrameName(kElementSpriteFileNames.parachute);
if (parachute == nullptr) {
C6_W2(c6, "Failed to open: ", kElementSpriteFileNames.parachute);
return false;
}
parachute->setOpacity(0);
parachute->setPosition(Vec2(0, 20));
addChild(parachute, kBattleSceneZO.parachute);
return true;
}
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
bool ParatrooperNode::initSelf() {
if (!initBaseSprites()) {
return false;
}
return true;
}
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
bool ParatrooperNode::isAlive() const {
return alive;
}
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
void ParatrooperNode::launchRunningAnimation() {
C6_D1(c6, "here");
Animation* animationE = AnimationCache::getInstance()->getAnimation(kRunAnimationName);
Animate* animateE = Animate::create(animationE);
body->stopAllActionsByTag(kJumpAnimationTag);
body->runAction(RepeatForever::create(animateE));
if (getPosition().x < kScreenMiddle) {// mirror soldier if it goes left
body->setScaleX(-1);
}
}
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
void ParatrooperNode::setDropParameters(const float inTravelDelay, const Vec2& inDropPoint) {
dropDelay = inTravelDelay;
dropPoint = inDropPoint;
}
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| 29.708134 | 99 | 0.57626 | beardog-ukr |
89fea8d9c89cbe560fa72909fff68fc44e8052f9 | 943 | cpp | C++ | source/EvaluationChain.cpp | vt4a2h/prcxx | 04794048f21cec548fa750b78239f920eef1bb60 | [
"MIT"
] | 1 | 2022-01-04T17:55:55.000Z | 2022-01-04T17:55:55.000Z | source/EvaluationChain.cpp | vt4a2h/prcxx | 04794048f21cec548fa750b78239f920eef1bb60 | [
"MIT"
] | null | null | null | source/EvaluationChain.cpp | vt4a2h/prcxx | 04794048f21cec548fa750b78239f920eef1bb60 | [
"MIT"
] | null | null | null | //
// MIT License
//
// Copyright (c) 2020-present Vitaly Fanaskov
//
// prcxx -- Yet another C++ property library
// Project home: https://github.com/vt4a2h/prcxx
//
// See LICENSE file for the further details.
//
#include "prcxx/EvaluationChain.hpp"
namespace prcxx {
bool EvaluationChain::empty() const
{
return properties.empty();
}
bool EvaluationChain::contains_error() const
{
return !last_error.text.empty();
}
void EvaluationChain::push(IObservableWeakPtr ref)
{
properties.push(std::move(ref));
}
IObservableWeakPtr EvaluationChain::top()
{
return properties.top();
}
void EvaluationChain::pop()
{
properties.pop();
}
void EvaluationChain::register_error(Error error)
{
last_error = std::move(error);
}
Error EvaluationChain::extract_last_error()
{
Error tmp;
std::swap(tmp, last_error);
return tmp;
}
Error EvaluationChain::error() const
{
return last_error;
}
} // namespace prcxx
| 16.258621 | 50 | 0.700954 | vt4a2h |
89ff92912fe7e51166d943cc1a89b652ff4b53c1 | 3,866 | cpp | C++ | GraphicsMagick.NET/Drawables/DrawableAffine.cpp | dlemstra/GraphicsMagick.NET | 332718f2315c3752eaeb84f4a6a30a553441e79e | [
"ImageMagick",
"Apache-2.0"
] | 35 | 2015-10-18T19:49:52.000Z | 2022-01-18T05:30:46.000Z | GraphicsMagick.NET/Drawables/DrawableAffine.cpp | elyor0529/GraphicsMagick.NET | 332718f2315c3752eaeb84f4a6a30a553441e79e | [
"ImageMagick",
"Apache-2.0"
] | 12 | 2016-07-22T16:05:03.000Z | 2020-02-26T15:21:03.000Z | GraphicsMagick.NET/Drawables/DrawableAffine.cpp | elyor0529/GraphicsMagick.NET | 332718f2315c3752eaeb84f4a6a30a553441e79e | [
"ImageMagick",
"Apache-2.0"
] | 12 | 2016-02-24T12:11:50.000Z | 2021-07-12T18:20:12.000Z | //=================================================================================================
// Copyright 2014-2015 Dirk Lemstra <https://graphicsmagick.codeplex.com/>
//
// Licensed under the ImageMagick License (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.imagemagick.org/script/license.php
//
// 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 "Stdafx.h"
#include "DrawableAffine.h"
namespace GraphicsMagick
{
//==============================================================================================
DrawableAffine::DrawableAffine(double scaleX, double scaleY, double shearX, double shearY,
double translateX, double translateY)
{
BaseValue = new Magick::DrawableAffine(scaleX, scaleY, shearX, shearY, translateX, translateY);
}
//==============================================================================================
DrawableAffine::DrawableAffine(Matrix^ matrix)
{
Throw::IfNull("matrix", matrix);
BaseValue = new Magick::DrawableAffine((double)matrix->Elements[0], (double)matrix->Elements[1],
(double)matrix->Elements[2], (double)matrix->Elements[3], (double)matrix->Elements[4],
(double)matrix->Elements[5]);
}
//==============================================================================================
double DrawableAffine::ScaleX::get()
{
return Value->sx();
}
//==============================================================================================
void DrawableAffine::ScaleX::set(double value)
{
Value->sx(value);
}
//==============================================================================================
double DrawableAffine::ScaleY::get()
{
return Value->sy();
}
//==============================================================================================
void DrawableAffine::ScaleY::set(double value)
{
Value->sy(value);
}
//==============================================================================================
double DrawableAffine::ShearX::get()
{
return Value->rx();
}
//==============================================================================================
void DrawableAffine::ShearX::set(double value)
{
Value->rx(value);
}
//==============================================================================================
double DrawableAffine::ShearY::get()
{
return Value->ry();
}
//==============================================================================================
void DrawableAffine::ShearY::set(double value)
{
Value->ry(value);
}
//==============================================================================================
double DrawableAffine::TranslateX::get()
{
return Value->tx();
}
//==============================================================================================
void DrawableAffine::TranslateX::set(double value)
{
Value->tx(value);
}
//==============================================================================================
double DrawableAffine::TranslateY::get()
{
return Value->ty();
}
//==============================================================================================
void DrawableAffine::TranslateY::set(double value)
{
Value->ty(value);
}
//==============================================================================================
} | 40.694737 | 100 | 0.38955 | dlemstra |
d60020f0254390e3b1d98b622875861c7b262861 | 10,521 | cpp | C++ | src/Scheme.cpp | nizikawa-worms/wkTerrainSync | 676bcb981b2cc1bba80e8928fceb3731d40beb63 | [
"WTFPL"
] | 7 | 2021-04-19T14:30:03.000Z | 2022-01-14T16:44:47.000Z | src/Scheme.cpp | nizikawa-worms/wkTerrainSync | 676bcb981b2cc1bba80e8928fceb3731d40beb63 | [
"WTFPL"
] | 1 | 2022-01-27T09:09:05.000Z | 2022-01-27T10:17:41.000Z | src/Scheme.cpp | nizikawa-worms/wkTerrainSync | 676bcb981b2cc1bba80e8928fceb3731d40beb63 | [
"WTFPL"
] | null | null | null |
#include "Scheme.h"
#include "Hooks.h"
#include "Missions.h"
#include "Packets.h"
#include "LobbyChat.h"
#include "Utils.h"
#include "Config.h"
#include "WaLibc.h"
#include "Frontend.h"
#include "Debugf.h"
namespace fs = std::filesystem;
void Scheme::dumpSchemeFromResources(int id, std::filesystem::path path) {
// if(std::filesystem::exists(path)) return;
try {
HMODULE hModule = NULL;
HRSRC hResource = FindResource(hModule, MAKEINTRESOURCE(id), "SCHEMES");
if(!hResource) throw std::runtime_error("FindResource failed");
HGLOBAL hMemory = LoadResource(hModule, hResource);
if(!hMemory) throw std::runtime_error("LoadResource failed");
DWORD dwSize = SizeofResource(hModule, hResource);
if(!dwSize) throw std::runtime_error("SizeofResource failed");
LPVOID lpAddress = LockResource(hMemory);
if(!lpAddress) throw std::runtime_error("LockResource failed");
FILE * pf = fopen((Config::getWaDir() / path).string().c_str(), "wb");
if(pf) {
fwrite(lpAddress, dwSize, 1, pf);
fclose(pf);
} else throw std::runtime_error("Failed to save .wsc");
} catch (std::exception & e) {
debugf("dumping resource: %d failed, reason: %s\n", id, e.what());
}
}
int __stdcall Scheme::hookSetWscScheme(DWORD schemestruct, char * path, char flag, bool * out) {
// printf("hookSetWscScheme struct: 0x%X path: %s flag: %d out: 0x%X\n", schemestruct, path, flag, out);
return origSetWscScheme(schemestruct, path, flag, out);
}
std::pair<int, size_t> Scheme::getSchemeVersionAndSize() {
size_t schemesize = 0;
int retv;
_asm lea eax, schemesize
_asm push eax
_asm mov esi, addrSchemeStruct
_asm call addrGetSchemeVersion
_asm mov retv, eax
// debugf("Scheme version: %d size: %d\n", retv, schemesize);
return {retv, schemesize};
}
int (__stdcall *origGetBuiltinSchemeName)();
int __stdcall Scheme::hookGetBuiltinSchemeName() {
int a1, a2, retv;
_asm mov a1, eax
_asm mov a2, ecx
_asm mov eax, a1
_asm mov ecx, a2
_asm call origGetBuiltinSchemeName
_asm mov retv, eax
if(a2 == 4)
WaLibc::CStringFromString((void*)(a1+12), 0, (void*)missionDefaultSchemeName.c_str(), missionDefaultSchemeName.length());
return retv;
}
char **Scheme::callGetBuiltinSchemeName(int id) {
_asm mov eax, addrSchemeStruct
_asm mov ecx, id
_asm call hookGetBuiltinSchemeName
return (char**)(addrSchemeStruct+12);
}
int __stdcall Scheme::hookSetBuiltinScheme(DWORD schemestruct, int id) {
if(Missions::getFlagInjectingWam() || flagReadingWam) {
return 0;
}
return origSetBuiltinScheme(schemestruct, id);
}
void Scheme::setMissionWscScheme(std::filesystem::path wam) {
std::string wscpath, wscname;
fs::path providedwsc = wam.parent_path() / (wam.stem().string() + ".wsc");
bool out;
if(fs::exists(providedwsc)) {
hookSetWscScheme(addrSchemeStruct, (char*)providedwsc.string().c_str(), 0, &out);
wscname = missionCustomSchemeName;
} else {
hookSetWscScheme(addrSchemeStruct, (char*)missionDefaultSchemePath.c_str(), 0, &out);
wscname = missionDefaultSchemeName;
}
callReadWamSchemeSettings(wam.string());
callReadWamSchemeOptions(wam.string());
if(Packets::isHost()) {
callRefreshOnlineMultiplayerSchemeDisplay();
origSendWscScheme(LobbyChat::getLobbyHostScreen(), 0);
} else if(!Packets::isClient()) {
callRefreshOfflineMultiplayerSchemeDisplay();
}
setSchemeName(wscname);
}
DWORD Scheme::getAddrSchemeStruct() {
return addrSchemeStruct;
}
void Scheme::callSetBuiltinScheme(int id) {
origSetBuiltinScheme(addrSchemeStruct, id);
static std::map<int, int> namemap = {
{0, 970}, {2, 972}, {3, 971}, {4, 971}, {5, 981}, {6, 973}, {7, 974},
{8, 980}, {9, 971}, {10, 978}, {11, 971}, {12, 979}, {13, 976}, {14, 977},
{15, 975}, {16, 982}
};
if(namemap.find(id - 1) != namemap.end()) {
setSchemeName(Frontend::origGetTextById(namemap.at(id - 1)));
} else {
setSchemeName(Frontend::origGetTextById(971));
}
if(Packets::isHost()) {
callRefreshOnlineMultiplayerSchemeDisplay();
origSendWscScheme(LobbyChat::getLobbyHostScreen(), 0);
} else if(!Packets::isClient()) {
callRefreshOfflineMultiplayerSchemeDisplay();
}
}
void Scheme::loadSchemeFromBytestr(std::string data) {
if(data.size() < 0x1E8) {
// Utils::hexDump("Loaded 3.8 scheme", data.data(), data.size());
memcpy((char *) (addrSchemeStruct + 0x14), data.data(), data.size());
debugf("Restored scheme from replay json\n");
} else {
MessageBoxA(0, "Replay json file contains embedded WAM scheme, but it exceeds allowed scheme size.", Config::getFullStr().c_str(), MB_ICONERROR);
}
}
std::optional<std::string> Scheme::saveSchemeToBytestr() {
auto info = getSchemeVersionAndSize();
int builtinscheme = *(int*)(Scheme::getAddrSchemeStruct() + 0x8);
if(builtinscheme != 4) {
// save custom scheme in json
size_t size = 0;
switch(info.first) {
default:
case 1: size = 0xDD - 5; break;
case 2: size = 0x129 - 5; break;
case 3: size = 0x129 + info.second - 5; break;
}
std::string scheme = std::string((char*)(Scheme::getAddrSchemeStruct() + 0x14), size);
return {scheme};
}
return {};
}
void Scheme::setSchemeName(std::string name) {
if(Config::isDontRenameSchemeComboBox()) return;
DWORD comboScheme = 0;
if(Packets::isHost()) {
auto host = LobbyChat::getLobbyHostScreen();
if(host)
comboScheme = host + 0x425B0;
} else if(!Packets::isClient()) {
auto offline = LobbyChat::getLobbyOfflineScreen();
if(offline)
comboScheme = offline + 0x2B3A0;
}
if(comboScheme) {
HWND comboSchemeHwnd = *(HWND*)((DWORD)comboScheme + 0x20);
SetWindowTextA(comboSchemeHwnd, name.c_str());
}
}
int (__stdcall *origReadWamSchemeSettings)();
int __stdcall Scheme::hookReadWamSchemeSettings() {
int params, retv;
_asm mov params, eax
if(!Missions::getFlagInjectingWam()) {
_asm mov eax, params
_asm call origReadWamSchemeSettings
_asm mov retv, eax
}
return retv;
}
int (__stdcall *origReadWamSchemeOptions)();
int __stdcall Scheme::hookReadWamSchemeOptions() {
int params, retv;
_asm mov params, eax
// if(!Missions::getFlagInjectingWam()) {
_asm mov eax, params
_asm call origReadWamSchemeOptions
_asm mov retv, eax
// }
return retv;
}
int Scheme::callReadWamSchemeSettings(std::string wampath) {
Missions::WAMLoaderParams params;
memset((void*)¶ms, 0, sizeof(params));
params.path = (char*)wampath.c_str();
flagReadingWam = true;
int retv;
_asm lea eax, params
_asm call origReadWamSchemeSettings
flagReadingWam = false;
return retv;
}
int Scheme::callReadWamSchemeOptions(std::string wampath) {
Missions::WAMLoaderParams params;
memset((void*)¶ms, 0, sizeof(params));
params.path = (char*)wampath.c_str();
flagReadingWam = true;
int retv;
_asm lea eax, params
_asm call origReadWamSchemeOptions
_asm mov retv, eax
flagReadingWam = false;
return retv;
}
void Scheme::callRefreshOfflineMultiplayerSchemeDisplay() {
DWORD screen = LobbyChat::getLobbyOfflineScreen();
if(screen) {
_asm mov eax, screen
_asm call addrRefreshOfflineMultiplayerSchemeDisplay
}
}
void Scheme::callRefreshOnlineMultiplayerSchemeDisplay() {
DWORD screen = LobbyChat::getLobbyHostScreen();
if(screen) {
_asm mov eax, screen
_asm call addrRefreshOnlineMultiplayerSchemeDisplay
}
}
void Scheme::install() {
DWORD addrGetSchemeSettingsFromWam = _ScanPattern("GetSchemeSettingsFromWam", "\x57\x6A\x04\x68\x00\x00\x00\x00\x8B\xF8\xE8\x00\x00\x00\x00\x83\xF8\xFF\x75\x04\x0B\xC0\x5F\xC3\x8B\x47\x0C\x56\x8B\x35\x00\x00\x00\x00\x50\x6A\x00\x68\x00\x00\x00\x00\x68\x00\x00\x00\x00\xFF\xD6", "????????xxx????xxxxxxxxxxxxxxx????xxxx????x????xx");
DWORD addrGetBuiltinSchemeName = _ScanPattern("GetBuiltinSchemeName", "\x83\xC1\xFF\x83\xF9\x10\x0F\x87\x00\x00\x00\x00\xFF\x24\x8D\x00\x00\x00\x00\x83\xC0\x0C\x50\xBA\x00\x00\x00\x00\xE8\x00\x00\x00\x00\xB8\x00\x00\x00\x00\xC3", "??????xx????xxx????xxxxx????x????x????x");
DWORD addrSetWscScheme = _ScanPattern("SetWscScheme", "\x6A\xFF\x68\x00\x00\x00\x00\x64\xA1\x00\x00\x00\x00\x50\x64\x89\x25\x00\x00\x00\x00\x81\xEC\x00\x00\x00\x00\x53\x55\x8B\xAC\x24\x00\x00\x00\x00\x56\x8B\xB4\x24\x00\x00\x00\x00\x57\x8D\x4C\x24\x20", "???????xx????xxxx????xx????xxxxx????xxxx????xxxxx");
addrGetSchemeVersion = _ScanPattern("GetSchemeVersion", "\xB8\x00\x00\x00\x00\xB9\x00\x00\x00\x00\x2B\xC8\x8D\x64\x24\x00\x8A\x94\x06\x00\x00\x00\x00\x3A\x14\x01\x75\x38\x83\xE8\x01\x75\xEF\x33\xC9\x8D\x86\x00\x00\x00\x00\x8D\xA4\x24\x00\x00\x00\x00", "??????????xxxxxxxxx????xxxxxxxxxxxxxx????xxx????");
origSendWscScheme =
(int (__stdcall *)(DWORD,char))
_ScanPattern("SendWscScheme", "\x55\x8B\xEC\x83\xE4\xF8\x81\xEC\x00\x00\x00\x00\x56\x57\xBF\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x8B\x4D\x08\x89\x81\x00\x00\x00\x00\x8B\x15\x00\x00\x00\x00\xA0\x00\x00\x00\x00\x66\xC7\x44\x24\x00\x00\x00", "??????xx????xxx????x????xxxxx????xx????x????xxxx???");
DWORD addrReadWamSchemeSettings = _ScanPattern("ReadWamSchemeSettings", "\x57\x6A\x04\x68\x00\x00\x00\x00\x8B\xF8\xE8\x00\x00\x00\x00\x83\xF8\xFF\x75\x04\x0B\xC0\x5F\xC3\x8B\x47\x0C\x56\x8B\x35\x00\x00\x00\x00\x50", "????????xxx????xxxxxxxxxxxxxxx????x");
DWORD addrReadWamSchemeOptions = _ScanPattern("ReadWamSchemeOptions", "\x51\x53\x55\x56\x8B\x35\x00\x00\x00\x00\x57\x8B\xF8\x8B\x47\x0C\x50\x6A\x00\x68\x00\x00\x00\x00\x68\x00\x00\x00\x00\xFF\xD6\xA2\x00\x00\x00\x00", "??????????xxxxxxxxxx????x????xxx????");
addrRefreshOfflineMultiplayerSchemeDisplay = _ScanPattern("RefreshOfflineMultiplayerSchemeDisplay", "\x51\x56\x57\x8B\xF8\xA0\x00\x00\x00\x00\x3C\x02\x75\x07\xB8\x00\x00\x00\x00\xEB\x0F\x33\xC9\x84\xC0\x0F\x95\xC1\x81\xC1\x00\x00\x00\x00\x8B\xC1\x8D\xB7\x00\x00\x00\x00", "??????????xxxxx????xxxxxxxxxxx????xxxx????");
addrRefreshOnlineMultiplayerSchemeDisplay = _ScanPattern("RefreshOnlineMultiplayerSchemeDisplay", "\x51\x56\x57\x8B\xF8\x0F\xBE\x05\x00\x00\x00\x00\x89\x87\x00\x00\x00\x00\x0F\xBE\x0D\x00\x00\x00\x00\x89\x8F\x00\x00\x00\x00\x8B\xCF\xE8\x00\x00\x00\x00", "??????xx????xx????xxx????xx????xxx????");
addrSchemeStruct = *(DWORD*)(addrGetSchemeSettingsFromWam + 0x4);
addrSchemeStructAmmo = addrSchemeStruct + 0xEC;
DWORD addrSetBuiltinScheme = (addrGetSchemeSettingsFromWam + 0xF + *(DWORD*)(addrGetSchemeSettingsFromWam + 0xB));
debugf("addrSchemeStruct: 0x%X addrSetBuiltinScheme: 0x%X\n", addrSchemeStruct, addrSetBuiltinScheme);
_HookDefault(SetWscScheme);
_HookDefault(GetBuiltinSchemeName);
_HookDefault(SetBuiltinScheme);
_HookDefault(ReadWamSchemeSettings);
_HookDefault(ReadWamSchemeOptions);
dumpSchemeFromResources(286, missionDefaultSchemePath);
}
| 36.658537 | 332 | 0.719323 | nizikawa-worms |
d600c8b96bfa216bb9a9f73f08857aa103979207 | 6,786 | cpp | C++ | src/main.cpp | jclc/tiralabra-compression | 1b4a2375d006e10718ff7887ba36d94e5f7a3c1f | [
"MIT"
] | null | null | null | src/main.cpp | jclc/tiralabra-compression | 1b4a2375d006e10718ff7887ba36d94e5f7a3c1f | [
"MIT"
] | 2 | 2017-04-15T16:06:11.000Z | 2017-05-11T21:50:58.000Z | src/main.cpp | jclc/tiralabra-compression | 1b4a2375d006e10718ff7887ba36d94e5f7a3c1f | [
"MIT"
] | null | null | null | #include <iostream>
#include <fstream>
#include <string>
#include <memory>
#include <chrono>
#include "input.hpp"
#include "output.hpp"
#include <thread>
#include <cmath>
#include "encoder.hpp"
#include "decoder.hpp"
#include "progressbar.hpp"
#include "tempfilenames.hpp"
void printHelp() {
std::cout << "tiralabra-compression" << std::endl
<< "Usage: tiracomp [options] <input file> [output file]\n" << std::endl
<< "If output file is not specified, output will be printed to stdout" << std::endl
<< "Options:" << std::endl
<< " -h: Print this help message" << std::endl
<< " -v: Verbose output" << std::endl
<< " -b: Benchmark mode" << std::endl
<< " -w <word size>: Define word size in bits when encoding (12 or 16)" << std::endl
<< " -i: Only print file info" << std::endl
<< " -n: Null output (disregard output, useful for benchmark)" << std::endl;
}
int main(int argc, char** argv) {
// Initialise default values
std::string inFileName = "";
std::string outFileName = ""; // If unset, write output to stdout
bool benchmark = false;
bool verbose = false;
bool nullOutput = false; // If true, throw away the output
bool printInfo = false; // If true, print info and exit without operating
int bitSize = 12;
int jobs = 1;
std::shared_ptr<ProgressBar> progress = nullptr;
std::chrono::time_point<std::chrono::system_clock> timestampStart;
std::chrono::time_point<std::chrono::system_clock> timestampEnd;
for (int i = 1; i < argc; ++i) {
if (argv[i][0] != '-') {
if (inFileName == "") {
inFileName = argv[i];
} else if (outFileName == "") {
outFileName = argv[i];
} else {
std::cerr << "Too many arguments: " << argv[i] << std::endl;
return EXIT_FAILURE;
}
} else {
// Iterate through all short opts in a single argument
// eg. -vb -> use options v and b
int j = 1;
int paramsToSkip = 0; // If an option takes a parameter, add to this
int value_w; // Value for option -w
int value_j; // Value for option -j
while ((argv[i][j] != '\0')) {
switch (argv[i][j]) {
case '?': // fallthrough
case 'h':
printHelp();
return EXIT_SUCCESS;
case 'b':
benchmark = true;
break;
case 'v':
verbose = true;
break;
case 'n':
nullOutput = true;
break;
case 'i':
printInfo = true;
break;
case 'w':
++paramsToSkip;
if (i + paramsToSkip >= argc) {
std::cerr << "No value given for word option -w" << std::endl;
return EXIT_FAILURE;
}
value_w = std::atoi(argv[i + paramsToSkip]);
if (value_w != MIN_BIT_SIZE && value_w != MAX_BIT_SIZE) {
std::cerr << "Invalid value " << value_w
<< " for option -w (must be either "
<< MIN_BIT_SIZE << " or " << MAX_BIT_SIZE << ")" << std::endl;
return EXIT_FAILURE;
}
bitSize = value_w;
break;
// case 'j':
// ++paramsToSkip;
// if (i+paramsToSkip >= argc) {
// std::cerr << "No value given for option -j" << std::endl;
// return EXIT_FAILURE;
// }
// value_j = std::atoi(argv[i + paramsToSkip]);
// if (value_j < MIN_JOBS || value_j > MAX_JOBS) {
// std::cerr << "Invalid value " << value_j
// << " for option -j (must be between "
// << MIN_JOBS << " and " << MAX_JOBS << ")" << std::endl;
// return EXIT_FAILURE;
// }
// jobs = value_j;
// for (int i = 0; i < jobs; ++i) {
// std::cout << getTempFileName() << std::endl;
// }
// return 0;
// break;
default:
std::cerr << "Unknown option -" << argv[i][j] << std::endl;
return EXIT_FAILURE;
}
++j;
}
i += paramsToSkip;
}
}
if (inFileName == "") {
std::cerr << "No input file given (use -h for help)" << std::endl;
return EXIT_FAILURE;
}
if (inFileName == outFileName) {
std::cerr << "Input file and output file cannot be the same" << std::endl;
return EXIT_FAILURE;
}
Input input;
if (!input.openFile(inFileName) || input.getOpMode() == UNKNOWN) {
std::cerr << "Error opening file " << inFileName << std::endl;
return EXIT_FAILURE;
} else if (input.getOpMode() == COMPRESS && input.getFileSize() == 0) {
std::cerr << "File " << inFileName << " is empty" << std::endl;
return EXIT_FAILURE;
}
if (verbose || printInfo) {
OpMode opmode = input.getOpMode();
if (!printInfo) {
std::cout << (opmode == COMPRESS ? "Compressing" : "Decompressing")
<< " file " << inFileName << std::endl;
progress = std::shared_ptr<ProgressBar>(new ProgressBar(jobs));
} else {
std::cout << "File is "
<< (opmode == COMPRESS ? "uncompressed" : "compressed") << std::endl;
}
if (opmode == DECOMPRESS) {
std::cout << "Bit size: " << (int) input.getBitSize() << std::endl;
std::cout << "Original size: " << input.getOriginalSize() << std::endl;
}
std::cout << "File size: " << input.getFileSize() << std::endl;
if (opmode == DECOMPRESS && input.getOriginalSize() != 0) {
float compressRatio = (float) input.getFileSize() / input.getOriginalSize();
std::cout << "Compression ratio: "
<< std::round(compressRatio * 1000) / 1000 << std::endl;
}
if (!printInfo) {
if (opmode == COMPRESS)
std::cout << "Encoding with bit size: " << bitSize << std::endl;
if (nullOutput)
std::cout << "Discarding output" << std::endl;
else if (outFileName != "")
std::cout << "Writing output to " << outFileName << std::endl;
else
std::cout << "Writing output to stdout" << std::endl;
}
}
if (printInfo)
return EXIT_SUCCESS;
std::shared_ptr<Output> output;
if (nullOutput) {
output = std::shared_ptr<Output>(new NullOutput());
} else if (outFileName == "") {
output = std::shared_ptr<Output>(new StreamOutput());
} else {
output = std::shared_ptr<Output>(new FileOutput());
if (!(*output).openFile(outFileName)) {
std::cerr << "Cannot write to file " << outFileName << std::endl;
return EXIT_FAILURE;
}
}
if (progress)
progress->start();
if (benchmark)
timestampStart = std::chrono::system_clock::now();
if (input.getOpMode() == COMPRESS) {
Encoder encoder;
try {
encoder.encode(input, *output, bitSize, progress);
} catch (std::exception e) {
std::cerr << "Error encoding: " << e.what() << std::endl;
return EXIT_FAILURE;
}
} else if (input.getOpMode() == DECOMPRESS) {
Decoder decoder;
input.setBounds(8, input.getFileSize() - 24);
decoder.decode(input, *output, progress);
}
if (benchmark)
timestampEnd = std::chrono::system_clock::now();
if (progress)
progress->stop();
if (benchmark)
std::cout << "Time elapsed: "
<< std::chrono::duration_cast<std::chrono::milliseconds>
(timestampEnd - timestampStart).count() << " ms" << std::endl;
return EXIT_SUCCESS;
}
| 30.294643 | 89 | 0.595933 | jclc |
d601747ccb7268afd879de7522813e6ef338ef4f | 3,178 | cpp | C++ | src/editor/Widgets/VerbWidget.cpp | tedvalson/NovelTea | f731951f25936cb7f5ff23e543e0301c1b5bfe82 | [
"MIT"
] | null | null | null | src/editor/Widgets/VerbWidget.cpp | tedvalson/NovelTea | f731951f25936cb7f5ff23e543e0301c1b5bfe82 | [
"MIT"
] | null | null | null | src/editor/Widgets/VerbWidget.cpp | tedvalson/NovelTea | f731951f25936cb7f5ff23e543e0301c1b5bfe82 | [
"MIT"
] | null | null | null | #include "VerbWidget.hpp"
#include "ui_VerbWidget.h"
#include <NovelTea/ProjectData.hpp>
#include <NovelTea/Verb.hpp>
#include <QDebug>
VerbWidget::VerbWidget(const std::string &idName, QWidget *parent)
: EditorTabWidget(parent)
, ui(new Ui::VerbWidget)
{
m_idName = idName;
ui->setupUi(this);
load();
MODIFIER(ui->lineEditName, &QLineEdit::textChanged);
MODIFIER(ui->scriptEditDefault, &ScriptEdit::textChanged);
MODIFIER(ui->scriptEditConditional, &ScriptEdit::textChanged);
MODIFIER(ui->horizontalSlider, &QSlider::valueChanged);
MODIFIER(ui->propertyEditor, &PropertyEditor::valueChanged);
}
VerbWidget::~VerbWidget()
{
delete ui;
}
QString VerbWidget::tabText() const
{
return QString::fromStdString(idName());
}
EditorTabWidget::Type VerbWidget::getType() const
{
return EditorTabWidget::Verb;
}
void VerbWidget::saveData() const
{
if (m_verb)
{
std::vector<std::string> actionStructure;
for (auto lineEdit : m_lineEdits)
actionStructure.push_back(lineEdit->text().toStdString());
m_verb->setName(ui->lineEditName->text().toStdString());
m_verb->setScriptDefault(ui->scriptEditDefault->toPlainText().toStdString());
m_verb->setScriptConditional(ui->scriptEditConditional->toPlainText().toStdString());
m_verb->setActionStructure(actionStructure);
m_verb->setProperties(ui->propertyEditor->getValue());
Proj.set<NovelTea::Verb>(m_verb, idName());
}
}
void VerbWidget::loadData()
{
m_verb = Proj.get<NovelTea::Verb>(idName());
qDebug() << "Loading verb data... " << QString::fromStdString(idName());
if (!m_verb)
{
// Object is new, so show it as modified
setModified();
m_verb = std::make_shared<NovelTea::Verb>();
}
ui->lineEditName->setText(QString::fromStdString(m_verb->getName()));
ui->scriptEditDefault->setPlainText(QString::fromStdString(m_verb->getScriptDefault()));
ui->scriptEditConditional->setPlainText(QString::fromStdString(m_verb->getScriptConditional()));
ui->horizontalSlider->setValue(m_verb->getObjectCount());
ui->propertyEditor->setValue(m_verb->getProperties());
loadActionStructure();
}
void VerbWidget::loadActionStructure()
{
m_lineEdits.clear();
QLayoutItem *child;
while ((child = ui->layoutActionStructure->takeAt(0)) != 0)
{
delete child->widget();
delete child;
}
addLineEdit();
for (int i = 0; i < m_verb->getObjectCount(); ++i)
{
auto label = new QLabel;
label->setText(QString("object%1").arg(i+1));
label->setMargin(10);
ui->layoutActionStructure->addWidget(label);
addLineEdit();
}
for (int i = 0; i < m_lineEdits.size(); ++i)
{
auto &lineEdit = m_lineEdits[i];
std::string str;
if (i < m_verb->getActionStructure().size())
str = m_verb->getActionStructure()[i];
if (i == 0 && str.empty())
str = m_verb->getName();
lineEdit->setText(QString::fromStdString(str));
MODIFIER(lineEdit, &QLineEdit::textChanged);
}
}
void VerbWidget::addLineEdit()
{
auto lineEdit = new QLineEdit;
lineEdit->setAlignment(Qt::AlignHCenter);
ui->layoutActionStructure->addWidget(lineEdit);
m_lineEdits.push_back(lineEdit);
}
void VerbWidget::on_horizontalSlider_valueChanged(int value)
{
m_verb->setObjectCount(value);
loadActionStructure();
}
| 26.483333 | 97 | 0.724984 | tedvalson |
d604d7002f6c58f71ac7b27100e2897d237ce421 | 36,020 | cc | C++ | tesseract-recognize.cc | mauvilsa/tesseract-recognize | 5bace16f3201565264e058bd594df43cfaca9fd4 | [
"MIT"
] | 34 | 2017-04-13T16:12:14.000Z | 2021-09-13T18:12:25.000Z | tesseract-recognize.cc | mauvilsa/tesseract-recognize | 5bace16f3201565264e058bd594df43cfaca9fd4 | [
"MIT"
] | 7 | 2017-07-17T12:16:53.000Z | 2021-08-10T06:07:14.000Z | tesseract-recognize.cc | mauvilsa/tesseract-recognize | 5bace16f3201565264e058bd594df43cfaca9fd4 | [
"MIT"
] | 7 | 2017-07-24T09:11:47.000Z | 2021-06-15T17:21:26.000Z | /**
* Tool that does layout analysis and OCR using tesseract providing results in Page XML format
*
* @version $Version: 2021.02.09$
* @author Mauricio Villegas <[email protected]>
* @copyright Copyright (c) 2015-present, Mauricio Villegas <[email protected]>
* @link https://github.com/mauvilsa/tesseract-recognize
* @license MIT License
*/
/*** Includes *****************************************************************/
#include <algorithm>
#include <string>
using std::string;
#include <regex>
#include <set>
#include <sstream>
#include <iterator>
#include <getopt.h>
#include <../leptonica/allheaders.h>
#include <../tesseract/baseapi.h>
#include "PageXML.h"
/*** Definitions **************************************************************/
static char tool[] = "tesseract-recognize";
static char version[] = "Version: 2021.02.09";
char gb_page_ns[] = "http://schema.primaresearch.org/PAGE/gts/pagecontent/2013-07-15";
char gb_default_lang[] = "eng";
char gb_default_xpath[] = "//_:TextRegion";
char gb_default_output[] = "-";
char *gb_output = gb_default_output;
char *gb_lang = gb_default_lang;
char *gb_tessdata = NULL;
int gb_psm = tesseract::PSM_AUTO;
int gb_oem = tesseract::OEM_DEFAULT;
bool gb_onlylayout = false;
bool gb_textlevels[] = { false, false, false, false };
bool gb_textatlayout = true;
char *gb_xpath = gb_default_xpath;
char *gb_image = NULL;
int gb_density = 300;
bool gb_inplace = false;
bool gb_save_crops = false;
enum {
LEVEL_REGION = 0,
LEVEL_LINE,
LEVEL_WORD,
LEVEL_GLYPH
};
const char* levelStrings[] = {
"region",
"line",
"word",
"glyph"
};
inline static int parseLevel( const char* level ) {
int levels = sizeof(levelStrings) / sizeof(levelStrings[0]);
for( int n=0; n<levels; n++ )
if( ! strcmp(levelStrings[n],level) )
return n;
return -1;
}
int gb_layoutlevel = LEVEL_LINE;
enum {
OPTION_OUTPUT = 'o',
OPTION_HELP = 'h',
OPTION_VERSION = 'v',
OPTION_TESSDATA = 256,
OPTION_LANG ,
OPTION_LAYOUTLEVEL ,
OPTION_TEXTLEVELS ,
OPTION_ONLYLAYOUT ,
OPTION_SAVECROPS ,
OPTION_XPATH ,
OPTION_IMAGE ,
OPTION_DENSITY ,
OPTION_PSM ,
OPTION_OEM ,
OPTION_INPLACE
};
static char gb_short_options[] = "o:hv";
static struct option gb_long_options[] = {
{ "output", required_argument, NULL, OPTION_OUTPUT },
{ "help", no_argument, NULL, OPTION_HELP },
{ "version", no_argument, NULL, OPTION_VERSION },
{ "tessdata", required_argument, NULL, OPTION_TESSDATA },
{ "lang", required_argument, NULL, OPTION_LANG },
{ "psm", required_argument, NULL, OPTION_PSM },
{ "oem", required_argument, NULL, OPTION_OEM },
{ "layout-level", required_argument, NULL, OPTION_LAYOUTLEVEL },
{ "text-levels", required_argument, NULL, OPTION_TEXTLEVELS },
{ "only-layout", no_argument, NULL, OPTION_ONLYLAYOUT },
{ "save-crops", no_argument, NULL, OPTION_SAVECROPS },
{ "xpath", required_argument, NULL, OPTION_XPATH },
{ "image", required_argument, NULL, OPTION_IMAGE },
{ "density", required_argument, NULL, OPTION_DENSITY },
{ "inplace", no_argument, NULL, OPTION_INPLACE },
{ 0, 0, 0, 0 }
};
/*** Functions ****************************************************************/
#define strbool( cond ) ( ( cond ) ? "true" : "false" )
void print_usage() {
fprintf( stderr, "Description: Layout analysis and OCR using tesseract providing results in Page XML format\n" );
fprintf( stderr, "Usage: %s [OPTIONS] (IMAGE+|PDF+|PAGEXML)\n", tool );
fprintf( stderr, "Options:\n" );
fprintf( stderr, " --lang LANG Language used for OCR (def.=%s)\n", gb_lang );
fprintf( stderr, " --tessdata PATH Location of tessdata (def.=%s)\n", gb_tessdata );
fprintf( stderr, " --psm MODE Page segmentation mode (def.=%d)\n", gb_psm );
#if TESSERACT_VERSION >= 0x040000
fprintf( stderr, " --oem MODE OCR engine mode (def.=%d)\n", gb_oem );
#endif
fprintf( stderr, " --layout-level LEVEL Layout output level: region, line, word, glyph (def.=%s)\n", levelStrings[gb_layoutlevel] );
fprintf( stderr, " --text-levels L1[,L2]+ Text output level(s): region, line, word, glyph (def.=layout-level)\n" );
fprintf( stderr, " --only-layout Only perform layout analysis, no OCR (def.=%s)\n", strbool(gb_onlylayout) );
fprintf( stderr, " --save-crops Saves cropped images (def.=%s)\n", strbool(gb_save_crops) );
fprintf( stderr, " --xpath XPATH xpath for selecting elements to process (def.=%s)\n", gb_xpath );
fprintf( stderr, " --image IMAGE Use given image instead of one in Page XML\n" );
fprintf( stderr, " --density DENSITY Density in dpi for pdf rendering (def.=%d)\n", gb_density );
fprintf( stderr, " --inplace Overwrite input XML with result (def.=%s)\n", strbool(gb_inplace) );
fprintf( stderr, " -o, --output Output page xml file (def.=%s)\n", gb_output );
fprintf( stderr, " -h, --help Print this usage information and exit\n" );
fprintf( stderr, " -v, --version Print version and exit\n" );
fprintf( stderr, "\n" );
int r = system( "tesseract --help-psm 2>&1 | sed '/^ *[02] /d; s| (Default)||;' 1>&2" );
if( r != 0 )
fprintf( stderr, "warning: tesseract command not found in path\n" );
#if TESSERACT_VERSION >= 0x040000
fprintf( stderr, "\n" );
r += system( "tesseract --help-oem 1>&2" );
#endif
fprintf( stderr, "Examples:\n" );
fprintf( stderr, " %s -o out.xml in1.png in2.png ### Multiple images as input\n", tool );
fprintf( stderr, " %s -o out.xml in.tiff ### TIFF possibly with multiple frames\n", tool );
fprintf( stderr, " %s -o out.xml --density 200 in.pdf\n", tool );
fprintf( stderr, " %s -o out.xml --xpath //_:Page in.xml ### Empty page xml recognize the complete pages\n", tool );
fprintf( stderr, " %s -o out.xml --psm 1 in.png ### Detect page orientation pages\n", tool );
fprintf( stderr, " %s -o out.xml --xpath \"//_:TextRegion[@id='r1']\" --layout-level word --only-layout in.xml ### Detect text lines and words only in TextRegion with id=r1\n", tool );
}
void setCoords( tesseract::ResultIterator* iter, tesseract::PageIteratorLevel iter_level, PageXML& page, xmlNodePtr& xelem, int x, int y, tesseract::Orientation orientation = tesseract::ORIENTATION_PAGE_UP ) {
int left, top, right, bottom;
int pagenum = page.getPageNumber(xelem);
iter->BoundingBox( iter_level, &left, &top, &right, &bottom );
std::vector<cv::Point2f> points;
if ( left == 0 && top == 0 && right == (int)page.getPageWidth(pagenum) && bottom == (int)page.getPageHeight(pagenum) )
points = { cv::Point2f(0,0), cv::Point2f(0,0) };
else {
cv::Point2f tl(x+left,y+top);
cv::Point2f tr(x+right,y+top);
cv::Point2f br(x+right,y+bottom);
cv::Point2f bl(x+left,y+bottom);
switch( orientation ) {
case tesseract::ORIENTATION_PAGE_UP: points = { tl, tr, br, bl }; break;
case tesseract::ORIENTATION_PAGE_RIGHT: points = { tr, br, bl, tl }; break;
case tesseract::ORIENTATION_PAGE_LEFT: points = { bl, tl, tr, br }; break;
case tesseract::ORIENTATION_PAGE_DOWN: points = { br, bl, tl, tr }; break;
}
}
page.setCoords( xelem, points );
}
void setLineCoords( tesseract::ResultIterator* iter, tesseract::PageIteratorLevel iter_level, PageXML& page, xmlNodePtr& xelem, int x, int y, tesseract::Orientation orientation ) {
setCoords( iter, iter_level, page, xelem, x, y, orientation );
std::vector<cv::Point2f> coords = page.getPoints( xelem );
int x1, y1, x2, y2;
iter->Baseline( iter_level, &x1, &y1, &x2, &y2 );
cv::Point2f b_p1(x+x1,y+y1), b_p2(x+x2,y+y2);
cv::Point2f baseline_p1, baseline_p2;
if ( ! page.intersection( b_p1, b_p2, coords[0], coords[3], baseline_p1 ) ||
! page.intersection( b_p1, b_p2, coords[1], coords[2], baseline_p2 ) ) {
std::string lid = page.getAttr(xelem,"id");
fprintf(stderr,"warning: no intersection between baseline and bounding box sides id=%s\n",lid.c_str());
std::vector<cv::Point2f> baseline = {
cv::Point2f(x+x1,y+y1),
cv::Point2f(x+x2,y+y2) };
page.setBaseline( xelem, baseline );
return;
}
std::vector<cv::Point2f> baseline = { baseline_p1, baseline_p2 };
page.setBaseline( xelem, baseline );
double up1 = cv::norm( baseline_p1 - coords[0] );
double up2 = cv::norm( baseline_p2 - coords[1] );
double down1 = cv::norm( baseline_p1 - coords[3] );
double down2 = cv::norm( baseline_p2 - coords[2] );
double height = 0.5*( up1 + up2 + down1 + down2 );
double offset = height <= 0.0 ? 0.0 : 0.5*( down1 + down2 ) / height;
page.setPolystripe( xelem, height <= 0.0 ? 1.0 : height, offset, false );
}
void setTextEquiv( tesseract::ResultIterator* iter, tesseract::PageIteratorLevel iter_level, PageXML& page, xmlNodePtr& xelem ) {
double conf = 0.01*iter->Confidence( iter_level );
char* text = iter->GetUTF8Text( iter_level );
std::string stext(text);
stext = std::regex_replace( stext, std::regex("^\\s+|\\s+$"), "$1" );
page.setTextEquiv( xelem, stext.c_str(), &conf );
delete[] text;
}
template<typename Out>
void split( const std::string &s, char delim, Out result ) {
std::stringstream ss(s);
std::string item;
while( std::getline(ss, item, delim) )
*(result++) = item;
}
std::set<int> parsePagesSet( std::string range ) {
std::set<int> pages_set;
std::vector<std::string> parts;
split( range, ',', std::back_inserter(parts) );
for( auto part : parts ) {
std::string::size_type dash_pos = part.find('-');
if( dash_pos == std::string::npos )
pages_set.insert(stoi(part));
else
for( int num=stoi(part.substr(0, dash_pos)); num<=stoi(part.substr(dash_pos+1)); num++ )
pages_set.insert(num);
}
return pages_set;
}
/*** Program ******************************************************************/
int main( int argc, char *argv[] ) {
/// Disable debugging and informational messages from Leptonica. ///
setMsgSeverity(L_SEVERITY_ERROR);
/// Parse input arguments ///
int n,m;
std::stringstream test;
std::string token;
while ( ( n = getopt_long(argc,argv,gb_short_options,gb_long_options,&m) ) != -1 )
switch ( n ) {
case OPTION_TESSDATA:
gb_tessdata = optarg;
break;
case OPTION_LANG:
gb_lang = optarg;
break;
case OPTION_PSM:
gb_psm = atoi(optarg);
if( gb_psm < tesseract::PSM_AUTO_OSD || gb_psm == tesseract::PSM_AUTO_ONLY || gb_psm >= tesseract::PSM_COUNT ) {
fprintf( stderr, "%s: error: invalid page segmentation mode: %s\n", tool, optarg );
return 1;
}
break;
#if TESSERACT_VERSION >= 0x040000
case OPTION_OEM:
gb_oem = atoi(optarg);
if( gb_oem < tesseract::OEM_TESSERACT_ONLY || gb_oem >= tesseract::OEM_COUNT ) {
fprintf( stderr, "%s: error: invalid OCR engine mode: %s\n", tool, optarg );
return 1;
}
break;
#endif
case OPTION_LAYOUTLEVEL:
gb_layoutlevel = parseLevel(optarg);
if( gb_layoutlevel == -1 ) {
fprintf( stderr, "%s: error: invalid level: %s\n", tool, optarg );
return 1;
}
break;
case OPTION_TEXTLEVELS:
test = std::stringstream(optarg);
while( std::getline(test, token, ',') ) {
int textlevel = parseLevel(token.c_str());
if( textlevel == -1 ) {
fprintf( stderr, "%s: error: invalid level: %s\n", tool, token.c_str() );
return 1;
}
gb_textlevels[textlevel] = true;
gb_textatlayout = false;
}
break;
case OPTION_ONLYLAYOUT:
gb_onlylayout = true;
break;
case OPTION_SAVECROPS:
gb_save_crops = true;
break;
case OPTION_XPATH:
gb_xpath = optarg;
break;
case OPTION_IMAGE:
gb_image = optarg;
break;
case OPTION_DENSITY:
gb_density = atoi(optarg);
break;
case OPTION_INPLACE:
gb_inplace = true;
break;
case OPTION_OUTPUT:
gb_output = optarg;
break;
case OPTION_HELP:
print_usage();
return 0;
case OPTION_VERSION:
fprintf( stderr, "%s %s\n", tool, version+9 );
fprintf( stderr, "compiled against PageXML %s\n", PageXML::version() );
#ifdef TESSERACT_VERSION_STR
fprintf( stderr, "compiled against tesseract %s, linked with %s\n", TESSERACT_VERSION_STR, tesseract::TessBaseAPI::Version() );
#else
fprintf( stderr, "linked with tesseract %s\n", tesseract::TessBaseAPI::Version() );
#endif
return 0;
default:
fprintf( stderr, "%s: error: incorrect input argument: %s\n", tool, argv[optind-1] );
return 1;
}
/// Default text level ///
if ( gb_textatlayout )
gb_textlevels[gb_layoutlevel] = true;
/// Check that there is at least one non-option argument ///
if ( optind >= argc ) {
fprintf( stderr, "%s: error: at least one input file must be provided, see usage with --help\n", tool );
return 1;
}
/// Initialize tesseract just for layout or with given language and tessdata path///
tesseract::TessBaseAPI *tessApi = new tesseract::TessBaseAPI();
if ( gb_onlylayout && gb_psm != tesseract::PSM_AUTO_OSD )
tessApi->InitForAnalysePage();
else
#if TESSERACT_VERSION >= 0x040000
if ( tessApi->Init( gb_tessdata, gb_lang, (tesseract::OcrEngineMode)gb_oem ) ) {
#else
if ( tessApi->Init( gb_tessdata, gb_lang) ) {
#endif
fprintf( stderr, "%s: error: could not initialize tesseract\n", tool );
return 1;
}
tessApi->SetPageSegMode( (tesseract::PageSegMode)gb_psm );
PageXML page;
int num_pages = 0;
bool pixRelease = false;
std::vector<NamedImage> images;
tesseract::ResultIterator* iter = NULL;
std::regex reIsXml(".+\\.xml$|^-$",std::regex_constants::icase);
std::regex reIsTiff(".+\\.tif{1,2}(|\\[[-, 0-9]+\\])$",std::regex_constants::icase);
std::regex reIsPdf(".+\\.pdf(|\\[[-, 0-9]+\\])$",std::regex_constants::icase);
std::regex reImagePageNum("(.+)\\[([-, 0-9]+)\\]$");
std::cmatch base_match;
char *input_file = argv[optind];
bool input_xml = std::regex_match(input_file,base_match,reIsXml);
/// Inplace only when XML input and output not specified ///
if ( gb_inplace && ( ! input_xml || strcmp(gb_output,"-") ) ) {
fprintf( stderr, "%s: warning: ignoring --inplace option, output to %s\n", tool, gb_output );
gb_inplace = false;
}
/// Info for process element ///
char tool_info[128];
if ( gb_onlylayout )
snprintf( tool_info, sizeof tool_info, "%s_v%.10s tesseract_v%s", tool, version+9, tesseract::TessBaseAPI::Version() );
else
snprintf( tool_info, sizeof tool_info, "%s_v%.10s tesseract_v%s lang=%s", tool, version+9, tesseract::TessBaseAPI::Version(), gb_lang );
/// Loop through input files ///
for ( ; optind < argc; optind++ ) {
input_file = argv[optind];
input_xml = std::regex_match(input_file,base_match,reIsXml);
bool input_tiff = std::regex_match(input_file,base_match,reIsTiff);
bool input_pdf = std::regex_match(input_file,base_match,reIsPdf);
/// Get selected pages for tiff/pdf if given ///
std::set<int> pages_set;
std::string page_sel;
std::string input_file_str = std::string(input_file);
if ( input_tiff || input_pdf ) {
if( std::regex_match(input_file, base_match, reImagePageNum) ) {
pages_set = parsePagesSet(base_match[2].str());
page_sel = std::string(base_match[2].str());
input_file_str = std::string(base_match[1].str());
}
}
/// Input is xml ///
if ( input_xml ) {
if ( num_pages > 0 ) {
fprintf( stderr, "%s: error: only a single page xml allowed as input\n", tool );
return 1;
}
try {
page.loadXml( input_file ); // if input_file is "-" xml is read from stdin
} catch ( const std::exception& e ) {
fprintf( stderr, "%s: error: problems reading xml file: %s\n%s\n", tool, input_file, e.what() );
return 1;
}
if ( gb_image != NULL ) {
if ( page.count("//_:Page") > 1 ) {
fprintf( stderr, "%s: error: specifying image with multipage xml input not supported\n", tool );
return 1;
}
page.loadImage( 0, gb_image );
}
num_pages += page.count("//_:Page");
if ( gb_psm == tesseract::PSM_AUTO_OSD && page.count("//_:ImageOrientation") > 0 ) {
fprintf( stderr, "%s: error: refusing to use OSD on page xml that already contains ImageOrientation elements\n", tool );
return 1;
}
std::vector<xmlNodePtr> sel = page.select(gb_xpath);
int selPages = 0;
for ( n=0; n<(int)sel.size(); n++ )
if ( page.nodeIs( sel[n], "Page" ) )
selPages++;
if ( selPages > 0 && selPages != (int)sel.size() ) {
fprintf( stderr, "%s: error: xpath can select Page or non-Page elements but not a mixture of both: %s\n", tool, gb_xpath );
return 1;
}
if ( selPages == 0 ) {
pixRelease = true;
images = page.crop( (std::string(gb_xpath)+"/_:Coords").c_str(), NULL, false );
page.releaseImages();
}
else {
for ( n=0; n<(int)sel.size(); n++ ) {
NamedImage namedimage;
namedimage.image = NULL;
namedimage.node = sel[n];
images.push_back( namedimage );
num_pages++;
}
}
}
/// Input is tiff image ///
else if ( input_tiff ) {
pixRelease = true;
/// Read input image ///
PIXA* tiffimage = pixaReadMultipageTiff( input_file_str.c_str() );
if ( tiffimage == NULL || tiffimage->n == 0 ) {
fprintf( stderr, "%s: error: problems reading tiff image: %s\n", tool, input_file );
return 1;
}
if ( pages_set.size() > 0 && tiffimage->n <= *pages_set.rbegin() ) {
fprintf( stderr, "%s: error: invalid page selection (%s) on tiff with %d pages\n", tool, page_sel.c_str(), tiffimage->n+1 );
return 1;
}
for ( n=0; n<tiffimage->n; n++ ) {
if ( pages_set.size() > 0 && pages_set.find(n) == pages_set.end() )
continue;
PageImage image = pixClone(tiffimage->pix[n]);
std::string pagepath = input_file_str+"["+std::to_string(n)+"]";
NamedImage namedimage;
namedimage.image = image;
if ( num_pages == 0 )
namedimage.node = page.newXml( tool_info, pagepath.c_str(), pixGetWidth(image), pixGetHeight(image), gb_page_ns );
else
namedimage.node = page.addPage( pagepath.c_str(), pixGetWidth(image), pixGetHeight(image) );
images.push_back( namedimage );
num_pages++;
}
pixaDestroy(&tiffimage);
}
/// Input is pdf ///
else if ( input_pdf ) {
std::vector< std::pair<double,double> > pdf_pages = gsGetPdfPageSizes(input_file_str);
if ( pages_set.size() > 0 && (int)pdf_pages.size() <= *pages_set.rbegin() ) {
fprintf( stderr, "%s: error: invalid page selection (%s) on pdf with %d pages\n", tool, page_sel.c_str(), (int)pdf_pages.size() );
return 1;
}
for ( n=0; n<(int)pdf_pages.size(); n++ ) {
if ( pages_set.size() > 0 && pages_set.find(n) == pages_set.end() )
continue;
std::string pagepath = input_file_str+"["+std::to_string(n)+"]";
NamedImage namedimage;
namedimage.image = NULL;
if ( num_pages == 0 )
namedimage.node = page.newXml( tool_info, pagepath.c_str(), (int)(0.5+pdf_pages[n].first), (int)(0.5+pdf_pages[n].second), gb_page_ns );
else
namedimage.node = page.addPage( pagepath.c_str(), (int)(0.5+pdf_pages[n].first), (int)(0.5+pdf_pages[n].second) );
images.push_back( namedimage );
num_pages++;
}
}
/// Input is image ///
else {
/// Read input image ///
PageImage image = pixRead( input_file );
if ( image == NULL ) {
fprintf( stderr, "%s: error: problems reading image: %s\n", tool, input_file );
return 1;
}
NamedImage namedimage;
namedimage.image = NULL;
if ( num_pages == 0 )
namedimage.node = page.newXml( tool_info, input_file, pixGetWidth(image), pixGetHeight(image), gb_page_ns );
else
namedimage.node = page.addPage( input_file, pixGetWidth(image), pixGetHeight(image) );
num_pages++;
pixDestroy(&image);
images.push_back( namedimage );
}
}
page.processStart(tool_info);
/// Loop through all images to process ///
for ( n=0; n<(int)images.size(); n++ ) {
xmlNodePtr xpg = page.closest( "Page", images[n].node );
if ( images[n].image == NULL ) {
try {
page.loadImage(xpg, NULL, true, gb_density );
images[n].image = page.getPageImage(n);
} catch ( const std::exception& e ) {
fprintf( stderr, "%s: error: problems loading page image: %s :: %s\n", tool, page.getPageImageFilename(n).c_str(), e.what() );
return 1;
}
}
tessApi->SetImage( images[n].image );
if ( gb_save_crops && input_xml ) {
std::string fout = std::string("crop_")+std::to_string(n)+"_"+images[n].id+".png";
fprintf( stderr, "%s: writing cropped image: %s\n", tool, fout.c_str() );
pixWriteImpliedFormat( fout.c_str(), images[n].image, 0, 0 );
}
/// For xml input setup node level ///
xmlNodePtr node = NULL;
int node_level = -1;
if ( input_xml ) {
node = images[n].node->parent;
if ( page.nodeIs( node, "TextRegion" ) )
node_level = LEVEL_REGION;
else if ( page.nodeIs( node, "TextLine" ) ) {
node_level = LEVEL_LINE;
if ( gb_psm != tesseract::PSM_SINGLE_LINE && gb_psm != tesseract::PSM_RAW_LINE ) {
fprintf( stderr, "%s: error: for xml input selecting text lines, valid page segmentation modes are %d and %d\n", tool, tesseract::PSM_SINGLE_LINE, tesseract::PSM_RAW_LINE );
return 1;
}
}
else if ( page.nodeIs( node, "Word" ) ) {
node_level = LEVEL_WORD;
if ( gb_psm != tesseract::PSM_SINGLE_WORD && gb_psm != tesseract::PSM_CIRCLE_WORD ) {
fprintf( stderr, "%s: error: for xml input selecting words, valid page segmentation modes are %d and %d\n", tool, tesseract::PSM_SINGLE_WORD, tesseract::PSM_CIRCLE_WORD );
return 1;
}
}
else if ( page.nodeIs( node, "Glyph" ) ) {
node_level = LEVEL_GLYPH;
if ( gb_psm != tesseract::PSM_SINGLE_CHAR ) {
fprintf( stderr, "%s: error: for xml input selecting glyphs, the only valid page segmentation mode is %d\n", tool, tesseract::PSM_SINGLE_CHAR );
return 1;
}
}
if ( gb_layoutlevel < node_level ) {
fprintf( stderr, "%s: error: layout level lower than xpath selection level\n", tool );
return 1;
}
}
/// Perform layout analysis ///
if ( gb_onlylayout && gb_psm != tesseract::PSM_AUTO_OSD )
iter = (tesseract::ResultIterator*)( tessApi->AnalyseLayout() );
/// Perform recognition ///
else {
tessApi->Recognize( 0 );
iter = tessApi->GetIterator();
}
if ( iter != NULL && ! iter->Empty( tesseract::RIL_BLOCK ) ) {
/// Orientation and Script Detection ///
tesseract::Orientation orientation;
tesseract::WritingDirection writing_direction;
tesseract::TextlineOrder textline_order;
float deskew_angle;
iter->Orientation( &orientation, &writing_direction, &textline_order, &deskew_angle );
if ( gb_psm == tesseract::PSM_AUTO_OSD ) {
if ( deskew_angle != 0.0 )
page.setProperty( xpg, "deskewAngle", deskew_angle );
switch ( orientation ) {
case tesseract::ORIENTATION_PAGE_RIGHT: page.setProperty( xpg, "apply-image-orientation", -90 ); break;
case tesseract::ORIENTATION_PAGE_LEFT: page.setProperty( xpg, "apply-image-orientation", 90 ); break;
case tesseract::ORIENTATION_PAGE_DOWN: page.setProperty( xpg, "apply-image-orientation", 180 ); break;
default: break;
}
switch ( writing_direction ) {
case tesseract::WRITING_DIRECTION_LEFT_TO_RIGHT: page.setProperty( xpg, "readingDirection", "left-to-right" ); break;
case tesseract::WRITING_DIRECTION_RIGHT_TO_LEFT: page.setProperty( xpg, "readingDirection", "right-to-left" ); break;
case tesseract::WRITING_DIRECTION_TOP_TO_BOTTOM: page.setProperty( xpg, "readingDirection", "top-to-bottom" ); break;
}
switch ( textline_order ) {
case tesseract::TEXTLINE_ORDER_LEFT_TO_RIGHT: page.setProperty( xpg, "textLineOrder", "left-to-right" ); break;
case tesseract::TEXTLINE_ORDER_RIGHT_TO_LEFT: page.setProperty( xpg, "textLineOrder", "right-to-left" ); break;
case tesseract::TEXTLINE_ORDER_TOP_TO_BOTTOM: page.setProperty( xpg, "textLineOrder", "top-to-bottom" ); break;
}
}
/// Loop through blocks ///
int block = 0;
while ( gb_layoutlevel >= LEVEL_REGION ) {
/// Skip non-text blocks ///
/*
0 PT_UNKNOWN, // Type is not yet known. Keep as the first element.
1 PT_FLOWING_TEXT, // Text that lives inside a column.
2 PT_HEADING_TEXT, // Text that spans more than one column.
3 PT_PULLOUT_TEXT, // Text that is in a cross-column pull-out region.
4 PT_EQUATION, // Partition belonging to an equation region.
5 PT_INLINE_EQUATION, // Partition has inline equation.
6 PT_TABLE, // Partition belonging to a table region.
7 PT_VERTICAL_TEXT, // Text-line runs vertically.
8 PT_CAPTION_TEXT, // Text that belongs to an image.
9 PT_FLOWING_IMAGE, // Image that lives inside a column.
10 PT_HEADING_IMAGE, // Image that spans more than one column.
11 PT_PULLOUT_IMAGE, // Image that is in a cross-column pull-out region.
12 PT_HORZ_LINE, // Horizontal Line.
13 PT_VERT_LINE, // Vertical Line.
14 PT_NOISE, // Lies outside of any column.
*/
if ( iter->BlockType() > PT_CAPTION_TEXT ) {
if ( ! iter->Next( tesseract::RIL_BLOCK ) )
break;
continue;
}
block++;
xmlNodePtr xreg = NULL;
std::string rid = "b" + std::to_string(block);
/// If xml input and region selected, prepend id to rid and set xreg to node ///
if ( node_level == LEVEL_REGION ) {
rid = std::string(images[n].id) + "_" + rid;
xreg = node;
}
/// If it is multipage, prepend page number to rid ///
if ( num_pages > 1 )
rid = std::string("pg") + std::to_string(1+page.getPageNumber(xpg)) + "_" + rid;
/// Otherwise add block as TextRegion element ///
if ( node_level < LEVEL_REGION ) {
xreg = page.addTextRegion( xpg, rid.c_str() );
/// Set block bounding box and text ///
setCoords( iter, tesseract::RIL_BLOCK, page, xreg, images[n].x, images[n].y );
if ( ! gb_onlylayout && gb_textlevels[LEVEL_REGION] )
setTextEquiv( iter, tesseract::RIL_BLOCK, page, xreg );
}
/// Set rotation and reading direction ///
/*tesseract::Orientation orientation;
tesseract::WritingDirection writing_direction;
tesseract::TextlineOrder textline_order;
float deskew_angle;*/
iter->Orientation( &orientation, &writing_direction, &textline_order, &deskew_angle );
if ( ! input_xml || node_level <= LEVEL_REGION ) {
if ( deskew_angle != 0.0 )
page.setProperty( xpg, "deskewAngle", deskew_angle );
PAGEXML_READ_DIRECTION direct = PAGEXML_READ_DIRECTION_LTR;
switch( writing_direction ) {
case tesseract::WRITING_DIRECTION_LEFT_TO_RIGHT: direct = PAGEXML_READ_DIRECTION_LTR; break;
case tesseract::WRITING_DIRECTION_RIGHT_TO_LEFT: direct = PAGEXML_READ_DIRECTION_RTL; break;
case tesseract::WRITING_DIRECTION_TOP_TO_BOTTOM: direct = PAGEXML_READ_DIRECTION_TTB; break;
}
page.setReadingDirection( xreg, direct );
/*float orient = 0.0;
switch( orientation ) {
case tesseract::ORIENTATION_PAGE_UP: orient = 0.0; break;
case tesseract::ORIENTATION_PAGE_RIGHT: orient = -90.0; break;
case tesseract::ORIENTATION_PAGE_LEFT: orient = 90.0; break;
case tesseract::ORIENTATION_PAGE_DOWN: orient = 180.0; break;
}
page.setRotation( xreg, orient );*/
}
/// Loop through paragraphs in current block ///
int para = 0;
while ( gb_layoutlevel >= LEVEL_REGION ) {
para++;
/// Loop through lines in current paragraph ///
int line = 0;
while ( gb_layoutlevel >= LEVEL_LINE ) {
line++;
xmlNodePtr xline = NULL;
/// If xml input and line selected, set xline to node ///
if ( node_level == LEVEL_LINE )
xline = node;
/// Otherwise add TextLine element ///
else if ( node_level < LEVEL_LINE ) {
std::string lid = rid + "_p" + std::to_string(para) + "_l" + std::to_string(line);
xline = page.addTextLine( xreg, lid.c_str() );
}
/// Set line bounding box, baseline and text ///
if ( xline != NULL ) {
setLineCoords( iter, tesseract::RIL_TEXTLINE, page, xline, images[n].x, images[n].y, orientation );
if ( ! gb_onlylayout && gb_textlevels[LEVEL_LINE] )
setTextEquiv( iter, tesseract::RIL_TEXTLINE, page, xline );
}
/// Loop through words in current text line ///
while ( gb_layoutlevel >= LEVEL_WORD ) {
xmlNodePtr xword = NULL;
/// If xml input and word selected, set xword to node ///
if ( node_level == LEVEL_WORD )
xword = node;
/// Otherwise add Word element ///
else if ( node_level < LEVEL_WORD )
xword = page.addWord( xline );
/// Set word bounding box and text ///
if ( xword != NULL ) {
setCoords( iter, tesseract::RIL_WORD, page, xword, images[n].x, images[n].y, orientation );
if ( ! gb_onlylayout && gb_textlevels[LEVEL_WORD] )
setTextEquiv( iter, tesseract::RIL_WORD, page, xword );
}
/// Loop through symbols in current word ///
while ( gb_layoutlevel >= LEVEL_GLYPH ) {
/// Set xglyph to node or add new Glyph element depending on the case ///
xmlNodePtr xglyph = node_level == LEVEL_GLYPH ? node : page.addGlyph( xword );
/// Set symbol bounding box and text ///
setCoords( iter, tesseract::RIL_SYMBOL, page, xglyph, images[n].x, images[n].y, orientation );
if ( ! gb_onlylayout && gb_textlevels[LEVEL_GLYPH] )
setTextEquiv( iter, tesseract::RIL_SYMBOL, page, xglyph );
if ( iter->IsAtFinalElement( tesseract::RIL_WORD, tesseract::RIL_SYMBOL ) )
break;
iter->Next( tesseract::RIL_SYMBOL );
} // while ( gb_layoutlevel >= LEVEL_GLYPH ) {
if ( iter->IsAtFinalElement( tesseract::RIL_TEXTLINE, tesseract::RIL_WORD ) )
break;
iter->Next( tesseract::RIL_WORD );
} // while ( gb_layoutlevel >= LEVEL_WORD ) {
if ( iter->IsAtFinalElement( tesseract::RIL_PARA, tesseract::RIL_TEXTLINE ) )
break;
iter->Next( tesseract::RIL_TEXTLINE );
} // while ( gb_layoutlevel >= LEVEL_LINE ) {
if ( iter->IsAtFinalElement( tesseract::RIL_BLOCK, tesseract::RIL_PARA ) )
break;
iter->Next( tesseract::RIL_PARA );
} // while ( gb_layoutlevel >= LEVEL_REGION ) {
if ( ! iter->Next( tesseract::RIL_BLOCK ) )
break;
} // while ( gb_layoutlevel >= LEVEL_REGION ) {
} // if ( iter != NULL && ! iter->Empty( tesseract::RIL_BLOCK ) ) {
page.releaseImage(xpg);
} // for ( n=0; n<(int)images.size(); n++ ) {
/// Apply image orientations ///
std::vector<xmlNodePtr> sel = page.select("//_:Page[_:Property/@key='apply-image-orientation']");
for ( n=(int)sel.size()-1; n>=0; n-- ) {
int angle = atoi( page.getPropertyValue( sel[n], "apply-image-orientation" ).c_str() );
if ( angle )
page.rotatePage( -angle, sel[n], true );
page.rmElems( page.select("_:Property[@key='apply-image-orientation']", sel[n]) );
std::vector<xmlNodePtr> lines = page.select(".//_:TextLine",sel[n]);
/// Fix image orientation using baselines ///
if ( lines.size() > 0 ) {
double domangle = page.getDominantBaselinesOrientation(lines);
angle = 0;
if ( domangle >= M_PI/4 && domangle < 3*M_PI/4 )
angle = -90;
else if ( domangle <= -M_PI/4 && domangle > -3*M_PI/4 )
angle = 90;
else if ( domangle >= 3*M_PI/4 || domangle <= -3*M_PI/4 )
angle = 180;
if ( angle )
page.rotatePage(angle, sel[n], true);
}
}
/// Fill in "0,0 0,0" Word Coords ///
sel = page.select("//_:Word[_:Coords/@points='0,0 0,0']");
for ( n=(int)sel.size()-1; n>=0; n-- ) {
xmlNodePtr elem = sel[n];
xmlNodePtr elem_pre = page.selectNth("preceding-sibling::_:Word[_:Coords/@points!='0,0 0,0']", -1, elem);
xmlNodePtr elem_fol = page.selectNth("following-sibling::_:Word[_:Coords/@points!='0,0 0,0']", 0, elem);
if ( elem_pre == NULL && elem_fol == NULL ) {
page.setCoords(elem, page.getPoints(page.parent(elem)));
page.setProperty(elem, "coords-unk-filler");
continue;
}
std::vector<cv::Point2f> pts_pre = page.getPoints(elem_pre);
std::vector<cv::Point2f> pts_fol = page.getPoints(elem_fol);
std::vector<cv::Point2f> pts;
if ( elem_pre != NULL && elem_fol != NULL ) {
pts.push_back(pts_pre[1]);
pts.push_back(pts_fol[0]);
pts.push_back(pts_fol[3]);
pts.push_back(pts_pre[2]);
}
else if ( elem_pre != NULL ) {
cv::Point2f upper = pts_pre[1] - pts_pre[0];
cv::Point2f lower = pts_pre[2] - pts_pre[3];
upper = upper/cv::norm(upper) + pts_pre[1];
lower = lower/cv::norm(lower) + pts_pre[2];
pts.push_back(pts_pre[1]);
pts.push_back(upper);
pts.push_back(lower);
pts.push_back(pts_pre[2]);
}
else {
cv::Point2f upper = pts_fol[0] - pts_fol[1];
cv::Point2f lower = pts_fol[3] - pts_fol[2];
upper = upper/cv::norm(upper) + pts_fol[0];
lower = lower/cv::norm(lower) + pts_fol[3];
pts.push_back(upper);
pts.push_back(pts_fol[0]);
pts.push_back(pts_fol[3]);
pts.push_back(lower);
}
page.setCoords(elem, pts);
page.setProperty(elem, "coords-unk-filler");
}
/// Try to make imageFilename be a relative path w.r.t. the output XML ///
if ( ! input_xml && ! gb_inplace && strcmp(gb_output,"-") )
page.relativizeImageFilename(gb_output);
/// Write resulting XML ///
int bytes = page.write( gb_inplace ? input_file : gb_output );
if ( bytes <= 0 )
fprintf( stderr, "%s: error: problems writing to output xml\n", tool );
/// Release resources ///
if ( pixRelease )
for ( n=0; n<(int)images.size(); n++ )
pixDestroy(&(images[n].image));
tessApi->End();
delete tessApi;
delete iter;
return bytes <= 0 ? 1 : 0;
}
| 40.931818 | 209 | 0.598751 | mauvilsa |
d607276feed1876d7426297fa7dd6a9fab4b7381 | 1,561 | cpp | C++ | src/c++/methods/CommentsInstanceMethods.cpp | TestingTravis/modioSDK | b15c4442a8acdb4bf690a846232399eaf9fe18f6 | [
"MIT"
] | null | null | null | src/c++/methods/CommentsInstanceMethods.cpp | TestingTravis/modioSDK | b15c4442a8acdb4bf690a846232399eaf9fe18f6 | [
"MIT"
] | null | null | null | src/c++/methods/CommentsInstanceMethods.cpp | TestingTravis/modioSDK | b15c4442a8acdb4bf690a846232399eaf9fe18f6 | [
"MIT"
] | null | null | null | #include "c++/ModIOInstance.h"
namespace modio
{
void Instance::getAllModComments(u32 mod_id, modio::FilterCreator &filter, const std::function<void(const modio::Response &response, const std::vector<modio::Comment> &comments)> &callback)
{
const struct GetAllModCommentsCall *get_all_mod_comments_call = new GetAllModCommentsCall{callback};
get_all_mod_comments_calls[this->current_call_id] = (GetAllModCommentsCall *)get_all_mod_comments_call;
modioGetAllModComments((void *)new u32(this->current_call_id), mod_id, *filter.getFilter(), &onGetAllModComments);
this->current_call_id++;
}
void Instance::getModComment(u32 mod_id, u32 comment_id, const std::function<void(const modio::Response &response, const modio::Comment &comment)> &callback)
{
const struct GetModCommentCall *get_mod_comment_call = new GetModCommentCall{callback};
get_mod_comment_calls[this->current_call_id] = (GetModCommentCall *)get_mod_comment_call;
modioGetModComment((void *)new u32(this->current_call_id), mod_id, comment_id, &onGetModComment);
this->current_call_id++;
}
void Instance::deleteModComment(u32 mod_id, u32 comment_id, const std::function<void(const modio::Response &response)> &callback)
{
const struct GenericCall *delete_mod_comment_call = new GenericCall{callback};
delete_mod_comment_calls[this->current_call_id] = (GenericCall *)delete_mod_comment_call;
modioDeleteModComment((void *)new u32(this->current_call_id), mod_id, comment_id, &onDeleteModComment);
this->current_call_id++;
}
} // namespace modio
| 44.6 | 189 | 0.778988 | TestingTravis |
d61a1cca8333efa64a7526312a72713da091f7a9 | 2,567 | hpp | C++ | OfferReview/OfferReview/01_38/26_SubstructureInTree/SubstructureInTree.hpp | chm994483868/HMDailyLearningRecord | 95ff0a5347927ce4527bcdd70374e5be22bfc60d | [
"MIT"
] | 2 | 2021-06-26T08:07:04.000Z | 2021-08-03T06:05:40.000Z | OfferReview/OfferReview/01_38/26_SubstructureInTree/SubstructureInTree.hpp | chm994483868/HMDailyLearningRecord | 95ff0a5347927ce4527bcdd70374e5be22bfc60d | [
"MIT"
] | null | null | null | OfferReview/OfferReview/01_38/26_SubstructureInTree/SubstructureInTree.hpp | chm994483868/HMDailyLearningRecord | 95ff0a5347927ce4527bcdd70374e5be22bfc60d | [
"MIT"
] | null | null | null | //
// SubstructureInTree.hpp
// OfferReview
//
// Created by CHM on 2020/7/29.
// Copyright © 2020 CHM. All rights reserved.
//
#ifndef SubstructureInTree_hpp
#define SubstructureInTree_hpp
#include <stdio.h>
namespace SubstructureInTree {
// 26:树的子结构
// 题目:输入两棵二叉树A和B,判断B是不是A的子结构。
struct BinaryTreeNode {
double m_dbValue;
BinaryTreeNode* m_pLeft;
BinaryTreeNode* m_pRight;
};
bool doesTree1HaveTree2(BinaryTreeNode* pRoot1, BinaryTreeNode* pRoot2);
bool equal(double num1, double num2);
bool hasSubtree(BinaryTreeNode* pRoot1, BinaryTreeNode* pRoot2);
// 辅助代码
BinaryTreeNode* CreateBinaryTreeNode(double dbValue);
void ConnectTreeNodes(BinaryTreeNode* pParent, BinaryTreeNode* pLeft, BinaryTreeNode* pRight);
void DestroyTree(BinaryTreeNode* pRoot);
// 测试代码
void Test(char* testName, BinaryTreeNode* pRoot1, BinaryTreeNode* pRoot2, bool expected);
// 树中结点含有分叉,树B是树A的子结构
// 8 8
// / \ / \
// 8 7 9 2
// / \
// 9 2
// / \
// 4 7
void Test1();
// 树中结点含有分叉,树B不是树A的子结构
// 8 8
// / \ / \
// 8 7 9 2
// / \
// 9 3
// / \
// 4 7
void Test2();
// 树中结点只有左子结点,树B是树A的子结构
// 8 8
// / /
// 8 9
// / /
// 9 2
// /
// 2
// /
// 5
void Test3();
// 树中结点只有左子结点,树B不是树A的子结构
// 8 8
// / /
// 8 9
// / /
// 9 3
// /
// 2
// /
// 5
void Test4();
// 树中结点只有右子结点,树B是树A的子结构
// 8 8
// \ \
// 8 9
// \ \
// 9 2
// \
// 2
// \
// 5
void Test5();
// 树A中结点只有右子结点,树B不是树A的子结构
// 8 8
// \ \
// 8 9
// \ / \
// 9 3 2
// \
// 2
// \
// 5
void Test6();
// 树 A 为空树
void Test7();
// 树 B 为空树
void Test8();
// 树A和树B都为空
void Test9();
void Test();
}
#endif /* SubstructureInTree_hpp */
| 23.550459 | 94 | 0.3806 | chm994483868 |
d61dfb0f234a9e2d183888452ae7a80373d8809d | 742 | cpp | C++ | Codeforces/Codeforces 1200 1400/1178B.cpp | Superdanby/YEE | 49a6349dc5644579246623b480777afbf8031fcd | [
"MIT"
] | 1 | 2019-09-07T15:56:05.000Z | 2019-09-07T15:56:05.000Z | Codeforces/Codeforces 1200 1400/1178B.cpp | Superdanby/YEE | 49a6349dc5644579246623b480777afbf8031fcd | [
"MIT"
] | null | null | null | Codeforces/Codeforces 1200 1400/1178B.cpp | Superdanby/YEE | 49a6349dc5644579246623b480777afbf8031fcd | [
"MIT"
] | null | null | null | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(int argc, char const *argv[]) {
string inp;
cin >> inp;
vector<ll> left(inp.length(), 0), right(inp.length(), 0);
for (size_t i = 2, j = inp.length() - 3; i < inp.length(); ++i, --j)
{
if (inp[i - 1] == 'v' && inp[i - 2] == 'v')
left[i] = left[i - 1] + 1;
else
left[i] = left[i - 1];
if (inp[j + 1] == 'v' && inp[j + 2] == 'v')
right[j] = right[j + 1] + 1;
else
right[j] = right[j + 1];
}
ll ans = 0;
for (size_t i = 0; i < inp.length(); ++i)
if (inp[i] =='o')
ans += left[i] * right[i];
cout << ans << "\n";
return 0;
}
| 24.733333 | 72 | 0.421833 | Superdanby |
d6202244b11c5b42952b1c447fa48887abbc05fd | 2,521 | cpp | C++ | src/ssl/Exception.cpp | Good-Pudge/OkHttpFork | b179350d6262f281c1c27d69d944c62f536fe1ba | [
"BSL-1.0",
"Apache-2.0",
"OpenSSL"
] | 10 | 2019-02-21T06:21:48.000Z | 2022-02-22T08:01:24.000Z | src/ssl/Exception.cpp | Good-Pudge/OkHttpFork | b179350d6262f281c1c27d69d944c62f536fe1ba | [
"BSL-1.0",
"Apache-2.0",
"OpenSSL"
] | 2 | 2018-02-04T20:16:46.000Z | 2018-02-04T20:19:00.000Z | src/ssl/Exception.cpp | Good-Pudge/OkHttpFork | b179350d6262f281c1c27d69d944c62f536fe1ba | [
"BSL-1.0",
"Apache-2.0",
"OpenSSL"
] | 10 | 2018-10-15T10:17:00.000Z | 2022-02-17T02:28:51.000Z | //
// Created by Good_Pudge.
//
#include "Util.hpp"
#include <ohf/ssl/Exception.hpp>
namespace ohf {
namespace ssl {
std::string get_error(Exception::Code code) {
std::string m_what;
switch(code) {
case ohf::Exception::Code::SSL_CREATE_ERROR:
m_what = "SSL create error: ";
break;
case ohf::Exception::Code::SSL_CREATE_CONTEXT_ERROR:
m_what = "SSL create context error: ";
break;
case ohf::Exception::Code::SSL_CREATE_CONNECTION_ERROR:
m_what = "SSL create connection error: ";
break;
case ohf::Exception::Code::SSL_ERROR:
m_what = "SSL error: ";
break;
case ohf::Exception::Code::SSL_ACCEPT_ERROR:
m_what = "SSL accept error: ";
break;
case ohf::Exception::Code::SSL_FAILED_TO_USE_CERTIFICATE_FILE:
m_what = "SSL failed to use certificate file: ";
break;
case ohf::Exception::Code::SSL_FAILED_TO_USE_PRIVATE_KEY_FILE:
m_what = "SSL failed to use private key file: ";
break;
case ohf::Exception::Code::SSL_FAILED_TO_VERIFY_PRIVATE_KEY:
m_what = "SSL failed to verify private key: ";
break;
case ohf::Exception::Code::SSL_PROTOCOL_DOES_NOT_SUPPORTED:
m_what = "SSL protocol doesn't supported: ";
break;
default: {
throw ohf::Exception(Exception::Code::INVALID_EXCEPTION_CODE,
"Invalid exception code: " + std::to_string((Int32) code));
}
}
return m_what;
}
Exception::Exception(const Code &code) :
ohf::Exception(code, get_error(code)),
ssl_code(0)
{
m_what += (ssl_message = getOpenSSLError());
}
Exception::Exception(const Exception::Code &code, const SSL &ssl, Int32 retCode) : Exception(code) {
ssl_code = SSL_get_error(ssl.pImpl->ssl, retCode);
}
Int32 Exception::sslCode() const noexcept {
return ssl_code;
}
std::string Exception::sslMessage() const noexcept {
return ssl_message;
}
}
}
| 36.536232 | 108 | 0.503372 | Good-Pudge |
d62036c96de9ba6e8889edad3ab32b8b439d6f04 | 1,106 | cpp | C++ | FrameWorkCode/TreeItem.cpp | sans-sehgal/OpenOCR_Correct | 18424cd4d887a25c7cfc1743f1f975196b749deb | [
"BSD-3-Clause"
] | 6 | 2021-12-03T05:42:26.000Z | 2022-03-09T01:25:16.000Z | FrameWorkCode/TreeItem.cpp | sans-sehgal/OpenOCR_Correct | 18424cd4d887a25c7cfc1743f1f975196b749deb | [
"BSD-3-Clause"
] | 101 | 2021-08-18T04:12:43.000Z | 2022-03-27T17:31:20.000Z | FrameWorkCode/TreeItem.cpp | sans-sehgal/OpenOCR_Correct | 18424cd4d887a25c7cfc1743f1f975196b749deb | [
"BSD-3-Clause"
] | 4 | 2021-08-21T13:37:21.000Z | 2022-02-26T06:00:27.000Z | #pragma once
#include "TreeItem.h"
#include "Filters.h"
TreeItem::~TreeItem()
{
qDeleteAll(mChildItems);
}
void TreeItem::append_child(TreeItem * child)
{
mChildItems.append(child);
}
TreeItem * TreeItem::child(int row)
{
if(row < 0 || row >= mChildItems.size())
return nullptr;
return mChildItems.at(row);
}
int TreeItem::child_count() const
{
return mChildItems.count();
}
int TreeItem::column_count() const
{
return mItemData.count();
}
QVariant TreeItem::data(int column) const
{
if(column < 0 || column >= mItemData.size())
return QVariant();
return mItemData.at(column);
}
TreeItem * TreeItem::find(QString & str) {
for (auto & v : mItemData) {
//if (std::string(v.typeName()) == "Filter") {
auto name = (QString*) v.data();
if (str == *name) {
return this;
}
//}
}
TreeItem *t;
for (auto p : mChildItems) {
if (t = p->find(str))
return t;
}
return nullptr;
}
int TreeItem::row() const
{
if (mParentItem)
return mParentItem->mChildItems.indexOf(const_cast<TreeItem*>(this));
return 0;
}
TreeItem * TreeItem::parentItem()
{
return mParentItem;
}
| 16.507463 | 71 | 0.659132 | sans-sehgal |
d621d41f5406af4cac6f7bf1158e7c7047acf386 | 1,496 | cc | C++ | test/log_stream_unittest.cc | Mercy1101/my_log | 593dddc9cc4d7b6f2fa51176c7f83429fe43c266 | [
"MIT"
] | null | null | null | test/log_stream_unittest.cc | Mercy1101/my_log | 593dddc9cc4d7b6f2fa51176c7f83429fe43c266 | [
"MIT"
] | null | null | null | test/log_stream_unittest.cc | Mercy1101/my_log | 593dddc9cc4d7b6f2fa51176c7f83429fe43c266 | [
"MIT"
] | null | null | null | /// Copyright (c) 2019,2020 Lijiancong. All rights reserved.
///
/// Use of this source code is governed by a MIT license
/// that can be found in the License file.
#include "log_stream.hpp"
#include <catch2/catch.hpp>
#include "profiler.hpp"
TEST_CASE("log_stream 简单测试", "log") {
LOG(TRACE) << "string"
<< " " << 33 << " " << 55.0;
LOG(DEBUG) << "string"
<< " " << 33 << " " << 55.0;
LOG(INFO) << "string"
<< " " << 33 << " " << 55.0;
LOG(WARN) << "string"
<< " " << 33 << " " << 55.0;
LOG(ERROR) << "string"
<< " " << 33 << " " << 55.0;
LOG(CRITICAL) << "string"
<< " " << 33 << " " << 55.0;
}
TEST_CASE("log_stream效能测试", "log2") {
for (auto i = 0; i < 10; i++) {
PROFILER_F();
for (auto x = 0; x < 1000; x++) {
LOG(TRACE) << "string"
<< " " << 33 << " " << 55.0;
LOG(DEBUG) << "string"
<< " " << 33 << " " << 55.0;
LOG(INFO) << "string"
<< " " << 33 << " " << 55.0;
LOG(WARN) << "string"
<< " " << 33 << " " << 55.0;
LOG(ERROR) << "string"
<< " " << 33 << " " << 55.0;
LOG(CRITICAL) << "string"
<< " " << 33 << " " << 55.0;
}
}
}
TEST_CASE("log_stream 特殊值测试", "log3") {
LOG(TRACE) << ("string");
LOG(DEBUG) << ("string");
LOG(INFO) << ("string");
LOG(WARN) << ("string");
LOG(ERROR) << ("string");
LOG(CRITICAL) << ("string");
}
| 27.2 | 60 | 0.407754 | Mercy1101 |
d6230b0105f396a22f3275ea218d38487a4e3995 | 3,607 | hpp | C++ | include/Org/BouncyCastle/Crypto/Parameters/DesParameters.hpp | darknight1050/BeatSaber-Quest-Codegen | a6eeecc3f0e8f6079630f9a9a72b3121ac7b2032 | [
"Unlicense"
] | null | null | null | include/Org/BouncyCastle/Crypto/Parameters/DesParameters.hpp | darknight1050/BeatSaber-Quest-Codegen | a6eeecc3f0e8f6079630f9a9a72b3121ac7b2032 | [
"Unlicense"
] | null | null | null | include/Org/BouncyCastle/Crypto/Parameters/DesParameters.hpp | darknight1050/BeatSaber-Quest-Codegen | a6eeecc3f0e8f6079630f9a9a72b3121ac7b2032 | [
"Unlicense"
] | null | null | null | // Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "extern/beatsaber-hook/shared/utils/typedefs.h"
// Including type: Org.BouncyCastle.Crypto.Parameters.KeyParameter
#include "Org/BouncyCastle/Crypto/Parameters/KeyParameter.hpp"
#include "extern/beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp"
#include "extern/beatsaber-hook/shared/utils/il2cpp-utils-properties.hpp"
#include "extern/beatsaber-hook/shared/utils/il2cpp-utils-fields.hpp"
#include "extern/beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Type namespace: Org.BouncyCastle.Crypto.Parameters
namespace Org::BouncyCastle::Crypto::Parameters {
// Size: 0x18
#pragma pack(push, 1)
// Autogenerated type: Org.BouncyCastle.Crypto.Parameters.DesParameters
class DesParameters : public Org::BouncyCastle::Crypto::Parameters::KeyParameter {
public:
// Creating value type constructor for type: DesParameters
DesParameters() noexcept {}
// Get static field: static private readonly System.Byte[] DES_weak_keys
static ::Array<uint8_t>* _get_DES_weak_keys();
// Set static field: static private readonly System.Byte[] DES_weak_keys
static void _set_DES_weak_keys(::Array<uint8_t>* value);
// static public System.Boolean IsWeakKey(System.Byte[] key, System.Int32 offset)
// Offset: 0x123C3CC
static bool IsWeakKey(::Array<uint8_t>* key, int offset);
// static public System.Boolean IsWeakKey(System.Byte[] key)
// Offset: 0x123C604
static bool IsWeakKey(::Array<uint8_t>* key);
// static public System.Byte SetOddParity(System.Byte b)
// Offset: 0x123C884
static uint8_t SetOddParity(uint8_t b);
// static public System.Void SetOddParity(System.Byte[] bytes)
// Offset: 0x123C8A4
static void SetOddParity(::Array<uint8_t>* bytes);
// static private System.Void .cctor()
// Offset: 0x123C980
static void _cctor();
// public System.Void .ctor(System.Byte[] key)
// Offset: 0x123C26C
// Implemented from: Org.BouncyCastle.Crypto.Parameters.KeyParameter
// Base method: System.Void KeyParameter::.ctor(System.Byte[] key)
template<::il2cpp_utils::CreationType creationType = ::il2cpp_utils::CreationType::Temporary>
static DesParameters* New_ctor(::Array<uint8_t>* key) {
static auto ___internal__logger = ::Logger::get().WithContext("Org::BouncyCastle::Crypto::Parameters::DesParameters::.ctor");
return THROW_UNLESS((::il2cpp_utils::New<DesParameters*, creationType>(key)));
}
// public System.Void .ctor(System.Byte[] key, System.Int32 keyOff, System.Int32 keyLen)
// Offset: 0x123C66C
// Implemented from: Org.BouncyCastle.Crypto.Parameters.KeyParameter
// Base method: System.Void KeyParameter::.ctor(System.Byte[] key, System.Int32 keyOff, System.Int32 keyLen)
template<::il2cpp_utils::CreationType creationType = ::il2cpp_utils::CreationType::Temporary>
static DesParameters* New_ctor(::Array<uint8_t>* key, int keyOff, int keyLen) {
static auto ___internal__logger = ::Logger::get().WithContext("Org::BouncyCastle::Crypto::Parameters::DesParameters::.ctor");
return THROW_UNLESS((::il2cpp_utils::New<DesParameters*, creationType>(key, keyOff, keyLen)));
}
}; // Org.BouncyCastle.Crypto.Parameters.DesParameters
#pragma pack(pop)
}
DEFINE_IL2CPP_ARG_TYPE(Org::BouncyCastle::Crypto::Parameters::DesParameters*, "Org.BouncyCastle.Crypto.Parameters", "DesParameters");
| 56.359375 | 134 | 0.712503 | darknight1050 |
d624b48f9cc20fcb15c28a498237a6c04a8fa8d6 | 4,204 | cpp | C++ | src/base/ossimAdjustableParameterInfo.cpp | vladislav-horbatiuk/ossim | 82417ad868fac022672335e1684bdd91d662c18c | [
"MIT"
] | 251 | 2015-10-20T09:08:11.000Z | 2022-03-22T18:16:38.000Z | src/base/ossimAdjustableParameterInfo.cpp | IvanLJF/ossim | 2e0143f682b9884a09ff2598ef8737f29e44fbdf | [
"MIT"
] | 73 | 2015-11-02T17:12:36.000Z | 2021-11-15T17:41:47.000Z | src/base/ossimAdjustableParameterInfo.cpp | IvanLJF/ossim | 2e0143f682b9884a09ff2598ef8737f29e44fbdf | [
"MIT"
] | 146 | 2015-10-15T16:00:15.000Z | 2022-03-22T12:37:14.000Z | //*******************************************************************
// Copyright (C) 2000 ImageLinks Inc.
//
// License: See top level LICENSE.txt file.
//
// Author: Garrett Potts
//
//*************************************************************************
// $Id: ossimAdjustableParameterInfo.cpp 11347 2007-07-23 13:01:59Z gpotts $
#include <sstream>
#include <algorithm>
#include <ossim/base/ossimAdjustableParameterInfo.h>
#include <ossim/base/ossimUnitTypeLut.h>
#include <ossim/base/ossimKeywordNames.h>
#include <ossim/base/ossimCommon.h>
// static const char* PARAM_NAME_KW = "name";
// static const char* PARAM_UNITS_KW = "units";
static const char* PARAM_KW = "parameter";
static const char* PARAM_SIGMA_KW = "sigma";
static const char* PARAM_CENTER_KW = "center";
static const char* PARAM_LOCK_FLAG_KW = "lock_flag";
std::ostream& operator <<(std::ostream& out, const ossimAdjustableParameterInfo& data)
{
out << "description: " << data.theDescription << std::endl
<< "center: " << data.theCenter << std::endl
<< "parameter: " << data.theParameter << std::endl
<< "sigma: " << data.theSigma << std::endl
<< "units: " << (ossimUnitTypeLut::instance()->getEntryString(data.theUnit))
<< std::endl
<< "locked: " << (data.theLockFlag?"true":"false") << std::endl;
return out;
}
ossimString ossimAdjustableParameterInfo::getUnitAsString()const
{
return ossimUnitTypeLut::instance()->getEntryString((int)theUnit);
}
void ossimAdjustableParameterInfo::setCenter(double center)
{
if(!theLockFlag)
{
theCenter = center;
}
}
double ossimAdjustableParameterInfo::getCenter()const
{
return theCenter;
}
double ossimAdjustableParameterInfo::computeOffset()const
{
return theCenter + theSigma*theParameter;
}
void ossimAdjustableParameterInfo::setOffset(ossim_float64 value)
{
if(!theLockFlag)
{
double minValue = theCenter - theSigma;
double maxValue = theCenter + theSigma;
double x = 0.0;
if(std::abs(theSigma) > DBL_EPSILON)
{
x = (value - theCenter)/theSigma;
value = theCenter + x*theSigma;
if(value < minValue)
{
x = -1;
}
else if(value > maxValue)
{
x = 1.0;
}
theParameter = x;
}
}
}
bool ossimAdjustableParameterInfo::loadState(const ossimKeywordlist& kwl,
const ossimString& prefix)
{
const char* param = kwl.find(prefix, PARAM_KW);
const char* sigma = kwl.find(prefix, PARAM_SIGMA_KW);
const char* center = kwl.find(prefix, PARAM_CENTER_KW);
const char* unit = kwl.find(prefix, ossimKeywordNames::UNITS_KW);
const char* locked = kwl.find(prefix, PARAM_LOCK_FLAG_KW);
theDescription = kwl.find(prefix, ossimKeywordNames::DESCRIPTION_KW);
if(param)
{
theParameter = ossimString(param).toDouble();
}
else
{
theParameter = 0.0;
}
if(unit)
{
theUnit = (ossimUnitType)(ossimUnitTypeLut::instance()->getEntryNumber(unit));
}
else
{
theUnit = OSSIM_UNIT_UNKNOWN;
}
if(sigma)
{
theSigma = ossimString(sigma).toDouble();
}
else
{
theSigma = 0.0;
}
if(center)
{
theCenter = ossimString(center).toDouble();
}
else
{
theCenter = 0.0;
}
if(locked)
{
theLockFlag = ossimString(locked).toBool();
}
return true;
}
bool ossimAdjustableParameterInfo::saveState(ossimKeywordlist& kwl,
const ossimString& prefix)const
{
kwl.add(prefix,
ossimKeywordNames::DESCRIPTION_KW,
theDescription,
true);
kwl.add(prefix, ossimKeywordNames::UNITS_KW,
ossimUnitTypeLut::instance()->getEntryString(theUnit), true);
kwl.add(prefix, PARAM_KW, theParameter, true);
kwl.add(prefix, PARAM_SIGMA_KW, theSigma, true);
kwl.add(prefix, PARAM_CENTER_KW, theCenter, true);
kwl.add(prefix, PARAM_LOCK_FLAG_KW, theLockFlag, true);
return true;
}
| 27.298701 | 89 | 0.596575 | vladislav-horbatiuk |
d62745605e1ad49759010b0e6da70446dda2987e | 938 | cpp | C++ | Problem/src/SimpleProblem.cpp | tut-cc/DiceTilingMeu | d07d6e27370385ff7b4bce48f34f64bb1caa41ee | [
"MIT"
] | 8 | 2015-10-12T05:39:06.000Z | 2016-08-20T06:12:26.000Z | Problem/src/SimpleProblem.cpp | tut-cc/DiceTilingMeu | d07d6e27370385ff7b4bce48f34f64bb1caa41ee | [
"MIT"
] | null | null | null | Problem/src/SimpleProblem.cpp | tut-cc/DiceTilingMeu | d07d6e27370385ff7b4bce48f34f64bb1caa41ee | [
"MIT"
] | null | null | null | #include "SimpleProblem.hpp"
#include <string>
#include <iostream>
SimpleProblem::SimpleProblem() : field([](){
std::vector<std::string> list;
for (int i = 0; i < 32; ++i) {
std::string str;
std::cin >> str;
list.push_back( str );
}
return list;
}()), stones([this](){
std::vector<std::vector<std::string>> stones;
std::cin >> num;
for(int i = 0; i < num; ++i) {
std::vector<std::string> stone;
for(int i = 0; i < 8; ++i) {
std::string str;
std::cin >> str;
stone.push_back(str);
}
stones.push_back(stone);
}
return stones;
}()) {}
std::vector<std::string> SimpleProblem::get_field_str() const
{
return field;
}
std::vector<std::vector<std::string>> SimpleProblem::get_stones_str() const
{
return stones;
}
std::vector<std::string> SimpleProblem::get_stone_str(int idx) const
{
return stones[ idx ];
}
int SimpleProblem::num_of_stones() const
{
return num;
}
| 19.142857 | 75 | 0.614072 | tut-cc |
d628b15b7336c5d05c275d4421ee0aa981992da8 | 234 | cpp | C++ | solved/11054.cpp | goutomroy/uva.onlinejudge | 5ce09d9e370ad78eabd0fd500ef77ce804e2d0f2 | [
"MIT"
] | null | null | null | solved/11054.cpp | goutomroy/uva.onlinejudge | 5ce09d9e370ad78eabd0fd500ef77ce804e2d0f2 | [
"MIT"
] | null | null | null | solved/11054.cpp | goutomroy/uva.onlinejudge | 5ce09d9e370ad78eabd0fd500ef77ce804e2d0f2 | [
"MIT"
] | null | null | null | #include<stdio.h>
#include<math.h>
void main( )
{
long n,work,prework,i,wine;
while(scanf("%ld",&n)==1 && n!=0)
{
work=prework=0;
for(i=0;i<n;i++)
{
scanf("%ld",&wine);
work+=abs(prework);
prework+=wine;
}
printf("%ld\n",work);
}
}
| 12.315789 | 34 | 0.594017 | goutomroy |
d62b88a1c0df56df0d339305aee9f48e8cfcafcb | 45,230 | cpp | C++ | tsim_example/hardware/chisel/build/verilator/VTestAccel.cpp | BenjaminTu/TsimTest | 4874af4130b32cfb7af522f0f7718c7ded1572a7 | [
"Apache-2.0"
] | null | null | null | tsim_example/hardware/chisel/build/verilator/VTestAccel.cpp | BenjaminTu/TsimTest | 4874af4130b32cfb7af522f0f7718c7ded1572a7 | [
"Apache-2.0"
] | null | null | null | tsim_example/hardware/chisel/build/verilator/VTestAccel.cpp | BenjaminTu/TsimTest | 4874af4130b32cfb7af522f0f7718c7ded1572a7 | [
"Apache-2.0"
] | null | null | null | // Verilated -*- C++ -*-
// DESCRIPTION: Verilator output: Design implementation internals
// See VTestAccel.h for the primary calling header
#include "VTestAccel.h"
#include "VTestAccel__Syms.h"
#include "verilated_dpi.h"
//--------------------
void VTestAccel::eval() {
VL_DEBUG_IF(VL_DBG_MSGF("+++++TOP Evaluate VTestAccel::eval\n"); );
VTestAccel__Syms* __restrict vlSymsp = this->__VlSymsp; // Setup global symbol table
VTestAccel* __restrict vlTOPp VL_ATTR_UNUSED = vlSymsp->TOPp;
#ifdef VL_DEBUG
// Debug assertions
_eval_debug_assertions();
#endif // VL_DEBUG
// Initialize
if (VL_UNLIKELY(!vlSymsp->__Vm_didInit)) _eval_initial_loop(vlSymsp);
// Evaluate till stable
int __VclockLoop = 0;
QData __Vchange = 1;
do {
VL_DEBUG_IF(VL_DBG_MSGF("+ Clock loop\n"););
vlSymsp->__Vm_activity = true;
_eval(vlSymsp);
if (VL_UNLIKELY(++__VclockLoop > 100)) {
// About to fail, so enable debug to see what's not settling.
// Note you must run make with OPT=-DVL_DEBUG for debug prints.
int __Vsaved_debug = Verilated::debug();
Verilated::debug(1);
__Vchange = _change_request(vlSymsp);
Verilated::debug(__Vsaved_debug);
VL_FATAL_MT(__FILE__,__LINE__,__FILE__,"Verilated model didn't converge");
} else {
__Vchange = _change_request(vlSymsp);
}
} while (VL_UNLIKELY(__Vchange));
}
void VTestAccel::_eval_initial_loop(VTestAccel__Syms* __restrict vlSymsp) {
vlSymsp->__Vm_didInit = true;
_eval_initial(vlSymsp);
vlSymsp->__Vm_activity = true;
// Evaluate till stable
int __VclockLoop = 0;
QData __Vchange = 1;
do {
_eval_settle(vlSymsp);
_eval(vlSymsp);
if (VL_UNLIKELY(++__VclockLoop > 100)) {
// About to fail, so enable debug to see what's not settling.
// Note you must run make with OPT=-DVL_DEBUG for debug prints.
int __Vsaved_debug = Verilated::debug();
Verilated::debug(1);
__Vchange = _change_request(vlSymsp);
Verilated::debug(__Vsaved_debug);
VL_FATAL_MT(__FILE__,__LINE__,__FILE__,"Verilated model didn't DC converge");
} else {
__Vchange = _change_request(vlSymsp);
}
} while (VL_UNLIKELY(__Vchange));
}
//--------------------
// Internal Methods
VL_INLINE_OPT void VTestAccel::__Vdpiimwrap_TestAccel__DOT__sim_shell__DOT__mod_sim__DOT__VTASimDPI_TOP(CData& sim_wait, CData& sim_exit) {
VL_DEBUG_IF(VL_DBG_MSGF("+ VTestAccel::__Vdpiimwrap_TestAccel__DOT__sim_shell__DOT__mod_sim__DOT__VTASimDPI_TOP\n"); );
// Body
unsigned char sim_wait__Vcvt;
unsigned char sim_exit__Vcvt;
VTASimDPI(&sim_wait__Vcvt, &sim_exit__Vcvt);
sim_wait = (0xffU & sim_wait__Vcvt);
sim_exit = (0xffU & sim_exit__Vcvt);
}
VL_INLINE_OPT void VTestAccel::__Vdpiimwrap_TestAccel__DOT__sim_shell__DOT__mod_host__DOT__VTAHostDPI_TOP(CData& req_valid, CData& req_opcode, CData& req_addr, IData& req_value, const CData req_deq, const CData resp_valid, const IData resp_value) {
VL_DEBUG_IF(VL_DBG_MSGF("+ VTestAccel::__Vdpiimwrap_TestAccel__DOT__sim_shell__DOT__mod_host__DOT__VTAHostDPI_TOP\n"); );
// Body
unsigned char req_valid__Vcvt;
unsigned char req_opcode__Vcvt;
unsigned char req_addr__Vcvt;
unsigned int req_value__Vcvt;
unsigned char req_deq__Vcvt;
req_deq__Vcvt = req_deq;
unsigned char resp_valid__Vcvt;
resp_valid__Vcvt = resp_valid;
unsigned int resp_value__Vcvt;
resp_value__Vcvt = resp_value;
VTAHostDPI(&req_valid__Vcvt, &req_opcode__Vcvt, &req_addr__Vcvt, &req_value__Vcvt, req_deq__Vcvt, resp_valid__Vcvt, resp_value__Vcvt);
req_valid = (0xffU & req_valid__Vcvt);
req_opcode = (0xffU & req_opcode__Vcvt);
req_addr = (0xffU & req_addr__Vcvt);
req_value = req_value__Vcvt;
}
VL_INLINE_OPT void VTestAccel::__Vdpiimwrap_TestAccel__DOT__sim_shell__DOT__mod_mem__DOT__VTAMemDPI_TOP(const CData req_valid, const CData req_opcode, const CData req_len, const QData req_addr, const CData wr_valid, const QData wr_value, CData& rd_valid, QData& rd_value, const CData rd_ready) {
VL_DEBUG_IF(VL_DBG_MSGF("+ VTestAccel::__Vdpiimwrap_TestAccel__DOT__sim_shell__DOT__mod_mem__DOT__VTAMemDPI_TOP\n"); );
// Body
unsigned char req_valid__Vcvt;
req_valid__Vcvt = req_valid;
unsigned char req_opcode__Vcvt;
req_opcode__Vcvt = req_opcode;
unsigned char req_len__Vcvt;
req_len__Vcvt = req_len;
unsigned long long req_addr__Vcvt;
req_addr__Vcvt = req_addr;
unsigned char wr_valid__Vcvt;
wr_valid__Vcvt = wr_valid;
unsigned long long wr_value__Vcvt;
wr_value__Vcvt = wr_value;
unsigned char rd_valid__Vcvt;
unsigned long long rd_value__Vcvt;
unsigned char rd_ready__Vcvt;
rd_ready__Vcvt = rd_ready;
VTAMemDPI(req_valid__Vcvt, req_opcode__Vcvt, req_len__Vcvt, req_addr__Vcvt, wr_valid__Vcvt, wr_value__Vcvt, &rd_valid__Vcvt, &rd_value__Vcvt, rd_ready__Vcvt);
rd_valid = (0xffU & rd_valid__Vcvt);
rd_value = rd_value__Vcvt;
}
VL_INLINE_OPT void VTestAccel::_sequent__TOP__1(VTestAccel__Syms* __restrict vlSymsp) {
VL_DEBUG_IF(VL_DBG_MSGF("+ VTestAccel::_sequent__TOP__1\n"); );
VTestAccel* __restrict vlTOPp VL_ATTR_UNUSED = vlSymsp->TOPp;
// Variables
// Begin mtask footprint all:
VL_SIG8(__Vtask_TestAccel__DOT__sim_shell__DOT__mod_host__DOT__VTAHostDPI__1__req_valid,7,0);
VL_SIG8(__Vtask_TestAccel__DOT__sim_shell__DOT__mod_host__DOT__VTAHostDPI__1__req_opcode,7,0);
VL_SIG8(__Vtask_TestAccel__DOT__sim_shell__DOT__mod_host__DOT__VTAHostDPI__1__req_addr,7,0);
VL_SIG8(__Vtask_TestAccel__DOT__sim_shell__DOT__mod_mem__DOT__VTAMemDPI__2__rd_valid,7,0);
VL_SIG8(__Vdly__TestAccel__DOT__vta_accel__DOT__rf__DOT__state,0,0);
VL_SIG(__Vtask_TestAccel__DOT__sim_shell__DOT__mod_host__DOT__VTAHostDPI__1__req_value,31,0);
VL_SIGW(__Vtemp2,95,0,3);
VL_SIGW(__Vtemp4,319,0,10);
VL_SIGW(__Vtemp5,319,0,10);
VL_SIGW(__Vtemp7,95,0,3);
VL_SIGW(__Vtemp8,95,0,3);
VL_SIGW(__Vtemp9,95,0,3);
VL_SIGW(__Vtemp11,95,0,3);
VL_SIGW(__Vtemp12,127,0,4);
VL_SIGW(__Vtemp13,127,0,4);
VL_SIGW(__Vtemp14,127,0,4);
VL_SIGW(__Vtemp15,95,0,3);
VL_SIGW(__Vtemp16,95,0,3);
VL_SIGW(__Vtemp17,95,0,3);
VL_SIGW(__Vtemp20,95,0,3);
VL_SIGW(__Vtemp21,127,0,4);
VL_SIGW(__Vtemp22,127,0,4);
VL_SIGW(__Vtemp23,127,0,4);
VL_SIGW(__Vtemp24,95,0,3);
VL_SIGW(__Vtemp25,95,0,3);
VL_SIGW(__Vtemp26,95,0,3);
VL_SIGW(__Vtemp34,95,0,3);
VL_SIGW(__Vtemp36,319,0,10);
VL_SIGW(__Vtemp37,319,0,10);
VL_SIGW(__Vtemp39,95,0,3);
VL_SIGW(__Vtemp40,95,0,3);
VL_SIGW(__Vtemp41,95,0,3);
VL_SIG64(__Vtask_TestAccel__DOT__sim_shell__DOT__mod_mem__DOT__VTAMemDPI__2__rd_value,63,0);
// Body
__Vdly__TestAccel__DOT__vta_accel__DOT__rf__DOT__state
= vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__state;
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:593
if (VL_UNLIKELY((((~ vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_4)
& (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum_io_valid))
& (~ (IData)(vlTOPp->reset))))) {
VL_EXTEND_WQ(65,64, __Vtemp2, vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum__DOT__reg__024);
VL_EXTEND_WQ(319,64, __Vtemp4, vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__sliceAccum__DOT__reg__024);
VL_SHIFTL_WWI(319,319,8, __Vtemp5, __Vtemp4,
(0xffU & vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_2));
VL_EXTEND_WQ(65,63, __Vtemp7, (VL_ULL(0x7fffffffffffffff)
& (((QData)((IData)(
__Vtemp5[1U]))
<< 0x20U)
| (QData)((IData)(
__Vtemp5[0U])))));
VL_ADD_W(3, __Vtemp8, __Vtemp2, __Vtemp7);
__Vtemp9[0U] = __Vtemp8[0U];
__Vtemp9[1U] = __Vtemp8[1U];
__Vtemp9[2U] = (1U & __Vtemp8[2U]);
VL_FWRITEF(0x80000002U,"slice sum: %20# \n",
65,__Vtemp9);
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:593
if (VL_UNLIKELY((((~ vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_5)
& (5U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state)))
& (~ (IData)(vlTOPp->reset))))) {
VL_EXTEND_WQ(65,64, __Vtemp11, vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__sliceAccum__DOT__reg__024);
VL_EXTEND_WQ(128,64, __Vtemp12, vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__reg1);
VL_EXTEND_WQ(128,64, __Vtemp13, vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__reg2);
VL_MUL_W(4, __Vtemp14, __Vtemp12, __Vtemp13);
VL_EXTEND_WQ(65,63, __Vtemp15, (VL_ULL(0x7fffffffffffffff)
& (((QData)((IData)(
__Vtemp14[1U]))
<< 0x20U)
| (QData)((IData)(
__Vtemp14[0U])))));
VL_ADD_W(3, __Vtemp16, __Vtemp11, __Vtemp15);
__Vtemp17[0U] = __Vtemp16[0U];
__Vtemp17[1U] = __Vtemp16[1U];
__Vtemp17[2U] = (1U & __Vtemp16[2U]);
VL_FWRITEF(0x80000002U,"slice sum: %20# \n",
65,__Vtemp17);
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/VTAMemDPI.v:88
if (((IData)(vlTOPp->reset) | (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem__DOT_____05Freset))) {
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem__DOT_____05Frd_valid = 0U;
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem__DOT_____05Frd_value = VL_ULL(0);
} else {
vlTOPp->__Vdpiimwrap_TestAccel__DOT__sim_shell__DOT__mod_mem__DOT__VTAMemDPI_TOP(
((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_121)
| (5U
== (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))),
(5U
== (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state)), 0U,
((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_121)
?
((1U
== (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))
? vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__raddr1
: vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__raddr2)
: vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__waddr), (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum__DOT__ready), vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum__DOT__reg__024, __Vtask_TestAccel__DOT__sim_shell__DOT__mod_mem__DOT__VTAMemDPI__2__rd_valid, __Vtask_TestAccel__DOT__sim_shell__DOT__mod_mem__DOT__VTAMemDPI__2__rd_value,
((2U
== (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))
| (4U
== (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))));
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem__DOT_____05Frd_valid
= __Vtask_TestAccel__DOT__sim_shell__DOT__mod_mem__DOT__VTAMemDPI__2__rd_valid;
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem__DOT_____05Frd_value
= __Vtask_TestAccel__DOT__sim_shell__DOT__mod_mem__DOT__VTAMemDPI__2__rd_value;
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/VTAHostDPI.v:79
if (((IData)(vlTOPp->reset) | (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host__DOT_____05Freset))) {
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host__DOT_____05Freq_valid = 0U;
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host__DOT_____05Freq_opcode = 0U;
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host__DOT_____05Freq_addr = 0U;
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host__DOT_____05Freq_value = 0U;
} else {
vlTOPp->__Vdpiimwrap_TestAccel__DOT__sim_shell__DOT__mod_host__DOT__VTAHostDPI_TOP(__Vtask_TestAccel__DOT__sim_shell__DOT__mod_host__DOT__VTAHostDPI__1__req_valid, __Vtask_TestAccel__DOT__sim_shell__DOT__mod_host__DOT__VTAHostDPI__1__req_opcode, __Vtask_TestAccel__DOT__sim_shell__DOT__mod_host__DOT__VTAHostDPI__1__req_addr, __Vtask_TestAccel__DOT__sim_shell__DOT__mod_host__DOT__VTAHostDPI__1__req_value,
((~ (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__state))
& (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_valid)), (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__state), vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__rdata);
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host__DOT_____05Freq_valid
= __Vtask_TestAccel__DOT__sim_shell__DOT__mod_host__DOT__VTAHostDPI__1__req_valid;
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host__DOT_____05Freq_opcode
= __Vtask_TestAccel__DOT__sim_shell__DOT__mod_host__DOT__VTAHostDPI__1__req_opcode;
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host__DOT_____05Freq_addr
= __Vtask_TestAccel__DOT__sim_shell__DOT__mod_host__DOT__VTAHostDPI__1__req_addr;
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host__DOT_____05Freq_value
= __Vtask_TestAccel__DOT__sim_shell__DOT__mod_host__DOT__VTAHostDPI__1__req_value;
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:879
if (VL_UNLIKELY((((2U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))
& (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem_dpi_rd_valid))
& (~ (IData)(vlTOPp->reset))))) {
VL_FWRITEF(0x80000002U,"slice inputs1: %3# \n",
8,(0xffU & (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem_dpi_rd_bits)));
}
if (VL_UNLIKELY((((4U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))
& (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem_dpi_rd_valid))
& (~ (IData)(vlTOPp->reset))))) {
VL_FWRITEF(0x80000002U,"slice inputs2: %3#\n\n",
8,(0xffU & (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem_dpi_rd_bits)));
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/VTAHostDPI.v:67
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_opcode
= (1U & (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host__DOT_____05Freq_opcode));
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:363
if (vlTOPp->reset) {
__Vdly__TestAccel__DOT__vta_accel__DOT__rf__DOT__state = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_74) {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_77) {
__Vdly__TestAccel__DOT__vta_accel__DOT__rf__DOT__state = 1U;
}
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__state) {
__Vdly__TestAccel__DOT__vta_accel__DOT__rf__DOT__state = 0U;
}
}
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:879
if ((0U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__cnt = 0U;
} else {
if ((6U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__cnt
= vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_158;
}
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:593
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__sliceAccum__DOT__ready = 0U;
} else {
if ((1U & vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_5)) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__sliceAccum__DOT__ready = 0U;
} else {
if ((5U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__sliceAccum__DOT__ready = 1U;
}
}
}
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__state
= __Vdly__TestAccel__DOT__vta_accel__DOT__rf__DOT__state;
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:593
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__sliceAccum__DOT__reg__024
= ((IData)(vlTOPp->reset) ? VL_ULL(0) : (((QData)((IData)(
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__sliceAccum__DOT___GEN_2[1U]))
<< 0x20U)
| (QData)((IData)(
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__sliceAccum__DOT___GEN_2[0U]))));
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:879
if (((2U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))
& (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem_dpi_rd_valid))) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__reg1
= (QData)((IData)((0xffU & (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem_dpi_rd_bits))));
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:879
if (((4U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))
& (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem_dpi_rd_valid))) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__reg2
= (QData)((IData)((0xffU & (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem_dpi_rd_bits))));
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/VTAMemDPI.v:68
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem__DOT_____05Freset
= vlTOPp->reset;
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:593
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum__DOT__reg__024
= ((IData)(vlTOPp->reset) ? VL_ULL(0) : (((QData)((IData)(
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum__DOT___GEN_2[1U]))
<< 0x20U)
| (QData)((IData)(
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum__DOT___GEN_2[0U]))));
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:879
if ((0U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__waddr
= (((QData)((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_11))
<< 0x20U) | (QData)((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_10)));
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:879
if ((0U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__raddr1
= (((QData)((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_7))
<< 0x20U) | (QData)((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_6)));
} else {
if ((6U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__raddr1
= vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_115;
}
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:879
if ((0U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__raddr2
= (((QData)((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_9))
<< 0x20U) | (QData)((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_8)));
} else {
if ((6U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__raddr2
= vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_118;
}
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/VTAHostDPI.v:61
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host__DOT_____05Freset
= vlTOPp->reset;
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/VTAHostDPI.v:67
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_valid
= (1U & (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host__DOT_____05Freq_valid));
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:363
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__rdata = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_235) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__rdata
= ((0U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr))
? vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_0
: ((4U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr))
? vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_1
: ((8U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr))
? vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_2
: ((0xcU == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr))
? vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_3
: ((0x10U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr))
? vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_4
: ((0x14U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr))
? vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_5
: ((0x18U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr))
? vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_6
: ((0x1cU
== (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr))
? vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_7
: (
(0x20U
== (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr))
? vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_8
:
((0x24U
== (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr))
? vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_9
:
((0x28U
== (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr))
? vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_10
:
((0x2cU
== (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr))
? vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_11
: 0U))))))))))));
}
}
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_74
= (1U & (~ (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__state)));
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_158
= ((IData)(1U) + vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__cnt);
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/VTAMemDPI.v:74
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem_dpi_rd_bits
= vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem__DOT_____05Frd_value;
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_115
= (VL_ULL(1) + vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__raddr1);
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_118
= (VL_ULL(1) + vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__raddr2);
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_77
= ((IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_valid)
& (~ (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_opcode)));
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_80
= ((~ (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__state))
& (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_valid));
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:363
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_6 = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_195) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_6
= vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_value;
}
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:363
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_7 = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_201) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_7
= vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_value;
}
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:363
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_8 = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_207) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_8
= vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_value;
}
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:363
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_9 = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_213) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_9
= vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_value;
}
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:363
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_10 = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_219) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_10
= vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_value;
}
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:363
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_11 = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_225) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_11
= vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_value;
}
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:363
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_2 = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_171) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_2
= vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_value;
}
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:363
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_5 = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_189) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_5
= vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_value;
}
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/VTAHostDPI.v:67
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr
= vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host__DOT_____05Freq_addr;
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:363
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_3 = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_177) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_3
= vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_value;
}
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:363
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_1 = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__ce_io_ecnt_0_valid) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_1
= vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__cycles;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_165) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_1
= vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_value;
}
}
}
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_235
= ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_80)
& (~ (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_opcode)));
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_156
= ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_80)
& (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_opcode));
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_165
= ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_156)
& (4U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr)));
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_171
= ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_156)
& (8U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr)));
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_177
= ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_156)
& (0xcU == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr)));
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_189
= ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_156)
& (0x14U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr)));
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_195
= ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_156)
& (0x18U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr)));
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_201
= ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_156)
& (0x1cU == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr)));
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_207
= ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_156)
& (0x20U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr)));
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_213
= ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_156)
& (0x24U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr)));
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_219
= ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_156)
& (0x28U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr)));
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_225
= ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_156)
& (0x2cU == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr)));
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:879
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__cycles
= ((IData)(vlTOPp->reset) ? 0U : ((0U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))
? 0U : vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_110));
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_110
= ((IData)(1U) + vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__cycles);
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:879
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_88) {
if ((1U & vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_0)) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state = 1U;
}
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_89) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state = 2U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_90) {
if (vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem_dpi_rd_valid) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state = 3U;
}
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_91) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state = 4U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_92) {
if (vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem_dpi_rd_valid) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state = 5U;
}
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_93) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state = 6U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_94) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state
= ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_99)
? 0U : 1U);
}
}
}
}
}
}
}
}
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_99
= (vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__cnt
== (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_3
- (IData)(1U)));
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/VTAMemDPI.v:74
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem_dpi_rd_valid
= (1U & (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_mem__DOT_____05Frd_valid));
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_88
= (0U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state));
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_89
= (1U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state));
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_90
= (2U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state));
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_91
= (3U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state));
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_92
= (4U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state));
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_93
= (5U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state));
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_94
= (6U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state));
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_121
= ((1U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))
| (3U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state)));
VL_EXTEND_WQ(65,64, __Vtemp20, vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__sliceAccum__DOT__reg__024);
VL_EXTEND_WQ(128,64, __Vtemp21, vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__reg1);
VL_EXTEND_WQ(128,64, __Vtemp22, vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__reg2);
VL_MUL_W(4, __Vtemp23, __Vtemp21, __Vtemp22);
VL_EXTEND_WQ(65,63, __Vtemp24, (VL_ULL(0x7fffffffffffffff)
& (((QData)((IData)(
__Vtemp23[1U]))
<< 0x20U) | (QData)((IData)(
__Vtemp23[0U])))));
VL_ADD_W(3, __Vtemp25, __Vtemp20, __Vtemp24);
VL_EXTEND_WQ(65,64, __Vtemp26, vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__sliceAccum__DOT__reg__024);
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__sliceAccum__DOT___GEN_2[0U]
= ((1U & vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_5)
? 0U : ((5U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))
? __Vtemp25[0U] : __Vtemp26[0U]));
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__sliceAccum__DOT___GEN_2[1U]
= ((1U & vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_5)
? 0U : ((5U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))
? __Vtemp25[1U] : __Vtemp26[1U]));
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__sliceAccum__DOT___GEN_2[2U]
= (1U & ((1U & vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_5)
? 0U : ((5U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))
? __Vtemp25[2U] : __Vtemp26[2U])));
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce_io_ecnt_0_valid
= ((6U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))
& (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_99));
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:363
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_0 = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__ready) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_0 = 2U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_159) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_0
= vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_value;
}
}
}
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_159
= ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_156)
& (0U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr)));
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:879
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__ready
= vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum__DOT__ready;
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:593
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum__DOT__ready = 0U;
} else {
if ((1U & vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_4)) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum__DOT__ready = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum_io_valid) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum__DOT__ready = 1U;
}
}
}
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum_io_valid
= ((6U == (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__state))
& (IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT___T_99));
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/TestAccel.v:363
if (vlTOPp->reset) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_4 = 0U;
} else {
if (vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_183) {
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_4
= vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_value;
}
}
vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_183
= ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT___T_156)
& (0x10U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_addr)));
VL_EXTEND_WQ(65,64, __Vtemp34, vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum__DOT__reg__024);
VL_EXTEND_WQ(319,64, __Vtemp36, vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__sliceAccum__DOT__reg__024);
VL_SHIFTL_WWI(319,319,8, __Vtemp37, __Vtemp36,
(0xffU & vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_2));
VL_EXTEND_WQ(65,63, __Vtemp39, (VL_ULL(0x7fffffffffffffff)
& (((QData)((IData)(
__Vtemp37[1U]))
<< 0x20U) | (QData)((IData)(
__Vtemp37[0U])))));
VL_ADD_W(3, __Vtemp40, __Vtemp34, __Vtemp39);
VL_EXTEND_WQ(65,64, __Vtemp41, vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum__DOT__reg__024);
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum__DOT___GEN_2[0U]
= ((1U & vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_4)
? 0U : ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum_io_valid)
? __Vtemp40[0U] : __Vtemp41[0U]));
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum__DOT___GEN_2[1U]
= ((1U & vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_4)
? 0U : ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum_io_valid)
? __Vtemp40[1U] : __Vtemp41[1U]));
vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum__DOT___GEN_2[2U]
= (1U & ((1U & vlTOPp->TestAccel__DOT__vta_accel__DOT__rf__DOT__reg_4)
? 0U : ((IData)(vlTOPp->TestAccel__DOT__vta_accel__DOT__ce__DOT__overallAccum_io_valid)
? __Vtemp40[2U] : __Vtemp41[2U])));
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/VTAHostDPI.v:67
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host_dpi_req_value
= vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_host__DOT_____05Freq_value;
}
VL_INLINE_OPT void VTestAccel::_sequent__TOP__2(VTestAccel__Syms* __restrict vlSymsp) {
VL_DEBUG_IF(VL_DBG_MSGF("+ VTestAccel::_sequent__TOP__2\n"); );
VTestAccel* __restrict vlTOPp VL_ATTR_UNUSED = vlSymsp->TOPp;
// Variables
// Begin mtask footprint all:
VL_SIG8(__Vtask_TestAccel__DOT__sim_shell__DOT__mod_sim__DOT__VTASimDPI__0__sim_wait,7,0);
VL_SIG8(__Vtask_TestAccel__DOT__sim_shell__DOT__mod_sim__DOT__VTASimDPI__0__sim_exit,7,0);
// Body
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/VTASimDPI.v:72
if (VL_UNLIKELY((1U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_sim__DOT_____05Fexit)))) {
VL_FINISH_MT("/Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/VTASimDPI.v",74,"");
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/VTASimDPI.v:46
if (((IData)(vlTOPp->reset) | (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_sim__DOT_____05Freset))) {
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_sim__DOT_____05Fwait = 0U;
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_sim__DOT_____05Fexit = 0U;
} else {
vlTOPp->__Vdpiimwrap_TestAccel__DOT__sim_shell__DOT__mod_sim__DOT__VTASimDPI_TOP(__Vtask_TestAccel__DOT__sim_shell__DOT__mod_sim__DOT__VTASimDPI__0__sim_wait, __Vtask_TestAccel__DOT__sim_shell__DOT__mod_sim__DOT__VTASimDPI__0__sim_exit);
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_sim__DOT_____05Fwait
= __Vtask_TestAccel__DOT__sim_shell__DOT__mod_sim__DOT__VTASimDPI__0__sim_wait;
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_sim__DOT_____05Fexit
= __Vtask_TestAccel__DOT__sim_shell__DOT__mod_sim__DOT__VTASimDPI__0__sim_exit;
}
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/VTASimDPI.v:60
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_sim__DOT__wait_reg
= ((~ ((IData)(vlTOPp->reset) | (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_sim__DOT_____05Freset)))
& (1U == (IData)(vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_sim__DOT_____05Fwait)));
vlTOPp->sim_wait = vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_sim__DOT__wait_reg;
// ALWAYS at /Users/benjamintu/Desktop/research/tvm/vta/apps/tsim_example/hardware/chisel/build/chisel/VTASimDPI.v:41
vlTOPp->TestAccel__DOT__sim_shell__DOT__mod_sim__DOT_____05Freset
= vlTOPp->reset;
}
void VTestAccel::_eval(VTestAccel__Syms* __restrict vlSymsp) {
VL_DEBUG_IF(VL_DBG_MSGF("+ VTestAccel::_eval\n"); );
VTestAccel* __restrict vlTOPp VL_ATTR_UNUSED = vlSymsp->TOPp;
// Body
if (((IData)(vlTOPp->clock) & (~ (IData)(vlTOPp->__Vclklast__TOP__clock)))) {
vlTOPp->_sequent__TOP__1(vlSymsp);
vlTOPp->__Vm_traceActivity = (2U | vlTOPp->__Vm_traceActivity);
}
if (((IData)(vlTOPp->sim_clock) & (~ (IData)(vlTOPp->__Vclklast__TOP__sim_clock)))) {
vlTOPp->_sequent__TOP__2(vlSymsp);
vlTOPp->__Vm_traceActivity = (4U | vlTOPp->__Vm_traceActivity);
}
// Final
vlTOPp->__Vclklast__TOP__clock = vlTOPp->clock;
vlTOPp->__Vclklast__TOP__sim_clock = vlTOPp->sim_clock;
}
VL_INLINE_OPT QData VTestAccel::_change_request(VTestAccel__Syms* __restrict vlSymsp) {
VL_DEBUG_IF(VL_DBG_MSGF("+ VTestAccel::_change_request\n"); );
VTestAccel* __restrict vlTOPp VL_ATTR_UNUSED = vlSymsp->TOPp;
// Body
return (vlTOPp->_change_request_1(vlSymsp));
}
VL_INLINE_OPT QData VTestAccel::_change_request_1(VTestAccel__Syms* __restrict vlSymsp) {
VL_DEBUG_IF(VL_DBG_MSGF("+ VTestAccel::_change_request_1\n"); );
VTestAccel* __restrict vlTOPp VL_ATTR_UNUSED = vlSymsp->TOPp;
// Body
// Change detection
QData __req = false; // Logically a bool
return __req;
}
#ifdef VL_DEBUG
void VTestAccel::_eval_debug_assertions() {
VL_DEBUG_IF(VL_DBG_MSGF("+ VTestAccel::_eval_debug_assertions\n"); );
// Body
if (VL_UNLIKELY((clock & 0xfeU))) {
Verilated::overWidthError("clock");}
if (VL_UNLIKELY((reset & 0xfeU))) {
Verilated::overWidthError("reset");}
if (VL_UNLIKELY((sim_clock & 0xfeU))) {
Verilated::overWidthError("sim_clock");}
}
#endif // VL_DEBUG
| 55.70197 | 408 | 0.775525 | BenjaminTu |
d63017b15ecaa6d29a1338a6d85bc3750a226912 | 1,812 | hpp | C++ | interpreter/IDuckPro_AST/src/interpreter/Token.hpp | PS-Group/compiler-theory-samples | c916af50eb42020024257ecd17f9be1580db7bf0 | [
"MIT"
] | null | null | null | interpreter/IDuckPro_AST/src/interpreter/Token.hpp | PS-Group/compiler-theory-samples | c916af50eb42020024257ecd17f9be1580db7bf0 | [
"MIT"
] | null | null | null | interpreter/IDuckPro_AST/src/interpreter/Token.hpp | PS-Group/compiler-theory-samples | c916af50eb42020024257ecd17f9be1580db7bf0 | [
"MIT"
] | null | null | null | #pragma once
#include <string>
struct TokenPos
{
size_t line;
size_t column;
TokenPos()
:line(0), column(0)
{
}
TokenPos(size_t vLine, size_t vColumn)
:line(vLine), column(vColumn)
{
}
};
class Token
{
public:
enum Type {
Type_EOF,
Type_LBRACKET,
Type_RBRACKET,
Type_SEMICOLON,
Type_IDENTIFIER,
Type_ILLEGAL
};
Token()
:_type(Type_EOF)
{
}
explicit Token(Type type,
const TokenPos &start,
const TokenPos &end)
:_type(type)
,_start(start)
,_end(end)
{
}
explicit Token(Type type,
const size_t &sline, const size_t &scolumn,
const size_t &eline, const size_t &ecolumn)
:_type(type)
,_start(sline, scolumn)
,_end(eline, ecolumn)
{
}
std::string classify() const
{
switch (_type)
{
case Type_EOF:
return "end of line";
case Type_LBRACKET:
return "left bracket";
case Type_RBRACKET:
return "right bracket";
case Type_SEMICOLON:
return "semicolon";
case Type_IDENTIFIER:
return "identifier";
default:
return "illegal";
}
}
Type getType() const
{
return _type;
}
void setValue(std::string const& value)
{
_value = value;
}
const std::string &getValue() const
{
return _value;
}
const TokenPos &getStartPos() const
{
return _start;
}
const TokenPos &getEndPos() const
{
return _end;
}
private:
Type _type;
std::string _value;
TokenPos _start;
TokenPos _end;
};
| 17.09434 | 62 | 0.509934 | PS-Group |
d630bdf3a014147a45ffdf8137e1ee9f87d00937 | 441 | cpp | C++ | Mini lista para Iniciantes/aula01-Ex01.cpp | Suricat0Br/Programacao-em-C | a04b5b8e3dbbf82fcec4888d7bdf888bdc53d715 | [
"Apache-2.0"
] | null | null | null | Mini lista para Iniciantes/aula01-Ex01.cpp | Suricat0Br/Programacao-em-C | a04b5b8e3dbbf82fcec4888d7bdf888bdc53d715 | [
"Apache-2.0"
] | null | null | null | Mini lista para Iniciantes/aula01-Ex01.cpp | Suricat0Br/Programacao-em-C | a04b5b8e3dbbf82fcec4888d7bdf888bdc53d715 | [
"Apache-2.0"
] | null | null | null | #include <stdlib.h>
#include <iostream>
#include<stdio.h>
//Faça um Programa que peça as 4 notas bimestrais e mostre a média.
int main()
{
int i;
float nota, media;
printf("Ola, Bem vindo(a) ao software de cadastro de notas!\n\n");
for(i = 0; i<4; i++){
printf("Insira sua %d nota:\n",(i+1));
scanf("%f",¬a);
media = media + nota;
}
system("cls");
printf("Media do aluno = %.1f\n",(media/i));
}
| 23.210526 | 70 | 0.582766 | Suricat0Br |
d63744912ee0b717d77967f1755ba91f73670b46 | 13,220 | cpp | C++ | VGP334/02_HelloModel/GameState.cpp | CyroPCJr/OmegaEngine | 65fbd6cff54266a9c934e3a875a4493d26758661 | [
"MIT"
] | 1 | 2021-04-23T19:18:12.000Z | 2021-04-23T19:18:12.000Z | VGP334/02_HelloModel/GameState.cpp | CyroPCJr/OmegaEngine | 65fbd6cff54266a9c934e3a875a4493d26758661 | [
"MIT"
] | null | null | null | VGP334/02_HelloModel/GameState.cpp | CyroPCJr/OmegaEngine | 65fbd6cff54266a9c934e3a875a4493d26758661 | [
"MIT"
] | 1 | 2021-06-15T10:42:08.000Z | 2021-06-15T10:42:08.000Z | #include "GameState.h"
#include "GameState.h"
#include <ImGui/Inc/imgui.h>
using namespace Omega::Graphics;
using namespace Omega::Input;
using namespace Omega::Math;
namespace
{
void SimpleDrawCamera(const Camera& camera)
{
auto defaultMatView = camera.GetViewMatrix();
Vector3 cameraPosition = camera.GetPosition();
Vector3 cameraRight = { defaultMatView._11, defaultMatView._21, defaultMatView._31 };
Vector3 cameraUp = { defaultMatView._12, defaultMatView._22, defaultMatView._32 };
Vector3 cameraLook = { defaultMatView._13, defaultMatView._23, defaultMatView._33 };
//SimpleDraw::AddSphere(cameraPosition, 0.1f, Colors::White, 6, 8);
SimpleDraw::AddLine(cameraPosition, cameraPosition + cameraRight, Colors::Red);
SimpleDraw::AddLine(cameraPosition, cameraPosition + cameraUp, Colors::Green);
SimpleDraw::AddLine(cameraPosition, cameraPosition + cameraLook, Colors::Blue);
}
}
void GameState::Initialize()
{
GraphicsSystem::Get()->SetClearColor(Colors::Black);
mDefaultCamera.SetNearPlane(0.1f);
mDefaultCamera.SetFarPlane(300.0f);
mDefaultCamera.SetPosition({ 0.0f, 130.0f, -150.0f });
mDefaultCamera.SetLookAt({ 0.0f, 100.0f, 0.0f });
mDebugCamera.SetNearPlane(0.001f);
mDebugCamera.SetFarPlane(10000.0f);
mDebugCamera.SetPosition({ 0.0f, 10.0f, -30.0f });
mDebugCamera.SetLookAt({ 0.0f, 0.0f, 0.0f });
mLightCamera.SetDirection(Normalize({ 1.0f, -1.0f, 1.0f }));
mLightCamera.SetNearPlane(1.0f);
mLightCamera.SetFarPlane(200.0f);
mLightCamera.SetFov(1.0f);
mLightCamera.SetAspectRatio(1.0f);
mActiveCamera = &mDefaultCamera;
mTransformBuffer.Initialize();
mLightBuffer.Initialize();
mMaterialBuffer.Initialize();
mSettingsBuffer.Initialize();
mPostProcessingSettingsBuffer.Initialize();
mDirectionalLight.direction = Normalize({ 1.0f, -1.0f, 1.0f });
mDirectionalLight.ambient = { 0.8f, 0.8f, 0.8f, 1.0f };
mDirectionalLight.diffuse = { 0.75f, 0.75f, 0.75f, 1.0f };
mDirectionalLight.specular = { 0.5f, 0.5f, 0.5f, 1.0f };
mMaterial.ambient = { 0.8f, 0.8f, 0.8f, 1.0f };
mMaterial.diffuse = { 0.8f, 0.8f, 0.8f, 1.0f };
mMaterial.specular = { 0.5f, 0.5f, 0.5f, 1.0f };
mMaterial.power = 40.0f;
mSettings.specularMapWeight = 1.0f;
mSettings.bumpMapWeight = 0.0f;
mSettings.normalMapWeight = 0.0f;
mSettings.aoMapWeight = 1.0f;
mSettings.brightness = 3.5f;
mSettings.useShadow = 1;
mSettings.depthBias = 0.0003f;
mVertexShader.Initialize("../../Assets/Shaders/Standard.fx", BoneVertex::Format);
mPixelShader.Initialize("../../Assets/Shaders/Standard.fx");
mSampler.Initialize(Sampler::Filter::Anisotropic, Sampler::AddressMode::Wrap);
auto graphicsSystem = GraphicsSystem::Get();
constexpr uint32_t depthMapSize = 4096;
mDepthMapRenderTarget.Initialize(depthMapSize, depthMapSize, RenderTarget::Format::RGBA_U32);
mDepthMapVertexShader.Initialize("../../Assets/Shaders/DepthMap.fx", Vertex::Format);
mDepthMapPixelShader.Initialize("../../Assets/Shaders/DepthMap.fx");
mDepthMapConstantBuffer.Initialize();
mShadowConstantBuffer.Initialize();
mRenderTarget.Initialize(
graphicsSystem->GetBackBufferWidth(),
graphicsSystem->GetBackBufferHeight(),
RenderTarget::Format::RGBA_U8);
mAnimation = AnimationBuilder()
.SetTime(0.0f)
.AddPositionKey(Vector3(0.0f, 1.0f, 0.0f))
.AddRotationKey(Quaternion::Identity)
.AddScaleKey(Vector3(1.0f, 1.0f, 1.0f))
.SetTime(5.0f)
.AddPositionKey(Vector3(0.0f, 1.0f, 0.0f))
//.AddRotationKey(Quaternion::RotationAxis(Vector3(0.0f, 1.0f, 0.0f), 90.0f))
.GetAnimation();
// Initialize and load model from assimp
//mModel.Initialize("../../Assets/Models/mutant.model");
mModel.Initialize("../../Assets/Models/Breaking_Dance/Breakdance.model");
mBoneMatrices.resize(mModel.skeleton.bones.size());
// calcualte the bone matrices
UpdateBindPose(mModel.skeleton.root, mBoneMatrices, false);
// Final transformation matrix
for (size_t i = 0; i < mBoneMatrices.size(); ++i)
{
boneTransformData.boneTransforms[i] = Transpose(mModel.skeleton.bones[i]->offsetTransform * mBoneMatrices[i]);
}
mBoneTransformBuffer.Initialize();
}
void GameState::Terminate()
{
mBoneTransformBuffer.Terminate();
mModel.Terminate();
mRenderTarget.Terminate();
mShadowConstantBuffer.Terminate();
mDepthMapConstantBuffer.Terminate();
mDepthMapPixelShader.Terminate();
mDepthMapVertexShader.Terminate();
mDepthMapRenderTarget.Terminate();
mAOMap.Terminate();
mNormalMap.Terminate();
mDisplacementMap.Terminate();
mSpecularMap.Terminate();
mDiffuseMap.Terminate();
mSampler.Terminate();
mPixelShader.Terminate();
mVertexShader.Terminate();
mSettingsBuffer.Terminate();
mMaterialBuffer.Terminate();
mLightBuffer.Terminate();
mTransformBuffer.Terminate();
}
void GameState::Update(float deltaTime)
{
auto inputSystem = InputSystem::Get();
const float kMoveSpeed = inputSystem->IsKeyDown(KeyCode::LSHIFT) ? 100.0f : 10.0f;
const float kTurnSpeed = 1.0f;
if (inputSystem->IsKeyDown(KeyCode::W))
{
mDefaultCamera.Walk(kMoveSpeed * deltaTime);
mLightCamera.Walk(kMoveSpeed * deltaTime);
//mTankPosition.z += kMoveSpeed * deltaTime;
}
if (inputSystem->IsKeyDown(KeyCode::S))
{
mActiveCamera->Walk(-kMoveSpeed * deltaTime);
}
if (inputSystem->IsKeyDown(KeyCode::D))
{
mActiveCamera->Strafe(kMoveSpeed * deltaTime);
}
if (inputSystem->IsKeyDown(KeyCode::A))
{
mActiveCamera->Strafe(-kMoveSpeed * deltaTime);
}
if (inputSystem->IsMouseDown(MouseButton::RBUTTON))
{
mActiveCamera->Yaw(inputSystem->GetMouseMoveX() * kTurnSpeed * deltaTime);
mActiveCamera->Pitch(inputSystem->GetMouseMoveY() * kTurnSpeed * deltaTime);
}
mAnimationTime += deltaTime;
mLightCamera.SetDirection(mDirectionalLight.direction);
mViewFrustumVertices =
{
// Near plane
{ -1.0f, -1.0f, 0.0f },
{ -1.0f, 1.0f, 0.0f },
{ 1.0f, 1.0f, 0.0f },
{ 1.0f, -1.0f, 0.0f },
// Far plane
{ -1.0f, -1.0f, 1.0f },
{ -1.0f, 1.0f, 1.0f },
{ 1.0f, 1.0f, 1.0f },
{ 1.0f, -1.0f, 1.0f },
};
auto defaultMatView = mDefaultCamera.GetViewMatrix();
auto defaultMatProj = mDefaultCamera.GetPerspectiveMatrix();
auto invViewProj = Inverse(defaultMatView * defaultMatProj);
for (auto& vertex : mViewFrustumVertices)
{
vertex = TransformCoord(vertex, invViewProj);
}
const auto& lightLook = mLightCamera.GetDirection();
auto lightSide = Normalize(Cross(Vector3::YAxis, lightLook));
auto lightUp = Normalize(Cross(lightLook, lightSide));
float minX = FLT_MAX, maxX = -FLT_MAX;
float minY = FLT_MAX, maxY = -FLT_MAX;
float minZ = FLT_MAX, maxZ = -FLT_MAX;
for (auto& vertex : mViewFrustumVertices)
{
float projectX = Dot(lightSide, vertex);
minX = Min(minX, projectX);
maxX = Max(maxX, projectX);
float projectY = Dot(lightUp, vertex);
minY = Min(minY, projectY);
maxY = Max(maxY, projectY);
float projectZ = Dot(lightLook, vertex);
minZ = Min(minZ, projectZ);
maxZ = Max(maxZ, projectZ);
}
mLightCamera.SetPosition(
lightSide + (minX + maxX) * 0.5f +
lightUp + (minY + maxY) * 0.5f +
lightLook + (minZ + maxZ) * 0.5f
);
mLightCamera.SetNearPlane(minZ - 300.0f);
mLightCamera.SetFarPlane(maxZ);
mLightProjectMatrix = mLightCamera.GetOrthoGraphiMatrix(maxX - minX, maxY - minY);
auto v0 = lightSide * minX + lightUp * minY + lightLook * minZ;
auto v1 = lightSide * minX + lightUp * maxY + lightLook * minZ;
auto v2 = lightSide * maxX + lightUp * maxY + lightLook * minZ;
auto v3 = lightSide * maxX + lightUp * minY + lightLook * minZ;
auto v4 = lightSide * minX + lightUp * minY + lightLook * maxZ;
auto v5 = lightSide * minX + lightUp * maxY + lightLook * maxZ;
auto v6 = lightSide * maxX + lightUp * maxY + lightLook * maxZ;
auto v7 = lightSide * maxX + lightUp * minY + lightLook * maxZ;
SimpleDraw::AddLine(v0, v1, Colors::Yellow);
SimpleDraw::AddLine(v1, v2, Colors::Yellow);
SimpleDraw::AddLine(v2, v3, Colors::Yellow);
SimpleDraw::AddLine(v3, v0, Colors::Yellow);
SimpleDraw::AddLine(v0, v4, Colors::Red);
SimpleDraw::AddLine(v1, v5, Colors::Red);
SimpleDraw::AddLine(v2, v6, Colors::Red);
SimpleDraw::AddLine(v3, v7, Colors::Red);
SimpleDraw::AddLine(v4, v5, Colors::Red);
SimpleDraw::AddLine(v5, v6, Colors::Red);
SimpleDraw::AddLine(v6, v7, Colors::Red);
SimpleDraw::AddLine(v7, v4, Colors::Red);
SimpleDrawCamera(mLightCamera);
}
void GameState::Render()
{
mDepthMapRenderTarget.BeginRender();
DrawDepthMap();
mDepthMapRenderTarget.EndRender();
mRenderTarget.BindPS(0);
DrawScene();
mRenderTarget.UnBindPS(0);
}
void GameState::DebugUI()
{
ImGui::Begin("Settings", nullptr, ImGuiWindowFlags_AlwaysAutoResize);
if (ImGui::CollapsingHeader("Camera", ImGuiTreeNodeFlags_DefaultOpen))
{
bool lightCamera = mActiveCamera == &mLightCamera;
if (ImGui::Checkbox("Use Light Camera", &lightCamera))
{
mActiveCamera = lightCamera ? &mLightCamera : &mDefaultCamera;
}
bool debugCamera = mActiveCamera == &mDebugCamera;
if (ImGui::Checkbox("Use Debug Camera", &debugCamera))
{
mActiveCamera = debugCamera ? &mDebugCamera : &mDefaultCamera;
}
ImGui::Image(
mDepthMapRenderTarget.GetShaderResourceView(),
{ 150.0f, 150.0f },
{ 0.0f, 0.0f },
{ 1.0f, 1.0f },
{ 1.0f, 1.0f, 1.0f, 1.0f },
{ 1.0f, 1.0f, 1.0f, 1.0f }
);
}
ImGui::Checkbox("Show Skeleton", &mIsSkeleton);
ImGui::End();
}
void GameState::DrawDepthMap()
{
mDepthMapVertexShader.Bind();
mDepthMapPixelShader.Bind();
auto matViewLight = mLightCamera.GetViewMatrix();
auto matProjLight = mLightProjectMatrix;// mLightCamera.GetPerspectiveMatrix();
mDepthMapConstantBuffer.BindVS(0);
//for (auto& position : mTankPositions)
//{
//
//}
/*auto matTrans = Matrix4::Translation(position);
auto matRot = Matrix4::RotationX(mTankRotation.x) * Matrix4::RotationY(mTankRotation.y);*/
//auto matWorld = matRot * matTrans;
auto matWorld = mAnimation.GetTransform(mAnimationTime);// matRot* matTrans;
auto wvp = Transpose(matWorld * matViewLight * matProjLight);
mDepthMapConstantBuffer.Update(wvp);
mModel.Draw();
}
void GameState::DrawScene()
{
auto matView = mActiveCamera->GetViewMatrix();
auto matProj = mActiveCamera->GetPerspectiveMatrix();
auto matViewLight = mLightCamera.GetViewMatrix();
auto matProjLight = mLightProjectMatrix; //mLightCamera.GetPerspectiveMatrix();
mLightBuffer.Update(mDirectionalLight);
mLightBuffer.BindVS(1);
mLightBuffer.BindPS(1);
mMaterialBuffer.Update(mMaterial);
mMaterialBuffer.BindVS(2);
mMaterialBuffer.BindPS(2);
mSettingsBuffer.Update(mSettings);
mSettingsBuffer.BindVS(3);
mSettingsBuffer.BindPS(3);
mSampler.BindVS();
mSampler.BindPS();
mDiffuseMap.BindPS(0);
mSpecularMap.BindPS(1);
mDisplacementMap.BindVS(2);
mNormalMap.BindPS(3);
mAOMap.BindPS(4);
mDepthMapRenderTarget.BindPS(5);
mVertexShader.Bind();
mPixelShader.Bind();
mTransformBuffer.BindVS(0);
mShadowConstantBuffer.BindVS(4);
mBoneTransformBuffer.BindVS(5);
auto matWorld = mAnimation.GetTransform(mAnimationTime);
TransformData transformData;
transformData.world = Transpose(matWorld);
transformData.wvp = Transpose(matWorld * matView * matProj);
transformData.viewPosition = mActiveCamera->GetPosition();
mTransformBuffer.Update(transformData);
auto wvpLight = Transpose(matWorld * matViewLight * matProjLight);
mShadowConstantBuffer.Update(wvpLight);
mBoneTransformBuffer.Update(boneTransformData);
if (!mIsSkeleton)
{
mModel.Draw();
}
else
{
for (auto& bones : mModel.skeleton.bones)
{
DrawSkeleton(bones.get(), mBoneMatrices);
}
}
SettingsData settings;
settings.specularMapWeight = 0.0f;
settings.bumpMapWeight = 0.0f;
settings.normalMapWeight = 0.0f;
settings.aoMapWeight = 0.0f;
settings.useShadow = 1;
mSettingsBuffer.Update(settings);
SimpleDraw::AddLine(mViewFrustumVertices[0], mViewFrustumVertices[1], Colors::White);
SimpleDraw::AddLine(mViewFrustumVertices[1], mViewFrustumVertices[2], Colors::White);
SimpleDraw::AddLine(mViewFrustumVertices[2], mViewFrustumVertices[3], Colors::White);
SimpleDraw::AddLine(mViewFrustumVertices[3], mViewFrustumVertices[0], Colors::White);
SimpleDraw::AddLine(mViewFrustumVertices[0], mViewFrustumVertices[4], Colors::White);
SimpleDraw::AddLine(mViewFrustumVertices[1], mViewFrustumVertices[5], Colors::White);
SimpleDraw::AddLine(mViewFrustumVertices[2], mViewFrustumVertices[6], Colors::White);
SimpleDraw::AddLine(mViewFrustumVertices[3], mViewFrustumVertices[7], Colors::White);
SimpleDraw::AddLine(mViewFrustumVertices[4], mViewFrustumVertices[5], Colors::White);
SimpleDraw::AddLine(mViewFrustumVertices[5], mViewFrustumVertices[6], Colors::White);
SimpleDraw::AddLine(mViewFrustumVertices[6], mViewFrustumVertices[7], Colors::White);
SimpleDraw::AddLine(mViewFrustumVertices[7], mViewFrustumVertices[4], Colors::White);
SimpleDrawCamera(mDefaultCamera);
SimpleDraw::Render(*mActiveCamera);
}
| 31.778846 | 113 | 0.710287 | CyroPCJr |
d63c01f88d79ba06c15e4f77dd4f2423c0380760 | 2,376 | hpp | C++ | c/src/xkms/XKMSKeyBinding.hpp | douglascrp/xmlsec-mityc-sinadura | cf63024481914be33ae3a06ef1cc7629dd59aa0f | [
"Apache-2.0"
] | null | null | null | c/src/xkms/XKMSKeyBinding.hpp | douglascrp/xmlsec-mityc-sinadura | cf63024481914be33ae3a06ef1cc7629dd59aa0f | [
"Apache-2.0"
] | null | null | null | c/src/xkms/XKMSKeyBinding.hpp | douglascrp/xmlsec-mityc-sinadura | cf63024481914be33ae3a06ef1cc7629dd59aa0f | [
"Apache-2.0"
] | 2 | 2018-08-10T18:54:23.000Z | 2018-08-10T18:56:27.000Z | /*
* Copyright 2004-2005 The Apache Software Foundation.
*
* 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.
*/
/*
* XSEC
*
* XKMSKeyBinding := Interface for KeyBinding elements
*
* $Id: XKMSKeyBinding.hpp 351364 2005-06-04 11:30:26Z blautenb $
*
*/
#ifndef XKMSKEYBINDING_INCLUDE
#define XKMSKEYBINDING_INCLUDE
// XSEC Includes
#include <xsec/framework/XSECDefs.hpp>
#include <xsec/xkms/XKMSKeyBindingAbstractType.hpp>
/**
* @ingroup xkms
*/
/**
* @brief Interface definition for the KeyBinding elements
*
* The \<KeyBinding\> Element is used in a result message to a client
* to provide information on a particular key.
*
* The schema definition for KeyBinding is as follows :
*
* \verbatim
<!-- KeyBinding -->
<element name="KeyBinding" type="xkms:KeyBindingType"/>
<complexType name="KeyBindingType">
<complexContent>
<extension base="xkms:UnverifiedKeyBindingType">
<sequence>
<element ref="xkms:Status"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- /KeyBinding -->\endverbatim
*/
class XKMSStatus;
class XKMSKeyBinding : public XKMSKeyBindingAbstractType {
/** @name Constructors and Destructors */
//@{
protected:
XKMSKeyBinding() {};
public:
virtual ~XKMSKeyBinding() {};
//@}
/** @name Status handling */
//@{
/**
* \brief Obtain the status element for this KeyBinding
*
* The \<Status\> element is used to describe to the caller the
* validity of they key being described. This call is used to
* obtain the status element
*
* @return A pointer to the XKMSStatus element
*/
virtual XKMSStatus * getStatus(void) const = 0;
//@}
private:
// Unimplemented
XKMSKeyBinding(const XKMSKeyBinding &);
XKMSKeyBinding & operator = (const XKMSKeyBinding &);
};
#endif /* XKMSKEYBINDING_INCLUDE */
| 22.846154 | 75 | 0.690236 | douglascrp |
d647597753feac195611ad369ff8b913dba5c048 | 2,235 | cpp | C++ | FindCriticalProcess.cpp | chk141/Homework-of-C-Language | b2d0d2b67abd55d51febb21c3eb6ce4a682e2cff | [
"BSD-3-Clause"
] | 255 | 2018-07-06T08:59:32.000Z | 2022-03-31T07:54:53.000Z | FindCriticalProcess.cpp | chk141/Homework-of-C-Language | b2d0d2b67abd55d51febb21c3eb6ce4a682e2cff | [
"BSD-3-Clause"
] | 4 | 2019-08-25T06:21:44.000Z | 2021-12-20T03:07:15.000Z | FindCriticalProcess.cpp | chk141/Homework-of-C-Language | b2d0d2b67abd55d51febb21c3eb6ce4a682e2cff | [
"BSD-3-Clause"
] | 105 | 2018-08-31T16:51:51.000Z | 2022-03-10T22:10:34.000Z | #include <stdio.h>
#include <Windows.h>
#include <Psapi.h>
#pragma comment(lib, "Psapi.lib")
#pragma comment(lib,"Advapi32.lib")
#define ProcessBreakOnTermination 29
typedef int ProcessInformationClass;
typedef NTSTATUS(NTAPI * _NtQueryInformationProcess)(
HANDLE ProcessHandle,
ProcessInformationClass informationClass,
PVOID ProcessInformation,
ULONG ProcessInformationLength,
PULONG ReturnLength
);
BOOL EnableDebugPrivilege(BOOL fEnable)
{
BOOL fOk = FALSE;
HANDLE hToken;
if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken))
{
TOKEN_PRIVILEGES tp;
tp.PrivilegeCount = 1;
LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &tp.Privileges[0].Luid);
tp.Privileges[0].Attributes = fEnable ? SE_PRIVILEGE_ENABLED : 0;
AdjustTokenPrivileges(hToken, FALSE, &tp, sizeof(tp), NULL, NULL);
fOk = (GetLastError() == ERROR_SUCCESS);
CloseHandle(hToken);
}
return(fOk);
}
BOOL CheckProcess(DWORD pid)
{
printf("[%4d] ",pid);
HANDLE hProcess;
hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
if (hProcess == NULL)
{
printf("System\n");
return 0;
}
NTSTATUS status;
ULONG breakOnTermination;
_NtQueryInformationProcess NtQueryInformationProcess = (_NtQueryInformationProcess)GetProcAddress(GetModuleHandleA("NtDll.dll"), "NtQueryInformationProcess");
if (!NtQueryInformationProcess)
{
printf("[!]Could not find NtQueryInformationProcess entry point in NTDLL.DLL\n");
return 0;
}
status = NtQueryInformationProcess(hProcess, ProcessBreakOnTermination, &breakOnTermination, sizeof(ULONG), NULL);
if (status<0)
printf("[!]NtQueryInformationProcess error\n");
if (breakOnTermination == 1)
printf("Critical[!]\n");
else
printf("Normal\n");
}
BOOL EnumProcess()
{
DWORD aProcesses[1024], cbNeeded, cProcesses;
unsigned int i;
if (!EnumProcesses(aProcesses, sizeof(aProcesses), &cbNeeded))
{
printf("[!]EnumProcesses error\n");
return 0;
}
cProcesses = cbNeeded / sizeof(DWORD);
for (i = 0; i < cProcesses; i++)
if (aProcesses[i] != 0)
{
CheckProcess(aProcesses[i]);
}
return 1;
}
int main(int argc, char *argv[])
{
printf("[*]Try to find the critical process\n\n");
printf("[PID] [Type]\n");
printf("====== =======\n");
EnumProcess();
}
| 25.988372 | 159 | 0.725727 | chk141 |
d649c297cb189aab00fe797a913a428155e44923 | 1,485 | hh | C++ | src/include/meadow/dhalia.hh | cagelight/meadow | 9638ce5a1f18be3da3ace157b937e41cd65c6ec1 | [
"MIT"
] | null | null | null | src/include/meadow/dhalia.hh | cagelight/meadow | 9638ce5a1f18be3da3ace157b937e41cd65c6ec1 | [
"MIT"
] | null | null | null | src/include/meadow/dhalia.hh | cagelight/meadow | 9638ce5a1f18be3da3ace157b937e41cd65c6ec1 | [
"MIT"
] | null | null | null | #pragma once
/*
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--------------------------------------------------------------------------------------------------------------------------------
================================================================================================================================
████████▄ ▄█ █▄ ▄████████ ▄█ ▄█ ▄████████
███ ▀███ ███ ███ ███ ███ ███ ███ ███ ███
███ ███ ███ ███ ███ ███ ███ ███▌ ███ ███
███ ███ ▄███▄▄▄▄███▄▄ ███ ███ ███ ███▌ ███ ███
███ ███ ▀▀███▀▀▀▀███▀ ▀███████████ ███ ███▌ ▀███████████
███ ███ ███ ███ ███ ███ ███ ███ ███ ███
███ ▄███ ███ ███ ███ ███ ███▌ ▄ ███ ███ ███
████████▀ ███ █▀ ███ █▀ █████▄▄██ █▀ ███ █▀
<================================================================>
Generic asynchronous TCP reactor
================================================================================================================================
--------------------------------------------------------------------------------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
namespace meadow::dhalia {
}
| 49.5 | 128 | 0.040404 | cagelight |
d6504513e7835627bac13803c23aedb0f90dc74a | 355 | cpp | C++ | src/11000/11399.cpp14.cpp | upple/BOJ | e6dbf9fd17fa2b458c6a781d803123b14c18e6f1 | [
"MIT"
] | 8 | 2018-04-12T15:54:09.000Z | 2020-06-05T07:41:15.000Z | src/11000/11399.cpp14.cpp | upple/BOJ | e6dbf9fd17fa2b458c6a781d803123b14c18e6f1 | [
"MIT"
] | null | null | null | src/11000/11399.cpp14.cpp | upple/BOJ | e6dbf9fd17fa2b458c6a781d803123b14c18e6f1 | [
"MIT"
] | null | null | null | #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int no_person, ans=0;
cin>>no_person;
int *line=new int[no_person];
for(int i=0; i<no_person; i++)
cin>>line[i];
sort(line, line+no_person);
for(int i=0; i<no_person; i++)
ans+=line[i]*(no_person-i);
cout<<ans<<endl;
return 0;
} | 16.136364 | 35 | 0.585915 | upple |
d65780e66d8d03a36e25019eac73196f8c759a69 | 25,659 | cpp | C++ | src/RcppExports.cpp | hillarykoch/CLIMB | da6cc77ff8be48ceeb63247506467911d6130ac2 | [
"Artistic-2.0"
] | 3 | 2021-11-29T08:05:48.000Z | 2022-01-08T16:16:35.000Z | src/RcppExports.cpp | hillarykoch/CLIMB | da6cc77ff8be48ceeb63247506467911d6130ac2 | [
"Artistic-2.0"
] | null | null | null | src/RcppExports.cpp | hillarykoch/CLIMB | da6cc77ff8be48ceeb63247506467911d6130ac2 | [
"Artistic-2.0"
] | 2 | 2020-02-24T19:18:06.000Z | 2020-09-08T14:29:27.000Z | // Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <RcppArmadillo.h>
#include <Rcpp.h>
using namespace Rcpp;
// cgetPaths
arma::mat cgetPaths(std::string filepath);
RcppExport SEXP _CLIMB_cgetPaths(SEXP filepathSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< std::string >::type filepath(filepathSEXP);
rcpp_result_gen = Rcpp::wrap(cgetPaths(filepath));
return rcpp_result_gen;
END_RCPP
}
// crowMatch
arma::uvec crowMatch(arma::mat assoc, arma::mat nonconsec);
RcppExport SEXP _CLIMB_crowMatch(SEXP assocSEXP, SEXP nonconsecSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::mat >::type assoc(assocSEXP);
Rcpp::traits::input_parameter< arma::mat >::type nonconsec(nonconsecSEXP);
rcpp_result_gen = Rcpp::wrap(crowMatch(assoc, nonconsec));
return rcpp_result_gen;
END_RCPP
}
// get_list_names
std::vector<std::string> get_list_names(Rcpp::List L);
RcppExport SEXP _CLIMB_get_list_names(SEXP LSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::List >::type L(LSEXP);
rcpp_result_gen = Rcpp::wrap(get_list_names(L));
return rcpp_result_gen;
END_RCPP
}
// cpaste0
std::string cpaste0(std::vector<std::string> str1);
RcppExport SEXP _CLIMB_cpaste0(SEXP str1SEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< std::vector<std::string> >::type str1(str1SEXP);
rcpp_result_gen = Rcpp::wrap(cpaste0(str1));
return rcpp_result_gen;
END_RCPP
}
// cstr_split
arma::mat cstr_split(std::vector<std::string> strings, std::string split);
RcppExport SEXP _CLIMB_cstr_split(SEXP stringsSEXP, SEXP splitSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< std::vector<std::string> >::type strings(stringsSEXP);
Rcpp::traits::input_parameter< std::string >::type split(splitSEXP);
rcpp_result_gen = Rcpp::wrap(cstr_split(strings, split));
return rcpp_result_gen;
END_RCPP
}
// trans_func
int trans_func(double& x);
RcppExport SEXP _CLIMB_trans_func(SEXP xSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< double& >::type x(xSEXP);
rcpp_result_gen = Rcpp::wrap(trans_func(x));
return rcpp_result_gen;
END_RCPP
}
// caccept
arma::vec caccept(arma::mat x, arma::colvec y);
RcppExport SEXP _CLIMB_caccept(SEXP xSEXP, SEXP ySEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::mat >::type x(xSEXP);
Rcpp::traits::input_parameter< arma::colvec >::type y(ySEXP);
rcpp_result_gen = Rcpp::wrap(caccept(x, y));
return rcpp_result_gen;
END_RCPP
}
// cget_prior_count
arma::colvec cget_prior_count(arma::mat red_class, Rcpp::List mus, arma::mat labels, int d, int n, int dist_tol);
RcppExport SEXP _CLIMB_cget_prior_count(SEXP red_classSEXP, SEXP musSEXP, SEXP labelsSEXP, SEXP dSEXP, SEXP nSEXP, SEXP dist_tolSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::mat >::type red_class(red_classSEXP);
Rcpp::traits::input_parameter< Rcpp::List >::type mus(musSEXP);
Rcpp::traits::input_parameter< arma::mat >::type labels(labelsSEXP);
Rcpp::traits::input_parameter< int >::type d(dSEXP);
Rcpp::traits::input_parameter< int >::type n(nSEXP);
Rcpp::traits::input_parameter< int >::type dist_tol(dist_tolSEXP);
rcpp_result_gen = Rcpp::wrap(cget_prior_count(red_class, mus, labels, d, n, dist_tol));
return rcpp_result_gen;
END_RCPP
}
// creduce_by_hamming
arma::colvec creduce_by_hamming(arma::mat red_class, arma::colvec fullidx, int hamming_tol, int M);
RcppExport SEXP _CLIMB_creduce_by_hamming(SEXP red_classSEXP, SEXP fullidxSEXP, SEXP hamming_tolSEXP, SEXP MSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::mat >::type red_class(red_classSEXP);
Rcpp::traits::input_parameter< arma::colvec >::type fullidx(fullidxSEXP);
Rcpp::traits::input_parameter< int >::type hamming_tol(hamming_tolSEXP);
Rcpp::traits::input_parameter< int >::type M(MSEXP);
rcpp_result_gen = Rcpp::wrap(creduce_by_hamming(red_class, fullidx, hamming_tol, M));
return rcpp_result_gen;
END_RCPP
}
// cget_true_assoc_idx
arma::colvec cget_true_assoc_idx(arma::mat red_class, arma::mat true_assoc);
RcppExport SEXP _CLIMB_cget_true_assoc_idx(SEXP red_classSEXP, SEXP true_assocSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::mat >::type red_class(red_classSEXP);
Rcpp::traits::input_parameter< arma::mat >::type true_assoc(true_assocSEXP);
rcpp_result_gen = Rcpp::wrap(cget_true_assoc_idx(red_class, true_assoc));
return rcpp_result_gen;
END_RCPP
}
// cassociate
arma::mat cassociate(arma::mat& paths, std::string filepath, int len_filt_h);
RcppExport SEXP _CLIMB_cassociate(SEXP pathsSEXP, SEXP filepathSEXP, SEXP len_filt_hSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::mat& >::type paths(pathsSEXP);
Rcpp::traits::input_parameter< std::string >::type filepath(filepathSEXP);
Rcpp::traits::input_parameter< int >::type len_filt_h(len_filt_hSEXP);
rcpp_result_gen = Rcpp::wrap(cassociate(paths, filepath, len_filt_h));
return rcpp_result_gen;
END_RCPP
}
// abs3
double abs3(double val);
RcppExport SEXP _CLIMB_abs3(SEXP valSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< double >::type val(valSEXP);
rcpp_result_gen = Rcpp::wrap(abs3(val));
return rcpp_result_gen;
END_RCPP
}
// SCAD_1d
arma::rowvec SCAD_1d(arma::rowvec prop, double lambda, int k, double a);
RcppExport SEXP _CLIMB_SCAD_1d(SEXP propSEXP, SEXP lambdaSEXP, SEXP kSEXP, SEXP aSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::rowvec >::type prop(propSEXP);
Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
Rcpp::traits::input_parameter< int >::type k(kSEXP);
Rcpp::traits::input_parameter< double >::type a(aSEXP);
rcpp_result_gen = Rcpp::wrap(SCAD_1d(prop, lambda, k, a));
return rcpp_result_gen;
END_RCPP
}
// double_SCAD_1d
double double_SCAD_1d(double prop, double lambda, double a);
RcppExport SEXP _CLIMB_double_SCAD_1d(SEXP propSEXP, SEXP lambdaSEXP, SEXP aSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< double >::type prop(propSEXP);
Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
Rcpp::traits::input_parameter< double >::type a(aSEXP);
rcpp_result_gen = Rcpp::wrap(double_SCAD_1d(prop, lambda, a));
return rcpp_result_gen;
END_RCPP
}
// SCAD
arma::rowvec SCAD(arma::rowvec prop, double lambda, int k, double a);
RcppExport SEXP _CLIMB_SCAD(SEXP propSEXP, SEXP lambdaSEXP, SEXP kSEXP, SEXP aSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::rowvec >::type prop(propSEXP);
Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
Rcpp::traits::input_parameter< int >::type k(kSEXP);
Rcpp::traits::input_parameter< double >::type a(aSEXP);
rcpp_result_gen = Rcpp::wrap(SCAD(prop, lambda, k, a));
return rcpp_result_gen;
END_RCPP
}
// double_SCAD
double double_SCAD(double prop, double lambda, double a);
RcppExport SEXP _CLIMB_double_SCAD(SEXP propSEXP, SEXP lambdaSEXP, SEXP aSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< double >::type prop(propSEXP);
Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
Rcpp::traits::input_parameter< double >::type a(aSEXP);
rcpp_result_gen = Rcpp::wrap(double_SCAD(prop, lambda, a));
return rcpp_result_gen;
END_RCPP
}
// Mahalanobis
arma::vec Mahalanobis(arma::mat x, arma::rowvec mu, arma::mat sigma);
RcppExport SEXP _CLIMB_Mahalanobis(SEXP xSEXP, SEXP muSEXP, SEXP sigmaSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::mat >::type x(xSEXP);
Rcpp::traits::input_parameter< arma::rowvec >::type mu(muSEXP);
Rcpp::traits::input_parameter< arma::mat >::type sigma(sigmaSEXP);
rcpp_result_gen = Rcpp::wrap(Mahalanobis(x, mu, sigma));
return rcpp_result_gen;
END_RCPP
}
// cdmvnorm
arma::vec cdmvnorm(arma::mat x, arma::rowvec mu, arma::mat sigma);
RcppExport SEXP _CLIMB_cdmvnorm(SEXP xSEXP, SEXP muSEXP, SEXP sigmaSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::mat >::type x(xSEXP);
Rcpp::traits::input_parameter< arma::rowvec >::type mu(muSEXP);
Rcpp::traits::input_parameter< arma::mat >::type sigma(sigmaSEXP);
rcpp_result_gen = Rcpp::wrap(cdmvnorm(x, mu, sigma));
return rcpp_result_gen;
END_RCPP
}
// cget_constr_sigma
arma::mat cget_constr_sigma(arma::rowvec sigma, double rho, arma::rowvec combos, int d);
RcppExport SEXP _CLIMB_cget_constr_sigma(SEXP sigmaSEXP, SEXP rhoSEXP, SEXP combosSEXP, SEXP dSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::rowvec >::type sigma(sigmaSEXP);
Rcpp::traits::input_parameter< double >::type rho(rhoSEXP);
Rcpp::traits::input_parameter< arma::rowvec >::type combos(combosSEXP);
Rcpp::traits::input_parameter< int >::type d(dSEXP);
rcpp_result_gen = Rcpp::wrap(cget_constr_sigma(sigma, rho, combos, d));
return rcpp_result_gen;
END_RCPP
}
// func_to_optim
double func_to_optim(const arma::colvec& init_val, arma::mat& x, arma::mat& h_est, arma::mat& combos);
RcppExport SEXP _CLIMB_func_to_optim(SEXP init_valSEXP, SEXP xSEXP, SEXP h_estSEXP, SEXP combosSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::colvec& >::type init_val(init_valSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type x(xSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type h_est(h_estSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type combos(combosSEXP);
rcpp_result_gen = Rcpp::wrap(func_to_optim(init_val, x, h_est, combos));
return rcpp_result_gen;
END_RCPP
}
// optim_rcpp
arma::vec optim_rcpp(const arma::vec& init_val, arma::mat& x, arma::mat& h_est, arma::mat& combos);
RcppExport SEXP _CLIMB_optim_rcpp(SEXP init_valSEXP, SEXP xSEXP, SEXP h_estSEXP, SEXP combosSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::vec& >::type init_val(init_valSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type x(xSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type h_est(h_estSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type combos(combosSEXP);
rcpp_result_gen = Rcpp::wrap(optim_rcpp(init_val, x, h_est, combos));
return rcpp_result_gen;
END_RCPP
}
// func_to_optim_bound
double func_to_optim_bound(const arma::colvec& init_val, arma::mat& x, arma::mat& h_est, arma::mat& combos, double& bound);
RcppExport SEXP _CLIMB_func_to_optim_bound(SEXP init_valSEXP, SEXP xSEXP, SEXP h_estSEXP, SEXP combosSEXP, SEXP boundSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::colvec& >::type init_val(init_valSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type x(xSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type h_est(h_estSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type combos(combosSEXP);
Rcpp::traits::input_parameter< double& >::type bound(boundSEXP);
rcpp_result_gen = Rcpp::wrap(func_to_optim_bound(init_val, x, h_est, combos, bound));
return rcpp_result_gen;
END_RCPP
}
// optim_rcpp_bound
arma::vec optim_rcpp_bound(const arma::vec& init_val, arma::mat& x, arma::mat& h_est, arma::mat& combos, double& bound);
RcppExport SEXP _CLIMB_optim_rcpp_bound(SEXP init_valSEXP, SEXP xSEXP, SEXP h_estSEXP, SEXP combosSEXP, SEXP boundSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::vec& >::type init_val(init_valSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type x(xSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type h_est(h_estSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type combos(combosSEXP);
Rcpp::traits::input_parameter< double& >::type bound(boundSEXP);
rcpp_result_gen = Rcpp::wrap(optim_rcpp_bound(init_val, x, h_est, combos, bound));
return rcpp_result_gen;
END_RCPP
}
// cfconstr_pgmm
Rcpp::List cfconstr_pgmm(arma::mat& x, arma::rowvec prop, arma::mat mu, arma::mat sigma, double rho, arma::mat combos, int k, arma::rowvec df, int lambda, int citermax, double tol, unsigned int LASSO, double bound);
RcppExport SEXP _CLIMB_cfconstr_pgmm(SEXP xSEXP, SEXP propSEXP, SEXP muSEXP, SEXP sigmaSEXP, SEXP rhoSEXP, SEXP combosSEXP, SEXP kSEXP, SEXP dfSEXP, SEXP lambdaSEXP, SEXP citermaxSEXP, SEXP tolSEXP, SEXP LASSOSEXP, SEXP boundSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::mat& >::type x(xSEXP);
Rcpp::traits::input_parameter< arma::rowvec >::type prop(propSEXP);
Rcpp::traits::input_parameter< arma::mat >::type mu(muSEXP);
Rcpp::traits::input_parameter< arma::mat >::type sigma(sigmaSEXP);
Rcpp::traits::input_parameter< double >::type rho(rhoSEXP);
Rcpp::traits::input_parameter< arma::mat >::type combos(combosSEXP);
Rcpp::traits::input_parameter< int >::type k(kSEXP);
Rcpp::traits::input_parameter< arma::rowvec >::type df(dfSEXP);
Rcpp::traits::input_parameter< int >::type lambda(lambdaSEXP);
Rcpp::traits::input_parameter< int >::type citermax(citermaxSEXP);
Rcpp::traits::input_parameter< double >::type tol(tolSEXP);
Rcpp::traits::input_parameter< unsigned int >::type LASSO(LASSOSEXP);
Rcpp::traits::input_parameter< double >::type bound(boundSEXP);
rcpp_result_gen = Rcpp::wrap(cfconstr_pgmm(x, prop, mu, sigma, rho, combos, k, df, lambda, citermax, tol, LASSO, bound));
return rcpp_result_gen;
END_RCPP
}
// cduvnorm
arma::colvec cduvnorm(arma::colvec x, double mu, double sigma);
RcppExport SEXP _CLIMB_cduvnorm(SEXP xSEXP, SEXP muSEXP, SEXP sigmaSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::colvec >::type x(xSEXP);
Rcpp::traits::input_parameter< double >::type mu(muSEXP);
Rcpp::traits::input_parameter< double >::type sigma(sigmaSEXP);
rcpp_result_gen = Rcpp::wrap(cduvnorm(x, mu, sigma));
return rcpp_result_gen;
END_RCPP
}
// cmarg_ll_gmm
double cmarg_ll_gmm(arma::mat& z, arma::mat mu, arma::mat sigma, arma::rowvec prop, arma::mat combos, int k);
RcppExport SEXP _CLIMB_cmarg_ll_gmm(SEXP zSEXP, SEXP muSEXP, SEXP sigmaSEXP, SEXP propSEXP, SEXP combosSEXP, SEXP kSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::mat& >::type z(zSEXP);
Rcpp::traits::input_parameter< arma::mat >::type mu(muSEXP);
Rcpp::traits::input_parameter< arma::mat >::type sigma(sigmaSEXP);
Rcpp::traits::input_parameter< arma::rowvec >::type prop(propSEXP);
Rcpp::traits::input_parameter< arma::mat >::type combos(combosSEXP);
Rcpp::traits::input_parameter< int >::type k(kSEXP);
rcpp_result_gen = Rcpp::wrap(cmarg_ll_gmm(z, mu, sigma, prop, combos, k));
return rcpp_result_gen;
END_RCPP
}
// cll_gmm
double cll_gmm(arma::mat& z, arma::mat mu, arma::mat sigma, double rho, arma::rowvec prop, arma::mat combos, int k);
RcppExport SEXP _CLIMB_cll_gmm(SEXP zSEXP, SEXP muSEXP, SEXP sigmaSEXP, SEXP rhoSEXP, SEXP propSEXP, SEXP combosSEXP, SEXP kSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::mat& >::type z(zSEXP);
Rcpp::traits::input_parameter< arma::mat >::type mu(muSEXP);
Rcpp::traits::input_parameter< arma::mat >::type sigma(sigmaSEXP);
Rcpp::traits::input_parameter< double >::type rho(rhoSEXP);
Rcpp::traits::input_parameter< arma::rowvec >::type prop(propSEXP);
Rcpp::traits::input_parameter< arma::mat >::type combos(combosSEXP);
Rcpp::traits::input_parameter< int >::type k(kSEXP);
rcpp_result_gen = Rcpp::wrap(cll_gmm(z, mu, sigma, rho, prop, combos, k));
return rcpp_result_gen;
END_RCPP
}
// get_mu_optim
arma::colvec get_mu_optim(arma::mat mu_in, arma::mat combos);
RcppExport SEXP _CLIMB_get_mu_optim(SEXP mu_inSEXP, SEXP combosSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::mat >::type mu_in(mu_inSEXP);
Rcpp::traits::input_parameter< arma::mat >::type combos(combosSEXP);
rcpp_result_gen = Rcpp::wrap(get_mu_optim(mu_in, combos));
return rcpp_result_gen;
END_RCPP
}
// func_to_optim0
double func_to_optim0(const arma::colvec& init_val, const arma::mat& x, const arma::mat& h_est, const arma::mat& combos, const int& a, const arma::uvec& negidx);
RcppExport SEXP _CLIMB_func_to_optim0(SEXP init_valSEXP, SEXP xSEXP, SEXP h_estSEXP, SEXP combosSEXP, SEXP aSEXP, SEXP negidxSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::colvec& >::type init_val(init_valSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type x(xSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type h_est(h_estSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type combos(combosSEXP);
Rcpp::traits::input_parameter< const int& >::type a(aSEXP);
Rcpp::traits::input_parameter< const arma::uvec& >::type negidx(negidxSEXP);
rcpp_result_gen = Rcpp::wrap(func_to_optim0(init_val, x, h_est, combos, a, negidx));
return rcpp_result_gen;
END_RCPP
}
// optim0_rcpp
arma::vec optim0_rcpp(const arma::vec& init_val, arma::mat& x, arma::mat& h_est, arma::mat& combos, int& a, arma::uvec& negidx);
RcppExport SEXP _CLIMB_optim0_rcpp(SEXP init_valSEXP, SEXP xSEXP, SEXP h_estSEXP, SEXP combosSEXP, SEXP aSEXP, SEXP negidxSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::vec& >::type init_val(init_valSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type x(xSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type h_est(h_estSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type combos(combosSEXP);
Rcpp::traits::input_parameter< int& >::type a(aSEXP);
Rcpp::traits::input_parameter< arma::uvec& >::type negidx(negidxSEXP);
rcpp_result_gen = Rcpp::wrap(optim0_rcpp(init_val, x, h_est, combos, a, negidx));
return rcpp_result_gen;
END_RCPP
}
// func_to_optim0_bound
double func_to_optim0_bound(const arma::colvec& init_val, const arma::mat& x, const arma::mat& h_est, const arma::mat& combos, const int& a, const arma::uvec& negidx, double& bound);
RcppExport SEXP _CLIMB_func_to_optim0_bound(SEXP init_valSEXP, SEXP xSEXP, SEXP h_estSEXP, SEXP combosSEXP, SEXP aSEXP, SEXP negidxSEXP, SEXP boundSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::colvec& >::type init_val(init_valSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type x(xSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type h_est(h_estSEXP);
Rcpp::traits::input_parameter< const arma::mat& >::type combos(combosSEXP);
Rcpp::traits::input_parameter< const int& >::type a(aSEXP);
Rcpp::traits::input_parameter< const arma::uvec& >::type negidx(negidxSEXP);
Rcpp::traits::input_parameter< double& >::type bound(boundSEXP);
rcpp_result_gen = Rcpp::wrap(func_to_optim0_bound(init_val, x, h_est, combos, a, negidx, bound));
return rcpp_result_gen;
END_RCPP
}
// optim0_rcpp_bound
arma::vec optim0_rcpp_bound(const arma::vec& init_val, arma::mat& x, arma::mat& h_est, arma::mat& combos, int& a, arma::uvec& negidx, double& bound);
RcppExport SEXP _CLIMB_optim0_rcpp_bound(SEXP init_valSEXP, SEXP xSEXP, SEXP h_estSEXP, SEXP combosSEXP, SEXP aSEXP, SEXP negidxSEXP, SEXP boundSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::vec& >::type init_val(init_valSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type x(xSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type h_est(h_estSEXP);
Rcpp::traits::input_parameter< arma::mat& >::type combos(combosSEXP);
Rcpp::traits::input_parameter< int& >::type a(aSEXP);
Rcpp::traits::input_parameter< arma::uvec& >::type negidx(negidxSEXP);
Rcpp::traits::input_parameter< double& >::type bound(boundSEXP);
rcpp_result_gen = Rcpp::wrap(optim0_rcpp_bound(init_val, x, h_est, combos, a, negidx, bound));
return rcpp_result_gen;
END_RCPP
}
// cfconstr0_pGMM
Rcpp::List cfconstr0_pGMM(arma::mat& x, arma::rowvec prop, arma::mat mu, arma::mat sigma, double rho, arma::mat combos, int k, arma::rowvec df, int lambda, int citermax, double tol, unsigned int LASSO, double bound);
RcppExport SEXP _CLIMB_cfconstr0_pGMM(SEXP xSEXP, SEXP propSEXP, SEXP muSEXP, SEXP sigmaSEXP, SEXP rhoSEXP, SEXP combosSEXP, SEXP kSEXP, SEXP dfSEXP, SEXP lambdaSEXP, SEXP citermaxSEXP, SEXP tolSEXP, SEXP LASSOSEXP, SEXP boundSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< arma::mat& >::type x(xSEXP);
Rcpp::traits::input_parameter< arma::rowvec >::type prop(propSEXP);
Rcpp::traits::input_parameter< arma::mat >::type mu(muSEXP);
Rcpp::traits::input_parameter< arma::mat >::type sigma(sigmaSEXP);
Rcpp::traits::input_parameter< double >::type rho(rhoSEXP);
Rcpp::traits::input_parameter< arma::mat >::type combos(combosSEXP);
Rcpp::traits::input_parameter< int >::type k(kSEXP);
Rcpp::traits::input_parameter< arma::rowvec >::type df(dfSEXP);
Rcpp::traits::input_parameter< int >::type lambda(lambdaSEXP);
Rcpp::traits::input_parameter< int >::type citermax(citermaxSEXP);
Rcpp::traits::input_parameter< double >::type tol(tolSEXP);
Rcpp::traits::input_parameter< unsigned int >::type LASSO(LASSOSEXP);
Rcpp::traits::input_parameter< double >::type bound(boundSEXP);
rcpp_result_gen = Rcpp::wrap(cfconstr0_pGMM(x, prop, mu, sigma, rho, combos, k, df, lambda, citermax, tol, LASSO, bound));
return rcpp_result_gen;
END_RCPP
}
static const R_CallMethodDef CallEntries[] = {
{"_CLIMB_cgetPaths", (DL_FUNC) &_CLIMB_cgetPaths, 1},
{"_CLIMB_crowMatch", (DL_FUNC) &_CLIMB_crowMatch, 2},
{"_CLIMB_get_list_names", (DL_FUNC) &_CLIMB_get_list_names, 1},
{"_CLIMB_cpaste0", (DL_FUNC) &_CLIMB_cpaste0, 1},
{"_CLIMB_cstr_split", (DL_FUNC) &_CLIMB_cstr_split, 2},
{"_CLIMB_trans_func", (DL_FUNC) &_CLIMB_trans_func, 1},
{"_CLIMB_caccept", (DL_FUNC) &_CLIMB_caccept, 2},
{"_CLIMB_cget_prior_count", (DL_FUNC) &_CLIMB_cget_prior_count, 6},
{"_CLIMB_creduce_by_hamming", (DL_FUNC) &_CLIMB_creduce_by_hamming, 4},
{"_CLIMB_cget_true_assoc_idx", (DL_FUNC) &_CLIMB_cget_true_assoc_idx, 2},
{"_CLIMB_cassociate", (DL_FUNC) &_CLIMB_cassociate, 3},
{"_CLIMB_abs3", (DL_FUNC) &_CLIMB_abs3, 1},
{"_CLIMB_SCAD_1d", (DL_FUNC) &_CLIMB_SCAD_1d, 4},
{"_CLIMB_double_SCAD_1d", (DL_FUNC) &_CLIMB_double_SCAD_1d, 3},
{"_CLIMB_SCAD", (DL_FUNC) &_CLIMB_SCAD, 4},
{"_CLIMB_double_SCAD", (DL_FUNC) &_CLIMB_double_SCAD, 3},
{"_CLIMB_Mahalanobis", (DL_FUNC) &_CLIMB_Mahalanobis, 3},
{"_CLIMB_cdmvnorm", (DL_FUNC) &_CLIMB_cdmvnorm, 3},
{"_CLIMB_cget_constr_sigma", (DL_FUNC) &_CLIMB_cget_constr_sigma, 4},
{"_CLIMB_func_to_optim", (DL_FUNC) &_CLIMB_func_to_optim, 4},
{"_CLIMB_optim_rcpp", (DL_FUNC) &_CLIMB_optim_rcpp, 4},
{"_CLIMB_func_to_optim_bound", (DL_FUNC) &_CLIMB_func_to_optim_bound, 5},
{"_CLIMB_optim_rcpp_bound", (DL_FUNC) &_CLIMB_optim_rcpp_bound, 5},
{"_CLIMB_cfconstr_pgmm", (DL_FUNC) &_CLIMB_cfconstr_pgmm, 13},
{"_CLIMB_cduvnorm", (DL_FUNC) &_CLIMB_cduvnorm, 3},
{"_CLIMB_cmarg_ll_gmm", (DL_FUNC) &_CLIMB_cmarg_ll_gmm, 6},
{"_CLIMB_cll_gmm", (DL_FUNC) &_CLIMB_cll_gmm, 7},
{"_CLIMB_get_mu_optim", (DL_FUNC) &_CLIMB_get_mu_optim, 2},
{"_CLIMB_func_to_optim0", (DL_FUNC) &_CLIMB_func_to_optim0, 6},
{"_CLIMB_optim0_rcpp", (DL_FUNC) &_CLIMB_optim0_rcpp, 6},
{"_CLIMB_func_to_optim0_bound", (DL_FUNC) &_CLIMB_func_to_optim0_bound, 7},
{"_CLIMB_optim0_rcpp_bound", (DL_FUNC) &_CLIMB_optim0_rcpp_bound, 7},
{"_CLIMB_cfconstr0_pGMM", (DL_FUNC) &_CLIMB_cfconstr0_pGMM, 13},
{NULL, NULL, 0}
};
RcppExport void R_init_CLIMB(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}
| 49.439306 | 233 | 0.735921 | hillarykoch |
d66816f61036fa557cbba4ecf6912b1e6481e942 | 2,635 | hpp | C++ | src/log.hpp | j-martina/machinate | 145d8df7a6ccf085a625805dc745f5afd9f5c9c6 | [
"MIT"
] | null | null | null | src/log.hpp | j-martina/machinate | 145d8df7a6ccf085a625805dc745f5afd9f5c9c6 | [
"MIT"
] | null | null | null | src/log.hpp | j-martina/machinate | 145d8df7a6ccf085a625805dc745f5afd9f5c9c6 | [
"MIT"
] | null | null | null | /**
* @file log.hpp
* @brief Quill-based logger, shortcut macros, related symbols.
*/
#pragma once
#include "preproc.hpp"
#include <quill/Quill.h>
namespace mxn
{
extern quill::Logger* qlog;
/**
* @brief Prepare for logging via Quill.
*
* Calls `quill::enable_console_colours()`, `quill::start()`,
* and `quill::preallocate()` before finally constructing handlers and the
* logger object.
*/
void log_init(std::initializer_list<quill::Handler*>);
} // namespace mxn
/**
* @brief Print to cout and console; prepend with "INFO: "
* @remark Use to record information from the average user's runtime wherever
* that information may be useful to developer/modder debugging.
*/
#define MXN_LOG(msg) LOG_INFO(mxn::qlog, "{}", msg)
/**
* @brief Print to cout and console; prepend with "WARN: "
* @remark Use to inform that something undesirable has happened but the user's
* experience is unlikely to be affected.
*/
#define MXN_WARN(msg) LOG_WARNING(mxn::qlog, "{}", msg)
/**
* @brief Print to cout and console; prepend with "ERROR: "
* @remark Use to inform that an error has occurred but the application's state
* is recoverable.
*/
#define MXN_ERR(msg) LOG_ERROR(mxn::qlog, "{}", msg)
/**
* @brief Print to cout and console; prepend with "CRITICAL: "
* @remark Use to inform that the application is in a compromised state, and is
* either liable to crash or not capable of being useful anymore.
*/
#define MXN_CRIT(msg) LOG_CRITICAL(mxn::qlog, "{}", msg)
/** @brief Like `MXN_LOG`, but allows {fmt}-style variadic formatting. */
#define MXN_LOGF(msg, ...) LOG_INFO(mxn::qlog, msg, __VA_ARGS__)
/** @brief Like `MXN_WARN`, but allows {fmt}-style variadic formatting. */
#define MXN_WARNF(msg, ...) LOG_WARNING(mxn::qlog, msg, __VA_ARGS__)
/** @brief Like `MXN_ERR`, but allows {fmt}-style variadic formatting. */
#define MXN_ERRF(msg, ...) LOG_ERROR(mxn::qlog, msg, __VA_ARGS__)
/** @brief Like `MXN_CRIT`, but allows {fmt}-style variadic formatting. */
#define MXN_CRITF(msg, ...) LOG_CRITICAL(mxn::qlog, msg, __VA_ARGS__)
#ifndef NDEBUG
/**
* @brief Print to cout and console; prepend with "DEBUG: "
* @note Preprocessed away when `NDEBUG` is set (i.e., in the Release build).
* @remark Should only be used to generate a record of information which may be
* useful in future debugging efforts by developers or modders.
*/
#define MXN_DEBUG(msg) LOG_DEBUG(mxn::qlog, "{}", msg)
/** @brief Like `MXN_DEBUG`, but allows {fmt}-style variadic formatting. */
#define MXN_DEBUGF(msg, ...) LOG_DEBUG(mxn::qlog, msg, ##__VA_ARGS__)
#else
#define MXN_DEBUG(msg)
#define MXN_DEBUGF(msg, ...)
#endif | 34.220779 | 79 | 0.702467 | j-martina |
69953ecd401a7ac62deaa84853f5c226ffadeddd | 1,409 | cpp | C++ | test/dioptre/application.cpp | tobscher/rts | 7f30faf6a13d309e4db828be8be3c05d28c05364 | [
"MIT"
] | 2 | 2015-05-14T16:07:30.000Z | 2015-07-27T21:08:48.000Z | test/dioptre/application.cpp | tobscher/rts | 7f30faf6a13d309e4db828be8be3c05d28c05364 | [
"MIT"
] | null | null | null | test/dioptre/application.cpp | tobscher/rts | 7f30faf6a13d309e4db828be8be3c05d28c05364 | [
"MIT"
] | null | null | null | #include <gtest/gtest.h>
#include "dioptre/application.h"
#include "test_object.h"
#include "another_test_object.h"
TEST(Application, IsRunning) {
char empty[1] = {0};
char *argv[] = {empty, 0};
int argc = 1;
dioptre::Application application(argc, argv);
EXPECT_FALSE(application.isRunning());
}
TEST(Application, Initialization) {
char empty[1] = {0};
char *argv[] = {empty, 0};
int argc = 1;
TestObject* object1 = new TestObject();
TestObject* object2 = new TestObject();
EXPECT_FALSE(object1->getIsInitialized());
EXPECT_FALSE(object2->getIsInitialized());
dioptre::Application application(argc, argv);
application.addObject(object1);
application.addObject(object2);
application.initialize();
EXPECT_TRUE(application.getIsInitialized());
EXPECT_TRUE(object1->getIsInitialized());
EXPECT_TRUE(object2->getIsInitialized());
}
TEST(Application, getObjectByName) {
char empty[1] = {0};
char *argv[] = {empty, 0};
int argc = 1;
TestObject* object1 = new TestObject();
AnotherTestObject* object2 = new AnotherTestObject();
dioptre::Application application(argc, argv);
application.addObject(object1);
application.addObject(object2);
EXPECT_TRUE(application.getObjectByName("test_object") == object1);
EXPECT_TRUE(application.getObjectByName("another_test_object") == object2);
EXPECT_TRUE(application.getObjectByName("foo") == nullptr);
}
| 26.092593 | 77 | 0.723208 | tobscher |
69960d798e7064a10ca53671299c21fce929820f | 841 | cpp | C++ | src/format.cpp | dashboardvision/aspose-php | e2931773cbb1f47ae4086d632faa3012bd952b99 | [
"MIT"
] | null | null | null | src/format.cpp | dashboardvision/aspose-php | e2931773cbb1f47ae4086d632faa3012bd952b99 | [
"MIT"
] | null | null | null | src/format.cpp | dashboardvision/aspose-php | e2931773cbb1f47ae4086d632faa3012bd952b99 | [
"MIT"
] | 1 | 2021-06-23T08:02:03.000Z | 2021-06-23T08:02:03.000Z | #include "../include/aspose.h"
#include "../include/format.h"
#include "../include/fill-format.h"
#include <phpcpp.h>
#include "../include/line-format.h"
using namespace Aspose::Slides::Charts;
using namespace std;
namespace AsposePhp
{
/**
* @brief Returns fill style properties of a chart
*
* @return Php::Value
*/
Php::Value Format::get_Fill()
{
return Php::Object("AsposePhp\\Slides\\Charts\\FillFormat", wrapObject<IFillFormat, AsposePhp::FillFormat, &IFormat::get_Fill>());
}
/**
* @brief Returns line style properties of a chart
*
* @return Php::Value
*/
Php::Value Format::get_Line()
{
return Php::Object("AsposePhp\\Slides\\LineFormat", wrapObject<ILineFormat, AsposePhp::LineFormat, &IFormat::get_Line>());
}
} // namespace AsposePhp
| 24.735294 | 138 | 0.638526 | dashboardvision |
69966892be1942dae20ef69d1cbb666dcaf702e9 | 11,356 | cpp | C++ | examples/ecies-example.cpp | istepic/MoCOCrW | db7d291cec2d85566a6f34a19f6120974c021e73 | [
"Apache-2.0"
] | 19 | 2018-05-15T09:01:13.000Z | 2022-02-16T16:36:16.000Z | examples/ecies-example.cpp | istepic/MoCOCrW | db7d291cec2d85566a6f34a19f6120974c021e73 | [
"Apache-2.0"
] | 39 | 2018-05-28T10:22:04.000Z | 2021-07-26T11:27:36.000Z | examples/ecies-example.cpp | istepic/MoCOCrW | db7d291cec2d85566a6f34a19f6120974c021e73 | [
"Apache-2.0"
] | 26 | 2018-05-15T10:08:18.000Z | 2022-03-31T08:33:03.000Z | /*
* #%L
* %%
* Copyright (C) 2020 BMW Car IT GmbH
* %%
* 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.
* #L%
*/
#include <mococrw/ecies.h>
#include <mococrw/hash.h>
#include <mococrw/util.h>
#include <mococrw/openssl_wrap.h>
#include <iostream>
using namespace mococrw;
struct EciesEncryptResult {
std::vector<uint8_t> ephemeralKey;
std::vector<uint8_t> ciphertext;
std::vector<uint8_t> mac;
};
EciesEncryptResult encrypt_data(const std::vector<uint8_t> &message)
{
const std::string pubKeyPem = R"(
-----BEGIN PUBLIC KEY-----
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAELGj/fqXab+amxDOcbDWMArPBsUMOPons
9NePVyS9CbIkI8e3nPYi3ytHjJm03M22vM5R4XAxI9cMv5biylFJW0HBlyf/cZTO
xOVCTvRDUHLGTdGXNlz74YtWLF+CMX5A
-----END PUBLIC KEY-----
)";
/* The standard for ECIES (IEEE 1363a-2004) doesn't specify the details of the different cipher blocks.
* Thus it is up to the implementer to define its own protocol (hash-function, key derivation function,
* message authentication code, symmetric cipher, key serialization) used for encryption and decryption.
* In the current example the following is used:
* - SHA512 everywhere where a hash function is required
* - X963(SHA512) as key derivation function
* - HMAC(SHA512) as message authentication code
* - AES CBC with PKCS padding, zero IV and 256 bit key size
* - Additionally salts for KDF and MAC can be set (optional value, default: empty)
*
* The defaults if the builder is invoked without any optional parameters are:
* - X963(SHA512) as key derivation function
* - HMAC(SHA512)
* - AES CBC with PKCS padding, zero IV and 256 bit key size
* - empty salts for KDF and MAC
*/
/* Read the public key */
auto pubKey = AsymmetricPublicKey::readPublicKeyFromPEM(pubKeyPem);
/* Get the encryption context */
std::unique_ptr<ECIESEncryptionCtx> encCtx = ECIESCtxBuilder{}
/* This is optional. The default is X963 with SHA512 */
.setKDF(std::make_shared<X963KDF>(DigestTypes::SHA512))
/* This is optional. The default is HMAC with SHA512
* Dependency injection function, as the key for MAC is generated based on a random ECC key in the
* ECIES class */
.setMacFactoryFunction(
[](const std::vector<uint8_t> &key) -> std::unique_ptr<MessageAuthenticationCode> {
return std::make_unique<mococrw::HMAC>(DigestTypes::SHA512, key);
}
)
/* This is optional. The default key length is 512 / 8 bytes (length of hash sum) */
.setMacKeySize(Hash::getDigestSize(DigestTypes::SHA512))
/* The next two lines are optional. Default: AES CBC with PKCS padding, zero IV and 256 bit key size */
.setSymmetricCipherFactoryFunction(
[](const std::vector<uint8_t> &key) -> std::unique_ptr<SymmetricCipherI> {
return AESCipherBuilder(SymmetricCipherMode::CBC, SymmetricCipherKeySize::S_256, key)
.setIV(std::vector<uint8_t>(AESCipherBuilder::getDefaultIVLength(SymmetricCipherMode::CBC)))
.setPadding(SymmetricCipherPadding::PKCS)
.buildEncryptor();
}
)
.setSymmetricCipherKeySize(getSymmetricCipherKeySize(SymmetricCipherKeySize::S_256))
.buildEncryptionCtx(pubKey);
std::vector<uint8_t> encryptedData;
try {
encCtx->update(message);
encryptedData = encCtx->finish();
} catch (const openssl::OpenSSLException &e) {
/* low level OpenSSL failure */
std::cerr << "Error encrypting data." << std::endl;
std::cerr << e.what() << std::endl;
exit(EXIT_FAILURE);
} catch (const MoCOCrWException &e) {
/* Possible reasons:
* - symmetric cipher is not initalized
* - update is invoked after finish
* - symmetric cipher's finish() is already invoked
* - symmetric cipher's update() is invoked after its finish()
* - Message is too big
* - finish is invoked twice
* - MAC's finish() is already invoked
* - MAC's update() is invoked after MAC's finish()
*/
std::cerr << "Error encrypting data." << std::endl;
std::cerr << e.what() << std::endl;
exit(EXIT_FAILURE);
}
std::vector<uint8_t> ephemeralKey;
try {
ephemeralKey = encCtx->getEphemeralKey().toECPoint(openssl::EllipticCurvePointConversionForm::uncompressed);
} catch (const openssl::OpenSSLException &e) {
/* low level OpenSSL failure */
std::cerr << "Failure transforming EC key." << std::endl;
std::cerr << e.what() << std::endl;
exit(EXIT_FAILURE);
} catch (const MoCOCrWException &e) {
/* Possible reasons:
* - Key object doesn't contain an EC key
*/
std::cerr << "Failure transforming EC key." << std::endl;
std::cerr << e.what() << std::endl;
exit(EXIT_FAILURE);
}
return EciesEncryptResult{
/* The serialization of the ephemeral key's public component is up to the implementer. The standard is not
* defining a format. Available formats in MoCOCrW are:
* - uncompressed (used here)
* - compressed
* - hybrid
*/
ephemeralKey,
encryptedData,
encCtx->getMAC(),
};
}
void decrypt_data(const EciesEncryptResult &eciesData)
{
/* We need
* - mac value
* - ephemeral key
* - ciphertext
* - private key
*/
const std::string privKeyPem = R"(
-----BEGIN EC PARAMETERS-----
BgUrgQQAIg==
-----END EC PARAMETERS-----
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDDP/GdwmJa6KFj/R7QJRi7wNNG+viSMos2B+4zIi7fO5BUpIMZObh6/
ujDnPKFx4SugBwYFK4EEACKhZANiAAQsaP9+pdpv5qbEM5xsNYwCs8GxQw4+iez0
149XJL0JsiQjx7ec9iLfK0eMmbTczba8zlHhcDEj1wy/luLKUUlbQcGXJ/9xlM7E
5UJO9ENQcsZN0Zc2XPvhi1YsX4IxfkA=
-----END EC PRIVATE KEY-----
)";
/* The standard for ECIES (IEEE 1363a-2004) doesn't specify the details of the different cipher blocks.
* Thus it is up to the user to define its own set of cipher blocks (hash-function, key derivation function,
* message authentication code, symmetric cipher) used for encryption and decryption.
* In the current example the following is used:
* - SHA512 everywhere where a hash function is required
* - X963(SHA512) as key derivation function
* - HMAC(SHA512) as message authentication code
* - AES CBC with PKCS padding, zero IV and 256 bit key size
* - Additionally salts for KDF and MAC can be set (optional value, default: empty)
*
* The defaults if the builder is invoked without any optional parameters are:
* - X963(SHA512) as key derivation function
* - HMAC(SHA512)
* - AES CBC with PKCS padding, zero IV and 256 bit key size
* - empty salts for KDF and MAC
*/
/* Read the private key and thet the ECC specification of the private key.
* The elliptic curve of the ephemeral key is the same as the private key's one as it is derived from the
* corresponding public key. */
auto privKey = AsymmetricPrivateKey::readPrivateKeyFromPEM(privKeyPem, "");
std::shared_ptr<AsymmetricKey::Spec> spec = privKey.getKeySpec();
auto eccSpec = std::dynamic_pointer_cast<ECCSpec>(spec);
if (!eccSpec) {
std::cerr << "Given key is no ECC key." << std::endl;
exit(EXIT_FAILURE);
}
/* The underlying openssl function recognizes the used serialization format of the ephemeral key reading the first
* byte of the serialized data, which defines the format.
* The variable eccSpec contains the used elliptic curve of the ephemeral key */
auto _ephemeralKey = AsymmetricPublicKey::fromECPoint(eccSpec, eciesData.ephemeralKey);
/* Get the decryption context */
auto decCtx = ECIESCtxBuilder{}
// This is optional. The default is X963 with SHA512
.setKDF(std::make_shared<X963KDF>(DigestTypes::SHA512))
// This is optional. The default is HMAC with SHA512
.setMacFactoryFunction(
[](const std::vector<uint8_t> &key) -> std::unique_ptr<MessageAuthenticationCode> {
return std::make_unique<mococrw::HMAC>(DigestTypes::SHA512, key);
}
)
// This is optional. The default key length is 512 / 8 bytes (length of hash sum)
.setMacKeySize(Hash::getDigestSize(DigestTypes::SHA512))
// This is optional. Default: AES CBC with PKCS padding, zero IV and 256 bit key size
.setSymmetricCipherFactoryFunction(
[](const std::vector<uint8_t> &key) -> std::unique_ptr<SymmetricCipherI> {
return AESCipherBuilder(SymmetricCipherMode::CBC, SymmetricCipherKeySize::S_256, key)
.setIV(std::vector<uint8_t>(AESCipherBuilder::getDefaultIVLength(SymmetricCipherMode::CBC)))
.setPadding(SymmetricCipherPadding::PKCS)
.buildDecryptor();
}
)
.setSymmetricCipherKeySize(getSymmetricCipherKeySize(SymmetricCipherKeySize::S_256))
.buildDecryptionCtx(privKey, _ephemeralKey);
/* Decrypt the data and verify the MAC */
std::vector<uint8_t> decryptedData;
try {
/* Decrypt the ciphertext */
decCtx->update(eciesData.ciphertext);
/* Set the received mac value */
decCtx->setMAC(eciesData.mac);
/* Get the plaintext and verify the MAC */
decryptedData = decCtx->finish();
} catch (const openssl::OpenSSLException &e) {
/* low level OpenSSL failure */
std::cerr << "Failure decrypting data." << std::endl;
std::cerr << e.what() << std::endl;
exit(EXIT_FAILURE);
} catch (const MoCOCrWException &e) {
/* Possible reasons:
* - symmetric cipher is not initalized
* - update is invoked after finish
* - symmetric cipher's finish() is already invoked
* - symmetric cipher's update() is invoked after its finish()
* - Message is too big
* - finish is invoked twice
* - MAC's finish() is already invoked
* - MAC's update() is invoked after MAC's finish()
* - MAC is not set before invoking finish()
* - MAC verification failed
*/
std::cerr << "Error decrypting integrated encryption scheme." << std::endl;
std::cerr << e.what();
exit(EXIT_FAILURE);
}
}
int main(void)
{
std::vector<uint8_t> message = utility::fromHex("deadbeef");
auto eciesData = encrypt_data(message);
decrypt_data(eciesData);
return 0;
}
| 42.85283 | 120 | 0.642568 | istepic |
699943947100979ae07aefc1d5143c60e6b59993 | 13,446 | cpp | C++ | Desktop/piMASS/piMASScmplrSLN/backup/gpcpic.cpp | AliveMOon/piMASSpub | 5b87752b9d224f4033e33635f527b842b454f012 | [
"MIT"
] | 2 | 2019-06-17T10:40:53.000Z | 2019-06-18T12:50:29.000Z | Desktop/piMASS/piMASScmplrSLN/backup/gpcpic.cpp | AliveMOon/piMASSpub | 5b87752b9d224f4033e33635f527b842b454f012 | [
"MIT"
] | 3 | 2019-06-17T10:20:46.000Z | 2019-06-18T18:10:41.000Z | Desktop/piMASS/piMASScmplrSLNpi4/backup/gpcpic.cpp | AliveMOon/piMASSpub | 5b87752b9d224f4033e33635f527b842b454f012 | [
"MIT"
] | null | null | null | #include "gpcpic.h"
#include "gpcSRC.h"
bool gpfSRFjpgSAVE( U1* pFILE, SDL_Surface* pSRF, I4 q )
{
if( pSRF ? (pFILE ? !*pFILE : false ) : true )
return false;
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
FILE* pOUT;
JSAMPROW aROW[1];
cinfo.err = jpeg_std_error(&jerr);
jpeg_create_compress(&cinfo);
if( !(pOUT = fopen( (char*)pFILE, "wb")) )
return false;
jpeg_stdio_dest(&cinfo, pOUT);
cinfo.image_width = pSRF->w;
cinfo.image_height = pSRF->h;
if( pSRF->format->BytesPerPixel != 3 )
return false;
cinfo.input_components = pSRF->format->BytesPerPixel; // 3;
cinfo.in_color_space = JCS_RGB;
jpeg_set_defaults(&cinfo);
jpeg_set_quality( &cinfo, q, true );
jpeg_start_compress(&cinfo,true);
int rowSTRD = pSRF->pitch;
while(cinfo.next_scanline < cinfo.image_height ) {
aROW[0] = ((U1*)pSRF->pixels)+(cinfo.next_scanline*rowSTRD);
jpeg_write_scanlines(&cinfo, aROW, 1 );
}
jpeg_finish_compress(&cinfo);
fclose(pOUT);
jpeg_destroy_compress(&cinfo);
return true;
}
std::vector<JOCTET> jpgBUFF;
#define gpdJPGsiz 0x4000
void my_init_destination( j_compress_ptr pINF )
{
jpgBUFF.resize(gpdJPGsiz);
pINF->dest->next_output_byte = &jpgBUFF[0];
pINF->dest->free_in_buffer = jpgBUFF.size();
}
boolean my_empty_output_buffer(j_compress_ptr pINF )
{
size_t oSIZ = jpgBUFF.size();
jpgBUFF.resize(oSIZ+gpdJPGsiz);
pINF->dest->next_output_byte = &jpgBUFF[oSIZ];
pINF->dest->free_in_buffer = jpgBUFF.size()-oSIZ;
return true;
}
void my_term_destination(j_compress_ptr pINF )
{
jpgBUFF.resize(jpgBUFF.size()-pINF->dest->free_in_buffer);
}
gpcLZY* gpfSRF2JPG( gpcLZY* pBUFF, SDL_Surface* pSRF, I4 q )
{
if( !pSRF )
return pBUFF;
U8 s = -1, nMEM = 0;
JSAMPROW aROW[1];
struct jpeg_compress_struct INF;
struct jpeg_error_mgr jerr;
INF.err = jpeg_std_error(&jerr);
struct jpeg_destination_mgr dst;
//INF->dest = jpeg_stdio_dest( &dst );
jpeg_create_compress(&INF);
//jpeg_mem_dest(&INF, )
if( !INF.dest )
INF.dest = &dst;
INF.dest->init_destination = &my_init_destination;
INF.dest->empty_output_buffer = &my_empty_output_buffer;
INF.dest->term_destination = &my_term_destination;
INF.image_width = pSRF->w;
INF.image_height = pSRF->h;
if( pSRF->format->BytesPerPixel != 3 )
return pBUFF;
INF.input_components = pSRF->format->BytesPerPixel; // 3;
INF.in_color_space = JCS_RGB;
jpeg_set_defaults(&INF);
jpeg_set_quality( &INF, q, true );
jpeg_start_compress(&INF, true);
int rowSTRD = pSRF->pitch;
while(INF.next_scanline < INF.image_height ) {
aROW[0] = ((U1*)pSRF->pixels)+(INF.next_scanline*rowSTRD);
jpeg_write_scanlines(&INF, aROW, 1 );
}
jpeg_finish_compress(&INF);
pBUFF = pBUFF->lzyADD( &jpgBUFF[0], jpgBUFF.size(), s = -1 );
/*U1 *pMEM;
jpeg_mem_dest( &INF, pMEM, &nMEM );
pBUFF = pBUFF->lzyADD( pMEM, nMEM, s = -1 );
gpmDELary(pMEM);*/
return pBUFF;
}
#ifdef gpdSYSubi
//#ifndef gpdSYSpi
U4 gpcCAMubi::getImageTypeSize( RASPICAM_FORMAT f )
{
if( f != RASPICAM_FORMAT_RGB )
return 0;
return queryBuffer.length; //bufferinfo.bytesused;
}
bool gpcCAMubi::openCAM()
{
if( bOPEN )
return bOPEN;
/// 1. Open the device ---------------
if(bSTDcout){std::cout << "1. Open the device ---------------" << std::endl;}
fd = open("/dev/video0",O_RDWR);
if(fd < 0){
perror("Failed to open device, OPEN");
return bOPEN;
}
/// 2. Ask the device if it can capture frames
if(bSTDcout){std::cout << "2. Ask the device if it can capture frames" << std::endl;}
if(ioctl(fd, VIDIOC_QUERYCAP, &capability) < 0){
// something went wrong... exit
perror("Failed to get device capabilities, VIDIOC_QUERYCAP");
return bOPEN;
} else {
if(bSTDcout){std::cout << "driver:" << (char*)capability.driver << std::endl;}
}
bool bGD = false;
/// 3. ------------------------------------------------------
fmtdesc.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
int r = ioctl(fd,VIDIOC_ENUM_FMT,&fmtdesc);
while( r > -1 ) {
if(bSTDcout){std::cout << fmtdesc.description << std::endl;}
frmsize.type = fmtdesc.type;
frmsize.pixel_format = fmtdesc.pixelformat;
frmsize.index = 0;
/// 4. ------------------------------------------------------
r = ioctl(fd, VIDIOC_ENUM_FRAMESIZES, &frmsize);
while( r > -1 ) {
if(frmsize.type == V4L2_FRMSIZE_TYPE_DISCRETE) {
if(bSTDcout){std::cout << "discrete w:" << frmsize.discrete.width << " h:" << frmsize.discrete.height << std::endl;}
} else {
if(bSTDcout){std::cout << "-------- w:" << frmsize.stepwise.min_width << " h:" << frmsize.stepwise.min_height << std::endl
<< "-------- w:" << frmsize.stepwise.max_width << " h:" << frmsize.stepwise.max_height << std::endl;}
if( frmsize.pixel_format == V4L2_PIX_FMT_RGB24 ) {
wh0.x = gpmMAX( frmsize.stepwise.min_width, gpmMIN(wh0.x,frmsize.stepwise.max_width) );
wh0.y = gpmMAX( frmsize.stepwise.min_height, gpmMIN(wh0.y,frmsize.stepwise.max_height) );
bGD = true;
break;
}
}
if( bGD )
break;
frmsize.index++;
r = ioctl(fd, VIDIOC_ENUM_FRAMESIZES, &frmsize);
}
if( bGD )
break;
fmtdesc.index++;
r = ioctl(fd,VIDIOC_ENUM_FMT,&fmtdesc);
}
if( !bGD )
return bOPEN;
wip = 0;
bGD = ( setCaptureSize( wh0.x, wh0.y, frmsize.pixel_format ) > -1 );
if( !bGD )
return bOPEN;
//grab();
return bOPEN = true;
}
int gpcCAMubi::setCaptureSize( U4 w, U4 h, U4 picFRM ) {
if( wh == wh0 )
return 0;
/// 5. Set Image format
if(bSTDcout){std::cout << "5. Set Image format ----------" << std::endl;}
gpmZ(format);
format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
format.fmt.pix.width = w;
format.fmt.pix.height = h;
format.fmt.pix.pixelformat = picFRM;
format.fmt.pix.field = V4L2_FIELD_NONE;
int res = ioctl(fd, VIDIOC_S_FMT, &format);
if( res < 0){
closeCAM();
return res;
}
if( pBUFF ) {
munmap(pBUFF, queryBuffer.length);
}
/// 6. VIDIOC_REQBUFS ----------
if(bSTDcout){std::cout << "6. VIDIOC_REQBUFS ----------" << std::endl;}
requestBuffer.count = 1; // one request buffer
requestBuffer.type = format.type ; // request a buffer wich we an use for capturing frames
requestBuffer.memory = V4L2_MEMORY_MMAP;
res = ioctl(fd, VIDIOC_REQBUFS, &requestBuffer);
if( res < 0){
return res;
}
if(bSTDcout){std::cout << "7. VIDIOC_QUERYBUF ----------------" << std::endl;}
/// 7. VIDIOC_QUERYBUF ----------
queryBuffer.type = format.type ;
queryBuffer.memory = V4L2_MEMORY_MMAP;
queryBuffer.index = 0;
res = ioctl(fd, VIDIOC_QUERYBUF, &queryBuffer);
if( res < 0){
return res;
}
pBUFF = (char*)mmap( NULL, queryBuffer.length,
PROT_READ | PROT_WRITE,
MAP_SHARED,
fd, queryBuffer.m.offset );
/// 8. VIDIOC_STREAMON ----------------
if(bSTDcout){std::cout << " 8. VIDIOC_STREAMON ----------------" << std::endl;}
type = format.type;
res = ioctl(fd, VIDIOC_STREAMON, &type);
if( res < 0 ){
return res;
}
if( wip != 9 ) {
/// 9. VIDIOC_QBUF ----------------
bufferinfo.type = type;
bufferinfo.memory = V4L2_MEMORY_MMAP;
bufferinfo.index = 0;
//if(bSTDcout){std::cout << " 9. VIDIOC_QBUF ----------------" << std::endl;}
res = ioctl(fd, VIDIOC_QBUF, &bufferinfo);
if( res < 0){
return res;
}
wip = 9;
}
wh = wh0;
return res;
}
U4 gpcCAMubi::grab()
{
int res;
if( wip == 9 ) {
/// 10. VIDIOC_DQBUF --------------------
if(bSTDcout){std::cout << "10.1 VIDIOC_DQBUF --------------------" << std::endl;}
res = ioctl(fd, VIDIOC_DQBUF, &bufferinfo);
if( res < 0){
return nGRB++;
}
if(bSTDcout){std::cout << "10.2 VIDIOC_DQBUF --------------------" << std::endl;}
wip = 10;
}
//if(bSTDcout){std::cout << "Buffer has: " << (double)bufferinfo.bytesused / 1024
// << " KBytes of data" << std::endl;}
return nGRB++;
}
void* gpcCAMubi::retrieve( void *pPIX, RASPICAM_FORMAT f )
{
if(bSTDcout){std::cout << "CPY" << std::endl;}
int res ;
gpmMcpy(pPIX, pBUFF, queryBuffer.length );
if( wip != 9 ) {
wip = 9;
/// 9.1 VIDIOC_QBUF ----------------
bufferinfo.type = type;
bufferinfo.memory = V4L2_MEMORY_MMAP;
bufferinfo.index = 0;
if(bSTDcout){std::cout << " 9.1 VIDIOC_QBUF ----------------" << std::endl;}
res = ioctl(fd, VIDIOC_QBUF, &bufferinfo);
if(res < 0)
return NULL;
if(bSTDcout){std::cout << " 9.2 VIDIOC_QBUF ----------------" << std::endl;}
}
return pPIX;
}
#endif // gpdSYSpi
class gpcTHRD_CAM {
public:
gpcPICAM* pC;
SDL_Surface* pSRF;
gpcTHRD_CAM(){ gpmCLR; };
};
void call_cam( gpcTHRD_CAM* pTC ) {
gpcTHRD_CAM cpy = *pTC;
//SDL_Surface srf =
gpdCAMu& cam = cpy.pC->cam;
U1 *pPIX, *pDAT;
U4 iCNT = 0, p = cpy.pSRF->pitch, p2 = p*2, h = cpy.pSRF->h, e = p*h;
while( cpy.pC )
{
pPIX = cpy.pSRF ? (U1*)cpy.pSRF->pixels : NULL;
usleep(1000/30);
cam.grab();
if( !pPIX )
continue;
#ifdef gpdSYSpi
pDAT = cam.getImageBufferData();
#else
pDAT = NULL;
#endif
if( pDAT )
{
memcpy( pPIX, pDAT, p*h );
/*for( U4 i = p*(iCNT&1); i < e; i += p2 )
memcpy( pPIX+i, pDAT+i, p );*/
iCNT++;
continue;
}
//memcpy ( cpy.pSRF->pixels, cpy.pC->cam.callback_data._buffData.data, getImageTypeSize( RASPICAM_FORMAT_IGNORE ) );
cam.retrieve(
pPIX,
#ifdef gpdSYSpi
raspicam::RASPICAM_FORMAT_IGNORE
#else
RASPICAM_FORMAT_IGNORE
#endif
//RASPICAM_FORMAT_YUV420 );
//RASPICAM_FORMAT_RGB );
);
}
}
U1* gpcPIC::getPIX( gpcPICAM* pC, U4 qc )
{
if( !this )
return NULL;
if( !pC )
return pSRF ? (U1*)pSRF->pixels : NULL;
if( pC->cam.openCAM() )
{
usleep(1*1000);
}
if( aiQC[0] >= qc )
return NULL; //pSRF ? (U1*)pSRF->pixels : NULL;
if( bTHRD )
{
pREF = NULL;
aiQC[0] = qc+ gpdTCP_tOUT;
return pSRF ? (U1*)pSRF->pixels : NULL;
}
nPIX = pC->cam.getImageTypeSize(
#ifdef gpdSYSpi
raspicam::RASPICAM_FORMAT_RGB
#else
RASPICAM_FORMAT_RGB
#endif
);
xyOUT.a4x2[1] = I4x2( pC->cam.getWidth(), pC->cam.getHeight() );
if( nPIXall != nPIX ) {
nPIXall = nPIX;
SDL_FreeSurface(pSRF);
U4 rmask, gmask, bmask, amask;
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
int shift = (req_format == STBI_rgb) ? 8 : 0;
rmask = 0xff000000 >> shift;
gmask = 0x00ff0000 >> shift;
bmask = 0x0000ff00 >> shift;
amask = 0x000000ff >> shift;
#else // little endian, like x86
rmask = 0x000000ff;
gmask = 0x0000ff00;
bmask = 0x00ff0000;
amask = 0; //(req_format == STBI_rgb) ? 0 : 0xff000000;
#endif
pSRF = SDL_CreateRGBSurface( 0, xyOUT.z, xyOUT.w, 24, rmask, gmask, bmask, amask );
}
if( pSRF ) {
#ifndef gpdSYSpi
pC->cam.grab();
pC->cam.retrieve(
(U1*)pSRF->pixels,
#ifdef gpdSYSpi
raspicam::RASPICAM_FORMAT_IGNORE
#else
RASPICAM_FORMAT_IGNORE
#endif
//RASPICAM_FORMAT_YUV420 );
//RASPICAM_FORMAT_RGB );
);
//pC->cam.grab();
pREF = NULL;
aiQC[0] = qc+ gpdTCP_tOUT;
return pSRF ? (U1*)pSRF->pixels : NULL;
#else
gpcTHRD_CAM trd;
trd.pC = pC;
trd.pSRF = pSRF;
if( !bTHRD )
{
T = std::thread( call_cam, &trd );
usleep(3*1000);
bTHRD = true;
}
if( !bTHRD )
{
pC->cam.grab();
pC->cam.retrieve(
(U1*)pSRF->pixels,
#ifdef gpdSYSpi
raspicam::RASPICAM_FORMAT_IGNORE
#else
RASPICAM_FORMAT_IGNORE
#endif
//RASPICAM_FORMAT_YUV420 );
//RASPICAM_FORMAT_RGB );
);
}
#endif
}
aiQC[0] = qc;
return pSRF ? (U1*)pSRF->pixels : NULL;
}
U4 gpcPICall::alfFND( U1* pS ) {
I8x2 TnID(0,14);
TnID = pS;
TnID.num = gpfSTR2U8( pS+TnID.num, &pS );
for( U4 p = 0; p < nPICld; p++ )
{
if( !ppPIC[p] )
{
if( iPICfr > p )
iPICfr = p;
continue;
}
if( ppPIC[p]->TnID != TnID )
continue;
return p;
}
return nPICld;
}
gpcPIC* gpcPICall::aluFND( gpcALU& alu ) {
U4 i = alu.bSTR() ?
alfFND( (U1*)alu.pDAT ) // ez a kép neve
: alu.u8();
if( pPIC = PIC(i) )
return pPIC;
I8x2 alfN(0,14);
U1* pS = (U1*)alu.pDAT;
alfN = pS;
alfN.num = gpfSTR2U8( pS+alfN.num, &pS );
return PIC( alfN );
}
| 27.163636 | 141 | 0.548118 | AliveMOon |
69a1943f68b8ee73fa1cce852fe4b6edf8d5fb36 | 1,231 | cc | C++ | src/input/config_ctl.cc | frzifus/sfml-rpic-desktop | c112ed66a711f62ecf1198a221e7a914e413a92b | [
"MIT"
] | null | null | null | src/input/config_ctl.cc | frzifus/sfml-rpic-desktop | c112ed66a711f62ecf1198a221e7a914e413a92b | [
"MIT"
] | null | null | null | src/input/config_ctl.cc | frzifus/sfml-rpic-desktop | c112ed66a711f62ecf1198a221e7a914e413a92b | [
"MIT"
] | null | null | null | /**
* Copyright(c) [2017] <Frzifus> All Rights Reserved.
* Distributed under MIT license.
* See file LICENSE for detail at LICENSE file.
*/
#include "./input/config_ctl.h"
#include "./screen/config.h"
#include "./screen/screen_digits.h"
Input::ConfigCtl::ConfigCtl(::Screen::Config *config_instance) {
config_instance_ = config_instance;
}
void Input::ConfigCtl::Check(sf::RenderWindow &window) {
if (window.pollEvent(event_)) {
// Close window: exit
if (event_.type == sf::Event::Closed) {
config_instance_->next_screen = ::Screen::Digits::CLOSE;
}
CheckKeyboardInput_();
}
}
void Input::ConfigCtl::CheckGamepadInput_() {}
void Input::ConfigCtl::CheckKeyboardInput_() {
if (event_.type == sf::Event::KeyPressed) {
if (event_.key.code == sf::Keyboard::Escape) {
config_instance_->next_screen = ::Screen::Digits::HOME_SCREEN;
} else if (event_.key.code == sf::Keyboard::Up) {
config_instance_->MoveUp();
} else if (event_.key.code == sf::Keyboard::Down) {
config_instance_->MoveDown();
} else if (event_.key.code == sf::Keyboard::Return) {
config_instance_->SaveConfig();
config_instance_->next_screen = ::Screen::Digits::HOME_SCREEN;
}
}
}
| 30.02439 | 68 | 0.669374 | frzifus |
69a70a2e93ed3a12b83d33857adda993fa1c7743 | 468 | cpp | C++ | src/shm/single_producer.cpp | AMDS123/SharedMQ | d58c09c32a45822e4a473b6d6d51d1a51ce3681a | [
"BSD-2-Clause"
] | 4 | 2019-03-19T08:14:35.000Z | 2021-05-25T08:51:54.000Z | src/shm/single_producer.cpp | AMDS123/SharedMQ | d58c09c32a45822e4a473b6d6d51d1a51ce3681a | [
"BSD-2-Clause"
] | null | null | null | src/shm/single_producer.cpp | AMDS123/SharedMQ | d58c09c32a45822e4a473b6d6d51d1a51ce3681a | [
"BSD-2-Clause"
] | 3 | 2019-04-05T10:23:26.000Z | 2021-07-22T01:26:01.000Z | #include "errors.h"
#include "configreader.h"
#include "single_producer.h"
Producer::Producer(const char *conf_path)
{
shmmq_notifier = new ShmBase::ShmMQNotify(conf_path, ShmBase::ShmMQNotify::WRITER);
exit_if(shmmq_notifier == NULL, "new ShmMQNotify");
}
Producer::~Producer()
{
delete shmmq_notifier;
}
int Producer::sendData(const void *data, unsigned data_len, std::string& err_msg)
{
return shmmq_notifier->produce(data, data_len, err_msg);
}
| 23.4 | 87 | 0.735043 | AMDS123 |
69aab84ff423b7f54992bd732cfdec60413d46bd | 1,697 | cpp | C++ | modules/core/container/table/unit/table/release.cpp | psiha/nt2 | 5e829807f6b57b339ca1be918a6b60a2507c54d0 | [
"BSL-1.0"
] | null | null | null | modules/core/container/table/unit/table/release.cpp | psiha/nt2 | 5e829807f6b57b339ca1be918a6b60a2507c54d0 | [
"BSL-1.0"
] | null | null | null | modules/core/container/table/unit/table/release.cpp | psiha/nt2 | 5e829807f6b57b339ca1be918a6b60a2507c54d0 | [
"BSL-1.0"
] | null | null | null | //==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//==============================================================================
#include <nt2/table.hpp>
#include <nt2/include/functions/extent.hpp>
#include <nt2/sdk/memory/c_allocator.hpp>
#include <nt2/sdk/unit/tests.hpp>
#include <nt2/sdk/unit/module.hpp>
NT2_TEST_CASE_TPL( table_release ,NT2_TYPES)
{
using nt2::table;
typename nt2::table<T>::pointer ptr;
{
nt2::table<T> a(nt2::of_size(3, 3));
for(int i=1; i <= 3; i++)
for(int j=1; j <= 3; j++)
a(i, j) = T(i + 10*j);
ptr = a.release();
NT2_TEST_EQUAL(nt2::extent(a), nt2::of_size(0));
}
for(int j=0; j < 3; j++)
for(int i=0; i < 3; i++)
NT2_TEST_EQUAL( ptr[i+3*j], T(i+1 + 10*(j+1)) );
boost::simd::deallocate(ptr);
}
NT2_TEST_CASE_TPL( table_release_c_style ,NT2_TYPES)
{
using nt2::table;
using nt2::c_allocator;
typename nt2::table<T, c_allocator<T> >::pointer ptr;
{
nt2::table<T,c_allocator<T> > a(nt2::of_size(3, 3));
for(int i=1; i <= 3; i++)
for(int j=1; j <= 3; j++)
a(i, j) = T(i + 10*j);
ptr = a.release();
NT2_TEST_EQUAL(nt2::extent(a), nt2::of_size(0));
}
for(int j=0; j < 3; j++)
for(int i=0; i < 3; i++)
NT2_TEST_EQUAL( ptr[i+3*j], T(i+1 + 10*(j+1)) );
::free(ptr);
}
| 25.712121 | 80 | 0.516205 | psiha |
69ad11e7a6690ad55c9987a8efd262d42e53bcdb | 4,344 | cpp | C++ | local/codes/c1086_2.cpp | Tony031218/OI | 562f5f45d0448f4eab77643b99b825405a123d92 | [
"MIT"
] | 1 | 2021-02-22T03:39:24.000Z | 2021-02-22T03:39:24.000Z | local/codes/c1086_2.cpp | Tony031218/OI | 562f5f45d0448f4eab77643b99b825405a123d92 | [
"MIT"
] | null | null | null | local/codes/c1086_2.cpp | Tony031218/OI | 562f5f45d0448f4eab77643b99b825405a123d92 | [
"MIT"
] | null | null | null | /*************************************************************
* > File Name : c1086_2.cpp
* > Author : Tony
* > Created Time : 2019/11/07 15:32:56
* > Algorithm :
**************************************************************/
#include <bits/stdc++.h>
using namespace std;
inline int read() {
int x = 0; int f = 1; char ch = getchar();
while (!isdigit(ch)) {if (ch == '-') f = -1; ch = getchar();}
while (isdigit(ch)) {x = x * 10 + ch - 48; ch = getchar();}
return x * f;
}
const int N = 30010;
const long long inf = 0x3f3f3f3f3f3f3f3f;
int x[N], y[N], c[N], in[N][2];
long long a[N*4][4], add[N*4][4];
int n, _x1, _x2, _y1, _y2, flag;
#define mid ((l+r)>>1)
#define lt (o<<1)
#define rt (o<<1|1)
#define lson lt, l, mid
#define rson rt, mid+1, r
void pushdown(int o, int t) {
a[lt][t] += add[o][t];
a[rt][t] += add[o][t];
add[lt][t] += add[o][t];
add[rt][t] += add[o][t];
add[o][t] = 0;
}
void change(int o, int l, int r, int x, long long d, int t) {
if(l == r && l == x) {
a[o][t] = d;
add[o][t] = 0;
return;
}
if(add[o][t]) pushdown(o, t);
if(x <= mid) change(lson, x, d, t);
else change(rson, x, d, t);
a[o][t] = max(a[lt][t], a[rt][t]);
}
void update(int o, int l, int r, int L, int R, long long d, int t) {
if(L <= l && r <= R) {
add[o][t] += d;
a[o][t] += d;
return;
}
if(add[o][t]) pushdown(o, t);
if(L <= mid) update(lson, L, R, d, t);
if(R > mid) update(rson, L, R, d, t);
a[o][t] = max(a[lt][t], a[rt][t]);
}
void Add(int x, int k) { for(; x <= n; x += x & -x) c[x] += k; }
int ask(int x) { int ans = 0; for(; x; x -= x & -x) ans += c[x]; return ans; }
void dfs(int o, int l, int r, int t) {
if(l == r) {
if(t == 0) {
if(in[l][1]) Add(l, 1);
in[l][0] = 1;
a[o][2] = 0;
change(1, 1, n, l, a[o][t], 2);
}
else if(t == 1) {
if(in[l][0]) Add(l, 1);
in[l][1] = 1;
a[o][3] = 0;
change(1, 1, n, l, a[o][t], 3);
} else if(t == 2) {
if(in[l][0] && in[l][1]) Add(l, -1);
in[l][0] = 0;
} else {
if(in[l][0] && in[l][1]) Add(l, -1);
in[l][1] = 0;
}
a[o][t] = -inf;
return;
}
int lim;
if(t == 0) lim = _x1;
else if(t == 1) lim = _y1;
else if(t == 2) lim = _x2+1;
else lim = _y2+1;
if(a[o][t] >= lim) {
if(add[o][t]) pushdown(o, t);
if(a[lt][t] >= lim) dfs(lson, t);
if(a[rt][t] >= lim) dfs(rson, t);
a[o][t] = max(a[lt][t], a[rt][t]);
}
}
int main() {
int T = read();
while(T--) {
n = read(), _x1 = read(), _y1 = read(), _x2 = read(), _y2 = read();
memset(c, 0, sizeof(c));
memset(add, 0, sizeof(add));
memset(in, 0, sizeof(in));
flag = 0;
for(int t = 0; t < 4; t++)
for(int i = 1; i <= n* 4 - 1; i++)
a[i][t] = -inf;
for(int i = 1; i <= n; i++) x[i] = read(), y[i] = read();
for(int i = 1; i <= n; i++) {
if(x[i] < _x1) {
change(1, 1, n, i, x[i], 0);
}
else if(x[i] <= _x2) {
in[i][0] = 1;
change(1, 1, n, i, x[i], 2);
if(in[i][1])Add(i, 1);
}
if(y[i] < _y1) {
change(1, 1, n, i, y[i], 1);
}
else if(y[i] <= _y2) {
in[i][1] = 1;
change(1, 1, n, i, y[i], 3);
if(in[i][0])Add(i, 1);
}
}
flag = 1;
int m = read();
while(m--) {
int opt = read(), l = read(), r = read();
if(opt == 1) {
int d = read();
update(1, 1, n, l, r, d, 0);
update(1, 1, n, l, r, d, 2);
dfs(1, 1, n, 0);
dfs(1, 1, n, 2);
} else if(opt == 2) {
int d = read();
update(1, 1, n, l, r, d, 1);
update(1, 1, n, l, r, d, 3);
dfs(1, 1, n, 1);
dfs(1, 1, n, 3);
} else {
printf("%d\n", ask(r) - ask(l-1));
}
}
}
return 0;
} | 28.392157 | 78 | 0.35244 | Tony031218 |
69b33e9b2d61a2f538bbd88d6c45c51304a2990e | 448 | inl | C++ | engine/include/xe/serialization/node_view.inl | trbflxr/xe | 13123869a848972e064cb8c6838c4215f034f3d9 | [
"MIT"
] | null | null | null | engine/include/xe/serialization/node_view.inl | trbflxr/xe | 13123869a848972e064cb8c6838c4215f034f3d9 | [
"MIT"
] | null | null | null | engine/include/xe/serialization/node_view.inl | trbflxr/xe | 13123869a848972e064cb8c6838c4215f034f3d9 | [
"MIT"
] | null | null | null | //
// Created by trbflxr on 3/7/2020.
//
#ifndef XE_NODE_VIEW_INL
#define XE_NODE_VIEW_INL
namespace xe {
template<typename T>
void NodeView::setName(const T &value) {
return getNode()->setName<T>(value);
}
template<typename T>
void NodeView::set(const T &value) {
getNode()->set<T>(value);
}
template<typename T>
Node &NodeView::operator=(const T &rhs) {
return *getNode() = rhs;
}
}
#endif //XE_NODE_VIEW_INL
| 16 | 43 | 0.65625 | trbflxr |
69b36f2bf6b05a7a19fc71f5965b6a77b8612532 | 15,698 | cpp | C++ | src/coreclr/src/jit/jitconfig.cpp | abock/runtime | b3346807be96f6089fc1538946b3611f607389e2 | [
"MIT"
] | 6 | 2016-07-25T08:33:10.000Z | 2022-02-10T10:10:51.000Z | src/coreclr/src/jit/jitconfig.cpp | abock/runtime | b3346807be96f6089fc1538946b3611f607389e2 | [
"MIT"
] | 15 | 2017-01-27T20:18:50.000Z | 2019-11-14T00:52:58.000Z | src/coreclr/src/jit/jitconfig.cpp | abock/runtime | b3346807be96f6089fc1538946b3611f607389e2 | [
"MIT"
] | 3 | 2021-02-10T16:20:05.000Z | 2021-03-12T07:55:36.000Z | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include "jitpch.h"
#ifdef _MSC_VER
#pragma hdrstop
#endif
#include "jitconfig.h"
JitConfigValues JitConfig;
void JitConfigValues::MethodSet::initialize(const WCHAR* list, ICorJitHost* host)
{
assert(m_list == nullptr);
assert(m_names == nullptr);
// Convert the input list to UTF-8
int utf8ListLen = WszWideCharToMultiByte(CP_UTF8, 0, list, -1, nullptr, 0, nullptr, nullptr);
if (utf8ListLen == 0)
{
return;
}
else
{
// char* m_list;
//
m_list = static_cast<char*>(host->allocateMemory(utf8ListLen));
if (WszWideCharToMultiByte(CP_UTF8, 0, list, -1, static_cast<LPSTR>(m_list), utf8ListLen, nullptr, nullptr) ==
0)
{
// Failed to convert the list. Free the memory and ignore the list.
host->freeMemory(static_cast<void*>(m_list));
m_list = nullptr;
return;
}
}
const char SEP_CHAR = ' '; // character used to separate each entry
const char WILD_CHAR = '*'; // character used as the wildcard match everything
char currChar = '?'; // The current character
int nameStart = -1; // Index of the start of the current class or method name
MethodName** lastName = &m_names; // Last entry inserted into the list
bool isQuoted = false; // true while parsing inside a quote "this-is-a-quoted-region"
MethodName currentName; // Buffer used while parsing the current entry
currentName.m_next = nullptr;
currentName.m_methodNameStart = -1;
currentName.m_methodNameLen = -1;
currentName.m_methodNameWildcardAtEnd = false;
currentName.m_classNameStart = -1;
currentName.m_classNameLen = -1;
currentName.m_classNameWildcardAtEnd = false;
currentName.m_numArgs = -1;
enum State
{
NO_NAME,
CLS_NAME,
FUNC_NAME,
ARG_LIST
}; // parsing state machine
State state = NO_NAME;
for (int i = 0; (currChar != '\0'); i++)
{
currChar = m_list[i];
switch (state)
{
case NO_NAME:
// skip over zero or more blanks, then expect CLS_NAME
if (currChar != SEP_CHAR)
{
nameStart = i;
state = CLS_NAME; // we have found the start of the next entry
}
break;
case CLS_NAME:
// Check for a quoted Class Name: (i.e. "MyClass")
if (m_list[nameStart] == '"')
{
// Advance until we see the second "
//
for (; (currChar != '\0'); i++)
{
currChar = m_list[i];
// Advance until we see the second "
if (currChar == '"')
{
break;
}
// or until we see the end of string
if (currChar == '\0')
{
break;
}
}
// skip the initial "
nameStart++;
isQuoted = true;
}
// A colon denotes the end of the Class name and the start of the Method name
if (currChar == ':')
{
// Record the class name
currentName.m_classNameStart = nameStart;
currentName.m_classNameLen = i - nameStart;
// Also accept the double colon syntax as well (i.e class::method)
//
if (m_list[i + 1] == ':')
{
i++;
}
if (isQuoted)
{
// Remove the trailing "
currentName.m_classNameLen--;
isQuoted = false;
}
// Is the first character a wildcard?
if (m_list[currentName.m_classNameStart] == WILD_CHAR)
{
// The class name is a full wildcard; mark it as such.
currentName.m_classNameStart = -1;
currentName.m_classNameLen = -1;
}
// Is there a wildcard at the end of the class name?
//
else if (m_list[currentName.m_classNameStart + currentName.m_classNameLen - 1] == WILD_CHAR)
{
// i.e. bar*:method, will match any class that starts with "bar"
// Remove the trailing WILD_CHAR from class name
currentName.m_classNameWildcardAtEnd = true;
currentName.m_classNameLen--; // backup for WILD_CHAR
}
// The method name will start at the next character
nameStart = i + 1;
// Now expect FUNC_NAME
state = FUNC_NAME;
}
else if ((currChar == '\0') || (currChar == SEP_CHAR) || (currChar == '('))
{
// Treat this as a method name without a class name.
currentName.m_classNameStart = -1;
currentName.m_classNameLen = -1;
goto DONE_FUNC_NAME;
}
break;
case FUNC_NAME:
// Check for a quoted method name: i.e. className:"MyFunc"
//
// Note that we may have already parsed a quoted string above in CLS_NAME, i.e. "Func":
if (!isQuoted && (m_list[nameStart] == '"'))
{
// Advance until we see the second "
//
for (; (currChar != '\0'); i++)
{
currChar = m_list[i];
// Advance until we see the second "
if (currChar == '"')
{
break;
}
// or until we see the end of string
if (currChar == '\0')
{
break;
}
}
// skip the initial "
nameStart++;
isQuoted = true;
}
if ((currChar == '\0') || (currChar == SEP_CHAR) || (currChar == '('))
{
DONE_FUNC_NAME:
assert((currChar == '\0') || (currChar == SEP_CHAR) || (currChar == '('));
// Record the method name
currentName.m_methodNameStart = nameStart;
currentName.m_methodNameLen = i - nameStart;
if (isQuoted)
{
// Remove the trailing "
currentName.m_methodNameLen--;
isQuoted = false;
}
// Is the first character a wildcard?
if (m_list[currentName.m_methodNameStart] == WILD_CHAR)
{
// The method name is a full wildcard; mark it as such.
currentName.m_methodNameStart = -1;
currentName.m_methodNameLen = -1;
}
// Is there a wildcard at the end of the method name?
//
else if (m_list[currentName.m_methodNameStart + currentName.m_methodNameLen - 1] == WILD_CHAR)
{
// i.e. class:foo*, will match any method that starts with "foo"
// Remove the trailing WILD_CHAR from method name
currentName.m_methodNameLen--; // backup for WILD_CHAR
currentName.m_methodNameWildcardAtEnd = true;
}
// should we expect an ARG_LIST?
//
if (currChar == '(')
{
currentName.m_numArgs = -1;
// Expect an ARG_LIST
state = ARG_LIST;
}
else // reached the end of string or a SEP_CHAR
{
assert((currChar == '\0') || (currChar == SEP_CHAR));
currentName.m_numArgs = -1;
// There isn't an ARG_LIST
goto DONE_ARG_LIST;
}
}
break;
case ARG_LIST:
if ((currChar == '\0') || (currChar == ')'))
{
if (currentName.m_numArgs == -1)
{
currentName.m_numArgs = 0;
}
DONE_ARG_LIST:
assert((currChar == '\0') || (currChar == SEP_CHAR) || (currChar == ')'));
// We have parsed an entire method name; create a new entry in the list for it.
MethodName* name = static_cast<MethodName*>(host->allocateMemory(sizeof(MethodName)));
*name = currentName;
assert(name->m_next == nullptr);
*lastName = name;
lastName = &name->m_next;
state = NO_NAME;
// Skip anything after the argument list until we find the next
// separator character. Otherwise if we see "func(a,b):foo" we
// would create entries for "func(a,b)" as well as ":foo".
if (currChar == ')')
{
do
{
currChar = m_list[++i];
} while ((currChar != '\0') && (currChar != SEP_CHAR));
}
}
else // We are looking at the ARG_LIST
{
if ((currChar != SEP_CHAR) && (currentName.m_numArgs == -1))
{
currentName.m_numArgs = 1;
}
// A comma means that there is an additional arg
if (currChar == ',')
{
currentName.m_numArgs++;
}
}
break;
default:
assert(!"Bad state");
break;
}
}
}
void JitConfigValues::MethodSet::destroy(ICorJitHost* host)
{
// Free method names, free the list string, and reset our state
for (MethodName *name = m_names, *next = nullptr; name != nullptr; name = next)
{
next = name->m_next;
host->freeMemory(static_cast<void*>(name));
}
if (m_list != nullptr)
{
host->freeMemory(static_cast<void*>(m_list));
m_list = nullptr;
}
m_names = nullptr;
}
static bool matchesName(const char* const name, int nameLen, bool wildcardAtEnd, const char* const s2)
{
// 's2' must start with 'nameLen' characters of 'name'
if (strncmp(name, s2, nameLen) != 0)
{
return false;
}
// if we don't have a wildcardAtEnd then s2 also need to be zero terminated
if (!wildcardAtEnd && (s2[nameLen] != '\0'))
{
return false;
}
// we have a successful match
return true;
}
bool JitConfigValues::MethodSet::contains(const char* methodName,
const char* className,
CORINFO_SIG_INFO* sigInfo) const
{
int numArgs = sigInfo != nullptr ? sigInfo->numArgs : -1;
// Try to match any the entries in the list.
for (MethodName* name = m_names; name != nullptr; name = name->m_next)
{
// If m_numArgs is valid, check for a mismatch
if (name->m_numArgs != -1 && name->m_numArgs != numArgs)
{
continue;
}
// If m_methodNameStart is valid, check for a mismatch
if (name->m_methodNameStart != -1)
{
const char* expectedMethodName = &m_list[name->m_methodNameStart];
if (!matchesName(expectedMethodName, name->m_methodNameLen, name->m_methodNameWildcardAtEnd, methodName))
{
// C++ embeds the class name into the method name; deal with that here.
const char* colon = strchr(methodName, ':');
if (colon != nullptr && colon[1] == ':' &&
matchesName(expectedMethodName, name->m_methodNameLen, name->m_methodNameWildcardAtEnd, methodName))
{
int classLen = (int)(colon - methodName);
if (name->m_classNameStart == -1 ||
(classLen == name->m_classNameLen &&
strncmp(&m_list[name->m_classNameStart], methodName, classLen) == 0))
{
return true;
}
}
continue;
}
}
// If m_classNameStart is valid, check for a mismatch
if (className == nullptr || name->m_classNameStart == -1 ||
matchesName(&m_list[name->m_classNameStart], name->m_classNameLen, name->m_classNameWildcardAtEnd,
className))
{
return true;
}
#ifdef _DEBUG
// Maybe className doesn't include the namespace. Try to match that
const char* nsSep = strrchr(className, '.');
if (nsSep != nullptr && nsSep != className)
{
const char* onlyClass = nsSep[-1] == '.' ? nsSep : &nsSep[1];
if (matchesName(&m_list[name->m_classNameStart], name->m_classNameLen, name->m_classNameWildcardAtEnd,
onlyClass))
{
return true;
}
}
#endif
}
return false;
}
void JitConfigValues::initialize(ICorJitHost* host)
{
assert(!m_isInitialized);
#define CONFIG_INTEGER(name, key, defaultValue) m_##name = host->getIntConfigValue(key, defaultValue);
#define CONFIG_STRING(name, key) m_##name = host->getStringConfigValue(key);
#define CONFIG_METHODSET(name, key) \
const WCHAR* name##value = host->getStringConfigValue(key); \
m_##name.initialize(name##value, host); \
host->freeStringConfigValue(name##value);
#include "jitconfigvalues.h"
m_isInitialized = true;
}
void JitConfigValues::destroy(ICorJitHost* host)
{
if (!m_isInitialized)
{
return;
}
#define CONFIG_INTEGER(name, key, defaultValue)
#define CONFIG_STRING(name, key) host->freeStringConfigValue(m_##name);
#define CONFIG_METHODSET(name, key) m_##name.destroy(host);
#include "jitconfigvalues.h"
m_isInitialized = false;
}
| 36.849765 | 120 | 0.459485 | abock |
69c10b4698fbd8b0ec8bfd85a487868575b9a719 | 4,632 | cpp | C++ | scene.cpp | LuanQBarbosa/ray-tracer-university-project | 9fd8ab9d8e8b98dc186e7353788ed8a93862cb2b | [
"MIT"
] | null | null | null | scene.cpp | LuanQBarbosa/ray-tracer-university-project | 9fd8ab9d8e8b98dc186e7353788ed8a93862cb2b | [
"MIT"
] | null | null | null | scene.cpp | LuanQBarbosa/ray-tracer-university-project | 9fd8ab9d8e8b98dc186e7353788ed8a93862cb2b | [
"MIT"
] | null | null | null | #include "scene.h"
Scene::Scene( void )
{}
Scene::~Scene( void )
{
if ( bvh_ )
{
delete bvh_;
bvh_ = nullptr;
}
}
// bool Scene::intersect( const Ray &ray,
// IntersectionRecord &intersection_record ) const
// {
// bool intersection_result = false;
// IntersectionRecord tmp_intersection_record;
// std::size_t num_primitives = primitives_.size();
// // Loops over the list of primitives, testing the intersection of each primitive against the given ray
// for ( std::size_t primitive_id = 0; primitive_id < num_primitives; primitive_id++ )
// if ( primitives_[primitive_id]->intersect( ray, tmp_intersection_record ) )
// if ( ( tmp_intersection_record.t_ < intersection_record.t_ ) && ( tmp_intersection_record.t_ > 0.0 ) )
// {
// intersection_record = tmp_intersection_record;
// intersection_result = true; // the ray intersects a primitive!
// }
// return intersection_result;
// }
bool Scene::intersect( const Ray &ray,
IntersectionRecord &intersection_record ) const
{
bool intersection_result = false;
IntersectionRecord tmp_intersection_record;
intersection_result = bvh_->intersect( ray, intersection_record);
return intersection_result;
}
void Scene::buildBVH( void )
{
bvh_ = new BVH( primitives_ );
std::clog << std::endl;
}
void Scene::load( void )
{
Material m1{ new Diffuse{ glm::vec3{ 0.5f, 0.5f, 0.5f } }, glm::vec3{ 0.0f, 0.0f, 0.0f } };
Material m2{ new Diffuse{ glm::vec3{ 0.0f, 0.0f, 0.0f } }, glm::vec3{ 40.0f, 40.0f, 40.0f } };
Material m3{ new Diffuse{ glm::vec3{ 0.0f, 0.0f, 1.0f } }, glm::vec3{ 12.5f, 12.5f, 12.5f } };
// Spheres
// Sphere *s1 = new Sphere(glm::vec3(-1.5f, -1.0f, 1.0f), 0.75f, Material{ new SmoothDieletric{ glm::vec3{ 69.0f, 74.0f, 208.0f } / 255.0f }, glm::vec3{ 0.0f, 0.0f, 0.0f } });
// primitives_.push_back(Primitive::PrimitiveUniquePtr(s1));
// Sphere *s2 = new Sphere(glm::vec3(0.0f, -1.0f, 0.0f), 0.75f, Material{ new CookTorrance{ glm::vec3{ 44.0f, 242.0f, 97.0f } / 255.0f }, glm::vec3{ 0.0f, 0.0f, 0.0f } });
// primitives_.push_back(Primitive::PrimitiveUniquePtr(s2));
// Sphere *s3 = new Sphere(glm::vec3(1.5f, -1.0f, 1.0f), 0.75f, Material{ new PerfectReflector{ glm::vec3{ 15.0f, 210.0f, 8.0f } / 255.0f }, glm::vec3{ 0.0f, 0.0f, 0.0f } });
// primitives_.push_back(Primitive::PrimitiveUniquePtr(s3));
// Sphere *s1 = new Sphere(glm::vec3(0.0f, 0.0f, 0.0f), 1.0f, Material{ new SmoothDieletric{ glm::vec3{ 69.0f, 74.0f, 208.0f } / 255.0f }, glm::vec3{ 0.0f, 0.0f, 0.0f } });
// primitives_.push_back(Primitive::PrimitiveUniquePtr(s1));
// Sphere *s2 = new Sphere(glm::vec3(0.0f, 0.0f, 0.0f), 0.99f, Material{ new Diffuse{ glm::vec3{ 255.0f, 0.0f, 0.0f } / 255.0f }, glm::vec3{ 0.0f, 0.0f, 0.0f } });
// primitives_.push_back(Primitive::PrimitiveUniquePtr(s2));
// Lights
// Sphere *s4 = new Sphere(glm::vec3(-0.35f, 3.5f, 0.0f), 1.0f, m3);
// primitives_.push_back(Primitive::PrimitiveUniquePtr(s4));
Sphere *s4 = new Sphere(glm::vec3(-0.95f, 1.0f, 0.75f), 0.15f, m3);
primitives_.push_back(Primitive::PrimitiveUniquePtr(s4));
// Sphere *s5 = new Sphere(glm::vec3(0.0f, 4.0f, -0.75f), 1.5f, m3);
// primitives_.push_back(Primitive::PrimitiveUniquePtr(s5));
// Sphere *s6 = new Sphere(glm::vec3(0.0f, 4.0f, -2.5f), 1.5f, m3);
// primitives_.push_back(Primitive::PrimitiveUniquePtr(s6));
// Sphere *s7 = new Sphere(glm::vec3(0.0f, 4.0f, -4.25f), 1.5f, m3);
// primitives_.push_back(Primitive::PrimitiveUniquePtr(s7));
}
void Scene::loadObj( const char* obj, glm::vec3 position, float size, Material material )
{
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(obj,
aiProcess_CalcTangentSpace |
aiProcess_Triangulate |
aiProcess_JoinIdenticalVertices |
aiProcess_SortByPType);
for (unsigned int j = 0; j < scene->mNumMeshes; j++) {
auto mesh = scene->mMeshes[j];
for (unsigned int i = 0; i < mesh->mNumFaces; i++) {
auto face = mesh->mFaces[i];
auto v1 = mesh->mVertices[face.mIndices[0]];
auto v2 = mesh->mVertices[face.mIndices[1]];
auto v3 = mesh->mVertices[face.mIndices[2]];
Triangle *triangle = new Triangle((glm::vec3(v1.x, v1.y, v1.z)) * size + position,
(glm::vec3(v2.x, v2.y, v2.z)) * size + position,
(glm::vec3(v3.x, v3.y, v3.z)) * size + position,
material);
primitives_.push_back( Primitive::PrimitiveUniquePtr(triangle));
}
}
}
| 38.280992 | 178 | 0.626295 | LuanQBarbosa |
69c588a34ad6018a8ba04f265c76749673132a96 | 1,679 | cpp | C++ | c++/program.cpp | foxtrotzulu94/LanguageBenchmarkGame | 29c92c47c860d426409047a8408eaa52284a0cff | [
"MIT"
] | null | null | null | c++/program.cpp | foxtrotzulu94/LanguageBenchmarkGame | 29c92c47c860d426409047a8408eaa52284a0cff | [
"MIT"
] | null | null | null | c++/program.cpp | foxtrotzulu94/LanguageBenchmarkGame | 29c92c47c860d426409047a8408eaa52284a0cff | [
"MIT"
] | null | null | null | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include "argument_holder.hpp"
#include "file_result.hpp"
#include "worker.hpp"
#include "utils.hpp"
void PrintUsage(){
using namespace std;
cout << endl;
cout << " Usage: program.out <dir_a> <dir_b> [options]" << endl << endl;
cout << " C++ implementation of the language benchmarking trial" << endl << endl;
cout << " Options:" << endl << endl;
cout << " -u, --ignore-unchanged\t Ignore unchanged files in the final output" << endl;
cout << " --md5\t\t\t MD5 Hash [Default]" << endl;
cout << " --sha1\t\t\t SHA1 Hash" << endl;
cout << " --sha256\t\t\t SHA256 Hash" << endl;
}
int main(int argc, char** argv){
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
ArgumentHolder args;
if(!args.Parse(argc, argv)){
std::cout << "Error parsing arguments!" << std::endl;
PrintUsage();
return 1;
}
Worker work(args.ChecksumName);
std::cout << "Starting diff of "<< args.DirectoryA << " and " << args.DirectoryB << " ("
<< args.ChecksumName << ")" << std::endl;
std::cout << "Start time " << GetFormattedDateTime() << std::endl;
auto promiseA = work.scanDirectory(args.DirectoryA.string());
auto promiseB = work.scanDirectory(args.DirectoryB.string());
auto resultA = promiseA.get(), resultB = promiseB.get();
work.Reconcile(resultA, resultB, true);
work.WriteResult(args.DirectoryA.string(), args.DirectoryB.string(), "reference.patch", args.ShouldIgnoreUnchanged);
std::cout << std::endl << "End time " << GetFormattedDateTime() << std::endl;
}
| 34.979167 | 120 | 0.622394 | foxtrotzulu94 |
69c63bdf96afc38e8fe7fba0b9e752be7677271e | 1,145 | cpp | C++ | math/EXCRT.cpp | jasonfan0328/algorithm | 3769a03c5c530381e3ee08c416c3593c96ee966c | [
"CC0-1.0"
] | 3 | 2021-05-03T01:14:04.000Z | 2021-05-05T05:47:56.000Z | math/EXCRT.cpp | jason-fxz/algorithm | 3769a03c5c530381e3ee08c416c3593c96ee966c | [
"CC0-1.0"
] | null | null | null | math/EXCRT.cpp | jason-fxz/algorithm | 3769a03c5c530381e3ee08c416c3593c96ee966c | [
"CC0-1.0"
] | null | null | null | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 100010;
ll a[N], b[N]; int n;
ll mul(ll a, ll b, ll mod) {
ll r = 0;
a = (a % mod + mod) % mod;
b = (b % mod + mod) % mod;
while (b) {
if (b & 1) r = (r + a) % mod;
a = (a << 1) % mod; b >>= 1;
} return r;
}
ll gcd(ll a, ll b) {
return !b ? a : gcd(b, a % b);
}
ll exgcd(ll a, ll b, ll &x, ll &y) {
if (!b) {x = 1, y = 0; return a;}
ll d = exgcd(b, a % b, x, y);
swap(x, y); y -= a / b * x;
return d;
}
// x=ai (mod mi)
ll EXCRT(int n, ll a[], ll m[]) {
for (int i = 2; i <= n; i++) {
ll d = gcd(m[i - 1], m[i]), x, y;
if ((a[i] - a[i - 1]) % d != 0) return -1; // 无解
exgcd(m[i - 1] / d, m[i] / d, x, y);
m[i] = m[i] / gcd(m[i], m[i - 1]) * m[i - 1];
a[i] = (a[i - 1] + mul(mul((a[i] - a[i - 1]) / d, x, m[i]), m[i - 1], m[i])) % m[i];
a[i] = (a[i] + m[i]) % m[i];
}
return a[n];
}
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%lld%lld", &a[i], &b[i]);
ll ans = EXCRT(n, b, a);
printf("%lld\n", ans);
} | 27.261905 | 92 | 0.385153 | jasonfan0328 |
69ccc19cb17a6de0aeb0dc8a1c7c6b06b421becf | 33,356 | cpp | C++ | Source/GameJoltAPI/gjAPI.cpp | Sasurai/Dodge | bb7233b20bb1f8f0e6cae2d53c3993aea486109c | [
"MIT"
] | 1 | 2020-01-08T05:36:59.000Z | 2020-01-08T05:36:59.000Z | Source/GameJoltAPI/gjAPI.cpp | Sasurai/Dodge | bb7233b20bb1f8f0e6cae2d53c3993aea486109c | [
"MIT"
] | null | null | null | Source/GameJoltAPI/gjAPI.cpp | Sasurai/Dodge | bb7233b20bb1f8f0e6cae2d53c3993aea486109c | [
"MIT"
] | null | null | null | ///////////////////////////////////////////////////////////////////
//*-------------------------------------------------------------*//
//| Part of the Game Jolt API C++ Library (http://gamejolt.com) |//
//*-------------------------------------------------------------*//
//| Released under the zlib License |//
//| More information available in the README.md |//
//*-------------------------------------------------------------*//
///////////////////////////////////////////////////////////////////
#include "gjAPI.h"
#include <sstream>
#include <iostream>
#include <algorithm>
// ****************************************************************
/* constructor */
gjAPI::gjInterUser::gjInterUser(gjAPI* pAPI, gjNetwork* pNetwork)noexcept
: m_pAPI (pAPI)
, m_pNetwork (pNetwork)
{
// create NULL user for secure object handling
gjData pNullData;
pNullData["id"] = "0";
pNullData["username"] = "NOT FOUND";
pNullData["type"] = "Guest";
pNullData["avatar_url"] = GJ_API_AVATAR_DEFAULT;
m_apUser[0] = new gjUser(pNullData, m_pAPI);
// create guest user for secure object handling
gjData pGuestData;
pGuestData["id"] = "-1";
pGuestData["username"] = "Guest";
pGuestData["type"] = "Guest";
pGuestData["avatar_url"] = GJ_API_AVATAR_DEFAULT;
m_apUser[-1] = new gjUser(pGuestData, m_pAPI);
}
// ****************************************************************
/* destructor */
gjAPI::gjInterUser::~gjInterUser()
{
// delete all users
FOR_EACH(it, m_apUser)
SAFE_DELETE(it->second)
// clear container
m_apUser.clear();
}
// ****************************************************************
/* access user objects directly (may block) */
gjUser* gjAPI::gjInterUser::GetUser(const int& iID)
{
gjUserPtr pOutput;
if(this->__CheckCache(iID, &pOutput) == GJ_OK) return pOutput;
if(this->FetchUserNow(iID, &pOutput) == GJ_OK) return pOutput;
return m_apUser[0];
}
gjUser* gjAPI::gjInterUser::GetUser(const std::string& sName)
{
gjUserPtr pOutput;
if(this->__CheckCache(sName, &pOutput) == GJ_OK) return pOutput;
if(this->FetchUserNow(sName, &pOutput) == GJ_OK) return pOutput;
return m_apUser[0];
}
// ****************************************************************
/* access main user object directly (may block) */
gjUser* gjAPI::gjInterUser::GetMainUser()
{
if(!m_pAPI->IsConnected()) return m_apUser[0];
return this->GetUser(m_pAPI->GetUserName());
}
// ****************************************************************
/* delete all cached user objects */
void gjAPI::gjInterUser::ClearCache()
{
// save NULL user and guest user
gjUser* pNull = m_apUser[0]; m_apUser.erase(0);
gjUser* pGuest = m_apUser[-1]; m_apUser.erase(-1);
// delete users
FOR_EACH(it, m_apUser)
SAFE_DELETE(it->second)
// clear container
m_apUser.clear();
m_apUser[0] = pNull;
m_apUser[-1] = pGuest;
}
// ****************************************************************
/* check for cached user objects */
int gjAPI::gjInterUser::__CheckCache(const int& iID, gjUserPtr* ppOutput)
{
// retrieve cached user
if(m_apUser.count(iID))
{
if(ppOutput) (*ppOutput) = m_apUser[iID];
return GJ_OK;
}
return GJ_NO_DATA_FOUND;
}
int gjAPI::gjInterUser::__CheckCache(const std::string& sName, gjUserPtr* ppOutput)
{
// retrieve cached user
FOR_EACH(it, m_apUser)
{
if(it->second->GetName() == sName)
{
if(ppOutput) (*ppOutput) = it->second;
return GJ_OK;
}
}
return GJ_NO_DATA_FOUND;
}
// ****************************************************************
/* process user data and cache user objects */
int gjAPI::gjInterUser::__Process(const std::string& sData, void* pAdd, gjUserPtr* ppOutput)
{
// parse output
gjDataList aaReturn;
if(m_pAPI->ParseRequestKeypair(sData, &aaReturn) != GJ_OK)
{
m_pAPI->ErrorLogAdd("API Error: could not parse user");
if(ppOutput) (*ppOutput) = m_apUser[0];
return GJ_REQUEST_FAILED;
}
// create and cache user object
gjUser* pNewUser = new gjUser(aaReturn[0], m_pAPI);
const int iID = pNewUser->GetID();
if(m_apUser.count(iID))
{
SAFE_DELETE(pNewUser)
pNewUser = m_apUser[iID];
}
else m_apUser[iID] = pNewUser;
if(ppOutput) (*ppOutput) = pNewUser;
return pNewUser ? GJ_OK : GJ_NO_DATA_FOUND;
}
// ****************************************************************
/* constructor */
gjAPI::gjInterTrophy::gjInterTrophy(gjAPI* pAPI, gjNetwork* pNetwork)noexcept
: m_iCache (0)
, m_pAPI (pAPI)
, m_pNetwork (pNetwork)
{
// create NULL trophy for secure object handling
gjData pNullData;
pNullData["id"] = "0";
pNullData["title"] = "NOT FOUND";
pNullData["difficulty"] = "Bronze";
pNullData["image_url"] = GJ_API_TROPHY_DEFAULT_1;
m_apTrophy[0] = new gjTrophy(pNullData, m_pAPI);
// reserve some memory
m_aiSort.reserve(GJ_API_RESERVE_TROPHY);
m_aiSecret.reserve(GJ_API_RESERVE_TROPHY);
m_aiHidden.reserve(GJ_API_RESERVE_TROPHY);
// retrieve offline-cached trophy data
this->__LoadOffCache();
}
// ****************************************************************
/* destructor */
gjAPI::gjInterTrophy::~gjInterTrophy()
{
// delete all trophies
FOR_EACH(it, m_apTrophy)
SAFE_DELETE(it->second)
// clear containers
m_apTrophy.clear();
m_aiSort.clear();
m_aiSecret.clear();
m_aiHidden.clear();
}
// ****************************************************************
/* access trophy objects directly (may block) */
gjTrophy* gjAPI::gjInterTrophy::GetTrophy(const int& iID)
{
if(!m_pAPI->IsConnected() && m_iCache == 0) return m_apTrophy[0];
if(m_apTrophy.size() <= 1)
{
// wait for prefetching
if(GJ_API_PREFETCH) m_pNetwork->Wait(2);
if(m_apTrophy.size() <= 1)
{
gjTrophyList apOutput;
this->FetchTrophiesNow(0, &apOutput);
}
}
return m_apTrophy.count(iID) ? m_apTrophy[iID] : m_apTrophy[0];
}
// ****************************************************************
/* delete all cached trophy objects */
void gjAPI::gjInterTrophy::ClearCache(const bool& bFull)
{
const bool bRemoveAll = bFull || !GJ_API_OFFCACHE_TROPHY;
if(bRemoveAll)
{
// save NULL trophy
gjTrophy* pNull = m_apTrophy[0];
m_apTrophy.erase(0);
// delete trophies
FOR_EACH(it, m_apTrophy)
SAFE_DELETE(it->second)
// clear container
m_apTrophy.clear();
m_apTrophy[0] = pNull;
}
// set cache status
m_iCache = bRemoveAll ? 0 : 1;
}
// ****************************************************************
/* define layout of the returned trophy list */
void gjAPI::gjInterTrophy::SetSort(const int* piIDList, const size_t& iNum)
{
if(iNum)
{
// clear sort list
m_aiSort.clear();
// add IDs to sort list
for(size_t i = 0; i < iNum; ++i)
m_aiSort.push_back(piIDList[i]);
}
// apply sort attribute
FOR_EACH(it, m_apTrophy)
it->second->__SetSort(0);
for(size_t i = 0; i < m_aiSort.size(); ++i)
if(m_apTrophy.count(m_aiSort[i])) m_apTrophy[m_aiSort[i]]->__SetSort(int(i+1));
}
// ****************************************************************
/* define secret trophy objects */
void gjAPI::gjInterTrophy::SetSecret(const int* piIDList, const size_t& iNum)
{
if(iNum)
{
// clear secret list
m_aiSecret.clear();
// add IDs to secret list
for(size_t i = 0; i < iNum; ++i)
m_aiSecret.push_back(piIDList[i]);
}
// apply secret attribute
FOR_EACH(it, m_apTrophy)
it->second->__SetSecret(false);
FOR_EACH(it, m_aiSecret)
if(m_apTrophy.count(*it)) m_apTrophy[*it]->__SetSecret(true);
}
// ****************************************************************
/* define hidden trophy objects */
void gjAPI::gjInterTrophy::SetHidden(const int* piIDList, const size_t& iNum)
{
if(iNum)
{
// clear hidden list
m_aiHidden.clear();
// add IDs to hidden list
for(size_t i = 0; i < iNum; ++i)
m_aiHidden.push_back(piIDList[i]);
}
// apply hidden attribute and remove all hidden trophy objects
FOR_EACH(it, m_aiHidden)
if(m_apTrophy.count(*it)) m_apTrophy.erase(m_apTrophy.find(*it));
}
// ****************************************************************
/* check for cached trophy objects */
int gjAPI::gjInterTrophy::__CheckCache(const int& iAchieved, gjTrophyList* papOutput)
{
// retrieve cached trophies
if(m_apTrophy.size() > 1)
{
if(papOutput)
{
gjTrophyList apConvert;
apConvert.reserve(GJ_API_RESERVE_TROPHY);
// add sorted trophies
for(size_t i = 0; i < m_aiSort.size(); ++i)
if(m_apTrophy.count(m_aiSort[i])) apConvert.push_back(m_apTrophy[m_aiSort[i]]);
// add missing unsorted trophies
FOR_EACH(it, m_apTrophy)
{
if(it->first)
{
if(std::find(apConvert.begin(), apConvert.end(), it->second) == apConvert.end())
apConvert.push_back(it->second);
}
}
// check for achieved status
for(size_t i = 0; i < apConvert.size(); ++i)
{
if((iAchieved > 0 && apConvert[i]->IsAchieved()) ||
(iAchieved < 0 && !apConvert[i]->IsAchieved()) || !iAchieved)
(*papOutput).push_back(apConvert[i]);
}
}
return GJ_OK;
}
return GJ_NO_DATA_FOUND;
}
// ****************************************************************
/* process trophy data and cache trophy objects */
int gjAPI::gjInterTrophy::__Process(const std::string& sData, void* pAdd, gjTrophyList* papOutput)
{
// parse output
gjDataList aaReturn;
if(m_pAPI->ParseRequestKeypair(sData, &aaReturn) != GJ_OK)
{
m_pAPI->ErrorLogAdd("API Error: could not parse trophies");
return GJ_REQUEST_FAILED;
}
// offline-cache trophy data
if(!aaReturn.empty()) this->__SaveOffCache(sData);
if(m_iCache == 0) m_iCache = 2;
// create and cache trophy objects
FOR_EACH(it, aaReturn)
{
gjTrophy* pNewTrophy = new gjTrophy(*it, m_pAPI);
const int iID = pNewTrophy->GetID();
if(m_apTrophy.count(iID))
{
*m_apTrophy[iID] = *pNewTrophy;
SAFE_DELETE(pNewTrophy)
}
else m_apTrophy[iID] = pNewTrophy;
}
// apply attributes
this->SetSort(NULL, 0);
this->SetSecret(NULL, 0);
this->SetHidden(NULL, 0);
return (this->__CheckCache((long)pAdd, papOutput) == GJ_OK) ? GJ_OK : GJ_NO_DATA_FOUND;
}
// ****************************************************************
/* save trophy data to a cache file */
void gjAPI::gjInterTrophy::__SaveOffCache(const std::string& sData)
{
if(!GJ_API_OFFCACHE_TROPHY) return;
if(m_iCache != 0) return;
// open cache file
std::FILE* pFile = std::fopen(GJ_API_OFFCACHE_NAME, "w");
if(pFile)
{
// write data and close cache file
std::fprintf(pFile, "[TROPHY]\n");
std::fprintf(pFile, "%s", sData.c_str());
std::fclose(pFile);
}
}
// ****************************************************************
/* load trophy data from a cache file */
void gjAPI::gjInterTrophy::__LoadOffCache()
{
if(!GJ_API_OFFCACHE_TROPHY) return;
if(m_iCache != 0) return;
// open cache file
std::FILE* pFile = std::fopen(GJ_API_OFFCACHE_NAME, "r");
if(pFile)
{
// read trophy header
char acHeader[32];
std::fscanf(pFile, "%31[^\n]%*c", acHeader);
// read trophy data
std::string sData;
while(true)
{
char acLine[1024];
std::fscanf(pFile, "%1023[^\n]%*c", acLine);
if(std::feof(pFile)) break;
if(std::strlen(acLine) > 1)
{
sData += acLine;
sData += '\n';
}
}
// close cache file
std::fclose(pFile);
if(!sData.empty())
{
// flag offline caching and load offline-cached trophies
m_iCache = 1;
this->__Process(sData, NULL, NULL);
}
}
}
// ****************************************************************
/* constructor */
gjAPI::gjInterScore::gjInterScore(gjAPI* pAPI, gjNetwork* pNetwork)noexcept
: m_pAPI (pAPI)
, m_pNetwork (pNetwork)
{
// create NULL score table for secure object handling
gjData pNullData;
pNullData["id"] = "0";
pNullData["name"] = "NOT FOUND";
m_apScoreTable[0] = new gjScoreTable(pNullData, m_pAPI);
}
// ****************************************************************
/* destructor */
gjAPI::gjInterScore::~gjInterScore()
{
// delete all score tables and scores entries
FOR_EACH(it, m_apScoreTable)
SAFE_DELETE(it->second)
// clear container
m_apScoreTable.clear();
}
// ****************************************************************
/* access score table objects directly (may block) */
gjScoreTable* gjAPI::gjInterScore::GetScoreTable(const int &iID)
{
if(m_apScoreTable.size() <= 1)
{
// wait for prefetching
if(GJ_API_PREFETCH) m_pNetwork->Wait(2);
if(m_apScoreTable.size() <= 1)
{
gjScoreTableMap apOutput;
this->FetchScoreTablesNow(&apOutput);
}
}
gjScoreTable* pPrimary = gjScoreTable::GetPrimary();
return iID ? (m_apScoreTable.count(iID) ? m_apScoreTable[iID] : m_apScoreTable[0]) : (pPrimary ? pPrimary : m_apScoreTable[0]);
}
// ****************************************************************
/* delete all cached score table objects and score entries */
void gjAPI::gjInterScore::ClearCache()
{
// save NULL score table
gjScoreTable* pNull = m_apScoreTable[0]; m_apScoreTable.erase(0);
// delete score tables and scores entries
FOR_EACH(it, m_apScoreTable)
SAFE_DELETE(it->second)
// clear container
m_apScoreTable.clear();
m_apScoreTable[0] = pNull;
}
// ****************************************************************
/* check for cached score table objects */
int gjAPI::gjInterScore::__CheckCache(gjScoreTableMap* papOutput)
{
// retrieve cached score tables
if(m_apScoreTable.size() > 1)
{
if(papOutput)
{
FOR_EACH(it, m_apScoreTable)
if(it->first) (*papOutput)[it->first] = it->second;
}
return GJ_OK;
}
return GJ_NO_DATA_FOUND;
}
// ****************************************************************
/* process score table data and cache score table objects */
int gjAPI::gjInterScore::__Process(const std::string& sData, void* pAdd, gjScoreTableMap* papOutput)
{
// parse output
gjDataList aaReturn;
if(m_pAPI->ParseRequestKeypair(sData, &aaReturn) != GJ_OK)
{
m_pAPI->ErrorLogAdd("API Error: could not parse score tables");
return GJ_REQUEST_FAILED;
}
// create and cache score tables
FOR_EACH(it, aaReturn)
{
gjScoreTable* pNewScoreTable = new gjScoreTable(*it, m_pAPI);
const int iID = pNewScoreTable->GetID();
if(m_apScoreTable.count(iID)) SAFE_DELETE(pNewScoreTable)
else m_apScoreTable[iID] = pNewScoreTable;
}
return (this->__CheckCache(papOutput) == GJ_OK) ? GJ_OK : GJ_NO_DATA_FOUND;
}
// ****************************************************************
/* constructor */
gjAPI::gjInterDataStore::gjInterDataStore(const int& iType, gjAPI* pAPI, gjNetwork* pNetwork)noexcept
: m_iType (iType)
, m_pAPI (pAPI)
, m_pNetwork (pNetwork)
{
}
// ****************************************************************
/* destructor */
gjAPI::gjInterDataStore::~gjInterDataStore()
{
this->ClearCache();
}
// ****************************************************************
/* create and access data store items directly */
gjDataItem* gjAPI::gjInterDataStore::GetDataItem(const std::string& sKey)
{
// create new data store item
if(!m_apDataItem.count(sKey))
{
gjData asDataItemData;
asDataItemData["key"] = sKey;
m_apDataItem[sKey] = new gjDataItem(asDataItemData,m_iType, m_pAPI);
}
return m_apDataItem.count(sKey) ? m_apDataItem[sKey] : NULL;
}
// ****************************************************************
/* delete all cached data store items */
void gjAPI::gjInterDataStore::ClearCache()
{
// delete data store items
FOR_EACH(it, m_apDataItem)
SAFE_DELETE(it->second)
// clear container
m_apDataItem.clear();
}
// ****************************************************************
/* check for cached data store items */
int gjAPI::gjInterDataStore::__CheckCache(gjDataItemMap* papOutput)
{
// retrieve cached data store items
if(!m_apDataItem.empty())
{
if(papOutput)
{
FOR_EACH(it, m_apDataItem)
(*papOutput)[it->first] = it->second;
}
return GJ_OK;
}
return GJ_NO_DATA_FOUND;
}
// ****************************************************************
/* process data store data and cache data store items */
int gjAPI::gjInterDataStore::__Process(const std::string& sData, void* pAdd, gjDataItemMap* papOutput)
{
// parse output
gjDataList aaReturn;
if(m_pAPI->ParseRequestKeypair(sData, &aaReturn) != GJ_OK)
{
m_pAPI->ErrorLogAdd("API Error: could not parse data store items");
return GJ_REQUEST_FAILED;
}
// create and cache data store items
FOR_EACH(it, aaReturn)
{
gjDataItem* pNewDataItem = new gjDataItem(*it, m_iType, m_pAPI);
const std::string sKey = pNewDataItem->GetKey();
if(m_apDataItem.count(sKey))
{
SAFE_DELETE(pNewDataItem)
pNewDataItem = m_apDataItem[sKey];
}
else m_apDataItem[sKey] = pNewDataItem;
if(papOutput) (*papOutput)[sKey] = pNewDataItem;
}
return aaReturn.size() ? GJ_OK : GJ_NO_DATA_FOUND;
}
// ****************************************************************
/* constructor */
gjAPI::gjInterFile::gjInterFile(gjAPI* pAPI, gjNetwork* pNetwork)noexcept
: m_pAPI (pAPI)
, m_pNetwork (pNetwork)
{
// reserve some memory
m_asFile.reserve(GJ_API_RESERVE_FILE);
}
// ****************************************************************
/* destructor */
gjAPI::gjInterFile::~gjInterFile()
{
this->ClearCache();
}
// ****************************************************************
/* delete all cached file paths */
void gjAPI::gjInterFile::ClearCache()
{
// clear container
m_asFile.clear();
}
// ****************************************************************
/* check for cached files */
int gjAPI::gjInterFile::__CheckCache(const std::string& sPath)
{
// compare cached file paths
for(size_t i = 0; i < m_asFile.size(); ++i)
{
if(sPath == m_asFile[i])
return GJ_OK;
}
return GJ_NO_DATA_FOUND;
}
// ****************************************************************
/* process downloaded file */
int gjAPI::gjInterFile::__Process(const std::string& sData, void* pAdd, std::string* psOutput)
{
// save path of the file
if(this->__CheckCache(sData) != GJ_OK) m_asFile.push_back(sData);
if(psOutput) (*psOutput) = sData;
return GJ_OK;
}
// ****************************************************************
/* constructor */
gjAPI::gjAPI(const int& iGameID, const std::string& sGamePrivateKey)noexcept
: m_iGameID (iGameID)
, m_sGamePrivateKey (sGamePrivateKey)
, m_sUserName ("")
, m_sUserToken ("")
, m_iNextPing (0)
, m_bActive (false)
, m_bConnected (false)
, m_sProcUserName ("")
, m_sProcUserToken ("")
{
// pre-process the game ID
m_sProcGameID = this->UtilIntToString(m_iGameID);
// create network object
m_pNetwork = new gjNetwork(this);
// create sub-interface objects
m_pInterUser = new gjInterUser(this, m_pNetwork);
m_pInterTrophy = new gjInterTrophy(this, m_pNetwork);
m_pInterScore = new gjInterScore(this, m_pNetwork);
m_pInterDataStoreGlobal = new gjInterDataStore(0, this, m_pNetwork);
m_pInterDataStoreUser = new gjInterDataStore(1, this, m_pNetwork);
m_pInterFile = new gjInterFile(this, m_pNetwork);
// prefetch score tables
if(GJ_API_PREFETCH) m_pInterScore->FetchScoreTablesCall(GJ_NETWORK_NULL_THIS(gjScoreTableMap));
// init error log
this->ErrorLogReset();
}
// ****************************************************************
/* destructor */
gjAPI::~gjAPI()
{
// logout last user
this->Logout();
// delete network object
SAFE_DELETE(m_pNetwork)
// delete sub-interface objects
SAFE_DELETE(m_pInterUser)
SAFE_DELETE(m_pInterTrophy)
SAFE_DELETE(m_pInterScore)
SAFE_DELETE(m_pInterDataStoreGlobal)
SAFE_DELETE(m_pInterDataStoreUser)
SAFE_DELETE(m_pInterFile)
// exit error log
this->ErrorLogReset();
}
// ****************************************************************
/* main update function of the library */
void gjAPI::Update()
{
// update network object
m_pNetwork->Update();
if(!this->IsConnected()) return;
if(m_iNextPing)
{
// update ping for the user session
const time_t iCurTime = time(NULL);
if(iCurTime >= m_iNextPing)
{
m_iNextPing = iCurTime + GJ_API_PING_TIME;
this->__PingSession(m_bActive);
}
}
}
// ****************************************************************
/* login with specific user */
int gjAPI::Login(const bool bSession, const std::string& sUserName, const std::string& sUserToken)
{
if(this->IsConnected()) return GJ_INVALID_CALL;
if(sUserName == "" || sUserToken == "") return GJ_INVALID_INPUT;
// authenticate user
std::string sCheck;
if(m_pNetwork->SendRequest("/users/auth/"
"?game_id=" + m_sProcGameID +
"&username=" + this->UtilEscapeString(sUserName) +
"&user_token=" + this->UtilEscapeString(sUserToken),
&sCheck, this, &gjAPI::Null, NULL, GJ_NETWORK_NULL_THIS(std::string))) return GJ_REQUEST_FAILED;
// check for success
gjDataList aaReturn;
if(this->ParseRequestKeypair(sCheck, &aaReturn) != GJ_OK)
{
this->ErrorLogAdd("API Error: could not authenticate user <" + sUserName + ">");
return GJ_REQUEST_FAILED;
}
// set main user data
m_sUserName = sUserName;
m_sUserToken = sUserToken;
m_sProcUserName = this->UtilEscapeString(m_sUserName);
m_sProcUserToken = this->UtilEscapeString(m_sUserToken);
// set connection
m_bConnected = true;
// open the user session
if(bSession) this->__OpenSession();
// prefetch user data
if(GJ_API_PREFETCH)
{
m_pInterUser->FetchUserCall(0, GJ_NETWORK_NULL_THIS(gjUserPtr));
m_pInterTrophy->FetchTrophiesCall(0, GJ_NETWORK_NULL_THIS(gjTrophyList));
m_pInterDataStoreUser->FetchDataItemsCall(GJ_NETWORK_NULL_THIS(gjDataItemMap));
}
return GJ_OK;
}
int gjAPI::Login(const bool bSession, std::string sCredPath)
{
// open credentials file
std::FILE* pFile = std::fopen(sCredPath.c_str(), "rb");
if(!pFile) return GJ_FILE_ERROR;
char acName[128], acToken[128];
char* pcEnd;
// get user name
std::fscanf(pFile, "%127[^\n]%*c", acName);
pcEnd = std::strchr(acName, 13);
if(pcEnd) *pcEnd = '\0';
// get user token
std::fscanf(pFile, "%127[^\n]%*c", acToken);
pcEnd = std::strchr(acToken, 13);
if(pcEnd) *pcEnd = '\0';
// close file and login
std::fclose(pFile);
return this->Login(bSession, acName, acToken);
}
// ****************************************************************
/* logout with specific user */
int gjAPI::Logout()
{
if(!this->IsConnected()) return GJ_NOT_CONNECTED;
// clear user specific data
m_pInterTrophy->ClearCache(false);
m_pInterDataStoreUser->ClearCache();
// close the user session
if(m_iNextPing) this->__CloseSession();
// clear main user data
m_sUserName = "";
m_sUserToken = "";
m_sProcUserName = "";
m_sProcUserToken = "";
// clear connection
m_bConnected = false;
return GJ_OK;
}
// ****************************************************************
/* parse a valid response string in keypair format */
int gjAPI::ParseRequestKeypair(const std::string& sInput, gjDataList* paaOutput)
{
if(!paaOutput) return GJ_INVALID_INPUT;
gjData aData;
std::istringstream sStream(sInput);
std::string sToken;
// traverse input string
while(std::getline(sStream, sToken))
{
// remove redundant newline characters safely and without C++11
if(sToken.empty()) continue;
while(*(sToken.end()-1) == 10 || *(sToken.end()-1) == 13) // .back()
{
sToken.erase(sToken.end()-1); // .pop_back()
if(sToken.empty()) break;
}
if(sToken.empty()) continue;
// separate key and value
const int iPos = sToken.find(':');
const std::string sKey = sToken.substr(0, iPos);
const std::string sValue = sToken.substr(iPos + 2, sToken.length() - iPos - 3);
// next data block on same key
if(aData.count(sKey.c_str()))
{
paaOutput->push_back(aData);
aData.clear();
}
// create key and save value
aData[sKey.c_str()] = sValue;
}
// insert last data block and check size
if(!aData.empty()) paaOutput->push_back(aData);
if(paaOutput->empty())
{
this->ErrorLogAdd("API Error: string parsing failed");
return GJ_INVALID_INPUT;
}
// check for failed request
if(paaOutput->front()["success"] != "true")
{
this->ErrorLogAdd("API Error: request was unsuccessful");
this->ErrorLogAdd("API Error: " + paaOutput->front()["message"]);
return GJ_REQUEST_FAILED;
}
return GJ_OK;
}
// ****************************************************************
/* parse a valid response string in Dump format */
int gjAPI::ParseRequestDump(const std::string& sInput, std::string* psOutput)
{
if(!psOutput) return GJ_INVALID_INPUT;
// read status
const std::string sStatus = sInput.substr(0, sInput.find_first_of(13));
// read data
*psOutput = sInput.substr(sStatus.length()+2);
// check for failed request
if(sStatus != "SUCCESS")
{
this->ErrorLogAdd("API Error: request was unsuccessful");
this->ErrorLogAdd("API Error: " + *psOutput);
return GJ_REQUEST_FAILED;
}
return GJ_OK;
}
// ****************************************************************
/* delete all cached objects */
void gjAPI::ClearCache()
{
// clear cache of all sub-interface
m_pInterUser->ClearCache();
m_pInterTrophy->ClearCache(true);
m_pInterScore->ClearCache();
m_pInterDataStoreGlobal->ClearCache();
m_pInterDataStoreUser->ClearCache();
m_pInterFile->ClearCache();
}
// ****************************************************************
/* escape a string for proper url calling */
std::string gjAPI::UtilEscapeString(const std::string& sString)
{
std::string sOutput = "";
// traverse input string
for(size_t i = 0; i < sString.length(); ++i)
{
// check the character type
if
(
(48 <= sString[i] && sString[i] <= 57) || // 0-9
(65 <= sString[i] && sString[i] <= 90) || // abc...xyz
(97 <= sString[i] && sString[i] <= 122) || // ABC...XYZ
(
sString[i] == '~' || sString[i] == '.' ||
sString[i] == '-' || sString[i] == '_'
)
)
{
// add valid character
sOutput += sString[i];
}
else
{
// convert character to hexadecimal value
sOutput += "%" + this->UtilCharToHex(sString[i]);
}
}
return sOutput;
}
// ****************************************************************
/* convert a character into his hexadecimal value */
std::string gjAPI::UtilCharToHex(const char& cChar)
{
int iValue = (int)cChar;
if(iValue < 0) iValue += 256;
char acBuffer[8];
std::sprintf(acBuffer, "%02X", iValue);
return acBuffer;
}
// ****************************************************************
/* simply convert an integer into a string */
std::string gjAPI::UtilIntToString(const int& iInt)
{
char acBuffer[32];
std::sprintf(acBuffer, "%d", iInt);
return acBuffer;
}
// ****************************************************************
/* create a folder hierarchy */
void gjAPI::UtilCreateFolder(const std::string& sFolder)
{
int iPos = 0;
do
{
// get next subfolder
iPos = sFolder.find_first_of("/\\", iPos+2);
const std::string sSubFolder = sFolder.substr(0, iPos);
// create subfolder
#if defined(_GJ_WINDOWS_)
CreateDirectoryA(sSubFolder.c_str(), NULL);
#else
mkdir(sSubFolder.c_str(), S_IRWXU);
#endif
}
while(iPos >= 0);
}
// ****************************************************************
/* get timestamp as string */
std::string gjAPI::UtilTimestamp(const time_t iTime)
{
// format the time value
tm* pFormat = std::localtime(&iTime);
// create output
char acBuffer[16];
std::sprintf(acBuffer, "%02d:%02d:%02d", pFormat->tm_hour, pFormat->tm_min, pFormat->tm_sec);
return acBuffer;
}
// ****************************************************************
/* reset error log */
void gjAPI::ErrorLogReset()
{
if(GJ_API_LOGFILE)
{
// remove error log file if empty
if(m_asLog.empty())
std::remove(GJ_API_LOGFILE_NAME);
}
// clear all log entries
m_asLog.clear();
}
// ****************************************************************
/* add error log entry */
void gjAPI::ErrorLogAdd(const std::string& sMsg)
{
const std::string sTimeMsg = "[" + this->UtilTimestamp() + "] " + sMsg;
// add message
m_asLog.push_back(sTimeMsg);
if(GJ_API_LOGFILE)
{
// add message to error log file
std::FILE* pFile = std::fopen(GJ_API_LOGFILE_NAME, "a");
if(pFile)
{
std::fprintf(pFile, "%s\n", sTimeMsg.c_str());
std::fclose(pFile);
}
}
#if defined(_GJ_DEBUG_)
// print message to terminal
std::cerr << "(!GJ) " << sTimeMsg << std::endl;
#endif
}
// ****************************************************************
/* open the user session */
int gjAPI::__OpenSession()
{
if(!this->IsConnected()) return GJ_NOT_CONNECTED;
// send non-blocking open request
if(m_pNetwork->SendRequest("/sessions/open/"
"?game_id=" + m_sProcGameID +
"&username=" + m_sProcUserName +
"&user_token=" + m_sProcUserToken,
NULL, this, &gjAPI::Null, NULL, GJ_NETWORK_NULL_THIS(std::string))) return GJ_REQUEST_FAILED;
// init session attributes
m_iNextPing = std::time(NULL) + GJ_API_PING_TIME;
m_bActive = true;
return GJ_OK;
}
// ****************************************************************
/* ping the user session */
int gjAPI::__PingSession(const bool& bActive)
{
if(!this->IsConnected()) return GJ_NOT_CONNECTED;
// use active status
const std::string sActive = bActive ? "active" : "idle";
// send non-blocking ping request
if(m_pNetwork->SendRequest("/sessions/ping/"
"?game_id=" + m_sProcGameID +
"&username=" + m_sProcUserName +
"&user_token=" + m_sProcUserToken +
"&status=" + sActive,
NULL, this, &gjAPI::Null, NULL, GJ_NETWORK_NULL_THIS(std::string))) return GJ_REQUEST_FAILED;
return GJ_OK;
}
// ****************************************************************
/* close the user session */
int gjAPI::__CloseSession()
{
if(!this->IsConnected()) return GJ_NOT_CONNECTED;
// send non-blocking close request
if(m_pNetwork->SendRequest("/sessions/close/"
"?game_id=" + m_sProcGameID +
"&username=" + m_sProcUserName +
"&user_token=" + m_sProcUserToken,
NULL, this, &gjAPI::Null, NULL, GJ_NETWORK_NULL_THIS(std::string))) return GJ_REQUEST_FAILED;
// clear session attributes
m_iNextPing = 0;
return GJ_OK;
}
| 28.172297 | 131 | 0.536575 | Sasurai |
69cdb8f40a274b41ceea595d55c8979ef8edd28f | 1,272 | cpp | C++ | src/Logger.cpp | cbaron3/chip8-emulator | b218fa40c03d950713d41f32ca08b709a69bcc84 | [
"MIT"
] | null | null | null | src/Logger.cpp | cbaron3/chip8-emulator | b218fa40c03d950713d41f32ca08b709a69bcc84 | [
"MIT"
] | 10 | 2019-02-04T17:00:20.000Z | 2019-05-31T01:44:39.000Z | src/Logger.cpp | cbaron3/chip8-emulator | b218fa40c03d950713d41f32ca08b709a69bcc84 | [
"MIT"
] | null | null | null | // Project includes
#include "../include/Logger.h"
// C++ includes
#include <iostream>
namespace util{
// Initial value of static object
Logger* Logger::m_logger = NULL;
// Singleton instance function
Logger* Logger::get_instance( void )
{
if(m_logger == NULL)
{
m_logger = new Logger();
}
return m_logger;
}
// Destructor
Logger::~Logger( void )
{
delete m_logger;
}
// Log message based on severity level
void Logger::log( LOG_LEVEL level, std::string msg ) const
{
// Only execute log if input level is greater than or equal to max level
if( level >= static_cast<LOG_LEVEL>( max_debug ) )
{
switch (level)
{
case LOG_LEVEL::DEBUG:
{
std::cout << "Debug Message: " << msg << std::endl;
} break;
case LOG_LEVEL::ERROR:
{
std::cout << "***ERROR*** Message: " << msg << std::endl;
} break;
case LOG_LEVEL::NONE:
default:
{
// Do nothing
} break;
}
}
}
// Set max log level
void Logger::set_max_log_level(LOG_LEVEL level)
{
max_debug = static_cast<int>(level);
}
// Helper function outside class to wrap singleton call
void LOG(Logger::LOG_LEVEL level, std::string msg)
{
Logger::get_instance()->log(level, msg);
}
} // End of namespace util | 19.272727 | 74 | 0.624214 | cbaron3 |
69d077a4ee3c776e43f12161838888d2b98d6c3c | 4,160 | tpp | C++ | signal-slot-benchmarks/benchmark/lib/iscool/include/iscool/signals/detail/relay.tpp | qubka/signals | 6bd39c662ab2b1e0caafc5a4c4510a74fb9f9e1c | [
"MIT"
] | 181 | 2020-01-17T13:49:59.000Z | 2022-03-17T03:23:12.000Z | signal-slot-benchmarks/benchmark/lib/iscool/include/iscool/signals/detail/relay.tpp | qubka/signals | 6bd39c662ab2b1e0caafc5a4c4510a74fb9f9e1c | [
"MIT"
] | 22 | 2020-01-16T23:37:02.000Z | 2021-09-08T23:51:12.000Z | signal-slot-benchmarks/benchmark/lib/iscool/include/iscool/signals/detail/relay.tpp | qubka/signals | 6bd39c662ab2b1e0caafc5a4c4510a74fb9f9e1c | [
"MIT"
] | 16 | 2020-01-28T15:40:18.000Z | 2022-02-25T08:32:15.000Z | /*
Copyright 2018-present IsCool Entertainment
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 ISCOOL_SIGNALS_RELAY_TPP
#define ISCOOL_SIGNALS_RELAY_TPP
#include <boost/bind.hpp>
#include <boost/preprocessor/iteration/local.hpp>
#include <cassert>
namespace iscool
{
namespace signals
{
namespace detail
{
template< typename Signature >
struct signal_binder;
template< typename R, typename... T >
struct signal_binder< R( T... ) >
{
typedef iscool::signals::signal< R( T... ) > signal_type;
typedef
typename signal_type::slot_function_type slot_function_type;
static slot_function_type bind( const signal_type& signal );
};
template< std::size_t N, typename R, typename... T >
struct signal_binder_n;
template< typename Signature >
struct signal_invoker;
template< typename R, typename... T >
struct signal_invoker< R ( T... ) >
{
typedef iscool::signals::signal< R( T... ) > signal_type;
static R invoke( const signal_type* signal, T... arguments );
};
template< typename ...T >
struct signal_invoker< void( T... ) >
{
typedef iscool::signals::signal<void( T... )> signal_type;
static void invoke( const signal_type* signal, T... arguments );
};
}
}
}
template< typename Signature >
typename iscool::signals::signal< Signature >::slot_function_type
iscool::signals::relay( const signal< Signature >& s )
{
return detail::signal_binder<Signature>::bind( s );
}
template< typename R, typename ...T >
typename
iscool::signals::detail::signal_binder< R( T... ) >::slot_function_type
iscool::signals::detail::signal_binder<R( T... )>::bind
( const signal_type& signal )
{
constexpr std::size_t size = sizeof...(T);
return signal_binder_n< size, R, T... >::bind( signal );
}
#define SIGNAL_BINDER_PLACEHOLDER( UNUSED1, N, DATA ) \
BOOST_PP_CAT( DATA, BOOST_PP_INC( N ) )
#define SIGNAL_BINDER_BINDN( N ) \
template< typename R, typename ...T > \
struct signal_binder_n< N, R, T... > \
{ \
typedef iscool::signals::signal<R( T... )> signal_type; \
typedef typename signal_type::slot_function_type slot_function_type; \
static slot_function_type bind( const signal_type& signal ) \
{ \
return boost::bind<R> \
( &detail::signal_invoker<R( T... )>::invoke, &signal \
BOOST_PP_COMMA_IF( N ) \
BOOST_PP_ENUM( N, SIGNAL_BINDER_PLACEHOLDER, _ ) \
); \
} \
};
#define BOOST_PP_LOCAL_MACRO( N ) SIGNAL_BINDER_BINDN( N )
#define BOOST_PP_LOCAL_LIMITS (0, 8)
namespace iscool
{
namespace signals
{
namespace detail
{
#include BOOST_PP_LOCAL_ITERATE()
}
}
}
#undef SIGNAL_BINDER_PLACEHOLDER
#undef SIGNAL_BINDER_BINDN
#undef BOOST_PP_LOCAL_MACRO
#undef BOOST_PP_LOCAL_LIMITS
template< typename R, typename...T >
R iscool::signals::detail::signal_invoker< R( T... ) >::invoke
( const signal_type* signal, T... arguments )
{
assert( signal );
return *( signal->operator() ( arguments... ) );
};
template< typename ...T >
void iscool::signals::detail::signal_invoker< void( T... ) >::invoke
( const signal_type* signal, T... arguments )
{
assert( signal );
signal->operator() ( arguments... );
};
#endif
| 30.144928 | 80 | 0.613702 | qubka |
69d6b6c5973d7684a866996ab5ab2c47545fc681 | 2,195 | hpp | C++ | src/VirtWebPage.hpp | taleroangel/ProxyServer | be1433be7b332a9d901964087591c5908450733a | [
"Apache-2.0"
] | 1 | 2022-03-07T02:43:05.000Z | 2022-03-07T02:43:05.000Z | src/VirtWebPage.hpp | taleroangel/ProxyServer | be1433be7b332a9d901964087591c5908450733a | [
"Apache-2.0"
] | null | null | null | src/VirtWebPage.hpp | taleroangel/ProxyServer | be1433be7b332a9d901964087591c5908450733a | [
"Apache-2.0"
] | null | null | null | /**
* @file Server.hpp
* @author Angel D. Talero ([email protected])
* @brief Clase encargada de manejar los sitios web virtuales
*
* @copyright Copyright (c) 2021. All rights reserved.
* 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.
*/
#ifndef _VIRTWEBPAGE_HPP_
#define _VIRTWEBPAGE_HPP_
#include <string>
#include <vector>
class VirtWebPage
{
/* ---- Typedefs privados ---- */
private:
/**
* @struct entry
* @brief Estructura de entradas
*/
struct entry
{
std::string input; /*< URL enviada por el navegador*/
std::string output; /*< URL equivalente*/
};
/* ---- Variables privadas ---- */
private:
std::vector<entry> entries; /*< Todas las entradas*/
/* ---- Constructores ---- */
public:
/**
* @brief Crear entradas de página web virtuales
*
* @param filename Nombre de archivo a leer
*/
explicit VirtWebPage(std::string filename) noexcept(false);
/**
* @brief Destruir las entradas de páginas web virtuales
*
*/
~VirtWebPage();
/* ---- Métodos públicos ---- */
public:
/**
* @brief Obtener la pagina web virtual
*
* @param url URL que mandó el navegador
* @throw AddressException La dirección que se solicitó no existe
*
* @return std::string URL real
*/
std::string getVirtualPage(std::string url) noexcept(false);
};
#endif //_VIRTWEBPAGE_HPP_ | 28.506494 | 69 | 0.663781 | taleroangel |
69d795cc6a368819e3a9697657a3c8dccfaef222 | 14,833 | cpp | C++ | src/jitcat/ExpressionBase.cpp | mvhooren/JitCat | 8e05b51c5feda8fa9258ba443854b23c4ad8bf7c | [
"MIT"
] | 14 | 2019-03-16T07:00:44.000Z | 2021-10-20T23:36:51.000Z | src/jitcat/ExpressionBase.cpp | mvhooren/JitCat | 8e05b51c5feda8fa9258ba443854b23c4ad8bf7c | [
"MIT"
] | 13 | 2019-11-22T12:43:55.000Z | 2020-05-25T13:09:08.000Z | src/jitcat/ExpressionBase.cpp | mvhooren/JitCat | 8e05b51c5feda8fa9258ba443854b23c4ad8bf7c | [
"MIT"
] | 1 | 2019-11-23T17:59:58.000Z | 2019-11-23T17:59:58.000Z | /*
This file is part of the JitCat library.
Copyright (C) Machiel van Hooren 2018
Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
*/
#include "jitcat/ExpressionBase.h"
#include "jitcat/CatArgumentList.h"
#include "jitcat/CatAssignableExpression.h"
#include "jitcat/CatBuiltInFunctionCall.h"
#include "jitcat/CatIndirectionConversion.h"
#include "jitcat/CatPrefixOperator.h"
#include "jitcat/CatRuntimeContext.h"
#include "jitcat/CatTypedExpression.h"
#include "jitcat/Configuration.h"
#include "jitcat/ExpressionErrorManager.h"
#include "jitcat/ExpressionHelperFunctions.h"
#include "jitcat/Document.h"
#include "jitcat/JitCat.h"
#ifdef ENABLE_LLVM
#include "jitcat/LLVMCodeGenerator.h"
#include "jitcat/LLVMCompileTimeContext.h"
#include "jitcat/LLVMJit.h"
#endif
#include "jitcat/PrecompilationContext.h"
#include "jitcat/SLRParseResult.h"
#include "jitcat/Tools.h"
#include "jitcat/TypeRegistry.h"
#include <cassert>
using namespace jitcat;
using namespace jitcat::AST;
using namespace jitcat::LLVM;
using namespace jitcat::Parser;
using namespace jitcat::Reflection;
using namespace jitcat::Tokenizer;
ExpressionBase::ExpressionBase(bool expectAssignable):
expressionIsLiteral(false),
isConstant(false),
expectAssignable(expectAssignable)
{
}
ExpressionBase::ExpressionBase(const char* expression, bool expectAssignable):
expression(expression),
expressionIsLiteral(false),
isConstant(false),
expectAssignable(expectAssignable)
{
}
ExpressionBase::ExpressionBase(const std::string& expression, bool expectAssignable):
expression(expression),
expressionIsLiteral(false),
isConstant(false),
expectAssignable(expectAssignable)
{
}
ExpressionBase::ExpressionBase(CatRuntimeContext* compileContext, const std::string& expression, bool expectAssignable):
expression(expression),
expressionIsLiteral(false),
isConstant(false),
expectAssignable(expectAssignable)
{
}
ExpressionBase::~ExpressionBase()
{
if (errorManagerHandle.getIsValid())
{
reinterpret_cast<ExpressionErrorManager*>(errorManagerHandle.get())->errorSourceDeleted(this);
}
}
void ExpressionBase::setExpression(const std::string& expression_, CatRuntimeContext* compileContext)
{
if (expression != expression_)
{
expression = expression_;
if (compileContext != nullptr)
{
compile(compileContext);
}
else
{
valueType = CatGenericType::unknownType;
parseResult.clear();
isConstant = false;
expressionIsLiteral = false;
}
}
}
const std::string& ExpressionBase::getExpression() const
{
return expression;
}
bool ExpressionBase::isLiteral() const
{
return expressionIsLiteral;
}
bool ExpressionBase::isConst() const
{
return isConstant;
}
bool ExpressionBase::hasError() const
{
return !(parseResult.success);
}
const CatGenericType& ExpressionBase::getType() const
{
return valueType;
}
bool ExpressionBase::parse(CatRuntimeContext* context, ExpressionErrorManager* errorManager, void* errorContext, const CatGenericType& expectedType)
{
if (context == nullptr)
{
context = &CatRuntimeContext::getDefaultContext();
context->getErrorManager()->clear();
}
//If this expressions is compiled multiple times, we need to clear any errors that were previously generated.
if (errorManagerHandle.getIsValid())
{
reinterpret_cast<ExpressionErrorManager*>(errorManagerHandle.get())->errorSourceDeleted(this);
}
errorManagerHandle.setReflectable(reinterpret_cast<unsigned char*>(errorManager), TypeRegistry::get()->registerType<ExpressionErrorManager>());
isConstant = false;
expressionIsLiteral = false;
Document document(expression.c_str(), expression.length());
context->getErrorManager()->setCurrentDocument(&document);
parseResult = JitCat::get()->parseExpression(&document, context, errorManager, errorContext);
if (parseResult.success)
{
typeCheck(expectedType, context, errorManager, errorContext);
if (parseResult.success)
{
constCollapse(context, errorManager, errorContext);
}
}
handleParseErrors(context);
//typeCheck may have changed parseResult.success
if (parseResult.success && !isConstant)
{
compileToNativeCode(context, expectedType);
}
if (!parseResult.success)
{
parseResult.astRootNode.reset(nullptr);
}
context->getErrorManager()->setCurrentDocument(nullptr);
return parseResult.success;
}
void ExpressionBase::discardAST()
{
parseResult.astRootNode = nullptr;
}
void ExpressionBase::constCollapse(CatRuntimeContext* context, ExpressionErrorManager* errorManager, void* errorContext)
{
CatTypedExpression* newExpression = static_cast<CatTypedExpression*>(parseResult.getNode<CatTypedExpression>()->constCollapse(context, errorManager, errorContext));
if (newExpression != parseResult.astRootNode.get())
{
parseResult.astRootNode.reset(newExpression);
}
//Const collapse may have changed the expression from a non-constant to a constant.
//For example, in an expression like 0.0 * aVariable
if (parseResult.success)
{
isConstant = parseResult.getNode<CatTypedExpression>()->isConst();
}
}
void ExpressionBase::typeCheck(const CatGenericType& expectedType, CatRuntimeContext* context, ExpressionErrorManager* errorManager, void* errorContext)
{
if (!parseResult.getNode<CatTypedExpression>()->typeCheck(context, errorManager, errorContext))
{
parseResult.success = false;
}
else
{
calculateLiteralStatus();
valueType = parseResult.getNode<CatTypedExpression>()->getType();
Lexeme expressionLexeme = parseResult.getNode<CatTypedExpression>()->getLexeme();
if (!expectedType.isUnknown())
{
IndirectionConversionMode mode = expectedType.getIndirectionConversion(valueType);
if (isValidConversionMode(mode))
{
if (mode == IndirectionConversionMode::AddressOfPointer
|| mode == IndirectionConversionMode::AddressOfValue)
{
parseResult.success = false;
errorManager->compiledWithError(std::string(Tools::append("Expression results in a value with a level of indirection that cannot be automatically converted. Trying to convert from ", valueType.toString(), " to ", expectedType.toString(), ".")), errorContext, context->getContextName(), expressionLexeme);
return;
}
else if (mode != IndirectionConversionMode::None)
{
//Create an AST node that handles the indirection conversion
std::unique_ptr<CatTypedExpression> previousNode(parseResult.releaseNode<CatTypedExpression>());
parseResult.astRootNode = std::make_unique<CatIndirectionConversion>(expressionLexeme, expectedType, mode, std::move(previousNode));
parseResult.getNode<CatTypedExpression>()->typeCheck(context, errorManager, errorContext);
valueType = parseResult.getNode<CatTypedExpression>()->getType();
}
}
else if (mode != IndirectionConversionMode::ErrorTypeMismatch)
{
parseResult.success = false;
switch (mode)
{
case IndirectionConversionMode::ErrorNotCopyConstructible: errorManager->compiledWithError(std::string(Tools::append("Expression result is not copy constructible.")), errorContext, context->getContextName(), expressionLexeme); return;
case IndirectionConversionMode::ErrorTooMuchIndirection: errorManager->compiledWithError(std::string(Tools::append("Expression has too much indirection.")), errorContext, context->getContextName(), expressionLexeme); return;
default: assert(isValidConversionMode(mode)); break;
}
}
if (expectAssignable && !parseResult.getNode<CatAssignableExpression>()->getAssignableType().isAssignableType())
{
parseResult.success = false;
errorManager->compiledWithError(std::string(Tools::append("Expression result is read only. Expected a writable ", expectedType.toString(), ".")), errorContext, context->getContextName(), expressionLexeme);
}
if (expectedType.isPointerToReflectableObjectType() || expectedType.isReflectableHandleType())
{
const std::string typeName = expectedType.getPointeeType()->getObjectTypeName();
if (!valueType.isPointerToReflectableObjectType() && !valueType.isReflectableHandleType())
{
parseResult.success = false;
errorManager->compiledWithError(Tools::append("Expected a ", expectedType.toString(), " got a ", valueType.toString()), errorContext, context->getContextName(), expressionLexeme);
}
else if (valueType.getPointeeType()->getObjectTypeName() != typeName)
{
parseResult.success = false;
errorManager->compiledWithError(Tools::append("Expected a ", typeName, ", got a ", valueType.getPointeeType()->getObjectTypeName()), errorContext, context->getContextName(), expressionLexeme);
}
}
else if (expectedType.isVoidType() && valueType.isVoidType())
{
parseResult.success = true;
}
else if (!expectAssignable && !valueType.compare(expectedType, true, true))
{
if (expectedType.isVoidType())
{
//Insert an automatic type conversion to void.
CatArgumentList* arguments = new CatArgumentList(expressionLexeme, std::vector<CatTypedExpression*>({parseResult.releaseNode<CatTypedExpression>()}));
parseResult.astRootNode = std::make_unique<CatBuiltInFunctionCall>("toVoid", expressionLexeme, arguments, expressionLexeme);
parseResult.getNode<CatTypedExpression>()->typeCheck(context, errorManager, errorContext);
valueType = parseResult.getNode<CatTypedExpression>()->getType();
}
else if (expectedType.isScalarType() && valueType.isScalarType())
{
//Insert an automatic type conversion if the scalar types do not match.
CatArgumentList* arguments = new CatArgumentList(expressionLexeme, std::vector<CatTypedExpression*>({ parseResult.releaseNode<CatTypedExpression>() }));
if (expectedType.isFloatType())
{
parseResult.astRootNode = std::make_unique<CatBuiltInFunctionCall>("toFloat", expressionLexeme, arguments, expressionLexeme);
parseResult.getNode<CatTypedExpression>()->typeCheck(context, errorManager, errorContext);
}
else if (expectedType.isDoubleType())
{
parseResult.astRootNode = std::make_unique<CatBuiltInFunctionCall>("toDouble", expressionLexeme, arguments, expressionLexeme);
parseResult.getNode<CatTypedExpression>()->typeCheck(context, errorManager, errorContext);
}
else if (expectedType.isIntType())
{
parseResult.astRootNode = std::make_unique<CatBuiltInFunctionCall>("toInt", expressionLexeme, arguments, expressionLexeme);
parseResult.getNode<CatTypedExpression>()->typeCheck(context, errorManager, errorContext);
}
else
{
assert(false); //Missing a conversion here?
}
valueType = parseResult.getNode<CatTypedExpression>()->getType();
}
else
{
parseResult.success = false;
errorManager->compiledWithError(std::string(Tools::append("Expected a ", expectedType.toString(), " got a ", valueType.toString(), ".")), errorContext, context->getContextName(), expressionLexeme);
}
}
}
else if (expectAssignable &&
!parseResult.getNode<CatTypedExpression>()->isAssignable())
{
parseResult.success = false;
errorManager->compiledWithError("Expression result is read only. Expected a writable value.", errorContext, context->getContextName(), expressionLexeme);
}
if (parseResult.success)
{
isConstant = parseResult.getNode<CatTypedExpression>()->isConst();
}
}
}
void ExpressionBase::handleParseErrors(CatRuntimeContext* context)
{
if (!parseResult.success)
{
expressionIsLiteral = false;
isConstant = false;
valueType = CatGenericType::unknownType;
}
else
{
context->getErrorManager()->compiledWithoutErrors(this);
}
}
void ExpressionBase::compileToNativeCode(CatRuntimeContext* context, const CatGenericType& expectedType)
{
if (!isConstant)
{
if (JitCat::get()->getHasPrecompiledExpression())
{
//Can't use precompiled expressions if there is a precompilation context
//because the expression would not be pre-compiled.
if (context->getPrecompilationContext() == nullptr)
{
//Lookup the symbol for the expression by its unique name.
uintptr_t symbolAddress = JitCat::get()->getPrecompiledSymbol(ExpressionHelperFunctions::getUniqueExpressionFunctionName(expression, context, expectAssignable, expectedType));
if (symbolAddress != 0 || !Configuration::enableLLVM)
{
//Expressions are expected to handle the case where symbolAddress == 0 and llvm is not available to JIT-compile the function.
handleCompiledFunction(symbolAddress);
if (symbolAddress != 0 && JitCat::get()->getDiscardASTAfterNativeCodeCompilation())
{
discardAST();
}
return;
}
}
}
#ifdef ENABLE_LLVM
LLVMCompileTimeContext llvmCompileContext(context, LLVM::LLVMJit::get().getJitTargetConfig(), false);
llvmCompileContext.options.enableDereferenceNullChecks = true;
intptr_t functionAddress = 0;
codeGenerator = context->getCodeGenerator();
if (!expectAssignable)
{
functionAddress = codeGenerator->generateAndGetFunctionAddress(parseResult.getNode<CatTypedExpression>(), expression, expectedType, &llvmCompileContext, expectedType.isValidType());
if (context->getPrecompilationContext() != nullptr)
{
context->getPrecompilationContext()->precompileExpression(parseResult.getNode<CatTypedExpression>(), expression, expectedType, context);
}
}
else if (parseResult.getNode<CatTypedExpression>()->isAssignable())
{
functionAddress = codeGenerator->generateAndGetAssignFunctionAddress(parseResult.getNode<CatAssignableExpression>(), expression, expectedType, &llvmCompileContext);
if (context->getPrecompilationContext() != nullptr)
{
context->getPrecompilationContext()->precompileAssignmentExpression(parseResult.getNode<CatAssignableExpression>(), expression, expectedType, context);
}
}
if (functionAddress != 0)
{
handleCompiledFunction(functionAddress);
if (JitCat::get()->getDiscardASTAfterNativeCodeCompilation())
{
discardAST();
}
}
else
{
assert(false);
}
#endif //ENABLE_LLVM
}
}
void jitcat::ExpressionBase::calculateLiteralStatus()
{
expressionIsLiteral = false;
if (parseResult.success)
{
if (parseResult.getNode<CatTypedExpression>()->getNodeType() == CatASTNodeType::Literal)
{
expressionIsLiteral = true;
}
else if (parseResult.getNode<CatTypedExpression>()->getNodeType() == CatASTNodeType::PrefixOperator)
{
//If the expression is a minus prefix operator combined with a literal, then we need to count the whole expression as a literal.
CatPrefixOperator* prefixOp = parseResult.getNode<CatPrefixOperator>();
if (prefixOp->getRHS() != nullptr
&& prefixOp->getOperator() == CatPrefixOperator::Operator::Minus
&& prefixOp->getRHS()->getNodeType() == CatASTNodeType::Literal)
{
expressionIsLiteral = true;
}
}
}
}
| 34.656542 | 309 | 0.750826 | mvhooren |
69df1ad7d8614d697c0432d2810ec8b3c2393d6b | 1,172 | cpp | C++ | official sample codes/GenIRanger/private/DatAndXmlFiles.cpp | novitec/ranger3 | 5ba831c2ddd500685f5e3940ab725c005c975c1c | [
"MIT"
] | null | null | null | official sample codes/GenIRanger/private/DatAndXmlFiles.cpp | novitec/ranger3 | 5ba831c2ddd500685f5e3940ab725c005c975c1c | [
"MIT"
] | null | null | null | official sample codes/GenIRanger/private/DatAndXmlFiles.cpp | novitec/ranger3 | 5ba831c2ddd500685f5e3940ab725c005c975c1c | [
"MIT"
] | 1 | 2020-03-25T04:49:40.000Z | 2020-03-25T04:49:40.000Z | // Copyright 2018 SICK AG. All rights reserved.
#include "DatAndXmlFiles.h"
namespace GenIRanger {
DatAndXmlFiles::DatAndXmlFiles(std::string filePathWithNoEnding)
: mDataStream(filePathWithNoEnding + ".dat", openMode)
, mXmlStream(filePathWithNoEnding + ".xml", openMode)
{
mDataStream.exceptions(std::ios::failbit | std::ios::badbit);
mXmlStream.exceptions(std::ios::failbit | std::ios::badbit);
}
DatAndXmlFiles::~DatAndXmlFiles()
{
mDataStream.close();
mXmlStream.close();
}
void DatAndXmlFiles::writeData(ComponentPtr& component)
{
writeData(component->data().data(), component->data().size());
}
void DatAndXmlFiles::writeMarkData(LineMetadataPtr encoderValues)
{
const Metadata notUsed = 0;
for (auto encoderValue : *encoderValues)
{
writeSingleMarkValue(encoderValue);
writeSingleMarkValue(notUsed);
writeSingleMarkValue(notUsed);
writeSingleMarkValue(notUsed);
writeSingleMarkValue(notUsed);
}
}
void DatAndXmlFiles::writeSingleMarkValue(const Metadata value)
{
writeData(reinterpret_cast<const uint8_t*>(&value), sizeof(Metadata));
}
void DatAndXmlFiles::writeXml(std::string& xml)
{
mXmlStream << xml;
}
}
| 23.44 | 72 | 0.744881 | novitec |
69dfaaecaff7c2aa2914a68e33bc8a59d61cc116 | 388 | cpp | C++ | chai.cpp | faede/Daily | 45d2cbdca9a63c956df066fb596317ae4a6137b3 | [
"MIT"
] | null | null | null | chai.cpp | faede/Daily | 45d2cbdca9a63c956df066fb596317ae4a6137b3 | [
"MIT"
] | null | null | null | chai.cpp | faede/Daily | 45d2cbdca9a63c956df066fb596317ae4a6137b3 | [
"MIT"
] | null | null | null | #include <iostream>
using namespace std;
int a[20];
void chai(int n,int pos,int temp_sum,int last){
if(temp_sum == n){
cout<<n<<"=";
cout<<a[1];
for(int i = 2; i < pos ; ++i){
cout<<"+"<<a[i];
}
cout<<endl;
return;
}
for(int i = last; i != n && i <= n - temp_sum ; ++i){
a[pos] = i;
chai(n,pos+1,temp_sum + i,i);
}
}
int main(){
int n;
cin>>n;
chai(n,1,0,1);
}
| 15.52 | 54 | 0.515464 | faede |
69e434b50feeab8f249da755c6ef7022179f84bd | 354 | cpp | C++ | knapsack/main.cpp | ryanmcdermott/katas | d23b8c131f03e4df0a3a5268de4b63c5b35058a1 | [
"MIT"
] | 46 | 2017-06-26T15:09:10.000Z | 2022-03-19T04:21:32.000Z | knapsack/main.cpp | ryanmcdermott/katas | d23b8c131f03e4df0a3a5268de4b63c5b35058a1 | [
"MIT"
] | null | null | null | knapsack/main.cpp | ryanmcdermott/katas | d23b8c131f03e4df0a3a5268de4b63c5b35058a1 | [
"MIT"
] | 13 | 2017-10-18T05:30:18.000Z | 2021-10-04T22:46:35.000Z | #include "./knapsack.hpp"
#include <assert.h>
#include <iostream>
using std::cout;
int main() {
int values[] = {60, 100, 120};
int weights[] = {10, 20, 30};
int max_weight = 50;
int item_count = sizeof(values) / sizeof(values[0]);
int result = knapsack(max_weight, weights, values, item_count);
assert(result == 220);
cout << result;
}
| 19.666667 | 65 | 0.641243 | ryanmcdermott |
69e4f5d578fc88afbea1e11cfa1cbbd196cd3345 | 4,943 | cpp | C++ | Library/Source/Nano/Time/NTimeUtils.cpp | refnum/Nano | dceb0907061f7845d8a3c662f309ca164e932e6f | [
"BSD-3-Clause"
] | 23 | 2019-11-12T09:31:11.000Z | 2021-09-13T08:59:37.000Z | Library/Source/Nano/Time/NTimeUtils.cpp | refnum/nano | dceb0907061f7845d8a3c662f309ca164e932e6f | [
"BSD-3-Clause"
] | 1 | 2020-10-30T09:54:12.000Z | 2020-10-30T09:54:12.000Z | Library/Source/Nano/Time/NTimeUtils.cpp | refnum/Nano | dceb0907061f7845d8a3c662f309ca164e932e6f | [
"BSD-3-Clause"
] | 3 | 2015-09-08T11:00:02.000Z | 2017-09-11T05:42:30.000Z | /* NAME:
NTimeUtils.cpp
DESCRIPTION:
Time utilities.
COPYRIGHT:
Copyright (c) 2006-2021, refNum Software
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 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.
___________________________________________________________________________
*/
//=============================================================================
// Includes
//-----------------------------------------------------------------------------
#include "NTimeUtils.h"
// Nano
#include "NPOSIX.h"
#include "NanoConstants.h"
// System
#include <math.h>
//=============================================================================
// NTimeUtils::GetAbsolute : Get an absolute time.
//-----------------------------------------------------------------------------
NTime NTimeUtils::GetAbsolute(NInterval theInterval)
{
// Validate our parameters
NN_REQUIRE(theInterval == kNTimeForever || theInterval >= 0.0);
// Get the absolute time
if (theInterval == kNTimeForever)
{
theInterval = kNTimeDistantFuture;
}
return NTimeUtils::GetTime() + theInterval;
}
//=============================================================================
// NTimeUtils::IsAfter : Check the current time.
//-----------------------------------------------------------------------------
bool NTimeUtils::IsAfter(NTime theTime)
{
// Check the time
return NTimeUtils::GetTime() >= theTime;
}
//=============================================================================
// NTimeUtils::ToTimespec : Convert to a timespec.
//-----------------------------------------------------------------------------
struct timespec NTimeUtils::ToTimespec(NInterval theInterval)
{
// Convert the value
NInterval timeSecs = floor(theInterval);
NInterval timeFrac = theInterval - timeSecs;
return {time_t(timeSecs), long(timeFrac / kNTimeNanosecond)};
}
//=============================================================================
// NTimeUtils::ToTmUTC : Convert to a tm in UTC.
//-----------------------------------------------------------------------------
struct tm NTimeUtils::ToTmUTC(NTime theTime)
{
// Convert the value
time_t timeUnix = time_t(theTime + kNanoEpochTo1970);
return NPOSIX::gmtime(timeUnix);
}
//=============================================================================
// NTimeUtils::ToTmLocal : Convert to a tm in local time.
//-----------------------------------------------------------------------------
struct tm NTimeUtils::ToTmLocal(NTime theTime)
{
// Convert the value
time_t timeUnix = time_t(theTime + kNanoEpochTo1970);
return NPOSIX::localtime(timeUnix);
}
//=============================================================================
// NTimeUtils::ToInterval : Convert to an NInterval.
//-----------------------------------------------------------------------------
NInterval NTimeUtils::ToInterval(const struct timespec& timeSpec)
{
// Convert the value
NInterval timeSecs = NInterval(timeSpec.tv_sec);
NInterval timeFrac = NInterval(timeSpec.tv_nsec) * kNTimeNanosecond;
return timeSecs + timeFrac;
}
//=============================================================================
// NTimeUtils::ToTime : Convert a tm in UTC to an NTime.
//-----------------------------------------------------------------------------
NTime NTimeUtils::ToTime(const struct tm& timeUTC)
{
// Convert the value
struct tm localCopy(timeUTC);
time_t timeUnix = mktime(&localCopy);
return NTime(NInterval(timeUnix), kNanoEpochFrom1970);
}
| 28.738372 | 79 | 0.560388 | refnum |
69e5c583543bdf0c7e2be6f9de29fb1e20a78129 | 41,321 | cpp | C++ | src/core/callers/trio_caller.cpp | alimanfoo/octopus | f3cc3f567f02fafe33f5a06e5be693d6ea985ee3 | [
"MIT"
] | 1 | 2018-08-21T23:34:28.000Z | 2018-08-21T23:34:28.000Z | src/core/callers/trio_caller.cpp | alimanfoo/octopus | f3cc3f567f02fafe33f5a06e5be693d6ea985ee3 | [
"MIT"
] | null | null | null | src/core/callers/trio_caller.cpp | alimanfoo/octopus | f3cc3f567f02fafe33f5a06e5be693d6ea985ee3 | [
"MIT"
] | null | null | null | // Copyright (c) 2015-2018 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.
#include "trio_caller.hpp"
#include <typeinfo>
#include <functional>
#include <iterator>
#include <algorithm>
#include <numeric>
#include <map>
#include <utility>
#include "basics/genomic_region.hpp"
#include "concepts/mappable.hpp"
#include "containers/probability_matrix.hpp"
#include "core/types/allele.hpp"
#include "core/types/variant.hpp"
#include "core/types/calls/germline_variant_call.hpp"
#include "core/types/calls/denovo_call.hpp"
#include "core/types/calls/denovo_reference_reversion_call.hpp"
#include "core/types/calls/reference_call.hpp"
#include "core/models/genotype/uniform_population_prior_model.hpp"
#include "core/models/genotype/coalescent_population_prior_model.hpp"
#include "core/models/genotype/population_model.hpp"
#include "utils/map_utils.hpp"
#include "utils/mappable_algorithms.hpp"
#include "utils/maths.hpp"
#include "timers.hpp"
namespace octopus {
TrioCaller::TrioCaller(Caller::Components&& components,
Caller::Parameters general_parameters,
Parameters specific_parameters)
: Caller {std::move(components), std::move(general_parameters)}
, parameters_ {std::move(specific_parameters)}
{
if (parameters_.maternal_ploidy == 0) {
throw std::logic_error {"IndividualCaller: ploidy must be > 0"};
}
}
std::string TrioCaller::do_name() const
{
return "trio";
}
Caller::CallTypeSet TrioCaller::do_call_types() const
{
return {std::type_index(typeid(GermlineVariantCall)),
std::type_index(typeid(DenovoCall)),
std::type_index(typeid(DenovoReferenceReversionCall))};
}
// TrioCaller::Latents
TrioCaller::Latents::Latents(const std::vector<Haplotype>& haplotypes,
std::vector<Genotype<Haplotype>>&& genotypes,
model::TrioModel::InferredLatents&& latents,
const Trio& trio)
: trio {trio}
, maternal_genotypes {std::move(genotypes)}
, model_latents {std::move(latents)}
{
set_genotype_posteriors(trio);
set_haplotype_posteriors(haplotypes);
}
TrioCaller::Latents::Latents(const std::vector<Haplotype>& haplotypes,
std::vector<Genotype<Haplotype>>&& maternal_genotypes,
std::vector<Genotype<Haplotype>>&& paternal_genotypes,
const unsigned child_ploidy,
ModelInferences&& latents,
const Trio& trio)
: trio {trio}
, maternal_genotypes {std::move(maternal_genotypes)}
, paternal_genotypes {std::move(paternal_genotypes)}
, model_latents {std::move(latents)}
{
// TODO: in this case
}
std::shared_ptr<TrioCaller::Latents::HaplotypeProbabilityMap>
TrioCaller::Latents::haplotype_posteriors() const noexcept
{
return marginal_haplotype_posteriors;
}
std::shared_ptr<TrioCaller::Latents::GenotypeProbabilityMap>
TrioCaller::Latents::genotype_posteriors() const noexcept
{
return marginal_genotype_posteriors;
}
namespace {
using model::TrioModel;
using JointProbability = TrioModel::Latents::JointProbability;
using GenotypeReference = std::reference_wrapper<const Genotype<Haplotype>>;
template <typename Function>
auto marginalise(const std::vector<Genotype<Haplotype>>& genotypes,
const std::vector<JointProbability>& joint_posteriors,
Function who)
{
std::vector<double> result(genotypes.size(), 0.0);
if (genotypes.empty()) return result;
const auto first = std::addressof(genotypes.front());
for (const auto& jp : joint_posteriors) {
result[std::addressof(who(jp).get()) - first] += jp.probability;
}
return result;
}
auto marginalise_mother(const std::vector<Genotype<Haplotype>>& genotypes,
const std::vector<JointProbability>& joint_posteriors)
{
return marginalise(genotypes, joint_posteriors, [] (const JointProbability& p) -> GenotypeReference { return p.maternal; });
}
auto marginalise_father(const std::vector<Genotype<Haplotype>>& genotypes,
const std::vector<JointProbability>& joint_posteriors)
{
return marginalise(genotypes, joint_posteriors, [] (const JointProbability& p) -> GenotypeReference { return p.paternal; });
}
auto marginalise_child(const std::vector<Genotype<Haplotype>>& genotypes,
const std::vector<JointProbability>& joint_posteriors)
{
return marginalise(genotypes, joint_posteriors, [] (const JointProbability& p) -> GenotypeReference { return p.child; });
}
} // namespace
void TrioCaller::Latents::set_genotype_posteriors(const Trio& trio)
{
auto& trio_posteriors = model_latents.posteriors.joint_genotype_probabilities;
marginal_maternal_posteriors = marginalise_mother(maternal_genotypes, trio_posteriors);
marginal_paternal_posteriors = marginalise_father(maternal_genotypes, trio_posteriors);
marginal_child_posteriors = marginalise_child(maternal_genotypes, trio_posteriors);
GenotypeProbabilityMap genotype_posteriors {std::begin(maternal_genotypes), std::end(maternal_genotypes)};
insert_sample(trio.mother(), marginal_maternal_posteriors, genotype_posteriors);
insert_sample(trio.father(), marginal_paternal_posteriors, genotype_posteriors);
insert_sample(trio.child(), marginal_child_posteriors, genotype_posteriors);
marginal_genotype_posteriors = std::make_shared<GenotypeProbabilityMap>(std::move(genotype_posteriors));
}
namespace {
using JointProbability = TrioModel::Latents::JointProbability;
using TrioProbabilityVector = std::vector<JointProbability>;
using InverseGenotypeTable = std::vector<std::vector<std::size_t>>;
auto make_inverse_genotype_table(const std::vector<Haplotype>& haplotypes,
const std::vector<Genotype<Haplotype>>& genotypes)
{
assert(!haplotypes.empty() && !genotypes.empty());
using HaplotypeReference = std::reference_wrapper<const Haplotype>;
std::unordered_map<HaplotypeReference, std::vector<std::size_t>> result_map {haplotypes.size()};
const auto cardinality = element_cardinality_in_genotypes(static_cast<unsigned>(haplotypes.size()),
genotypes.front().ploidy());
for (const auto& haplotype : haplotypes) {
auto itr = result_map.emplace(std::piecewise_construct,
std::forward_as_tuple(std::cref(haplotype)),
std::forward_as_tuple());
itr.first->second.reserve(cardinality);
}
for (std::size_t i {0}; i < genotypes.size(); ++i) {
for (const auto& haplotype : genotypes[i]) {
result_map.at(haplotype).emplace_back(i);
}
}
InverseGenotypeTable result {};
result.reserve(haplotypes.size());
for (const auto& haplotype : haplotypes) {
auto& indices = result_map.at(haplotype);
std::sort(std::begin(indices), std::end(indices));
indices.erase(std::unique(std::begin(indices), std::end(indices)), std::end(indices));
result.emplace_back(std::move(indices));
}
return result;
}
using GenotypeMarginalPosteriorMatrix = std::vector<std::vector<double>>;
auto calculate_haplotype_posteriors(const std::vector<Haplotype>& haplotypes,
const std::vector<Genotype<Haplotype>>& genotypes,
const GenotypeMarginalPosteriorMatrix& genotype_posteriors,
const InverseGenotypeTable& inverse_genotypes)
{
std::unordered_map<std::reference_wrapper<const Haplotype>, double> result {haplotypes.size()};
auto itr = std::cbegin(inverse_genotypes);
std::vector<std::size_t> genotype_indices(genotypes.size());
std::iota(std::begin(genotype_indices), std::end(genotype_indices), 0);
// noncontaining genotypes are genotypes that do not contain a particular haplotype.
const auto num_noncontaining_genotypes = genotypes.size() - itr->size();
std::vector<std::size_t> noncontaining_genotype_indices(num_noncontaining_genotypes);
for (const auto& haplotype : haplotypes) {
std::set_difference(std::cbegin(genotype_indices), std::cend(genotype_indices),
std::cbegin(*itr), std::cend(*itr),
std::begin(noncontaining_genotype_indices));
double prob_not_observed {1};
for (const auto& sample_genotype_posteriors : genotype_posteriors) {
prob_not_observed *= std::accumulate(std::cbegin(noncontaining_genotype_indices),
std::cend(noncontaining_genotype_indices),
0.0, [&sample_genotype_posteriors]
(const auto curr, const auto i) {
return curr + sample_genotype_posteriors[i];
});
}
result.emplace(haplotype, 1.0 - prob_not_observed);
++itr;
}
return result;
}
} // namespace
void TrioCaller::Latents::set_haplotype_posteriors(const std::vector<Haplotype>& haplotypes)
{
auto inverse_genotypes = make_inverse_genotype_table(haplotypes, maternal_genotypes);
const GenotypeMarginalPosteriorMatrix genotype_posteriors {
marginal_maternal_posteriors, marginal_paternal_posteriors, marginal_child_posteriors
};
auto haplotype_posteriors = calculate_haplotype_posteriors(haplotypes, maternal_genotypes, genotype_posteriors, inverse_genotypes);
marginal_haplotype_posteriors = std::make_shared<HaplotypeProbabilityMap>(haplotype_posteriors);
}
// TrioCaller
std::unique_ptr<Caller::Latents>
TrioCaller::infer_latents(const std::vector<Haplotype>& haplotypes,
const HaplotypeLikelihoodCache& haplotype_likelihoods) const
{
auto germline_prior_model = make_prior_model(haplotypes);
DeNovoModel denovo_model {parameters_.denovo_model_params, haplotypes.size(), DeNovoModel::CachingStrategy::address};
const model::TrioModel model {
parameters_.trio, *germline_prior_model, denovo_model,
TrioModel::Options {parameters_.max_joint_genotypes},
debug_log_
};
std::vector<std::vector<unsigned>> genotype_indices {};
auto maternal_genotypes = generate_all_genotypes(haplotypes, parameters_.maternal_ploidy, genotype_indices);
if (parameters_.maternal_ploidy == parameters_.paternal_ploidy) {
germline_prior_model->prime(haplotypes);
denovo_model.prime(haplotypes);
auto latents = model.evaluate(maternal_genotypes, genotype_indices, haplotype_likelihoods);
return std::make_unique<Latents>(haplotypes, std::move(maternal_genotypes),
std::move(latents), parameters_.trio);
} else {
auto paternal_genotypes = generate_all_genotypes(haplotypes, parameters_.paternal_ploidy);
if (parameters_.maternal_ploidy == parameters_.child_ploidy) {
auto latents = model.evaluate(maternal_genotypes, paternal_genotypes,
maternal_genotypes, haplotype_likelihoods);
return std::make_unique<Latents>(haplotypes, std::move(maternal_genotypes),
std::move(latents), parameters_.trio);
} else {
auto latents = model.evaluate(maternal_genotypes, paternal_genotypes,
paternal_genotypes, haplotype_likelihoods);
return std::make_unique<Latents>(haplotypes, std::move(maternal_genotypes),
std::move(latents), parameters_.trio);
}
}
}
boost::optional<double>
TrioCaller::calculate_model_posterior(const std::vector<Haplotype>& haplotypes,
const HaplotypeLikelihoodCache& haplotype_likelihoods,
const Caller::Latents& latents) const
{
return calculate_model_posterior(haplotypes, haplotype_likelihoods, dynamic_cast<const Latents&>(latents));
}
namespace {
static auto calculate_model_posterior(const double normal_model_log_evidence,
const double dummy_model_log_evidence)
{
constexpr double normalModelPrior {0.9999999};
constexpr double dummyModelPrior {1.0 - normalModelPrior};
const auto normal_model_ljp = std::log(normalModelPrior) + normal_model_log_evidence;
const auto dummy_model_ljp = std::log(dummyModelPrior) + dummy_model_log_evidence;
const auto norm = maths::log_sum_exp(normal_model_ljp, dummy_model_ljp);
return std::exp(normal_model_ljp - norm);
}
} // namespace
boost::optional<double>
TrioCaller::calculate_model_posterior(const std::vector<Haplotype>& haplotypes,
const HaplotypeLikelihoodCache& haplotype_likelihoods,
const Latents& latents) const
{
const auto max_ploidy = std::max({parameters_.maternal_ploidy, parameters_.paternal_ploidy, parameters_.child_ploidy});
std::vector<std::vector<unsigned>> genotype_indices {};
const auto genotypes = generate_all_genotypes(haplotypes, max_ploidy + 1, genotype_indices);
const auto germline_prior_model = make_prior_model(haplotypes);
DeNovoModel denovo_model {parameters_.denovo_model_params};
germline_prior_model->prime(haplotypes);
denovo_model.prime(haplotypes);
const model::TrioModel model {parameters_.trio, *germline_prior_model, denovo_model,
TrioModel::Options {parameters_.max_joint_genotypes}};
const auto inferences = model.evaluate(genotypes, genotype_indices, haplotype_likelihoods);
return octopus::calculate_model_posterior(latents.model_latents.log_evidence, inferences.log_evidence);
}
std::vector<std::unique_ptr<VariantCall>>
TrioCaller::call_variants(const std::vector<Variant>& candidates, const Caller::Latents& latents) const
{
return call_variants(candidates, dynamic_cast<const Latents&>(latents));
}
namespace {
bool contains_helper(const Haplotype& haplotype, const Allele& allele)
{
if (!is_insertion(allele)) {
return haplotype.contains(allele);
} else {
return haplotype.includes(allele);
}
}
bool contains_helper(const Genotype<Haplotype>& genotype, const Allele& allele)
{
if (!is_insertion(allele)) {
return contains(genotype, allele);
} else {
return includes(genotype, allele);
}
}
bool contains(const JointProbability& trio, const Allele& allele)
{
return contains_helper(trio.maternal, allele)
|| contains_helper(trio.paternal, allele)
|| contains_helper(trio.child, allele);
}
using HaplotypePtrBoolMap = std::unordered_map<const Haplotype*, bool>;
using GenotypePtrBoolMap = std::unordered_map<const Genotype<Haplotype>*, bool>;
// allele posterior calculation
bool contains(const Haplotype& haplotype, const Allele& allele, HaplotypePtrBoolMap& cache)
{
const auto itr = cache.find(std::addressof(haplotype));
if (itr == std::cend(cache)) {
const auto result = contains_helper(haplotype, allele);
cache.emplace(std::piecewise_construct,
std::forward_as_tuple(std::addressof(haplotype)),
std::forward_as_tuple(result));
return result;
} else {
return itr->second;
}
}
bool contains(const Genotype<Haplotype>& genotype, const Allele& allele, HaplotypePtrBoolMap& cache)
{
return std::any_of(std::cbegin(genotype), std::cend(genotype),
[&] (const auto& haplotype) {
return contains(haplotype, allele, cache);
});
}
bool contains(const Genotype<Haplotype>& genotype, const Allele& allele,
HaplotypePtrBoolMap& haplotype_cache,
GenotypePtrBoolMap& genotype_cache)
{
const auto itr = genotype_cache.find(std::addressof(genotype));
if (itr == std::cend(genotype_cache)) {
const auto result = contains(genotype, allele, haplotype_cache);
genotype_cache.emplace(std::piecewise_construct,
std::forward_as_tuple(std::addressof(genotype)),
std::forward_as_tuple(result));
return result;
} else {
return itr->second;
}
}
bool contains(const JointProbability& trio, const Allele& allele,
HaplotypePtrBoolMap& haplotype_cache,
GenotypePtrBoolMap& genotype_cache)
{
return contains(trio.maternal, allele, haplotype_cache, genotype_cache)
|| contains(trio.paternal, allele, haplotype_cache, genotype_cache)
|| contains(trio.child, allele, haplotype_cache, genotype_cache);
}
auto compute_posterior_uncached(const Allele& allele, const TrioProbabilityVector& trio_posteriors)
{
auto p = std::accumulate(std::cbegin(trio_posteriors), std::cend(trio_posteriors),
0.0, [&] (const auto curr, const auto& trio) {
return curr + (contains(trio, allele) ? 0.0 : trio.probability);
});
return probability_to_phred(p);
}
auto compute_posterior_cached(const Allele& allele, const TrioProbabilityVector& trio_posteriors)
{
HaplotypePtrBoolMap haplotype_cache {};
haplotype_cache.reserve(trio_posteriors.size());
GenotypePtrBoolMap genotype_cache {};
genotype_cache.reserve(trio_posteriors.size());
auto p = std::accumulate(std::cbegin(trio_posteriors), std::cend(trio_posteriors),
0.0, [&] (const auto curr, const auto& p) {
return curr + (contains(p, allele, haplotype_cache, genotype_cache) ? 0.0 : p.probability);
});
return probability_to_phred(p);
}
auto compute_posterior(const Allele& allele, const TrioProbabilityVector& trio_posteriors)
{
if (trio_posteriors.size() >= 500) {
return compute_posterior_cached(allele, trio_posteriors);
} else {
return compute_posterior_uncached(allele, trio_posteriors);
}
}
using AllelePosteriorMap = std::map<Allele, Phred<double>>;
auto compute_posteriors(const std::vector<Allele>& alleles, const TrioProbabilityVector& trio_posteriors)
{
AllelePosteriorMap result {};
for (const auto& allele : alleles) {
result.emplace(allele, compute_posterior(allele, trio_posteriors));
}
return result;
}
auto call_alleles(const AllelePosteriorMap& allele_posteriors, const Phred<double> min_posterior)
{
AllelePosteriorMap result {};
std::copy_if(std::cbegin(allele_posteriors), std::cend(allele_posteriors),
std::inserter(result, std::begin(result)),
[=] (const auto& p) { return p.second >= min_posterior; });
return result;
}
// de novo posterior calculation
bool is_denovo(const Allele& allele, const JointProbability& trio)
{
return contains_helper(trio.child, allele)
&& !(contains_helper(trio.maternal, allele) || contains_helper(trio.paternal, allele));
}
bool is_denovo(const Allele& allele, const JointProbability& trio,
HaplotypePtrBoolMap& haplotype_cache,
GenotypePtrBoolMap& genotype_cache)
{
return contains(trio.child, allele, haplotype_cache, genotype_cache)
&& !(contains(trio.maternal, allele, haplotype_cache, genotype_cache)
|| contains(trio.paternal, allele, haplotype_cache, genotype_cache));
}
auto compute_denovo_posterior_uncached(const Allele& allele, const TrioProbabilityVector& trio_posteriors)
{
auto p = std::accumulate(std::cbegin(trio_posteriors), std::cend(trio_posteriors),
0.0, [&allele] (const auto curr, const auto& p) {
return curr + (is_denovo(allele, p) ? 0.0 : p.probability);
});
return probability_to_phred(p);
}
auto compute_denovo_posterior_cached(const Allele& allele, const TrioProbabilityVector& trio_posteriors)
{
HaplotypePtrBoolMap haplotype_cache {};
haplotype_cache.reserve(trio_posteriors.size());
GenotypePtrBoolMap genotype_cache {};
genotype_cache.reserve(trio_posteriors.size());
auto p = std::accumulate(std::cbegin(trio_posteriors), std::cend(trio_posteriors),
0.0, [&] (const auto curr, const auto& p) {
return curr + (is_denovo(allele, p, haplotype_cache, genotype_cache) ? 0.0 : p.probability);
});
return probability_to_phred(p);
}
auto compute_denovo_posterior(const Allele& allele, const TrioProbabilityVector& trio_posteriors)
{
if (trio_posteriors.size() >= 500) {
return compute_denovo_posterior_cached(allele, trio_posteriors);
} else {
return compute_denovo_posterior_uncached(allele, trio_posteriors);
}
}
auto compute_denovo_posteriors(const AllelePosteriorMap& called_alleles,
const TrioProbabilityVector& trio_posteriors)
{
AllelePosteriorMap result {};
for (const auto& p : called_alleles) {
result.emplace(p.first, compute_denovo_posterior(p.first, trio_posteriors));
}
return result;
}
struct CalledDenovo : public Mappable<CalledDenovo>
{
Allele allele;
Phred<double> posterior;
CalledDenovo(Allele allele, Phred<double> posterior)
: allele {std::move(allele)}
, posterior {posterior}
{}
const GenomicRegion& mapped_region() const noexcept { return allele.mapped_region(); }
};
auto call_denovos(const AllelePosteriorMap& denovo_posteriors, const Phred<double> min_posterior)
{
std::vector<CalledDenovo> result {};
result.reserve(denovo_posteriors.size());
for (const auto& p : denovo_posteriors) {
if (p.second >= min_posterior) {
result.emplace_back(p.first, p.second);
}
}
return result;
}
struct CallCompare
{
bool operator()(const AllelePosteriorMap::value_type& lhs, const CalledDenovo& rhs) const
{
return lhs.first < rhs.allele;
}
bool operator()(const CalledDenovo& lhs, const AllelePosteriorMap::value_type& rhs) const
{
return lhs.allele < rhs.first;
}
};
auto get_germline_alleles(const AllelePosteriorMap& called_alleles,
const std::vector<CalledDenovo>& denovos)
{
std::vector<AllelePosteriorMap::value_type> result {};
result.reserve(called_alleles.size() - denovos.size());
std::set_difference(std::cbegin(called_alleles), std::cend(called_alleles),
std::cbegin(denovos), std::cend(denovos),
std::back_inserter(result), CallCompare {});
return result;
}
struct CalledGermlineVariant : public Mappable<CalledGermlineVariant>
{
Variant variant;
Phred<double> posterior;
CalledGermlineVariant(Variant variant, Phred<double> posterior)
: variant {std::move(variant)}
, posterior {posterior}
{}
const GenomicRegion& mapped_region() const noexcept { return variant.mapped_region(); }
};
boost::optional<Variant> find_variant(const Allele& allele, const std::vector<Variant>& variants)
{
const auto er = std::equal_range(std::cbegin(variants), std::cend(variants), allele,
[] (const auto& lhs, const auto& rhs) {
return mapped_region(lhs) < mapped_region(rhs);
});
const auto iter = std::find_if(er.first, er.second,
[&allele] (const Variant& v) {
return v.alt_allele() == allele;
});
if (iter != er.second) {
return *iter;
} else {
return boost::none;
}
}
auto call_germline_variants(const std::vector<AllelePosteriorMap::value_type>& germline_allele_posteriors,
const std::vector<Variant>& variants, const Phred<double> min_posterior)
{
std::vector<CalledGermlineVariant> result {};
result.reserve(germline_allele_posteriors.size());
for (const auto& p : germline_allele_posteriors) {
if (p.second >= min_posterior) {
const auto variant = find_variant(p.first, variants);
if (variant) result.emplace_back(*variant, p.second);
}
}
return result;
}
struct TrioCall
{
Genotype<Haplotype> mother, father, child;
};
bool includes(const TrioCall& trio, const Allele& allele)
{
return includes(trio.mother, allele) || includes(trio.father, allele) || includes(trio.child, allele);
}
bool none_mendilian_errors(const JointProbability& call, const std::vector<CalledGermlineVariant>& germline_calls)
{
return std::none_of(std::cbegin(germline_calls), std::cend(germline_calls),
[&call] (const auto& germline) { return is_denovo(germline.variant.alt_allele(), call); });
}
bool all_mendilian_errors(const JointProbability& call, const std::vector<CalledDenovo>& denovo_calls)
{
return std::all_of(std::cbegin(denovo_calls), std::cend(denovo_calls),
[&call] (const auto& denovo) { return is_denovo(denovo.allele, call); });
}
bool is_viable_genotype_call(const JointProbability& call,
const std::vector<CalledGermlineVariant>& germline_calls,
const std::vector<CalledDenovo>& denovo_calls)
{
return none_mendilian_errors(call, germline_calls) && all_mendilian_errors(call, denovo_calls);
}
TrioCall to_call(const JointProbability& p) noexcept
{
return TrioCall {p.maternal, p.paternal, p.child};
}
auto call_trio(const TrioProbabilityVector& trio_posteriors,
const std::vector<CalledGermlineVariant>& germline_calls,
const std::vector<CalledDenovo>& denovo_calls)
{
assert(!trio_posteriors.empty());
const auto map_itr = std::max_element(std::cbegin(trio_posteriors), std::cend(trio_posteriors),
[] (const auto& lhs, const auto& rhs) {
return lhs.probability < rhs.probability;
});
if (trio_posteriors.size() == 1 || is_viable_genotype_call(*map_itr, germline_calls, denovo_calls)) {
return to_call(*map_itr);
} else {
std::vector<std::reference_wrapper<const JointProbability>> trio_posterior_refs {};
trio_posterior_refs.reserve(trio_posteriors.size());
std::copy(std::cbegin(trio_posteriors), std::cend(trio_posteriors), std::back_inserter(trio_posterior_refs));
std::sort(std::begin(trio_posterior_refs), std::end(trio_posterior_refs),
[] (const auto& lhs, const auto& rhs) { return lhs.get().probability > rhs.get().probability; });
auto viable_map_itr = std::find_if(std::next(std::cbegin(trio_posterior_refs)), std::cend(trio_posterior_refs),
[&] (const auto& p) {
return is_viable_genotype_call(p, germline_calls, denovo_calls);
});
if (viable_map_itr != std::cend(trio_posterior_refs)) {
return to_call(*viable_map_itr);
} else {
return to_call(*map_itr);
}
}
}
bool includes(const TrioCall& trio, const CalledGermlineVariant& call)
{
return includes(trio, call.variant.alt_allele());
}
bool includes(const TrioCall& trio, const CalledDenovo& call)
{
return includes(trio, call.allele);
}
template <typename T>
void remove_ungenotyped_allele(std::vector<T>& calls, const TrioCall& trio)
{
auto itr = std::remove_if(std::begin(calls), std::end(calls),
[&] (const auto& call) { return !includes(trio, call); });
calls.erase(itr, std::end(calls));
}
void remove_ungenotyped_allele(std::vector<CalledGermlineVariant>& germline_calls,
std::vector<CalledDenovo>& denovo_calls,
const TrioCall& trio)
{
remove_ungenotyped_allele(germline_calls, trio);
remove_ungenotyped_allele(denovo_calls, trio);
}
using GenotypeProbabilityMap = ProbabilityMatrix<Genotype<Haplotype>>;
auto compute_posterior(const Genotype<Allele>& genotype,
const GenotypeProbabilityMap::InnerMap& posteriors)
{
auto p = std::accumulate(std::cbegin(posteriors), std::cend(posteriors), 0.0,
[&genotype] (const double curr, const auto& p) {
return curr + (contains(p.first, genotype) ? 0.0 : p.second);
});
return probability_to_phred(p);
}
struct GenotypePosterior
{
Genotype<Allele> genotype;
Phred<double> posterior;
};
struct GenotypedTrio
{
GenotypePosterior mother, father, child;
};
auto call_genotypes(const Trio& trio, const TrioCall& called_trio,
const GenotypeProbabilityMap& trio_posteriors,
const std::vector<GenomicRegion>& regions)
{
std::vector<GenotypedTrio> result {};
result.reserve(regions.size());
for (const auto& region : regions) {
auto mother_genotype = copy<Allele>(called_trio.mother, region);
auto mother_posterior = compute_posterior(mother_genotype, trio_posteriors[trio.mother()]);
auto father_genotype = copy<Allele>(called_trio.father, region);
auto father_posterior = compute_posterior(father_genotype, trio_posteriors[trio.father()]);
auto child_genotype = copy<Allele>(called_trio.child, region);
auto child_posterior = compute_posterior(child_genotype, trio_posteriors[trio.child()]);
result.push_back({{std::move(mother_genotype), mother_posterior},
{std::move(father_genotype), father_posterior},
{std::move(child_genotype), child_posterior}});
}
return result;
}
bool is_reference_reversion(const Allele& denovo, const std::map<Allele, Allele>& reference_alleles)
{
return reference_alleles.at(denovo) == denovo;
}
auto make_variant(Allele&& denovo, const std::map<Allele, Allele>& reference_alleles)
{
return Variant {reference_alleles.at(denovo), std::move(denovo)};
}
auto make_genotype_calls(GenotypedTrio&& call, const Trio& trio)
{
return std::vector<std::pair<SampleName, Call::GenotypeCall>> {
{trio.mother(), {std::move(call.mother.genotype), call.mother.posterior}},
{trio.father(), {std::move(call.father.genotype), call.father.posterior}},
{trio.child(), {std::move(call.child.genotype), call.child.posterior}}
};
}
auto make_calls(std::vector<CalledDenovo>&& alleles,
std::vector<GenotypedTrio>&& genotypes,
const Trio& trio,
const std::vector<Variant>& candidates)
{
std::map<Allele, Allele> reference_alleles {};
for (const auto& denovo : alleles) {
auto iter = std::find_if(std::cbegin(candidates), std::cend(candidates),
[denovo] (const auto& c) { return is_same_region(c, denovo); });
reference_alleles.emplace(denovo.allele, iter->ref_allele());
}
std::vector<std::unique_ptr<VariantCall>> result {};
result.reserve(alleles.size());
std::transform(std::make_move_iterator(std::begin(alleles)),
std::make_move_iterator(std::end(alleles)),
std::make_move_iterator(std::begin(genotypes)),
std::back_inserter(result),
[&trio, &reference_alleles] (auto&& allele, auto&& genotype) -> std::unique_ptr<DenovoCall> {
if (is_reference_reversion(allele.allele, reference_alleles)) {
return std::make_unique<DenovoReferenceReversionCall>(std::move(allele.allele),
make_genotype_calls(std::move(genotype), trio),
allele.posterior);
} else {
return std::make_unique<DenovoCall>(make_variant(std::move(allele.allele), reference_alleles),
make_genotype_calls(std::move(genotype), trio),
allele.posterior);
}
});
return result;
}
auto make_calls(std::vector<CalledGermlineVariant>&& variants,
std::vector<GenotypedTrio>&& genotypes,
const Trio& trio)
{
std::vector<std::unique_ptr<VariantCall>> result {};
result.reserve(variants.size());
std::transform(std::make_move_iterator(std::begin(variants)),
std::make_move_iterator(std::end(variants)),
std::make_move_iterator(std::begin(genotypes)),
std::back_inserter(result),
[&trio] (auto&& variant, auto&& genotype) {
return std::make_unique<GermlineVariantCall>(std::move(variant.variant),
make_genotype_calls(std::move(genotype), trio),
variant.posterior);
});
return result;
}
auto make_calls(std::vector<CalledGermlineVariant>&& variants,
std::vector<GenotypedTrio>&& germline_genotypes,
std::vector<CalledDenovo>&& alleles,
std::vector<GenotypedTrio>&& denovo_genotypes,
const Trio& trio, const std::vector<Variant>& candidates)
{
auto germline_calls = make_calls(std::move(variants), std::move(germline_genotypes), trio);
auto denovo_calls = make_calls(std::move(alleles), std::move(denovo_genotypes), trio, candidates);
std::vector<std::unique_ptr<VariantCall>> result {};
result.reserve(germline_calls.size() + denovo_calls.size());
std::merge(std::make_move_iterator(std::begin(germline_calls)),
std::make_move_iterator(std::end(germline_calls)),
std::make_move_iterator(std::begin(denovo_calls)),
std::make_move_iterator(std::end(denovo_calls)),
std::back_inserter(result),
[] (const auto& lhs, const auto& rhs) {
return lhs->mapped_region() < rhs->mapped_region();
});
return result;
}
} // namespace
namespace debug {
void log(const TrioProbabilityVector& posteriors,
boost::optional<logging::DebugLogger>& debug_log,
boost::optional<logging::TraceLogger>& trace_log);
void log(const AllelePosteriorMap& posteriors,
boost::optional<logging::DebugLogger>& debug_log,
boost::optional<logging::TraceLogger>& trace_log,
Phred<double> min_posterior, bool denovo = false);
} // namespace debug
std::vector<std::unique_ptr<VariantCall>>
TrioCaller::call_variants(const std::vector<Variant>& candidates, const Latents& latents) const
{
const auto alleles = decompose(candidates);
const auto& trio_posteriors = latents.model_latents.posteriors.joint_genotype_probabilities;
debug::log(trio_posteriors, debug_log_, trace_log_);
const auto allele_posteriors = compute_posteriors(alleles, trio_posteriors);
debug::log(allele_posteriors, debug_log_, trace_log_, parameters_.min_variant_posterior);
const auto called_alleles = call_alleles(allele_posteriors, parameters_.min_variant_posterior);
const auto denovo_posteriors = compute_denovo_posteriors(called_alleles, trio_posteriors);
debug::log(denovo_posteriors, debug_log_, trace_log_, parameters_.min_denovo_posterior, true);
auto denovos = call_denovos(denovo_posteriors, parameters_.min_denovo_posterior);
const auto germline_alleles = get_germline_alleles(called_alleles, denovos);
auto germline_variants = call_germline_variants(germline_alleles, candidates, parameters_.min_variant_posterior);
const auto called_trio = call_trio(trio_posteriors, germline_variants, denovos);
remove_ungenotyped_allele(germline_variants, denovos, called_trio);
auto denovo_genotypes = call_genotypes(parameters_.trio, called_trio, *latents.genotype_posteriors(),
extract_regions(denovos));
auto germline_genotypes = call_genotypes(parameters_.trio, called_trio, *latents.genotype_posteriors(),
extract_regions(germline_variants));
return make_calls(std::move(germline_variants), std::move(germline_genotypes),
std::move(denovos), std::move(denovo_genotypes),
parameters_.trio, candidates);
}
std::vector<std::unique_ptr<ReferenceCall>>
TrioCaller::call_reference(const std::vector<Allele>& alleles, const Caller::Latents& latents,
const ReadMap& reads) const
{
return call_reference(alleles, dynamic_cast<const Latents&>(latents), reads);
}
std::vector<std::unique_ptr<ReferenceCall>>
TrioCaller::call_reference(const std::vector<Allele>& alleles, const Latents& latents,
const ReadMap& reads) const
{
return {};
}
std::unique_ptr<PopulationPriorModel> TrioCaller::make_prior_model(const std::vector<Haplotype>& haplotypes) const
{
if (parameters_.germline_prior_model_params) {
return std::make_unique<CoalescentPopulationPriorModel>(CoalescentModel {
Haplotype {mapped_region(haplotypes.front()), reference_},
*parameters_.germline_prior_model_params,
haplotypes.size(), CoalescentModel::CachingStrategy::address
});
} else {
return std::make_unique<UniformPopulationPriorModel>();
}
}
namespace debug {
template <typename S>
void print(S&& stream, const TrioProbabilityVector& posteriors, const std::size_t n)
{
const auto m = std::min(n, posteriors.size());
if (m == posteriors.size()) {
stream << "Printing all trio joint genotype posteriors (maternal | paternal | child)" << '\n';
} else {
stream << "Printing top " << m << " trio joint genotype posteriors (maternal | paternal | child)" << '\n';
}
std::vector<JointProbability> v {};
v.reserve(posteriors.size());
std::copy(std::cbegin(posteriors), std::cend(posteriors), std::back_inserter(v));
const auto mth = std::next(std::begin(v), m);
std::partial_sort(std::begin(v), mth, std::end(v),
[] (const auto& lhs, const auto& rhs) { return lhs.probability > rhs.probability; });
std::for_each(std::begin(v), mth,
[&] (const auto& p) {
using octopus::debug::print_variant_alleles;
print_variant_alleles(stream, p.maternal);
stream << " | ";
print_variant_alleles(stream, p.paternal);
stream << " | ";
print_variant_alleles(stream, p.child);
stream << " " << p.probability << "\n";
});
}
void log(const TrioProbabilityVector& posteriors,
boost::optional<logging::DebugLogger>& debug_log,
boost::optional<logging::TraceLogger>& trace_log)
{
if (trace_log) {
print(stream(*trace_log), posteriors, -1);
}
if (debug_log) {
print(stream(*debug_log), posteriors, 10);
}
}
template <typename S>
void print(S&& stream, const AllelePosteriorMap& posteriors, const std::size_t n,
const std::string& type = "allele")
{
const auto m = std::min(n, posteriors.size());
if (m == posteriors.size()) {
stream << "Printing all " << type << " posteriors" << '\n';
} else {
stream << "Printing top " << m << " " << type << " posteriors" << '\n';
}
std::vector<std::pair<Allele, Phred<double>>> v {};
v.reserve(posteriors.size());
std::copy(std::cbegin(posteriors), std::cend(posteriors), std::back_inserter(v));
const auto mth = std::next(std::begin(v), m);
std::partial_sort(std::begin(v), mth, std::end(v),
[] (const auto& lhs, const auto& rhs) { return lhs.second > rhs.second; });
std::for_each(std::begin(v), mth,
[&] (const auto& p) {
stream << p.first << " " << p.second.probability_true() << '\n';
});
}
void log(const AllelePosteriorMap& posteriors,
boost::optional<logging::DebugLogger>& debug_log,
boost::optional<logging::TraceLogger>& trace_log,
Phred<double> min_posterior, const bool denovo)
{
if (!denovo || !posteriors.empty()) {
const std::string type {denovo ? "denovo allele" : "allele"};
if (trace_log) {
print(stream(*trace_log), posteriors, -1, type);
}
if (debug_log) {
const auto n = std::count_if(std::cbegin(posteriors), std::cend(posteriors),
[=] (const auto& p) { return p.second >= min_posterior; });
print(stream(*debug_log), posteriors, std::max(n, decltype(n) {10}), type);
}
}
}
} // namespace debug
} // namespace octopus
| 42.775362 | 135 | 0.654703 | alimanfoo |
69e7c7f74bc79ccac4886ec37eaff73dbf6343cb | 4,538 | cpp | C++ | RompLib/src/QueryFuncs.cpp | World-Worst-Detector/romp | d45cf33bd233eef4cd475a8dd328d19a3ae27c24 | [
"MIT"
] | 5 | 2018-11-15T16:44:06.000Z | 2022-03-01T05:39:54.000Z | RompLib/src/QueryFuncs.cpp | World-Worst-Detector/romp | d45cf33bd233eef4cd475a8dd328d19a3ae27c24 | [
"MIT"
] | 5 | 2019-03-12T16:03:13.000Z | 2022-01-15T01:23:59.000Z | RompLib/src/QueryFuncs.cpp | World-Worst-Detector/romp | d45cf33bd233eef4cd475a8dd328d19a3ae27c24 | [
"MIT"
] | 6 | 2019-01-03T22:19:14.000Z | 2021-06-23T18:10:49.000Z | #include "QueryFuncs.h"
#include <glog/logging.h>
#include <glog/raw_logging.h>
#include <pthread.h>
namespace romp {
/*
* Helper function to determine if the query function get available result.
*/
bool infoIsAvailable(const int retVal) {
if (retVal == 0) {
// task does not exist
return false;
} else if (retVal == 1) {
// task exists at the specified ancestor level but the information
// is not available
RAW_LOG(WARNING, "task exists but info is not available");
return false;
} else if (retVal == 2) {
// task exists at the specified ancestor level and the information
// is available
return true;
} else {
RAW_LOG(FATAL, "unknown return value");
return false;
}
}
/*
* Query all openmp task information given the task level in one time.
* This function could be called when multiple aspects of information about
* openmp task is needed.
*/
bool queryAllTaskInfo(const int ancestorLevel,
int& taskType,
int& threadNum,
AllTaskInfo& allTaskInfo) {
auto retVal = omptGetTaskInfo(ancestorLevel, &taskType,
&allTaskInfo.taskData, &allTaskInfo.taskFrame,
&allTaskInfo.parallelData, &threadNum);
return infoIsAvailable(retVal);
}
/*
* Query openmp task information given the task level. If the information is
* available, set dataPtr to the pointer to actual data, then return true.
* If the information is not available, set dataPtr to nullptr and return false.
*/
bool queryTaskInfo(const int ancestorLevel,
int& taskType,
int& threadNum,
void*& dataPtr) {
int retVal = -1;
dataPtr = nullptr;
ompt_data_t omptTaskData;
auto taskDataPtr = &omptTaskData;
auto taskDataPtrPtr = &taskDataPtr;
retVal = omptGetTaskInfo(ancestorLevel, &taskType, taskDataPtrPtr, NULL,
NULL, &threadNum);
dataPtr = taskDataPtr->ptr;
if (!dataPtr || !infoIsAvailable(retVal)) {
RAW_LOG(WARNING, "task data info is not available");
return false;
}
return true;
}
/*
* Query openmp task's frame information given the task level. If the
* information is available, set
*/
bool queryFrameInfo(const int ancestorLevel,
int& taskType,
ompt_frame_t* omptFramePtr) {
int retVal = -1;
auto omptFramePtrPtr = &omptFramePtr;
retVal = omptGetTaskInfo(ancestorLevel, &taskType, NULL, omptFramePtrPtr,
NULL, NULL);
if (!infoIsAvailable(retVal)) {
RAW_LOG(WARNING, "ompt frame info is not available");
return false;
}
return true;
}
/*
* Query openmp runtime information about the parallel region.
* On success, set dataPtr to pointer to parallel region data, and return true.
* Otherwise, set dataPtr to nullptr and return false.
*/
bool queryParallelInfo(
const int ancestorLevel,
int& teamSize,
void*& dataPtr) {
dataPtr = nullptr;
ompt_data_t omptParData;
auto parDataPtr = &omptParData;
auto parDataPtrPtr = &parDataPtr;
auto retVal = omptGetParallelInfo(ancestorLevel, parDataPtrPtr, &teamSize);
if (!infoIsAvailable(retVal)) {
return false;
}
dataPtr = parDataPtr->ptr;
return true;
}
/*
* Query openmp runtime information about the thread.
* If thread data pointer is not nullptr, return true and pass the pointer
* to dataPtr. Otherwise, return false.
*/
bool queryOmpThreadInfo(void*& dataPtr) {
dataPtr = nullptr;
auto curThreadData = omptGetThreadData();
if (!curThreadData || !(curThreadData->ptr)) {
return false;
}
dataPtr = curThreadData->ptr;
return true;
}
/*
* Query the stack base address and the stack size of the current thread.
* On success, return true. Otherwise, return false and set stackAddr to
* nullptr and staskSize to 0.
*/
bool queryThreadStackInfo(void*& stackAddr, size_t& stackSize) {
pthread_attr_t attr;
if (pthread_getattr_np(pthread_self(), &attr) != 0) {
RAW_LOG(WARNING, "cannot get pthread attribute");
return false;
}
if (pthread_attr_getstack(&attr, &stackAddr, &stackSize) != 0) {
RAW_LOG(WARNING, "cannot get thread stack info");
return false;
}
return true;
}
/*
* Query the task private data memory associated with the explicit task.
* The base address of the data memory is stored in `addr`. The size of the
* memory is stored in `size`.
*/
bool queryTaskMemoryInfo(void** addr, size_t* size) {
return omptGetTaskMemory(addr, size, 0) == 1;
}
}
| 29.660131 | 81 | 0.675408 | World-Worst-Detector |
69ece13f49b984a83383566514ce4983f0932571 | 546 | hpp | C++ | src/texture_create_info.hpp | zfccxt/calcium | 9cc3a00904c05e675bdb5d35eef0f5356796e564 | [
"MIT"
] | null | null | null | src/texture_create_info.hpp | zfccxt/calcium | 9cc3a00904c05e675bdb5d35eef0f5356796e564 | [
"MIT"
] | null | null | null | src/texture_create_info.hpp | zfccxt/calcium | 9cc3a00904c05e675bdb5d35eef0f5356796e564 | [
"MIT"
] | null | null | null | #pragma once
#include <string>
#include "colour.hpp"
#include "texture_filter.hpp"
#include "texture_wrap.hpp"
namespace cl {
// TODO: Name these better
struct TextureCreateInfo {
std::string file_path;
TextureFilter filter = TextureFilter::kLinear;
TextureWrap wrap = TextureWrap::kRepeat;
bool flip_vertical_on_load = false;
};
struct BlankTextureCreateInfo {
Colour colour = 0xd7de73ff;
size_t width = 1;
size_t height = 1;
TextureFilter filter = TextureFilter::kNearest;
TextureWrap wrap = TextureWrap::kRepeat;
};
}
| 18.827586 | 49 | 0.74359 | zfccxt |
69f1f8c7be5e684596c57065c80b22c0db0e137d | 2,504 | cpp | C++ | Toolbox/Win32_utilities/win32_stdDialogBox.cpp | pk1954/Solutions | b224522283f82cb7d73b8005e35e0c045edc2fc0 | [
"MIT"
] | null | null | null | Toolbox/Win32_utilities/win32_stdDialogBox.cpp | pk1954/Solutions | b224522283f82cb7d73b8005e35e0c045edc2fc0 | [
"MIT"
] | null | null | null | Toolbox/Win32_utilities/win32_stdDialogBox.cpp | pk1954/Solutions | b224522283f82cb7d73b8005e35e0c045edc2fc0 | [
"MIT"
] | null | null | null | // win32_stdDialogBox.cpp
//
// Win32_utilities
#include "stdafx.h"
#include <sstream>
#include "win32_util.h"
#include "win32_util_resource.h"
#include "win32_stdDialogBox.h"
using std::wostringstream;
static float m_fValue; // the value to be edited in the dialog
static wstring m_wstrUnit; // the text to be displayed right of the edit box
static wstring m_wstrTitle; // the title bar text of the dialog
float StdDialogBox::Show
(
HWND const hwndParent,
float fValue,
wstring const wstrTitle,
wstring const wstrUnit
)
{
m_wstrTitle = wstrTitle;
m_wstrUnit = wstrUnit;
m_fValue = fValue;
if (IDOK == DialogBox(nullptr, MAKEINTRESOURCE(IDD_STD_EDIT_DIALOG), hwndParent, dialogProc))
fValue = m_fValue;
return fValue;
}
void StdDialogBox::SetParameterValue(HWND const hwndEditField, float const fValue)
{
wostringstream m_wstrBuffer;
m_wstrBuffer << fValue;
SetWindowText(hwndEditField, m_wstrBuffer.str().c_str());
}
bool StdDialogBox::Evaluate(HWND const hwndEditField, float & fValue)
{
static int const BUFLEN = 20;
static wchar_t wBuffer[BUFLEN];
float fNewValue { fValue };
bool bResult { false };
if (GetWindowText(hwndEditField, wBuffer, BUFLEN))
{
wstring wstrEdit(wBuffer);
for (auto & c : wstrEdit) // change german decimal comma to
if (c == L',') // decimal point
c = L'.';
try
{
fNewValue = stof(wstrEdit);
fValue = fNewValue;
bResult = true;
} catch(...)
{
MessageBeep(MB_ICONWARNING);
}
}
SetParameterValue(hwndEditField, fValue);
return bResult;
}
INT_PTR CALLBACK dialogProc
(
HWND const hDlg,
UINT const message,
WPARAM const wParam,
LPARAM const lParam
)
{
switch (message)
{
case WM_INITDIALOG:
{
SetWindowText(hDlg, m_wstrTitle.c_str());
StdDialogBox::SetParameterValue(GetDlgItem(hDlg, IDD_EDIT_CTL), m_fValue);
SetWindowText(GetDlgItem(hDlg, IDC_STATIC), m_wstrUnit.c_str());
SendMessage(hDlg, DM_SETDEFID, IDOK, 0);
SendMessage(GetDlgItem(hDlg, IDCANCEL), BM_SETSTYLE, BS_PUSHBUTTON, 0);
return INT_PTR(true);
}
case WM_COMMAND:
if (LOWORD(wParam) == IDOK)
{
HWND hwndEditCtl { GetDlgItem(hDlg, IDD_EDIT_CTL) };
if (StdDialogBox::Evaluate(hwndEditCtl, m_fValue))
EndDialog(hDlg, LOWORD(wParam));
else
SetFocus(hwndEditCtl);
return INT_PTR(true);
}
else if (LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return INT_PTR(true);
}
break;
default:
break;
}
return INT_PTR(false);
}
| 21.586207 | 94 | 0.70647 | pk1954 |
69f986fb0137e3a90cdec1ccda4505ab528f959b | 585 | cpp | C++ | tests/adjacent_loop/tests/generator.cpp | not522/Competitive-Programming | be4a7d25caf5acbb70783b12899474a56c34dedb | [
"Unlicense"
] | 7 | 2018-04-14T14:55:51.000Z | 2022-01-31T10:49:49.000Z | tests/adjacent_loop/tests/generator.cpp | not522/Competitive-Programming | be4a7d25caf5acbb70783b12899474a56c34dedb | [
"Unlicense"
] | 5 | 2018-04-14T14:28:49.000Z | 2019-05-11T02:22:10.000Z | tests/adjacent_loop/tests/generator.cpp | not522/Competitive-Programming | be4a7d25caf5acbb70783b12899474a56c34dedb | [
"Unlicense"
] | null | null | null | #include "generator.hpp"
#include "constraints.hpp"
void gen_random(stringstream &ss, const map<string, boost::any> &args) {
int n = any_cast<int>(args.at("n"));
int y = any_cast<int>(args.at("y"));
int x = any_cast<int>(args.at("x"));
ss << n << " " << y << " " << x << " " << 10 << " " << 10 << endl;
}
int main(int argc, char *argv[]) {
registerGen(argc, argv, 1);
map<string, vector<any>> args;
args["n"] = vector<any>{2, 4, 5, 8, 9};
args["y"] = vector<any>{0, 5, 9};
args["x"] = vector<any>{0, 5, 9};
generate_combination("10_random_", gen_random, args);
}
| 30.789474 | 72 | 0.57094 | not522 |
69facbb96269bdbf16fdb4a385318085e2be31ee | 621 | cpp | C++ | cpp-main-big/src/main.cpp | dksmiffs/gnatmake-examples | 237c0cd9fe8d4788f8898509319a3a665d2233b1 | [
"MIT"
] | null | null | null | cpp-main-big/src/main.cpp | dksmiffs/gnatmake-examples | 237c0cd9fe8d4788f8898509319a3a665d2233b1 | [
"MIT"
] | null | null | null | cpp-main-big/src/main.cpp | dksmiffs/gnatmake-examples | 237c0cd9fe8d4788f8898509319a3a665d2233b1 | [
"MIT"
] | null | null | null | #include <iostream>
#include "i_am_c.h"
#include "i_am_cpp.hpp"
extern "C" void adainit();
extern "C" void adafinal();
extern "C" void ada_procedure();
extern "C" void ada_procedure_too();
int main()
{
std::cout << "Starting C++ main." << std::endl;
adainit();
std::cout << "Calling external C++ code from C++ main." << std::endl;
test::i_am_cpp();
std::cout << "Calling external C code from C++ main." << std::endl;
i_am_c();
std::cout << "Calling external Ada code from C++ main." << std::endl;
ada_procedure();
ada_procedure_too();
adafinal();
std::cout << "Exiting C++ main." << std::endl;
}
| 24.84 | 71 | 0.628019 | dksmiffs |
69fe0386c91b1531c34533d61f21a49c2766ce5c | 1,954 | cpp | C++ | luogu/codes/P1514.cpp | Tony031218/OI | 562f5f45d0448f4eab77643b99b825405a123d92 | [
"MIT"
] | 1 | 2021-02-22T03:39:24.000Z | 2021-02-22T03:39:24.000Z | luogu/codes/P1514.cpp | Tony031218/OI | 562f5f45d0448f4eab77643b99b825405a123d92 | [
"MIT"
] | null | null | null | luogu/codes/P1514.cpp | Tony031218/OI | 562f5f45d0448f4eab77643b99b825405a123d92 | [
"MIT"
] | null | null | null | /*************************************************************
* > File Name : P1514.cpp
* > Author : Tony
* > Created Time : 2019/06/21 15:10:31
* > Algorithm : [Dfs]Ex
**************************************************************/
#include <bits/stdc++.h>
using namespace std;
inline int read() {
int x = 0; int f = 1; char ch = getchar();
while (!isdigit(ch)) {if (ch == '-') f = -1; ch = getchar();}
while (isdigit(ch)) {x = x * 10 + ch - 48; ch = getchar();}
return x * f;
}
const int maxn = 510;
int n, m;
int high[maxn][maxn];
int l[maxn][maxn], r[maxn][maxn];
bool vis[maxn][maxn];
int go[4][2] = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}};
void dfs(int x, int y) {
vis[x][y] = true;
for (int i = 0; i < 4; ++i) {
int x2 = x + go[i][0];
int y2 = y + go[i][1];
if (x2 < 1 || x2 > n || y2 < 1 || y2 > m || high[x2][y2] >= high[x][y]) continue;
if (!vis[x2][y2]) dfs(x2, y2);
l[x][y] = min(l[x][y], l[x2][y2]);
r[x][y] = max(r[x][y], r[x2][y2]);
}
}
int main() {
n = read(); m = read();
memset(l, 0x3f, sizeof(l));
for (int i = 1; i <= m; ++i) {
l[n][i] = r[n][i] = i;
}
for (int i = 1; i <= n; ++i) {
for (int j = 1; j <= m; ++j) {
high[i][j] = read();
}
}
for (int i = 1; i <= m; ++i) {
if (!vis[1][i]) {
dfs(1, i);
}
}
bool flg = true; int cnt = 0;
for (int i = 1; i <= m; ++i) {
if (!vis[n][i]) {
flg = false;
cnt++;
}
}
if (!flg) {
printf("0\n%d\n", cnt);
return 0;
}
int le = 1, ans = 0;
while (le <= m) {
int tmp = 0;
for (int i = 1; i <= m; ++i) {
if (l[1][i] <= le) {
tmp = max(tmp, r[1][i]);
}
}
ans++;
le = tmp + 1;
}
printf("1\n%d\n", ans);
return 0;
} | 24.734177 | 89 | 0.351586 | Tony031218 |
69ff0364c09954f0a2975f8033527c51556d1c65 | 6,754 | cc | C++ | src/openclx/compiler.cc | igankevich/openclx | 5063635392619eef84e536f24f8252ea41a5ffe6 | [
"Unlicense"
] | null | null | null | src/openclx/compiler.cc | igankevich/openclx | 5063635392619eef84e536f24f8252ea41a5ffe6 | [
"Unlicense"
] | null | null | null | src/openclx/compiler.cc | igankevich/openclx | 5063635392619eef84e536f24f8252ea41a5ffe6 | [
"Unlicense"
] | null | null | null | #include <dirent.h>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <openclx/binary>
#include <openclx/compiler>
#include <openclx/kernel>
#include <openclx/platform>
#define CLX_SYS_THROW() \
throw ::std::system_error(errno, ::std::system_category())
#define CLX_SYS_CHECK(ret) \
if (ret == -1) { \
CLX_SYS_THROW(); \
}
namespace {
typedef ::DIR directory;
typedef struct ::dirent directory_entry;
constexpr const char file_separator = '/';
constexpr const int max_includes = 1000;
}
std::string
clx::compiler::inline_sources(std::string src) const {
int nincludes = 0;
std::string include = "#include";
for (size_t offset=0;
offset!=std::string::npos && offset<src.size() && nincludes<max_includes;
offset=src.find(include, offset)) {
size_t i=offset+include.size();
// skip spaces
for (; i<src.size() && std::isspace(src[i]); ++i);
if (i < src.size()) {
char s = '"';
if (src[i] == '"') { s = '"'; }
else if (src[i] == '<') { s = '>'; }
else continue;
size_t j = i+1;
// find closing quote
for (; j<src.size() && src[j]!=s && (s=='>' || (s=='"' && src[j-1]!='\\')); ++j);
if (j < src.size()) { src += file_to_string(src.substr(i+1,j-i-1)); ++nincludes; }
}
offset = i;
}
return src;
}
std::string
clx::compiler::file_to_string(const std::string& filename) const {
const auto& src = this->source_directory();
const auto& suffix = this->suffix();
std::string path;
path.reserve(filename.size() + suffix.size() + src.size() + 1);
path += src;
path += file_separator;
path += filename;
path += suffix;
std::stringstream tmp;
std::ifstream in;
in.exceptions(std::ios::failbit | std::ios::badbit);
in.open(path, std::ios::in);
tmp << in.rdbuf();
return tmp.str();
}
std::string
clx::compiler::binary_path(const std::string& filename, size_t number) const {
std::stringstream name;
name << this->cache_directory();
name << file_separator;
name << filename << '-';
name << std::setfill('0') << std::setw(2*sizeof(number)) << std::hex << number;
return name.str();
}
clx::program
clx::compiler::compile(const std::string& filename) {
program prg;
this->compile(prg, filename, file_to_string(filename));
return prg;
}
clx::program
clx::compiler::compile(const std::string& filename, const std::string& src) {
program prg;
this->compile(prg, filename, src);
return prg;
}
void
clx::compiler::compile(
program& prg,
const std::string& filename,
const std::string& src
) {
if (cache()) {
hash_type hash;
const auto& devices = this->devices();
try {
std::vector<binary> binaries;
binaries.reserve(devices.size());
for (const auto& device : devices) {
auto key = hash(salt(device) + inline_sources(src));
const auto& path = binary_path(filename, key);
std::ifstream in;
in.exceptions(std::ios::failbit | std::ios::badbit);
in.open(path, std::ios::binary | std::ios::in);
binaries.emplace_back();
in >> binaries.back();
}
prg = this->_context.program(binaries);
prg.build(options(), devices);
} catch (const std::exception& err) {
this->compile_from_source(prg, src);
const auto& binaries = prg.binaries();
const auto ndevices = devices.size();
for (size_t i=0; i<ndevices; ++i) {
const auto& device = devices[i];
const auto& binary = binaries[i];
auto key = hash(salt(device) + inline_sources(src));
const auto& path = binary_path(filename, key);
std::ofstream out;
out.exceptions(std::ios::failbit | std::ios::badbit);
out.open(path, std::ios::binary | std::ios::out);
out << binary;
out.close();
}
}
} else {
this->compile_from_source(prg, src);
}
}
void
clx::compiler::compile_from_source(program& prg, const std::string& src) {
prg = this->_context.program(src);
try {
prg.build(options(), devices());
} catch (const std::system_error& err) {
if (errc(err.code().value()) == errc::build_program_failure) {
throw std::system_error(err.code(), this->errors(prg));
}
throw;
}
}
void
clx::compiler::compile() {
directory* dir = ::opendir(this->_source_directory.data());
if (!dir) { CLX_SYS_THROW(); }
directory_entry* entry;
const auto& suffix = this->suffix();
const auto n = suffix.size();
while ((entry = ::readdir(dir))) {
std::string filename = entry->d_name;
if (filename.size() < n ||
filename.compare(filename.size()-n, n, suffix) != 0) {
continue;
}
this->compile(entry->d_name);
}
CLX_SYS_CHECK(::closedir(dir));
}
void
clx::compiler::clear_cache() {
directory* dir = ::opendir(this->_cache_directory.data());
if (!dir) { CLX_SYS_THROW(); }
directory_entry* entry;
while ((entry = ::readdir(dir))) {
std::string path;
path += source_directory();
path += file_separator;
path += entry->d_name;
std::remove(path.data());
}
CLX_SYS_CHECK(::closedir(dir));
}
std::string
clx::compiler::errors(const program& prg) const {
std::string logs;
logs.reserve(4096);
for (const auto& device : devices()) {
const auto& log = prg.build_log(device);
if (!log.empty()) {
logs += log;
logs += '\n';
}
}
return logs;
}
void
clx::compiler::devices(const device_array& rhs) {
this->_devices = rhs;
}
void
clx::compiler::devices(device_array&& rhs) {
this->_devices = std::move(rhs);
}
std::string
clx::compiler::salt(const device& device) const {
std::string salt;
salt.reserve(4096);
const auto& platform = device.platform();
salt += platform.name();
salt += platform.vendor();
salt += platform.version();
salt += device.name();
salt += device.vendor();
salt += device.version();
salt += options();
return salt;
}
void
clx::compiler::unload() {
auto& devices = this->_devices;
for (const auto& device : devices) {
device.platform().unload_compiler();
}
}
::clx::kernel clx::compiler::kernel(
const std::string& filename,
const char* name
) {
return this->compile(filename).kernel(name);
}
| 28.378151 | 94 | 0.563222 | igankevich |
0e02a28495bfdadba7ff2ee589b6d410b729d4af | 2,294 | hpp | C++ | src/include/XERenderer/GUI/RenderableLayer.hpp | devxkh/FrankE | 72faca02759b54aaec842831f3c7a051e7cf5335 | [
"MIT"
] | 11 | 2017-01-17T15:02:25.000Z | 2020-11-27T16:54:42.000Z | src/include/XERenderer/GUI/RenderableLayer.hpp | devxkh/FrankE | 72faca02759b54aaec842831f3c7a051e7cf5335 | [
"MIT"
] | 9 | 2016-10-23T20:15:38.000Z | 2018-02-06T11:23:17.000Z | src/include/XERenderer/GUI/RenderableLayer.hpp | devxkh/FrankE | 72faca02759b54aaec842831f3c7a051e7cf5335 | [
"MIT"
] | 2 | 2019-08-29T10:23:51.000Z | 2020-04-03T06:08:34.000Z | #ifndef _RENDERABLELAYER_HPP
#define _RENDERABLELAYER_HPP
#include <XESystem/SystemConfig.hpp>
#include <XERenderer/private/ScreenRenderable.hpp>
//#include <Ogre/OgreMain/include/OgreManualObject2.h>
#include <Ogre/OgreMain/include/OgreMovableObject.h>
#include <Ogre/OgreMain/include/OgreRenderable.h>
//Ogre::v1
#include <Ogre/OgreMain/include/OgreRenderOperation.h>
#include <vector>
#include <memory>
namespace Ogre {
class VertexBufferPacked;
class ObjectMemoryManager;
class SceneManager;
typedef std::string String;
}
namespace XE {
struct Vertex;
class CameraRenderable;
class GUIRenderer;
class RenderableShape;
class RenderableLayer : public Ogre::MovableObject, public ScreenRenderable//public Ogre::ManualObject
{
public:
RenderableLayer(Uint32 id, GUIRenderer& guiRenderer,
Ogre::ObjectMemoryManager* objManager, Ogre::SceneManager* sceneMgr, const Uint16 atlasId = 0);
~RenderableLayer();
// MovableObject overrides
/** @copydoc MovableObject::getMovableType. */
const Ogre::String& getMovableType(void) const;
void updateVertices(std::queue<Vertex>& vertices);
// Renderable overrides
/** @copydoc Renderable::getRenderOperation. */
virtual void getRenderOperation(Ogre::v1::RenderOperation& op, bool casterPass) OGRE_OVERRIDE;
/** @copydoc Renderable::getWorldTransforms. */
virtual void getWorldTransforms(Ogre::Matrix4* xform) const OGRE_OVERRIDE {}
/** @copydoc Renderable::getLights. */
virtual const Ogre::LightList &getLights(void) const OGRE_OVERRIDE { return queryLights(); }
/** @copydoc Renderable::getCastsShadows. */
virtual bool getCastsShadows(void) const { return false; }
protected:
//called from Ogre::Renderable
Ogre::OperationType mOperationType;
private:
void clear();
bool _initalizied;
Ogre::SceneManager* _t_OgreSceneMgrPtr;
Ogre::ObjectMemoryManager* _t_objectMemoryManager;
Ogre::VertexArrayObject * m_Vao;
Ogre::VaoManager * m_VaoManager;
Ogre::VertexElement2Vec m_VertexElements;
Ogre::VertexBufferPacked *m_vertexBuffer;
Ogre::IndexBufferPacked* m_indexBuffer;
GUIRenderer& m_guiRenderer;
Uint32 m_currentVertexBufferSize;
Uint32 m_currentIndexBufferSize;
Ogre::SceneManager* m_sceneMgr;
Ogre::SceneNode* m_sceneNodeLines;
};
}
#endif | 26.068182 | 103 | 0.767655 | devxkh |
0e058e34350ce6e5f8d9c6c68ffce88ec81eea64 | 1,895 | cc | C++ | tensorflow/core/grappler/optimizers/debug_stripper.cc | zhangyujing/tensorflow | c7a04561fb8972fb64907acc5f10f3c6d4cef9f2 | [
"Apache-2.0"
] | 3 | 2019-04-15T13:59:41.000Z | 2020-04-25T21:09:33.000Z | tensorflow/core/grappler/optimizers/debug_stripper.cc | zhangyujing/tensorflow | c7a04561fb8972fb64907acc5f10f3c6d4cef9f2 | [
"Apache-2.0"
] | 1 | 2018-02-23T03:17:44.000Z | 2018-02-23T03:17:44.000Z | tensorflow/core/grappler/optimizers/debug_stripper.cc | zhangyujing/tensorflow | c7a04561fb8972fb64907acc5f10f3c6d4cef9f2 | [
"Apache-2.0"
] | 1 | 2019-06-24T17:57:20.000Z | 2019-06-24T17:57:20.000Z | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "tensorflow/core/grappler/optimizers/debug_stripper.h"
#include "tensorflow/core/framework/node_def.pb.h"
#include "tensorflow/core/grappler/clusters/cluster.h"
#include "tensorflow/core/grappler/grappler_item.h"
#include "tensorflow/core/grappler/op_types.h"
#include "tensorflow/core/grappler/utils.h"
namespace tensorflow {
namespace grappler {
Status DebugStripper::Optimize(Cluster* cluster, const GrapplerItem& item,
GraphDef* output) {
*output = item.graph;
for (NodeDef& node : *output->mutable_node()) {
if (IsAssert(node)) {
// Convert this node into a no-op.
node.set_op("NoOp");
node.clear_attr();
// Convert all its inputs into control dependency, which will then
// be optimized away by dependency optimizer.
for (string& inp : *node.mutable_input()) {
if (!IsControlInput(inp)) {
inp = AsControlDependency(inp);
}
}
}
}
return Status::OK();
}
void DebugStripper::Feedback(Cluster* cluster, const GrapplerItem& item,
const GraphDef& optimize_output, double result) {
// Takes no feedback.
}
} // end namespace grappler
} // end namespace tensorflow
| 35.092593 | 80 | 0.675462 | zhangyujing |
0e0a55ae47d3eca06c6b80dcdddee6ebea0ffd63 | 21,073 | cc | C++ | ns-allinone-2.35/ns-2.35/mdart/mdart_ndp.cc | nitishk017/ns2project | f037b796ff10300ffe0422580be5855c37d0b140 | [
"MIT"
] | 1 | 2018-03-05T15:23:27.000Z | 2018-03-05T15:23:27.000Z | ns-allinone-2.35/ns-2.35/mdart/mdart_ndp.cc | nitishk017/ns2project | f037b796ff10300ffe0422580be5855c37d0b140 | [
"MIT"
] | 1 | 2019-01-20T17:35:23.000Z | 2019-01-22T21:41:38.000Z | ns-allinone-2.35/ns-2.35/mdart/mdart_ndp.cc | nitishk017/ns2project | f037b796ff10300ffe0422580be5855c37d0b140 | [
"MIT"
] | 1 | 2021-09-29T16:06:57.000Z | 2021-09-29T16:06:57.000Z | /*******************************************************************************
* *
* M-DART Routing Protocol *
* *
* Copyright (C) 2006 by Marcello Caleffi *
* [email protected] *
* *
* 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. *
* *
* The M-DART code has been developed by Marcello Caleffi during his Ph.D. at *
* the Department of Biomedical, Electronic and Telecommunications Engineering *
* University of Naples Federico II, Italy. *
* *
* In order to give credit and recognition to the author, if you use M-DART *
* results or results obtained by modificating the M-DART source code, please *
* cite one of the following papers: *
* - M. Caleffi, L. Paura, "M-DART: Multi-Path Dynamic Address RouTing", *
* Wireless Communications and Mobile Computing, 2010 *
* - M. Caleffi, G. Ferraiuolo, L. Paura, "Augmented Tree-based Routing *
* Protocol for Scalable Ad Hoc Networks", Proc. of IEEE MASS '07: IEEE *
* Internatonal Conference on Mobile Adhoc and Sensor Systems, Pisa (Italy), *
* October 8-11 2007. *
* *
******************************************************************************/
#include <mdart/mdart_ndp.h>
#include <mdart/mdart.h>
//------------------------------------------------------------------------------
// Neigbor Discovery Protocol (NDP)
//------------------------------------------------------------------------------
NDP::NDP(MDART* mdart) {
mdart_ = mdart;
neighborSet_ = new neighborSet;
helloTimer_ = new NDPHelloTimer(this);
neighborTimer_ = new NDPNeighborTimer(this);
helloSeqNum_ = 0;
}
NDP::~NDP() {
delete helloTimer_;
delete neighborTimer_;
delete neighborSet_;
}
/*******************************************************************************
* NDP message functions
******************************************************************************/
void NDP::sendHello() {
#ifdef DEBUG_NDP
fprintf(stdout, "%.9f\tNDP::sendHello()\t\t\tin node %d\twith address %s\n", CURRENT_TIME, mdart_->id_, bitString(mdart_->address_));
#endif
Packet *sendPkt_ = Packet::alloc();
struct hdr_cmn *sendPktCh_ = HDR_CMN(sendPkt_);
struct hdr_ip *sendPktIh_ = HDR_IP(sendPkt_);
struct hdr_mdart_hello *sendPktRh_ = HDR_MDART_HELLO(sendPkt_);
sendPktCh_->ptype() = PT_MDART;
sendPktCh_->size() = IP_HDR_LEN + mdart_->size();
sendPktCh_->iface() = -2;
sendPktCh_->error() = 0;
sendPktCh_->addr_type() = NS_AF_NONE;
sendPktCh_->next_hop() = IP_BROADCAST;
sendPktIh_->saddr() = mdart_->id_;
sendPktIh_->daddr() = IP_BROADCAST;
sendPktIh_->sport() = RT_PORT;
sendPktIh_->dport() = RT_PORT;
sendPktIh_->ttl_ = IP_DEF_TTL;
sendPktRh_->type_ = MDART_TYPE_HELLO;
sendPktRh_->dstAdd_ = DATYPE_BROADCAST;
sendPktRh_->srcAdd_ = mdart_->address_;
sendPktRh_->srcId_ = mdart_->id_;
sendPktRh_->seqNum_ = helloSeqNum();
// PacketData* data_ = mdart_->routingTable_->getUpdate();
// assert(data_);
string string_ = mdart_->routingTable_->getUpdate();
string_ += "-";
if (mdart_->etxMetric_ == 1) {
string_ += getNeighborQuality();
}
PacketData* data_ = new PacketData(string_.length() + 2);
strcpy((char *)data_->data(), string_.data());
sendPkt_->setdata(data_);
sendPktCh_->size() = IP_HDR_LEN + string_.length() + 2 + mdart_->size();
#ifdef DEBUG_NDP
fprintf(stdout, "\tsendPktIh_->saddr = %d\n", sendPktIh_->saddr());
fprintf(stdout, "\tsendPktIh_->daddr = %d\n", sendPktIh_->daddr());
fprintf(stdout, "\tsendPktRh_->srcId_ = %d\n", sendPktRh_->srcId_);
fprintf(stdout, "\tsendPktRh_->srcAdd_ = %s\n", bitString(sendPktRh_->srcAdd_));
fprintf(stdout, "\tsendPktRh_->dstAdd_ = %s\n", bitString(sendPktRh_->dstAdd_));
fprintf(stdout, "\tsendPktRh_->seqNum_ = %d\n", sendPktRh_->seqNum_);
fprintf(stdout, "\tsendPktRh_->data() = %s\n", ((PacketData*)sendPkt_->userdata())->data());
// if (mdart_->logtarget_ != 0) {
// sprintf(mdart_->logtarget_->pt_->buffer(), "x -t %.9f mdart sendHello srcId %d srcAdd %s dstAdd %s seqNum %d", CURRENT_TIME, sendPktRh_->srcId_, bitString(sendPktRh_->srcAdd_), bitString(sendPktRh_->dstAdd_), sendPktRh_->seqNum_);
// mdart_->logtarget_->pt_->dump();
// }
#endif
Scheduler::instance().schedule(mdart_->getTarget(), sendPkt_, 0.0);
}
void NDP::recvHello(Packet* recvPkt_) {
struct hdr_mdart_hello *recvPktRh_ = HDR_MDART_HELLO(recvPkt_);
#ifdef DEBUG_NDP
fprintf(stdout, "%.9f\tNDP::recvHello()\t\t\tin node %d\twith address %s\n", CURRENT_TIME, mdart_->id_, bitString(mdart_->address_));
struct hdr_ip *recvPktIh_ = HDR_IP(recvPkt_);
fprintf(stdout, "\trecvPktIh_->saddr = %d\n", recvPktIh_->saddr());
fprintf(stdout, "\trecvPktIh_->daddr = %d\n", recvPktIh_->daddr());
fprintf(stdout, "\trecvPktRh_->dstAdd_ = %s\n", bitString(recvPktRh_->dstAdd_));
fprintf(stdout, "\trecvPktRh_->srcAdd_ = %s\n", bitString(recvPktRh_->srcAdd_));
fprintf(stdout, "\trecvPktRh_->srcId_ = %d\n", recvPktRh_->srcId_);
fprintf(stdout, "\trecvPktRh_->seqNum_ = %d\n", recvPktRh_->seqNum_);
fprintf(stdout, "\tsendPktRh_->data() = %s\n", ((PacketData*)recvPkt_->userdata())->data());
#endif
ostringstream strStream_;
strStream_ << ((PacketData*)recvPkt_->userdata())->data();
string string_ = strStream_.str();
string::size_type start_ = string_.find_first_not_of("-", 0);
string::size_type end_ = string_.find_first_of("-", start_);
// string table_ = "-";
// if ((int) end_ > -1)
// table_ = string_.substr(start_, end_);
// else
// end_ = (size_t) 0;
string table_ = string_.substr(start_, end_);
double forQuality_ = (double) 0.0;
#ifdef DEBUG_NDP
fprintf(stdout, "\ttable_ = %s\n", table_.c_str());
#endif
if (mdart_->etxMetric_ == 1) {
string quality_ = string_.substr(end_ + 1, string_.size() - end_ - 1);
#ifdef DEBUG_NDP
fprintf(stdout, "\tquality_ = %s\n", quality_.c_str());
#endif
string::size_type lastPos_ = quality_.find_first_not_of(";", 0);
string::size_type pos_ = quality_.find_first_of(";", lastPos_);
while (string::npos != pos_ || string::npos != lastPos_) {
string neighbor_ = quality_.substr(lastPos_, pos_ - lastPos_);
string::size_type idLastPos_ = neighbor_.find_first_not_of(",", 0);
string::size_type idPos_ = neighbor_.find_first_of(",", idLastPos_);
nsaddr_t id_ = atoi(neighbor_.substr(idLastPos_, idPos_ - idLastPos_).c_str());
string::size_type qualityLastPos_ = neighbor_.find_first_not_of(",", idPos_);
string::size_type qualityPos_ = neighbor_.find_first_of(",", qualityLastPos_);
#ifdef DEBUG_NDP
fprintf(stdout, "\tneigh id %d\tquality %f\n", id_, forQuality_);
#endif
if (id_ == mdart_->id_) {
#ifdef DEBUG_NDP
fprintf(stdout, "\t\tinsert\n");
#endif
forQuality_ = atof(neighbor_.substr(qualityLastPos_, qualityPos_ - qualityLastPos_).c_str());
}
lastPos_ = quality_.find_first_not_of(";", pos_);
pos_ = quality_.find_first_of(";", lastPos_);
}
}
neighborInsert(recvPktRh_->srcId_, recvPktRh_->srcAdd_, recvPktRh_->seqNum_, table_, forQuality_);
Packet::free(recvPkt_);
}
/*******************************************************************************
* NDP timers functions
******************************************************************************/
void NDP::startHelloTimer() {
helloTimer_->handle((Event*) 0);
}
void NDP::startNeighborTimer() {
neighborTimer_->handle((Event*) 0);
}
/*******************************************************************************
* NDP neighbor list functions
******************************************************************************/
Neighbor* NDP::neighborLookup(nsaddr_t id) {
// #ifdef DEBUG
// fprintf(stdout, "%.9f\tNDP::neighborLookup(%d)\t\t\tin node %d\twith address %s\n", CURRENT_TIME, id, mdart_->id_, bitString(mdart_->address_));
// #endif
neighborSet::iterator neighbor_;
for (neighbor_ = neighborSet_->begin(); neighbor_ != neighborSet_->end(); ++neighbor_) {
if((*neighbor_)->id() == id) {
// #ifdef DEBUG
// fprintf(stdout, "\tId found\n");
// #endif
return (*neighbor_);
}
}
return 0;
}
void NDP::neighborInsert(nsaddr_t id, nsaddr_t address, u_int32_t helloSeqNum, string table, double quality) {
#ifdef DEBUG_NDP
fprintf(stdout, "%.9f\tNDP::neighborInsert(%d, %s, %f)\t\tin node %d\twith address %s\n", CURRENT_TIME, id, bitString(address), quality, mdart_->id_, bitString(mdart_->address_));
#endif
Neighbor *neighbor_ = neighborLookup(id);
if (neighbor_ == 0) {
// fprintf(stdout, "\tNeighbor inserted\n");
neighbor_ = new Neighbor(id, address, helloSeqNum);
neighborSet_->insert(neighbor_);
}
else {
neighbor_->address(address, helloSeqNum);
// neighbor_->expire(expire);
}
//#ifdef LQE_ALGORITHM_MA
// if (quality != 0)
neighbor_->forLinkQuality(quality);
//#endif
neighbor_->updateTable(table);
}
/*
void NDP::neighborDelete(nsaddr_t id) {
#ifdef DEBUG_NDP
fprintf(stdout, "%.9f\tNDP::neighborDelete(%d)\t\t\tin node %d\twith address %s\n", CURRENT_TIME, id, mdart_->id_, bitString(mdart_->address_));
#endif
neighborSet::iterator neighbor_;
for (neighbor_ = neighborSet_->begin(); neighbor_ != neighborSet_->end(); ++neighbor_) {
if((*neighbor_)->id() == id) {
neighborSet_->erase(neighbor_);
#ifdef DEBUG_NDP
fprintf(stdout, "\tNeighbor removed\n");
#endif
break;
}
}
}
*/
void NDP::neighborPurge(void) {
#ifdef DEBUG_NDP
fprintf(stdout, "%.9f\tNDP::neighborPurge()\t\t\tin node %d\twith address %s\n", CURRENT_TIME, mdart_->id_, bitString(mdart_->address_));
#endif
double now = CURRENT_TIME;
neighborSet::iterator neighbor_ = neighborSet_->begin();
while (neighbor_ != neighborSet_->end()) {
neighborSet::iterator nextNeighbor_ = neighbor_;
++nextNeighbor_;
if((*neighbor_)->expire() <= now) {
// mdart_->routingTable_->purge((*neighbor_)->id_);
neighborSet_->erase(neighbor_);
delete (*neighbor_);
#ifdef DEBUG_NDP
fprintf(stdout, "\tNeighbor purged\n");
#endif
}
else {
(*neighbor_)->purgeHello();
}
neighbor_ = nextNeighbor_;
}
/* neighborSet::iterator neighbor_;
for (neighbor_ = neighborSet_->begin(); neighbor_ != neighborSet_->end(); ++neighbor_) {
#ifdef DEBUG
fprintf(stdout, "\tNeighbor id = %d\texpire = %.9f\n", (*neighbor_)->id_, (*neighbor_)->expire());
#endif
if((*neighbor_)->expire() <= now) {
// mdart_->routingTable_->purge((*neighbor_)->id_);
neighborSet_->erase(neighbor_);
delete (*neighbor_);
#ifdef DEBUG
fprintf(stdout, "\tNeighbor purged\n");
#endif
}
}
*/}
void NDP::neighborPrint() {
#ifdef DEBUG_ADDRESS_ALLOCATION
fprintf(stdout, "\tNDP::neighborPrint()\t\t\tin node %d\twith address %s\n", mdart_->id_, bitString(mdart_->address_));
#endif
neighborSet::iterator neighbor_;
//#ifdef DEBUG_ADDRESS_ALLOCATION
for (neighbor_ = neighborSet_->begin(); neighbor_ != neighborSet_->end(); ++neighbor_) {
fprintf(stdout, "\t\tNeighbor id=%d\taddress=%s\n", (*neighbor_)->id(), bitString((*neighbor_)->address()));
// (*neighbor_)->printTable();
// ora
}
//#endif
}
int NDP::neighborDegree() {
int degree = 0;
neighborSet::iterator neighbor_;
for (neighbor_ = neighborSet_->begin(); neighbor_ != neighborSet_->end(); ++neighbor_) {
degree += 1;
}
return degree;
}
int NDP::realNeighborDegree() {
int degree = 0;
neighborSet::iterator neighbor_;
for (neighbor_ = neighborSet_->begin(); neighbor_ != neighborSet_->end(); ++neighbor_) {
if(((*neighbor_)->expire() - (1.5 * NDP_ALLOWED_HELLO_LOSS * NDP_HELLO_INTERVAL) + NDP_HELLO_INTERVAL) >= CURRENT_TIME) {
degree += 1;
}
}
return degree;
}
/*
void NDP::setNeighborQuality(string str_) {
string::size_type lastPos_ = str_.find_first_not_of(";", 0);
string::size_type pos_ = str_.find_first_of(";", lastPos_);
while (string::npos != pos_ || string::npos != lastPos_) {
string neighbor_ = str_.substr(lastPos_, pos_ - lastPos_);
string::size_type idLastPos_ = neighbor_.find_first_not_of(",", 0);
string::size_type idPos_ = neighbor_.find_first_of(",", idLastPos_);
nsaddr_t id_ = atoi(neighbor_.substr(idLastPos_, idPos_ - idLastPos_).c_str());
string::size_type qualityLastPos_ = neighbor_.find_first_not_of(",", idPos_);
string::size_type qualityPos_ = neighbor_.find_first_of(",", qualityLastPos_);
double quality_ = atoi(neighbor_.substr(qualityLastPos_, qualityPos_ - qualityLastPos_).c_str());
#ifdef DEBUG_NDP
fprintf(stdout, "\tneigh id %d\tquality %f\n", id_, quality_);
#endif
// addEntry(id_, address_, expire_);
lastPos_ = str_.find_first_not_of(";", pos_);
pos_ = str_.find_first_of(";", lastPos_);
}
// dht_->setDHTUpdate((PacketData*)recvPkt->userdata());
}
*/
string NDP::getNeighborQuality() {
#ifdef DEBUG_NDP
fprintf(stdout, "%.9f\tNDP::getNeighborQuality()\n", CURRENT_TIME);
#endif
string str_;
neighborSet::iterator neighbor_;
for (neighbor_ = neighborSet_->begin(); neighbor_ != neighborSet_->end(); ++neighbor_) {
/* if((*neighbor_)->revLinkQuality() < LQE_RV_THRESHOLD) {
fprintf(stdout, "%.9f\tNDP::getNeighborQuality()\n", CURRENT_TIME);
fprintf(stdout, "\tid = %d\trevLinkQuality() = %f\n", (*neighbor_)->id(), (*neighbor_)->revLinkQuality());
// (*neighbor_)->printHello();
}*/
// if((*neighbor_)->revLinkQuality() >= LQE_RV_THRESHOLD) {
ostringstream stream_;
stream_ << (*neighbor_)->id();
stream_ << ',';
stream_ << (*neighbor_)->revLinkQuality();
stream_ << ';';
str_ += stream_.str();
// }
}
#ifdef DEBUG_NDP
fprintf(stdout, "\tdata = %s\n", str_.data());
#endif
return str_;
}
/*******************************************************************************
* NDP management functions
******************************************************************************/
void NDP::selectAddress() {
#ifdef DEBUG_NDP
fprintf(stdout, "\tNDP::selectAddress()\t\t\tin node %d\twith address %s\n", mdart_->id_, bitString(mdart_->address_));
#endif
neighborSet::iterator neighbor_;
for (neighbor_ = neighborSet_->begin(); neighbor_ != neighborSet_->end(); ++neighbor_) {
#ifdef DEBUG_NDP_LINK_QUALITY
if (mdart_->etxMetric_ == 1 && (*neighbor_)->linkQuality() < LQE_THRESHOLD) {
fprintf(stdout, "%.9f\tNDP::selectAddress()\t\t\tin node %d\twith address %s\n", CURRENT_TIME, mdart_->id_, bitString(mdart_->address_));
fprintf(stdout, "\tlinkQuality() = %f\trevLinkQuality() = %f\n", (*neighbor_)->linkQuality(), (*neighbor_)->revLinkQuality());
}
#endif
if ((mdart_->etxMetric_ == 1 && (*neighbor_)->linkQuality() > LQE_THRESHOLD) || mdart_->etxMetric_ == 0) {
#ifdef DEBUG_NDP
fprintf(stdout, "\t\tselected neighbor id=%d\taddress=%s\n", (*neighbor_)->id(), bitString((*neighbor_)->address()));
#endif
int i;
for(i=(*neighbor_)->insertionPoint(); i>-1; i--) {
std::bitset<ADDR_SIZE> bitNewAddress_((*neighbor_)->address());
bitNewAddress_.flip(i);
mdart_->address_ = bitNewAddress_.to_ulong();
#ifdef DEBUG_ADDRESS_ALLOCATION
fprintf(stdout, "\t\ttrying address=%s\n", bitString(mdart_->address_));
#endif
mdart_->routingTable_->setUpdate((*neighbor_));
if (validateAddress()) {
#ifdef DEBUG_ADDRESS_ALLOCATION
fprintf(stdout, "\t\taddress selected is %s\n", bitNewAddress_.to_string().c_str());
#endif
mdart_->adp_->updateAdd();
return;
}
else {
#ifdef DEBUG_NDP
fprintf(stdout, "\t\taddress selected %s is not valid\n", bitNewAddress_.to_string().c_str());
#endif
mdart_->address_ = mdart_->oldAddress_;
mdart_->routingTable_->clear();
}
}
}
}
#ifdef DEBUG_NDP
fprintf(stdout, "\t\tcouldn't select a valid address\n");
#endif
}
bool NDP::validateAddress() {
#ifdef DEBUG_ADDRESS_ALLOCATION
fprintf(stdout, "\tNDP::validateAddress()\t\t\tin node %d\twith address %s\n", mdart_->id_, bitString(mdart_->address_));
mdart_->routingTable_->print();
#endif
neighborSet::iterator neighbor_;
for (neighbor_ = neighborSet_->begin(); neighbor_ != neighborSet_->end(); ++neighbor_) {
#ifdef DEBUG_NDP_LINK_QUALITY
fprintf(stdout, "\tid = %d\tlinkQuality() = %f\trevLinkQuality() = %f\n", (*neighbor_)->id(), (*neighbor_)->linkQuality(), (*neighbor_)->revLinkQuality());
#endif
if ((mdart_->etxMetric_ == 1 && (*neighbor_)->linkQuality() >= LQE_THRESHOLD) || mdart_->etxMetric_ == 0) {
int levelSibling_ = DiffBit(mdart_->address_, (*neighbor_)->address());
#ifdef DEBUG_ADDRESS_ALLOCATION
fprintf(stdout, "\t\tNeighbor id=%d\taddress = %s\tLevel sibling = %d\n", (*neighbor_)->id(), bitString((*neighbor_)->address()), levelSibling_);
#endif
if (levelSibling_ == -1) {
#ifdef DEBUG_ADDRESS_ALLOCATION
if ((*neighbor_)->id() >= mdart_->id_) {
fprintf(stdout, "\t\t\tNeighbor id=%d >= node id=%d\n", (*neighbor_)->id(), mdart_->id_);
}
#endif
if ((*neighbor_)->id() < mdart_->id_) {
#ifdef DEBUG_ADDRESS_ALLOCATION
fprintf(stdout, "\t\t\tNeighbor id=%d < node id=%d\n", (*neighbor_)->id(), mdart_->id_);
fprintf(stdout, "\t\t\tinvalid address\n");
#endif
return false;
}
}
else {
#ifdef DEBUG_ADDRESS_ALLOCATION
if (!(*neighbor_)->entryPresent(levelSibling_)) {
fprintf(stdout, "\t\t\tNeighbor Entry not present\n");
}
#endif
if ((*neighbor_)->entryPresent(levelSibling_)) {
#ifdef DEBUG_ADDRESS_ALLOCATION
if ((*neighbor_)->networkId(levelSibling_) >= mdart_->routingTable_->levelId(levelSibling_-1)) {
fprintf(stdout, "\t\t\tNeighborTableEntry->networkId(%d)=%d >= node levelId(%d)=%d\n", levelSibling_, (*neighbor_)->networkId(levelSibling_), levelSibling_ -1 , mdart_->routingTable_->levelId(levelSibling_-1));
}
#endif
if ((*neighbor_)->networkId(levelSibling_) < mdart_->routingTable_->levelId(levelSibling_-1)) {
#ifdef DEBUG_ADDRESS_ALLOCATION
fprintf(stdout, "\t\t\tNeighborTableEntry->networkId(%d)=%d < node levelId(%d)=%d\n", levelSibling_, (*neighbor_)->networkId(levelSibling_), levelSibling_ -1 , mdart_->routingTable_->levelId(levelSibling_-1));
fprintf(stdout, "\t\t\tinvalid address\n");
#endif
return false;
}
}
}
#ifdef DEBUG_ADDRESS_ALLOCATION
fprintf(stdout, "\t\t\tvalid address\n");
#endif
}
}
return true;
}
void NDP::updateRoutingTable() {
#ifdef DEBUG_NDP_LINK_QUALITY
fprintf(stdout, "%.9f\tNDP::updateRoutingTable()\t\t\tin node %d\twith address %s\n", CURRENT_TIME, mdart_->id_, bitString(mdart_->address_));
#endif
neighborSet::iterator neighbor_;
for (neighbor_ = neighborSet_->begin(); neighbor_ != neighborSet_->end(); ++neighbor_) {
#ifdef DEBUG_NDP_LINK_QUALITY
if (mdart_->etxMetric_ == 1 && (*neighbor_)->linkQuality() < LQE_THRESHOLD) {
fprintf(stdout, "\tid = %d\tlinkQuality() = %f\trevLinkQuality() = %f\n", (*neighbor_)->id(), (*neighbor_)->linkQuality(), (*neighbor_)->revLinkQuality());
// neighborPrint();
}
#endif
if ((mdart_->etxMetric_ == 1 && (*neighbor_)->linkQuality() >= LQE_THRESHOLD) || mdart_->etxMetric_ == 0)
mdart_->routingTable_->setUpdate(*neighbor_);
}
}
| 40.839147 | 234 | 0.631472 | nitishk017 |
0e0ceb72e77c4782d9e004faeb4b11acc9674d8a | 40,072 | cpp | C++ | tx2-setup/robust_pose_graph_optimization/buzz_slam/src/slam/specialized/dataset/buzz_slam_dataset.cpp | SnowCarter/DOOR-SLAM | cf56d2b4b7a21ed7c6445f01600408c9dd5235c6 | [
"MIT"
] | 3 | 2021-07-05T17:59:01.000Z | 2022-03-31T12:46:25.000Z | tx2-setup/robust_pose_graph_optimization/buzz_slam/src/slam/specialized/dataset/buzz_slam_dataset.cpp | SnowCarter/DOOR-SLAM | cf56d2b4b7a21ed7c6445f01600408c9dd5235c6 | [
"MIT"
] | null | null | null | tx2-setup/robust_pose_graph_optimization/buzz_slam/src/slam/specialized/dataset/buzz_slam_dataset.cpp | SnowCarter/DOOR-SLAM | cf56d2b4b7a21ed7c6445f01600408c9dd5235c6 | [
"MIT"
] | 3 | 2020-03-25T16:21:25.000Z | 2021-07-05T16:37:34.000Z | #include "buzz_slam_dataset.h"
#include <iostream>
#include <stdlib.h>
#include <time.h>
#include <cmath>
#include "boost/filesystem.hpp"
namespace buzz_slam {
/****************************************/
/****************************************/
BuzzSLAMDataset::BuzzSLAMDataset() {
}
/****************************************/
/****************************************/
BuzzSLAMDataset::~BuzzSLAMDataset() {
}
/****************************************/
/****************************************/
void BuzzSLAMDataset::Init(buzzvm_t buzz_vm, const gtsam::Point3& t_gt, const gtsam::Rot3& R_gt){
BuzzSLAM::Init(buzz_vm);
// Initialize for tracing variables
number_of_outliers_added_ = 0;
number_of_inliers_added_ = 0;
// Initialize random numbers generators
srand(time(NULL));
gen_translation_ = std::mt19937{rd_()};
gen_rotation_ = std::mt19937{rd_()};
gen_outliers_ = std::mt19937{rd_()};
normal_distribution_translation_ = std::normal_distribution<>{0, translation_noise_std_};
normal_distribution_rotation_ = std::normal_distribution<>{0, rotation_noise_std_};
uniform_distribution_outliers_translation_ = std::uniform_real_distribution<>{0, sensor_range_};
uniform_distribution_outliers_rotation_ = std::uniform_real_distribution<>{-M_PI, M_PI};
uniform_distribution_draw_outlier_ = std::uniform_real_distribution<>{0, 1};
previous_symbol_ = gtsam::Symbol(robot_id_char_, number_of_poses_);
// Isotropic noise models
chordal_graph_noise_model_ = gtsam::noiseModel::Isotropic::Variance(12, 1);
// Initialize log files
if (is_simulation_ && robot_id_ == 0 && !boost::filesystem::exists(error_file_name_)) {
// Write results to csv
std::ofstream error_file;
error_file.open(error_file_name_, std::ios::out | std::ios::app);
error_file << "NumberOfRobots\tNumberOfPoses\tNumberOfSeparators\tOutlierPeriod\tUsesIncrementalSolving"
"\tRotationNoiseStd\tTranslationNoiseStd\tRotationChangeThreshold\tPoseChangeThreshold"
"\tOptimizerPeriod\tChiSquaredProbability"
"\tErrorCentralized\tErrorDecentralized\tErrorInitial\tNumberOfRotationIterations\tNumberOfPoseIterations"
"\tNumberOfInliers\tNumberOfOutliers\tNumberOfSeparatorsRejected\tNumberOfOutliersNotRejected\n";
error_file.close();
}
std::string log_file_name = log_folder_ + std::to_string(robot_id_) + "_inliers_added_keys.g2o";
std::remove(log_file_name.c_str());
log_file_name = log_folder_ + std::to_string(robot_id_) + "_outliers_added_keys.g2o";
std::remove(log_file_name.c_str());
log_file_name = log_folder_ + std::to_string(robot_id_) + "_reference_frame.g2o";
std::remove(log_file_name.c_str());
// Read .g2o dataset file
std::string dataset_file_name = dataset_name_ + "/" + std::to_string(robot_id_) + ".g2o";
auto dataset_graph_and_values = gtsam::readG2o(dataset_file_name, true);
// Fill values with odometry starting from ground truth position
auto initial_orientation = R_gt;
auto initial_translation = t_gt;
auto current_pose = gtsam::Pose3(initial_orientation, initial_translation);
auto current_key = gtsam::Symbol(robot_id_char_, 0).key();
dataset_graph_and_values.second->insert(current_key, current_pose);
for (auto factor : *dataset_graph_and_values.first) {
auto between_factor = boost::dynamic_pointer_cast<gtsam::BetweenFactor<gtsam::Pose3>>(factor);
auto first_key = between_factor->key1();
auto first_symbol = gtsam::Symbol(first_key);
auto second_key = between_factor->key2();
auto second_symbol = gtsam::Symbol(second_key);
dataset_factors_.insert(std::make_pair(std::make_pair(first_key, second_key), between_factor));
if (first_symbol.chr() == robot_id_char_ && second_symbol.chr() == robot_id_char_) {
if (first_key == current_key) {
// Measurement
gtsam::Pose3 measurement(between_factor->measured().rotation(),
gtsam::Point3(between_factor->measured().x()/10, between_factor->measured().y()/10, between_factor->measured().z()/10));
// Compose previous pose and measurement
current_pose = current_pose * measurement;
// Add pose
dataset_graph_and_values.second->insert(second_key, current_pose);
} else {
// Find first pose
current_pose = dataset_graph_and_values.second->at<gtsam::Pose3>(first_key);
// Measurement
gtsam::Pose3 measurement(between_factor->measured().rotation(),
gtsam::Point3(between_factor->measured().x()/10, between_factor->measured().y()/10, between_factor->measured().z()/10));
// Compose previous pose and measurement
current_pose = current_pose * measurement;
// Add pose
dataset_graph_and_values.second->insert(second_key, current_pose);
}
} else {
if (first_symbol.chr() == robot_id_char_ && first_symbol.index() > second_symbol.index()) {
if (loop_closure_linked_to_key_.count(first_key) == 0) {
loop_closure_linked_to_key_.insert(std::make_pair(first_key, std::make_pair(first_key, second_key)));
}
} else if (second_symbol.chr() == robot_id_char_ && second_symbol.index() > first_symbol.index()) {
if (loop_closure_linked_to_key_.count(second_key) == 0) {
loop_closure_linked_to_key_.insert(std::make_pair(second_key, std::make_pair(first_key, second_key)));
}
}
}
}
dataset_reading_ended_ = false;
dataset_values_ = dataset_graph_and_values.second;
}
/****************************************/
/****************************************/
bool BuzzSLAMDataset::KeyExists(const gtsam::Key& key) {
return dataset_values_->exists(key);
}
/****************************************/
/****************************************/
gtsam::Pose3 BuzzSLAMDataset::GetPoseAtKey(const gtsam::Key& key) {
return dataset_values_->at<gtsam::Pose3>(key);
}
/****************************************/
/****************************************/
void BuzzSLAMDataset::LoadParameters(const std::string& dataset_name, const double& sensor_range, const int& outlier_period) {
sensor_range_ = sensor_range;
dataset_name_ = dataset_name;
outlier_period_ = outlier_period;
}
/****************************************/
/****************************************/
void BuzzSLAMDataset::AddOdometryMeasurement() {
// Increase the number of poses
IncrementNumberOfPoses();
// Next symbol
gtsam::Symbol current_symbol = gtsam::Symbol(robot_id_char_, number_of_poses_);
// Initialize factor
if (dataset_factors_.count(std::make_pair(previous_symbol_, current_symbol)) != 0) {
auto new_factor = dataset_factors_.at(std::make_pair(previous_symbol_, current_symbol));
// Add gaussian noise
auto measurement = new_factor->measured();
// Update attributes
auto new_pose = poses_initial_guess_->at<gtsam::Pose3>(previous_symbol_.key()) * measurement;
auto new_pose_no_updates = poses_initial_guess_no_updates_->at<gtsam::Pose3>(previous_symbol_.key()) * measurement;
poses_initial_guess_no_updates_->insert(current_symbol.key(), new_pose_no_updates);
auto new_pose_incremental = poses_initial_guess_centralized_incremental_updates_->at<gtsam::Pose3>(previous_symbol_.key()) * measurement;
poses_initial_guess_centralized_incremental_updates_->insert(current_symbol.key(), new_pose_incremental);
// Update attributes
previous_symbol_ = current_symbol;
// Add new factor to local pose graph
local_pose_graph_->push_back(new_factor);
local_pose_graph_no_filtering_->push_back(new_factor);
// Add new pose estimate into initial guess
poses_initial_guess_->insert(current_symbol.key(), new_pose);
// Add transform to local map for pairwise consistency maximization
auto covariance_matrix = boost::dynamic_pointer_cast< gtsam::noiseModel::Gaussian >(new_factor->noiseModel())->covariance();
robot_local_map_.addTransform(*new_factor, covariance_matrix);
} else {
number_of_poses_ --;
dataset_reading_ended_ = true;
}
}
/****************************************/
/****************************************/
gtsam::Pose3 BuzzSLAMDataset::OutlierMeasurement(const gtsam::Rot3& R, const gtsam::Point3& t) {
// TODO: Add option to add noise greater than 3 or 5 sigmas, instead of totally random measurment
// This is why this method takes the measurement in parameter.
gtsam::Point3 t_outlier = { uniform_distribution_outliers_translation_(gen_outliers_),
uniform_distribution_outliers_translation_(gen_outliers_),
uniform_distribution_outliers_translation_(gen_outliers_) };
gtsam::Rot3 R_outlier = gtsam::Rot3::Ypr( uniform_distribution_outliers_rotation_(gen_outliers_),
uniform_distribution_outliers_rotation_(gen_outliers_),
uniform_distribution_outliers_rotation_(gen_outliers_));
number_of_outliers_added_++;
return gtsam::Pose3(R_outlier, t_outlier);
}
/****************************************/
/****************************************/
int BuzzSLAMDataset::AddSeparatorMeasurement() {
if (loop_closure_linked_to_key_.count(previous_symbol_.key()) == 0) {
return 0;
}
// Separator symbols
auto loop_closure_keys = loop_closure_linked_to_key_.at(previous_symbol_.key());
AddNewKnownRobot(gtsam::Symbol(loop_closure_keys.first).chr());
AddNewKnownRobot(gtsam::Symbol(loop_closure_keys.second).chr());
// Get factor or make it an outlier
boost::shared_ptr<gtsam::BetweenFactor<gtsam::Pose3>> new_factor = dataset_factors_.at(std::make_pair(loop_closure_keys.first, loop_closure_keys.second));
gtsam::Pose3 measurement = new_factor->measured();
number_of_inliers_added_++;
auto covariance_matrix = boost::dynamic_pointer_cast< gtsam::noiseModel::Gaussian >(new_factor->noiseModel())->covariance();
UpdateCurrentSeparatorBuzzStructure( (int)(gtsam::Symbol(loop_closure_keys.first).chr() - 97),
(int)(gtsam::Symbol(loop_closure_keys.second).chr() - 97),
gtsam::Symbol(loop_closure_keys.first).index(),
gtsam::Symbol(loop_closure_keys.second).index(),
measurement.x(),
measurement.y(),
measurement.z(),
measurement.rotation().quaternion()[1],
measurement.rotation().quaternion()[2],
measurement.rotation().quaternion()[3],
measurement.rotation().quaternion()[0],
covariance_matrix );
inliers_keys_.insert(std::make_pair(loop_closure_keys.first, loop_closure_keys.second));
// Add new factor to local pose graph
local_pose_graph_->push_back(new_factor);
local_pose_graph_no_filtering_->push_back(new_factor);
// Add transform to local map for pairwise consistency maximization
robot_local_map_.addTransform(*new_factor, covariance_matrix);
covariance_matrix_for_outlier_ = covariance_matrix;
// Add info for flagged initialization
IncrementNumberOfSeparatorsWithOtherRobot((int) gtsam::Symbol(loop_closure_keys.first).chr() - 97);
IncrementNumberOfSeparatorsWithOtherRobot((int) gtsam::Symbol(loop_closure_keys.second).chr() - 97);
IncrementNumberOfInliersWithOtherRobot((int) gtsam::Symbol(loop_closure_keys.first).chr() - 97);
IncrementNumberOfInliersWithOtherRobot((int) gtsam::Symbol(loop_closure_keys.second).chr() - 97);
return 1;
}
/****************************************/
/****************************************/
void BuzzSLAMDataset::IncrementNumberOfOutliersWithOtherRobot(const int& other_robot_id) {
if (other_robot_id != robot_id_) {
if (number_of_outliers_with_each_robot_.count(other_robot_id) == 0) {
number_of_outliers_with_each_robot_.insert(std::make_pair(other_robot_id, 1));
} else {
number_of_outliers_with_each_robot_[other_robot_id] = number_of_outliers_with_each_robot_[other_robot_id] + 1;
}
}
}
/****************************************/
/****************************************/
void BuzzSLAMDataset::IncrementNumberOfInliersWithOtherRobot(const int& other_robot_id) {
if (other_robot_id != robot_id_) {
if (number_of_inliers_with_each_robot_.count(other_robot_id) == 0) {
number_of_inliers_with_each_robot_.insert(std::make_pair(other_robot_id, 1));
} else {
number_of_inliers_with_each_robot_[other_robot_id] = number_of_inliers_with_each_robot_[other_robot_id] + 1;
}
}
}
/****************************************/
/****************************************/
int BuzzSLAMDataset::AddSeparatorMeasurementOutlier() {
// Separator symbols
if (known_other_robots_.empty() || dataset_reading_ended_){
return 0;
}
auto random_id = std::floor(uniform_distribution_draw_outlier_(gen_outliers_) * number_of_robots_);
while (random_id == robot_id_ || known_other_robots_.find((char) random_id + 97) == known_other_robots_.end()) {
random_id = std::floor(uniform_distribution_draw_outlier_(gen_outliers_) * number_of_robots_);
}
if (number_of_inliers_with_each_robot_[random_id] <= number_of_outliers_with_each_robot_[random_id] + 1) {
return 0;
}
auto random_index1 = std::floor(uniform_distribution_draw_outlier_(gen_outliers_) * (number_of_poses_-1) + 1);
auto random_index2 = std::floor(uniform_distribution_draw_outlier_(gen_outliers_) * (number_of_poses_-1) + 1);
auto loop_closure_keys = std::make_pair(gtsam::Symbol(robot_id_char_, random_index1), gtsam::Symbol((char)(random_id + 97), random_index2));
// Get an outlier
gtsam::Pose3 measurement = OutlierMeasurement(gtsam::Rot3(), gtsam::Point3());
boost::shared_ptr<gtsam::BetweenFactor<gtsam::Pose3>> new_factor = boost::make_shared<gtsam::BetweenFactor<gtsam::Pose3>>(gtsam::Symbol(loop_closure_keys.first), gtsam::Symbol(loop_closure_keys.second), measurement, gtsam::noiseModel::Gaussian::Covariance(covariance_matrix_for_outlier_));
UpdateCurrentSeparatorBuzzStructure( (int)(gtsam::Symbol(loop_closure_keys.first).chr() - 97),
(int)(gtsam::Symbol(loop_closure_keys.second).chr() - 97),
gtsam::Symbol(loop_closure_keys.first).index(),
gtsam::Symbol(loop_closure_keys.second).index(),
measurement.x(),
measurement.y(),
measurement.z(),
measurement.rotation().quaternion()[1],
measurement.rotation().quaternion()[2],
measurement.rotation().quaternion()[3],
measurement.rotation().quaternion()[0],
covariance_matrix_for_outlier_ );
outliers_keys_.insert(std::make_pair(loop_closure_keys.first, loop_closure_keys.second));
// Add new factor to local pose graph
local_pose_graph_->push_back(new_factor);
local_pose_graph_no_filtering_->push_back(new_factor);
// Add transform to local map for pairwise consistency maximization
robot_local_map_.addTransform(*new_factor, covariance_matrix_for_outlier_);
// Add info for flagged initialization
IncrementNumberOfOutliersWithOtherRobot((int) gtsam::Symbol(loop_closure_keys.second).chr() - 97);
return 1;
}
/****************************************/
/****************************************/
void BuzzSLAMDataset::WriteOptimizedDataset() {
BuzzSLAM::WriteOptimizedDataset();
std::string inliers_added_file_name = log_folder_ + std::to_string(robot_id_) + "_number_of_inliers_added.g2o";
std::ofstream inliers_added_file;
inliers_added_file.open(inliers_added_file_name, std::ios::trunc);
inliers_added_file << number_of_inliers_added_ << "\n" ;
inliers_added_file.close();
std::string outliers_keys_file_name = log_folder_ + std::to_string(robot_id_) + "_outliers_added_keys.g2o";
std::ofstream outliers_keys_file;
outliers_keys_file.open(outliers_keys_file_name, std::ios::trunc);
for (const auto& keys : outliers_keys_) {
outliers_keys_file << keys.first << " " << keys.second << "\n" ;
}
outliers_keys_file.close();
std::string inliers_keys_file_name = log_folder_ + std::to_string(robot_id_) + "_inliers_added_keys.g2o";
std::ofstream inliers_keys_file;
inliers_keys_file.open(inliers_keys_file_name, std::ios::trunc);
for (const auto& keys : inliers_keys_) {
inliers_keys_file << keys.first << " " << keys.second << "\n" ;
}
inliers_keys_file.close();
std::string reference_frame_file_name = log_folder_ + std::to_string(robot_id_) + "_reference_frame.g2o";
std::ofstream reference_frame_file;
reference_frame_file.open(reference_frame_file_name, std::ios::trunc);
reference_frame_file << lowest_id_included_in_global_map_ << "\n" ;
reference_frame_file.close();
}
/****************************************/
/****************************************/
void BuzzSLAMDataset::RemoveRejectedKeys() {
for (const auto& rejected_pair : rejected_keys_) {
inliers_keys_.erase(rejected_pair);
inliers_keys_.erase(std::make_pair(rejected_pair.second, rejected_pair.first));
outliers_keys_.erase(rejected_pair);
outliers_keys_.erase(std::make_pair(rejected_pair.second, rejected_pair.first));
}
rejected_keys_.clear();
}
/****************************************/
/****************************************/
std::set<std::pair<gtsam::Key, gtsam::Key>> BuzzSLAMDataset::AggregateOutliersKeys(const std::set<int>& robots) {
std::set<std::pair<gtsam::Key, gtsam::Key>> outliers_keys;
for (const auto& i : robots) {
std::string outliers_keys_file_name = log_folder_ + std::to_string(i) + "_outliers_added_keys.g2o";
std::ifstream outliers_keys_file(outliers_keys_file_name);
long unsigned int key1, key2;
while (outliers_keys_file >> key1)
{
outliers_keys_file >> key2;
outliers_keys.insert(std::make_pair(gtsam::Key(key1), gtsam::Key(key2)));
}
outliers_keys_file.close();
}
return outliers_keys;
}
/****************************************/
/****************************************/
std::pair<int, int> BuzzSLAMDataset::CountInliersAndOutliers(const std::set<int>& robots) {
std::set<std::pair<gtsam::Key, gtsam::Key>> inliers_keys;
for (const auto& i : robots) {
std::string inliers_keys_file_name = log_folder_ + std::to_string(i) + "_inliers_added_keys.g2o";
std::ifstream inliers_keys_file(inliers_keys_file_name);
long unsigned int key1, key2;
while (inliers_keys_file >> key1)
{
inliers_keys_file >> key2;
auto robot_id_1 = (int) (gtsam::Symbol(key1).chr() - 97);
auto robot_id_2 = (int) (gtsam::Symbol(key2).chr() - 97);
if (robots.find(robot_id_1) != robots.end() &&
robots.find(robot_id_2) != robots.end()) {
inliers_keys.insert(std::make_pair(gtsam::Key(key1), gtsam::Key(key2)));
}
}
inliers_keys_file.close();
}
std::set<std::pair<gtsam::Key, gtsam::Key>> outliers_keys;
for (const auto& i : robots) {
std::string outliers_keys_file_name = log_folder_ + std::to_string(i) + "_outliers_added_keys.g2o";
std::ifstream outliers_keys_file(outliers_keys_file_name);
long unsigned int key1, key2;
while (outliers_keys_file >> key1)
{
outliers_keys_file >> key2;
auto robot_id_1 = (int) (gtsam::Symbol(key1).chr() - 97);
auto robot_id_2 = (int) (gtsam::Symbol(key2).chr() - 97);
if (robots.find(robot_id_1) != robots.end() &&
robots.find(robot_id_2) != robots.end()) {
outliers_keys.insert(std::make_pair(gtsam::Key(key1), gtsam::Key(key2)));
}
}
outliers_keys_file.close();
}
return std::make_pair(inliers_keys.size(), outliers_keys.size());
}
/****************************************/
/****************************************/
bool BuzzSLAMDataset::CompareCentralizedAndDecentralizedError() {
// Initialize the set of robots on which to evaluate
std::set<int> robots = neighbors_within_communication_range_;
robots.insert(robot_id_);
// Compute incremental centralized estimates
ComputeCentralizedEstimateIncremental(robots, "");
ComputeCentralizedEstimateIncremental(robots, "_no_filtering");
// Collect expected estimate size
std::string local_dataset_file_name = log_folder_ + std::to_string(robot_id_) + "_initial.g2o";
gtsam::GraphAndValues local_graph_and_values = gtsam::readG2o(local_dataset_file_name, true);
int expected_size = local_graph_and_values.second->size();
// Aggregate estimates from all the robots
auto aggregated_outliers_keys = AggregateOutliersKeys(robots);
gtsam::Values distributed;
std::vector<gtsam::GraphAndValues> graph_and_values_vec;
int number_of_separators = 0;
int number_of_outliers_not_rejected = 0;
for (const auto& i : robots) {
std::string dataset_file_name = log_folder_ + std::to_string(i) + "_optimized.g2o";
if (!boost::filesystem::exists(dataset_file_name)) {
if (debug_level_ >= 3) {
std::cout << "Robot " << robot_id_ << " Evaluation : Other files do not exist yet" << std::endl;
}
RemoveRejectedKeys();
return false; // File does not exists yet
}
gtsam::GraphAndValues graph_and_values = gtsam::readG2o(dataset_file_name, true);
if (graph_and_values.second->size() < expected_size-2) {
if (debug_level_ >= 3) {
std::cout << "Robot " << robot_id_ << " Evaluation : Other file too small expected size=" << expected_size << ", actual size=" << graph_and_values.second->size() << std::endl;
}
RemoveRejectedKeys();
return false; // File not updated yet
}
for (const gtsam::Values::ConstKeyValuePair &key_value: *graph_and_values.second) {
gtsam::Key key = key_value.key;
if (!distributed.exists(key)) {
distributed.insert(key, (*graph_and_values.second).at<gtsam::Pose3>(key));
}
}
std::vector<int> factors_to_remove;
int current_index = 0;
for (const auto &factor: *graph_and_values.first) {
boost::shared_ptr<gtsam::BetweenFactor<gtsam::Pose3> > pose3_between = boost::dynamic_pointer_cast<gtsam::BetweenFactor<gtsam::Pose3> >(factor);
auto robot_1_id = gtsam::Symbol(pose3_between->key1()).chr();
auto robot_2_id = gtsam::Symbol(pose3_between->key2()).chr();
if (robot_1_id != robot_2_id) {
if (robots.find(((int)robot_1_id-97)) != robots.end() && robots.find(((int)robot_2_id-97)) != robots.end()) {
number_of_separators++;
if (aggregated_outliers_keys.find(std::make_pair(pose3_between->key1(), pose3_between->key2())) != aggregated_outliers_keys.end()) {
number_of_outliers_not_rejected++;
}
} else {
factors_to_remove.emplace_back(current_index);
}
}
current_index++;
}
dataset_file_name = log_folder_ + std::to_string(i) + "_initial.g2o";
graph_and_values = gtsam::readG2o(dataset_file_name, true);
// Remove factor involving values from robots not in communication range
int number_of_factors_removed = 0;
for (const auto & factor : factors_to_remove){
int factor_index = factor - number_of_factors_removed;
graph_and_values.first->erase(graph_and_values.first->begin()+factor_index);
number_of_factors_removed++;
}
graph_and_values_vec.push_back(graph_and_values);
}
gtsam::GraphAndValues full_graph_and_values = distributed_mapper::evaluation_utils::readFullGraph(robots.size(), graph_and_values_vec);
try {
// Compute Error
gtsam::noiseModel::Diagonal::shared_ptr evaluation_model = gtsam::noiseModel::Isotropic::Variance(6, 1e-12);
auto errors = distributed_mapper::evaluation_utils::evaluateEstimates(robots.size(),
full_graph_and_values,
evaluation_model,
chordal_graph_noise_model_,
false,
distributed,
(bool) debug_level_);
// Gather info on outliers rejection
double total_number_of_separators_rejected_on_all_robots = 0;
for (const auto& i : robots) {
std::string separators_rejected_file_name = log_folder_ + std::to_string(i) + "_number_of_separators_rejected.g2o";
std::ifstream separators_rejected_file(separators_rejected_file_name);
int number_of_separators_rejected = 0;
separators_rejected_file >> number_of_separators_rejected;
total_number_of_separators_rejected_on_all_robots += number_of_separators_rejected;
separators_rejected_file.close();
}
total_number_of_separators_rejected_on_all_robots /= 2;
number_of_separators /= 2;
auto inliers_outliers_added = CountInliersAndOutliers(robots);
number_of_outliers_not_rejected /= 2;
// Write results to csv
std::ofstream error_file;
error_file.open(error_file_name_, std::ios::out | std::ios::app);
auto number_of_poses = optimizer_->numberOfPosesInCurrentEstimate();
error_file << robots.size() << "\t" << number_of_poses << "\t" << number_of_separators << "\t" << outlier_period_ << std::boolalpha
<< "\t" << incremental_solving_ << "\t" << rotation_noise_std_ << "\t" << translation_noise_std_
<< "\t" << rotation_estimate_change_threshold_ << "\t" << pose_estimate_change_threshold_
<< "\t" << optimizer_period_ << "\t" << pcm_threshold_
<< "\t" << std::get<0>(errors) << "\t" << std::get<1>(errors) << "\t" << std::get<2>(errors)
<< "\t" << current_rotation_iteration_ << "\t" << current_pose_iteration_
<< "\t" << inliers_outliers_added.first
<< "\t" << inliers_outliers_added.second
<< "\t" << total_number_of_separators_rejected_on_all_robots
<< "\t" << number_of_outliers_not_rejected
<< "\n";
error_file.close();
ComputeCentralizedEstimate("");
ComputeCentralizedEstimate("_no_filtering");
RemoveRejectedKeys();
return std::abs(std::get<0>(errors) - std::get<1>(errors)) < 0.1;
} catch(...) {
RemoveRejectedKeys();
return false;
}
}
/****************************************/
/****************************************/
void BuzzSLAMDataset::ComputeCentralizedEstimate(const std::string& centralized_extension) {
// Initialize the set of robots on which to evaluate
std::set<int> robots;
for (int i = 0; i < number_of_robots_; i++) {
robots.insert(i);
}
// Aggregate estimates from all the robots
std::vector<gtsam::GraphAndValues> graph_and_values_vec;
for (const auto& i : robots) {
std::string dataset_file_name = log_folder_ + std::to_string(i) + "_initial_centralized" + centralized_extension + ".g2o";
if (boost::filesystem::exists(dataset_file_name)) {
gtsam::GraphAndValues graph_and_values = gtsam::readG2o(dataset_file_name, true);
graph_and_values_vec.push_back(graph_and_values);
}
}
gtsam::GraphAndValues full_graph_and_values = distributed_mapper::evaluation_utils::readFullGraph(graph_and_values_vec.size(), graph_and_values_vec);
gtsam::noiseModel::Diagonal::shared_ptr evaluation_model = gtsam::noiseModel::Isotropic::Variance(6, 1e-12);
std::pair<gtsam::Values, gtsam::Values> estimates = distributed_mapper::evaluation_utils::centralizedEstimates(full_graph_and_values,
evaluation_model,
chordal_graph_noise_model_,
false);
// Split estimates
std::map<int, gtsam::Values> centralized_values_by_robots;
for (const auto& i : robots) {
centralized_values_by_robots.insert(std::make_pair(i, gtsam::Values()));
}
for (const gtsam::Values::ConstKeyValuePair &key_value : estimates.first) {
int value_robot_id = (int)(gtsam::Symbol(key_value.key).chr() - 97);
centralized_values_by_robots[value_robot_id].insert(key_value.key, key_value.value);
}
std::map<int, gtsam::Values> centralized_GN_values_by_robots;
for (const auto& i : robots) {
centralized_GN_values_by_robots.insert(std::make_pair(i, gtsam::Values()));
}
for (const gtsam::Values::ConstKeyValuePair &key_value : estimates.second) {
int value_robot_id = (int)(gtsam::Symbol(key_value.key).chr() - 97);
centralized_GN_values_by_robots[value_robot_id].insert(key_value.key, key_value.value);
}
for (const auto& i : robots) {
std::string centralized_file_name = log_folder_ + std::to_string(i) + "_centralized" + centralized_extension + ".g2o";
gtsam::writeG2o(gtsam::NonlinearFactorGraph(), centralized_values_by_robots[i], centralized_file_name);
centralized_file_name = log_folder_ + std::to_string(i) + "_centralized_GN" + centralized_extension + ".g2o";
gtsam::writeG2o(gtsam::NonlinearFactorGraph(), centralized_GN_values_by_robots[i], centralized_file_name);
}
}
/****************************************/
/****************************************/
void BuzzSLAMDataset::ComputeCentralizedEstimateIncremental(std::set<int> robots, const std::string& centralized_extension) {
// Aggregate estimates from all the robots
std::vector<gtsam::GraphAndValues> graph_and_values_vec;
std::string dataset_file_name = log_folder_ + std::to_string(prior_owner_) + "_initial_centralized" + centralized_extension + "_incremental.g2o";
if (boost::filesystem::exists(dataset_file_name)) {
gtsam::GraphAndValues graph_and_values = gtsam::readG2o(dataset_file_name, true);
graph_and_values_vec.push_back(graph_and_values);
}
for (const auto& i : robots) {
if (i != prior_owner_){
dataset_file_name = log_folder_ + std::to_string(i) + "_initial_centralized" + centralized_extension + "_incremental.g2o";
if (boost::filesystem::exists(dataset_file_name)) {
gtsam::GraphAndValues graph_and_values = gtsam::readG2o(dataset_file_name, true);
graph_and_values_vec.push_back(graph_and_values);
}
}
}
gtsam::GraphAndValues full_graph_and_values = distributed_mapper::evaluation_utils::readFullGraph(graph_and_values_vec);
gtsam::noiseModel::Diagonal::shared_ptr evaluation_model = gtsam::noiseModel::Isotropic::Variance(6, 1e-12);
std::pair<gtsam::Values, gtsam::Values> estimates = distributed_mapper::evaluation_utils::centralizedEstimates(full_graph_and_values,
evaluation_model,
chordal_graph_noise_model_,
false);
// Split estimates
std::map<int, gtsam::Values> centralized_values_by_robots;
for (const auto& i : robots) {
centralized_values_by_robots.insert(std::make_pair(i, gtsam::Values()));
}
// Get anchor offset
gtsam::Point3 anchor_offset_translation = gtsam::Point3();
gtsam::Rot3 anchor_offset_rotation = gtsam::Rot3();
dataset_file_name = log_folder_ + std::to_string(prior_owner_) + "_centralized" + centralized_extension + "_incremental.g2o";
if (boost::filesystem::exists(dataset_file_name)) {
gtsam::GraphAndValues graph_and_values = gtsam::readG2o(dataset_file_name, true);
gtsam::Key first_key = gtsam::KeyVector(graph_and_values.second->keys()).at(0);
anchor_offset_translation = graph_and_values.second->at<gtsam::Pose3>(first_key).translation();
anchor_offset_rotation = graph_and_values.second->at<gtsam::Pose3>(first_key).rotation();
}
for (const gtsam::Values::ConstKeyValuePair &key_value : estimates.first) {
int value_robot_id = (int)(gtsam::Symbol(key_value.key).chr() - 97);
if (value_robot_id == prior_owner_) {
gtsam::Pose3 value = key_value.value.cast<gtsam::Pose3>();
anchor_offset_translation = anchor_offset_translation - value.translation();
anchor_offset_rotation = anchor_offset_rotation * value.rotation().inverse();
break;
}
}
for (const gtsam::Values::ConstKeyValuePair &key_value : estimates.first) {
int value_robot_id = (int)(gtsam::Symbol(key_value.key).chr() - 97);
if (robots.find(value_robot_id) != robots.end()) {
gtsam::Key new_key = gtsam::Symbol(((char) value_robot_id + 97), gtsam::Symbol(key_value.key).index());
gtsam::Pose3 value = key_value.value.cast<gtsam::Pose3>();
gtsam::Pose3 new_value = gtsam::Pose3(value.rotation(), value.translation() + anchor_offset_translation);
new_value = new_value * gtsam::Pose3(anchor_offset_rotation, gtsam::Point3());
centralized_values_by_robots[value_robot_id].insert(new_key, new_value);
}
}
std::map<int, gtsam::Values> centralized_GN_values_by_robots;
for (const auto& i : robots) {
centralized_GN_values_by_robots.insert(std::make_pair(i, gtsam::Values()));
}
anchor_offset_translation = gtsam::Point3();
dataset_file_name = log_folder_ + std::to_string(prior_owner_) + "_centralized_GN" + centralized_extension + "_incremental.g2o";
if (boost::filesystem::exists(dataset_file_name)) {
gtsam::GraphAndValues graph_and_values = gtsam::readG2o(dataset_file_name, true);
gtsam::Key first_key = gtsam::KeyVector(graph_and_values.second->keys()).at(0);
anchor_offset_translation = graph_and_values.second->at<gtsam::Pose3>(first_key).translation();
}
for (const gtsam::Values::ConstKeyValuePair &key_value : estimates.second) {
int value_robot_id = (int)(gtsam::Symbol(key_value.key).chr() - 97);
if (value_robot_id == prior_owner_) {
gtsam::Pose3 value = key_value.value.cast<gtsam::Pose3>();
anchor_offset_translation = anchor_offset_translation - value.translation();
break;
}
}
for (const gtsam::Values::ConstKeyValuePair &key_value : estimates.second) {
int value_robot_id = (int)(gtsam::Symbol(key_value.key).chr() - 97);
if (robots.find(value_robot_id) != robots.end()) {
gtsam::Key new_key = gtsam::Symbol(((char) value_robot_id + 97), gtsam::Symbol(key_value.key).index());
gtsam::Pose3 value = key_value.value.cast<gtsam::Pose3>();
gtsam::Pose3 new_value = gtsam::Pose3(value.rotation(), value.translation() + anchor_offset_translation);
centralized_GN_values_by_robots[value_robot_id].insert(new_key, new_value);
}
}
std::string centralized_file_name = log_folder_ + std::to_string(robot_id_) + "_centralized" + centralized_extension + "_incremental.g2o";
gtsam::writeG2o(gtsam::NonlinearFactorGraph(), centralized_values_by_robots[robot_id_], centralized_file_name);
centralized_file_name = log_folder_ + std::to_string(robot_id_) + "_centralized_GN" + centralized_extension + "_incremental.g2o";
gtsam::writeG2o(gtsam::NonlinearFactorGraph(), centralized_GN_values_by_robots[robot_id_], centralized_file_name);
IncrementalInitialGuessUpdate(centralized_values_by_robots[robot_id_], poses_initial_guess_centralized_incremental_updates_);
}
/****************************************/
/****************************************/
void BuzzSLAMDataset::AbortOptimization(const bool& log_info){
BuzzSLAM::AbortOptimization(log_info);
if (log_info) {
// Initialize the set of robots on which to evaluate
std::set<int> robots = neighbors_within_communication_range_;
robots.insert(robot_id_);
auto aggregated_outliers_keys = AggregateOutliersKeys(robots);
int number_of_separators = 0;
int number_of_outliers_not_rejected = 0;
for (const auto& i : robots) {
std::string dataset_file_name = log_folder_ + std::to_string(i) + "_initial.g2o";
if (!boost::filesystem::exists(dataset_file_name)) {
return; // File does not exists yet
}
gtsam::GraphAndValues graph_and_values = gtsam::readG2o(dataset_file_name, true);
int current_index = 0;
for (const auto &factor: *graph_and_values.first) {
boost::shared_ptr<gtsam::BetweenFactor<gtsam::Pose3> > pose3_between = boost::dynamic_pointer_cast<gtsam::BetweenFactor<gtsam::Pose3> >(factor);
auto robot_1_id = gtsam::Symbol(pose3_between->key1()).chr();
auto robot_2_id = gtsam::Symbol(pose3_between->key2()).chr();
if (robot_1_id != robot_2_id) {
if (robots.find(((int)robot_1_id-97)) != robots.end() && robots.find(((int)robot_2_id-97)) != robots.end()) {
number_of_separators++;
if (aggregated_outliers_keys.find(std::make_pair(pose3_between->key1(), pose3_between->key2())) != aggregated_outliers_keys.end()) {
number_of_outliers_not_rejected++;
}
}
}
current_index++;
}
}
// Gather info on outliers rejection
double total_number_of_separators_rejected_on_all_robots = 0;
for (const auto& i : robots) {
std::string separators_rejected_file_name = log_folder_ + std::to_string(i) + "_number_of_separators_rejected.g2o";
std::ifstream separators_rejected_file(separators_rejected_file_name);
int number_of_separators_rejected = 0;
separators_rejected_file >> number_of_separators_rejected;
total_number_of_separators_rejected_on_all_robots += number_of_separators_rejected;
separators_rejected_file.close();
}
total_number_of_separators_rejected_on_all_robots /= 2;
number_of_separators /= 2;
auto inliers_outliers_added = CountInliersAndOutliers(robots);
// Write results to csv
std::ofstream error_file;
error_file.open(error_file_name_, std::ios::out | std::ios::app);
auto number_of_poses = optimizer_->numberOfPosesInCurrentEstimate();
std::string place_holder = "Aborted";
error_file << robots.size() << "\t" << number_of_poses << "\t" << place_holder << "\t" << outlier_period_ << std::boolalpha
<< "\t" << incremental_solving_ << "\t" << rotation_noise_std_ << "\t" << translation_noise_std_
<< "\t" << rotation_estimate_change_threshold_ << "\t" << pose_estimate_change_threshold_
<< "\t" << optimizer_period_ << "\t" << pcm_threshold_
<< "\t" << place_holder << "\t" << place_holder << "\t" << place_holder
<< "\t" << current_rotation_iteration_ << "\t" << current_pose_iteration_
<< "\t" << inliers_outliers_added.first
<< "\t" << inliers_outliers_added.second
<< "\t" << std::round(total_number_of_separators_rejected_on_all_robots)
<< "\t" << number_of_outliers_not_rejected
<< "\n";
error_file.close();
}
}
} | 49.655514 | 292 | 0.647784 | SnowCarter |
97c0da6cbda64060a988e4b5a102a8446fb342aa | 1,465 | hpp | C++ | Runtime/MP1/CCredits.hpp | RetroView/RetroCommon | a413a010b50a53ebc6b0c726203181fc179d3370 | [
"MIT"
] | 267 | 2016-03-10T21:59:16.000Z | 2021-03-28T18:21:03.000Z | Runtime/MP1/CCredits.hpp | cobalt2727/metaforce | 3bb05c0ee5dd9b1b8eaa861fc49713aef62c844a | [
"MIT"
] | 129 | 2016-03-12T10:17:32.000Z | 2021-04-05T20:45:19.000Z | Runtime/MP1/CCredits.hpp | cobalt2727/metaforce | 3bb05c0ee5dd9b1b8eaa861fc49713aef62c844a | [
"MIT"
] | 31 | 2016-03-20T00:20:11.000Z | 2021-03-10T21:14:11.000Z | #pragma once
#include "Runtime/CIOWin.hpp"
#include "Runtime/CToken.hpp"
#include "Runtime/Audio/CStaticAudioPlayer.hpp"
#include "Runtime/Camera/CCameraFilter.hpp"
#include "zeus/CVector2i.hpp"
namespace metaforce {
class CGuiTextSupport;
class CStringTable;
class CRasterFont;
class CMoviePlayer;
struct CFinalInput;
namespace MP1 {
class CCredits : public CIOWin {
u32 x14_ = 0;
TLockedToken<CStringTable> x18_creditsTable;
TLockedToken<CRasterFont> x20_creditsFont;
std::unique_ptr<CMoviePlayer> x28_;
std::unique_ptr<CStaticAudioPlayer> x2c_;
std::vector<std::pair<std::unique_ptr<CGuiTextSupport>, zeus::CVector2i>> x30_text;
int x44_textSupport = 0;
float x48_ = 0.f;
float x4c_ = 0.f;
float x50_ = 8.f;
float x54_;
float x58_ = 0.f;
bool x5c_24_ : 1 = false;
bool x5c_25_ : 1 = false;
bool x5c_26_ : 1 = false;
bool x5c_27_ : 1 = true;
bool x5c_28_ : 1 = false;
void DrawVideo();
void DrawText();
static void DrawText(CGuiTextSupport&, const zeus::CVector3f& translation);
CCameraFilterPassPoly m_videoFilter;
CCameraFilterPassPoly m_textFilter;
public:
CCredits();
EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) override;
bool GetIsContinueDraw() const override { return false; }
void Draw() override;
EMessageReturn Update(float, CArchitectureQueue& queue);
EMessageReturn ProcessUserInput(const CFinalInput& input);
};
} // namespace MP1
} // namespace metaforce
| 27.12963 | 86 | 0.750853 | RetroView |
97c8e05a5d28adae9c8b1bc238d66655da40cea0 | 11,432 | cpp | C++ | src/Plugins/napoleon/NearestEnemyComponent.cpp | pgruenbacher/Menge | efd577bf5d318b01b2888d281258c8b7b0a7e4fe | [
"Apache-2.0"
] | null | null | null | src/Plugins/napoleon/NearestEnemyComponent.cpp | pgruenbacher/Menge | efd577bf5d318b01b2888d281258c8b7b0a7e4fe | [
"Apache-2.0"
] | null | null | null | src/Plugins/napoleon/NearestEnemyComponent.cpp | pgruenbacher/Menge | efd577bf5d318b01b2888d281258c8b7b0a7e4fe | [
"Apache-2.0"
] | null | null | null | /*
License
Menge
Copyright © and trademark ™ 2012-14 University of North Carolina at Chapel Hill.
All rights reserved.
Permission to use, copy, modify, and distribute this software and its documentation
for educational, research, and non-profit purposes, without fee, and without a
written agreement is hereby granted, provided that the above copyright notice,
this paragraph, and the following four paragraphs appear in all copies.
This software program and documentation are copyrighted by the University of North
Carolina at Chapel Hill. The software program and documentation are supplied "as is,"
without any accompanying services from the University of North Carolina at Chapel
Hill or the authors. The University of North Carolina at Chapel Hill and the
authors do not warrant that the operation of the program will be uninterrupted
or error-free. The end-user understands that the program was developed for research
purposes and is advised not to rely exclusively on the program for any reason.
IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE AUTHORS
BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE
AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY
DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY STATUTORY WARRANTY
OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND
THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS HAVE NO OBLIGATIONS
TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
Any questions or comments should be sent to the authors {menge,geom}@cs.unc.edu
*/
// #include "MengeCore/BFSM/VelocityComponents/VelCompGoal.h"
#include "NearestEnemyComponent.h"
#include "MengeCore/resources/Resource.h"
#include "MengeCore/Core.h"
#include "MengeCore/Agents/BaseAgent.h"
#include "MengeCore/Agents/PrefVelocity.h"
#include "MengeCore/BFSM/Goals/Goal.h"
#include "MengeCore/Runtime/os.h"
#include "NearestEnemTask.h"
const float sumNearAgentWeights(const std::vector<Menge::Agents::NearAgent>& nearAgents, float checkDist = 3.0) {
// return nearAgents.size();
// WTF C++, if I don't set to 0.0, then it defaults to whatever previous value was!??
// Apparently uninitalized variables don't default to zero...
// return nearAgents.size();
// const float meleeDist = 3.0;
float result = 0.0;
// std::cout << "RESULT?" << result << std::endl;
for (Menge::Agents::NearAgent agent : nearAgents) {
// result += agent.distanceSquared;
if (checkDist < agent.distanceSquared) {
continue;
}
// std::cout << "V " << (agent.agent->_neighborDist * agent.agent->_neighborDist) << " " << agent.distanceSquared << std::endl;
result += 1.0f;
}
// std::cout << "RESULT" << result << " " << nearAgents.size() << std::endl;
return result;
}
namespace Napoleon {
using Menge::logger;
/////////////////////////////////////////////////////////////////////
// Implementation of GoalVelComponent
/////////////////////////////////////////////////////////////////////
const std::string NearestEnemComponent::NAME = "enemy_near_comp";
/////////////////////////////////////////////////////////////////////
void NearestEnemComponent::onEnter(BaseAgent* agent) {
// _lock.lockWrite();
// // _formation->addAgent(agent);
// _agents[agent->_id] = agent;
// _lock.releaseWrite();
NearestEnemTask* task = NearestEnemTask::getSingleton();
task->addAgent(agent->_id);
}
void NearestEnemComponent::onExit(BaseAgent* agent) {
// _lock.lockWrite();
// // _formation->addAgent(agent);
// _agents[agent->_id] = agent;
// _lock.releaseWrite();
NearestEnemTask* task = NearestEnemTask::getSingleton();
task->removeAgent(agent->_id);
}
/////////////////////////////////////////////////////////////////////
NearestEnemComponent::NearestEnemComponent() : VelComponent(),
_targetMethod(MELEE),
_actionType(IDLE),
_slowToArrive(false)
{
}
void NearestEnemComponent::setIdleVelocity(const BaseAgent* enem, const BaseAgent * agent, const Goal * goal,
PrefVelocity & pVel ) const {
using Menge::SIM_TIME_STEP;
Vector2 target = enem->_pos;
goal->setDirections( agent->_pos, agent->_radius, pVel );
// speed
Vector2 goalPoint = pVel.getTarget();
Vector2 disp = goalPoint - agent->_pos;
const float distSq = absSq( disp );
float speed = agent->_prefSpeed;
if ( distSq <= 0.0001f ) {
// I've basically arrived -- speed should be zero.
speed = 0.f;
} else {
const float speedSq = speed * speed;
const float TS_SQD = SIM_TIME_STEP * SIM_TIME_STEP;
if ( distSq / speedSq < TS_SQD ) {
// The distance is less than I would travel in a single time step.
speed = sqrtf( distSq ) / SIM_TIME_STEP;
}
}
pVel.setSpeed( speed );
// also make sure target is set for orientation.
pVel.setTarget( target );
}
void NearestEnemComponent::setWithdrawingVelocity(const BaseAgent* enem,
const BaseAgent* agent,
PrefVelocity& pVel,
float distSq) const {
Vector2 target = enem->_pos;
Vector2 disp = target - agent->_pos;
Vector2 dir(0.0, 0.0);
if ( distSq > 1e-8 ) {
// Distant enough that I can normalize the direction.
dir.set( disp / sqrtf( distSq ) );
} else {
dir.set( 0.f, 0.f );
}
pVel.setSingle(-dir);
pVel.setSpeed(0.1);
pVel.setTarget(target);
return;
}
void NearestEnemComponent::setAdvancingVelocity(const BaseAgent* enem,
const BaseAgent* agent,
PrefVelocity& pVel,
float distSq) const {
Vector2 target = enem->_pos;
Vector2 disp = target - agent->_pos;
Vector2 dir(0.0, 0.0);
if ( distSq > 1e-8 ) {
// Distant enough that I can normalize the direction.
dir.set( disp / sqrtf( distSq ) );
} else {
dir.set( 0.f, 0.f );
}
pVel.setTarget(target);
float speed = agent->_prefSpeed;
if (distSq <= (agent->getMeleeRange() - 0.2) && _slowToArrive) {
// I've basically arrived -- speed should be zero.
speed = 0.f;
} else {
const float speedSq = speed * speed;
const float TS_SQD = Menge::SIM_TIME_STEP * Menge::SIM_TIME_STEP;
if (distSq / speedSq < TS_SQD && _slowToArrive) {
// The distance is less than I would travel in a single time step.
speed = sqrtf(distSq) / Menge::SIM_TIME_STEP;
} else {
// std:: cout << "?? " << distSq / speedSq << " " << TS_SQD << " " <<
// SIM_TIME_STEP << std::endl; speed = agent->_prefSpeed;
}
}
// std::cout << "SPEED " << speed << std::endl;
pVel.setSingle(dir);
pVel.setSpeed(speed);
}
const NearAgent NearestEnemComponent::getTargetEnem(const BaseAgent* agent) const {
// float distSq = 1000.f * 1000.f;
// NearAgent targetEnem(distSq, 0x0);
// for (Menge::Agents::NearAgent enem : agent->_nearEnems) {
// if (enem.distanceSquared < distSq) {
// distSq = enem.distanceSquared;
// targetEnem = enem;
// }
// }
const NearestEnemTask* task = NearestEnemTask::getSingleton();
NearAgent d(100, 0x0);
task->getCurrentTarget(agent, d);
return d;
}
/////////////////////////////////////////////////////////////////////
void NearestEnemComponent::setPrefVelocity( const BaseAgent * agent, const Goal * goal,
PrefVelocity & pVel ) const {
bool modify = agent->_nearEnems.size() > 0;
Vector2 target(0.f, 0.f);
if ( !modify ) {
// pVel.setSpeed(agent->_prefSpeed);
// Vector2 returnToOrig = (agent->_pos) * -1;
// returnToOrig.normalize();
// pVel.setSingle(returnToOrig);
// std::cout << "no modify! fix! " << agent->_id << "GOAL" << goal << " " << std::endl;
// return setIdleVelocity(agent, goal, pVel);
goal->setDirections(agent->_pos, agent->_radius, pVel);
// goal.
return;
}
const NearestEnemData targetEnem = getTargetEnem(agent);
if (targetEnem.agent == 0x0) return;
// target = targetEnem.agent->_pos;
float distSq = targetEnem.distanceSquared;
if (_actionType == WITHDRAWING) {
return setWithdrawingVelocity(targetEnem.agent, agent, pVel, distSq);
} else if (_actionType == IDLE) {
return setIdleVelocity(targetEnem.agent, agent, goal, pVel);
} else {
return setAdvancingVelocity(targetEnem.agent, agent, pVel, distSq);
}
}
Task * NearestEnemComponent::getTask(){
return NearestEnemTask::getSingleton();
};
/////////////////////////////////////////////////////////////////////
NearestEnemComponentFactory::NearestEnemComponentFactory() : VelCompFactory() {
_methodID = _attrSet.addStringAttribute("method", true /* required */);
_targetMethodID = _attrSet.addStringAttribute("target", false, "melee");
_slowToArriveID = _attrSet.addBoolAttribute("slow_to_arrive", false, false);
}
/////////////////////////////////////////////////////////////////////
bool NearestEnemComponentFactory::setFromXML( VelComponent * component, TiXmlElement * node,
const std::string & behaveFldr ) const {
NearestEnemComponent * nearestEnemComp = dynamic_cast<NearestEnemComponent *>(component);
if ( ! VelCompFactory::setFromXML( component, node, behaveFldr ) ) return false;
assert( nearestEnemComp != 0x0 &&
"Trying to set property component properties on an incompatible object" );
if (_attrSet.getString(_methodID).empty()) {
logger << Logger::ERR_MSG << "Require method for velocity component";
logger.close();
throw Menge::BFSM::VelCompFatalException( "Require method for velocity component." );
}
std::string _typeString = _attrSet.getString(_methodID);
std::string _targetMethod = _attrSet.getString(_targetMethodID);
if (_targetMethod == "melee") {
nearestEnemComp->_targetMethod = MELEE;
} else if (_targetMethod == "pike") {
nearestEnemComp->_targetMethod = PIKE;
} else if (_targetMethod == "aiming") {
nearestEnemComp->_targetMethod = AIMING;
}
if (_typeString == "advancing") {
nearestEnemComp->_actionType = NearestEnemComponent::ADVANCING;
} else if (_typeString == "withdrawing") {
nearestEnemComp->_actionType = NearestEnemComponent::WITHDRAWING;
} else if (_typeString == "idle") {
nearestEnemComp->_actionType = NearestEnemComponent::IDLE;
} else {
logger << Logger::ERR_MSG << "Should be advancing or withdrawing got: '" << _typeString << "' instead...";
return false;
}
nearestEnemComp->_slowToArrive = _attrSet.getBool(_slowToArriveID);
return true;
}
} // namespace Formations
| 39.285223 | 131 | 0.627362 | pgruenbacher |
97d56573185cbbc365c051f39548cc52558e750f | 5,477 | cpp | C++ | snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxRenderer/cpp/form1.cpp | BohdanMosiyuk/samples | 59d435ba9e61e0fc19f5176c96b1cdbd53596142 | [
"CC-BY-4.0",
"MIT"
] | 834 | 2017-06-24T10:40:36.000Z | 2022-03-31T19:48:51.000Z | snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxRenderer/cpp/form1.cpp | BohdanMosiyuk/samples | 59d435ba9e61e0fc19f5176c96b1cdbd53596142 | [
"CC-BY-4.0",
"MIT"
] | 7,042 | 2017-06-23T22:34:47.000Z | 2022-03-31T23:05:23.000Z | snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxRenderer/cpp/form1.cpp | BohdanMosiyuk/samples | 59d435ba9e61e0fc19f5176c96b1cdbd53596142 | [
"CC-BY-4.0",
"MIT"
] | 1,640 | 2017-06-23T22:31:39.000Z | 2022-03-31T02:45:37.000Z | // This sample can go in ComboBoxRenderer class overview.
// - Snippet2 can go in IsSupported
// - Snippet4 can go in DrawTextBox and DrawDropDownButton
// It renders the pieces of a combo box with visual styles, provided
// that visual styles are enabled in the Display Panel.
// For simplicity, this sample does not handle run-time visual style switching.
//<Snippet0>
#using <System.dll>
#using <System.Drawing.dll>
#using <System.Windows.Forms.dll>
using namespace System;
using namespace System::Drawing;
using namespace System::Windows::Forms;
using namespace System::Windows::Forms::VisualStyles;
namespace ComboBoxRendererSample
{
ref class CustomComboBox: public Control
{
private:
System::Drawing::Size arrowSize;
Rectangle arrowRectangle;
Rectangle topTextBoxRectangle;
Rectangle bottomTextBoxRectangle;
ComboBoxState textBoxState;
ComboBoxState arrowState;
String^ bottomText;
bool isActivated;
int minHeight;
int minWidth;
public:
CustomComboBox() : Control()
{
minHeight = 38;
minWidth = 40;
this->Location = Point(10, 10);
this->Size = System::Drawing::Size(140, 38);
this->Font = SystemFonts::IconTitleFont;
this->Text = "Click the button";
textBoxState = ComboBoxState::Normal;
bottomText = "Using ComboBoxRenderer";
arrowState = ComboBoxState::Normal;
// Initialize the rectangles to look like the standard combo
// box control.
arrowSize = System::Drawing::Size(18, 20);
arrowRectangle = Rectangle(ClientRectangle.X +
ClientRectangle.Width - arrowSize.Width - 1,
ClientRectangle.Y + 1,
arrowSize.Width,
arrowSize.Height);
topTextBoxRectangle = Rectangle(ClientRectangle.X,
ClientRectangle.Y,
ClientRectangle.Width,
arrowSize.Height + 2);
bottomTextBoxRectangle = Rectangle(ClientRectangle.X,
ClientRectangle.Y + topTextBoxRectangle.Height,
ClientRectangle.Width,
topTextBoxRectangle.Height - 6);
}
//<Snippet4>
//<Snippet2>
// Draw the combo box in the current state.
protected:
virtual void OnPaint(PaintEventArgs^ e) override
{
Control::OnPaint(e);
if (!ComboBoxRenderer::IsSupported)
{
this->Parent->Text = "Visual Styles Disabled";
return;
}
this->Parent->Text = "CustomComboBox Enabled";
// Always draw the main text box and drop down arrow in their
// current states
ComboBoxRenderer::DrawTextBox(e->Graphics, topTextBoxRectangle,
this->Text, this->Font, textBoxState);
ComboBoxRenderer::DrawDropDownButton(e->Graphics, arrowRectangle,
arrowState);
// Only draw the bottom text box if the arrow has been clicked
if (isActivated)
{
ComboBoxRenderer::DrawTextBox(e->Graphics,
bottomTextBoxRectangle, bottomText, this->Font,
textBoxState);
}
}
//</Snippet2>
protected:
virtual void OnMouseDown(MouseEventArgs^ e) override
{
Control::OnMouseDown(e);
// Check whether the user clicked the arrow.
if (arrowRectangle.Contains(e->Location) &&
ComboBoxRenderer::IsSupported)
{
// Draw the arrow in the pressed state.
arrowState = ComboBoxState::Pressed;
// The user has activated the combo box.
if (!isActivated)
{
this->Text = "Clicked!";
textBoxState = ComboBoxState::Pressed;
isActivated = true;
}
// The user has deactivated the combo box.
else
{
this->Text = "Click here";
textBoxState = ComboBoxState::Normal;
isActivated = false;
}
// Redraw the control.
Invalidate();
}
}
//</Snippet4>
protected:
virtual void OnMouseUp(MouseEventArgs^ e) override
{
Control::OnMouseUp(e);
if (arrowRectangle.Contains(e->Location) &&
ComboBoxRenderer::IsSupported)
{
arrowState = ComboBoxState::Normal;
Invalidate();
}
}
};
ref class Form1 : public Form
{
public:
Form1() : Form()
{
this->Size = System::Drawing::Size(300, 300);
CustomComboBox^ ComboBox1 = gcnew CustomComboBox();
Controls->Add(ComboBox1);
}
};
}
[STAThread]
int main()
{
// The call to EnableVisualStyles below does not affect
// whether ComboBoxRenderer.IsSupported is true; as long as visual
// styles are enabled by the operating system, IsSupported is true.
Application::EnableVisualStyles();
Application::Run(gcnew ComboBoxRendererSample::Form1());
}
//</Snippet0>
| 31.65896 | 79 | 0.554135 | BohdanMosiyuk |
97d684525c44125b4ffe7639b450893155f795ef | 4,021 | cpp | C++ | android-31/android/hardware/camera2/params/OutputConfiguration.cpp | YJBeetle/QtAndroidAPI | 1468b5dc6eafaf7709f0b00ba1a6ec2b70684266 | [
"Apache-2.0"
] | 12 | 2020-03-26T02:38:56.000Z | 2022-03-14T08:17:26.000Z | android-31/android/hardware/camera2/params/OutputConfiguration.cpp | YJBeetle/QtAndroidAPI | 1468b5dc6eafaf7709f0b00ba1a6ec2b70684266 | [
"Apache-2.0"
] | 1 | 2021-01-27T06:07:45.000Z | 2021-11-13T19:19:43.000Z | android-31/android/hardware/camera2/params/OutputConfiguration.cpp | YJBeetle/QtAndroidAPI | 1468b5dc6eafaf7709f0b00ba1a6ec2b70684266 | [
"Apache-2.0"
] | 3 | 2021-02-02T12:34:55.000Z | 2022-03-08T07:45:57.000Z | #include "../MultiResolutionImageReader.hpp"
#include "../../../os/Parcel.hpp"
#include "../../../util/Size.hpp"
#include "../../../view/Surface.hpp"
#include "../../../../JClass.hpp"
#include "../../../../JObject.hpp"
#include "../../../../JString.hpp"
#include "./OutputConfiguration.hpp"
namespace android::hardware::camera2::params
{
// Fields
JObject OutputConfiguration::CREATOR()
{
return getStaticObjectField(
"android.hardware.camera2.params.OutputConfiguration",
"CREATOR",
"Landroid/os/Parcelable$Creator;"
);
}
jint OutputConfiguration::SURFACE_GROUP_ID_NONE()
{
return getStaticField<jint>(
"android.hardware.camera2.params.OutputConfiguration",
"SURFACE_GROUP_ID_NONE"
);
}
// QJniObject forward
OutputConfiguration::OutputConfiguration(QJniObject obj) : JObject(obj) {}
// Constructors
OutputConfiguration::OutputConfiguration(android::view::Surface arg0)
: JObject(
"android.hardware.camera2.params.OutputConfiguration",
"(Landroid/view/Surface;)V",
arg0.object()
) {}
OutputConfiguration::OutputConfiguration(android::util::Size arg0, JClass arg1)
: JObject(
"android.hardware.camera2.params.OutputConfiguration",
"(Landroid/util/Size;Ljava/lang/Class;)V",
arg0.object(),
arg1.object<jclass>()
) {}
OutputConfiguration::OutputConfiguration(jint arg0, android::view::Surface arg1)
: JObject(
"android.hardware.camera2.params.OutputConfiguration",
"(ILandroid/view/Surface;)V",
arg0,
arg1.object()
) {}
// Methods
JObject OutputConfiguration::createInstancesForMultiResolutionOutput(android::hardware::camera2::MultiResolutionImageReader arg0)
{
return callStaticObjectMethod(
"android.hardware.camera2.params.OutputConfiguration",
"createInstancesForMultiResolutionOutput",
"(Landroid/hardware/camera2/MultiResolutionImageReader;)Ljava/util/Collection;",
arg0.object()
);
}
void OutputConfiguration::addSensorPixelModeUsed(jint arg0) const
{
callMethod<void>(
"addSensorPixelModeUsed",
"(I)V",
arg0
);
}
void OutputConfiguration::addSurface(android::view::Surface arg0) const
{
callMethod<void>(
"addSurface",
"(Landroid/view/Surface;)V",
arg0.object()
);
}
jint OutputConfiguration::describeContents() const
{
return callMethod<jint>(
"describeContents",
"()I"
);
}
void OutputConfiguration::enableSurfaceSharing() const
{
callMethod<void>(
"enableSurfaceSharing",
"()V"
);
}
jboolean OutputConfiguration::equals(JObject arg0) const
{
return callMethod<jboolean>(
"equals",
"(Ljava/lang/Object;)Z",
arg0.object<jobject>()
);
}
jint OutputConfiguration::getMaxSharedSurfaceCount() const
{
return callMethod<jint>(
"getMaxSharedSurfaceCount",
"()I"
);
}
android::view::Surface OutputConfiguration::getSurface() const
{
return callObjectMethod(
"getSurface",
"()Landroid/view/Surface;"
);
}
jint OutputConfiguration::getSurfaceGroupId() const
{
return callMethod<jint>(
"getSurfaceGroupId",
"()I"
);
}
JObject OutputConfiguration::getSurfaces() const
{
return callObjectMethod(
"getSurfaces",
"()Ljava/util/List;"
);
}
jint OutputConfiguration::hashCode() const
{
return callMethod<jint>(
"hashCode",
"()I"
);
}
void OutputConfiguration::removeSensorPixelModeUsed(jint arg0) const
{
callMethod<void>(
"removeSensorPixelModeUsed",
"(I)V",
arg0
);
}
void OutputConfiguration::removeSurface(android::view::Surface arg0) const
{
callMethod<void>(
"removeSurface",
"(Landroid/view/Surface;)V",
arg0.object()
);
}
void OutputConfiguration::setPhysicalCameraId(JString arg0) const
{
callMethod<void>(
"setPhysicalCameraId",
"(Ljava/lang/String;)V",
arg0.object<jstring>()
);
}
void OutputConfiguration::writeToParcel(android::os::Parcel arg0, jint arg1) const
{
callMethod<void>(
"writeToParcel",
"(Landroid/os/Parcel;I)V",
arg0.object(),
arg1
);
}
} // namespace android::hardware::camera2::params
| 23.377907 | 130 | 0.700323 | YJBeetle |
97d9ad30730abddd9eb15b1bd9081357a0f6ad56 | 532 | cpp | C++ | tests/unit_tests/Entity/Tools.cpp | Allaeddineattia/Valravn | 7afa00bfe3c6f0c8357209601a67508a35b466b5 | [
"MIT"
] | null | null | null | tests/unit_tests/Entity/Tools.cpp | Allaeddineattia/Valravn | 7afa00bfe3c6f0c8357209601a67508a35b466b5 | [
"MIT"
] | null | null | null | tests/unit_tests/Entity/Tools.cpp | Allaeddineattia/Valravn | 7afa00bfe3c6f0c8357209601a67508a35b466b5 | [
"MIT"
] | 2 | 2021-05-07T20:35:55.000Z | 2021-07-08T15:14:43.000Z | //
// Created by ismail on 22/11/2020.
//
#include "gtest/gtest.h"
#include <string>
#include "Shared/Tools.h"
using namespace std ;
TEST(Tools, Valid_remove_blanks) {
string str = "120 : 120";
Tools::remove_blanks(str);
ASSERT_EQ(str,"120:120");
}
TEST(Tools,Throw_error_on_check_resolution){
string str = "12:58";
ASSERT_THROW(Tools::check_resolution_string_pattern(str),invalid_argument);
}
TEST(Tools,Valid_check_resolution){
string str = "1080:720";
Tools::check_resolution_string_pattern(str);
} | 25.333333 | 79 | 0.714286 | Allaeddineattia |
97ddccd4a66f13f721b7c89c02251856ff2b74d2 | 1,267 | cpp | C++ | build/design/clock.cpp | laxtools/lax | 4b6ac5e042787f1c66e6f4771ec9aafe6b2df26b | [
"MIT"
] | 2 | 2018-09-27T11:45:06.000Z | 2019-06-28T10:41:59.000Z | build/design/clock.cpp | laxtools/lax | 4b6ac5e042787f1c66e6f4771ec9aafe6b2df26b | [
"MIT"
] | 1 | 2017-08-28T07:39:31.000Z | 2018-01-26T05:03:29.000Z | build/design/clock.cpp | laxtools/lax | 4b6ac5e042787f1c66e6f4771ec9aafe6b2df26b | [
"MIT"
] | 1 | 2018-09-27T11:45:26.000Z | 2018-09-27T11:45:26.000Z | #include "stdafx.h"
#include "catch.hpp"
#include <chrono>
#include <iostream>
#include <thread>
#include <map>
namespace ex
{
struct perf_span
{
perf_span()
: begin_(std::chrono::high_resolution_clock::now())
{
}
void reset()
{
begin_ = std::chrono::high_resolution_clock::now();
}
float elapsed() const
{
std::chrono::duration<float> span = std::chrono::high_resolution_clock::now() - begin_;
return span.count();
}
std::chrono::high_resolution_clock::time_point begin_;
};
}
TEST_CASE("high resolution", "clock")
{
SECTION("simple usage")
{
auto clk = std::chrono::high_resolution_clock::now();
std::this_thread::sleep_for(std::chrono::milliseconds(100));
auto now = std::chrono::high_resolution_clock::now();
std::chrono::duration<float> span = (now - clk);
std::cout << "seconds: " << span.count() << std::endl;
}
SECTION("simple timer")
{
ex::perf_span pspan;
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
std::cout << "seconds: " << pspan.elapsed() << std::endl;
}
SECTION("c++ test")
{
std::map<int, std::string> hello;
auto iter = hello.find(3);
REQUIRE(iter->second == "hello");
int v = 600'000;
}
} | 18.362319 | 90 | 0.615627 | laxtools |
97e3066692a37f0a44eae8486f3dae71e9edcea4 | 200,714 | inl | C++ | 2d_samples/pmj02_135.inl | st-ario/rayme | 315c57c23f4aa4934a8a80e84e3243acd3400808 | [
"MIT"
] | 1 | 2021-12-10T23:35:04.000Z | 2021-12-10T23:35:04.000Z | 2d_samples/pmj02_135.inl | st-ario/rayme | 315c57c23f4aa4934a8a80e84e3243acd3400808 | [
"MIT"
] | null | null | null | 2d_samples/pmj02_135.inl | st-ario/rayme | 315c57c23f4aa4934a8a80e84e3243acd3400808 | [
"MIT"
] | null | null | null | {std::array<float,2>{0.203858882f, 0.797032833f},
std::array<float,2>{0.892523766f, 0.441579163f},
std::array<float,2>{0.407151997f, 0.0233917385f},
std::array<float,2>{0.644022763f, 0.690212846f},
std::array<float,2>{0.334998846f, 0.524249792f},
std::array<float,2>{0.555751503f, 0.192193568f},
std::array<float,2>{0.0291189123f, 0.25819692f},
std::array<float,2>{0.760083973f, 0.976848543f},
std::array<float,2>{0.0948297009f, 0.635060787f},
std::array<float,2>{0.865484834f, 0.089720048f},
std::array<float,2>{0.265196323f, 0.397465646f},
std::array<float,2>{0.623164892f, 0.836701274f},
std::array<float,2>{0.475756586f, 0.912104547f},
std::array<float,2>{0.731368124f, 0.34919104f},
std::array<float,2>{0.138763994f, 0.15922524f},
std::array<float,2>{0.96198684f, 0.571642935f},
std::array<float,2>{0.0532597825f, 0.953336298f},
std::array<float,2>{0.79172045f, 0.286885858f},
std::array<float,2>{0.344946623f, 0.227497235f},
std::array<float,2>{0.528218329f, 0.549673855f},
std::array<float,2>{0.397521913f, 0.734130561f},
std::array<float,2>{0.661419332f, 0.0528524034f},
std::array<float,2>{0.246129334f, 0.498851538f},
std::array<float,2>{0.928507626f, 0.777858555f},
std::array<float,2>{0.163662165f, 0.620304585f},
std::array<float,2>{0.983067453f, 0.1562116f},
std::array<float,2>{0.45795399f, 0.327422649f},
std::array<float,2>{0.707488954f, 0.883500159f},
std::array<float,2>{0.287198424f, 0.872861087f},
std::array<float,2>{0.56512475f, 0.410695046f},
std::array<float,2>{0.0864644647f, 0.105648771f},
std::array<float,2>{0.830015421f, 0.674185276f},
std::array<float,2>{0.145617545f, 0.902712464f},
std::array<float,2>{0.940263271f, 0.330396593f},
std::array<float,2>{0.489332139f, 0.138494521f},
std::array<float,2>{0.742275119f, 0.596361637f},
std::array<float,2>{0.277266234f, 0.665036976f},
std::array<float,2>{0.598041534f, 0.112179466f},
std::array<float,2>{0.113281518f, 0.431559324f},
std::array<float,2>{0.849877894f, 0.85550642f},
std::array<float,2>{0.00682157231f, 0.543917596f},
std::array<float,2>{0.777728021f, 0.241208389f},
std::array<float,2>{0.321019083f, 0.299486369f},
std::array<float,2>{0.538520873f, 0.941763461f},
std::array<float,2>{0.435276687f, 0.755790234f},
std::array<float,2>{0.626712561f, 0.475175381f},
std::array<float,2>{0.198607326f, 0.0456907414f},
std::array<float,2>{0.881435573f, 0.745467901f},
std::array<float,2>{0.0719156191f, 0.812943637f},
std::array<float,2>{0.814076006f, 0.376947641f},
std::array<float,2>{0.303506076f, 0.0747235566f},
std::array<float,2>{0.587246954f, 0.653481662f},
std::array<float,2>{0.441132486f, 0.582971513f},
std::array<float,2>{0.700124919f, 0.172124118f},
std::array<float,2>{0.175892949f, 0.367257237f},
std::array<float,2>{0.986017883f, 0.929511189f},
std::array<float,2>{0.21928221f, 0.711602688f},
std::array<float,2>{0.91003716f, 0.00154905533f},
std::array<float,2>{0.386837095f, 0.453237683f},
std::array<float,2>{0.676249444f, 0.782782972f},
std::array<float,2>{0.362486869f, 0.984396458f},
std::array<float,2>{0.504981458f, 0.26817596f},
std::array<float,2>{0.034213528f, 0.206252769f},
std::array<float,2>{0.806237459f, 0.515462041f},
std::array<float,2>{0.181877881f, 0.847751081f},
std::array<float,2>{0.997891784f, 0.425121516f},
std::array<float,2>{0.451130062f, 0.123049125f},
std::array<float,2>{0.688606203f, 0.656559527f},
std::array<float,2>{0.308212548f, 0.609220803f},
std::array<float,2>{0.585447013f, 0.13086386f},
std::array<float,2>{0.0697878376f, 0.337326735f},
std::array<float,2>{0.821581602f, 0.89366883f},
std::array<float,2>{0.0405593403f, 0.735280275f},
std::array<float,2>{0.79980576f, 0.0388865955f},
std::array<float,2>{0.374758542f, 0.479913503f},
std::array<float,2>{0.515005171f, 0.759033084f},
std::array<float,2>{0.378568918f, 0.951411843f},
std::array<float,2>{0.682780564f, 0.308468401f},
std::array<float,2>{0.230273664f, 0.247060612f},
std::array<float,2>{0.920321465f, 0.534017324f},
std::array<float,2>{0.122228496f, 0.930253267f},
std::array<float,2>{0.852124155f, 0.363938361f},
std::array<float,2>{0.266912639f, 0.182417542f},
std::array<float,2>{0.606351674f, 0.587576509f},
std::array<float,2>{0.495955557f, 0.641768932f},
std::array<float,2>{0.740915954f, 0.0658510625f},
std::array<float,2>{0.15206489f, 0.385228902f},
std::array<float,2>{0.949000299f, 0.825424373f},
std::array<float,2>{0.194771439f, 0.501712024f},
std::array<float,2>{0.890093327f, 0.211224824f},
std::array<float,2>{0.42741999f, 0.280480921f},
std::array<float,2>{0.638358891f, 0.993505836f},
std::array<float,2>{0.314198107f, 0.794080436f},
std::array<float,2>{0.540714622f, 0.464980185f},
std::array<float,2>{0.00847364403f, 0.00863354374f},
std::array<float,2>{0.770728707f, 0.71007818f},
std::array<float,2>{0.238283932f, 0.972209513f},
std::array<float,2>{0.932776392f, 0.253454149f},
std::array<float,2>{0.405927956f, 0.197234675f},
std::array<float,2>{0.669301152f, 0.520017147f},
std::array<float,2>{0.357030183f, 0.702003419f},
std::array<float,2>{0.519353569f, 0.0252033472f},
std::array<float,2>{0.0621023588f, 0.447789401f},
std::array<float,2>{0.788672745f, 0.810492814f},
std::array<float,2>{0.0811370015f, 0.5687235f},
std::array<float,2>{0.84357059f, 0.169954062f},
std::array<float,2>{0.291642308f, 0.357075155f},
std::array<float,2>{0.57529366f, 0.916478097f},
std::array<float,2>{0.462287635f, 0.835338593f},
std::array<float,2>{0.718205929f, 0.404016286f},
std::array<float,2>{0.167194635f, 0.0824814215f},
std::array<float,2>{0.974900305f, 0.632306218f},
std::array<float,2>{0.0207797773f, 0.770372748f},
std::array<float,2>{0.753701508f, 0.491364181f},
std::array<float,2>{0.342472464f, 0.0602637567f},
std::array<float,2>{0.548422933f, 0.726285815f},
std::array<float,2>{0.417013526f, 0.562468112f},
std::array<float,2>{0.65564549f, 0.222608387f},
std::array<float,2>{0.211194649f, 0.289171755f},
std::array<float,2>{0.904432118f, 0.96281904f},
std::array<float,2>{0.12749137f, 0.685062528f},
std::array<float,2>{0.954525113f, 0.0999747813f},
std::array<float,2>{0.483644634f, 0.42001161f},
std::array<float,2>{0.720845401f, 0.860657632f},
std::array<float,2>{0.257699817f, 0.877157688f},
std::array<float,2>{0.61019206f, 0.313242555f},
std::array<float,2>{0.108702853f, 0.148158655f},
std::array<float,2>{0.874944746f, 0.614130616f},
std::array<float,2>{0.135296211f, 0.76429534f},
std::array<float,2>{0.968114853f, 0.481395483f},
std::array<float,2>{0.470778078f, 0.0351122245f},
std::array<float,2>{0.729368448f, 0.741158783f},
std::array<float,2>{0.260920286f, 0.538396299f},
std::array<float,2>{0.6194911f, 0.243664369f},
std::array<float,2>{0.101538457f, 0.310848922f},
std::array<float,2>{0.86319375f, 0.9456833f},
std::array<float,2>{0.0258552432f, 0.662528038f},
std::array<float,2>{0.765491962f, 0.118141733f},
std::array<float,2>{0.330100805f, 0.427771151f},
std::array<float,2>{0.560774088f, 0.846616983f},
std::array<float,2>{0.412327707f, 0.895298243f},
std::array<float,2>{0.645223796f, 0.340233743f},
std::array<float,2>{0.207181737f, 0.126087502f},
std::array<float,2>{0.898331761f, 0.601801693f},
std::array<float,2>{0.0936021209f, 0.998727918f},
std::array<float,2>{0.832439244f, 0.273942679f},
std::array<float,2>{0.284331203f, 0.217868865f},
std::array<float,2>{0.569057882f, 0.507257283f},
std::array<float,2>{0.455226898f, 0.703589678f},
std::array<float,2>{0.705530882f, 0.011982834f},
std::array<float,2>{0.160132006f, 0.46190998f},
std::array<float,2>{0.979568899f, 0.789561629f},
std::array<float,2>{0.244097501f, 0.589995921f},
std::array<float,2>{0.925384283f, 0.185543299f},
std::array<float,2>{0.391247392f, 0.362980932f},
std::array<float,2>{0.65886271f, 0.935291529f},
std::array<float,2>{0.351319939f, 0.824185133f},
std::array<float,2>{0.523899794f, 0.389804989f},
std::array<float,2>{0.0472298935f, 0.0666070804f},
std::array<float,2>{0.795736074f, 0.644868731f},
std::array<float,2>{0.202005416f, 0.921430886f},
std::array<float,2>{0.876387179f, 0.354918092f},
std::array<float,2>{0.431727797f, 0.164891198f},
std::array<float,2>{0.62953645f, 0.563611805f},
std::array<float,2>{0.326379508f, 0.625210941f},
std::array<float,2>{0.534610271f, 0.0800717846f},
std::array<float,2>{0.00162338943f, 0.401142865f},
std::array<float,2>{0.774004281f, 0.831011713f},
std::array<float,2>{0.110832945f, 0.518205583f},
std::array<float,2>{0.847340822f, 0.200219974f},
std::array<float,2>{0.277489036f, 0.253967375f},
std::array<float,2>{0.595484197f, 0.975665271f},
std::array<float,2>{0.488043159f, 0.807488501f},
std::array<float,2>{0.746940732f, 0.450172335f},
std::array<float,2>{0.142827898f, 0.0306224786f},
std::array<float,2>{0.945118308f, 0.696668327f},
std::array<float,2>{0.0354534984f, 0.864028156f},
std::array<float,2>{0.809004486f, 0.415835559f},
std::array<float,2>{0.363831758f, 0.0954794213f},
std::array<float,2>{0.500801444f, 0.680122733f},
std::array<float,2>{0.386491507f, 0.609625101f},
std::array<float,2>{0.67321682f, 0.140893504f},
std::array<float,2>{0.225183487f, 0.316997677f},
std::array<float,2>{0.91243273f, 0.880906641f},
std::array<float,2>{0.174868241f, 0.72173351f},
std::array<float,2>{0.991965652f, 0.056832768f},
std::array<float,2>{0.444585949f, 0.484937489f},
std::array<float,2>{0.696254849f, 0.769145548f},
std::array<float,2>{0.299537152f, 0.967524052f},
std::array<float,2>{0.591276824f, 0.294574022f},
std::array<float,2>{0.0749417022f, 0.226275504f},
std::array<float,2>{0.817152619f, 0.558014512f},
std::array<float,2>{0.232641906f, 0.842726827f},
std::array<float,2>{0.917329788f, 0.393307626f},
std::array<float,2>{0.382201433f, 0.0907223746f},
std::array<float,2>{0.685936987f, 0.639344037f},
std::array<float,2>{0.37093237f, 0.577824175f},
std::array<float,2>{0.511234522f, 0.16389212f},
std::array<float,2>{0.0468490236f, 0.345061719f},
std::array<float,2>{0.801810205f, 0.908026755f},
std::array<float,2>{0.0657193884f, 0.693525791f},
std::array<float,2>{0.825768352f, 0.0158438869f},
std::array<float,2>{0.31091091f, 0.438679665f},
std::array<float,2>{0.581875205f, 0.800866008f},
std::array<float,2>{0.447513252f, 0.982137144f},
std::array<float,2>{0.692927361f, 0.26182425f},
std::array<float,2>{0.186087295f, 0.187863857f},
std::array<float,2>{0.995164335f, 0.527833641f},
std::array<float,2>{0.0121059623f, 0.888004601f},
std::array<float,2>{0.768535614f, 0.32182458f},
std::array<float,2>{0.318221152f, 0.15058212f},
std::array<float,2>{0.546494246f, 0.622562885f},
std::array<float,2>{0.422083735f, 0.679175615f},
std::array<float,2>{0.634608924f, 0.102468066f},
std::array<float,2>{0.18923755f, 0.407767653f},
std::array<float,2>{0.884441078f, 0.870638847f},
std::array<float,2>{0.155289218f, 0.552682698f},
std::array<float,2>{0.952690721f, 0.231542885f},
std::array<float,2>{0.497831762f, 0.284841001f},
std::array<float,2>{0.737081528f, 0.957701325f},
std::array<float,2>{0.272431344f, 0.776972413f},
std::array<float,2>{0.602447808f, 0.496079147f},
std::array<float,2>{0.120172247f, 0.0482298248f},
std::array<float,2>{0.859170794f, 0.72737062f},
std::array<float,2>{0.16999492f, 0.941110969f},
std::array<float,2>{0.969544709f, 0.304283589f},
std::array<float,2>{0.465298206f, 0.236244097f},
std::array<float,2>{0.713692904f, 0.540824413f},
std::array<float,2>{0.294680119f, 0.746830046f},
std::array<float,2>{0.570983529f, 0.041403573f},
std::array<float,2>{0.083376281f, 0.470575631f},
std::array<float,2>{0.839673162f, 0.752566576f},
std::array<float,2>{0.057745304f, 0.600618899f},
std::array<float,2>{0.782148302f, 0.13589327f},
std::array<float,2>{0.354591191f, 0.333026141f},
std::array<float,2>{0.52142477f, 0.901878715f},
std::array<float,2>{0.401975036f, 0.85382098f},
std::array<float,2>{0.667541027f, 0.434025407f},
std::array<float,2>{0.238139689f, 0.115473852f},
std::array<float,2>{0.933799148f, 0.668767273f},
std::array<float,2>{0.102548249f, 0.786319256f},
std::array<float,2>{0.86823982f, 0.457326382f},
std::array<float,2>{0.251922905f, 0.0040398906f},
std::array<float,2>{0.613882542f, 0.714933038f},
std::array<float,2>{0.478857309f, 0.509544909f},
std::array<float,2>{0.723399162f, 0.210130051f},
std::array<float,2>{0.130561054f, 0.27291882f},
std::array<float,2>{0.959838271f, 0.990518093f},
std::array<float,2>{0.218021795f, 0.650587976f},
std::array<float,2>{0.901201308f, 0.0739958137f},
std::array<float,2>{0.41965121f, 0.382443488f},
std::array<float,2>{0.651987314f, 0.816428363f},
std::array<float,2>{0.336976677f, 0.925086498f},
std::array<float,2>{0.552624404f, 0.371365577f},
std::array<float,2>{0.0191302299f, 0.177449957f},
std::array<float,2>{0.754899859f, 0.58051616f},
std::array<float,2>{0.248882532f, 0.780858159f},
std::array<float,2>{0.927727699f, 0.497516334f},
std::array<float,2>{0.394620061f, 0.0511483476f},
std::array<float,2>{0.66271776f, 0.731797993f},
std::array<float,2>{0.346334934f, 0.548772633f},
std::array<float,2>{0.530750632f, 0.229295433f},
std::array<float,2>{0.0526745878f, 0.288929433f},
std::array<float,2>{0.78952831f, 0.95684278f},
std::array<float,2>{0.0886957869f, 0.673217177f},
std::array<float,2>{0.830906153f, 0.108256444f},
std::array<float,2>{0.286642224f, 0.413650393f},
std::array<float,2>{0.562795222f, 0.873720348f},
std::array<float,2>{0.460739344f, 0.886167943f},
std::array<float,2>{0.710605204f, 0.324285507f},
std::array<float,2>{0.161810368f, 0.152926311f},
std::array<float,2>{0.981949389f, 0.618319631f},
std::array<float,2>{0.0295058396f, 0.980412662f},
std::array<float,2>{0.758744836f, 0.260401338f},
std::array<float,2>{0.332710147f, 0.19363445f},
std::array<float,2>{0.5579741f, 0.525788248f},
std::array<float,2>{0.409814835f, 0.688348353f},
std::array<float,2>{0.642128587f, 0.0213072281f},
std::array<float,2>{0.205956191f, 0.443901122f},
std::array<float,2>{0.892731965f, 0.800495505f},
std::array<float,2>{0.137137219f, 0.572784603f},
std::array<float,2>{0.963313818f, 0.156947047f},
std::array<float,2>{0.473271757f, 0.349886835f},
std::array<float,2>{0.733071983f, 0.912664592f},
std::array<float,2>{0.262550294f, 0.839654922f},
std::array<float,2>{0.62251538f, 0.396031797f},
std::array<float,2>{0.0968131125f, 0.0869121775f},
std::array<float,2>{0.863943219f, 0.634604454f},
std::array<float,2>{0.179656684f, 0.926373005f},
std::array<float,2>{0.987347066f, 0.369765699f},
std::array<float,2>{0.438877404f, 0.174272686f},
std::array<float,2>{0.702862561f, 0.584146559f},
std::array<float,2>{0.302155614f, 0.654425085f},
std::array<float,2>{0.589808702f, 0.0779812336f},
std::array<float,2>{0.0740647763f, 0.377010345f},
std::array<float,2>{0.814909399f, 0.814596295f},
std::array<float,2>{0.0313699171f, 0.51207757f},
std::array<float,2>{0.806835532f, 0.203681976f},
std::array<float,2>{0.360822529f, 0.266637027f},
std::array<float,2>{0.507373095f, 0.987344384f},
std::array<float,2>{0.390407205f, 0.784326136f},
std::array<float,2>{0.677771568f, 0.456670493f},
std::array<float,2>{0.220813766f, 0.00279564201f},
std::array<float,2>{0.906404316f, 0.714257479f},
std::array<float,2>{0.116837956f, 0.858540177f},
std::array<float,2>{0.847736239f, 0.432454795f},
std::array<float,2>{0.274039924f, 0.109866284f},
std::array<float,2>{0.600194335f, 0.666837096f},
std::array<float,2>{0.490965992f, 0.594801366f},
std::array<float,2>{0.745493352f, 0.139241815f},
std::array<float,2>{0.147019848f, 0.329251468f},
std::array<float,2>{0.93794769f, 0.905185282f},
std::array<float,2>{0.195919245f, 0.742723346f},
std::array<float,2>{0.879946947f, 0.0436179824f},
std::array<float,2>{0.436030179f, 0.473018318f},
std::array<float,2>{0.628794014f, 0.757187724f},
std::array<float,2>{0.323728442f, 0.945015311f},
std::array<float,2>{0.535479546f, 0.297981977f},
std::array<float,2>{0.00429692352f, 0.239067137f},
std::array<float,2>{0.780011058f, 0.54656595f},
std::array<float,2>{0.149491042f, 0.82710737f},
std::array<float,2>{0.946998298f, 0.383273602f},
std::array<float,2>{0.493285716f, 0.0631457269f},
std::array<float,2>{0.739424467f, 0.643700302f},
std::array<float,2>{0.267927766f, 0.589136422f},
std::array<float,2>{0.608914256f, 0.181095734f},
std::array<float,2>{0.123854525f, 0.365731865f},
std::array<float,2>{0.85486275f, 0.933189452f},
std::array<float,2>{0.0114121316f, 0.70768708f},
std::array<float,2>{0.772139668f, 0.0115786623f},
std::array<float,2>{0.315609008f, 0.468097091f},
std::array<float,2>{0.542075574f, 0.796135008f},
std::array<float,2>{0.427856266f, 0.994973302f},
std::array<float,2>{0.639052451f, 0.278919786f},
std::array<float,2>{0.192636222f, 0.213390142f},
std::array<float,2>{0.887511671f, 0.502941787f},
std::array<float,2>{0.0679632425f, 0.892260134f},
std::array<float,2>{0.823539019f, 0.338992417f},
std::array<float,2>{0.306624353f, 0.129599929f},
std::array<float,2>{0.583417177f, 0.606024206f},
std::array<float,2>{0.452800065f, 0.659184694f},
std::array<float,2>{0.691308022f, 0.121213205f},
std::array<float,2>{0.181286037f, 0.423595816f},
std::array<float,2>{0.999395907f, 0.851346016f},
std::array<float,2>{0.227446735f, 0.531368792f},
std::array<float,2>{0.919223785f, 0.248505831f},
std::array<float,2>{0.375892192f, 0.306347579f},
std::array<float,2>{0.680550337f, 0.949685872f},
std::array<float,2>{0.371750653f, 0.760830998f},
std::array<float,2>{0.513247132f, 0.478374153f},
std::array<float,2>{0.042736154f, 0.0356544033f},
std::array<float,2>{0.797687411f, 0.737968504f},
std::array<float,2>{0.213901043f, 0.964001298f},
std::array<float,2>{0.904062331f, 0.292965919f},
std::array<float,2>{0.415461183f, 0.220701993f},
std::array<float,2>{0.652677238f, 0.559464753f},
std::array<float,2>{0.341119736f, 0.724463463f},
std::array<float,2>{0.549390972f, 0.0608374253f},
std::array<float,2>{0.0225945208f, 0.490158319f},
std::array<float,2>{0.750019014f, 0.772994936f},
std::array<float,2>{0.106070213f, 0.61569488f},
std::array<float,2>{0.872325122f, 0.144814461f},
std::array<float,2>{0.25457111f, 0.315500796f},
std::array<float,2>{0.611589253f, 0.875528276f},
std::array<float,2>{0.481133163f, 0.862335145f},
std::array<float,2>{0.72015065f, 0.418340892f},
std::array<float,2>{0.125781596f, 0.0992153808f},
std::array<float,2>{0.956885099f, 0.68587172f},
std::array<float,2>{0.0592976585f, 0.811028302f},
std::array<float,2>{0.786320984f, 0.445491195f},
std::array<float,2>{0.358453572f, 0.0264056269f},
std::array<float,2>{0.517376602f, 0.69947058f},
std::array<float,2>{0.402483463f, 0.5218485f},
std::array<float,2>{0.671518803f, 0.198312014f},
std::array<float,2>{0.241055012f, 0.251404405f},
std::array<float,2>{0.930873096f, 0.970116794f},
std::array<float,2>{0.164476201f, 0.630404115f},
std::array<float,2>{0.973125637f, 0.0843170583f},
std::array<float,2>{0.464349896f, 0.405932307f},
std::array<float,2>{0.716064334f, 0.83374542f},
std::array<float,2>{0.289347827f, 0.914989889f},
std::array<float,2>{0.577967346f, 0.358340323f},
std::array<float,2>{0.0790177211f, 0.168443903f},
std::array<float,2>{0.840345621f, 0.567066133f},
std::array<float,2>{0.15722467f, 0.792697847f},
std::array<float,2>{0.97716552f, 0.464363813f},
std::array<float,2>{0.453883111f, 0.0141269155f},
std::array<float,2>{0.70316124f, 0.705434144f},
std::array<float,2>{0.282894671f, 0.505809963f},
std::array<float,2>{0.566785455f, 0.214976177f},
std::array<float,2>{0.0899263844f, 0.276549816f},
std::array<float,2>{0.83492136f, 0.997883439f},
std::array<float,2>{0.0494708344f, 0.647895098f},
std::array<float,2>{0.793664515f, 0.0702493712f},
std::array<float,2>{0.349042326f, 0.388266683f},
std::array<float,2>{0.525796056f, 0.821049809f},
std::array<float,2>{0.393860161f, 0.93679297f},
std::array<float,2>{0.656737804f, 0.360096812f},
std::array<float,2>{0.244550094f, 0.185705468f},
std::array<float,2>{0.923546255f, 0.593458593f},
std::array<float,2>{0.099282518f, 0.947819471f},
std::array<float,2>{0.86068213f, 0.31047371f},
std::array<float,2>{0.257822961f, 0.24451378f},
std::array<float,2>{0.61864531f, 0.536196947f},
std::array<float,2>{0.469001412f, 0.738527775f},
std::array<float,2>{0.728332579f, 0.0313968882f},
std::array<float,2>{0.13369453f, 0.484363377f},
std::array<float,2>{0.966704249f, 0.763336897f},
std::array<float,2>{0.209052816f, 0.604042709f},
std::array<float,2>{0.895482481f, 0.127119049f},
std::array<float,2>{0.410194695f, 0.343152612f},
std::array<float,2>{0.647372544f, 0.897714555f},
std::array<float,2>{0.328700155f, 0.845391929f},
std::array<float,2>{0.559967101f, 0.427005798f},
std::array<float,2>{0.0243948065f, 0.1201737f},
std::array<float,2>{0.762049317f, 0.66019243f},
std::array<float,2>{0.224488586f, 0.88018465f},
std::array<float,2>{0.910185635f, 0.31863904f},
std::array<float,2>{0.383172125f, 0.144497484f},
std::array<float,2>{0.674465954f, 0.613019884f},
std::array<float,2>{0.365735531f, 0.68180126f},
std::array<float,2>{0.50353539f, 0.0969202593f},
std::array<float,2>{0.0386642963f, 0.417596608f},
std::array<float,2>{0.810605824f, 0.866454184f},
std::array<float,2>{0.077457726f, 0.555906177f},
std::array<float,2>{0.819791436f, 0.224437222f},
std::array<float,2>{0.297585636f, 0.296740025f},
std::array<float,2>{0.592168272f, 0.966430068f},
std::array<float,2>{0.44207105f, 0.765674651f},
std::array<float,2>{0.699132919f, 0.487878978f},
std::array<float,2>{0.173227116f, 0.0563914515f},
std::array<float,2>{0.990086913f, 0.719587266f},
std::array<float,2>{0.00247562514f, 0.828413486f},
std::array<float,2>{0.775981128f, 0.399297535f},
std::array<float,2>{0.324552864f, 0.0804656297f},
std::array<float,2>{0.531797409f, 0.627203107f},
std::array<float,2>{0.431393802f, 0.565142632f},
std::array<float,2>{0.632379055f, 0.166631833f},
std::array<float,2>{0.200290456f, 0.351634651f},
std::array<float,2>{0.878674328f, 0.917997539f},
std::array<float,2>{0.142491713f, 0.698124826f},
std::array<float,2>{0.942452192f, 0.0278377626f},
std::array<float,2>{0.485532373f, 0.451917678f},
std::array<float,2>{0.749060214f, 0.80622977f},
std::array<float,2>{0.281043649f, 0.973544359f},
std::array<float,2>{0.596448779f, 0.256677151f},
std::array<float,2>{0.111658439f, 0.202548742f},
std::array<float,2>{0.844542861f, 0.517396986f},
std::array<float,2>{0.190452263f, 0.868139982f},
std::array<float,2>{0.886350811f, 0.409449011f},
std::array<float,2>{0.423879445f, 0.104166418f},
std::array<float,2>{0.634965599f, 0.677580655f},
std::array<float,2>{0.318837911f, 0.623509288f},
std::array<float,2>{0.54319334f, 0.149417818f},
std::array<float,2>{0.0155411586f, 0.322761834f},
std::array<float,2>{0.767445683f, 0.889800787f},
std::array<float,2>{0.119059399f, 0.72999531f},
std::array<float,2>{0.856117725f, 0.0505576506f},
std::array<float,2>{0.271170586f, 0.492820114f},
std::array<float,2>{0.605031669f, 0.77532053f},
std::array<float,2>{0.498972386f, 0.960199237f},
std::array<float,2>{0.736017883f, 0.283186287f},
std::array<float,2>{0.152509987f, 0.233047411f},
std::array<float,2>{0.950432479f, 0.552914858f},
std::array<float,2>{0.0441619381f, 0.908871531f},
std::array<float,2>{0.803923368f, 0.34610644f},
std::array<float,2>{0.368810564f, 0.161929086f},
std::array<float,2>{0.507976055f, 0.574225724f},
std::array<float,2>{0.380507112f, 0.636833012f},
std::array<float,2>{0.684658229f, 0.093248859f},
std::array<float,2>{0.230998769f, 0.391099155f},
std::array<float,2>{0.914573669f, 0.840143025f},
std::array<float,2>{0.18381229f, 0.530112088f},
std::array<float,2>{0.992588639f, 0.1900713f},
std::array<float,2>{0.445628732f, 0.263707131f},
std::array<float,2>{0.695285797f, 0.982470155f},
std::array<float,2>{0.309485525f, 0.804537892f},
std::array<float,2>{0.5783512f, 0.441158116f},
std::array<float,2>{0.064065367f, 0.0181566682f},
std::array<float,2>{0.827893317f, 0.693264961f},
std::array<float,2>{0.132060602f, 0.98938632f},
std::array<float,2>{0.957894385f, 0.271279067f},
std::array<float,2>{0.477411062f, 0.207220927f},
std::array<float,2>{0.724875569f, 0.510127366f},
std::array<float,2>{0.252018154f, 0.717437744f},
std::array<float,2>{0.615305126f, 0.00700955f},
std::array<float,2>{0.104056247f, 0.460189313f},
std::array<float,2>{0.870569706f, 0.788001955f},
std::array<float,2>{0.0174724404f, 0.579916358f},
std::array<float,2>{0.757338822f, 0.179531664f},
std::array<float,2>{0.338941634f, 0.374281883f},
std::array<float,2>{0.552824974f, 0.923742115f},
std::array<float,2>{0.420205116f, 0.819452405f},
std::array<float,2>{0.650133252f, 0.380486101f},
std::array<float,2>{0.214886025f, 0.0715020448f},
std::array<float,2>{0.898499846f, 0.649030387f},
std::array<float,2>{0.0842719078f, 0.750348985f},
std::array<float,2>{0.836887538f, 0.471745491f},
std::array<float,2>{0.296549648f, 0.0397165418f},
std::array<float,2>{0.573416889f, 0.748661578f},
std::array<float,2>{0.468113303f, 0.541421473f},
std::array<float,2>{0.711671233f, 0.237387538f},
std::array<float,2>{0.169280708f, 0.301790029f},
std::array<float,2>{0.972423673f, 0.939114332f},
std::array<float,2>{0.23458764f, 0.670532882f},
std::array<float,2>{0.936405063f, 0.114396468f},
std::array<float,2>{0.399864018f, 0.436099321f},
std::array<float,2>{0.665544689f, 0.853333473f},
std::array<float,2>{0.352764368f, 0.898441851f},
std::array<float,2>{0.521953285f, 0.335017413f},
std::array<float,2>{0.0547360517f, 0.133841574f},
std::array<float,2>{0.784471691f, 0.598298788f},
std::array<float,2>{0.221872494f, 0.782191932f},
std::array<float,2>{0.908006728f, 0.454464972f},
std::array<float,2>{0.389343858f, 1.08594031e-06f},
std::array<float,2>{0.678890824f, 0.712195933f},
std::array<float,2>{0.359485388f, 0.514113128f},
std::array<float,2>{0.506151676f, 0.205400646f},
std::array<float,2>{0.032940723f, 0.269329011f},
std::array<float,2>{0.808313787f, 0.98608309f},
std::array<float,2>{0.0728891119f, 0.653279185f},
std::array<float,2>{0.816082418f, 0.0761170685f},
std::array<float,2>{0.301240206f, 0.375684261f},
std::array<float,2>{0.588160813f, 0.814193249f},
std::array<float,2>{0.437884331f, 0.927830756f},
std::array<float,2>{0.701382577f, 0.368433148f},
std::array<float,2>{0.178107038f, 0.173361927f},
std::array<float,2>{0.986665547f, 0.583939254f},
std::array<float,2>{0.00539048295f, 0.943131745f},
std::array<float,2>{0.780913651f, 0.300346464f},
std::array<float,2>{0.322956204f, 0.241927147f},
std::array<float,2>{0.536782384f, 0.544354796f},
std::array<float,2>{0.436778814f, 0.744755745f},
std::array<float,2>{0.627770245f, 0.0461244136f},
std::array<float,2>{0.196601033f, 0.475922644f},
std::array<float,2>{0.879518688f, 0.754752278f},
std::array<float,2>{0.148392171f, 0.597029865f},
std::array<float,2>{0.938678563f, 0.137687668f},
std::array<float,2>{0.492110193f, 0.331167608f},
std::array<float,2>{0.744695961f, 0.90395695f},
std::array<float,2>{0.275185674f, 0.857206762f},
std::array<float,2>{0.601307392f, 0.43062225f},
std::array<float,2>{0.115750939f, 0.112657093f},
std::array<float,2>{0.849018991f, 0.665468514f},
std::array<float,2>{0.16040273f, 0.884215772f},
std::array<float,2>{0.981368482f, 0.327014983f},
std::array<float,2>{0.459155321f, 0.154958516f},
std::array<float,2>{0.709676325f, 0.619216263f},
std::array<float,2>{0.285248876f, 0.675217748f},
std::array<float,2>{0.563572466f, 0.106767617f},
std::array<float,2>{0.0891588554f, 0.411738813f},
std::array<float,2>{0.831848681f, 0.871214867f},
std::array<float,2>{0.0509531796f, 0.550541222f},
std::array<float,2>{0.790749073f, 0.228292048f},
std::array<float,2>{0.347178847f, 0.286037177f},
std::array<float,2>{0.529741645f, 0.955041349f},
std::array<float,2>{0.396097571f, 0.778377831f},
std::array<float,2>{0.66364795f, 0.499474436f},
std::array<float,2>{0.249237284f, 0.0537750684f},
std::array<float,2>{0.926236153f, 0.732424557f},
std::array<float,2>{0.0966383219f, 0.83783251f},
std::array<float,2>{0.864757597f, 0.396718889f},
std::array<float,2>{0.263153613f, 0.0882017687f},
std::array<float,2>{0.621405244f, 0.636530817f},
std::array<float,2>{0.473948717f, 0.570967793f},
std::array<float,2>{0.734066844f, 0.158313885f},
std::array<float,2>{0.13802819f, 0.348236054f},
std::array<float,2>{0.964198709f, 0.910686135f},
std::array<float,2>{0.206350893f, 0.690480053f},
std::array<float,2>{0.893719077f, 0.0224359855f},
std::array<float,2>{0.408638388f, 0.44243452f},
std::array<float,2>{0.641054153f, 0.79802537f},
std::array<float,2>{0.333300292f, 0.977590024f},
std::array<float,2>{0.55685246f, 0.259236246f},
std::array<float,2>{0.0303524137f, 0.192384765f},
std::array<float,2>{0.759495676f, 0.525093496f},
std::array<float,2>{0.126887232f, 0.859825313f},
std::array<float,2>{0.955213428f, 0.421006411f},
std::array<float,2>{0.481817365f, 0.100848958f},
std::array<float,2>{0.718906224f, 0.684035897f},
std::array<float,2>{0.254889578f, 0.614864409f},
std::array<float,2>{0.613239348f, 0.147429243f},
std::array<float,2>{0.106631741f, 0.313776106f},
std::array<float,2>{0.87182194f, 0.878351629f},
std::array<float,2>{0.02187673f, 0.724780083f},
std::array<float,2>{0.751626194f, 0.0587346926f},
std::array<float,2>{0.340527952f, 0.490666866f},
std::array<float,2>{0.550705969f, 0.77062577f},
std::array<float,2>{0.414407045f, 0.961264312f},
std::array<float,2>{0.653427005f, 0.290678054f},
std::array<float,2>{0.213554338f, 0.221112847f},
std::array<float,2>{0.902796626f, 0.560919881f},
std::array<float,2>{0.0794450343f, 0.917553663f},
std::array<float,2>{0.841099322f, 0.356383413f},
std::array<float,2>{0.290330201f, 0.171828687f},
std::array<float,2>{0.57695508f, 0.569938242f},
std::array<float,2>{0.463399351f, 0.631691456f},
std::array<float,2>{0.715004921f, 0.0833272263f},
std::array<float,2>{0.165209308f, 0.402507246f},
std::array<float,2>{0.974279344f, 0.834766626f},
std::array<float,2>{0.242138743f, 0.521149457f},
std::array<float,2>{0.930308282f, 0.196024731f},
std::array<float,2>{0.403468847f, 0.252546251f},
std::array<float,2>{0.670144737f, 0.971465409f},
std::array<float,2>{0.35826382f, 0.809445322f},
std::array<float,2>{0.515956342f, 0.448265016f},
std::array<float,2>{0.0605043024f, 0.0241710655f},
std::array<float,2>{0.78573817f, 0.702649057f},
std::array<float,2>{0.191591963f, 0.992807984f},
std::array<float,2>{0.888448596f, 0.280081451f},
std::array<float,2>{0.429504275f, 0.212081701f},
std::array<float,2>{0.639994562f, 0.500241339f},
std::array<float,2>{0.314983249f, 0.708995163f},
std::array<float,2>{0.541878581f, 0.00969289057f},
std::array<float,2>{0.0104649048f, 0.466554344f},
std::array<float,2>{0.772847474f, 0.793197274f},
std::array<float,2>{0.124210693f, 0.586107254f},
std::array<float,2>{0.854005218f, 0.183430493f},
std::array<float,2>{0.26946944f, 0.365034491f},
std::array<float,2>{0.607769787f, 0.931620717f},
std::array<float,2>{0.493031025f, 0.825181246f},
std::array<float,2>{0.738752961f, 0.386477113f},
std::array<float,2>{0.14929989f, 0.0649971813f},
std::array<float,2>{0.945886552f, 0.641105533f},
std::array<float,2>{0.0414173938f, 0.757835746f},
std::array<float,2>{0.798691869f, 0.479243904f},
std::array<float,2>{0.372815728f, 0.0374985412f},
std::array<float,2>{0.512094021f, 0.735643566f},
std::array<float,2>{0.376639068f, 0.534666359f},
std::array<float,2>{0.681152761f, 0.247107431f},
std::array<float,2>{0.228463963f, 0.307259232f},
std::array<float,2>{0.918591678f, 0.952940345f},
std::array<float,2>{0.180165708f, 0.657295048f},
std::array<float,2>{0.998758733f, 0.124398783f},
std::array<float,2>{0.451254636f, 0.424722701f},
std::array<float,2>{0.689927042f, 0.849045277f},
std::array<float,2>{0.305109948f, 0.892739475f},
std::array<float,2>{0.58236748f, 0.336499631f},
std::array<float,2>{0.0664146319f, 0.13187246f},
std::array<float,2>{0.822875798f, 0.608325541f},
std::array<float,2>{0.172756717f, 0.768267393f},
std::array<float,2>{0.98855108f, 0.485487789f},
std::array<float,2>{0.442787379f, 0.0579537638f},
std::array<float,2>{0.697647691f, 0.721254766f},
std::array<float,2>{0.298469603f, 0.556815445f},
std::array<float,2>{0.593273282f, 0.22525996f},
std::array<float,2>{0.0768682286f, 0.29364121f},
std::array<float,2>{0.819012463f, 0.968547523f},
std::array<float,2>{0.0378533266f, 0.681080401f},
std::array<float,2>{0.812173069f, 0.0943590701f},
std::array<float,2>{0.366637409f, 0.414595306f},
std::array<float,2>{0.50280565f, 0.864279807f},
std::array<float,2>{0.383830965f, 0.882721245f},
std::array<float,2>{0.674877286f, 0.317792505f},
std::array<float,2>{0.222749144f, 0.142111495f},
std::array<float,2>{0.91113627f, 0.610426366f},
std::array<float,2>{0.112548046f, 0.975041091f},
std::array<float,2>{0.845459044f, 0.255078644f},
std::array<float,2>{0.279939413f, 0.199553952f},
std::array<float,2>{0.596696496f, 0.518810391f},
std::array<float,2>{0.485091448f, 0.695828557f},
std::array<float,2>{0.748952687f, 0.0298561547f},
std::array<float,2>{0.141232327f, 0.450265348f},
std::array<float,2>{0.941946268f, 0.807766795f},
std::array<float,2>{0.199629739f, 0.562555611f},
std::array<float,2>{0.877228141f, 0.165287793f},
std::array<float,2>{0.430052906f, 0.353799373f},
std::array<float,2>{0.63164717f, 0.920353472f},
std::array<float,2>{0.325375795f, 0.831773221f},
std::array<float,2>{0.532823503f, 0.401530236f},
std::array<float,2>{0.00337474351f, 0.0790341944f},
std::array<float,2>{0.776535332f, 0.626619756f},
std::array<float,2>{0.245208234f, 0.933774352f},
std::array<float,2>{0.922770441f, 0.361403197f},
std::array<float,2>{0.393458217f, 0.184124827f},
std::array<float,2>{0.658143282f, 0.591503799f},
std::array<float,2>{0.348332614f, 0.64571625f},
std::array<float,2>{0.526523352f, 0.0681686252f},
std::array<float,2>{0.050413914f, 0.389407367f},
std::array<float,2>{0.794293821f, 0.823093116f},
std::array<float,2>{0.0912875384f, 0.505872548f},
std::array<float,2>{0.835554719f, 0.217444643f},
std::array<float,2>{0.28177312f, 0.275040388f},
std::array<float,2>{0.567686975f, 0.999764383f},
std::array<float,2>{0.454335183f, 0.790319145f},
std::array<float,2>{0.704829574f, 0.462020069f},
std::array<float,2>{0.157281235f, 0.0131774182f},
std::array<float,2>{0.978347242f, 0.704259157f},
std::array<float,2>{0.0245774835f, 0.847334087f},
std::array<float,2>{0.763480186f, 0.429156393f},
std::array<float,2>{0.32950452f, 0.118725501f},
std::array<float,2>{0.558842897f, 0.663636446f},
std::array<float,2>{0.412021428f, 0.603171647f},
std::array<float,2>{0.64784801f, 0.12566112f},
std::array<float,2>{0.210889861f, 0.34107247f},
std::array<float,2>{0.895624459f, 0.896072805f},
std::array<float,2>{0.134465858f, 0.74207598f},
std::array<float,2>{0.96562016f, 0.0336533524f},
std::array<float,2>{0.470147282f, 0.482070774f},
std::array<float,2>{0.726857662f, 0.764743149f},
std::array<float,2>{0.25940907f, 0.946554303f},
std::array<float,2>{0.618144929f, 0.312070042f},
std::array<float,2>{0.098399356f, 0.242612422f},
std::array<float,2>{0.860127807f, 0.537143052f},
std::array<float,2>{0.215838671f, 0.817411482f},
std::array<float,2>{0.899676681f, 0.3818084f},
std::array<float,2>{0.421872348f, 0.0727150962f},
std::array<float,2>{0.648942828f, 0.651627481f},
std::array<float,2>{0.338621855f, 0.581986487f},
std::array<float,2>{0.554382145f, 0.176315755f},
std::array<float,2>{0.0162424296f, 0.372854799f},
std::array<float,2>{0.755970597f, 0.924473941f},
std::array<float,2>{0.104801796f, 0.716488898f},
std::array<float,2>{0.869773507f, 0.00542410184f},
std::array<float,2>{0.25346902f, 0.458038628f},
std::array<float,2>{0.616559744f, 0.785448968f},
std::array<float,2>{0.477859229f, 0.99156487f},
std::array<float,2>{0.725963771f, 0.27211374f},
std::array<float,2>{0.13113223f, 0.209370822f},
std::array<float,2>{0.958545566f, 0.507888436f},
std::array<float,2>{0.0558527336f, 0.901330233f},
std::array<float,2>{0.784148097f, 0.332835585f},
std::array<float,2>{0.352454543f, 0.135652572f},
std::array<float,2>{0.522481859f, 0.60019666f},
std::array<float,2>{0.398914427f, 0.669377387f},
std::array<float,2>{0.664110661f, 0.116742119f},
std::array<float,2>{0.23571521f, 0.434786558f},
std::array<float,2>{0.937318206f, 0.854546845f},
std::array<float,2>{0.168313548f, 0.53991735f},
std::array<float,2>{0.970974803f, 0.234633386f},
std::array<float,2>{0.467320502f, 0.30357185f},
std::array<float,2>{0.712162077f, 0.940247059f},
std::array<float,2>{0.295167357f, 0.753902555f},
std::array<float,2>{0.572290838f, 0.469441086f},
std::array<float,2>{0.0852482915f, 0.0427978002f},
std::array<float,2>{0.837176025f, 0.747839034f},
std::array<float,2>{0.153912067f, 0.958750427f},
std::array<float,2>{0.949952245f, 0.283396095f},
std::array<float,2>{0.499619126f, 0.231029972f},
std::array<float,2>{0.734861314f, 0.551001251f},
std::array<float,2>{0.269602656f, 0.727573633f},
std::array<float,2>{0.603956759f, 0.0471317582f},
std::array<float,2>{0.117396906f, 0.494412512f},
std::array<float,2>{0.857109427f, 0.775992513f},
std::array<float,2>{0.0140245147f, 0.62121278f},
std::array<float,2>{0.766146362f, 0.151720569f},
std::array<float,2>{0.31989783f, 0.320387393f},
std::array<float,2>{0.544719994f, 0.887230277f},
std::array<float,2>{0.425498098f, 0.869561076f},
std::array<float,2>{0.636230886f, 0.406370729f},
std::array<float,2>{0.190296918f, 0.103453547f},
std::array<float,2>{0.885190189f, 0.67776382f},
std::array<float,2>{0.0631282628f, 0.802586854f},
std::array<float,2>{0.826547921f, 0.438237131f},
std::array<float,2>{0.310080647f, 0.0168146547f},
std::array<float,2>{0.579401731f, 0.694841087f},
std::array<float,2>{0.447245181f, 0.528839052f},
std::array<float,2>{0.69351542f, 0.188615963f},
std::array<float,2>{0.18525137f, 0.263205558f},
std::array<float,2>{0.993860602f, 0.981330216f},
std::array<float,2>{0.231633902f, 0.640061915f},
std::array<float,2>{0.915773511f, 0.0913401842f},
std::array<float,2>{0.378911436f, 0.394528806f},
std::array<float,2>{0.683948517f, 0.84290266f},
std::array<float,2>{0.367949426f, 0.906558931f},
std::array<float,2>{0.508930385f, 0.344161302f},
std::array<float,2>{0.0438165478f, 0.162936315f},
std::array<float,2>{0.803444743f, 0.576672256f},
std::array<float,2>{0.198085293f, 0.756538212f},
std::array<float,2>{0.882418692f, 0.473927259f},
std::array<float,2>{0.433670282f, 0.0446733944f},
std::array<float,2>{0.625428379f, 0.743235767f},
std::array<float,2>{0.321711928f, 0.545590103f},
std::array<float,2>{0.537118077f, 0.239677399f},
std::array<float,2>{0.00753608393f, 0.297137499f},
std::array<float,2>{0.778366148f, 0.943818569f},
std::array<float,2>{0.11486046f, 0.667508125f},
std::array<float,2>{0.851133406f, 0.110905819f},
std::array<float,2>{0.275390923f, 0.432763904f},
std::array<float,2>{0.599153161f, 0.858182728f},
std::array<float,2>{0.488698065f, 0.905974627f},
std::array<float,2>{0.74350065f, 0.328904182f},
std::array<float,2>{0.145463943f, 0.139963508f},
std::array<float,2>{0.940463424f, 0.594422638f},
std::array<float,2>{0.0335705243f, 0.987240791f},
std::array<float,2>{0.805558622f, 0.265780002f},
std::array<float,2>{0.361704826f, 0.204790726f},
std::array<float,2>{0.50392735f, 0.513544977f},
std::array<float,2>{0.387898743f, 0.713774204f},
std::array<float,2>{0.676841259f, 0.00373937516f},
std::array<float,2>{0.220179215f, 0.455869704f},
std::array<float,2>{0.908355534f, 0.784090459f},
std::array<float,2>{0.177341521f, 0.585368276f},
std::array<float,2>{0.985043466f, 0.175658762f},
std::array<float,2>{0.440184504f, 0.370976835f},
std::array<float,2>{0.700203538f, 0.927188456f},
std::array<float,2>{0.30448252f, 0.815975428f},
std::array<float,2>{0.586403131f, 0.378296882f},
std::array<float,2>{0.0705273077f, 0.0764204562f},
std::array<float,2>{0.813370883f, 0.65587008f},
std::array<float,2>{0.140156314f, 0.913771033f},
std::array<float,2>{0.961682379f, 0.350618392f},
std::array<float,2>{0.475378007f, 0.1573769f},
std::array<float,2>{0.731999338f, 0.573463678f},
std::array<float,2>{0.263841748f, 0.633442342f},
std::array<float,2>{0.624745607f, 0.0871144012f},
std::array<float,2>{0.0938765332f, 0.395193428f},
std::array<float,2>{0.867020726f, 0.837925017f},
std::array<float,2>{0.0280969739f, 0.526936114f},
std::array<float,2>{0.76147759f, 0.195094511f},
std::array<float,2>{0.334083617f, 0.261696398f},
std::array<float,2>{0.555312991f, 0.979191899f},
std::array<float,2>{0.407515079f, 0.799663901f},
std::array<float,2>{0.643110037f, 0.444848537f},
std::array<float,2>{0.204128996f, 0.02015399f},
std::array<float,2>{0.890923858f, 0.688946307f},
std::array<float,2>{0.0876693353f, 0.874323606f},
std::array<float,2>{0.828386009f, 0.412616521f},
std::array<float,2>{0.288592786f, 0.109296836f},
std::array<float,2>{0.566013098f, 0.672050595f},
std::array<float,2>{0.458089888f, 0.617817879f},
std::array<float,2>{0.708584905f, 0.153453812f},
std::array<float,2>{0.162674814f, 0.325489044f},
std::array<float,2>{0.984362185f, 0.885132313f},
std::array<float,2>{0.247646078f, 0.730700076f},
std::array<float,2>{0.929185152f, 0.052153904f},
std::array<float,2>{0.396783799f, 0.49678269f},
std::array<float,2>{0.660379529f, 0.779996455f},
std::array<float,2>{0.343953669f, 0.955191612f},
std::array<float,2>{0.528494179f, 0.287848979f},
std::array<float,2>{0.0537868738f, 0.230458066f},
std::array<float,2>{0.792363942f, 0.547648251f},
std::array<float,2>{0.16676572f, 0.832473516f},
std::array<float,2>{0.976325035f, 0.40483138f},
std::array<float,2>{0.461721718f, 0.0858247057f},
std::array<float,2>{0.717424929f, 0.629673541f},
std::array<float,2>{0.292159379f, 0.567892849f},
std::array<float,2>{0.574912012f, 0.169711292f},
std::array<float,2>{0.0809853896f, 0.358846307f},
std::array<float,2>{0.842653573f, 0.915999889f},
std::array<float,2>{0.0605584495f, 0.700519204f},
std::array<float,2>{0.787669361f, 0.0259614903f},
std::array<float,2>{0.356440216f, 0.446950018f},
std::array<float,2>{0.518450737f, 0.812096119f},
std::array<float,2>{0.404464483f, 0.968769789f},
std::array<float,2>{0.668194771f, 0.250797749f},
std::array<float,2>{0.239406124f, 0.197487667f},
std::array<float,2>{0.932023466f, 0.522497833f},
std::array<float,2>{0.107744925f, 0.876716256f},
std::array<float,2>{0.873105407f, 0.315371692f},
std::array<float,2>{0.256301343f, 0.146402925f},
std::array<float,2>{0.610678494f, 0.616397679f},
std::array<float,2>{0.482711494f, 0.686755836f},
std::array<float,2>{0.722093999f, 0.0983594134f},
std::array<float,2>{0.128558606f, 0.419495612f},
std::array<float,2>{0.953454852f, 0.861624718f},
std::array<float,2>{0.212299228f, 0.55998826f},
std::array<float,2>{0.905866206f, 0.219178721f},
std::array<float,2>{0.416394323f, 0.291893005f},
std::array<float,2>{0.654429436f, 0.963795185f},
std::array<float,2>{0.34370929f, 0.771532595f},
std::array<float,2>{0.546924472f, 0.489044726f},
std::array<float,2>{0.0204713065f, 0.0621981248f},
std::array<float,2>{0.752033532f, 0.723228097f},
std::array<float,2>{0.229394704f, 0.950505495f},
std::array<float,2>{0.921824276f, 0.305068582f},
std::array<float,2>{0.377444327f, 0.249882549f},
std::array<float,2>{0.681947231f, 0.53313458f},
std::array<float,2>{0.373222858f, 0.737263262f},
std::array<float,2>{0.514118671f, 0.0361924693f},
std::array<float,2>{0.0391507298f, 0.477428019f},
std::array<float,2>{0.799500525f, 0.760323048f},
std::array<float,2>{0.0684069395f, 0.607210457f},
std::array<float,2>{0.820685565f, 0.130199984f},
std::array<float,2>{0.307015061f, 0.338350415f},
std::array<float,2>{0.584069908f, 0.891224384f},
std::array<float,2>{0.449532062f, 0.850570321f},
std::array<float,2>{0.687760651f, 0.421931773f},
std::array<float,2>{0.183088318f, 0.122405395f},
std::array<float,2>{0.996324241f, 0.658891559f},
std::array<float,2>{0.00911379792f, 0.795334816f},
std::array<float,2>{0.770246804f, 0.467427462f},
std::array<float,2>{0.312592179f, 0.0103182094f},
std::array<float,2>{0.539916992f, 0.708066344f},
std::array<float,2>{0.426654577f, 0.502857268f},
std::array<float,2>{0.637615144f, 0.214081496f},
std::array<float,2>{0.193835363f, 0.277849585f},
std::array<float,2>{0.889279008f, 0.995535314f},
std::array<float,2>{0.150430411f, 0.643472433f},
std::array<float,2>{0.947959185f, 0.0637433231f},
std::array<float,2>{0.494956821f, 0.384640127f},
std::array<float,2>{0.741798759f, 0.827152312f},
std::array<float,2>{0.266379952f, 0.932413697f},
std::array<float,2>{0.606877208f, 0.36631164f},
std::array<float,2>{0.121610753f, 0.180256039f},
std::array<float,2>{0.852881193f, 0.58809793f},
std::array<float,2>{0.143581629f, 0.805044115f},
std::array<float,2>{0.943932593f, 0.452207983f},
std::array<float,2>{0.48635295f, 0.0284119733f},
std::array<float,2>{0.747669578f, 0.698411167f},
std::array<float,2>{0.278624743f, 0.515904725f},
std::array<float,2>{0.5937953f, 0.201355308f},
std::array<float,2>{0.11002107f, 0.257085174f},
std::array<float,2>{0.846620917f, 0.973891914f},
std::array<float,2>{0.000955544354f, 0.628429294f},
std::array<float,2>{0.774451613f, 0.0814432874f},
std::array<float,2>{0.327537924f, 0.400023848f},
std::array<float,2>{0.533825159f, 0.829581499f},
std::array<float,2>{0.433404356f, 0.919632375f},
std::array<float,2>{0.630144238f, 0.352751285f},
std::array<float,2>{0.203014091f, 0.167323694f},
std::array<float,2>{0.875861883f, 0.56582135f},
std::array<float,2>{0.0757563412f, 0.964991748f},
std::array<float,2>{0.817756891f, 0.295016885f},
std::array<float,2>{0.300364137f, 0.223268762f},
std::array<float,2>{0.590685129f, 0.554898381f},
std::array<float,2>{0.443967909f, 0.719778955f},
std::array<float,2>{0.69680196f, 0.0551334471f},
std::array<float,2>{0.17438966f, 0.486386836f},
std::array<float,2>{0.990970671f, 0.76671046f},
std::array<float,2>{0.225765824f, 0.611667156f},
std::array<float,2>{0.913289428f, 0.143360123f},
std::array<float,2>{0.384861499f, 0.320263088f},
std::array<float,2>{0.672296405f, 0.879435837f},
std::array<float,2>{0.364592522f, 0.865383804f},
std::array<float,2>{0.501313627f, 0.416315913f},
std::array<float,2>{0.0365421809f, 0.095859319f},
std::array<float,2>{0.810202777f, 0.68326056f},
std::array<float,2>{0.208245978f, 0.896963894f},
std::array<float,2>{0.896839082f, 0.34210673f},
std::array<float,2>{0.413333654f, 0.128367633f},
std::array<float,2>{0.645855129f, 0.604842484f},
std::array<float,2>{0.331559271f, 0.661652446f},
std::array<float,2>{0.561658382f, 0.119198762f},
std::array<float,2>{0.0267967619f, 0.426184148f},
std::array<float,2>{0.764648139f, 0.844365656f},
std::array<float,2>{0.0997722447f, 0.535564005f},
std::array<float,2>{0.86144191f, 0.245498657f},
std::array<float,2>{0.260500133f, 0.309204459f},
std::array<float,2>{0.620958626f, 0.948678136f},
std::array<float,2>{0.472507983f, 0.76197052f},
std::array<float,2>{0.730189502f, 0.483275563f},
std::array<float,2>{0.136021733f, 0.0325456932f},
std::array<float,2>{0.966802716f, 0.739870489f},
std::array<float,2>{0.0478677563f, 0.822150588f},
std::array<float,2>{0.796658039f, 0.387503028f},
std::array<float,2>{0.349776566f, 0.0689623281f},
std::array<float,2>{0.525174797f, 0.646561921f},
std::array<float,2>{0.392273158f, 0.592363715f},
std::array<float,2>{0.65973556f, 0.187023401f},
std::array<float,2>{0.242998615f, 0.360809058f},
std::array<float,2>{0.923885345f, 0.936487436f},
std::array<float,2>{0.158257902f, 0.70677501f},
std::array<float,2>{0.978709936f, 0.0154437656f},
std::array<float,2>{0.456241488f, 0.463816166f},
std::array<float,2>{0.706399858f, 0.791298151f},
std::array<float,2>{0.283644795f, 0.996416807f},
std::array<float,2>{0.57029599f, 0.275518417f},
std::array<float,2>{0.0918159038f, 0.21667093f},
std::array<float,2>{0.833882391f, 0.504446387f},
std::array<float,2>{0.236403689f, 0.851902664f},
std::array<float,2>{0.935028434f, 0.436605304f},
std::array<float,2>{0.400633991f, 0.114097334f},
std::array<float,2>{0.666803777f, 0.671171665f},
std::array<float,2>{0.354218543f, 0.598671377f},
std::array<float,2>{0.519691944f, 0.133059502f},
std::array<float,2>{0.0571744479f, 0.334138632f},
std::array<float,2>{0.782544434f, 0.899969399f},
std::array<float,2>{0.082296133f, 0.749329627f},
std::array<float,2>{0.838824272f, 0.0407693535f},
std::array<float,2>{0.293784052f, 0.471378684f},
std::array<float,2>{0.571893394f, 0.751276493f},
std::array<float,2>{0.466171771f, 0.93770802f},
std::array<float,2>{0.714213789f, 0.301551729f},
std::array<float,2>{0.171306714f, 0.236915469f},
std::array<float,2>{0.970428884f, 0.542923033f},
std::array<float,2>{0.017788047f, 0.921944916f},
std::array<float,2>{0.753942966f, 0.37385571f},
std::array<float,2>{0.336488485f, 0.178550899f},
std::array<float,2>{0.551453769f, 0.578868747f},
std::array<float,2>{0.4181692f, 0.650061846f},
std::array<float,2>{0.650635421f, 0.070612371f},
std::array<float,2>{0.217359558f, 0.379870176f},
std::array<float,2>{0.901942551f, 0.819029868f},
std::array<float,2>{0.129526556f, 0.511583328f},
std::array<float,2>{0.960417092f, 0.208419338f},
std::array<float,2>{0.480331779f, 0.270500124f},
std::array<float,2>{0.72452569f, 0.988370061f},
std::array<float,2>{0.250754863f, 0.788873553f},
std::array<float,2>{0.615224898f, 0.459872961f},
std::array<float,2>{0.102039486f, 0.00629264722f},
std::array<float,2>{0.867907763f, 0.717862964f},
std::array<float,2>{0.186749801f, 0.98404187f},
std::array<float,2>{0.994388342f, 0.26509133f},
std::array<float,2>{0.448373705f, 0.190832615f},
std::array<float,2>{0.691910505f, 0.530902922f},
std::array<float,2>{0.312412798f, 0.692141175f},
std::array<float,2>{0.580085337f, 0.0187683497f},
std::array<float,2>{0.0652580857f, 0.439632863f},
std::array<float,2>{0.82506603f, 0.802997887f},
std::array<float,2>{0.0455914959f, 0.575773537f},
std::array<float,2>{0.801732123f, 0.161037341f},
std::array<float,2>{0.369259268f, 0.346859246f},
std::array<float,2>{0.510481119f, 0.909330845f},
std::array<float,2>{0.38155356f, 0.840980947f},
std::array<float,2>{0.686919808f, 0.392252952f},
std::array<float,2>{0.234131709f, 0.091987215f},
std::array<float,2>{0.916432381f, 0.63825953f},
std::array<float,2>{0.119446374f, 0.774204731f},
std::array<float,2>{0.857674122f, 0.493356258f},
std::array<float,2>{0.272666276f, 0.0495888107f},
std::array<float,2>{0.602748573f, 0.729447305f},
std::array<float,2>{0.497052789f, 0.553936303f},
std::array<float,2>{0.737452447f, 0.233603194f},
std::array<float,2>{0.154820621f, 0.282010674f},
std::array<float,2>{0.951742947f, 0.959103405f},
std::array<float,2>{0.188238427f, 0.675831854f},
std::array<float,2>{0.88308841f, 0.104767054f},
std::array<float,2>{0.423190802f, 0.408557028f},
std::array<float,2>{0.633610189f, 0.868499339f},
std::array<float,2>{0.316411346f, 0.888683856f},
std::array<float,2>{0.545157909f, 0.323768049f},
std::array<float,2>{0.0131473532f, 0.148501292f},
std::array<float,2>{0.76898545f, 0.624347508f},
std::array<float,2>{0.193876192f, 0.793733299f},
std::array<float,2>{0.888891459f, 0.46594438f},
std::array<float,2>{0.426226795f, 0.00900435541f},
std::array<float,2>{0.636831105f, 0.709698021f},
std::array<float,2>{0.313059539f, 0.500905573f},
std::array<float,2>{0.539387822f, 0.212817952f},
std::array<float,2>{0.00939396024f, 0.279394984f},
std::array<float,2>{0.769748151f, 0.992645323f},
std::array<float,2>{0.121405445f, 0.641312242f},
std::array<float,2>{0.853360415f, 0.0647246316f},
std::array<float,2>{0.265879184f, 0.385817826f},
std::array<float,2>{0.607351363f, 0.824647129f},
std::array<float,2>{0.494519889f, 0.930806816f},
std::array<float,2>{0.741340041f, 0.364285469f},
std::array<float,2>{0.151349768f, 0.183023781f},
std::array<float,2>{0.947495878f, 0.586810768f},
std::array<float,2>{0.0398048535f, 0.952500522f},
std::array<float,2>{0.799289584f, 0.307054877f},
std::array<float,2>{0.373929113f, 0.247816741f},
std::array<float,2>{0.514356613f, 0.535039306f},
std::array<float,2>{0.377236992f, 0.735956907f},
std::array<float,2>{0.682544589f, 0.0380521044f},
std::array<float,2>{0.228760555f, 0.478769243f},
std::array<float,2>{0.921148121f, 0.758767843f},
std::array<float,2>{0.183119416f, 0.60770005f},
std::array<float,2>{0.996869266f, 0.13279672f},
std::array<float,2>{0.450062096f, 0.336324483f},
std::array<float,2>{0.688150942f, 0.89316988f},
std::array<float,2>{0.307490021f, 0.849579394f},
std::array<float,2>{0.584540308f, 0.423863471f},
std::array<float,2>{0.0692417398f, 0.124760002f},
std::array<float,2>{0.821031272f, 0.658181727f},
std::array<float,2>{0.128222376f, 0.878742337f},
std::array<float,2>{0.954045832f, 0.314023405f},
std::array<float,2>{0.483279765f, 0.146669045f},
std::array<float,2>{0.722577631f, 0.614491999f},
std::array<float,2>{0.256353438f, 0.684247196f},
std::array<float,2>{0.611313581f, 0.101562396f},
std::array<float,2>{0.107982829f, 0.421812445f},
std::array<float,2>{0.873577476f, 0.860010505f},
std::array<float,2>{0.0199223477f, 0.561145365f},
std::array<float,2>{0.75265044f, 0.221467853f},
std::array<float,2>{0.342970997f, 0.290305078f},
std::array<float,2>{0.547422647f, 0.961803555f},
std::array<float,2>{0.416982919f, 0.771411717f},
std::array<float,2>{0.654886544f, 0.49103725f},
std::array<float,2>{0.212731615f, 0.0595107451f},
std::array<float,2>{0.905381083f, 0.725286186f},
std::array<float,2>{0.0801026523f, 0.834035754f},
std::array<float,2>{0.841802537f, 0.402989715f},
std::array<float,2>{0.292615086f, 0.083791241f},
std::array<float,2>{0.574452043f, 0.630936086f},
std::array<float,2>{0.461093098f, 0.569723427f},
std::array<float,2>{0.716850638f, 0.170909166f},
std::array<float,2>{0.166343421f, 0.355513901f},
std::array<float,2>{0.975787699f, 0.917324543f},
std::array<float,2>{0.240149736f, 0.702272713f},
std::array<float,2>{0.932137191f, 0.0234742053f},
std::array<float,2>{0.405115634f, 0.448904663f},
std::array<float,2>{0.6684708f, 0.808888197f},
std::array<float,2>{0.355485469f, 0.971072853f},
std::array<float,2>{0.518007338f, 0.251988947f},
std::array<float,2>{0.0612920523f, 0.19546181f},
std::array<float,2>{0.787361324f, 0.520784974f},
std::array<float,2>{0.162412375f, 0.871763587f},
std::array<float,2>{0.983579755f, 0.411238402f},
std::array<float,2>{0.458673149f, 0.107073724f},
std::array<float,2>{0.708455741f, 0.675424457f},
std::array<float,2>{0.288491547f, 0.61997956f},
std::array<float,2>{0.565562069f, 0.154477164f},
std::array<float,2>{0.0871187374f, 0.326327026f},
std::array<float,2>{0.828783274f, 0.884642184f},
std::array<float,2>{0.0543376803f, 0.733032584f},
std::array<float,2>{0.792889953f, 0.0546190403f},
std::array<float,2>{0.344481826f, 0.499647439f},
std::array<float,2>{0.528941274f, 0.779271305f},
std::array<float,2>{0.397325277f, 0.954168558f},
std::array<float,2>{0.660684884f, 0.285338134f},
std::array<float,2>{0.247195825f, 0.227664322f},
std::array<float,2>{0.929599106f, 0.550179303f},
std::array<float,2>{0.0945658535f, 0.910644472f},
std::array<float,2>{0.866544902f, 0.348013014f},
std::array<float,2>{0.264577359f, 0.15900369f},
std::array<float,2>{0.624220252f, 0.570660233f},
std::array<float,2>{0.474960744f, 0.636070132f},
std::array<float,2>{0.731715441f, 0.0887436345f},
std::array<float,2>{0.139759526f, 0.397148252f},
std::array<float,2>{0.961343765f, 0.837279916f},
std::array<float,2>{0.204945728f, 0.524854958f},
std::array<float,2>{0.891461194f, 0.192950323f},
std::array<float,2>{0.407729268f, 0.259618878f},
std::array<float,2>{0.642828584f, 0.978081644f},
std::array<float,2>{0.334693998f, 0.798638701f},
std::array<float,2>{0.555115819f, 0.443173289f},
std::array<float,2>{0.0275661927f, 0.0217401758f},
std::array<float,2>{0.760780513f, 0.690972269f},
std::array<float,2>{0.220578253f, 0.985609233f},
std::array<float,2>{0.909165084f, 0.26882273f},
std::array<float,2>{0.388272464f, 0.205956131f},
std::array<float,2>{0.677402079f, 0.514602721f},
std::array<float,2>{0.362124056f, 0.712445855f},
std::array<float,2>{0.50476414f, 0.000605858921f},
std::array<float,2>{0.0339210182f, 0.454943568f},
std::array<float,2>{0.804837823f, 0.78127259f},
std::array<float,2>{0.0708949342f, 0.58314991f},
std::array<float,2>{0.812518716f, 0.172979325f},
std::array<float,2>{0.303902417f, 0.368919462f},
std::array<float,2>{0.586680055f, 0.928512275f},
std::array<float,2>{0.439596415f, 0.813479543f},
std::array<float,2>{0.700991988f, 0.375158012f},
std::array<float,2>{0.176990852f, 0.0755273998f},
std::array<float,2>{0.98437798f, 0.652418852f},
std::array<float,2>{0.00729124853f, 0.753986061f},
std::array<float,2>{0.778850079f, 0.476373285f},
std::array<float,2>{0.322143495f, 0.0467938446f},
std::array<float,2>{0.537706852f, 0.74456811f},
std::array<float,2>{0.434402257f, 0.544487178f},
std::array<float,2>{0.625931859f, 0.241237342f},
std::array<float,2>{0.19770281f, 0.300047576f},
std::array<float,2>{0.882027924f, 0.942516625f},
std::array<float,2>{0.144573614f, 0.666004062f},
std::array<float,2>{0.941137791f, 0.112911612f},
std::array<float,2>{0.488985866f, 0.430166155f},
std::array<float,2>{0.743904769f, 0.856553137f},
std::array<float,2>{0.276178151f, 0.903327227f},
std::array<float,2>{0.598676085f, 0.33164078f},
std::array<float,2>{0.114539951f, 0.136911839f},
std::array<float,2>{0.850723624f, 0.597435474f},
std::array<float,2>{0.154577598f, 0.775678873f},
std::array<float,2>{0.951497912f, 0.494967431f},
std::array<float,2>{0.49615398f, 0.0477999859f},
std::array<float,2>{0.738065183f, 0.728433549f},
std::array<float,2>{0.272981435f, 0.551500261f},
std::array<float,2>{0.603356004f, 0.230896696f},
std::array<float,2>{0.119685099f, 0.28372246f},
std::array<float,2>{0.858103693f, 0.958111882f},
std::array<float,2>{0.0133049162f, 0.678450406f},
std::array<float,2>{0.769384682f, 0.102809139f},
std::array<float,2>{0.317230731f, 0.406792939f},
std::array<float,2>{0.545785189f, 0.869969547f},
std::array<float,2>{0.423819929f, 0.886766672f},
std::array<float,2>{0.633283675f, 0.32109791f},
std::array<float,2>{0.187705234f, 0.151964247f},
std::array<float,2>{0.883345962f, 0.621776104f},
std::array<float,2>{0.0647474155f, 0.980917275f},
std::array<float,2>{0.824414134f, 0.263137162f},
std::array<float,2>{0.311875343f, 0.189093128f},
std::array<float,2>{0.580800235f, 0.528558791f},
std::array<float,2>{0.449106067f, 0.69453764f},
std::array<float,2>{0.691823184f, 0.0171111971f},
std::array<float,2>{0.187091082f, 0.437528789f},
std::array<float,2>{0.994641781f, 0.801820636f},
std::array<float,2>{0.233547986f, 0.576423466f},
std::array<float,2>{0.916874588f, 0.162478223f},
std::array<float,2>{0.381143063f, 0.344657212f},
std::array<float,2>{0.687186003f, 0.906921387f},
std::array<float,2>{0.370064944f, 0.843548656f},
std::array<float,2>{0.510253608f, 0.393679321f},
std::array<float,2>{0.0453903638f, 0.09096504f},
std::array<float,2>{0.80083698f, 0.640505314f},
std::array<float,2>{0.216989413f, 0.924125731f},
std::array<float,2>{0.901631057f, 0.372194648f},
std::array<float,2>{0.418894708f, 0.176054567f},
std::array<float,2>{0.651126444f, 0.581381977f},
std::array<float,2>{0.336326599f, 0.652278602f},
std::array<float,2>{0.551159143f, 0.0728433654f},
std::array<float,2>{0.0181835461f, 0.381276637f},
std::array<float,2>{0.754861891f, 0.81795764f},
std::array<float,2>{0.102431431f, 0.508585811f},
std::array<float,2>{0.867287815f, 0.209604889f},
std::array<float,2>{0.250477999f, 0.271831334f},
std::array<float,2>{0.614420891f, 0.991947949f},
std::array<float,2>{0.479579121f, 0.785751343f},
std::array<float,2>{0.723899066f, 0.458943158f},
std::array<float,2>{0.129259363f, 0.00499923015f},
std::array<float,2>{0.960679412f, 0.715894222f},
std::array<float,2>{0.0569158979f, 0.85531044f},
std::array<float,2>{0.782937706f, 0.435373276f},
std::array<float,2>{0.35358274f, 0.116418064f},
std::array<float,2>{0.520401597f, 0.669630587f},
std::array<float,2>{0.400948733f, 0.599908471f},
std::array<float,2>{0.666124701f, 0.135211378f},
std::array<float,2>{0.237280831f, 0.332169056f},
std::array<float,2>{0.935318947f, 0.900496066f},
std::array<float,2>{0.171552703f, 0.747407734f},
std::array<float,2>{0.96999675f, 0.0423260964f},
std::array<float,2>{0.466459781f, 0.468947619f},
std::array<float,2>{0.714490771f, 0.753004193f},
std::array<float,2>{0.29334873f, 0.939688802f},
std::array<float,2>{0.571678817f, 0.302819252f},
std::array<float,2>{0.0829391703f, 0.234900221f},
std::array<float,2>{0.837970495f, 0.539303422f},
std::array<float,2>{0.242661282f, 0.82265991f},
std::array<float,2>{0.924499512f, 0.388924062f},
std::array<float,2>{0.391971141f, 0.0675293654f},
std::array<float,2>{0.659400225f, 0.646159589f},
std::array<float,2>{0.350412726f, 0.59103781f},
std::array<float,2>{0.52460736f, 0.18392919f},
std::array<float,2>{0.0484524183f, 0.36218226f},
std::array<float,2>{0.796188414f, 0.934566259f},
std::array<float,2>{0.092554301f, 0.704995036f},
std::array<float,2>{0.833077133f, 0.013402313f},
std::array<float,2>{0.283760279f, 0.462715507f},
std::array<float,2>{0.56934762f, 0.79054445f},
std::array<float,2>{0.456682295f, 0.999471486f},
std::array<float,2>{0.707012594f, 0.274820894f},
std::array<float,2>{0.158735991f, 0.216968223f},
std::array<float,2>{0.979316831f, 0.506355405f},
std::array<float,2>{0.0271472055f, 0.895570099f},
std::array<float,2>{0.763864338f, 0.341336131f},
std::array<float,2>{0.331319988f, 0.125226468f},
std::array<float,2>{0.562404454f, 0.602638662f},
std::array<float,2>{0.413635254f, 0.663446069f},
std::array<float,2>{0.646466255f, 0.118642621f},
std::array<float,2>{0.20890379f, 0.429270297f},
std::array<float,2>{0.897435963f, 0.846931934f},
std::array<float,2>{0.136280969f, 0.538000226f},
std::array<float,2>{0.96761471f, 0.242915377f},
std::array<float,2>{0.47170645f, 0.311760187f},
std::array<float,2>{0.729719698f, 0.947222054f},
std::array<float,2>{0.259802788f, 0.765248656f},
std::array<float,2>{0.620420814f, 0.481927782f},
std::array<float,2>{0.100520715f, 0.0338100269f},
std::array<float,2>{0.861974597f, 0.741661549f},
std::array<float,2>{0.17426309f, 0.967915058f},
std::array<float,2>{0.990515232f, 0.293181539f},
std::array<float,2>{0.443570673f, 0.2246259f},
std::array<float,2>{0.696333289f, 0.557465494f},
std::array<float,2>{0.299965799f, 0.721137166f},
std::array<float,2>{0.590269327f, 0.0585049875f},
std::array<float,2>{0.0753872842f, 0.486309111f},
std::array<float,2>{0.818271339f, 0.767578244f},
std::array<float,2>{0.0366385542f, 0.61117053f},
std::array<float,2>{0.809942782f, 0.141699165f},
std::array<float,2>{0.365052015f, 0.31808871f},
std::array<float,2>{0.501492202f, 0.881895244f},
std::array<float,2>{0.38556686f, 0.864949524f},
std::array<float,2>{0.672618747f, 0.414213359f},
std::array<float,2>{0.226175413f, 0.0941004157f},
std::array<float,2>{0.914019346f, 0.681586742f},
std::array<float,2>{0.109609067f, 0.808138251f},
std::array<float,2>{0.845901847f, 0.450888008f},
std::array<float,2>{0.279294819f, 0.0297786389f},
std::array<float,2>{0.594394267f, 0.695659041f},
std::array<float,2>{0.487097234f, 0.519155025f},
std::array<float,2>{0.747356772f, 0.199833795f},
std::array<float,2>{0.144233093f, 0.255841345f},
std::array<float,2>{0.94366765f, 0.97549057f},
std::array<float,2>{0.202597201f, 0.626391053f},
std::array<float,2>{0.875380993f, 0.0781760514f},
std::array<float,2>{0.432784796f, 0.402000964f},
std::array<float,2>{0.630436838f, 0.83106041f},
std::array<float,2>{0.327828199f, 0.920413256f},
std::array<float,2>{0.533444047f, 0.354052186f},
std::array<float,2>{0.000376929151f, 0.165980309f},
std::array<float,2>{0.775236249f, 0.56311512f},
std::array<float,2>{0.227881521f, 0.759789824f},
std::array<float,2>{0.918274224f, 0.476843536f},
std::array<float,2>{0.376320064f, 0.0366381481f},
std::array<float,2>{0.680992603f, 0.736528277f},
std::array<float,2>{0.372464001f, 0.532400191f},
std::array<float,2>{0.512330711f, 0.249505267f},
std::array<float,2>{0.0416121781f, 0.305658937f},
std::array<float,2>{0.798321903f, 0.95102042f},
std::array<float,2>{0.067163147f, 0.65856564f},
std::array<float,2>{0.822625339f, 0.122857265f},
std::array<float,2>{0.305248767f, 0.422780067f},
std::array<float,2>{0.582962632f, 0.849861085f},
std::array<float,2>{0.451857686f, 0.890822589f},
std::array<float,2>{0.690067112f, 0.338796169f},
std::array<float,2>{0.180414036f, 0.130558714f},
std::array<float,2>{0.998522997f, 0.606717229f},
std::array<float,2>{0.00991060305f, 0.996090889f},
std::array<float,2>{0.773371398f, 0.27757293f},
std::array<float,2>{0.31490466f, 0.214756593f},
std::array<float,2>{0.541496754f, 0.502174795f},
std::array<float,2>{0.428844243f, 0.708685875f},
std::array<float,2>{0.640556991f, 0.0102200527f},
std::array<float,2>{0.192354724f, 0.467185527f},
std::array<float,2>{0.887749314f, 0.79572922f},
std::array<float,2>{0.148904026f, 0.588444829f},
std::array<float,2>{0.945725679f, 0.179898098f},
std::array<float,2>{0.492324412f, 0.36671102f},
std::array<float,2>{0.739116311f, 0.93165803f},
std::array<float,2>{0.269016176f, 0.827947855f},
std::array<float,2>{0.608110964f, 0.384043545f},
std::array<float,2>{0.124856584f, 0.0640858635f},
std::array<float,2>{0.853639126f, 0.642759025f},
std::array<float,2>{0.165760651f, 0.915127218f},
std::array<float,2>{0.97376889f, 0.358972847f},
std::array<float,2>{0.463027f, 0.169047609f},
std::array<float,2>{0.715659499f, 0.567425191f},
std::array<float,2>{0.290537f, 0.62893182f},
std::array<float,2>{0.576420069f, 0.0853932798f},
std::array<float,2>{0.0800029933f, 0.404297024f},
std::array<float,2>{0.841402173f, 0.832533717f},
std::array<float,2>{0.0599614643f, 0.52318871f},
std::array<float,2>{0.78550452f, 0.197805583f},
std::array<float,2>{0.357716113f, 0.250011027f},
std::array<float,2>{0.516455173f, 0.969647169f},
std::array<float,2>{0.403833061f, 0.81168443f},
std::array<float,2>{0.670506179f, 0.446499735f},
std::array<float,2>{0.241615191f, 0.0257146023f},
std::array<float,2>{0.929911315f, 0.701079786f},
std::array<float,2>{0.107066445f, 0.861987293f},
std::array<float,2>{0.871398091f, 0.419335604f},
std::array<float,2>{0.255574048f, 0.0979282483f},
std::array<float,2>{0.612676024f, 0.68739295f},
std::array<float,2>{0.482092232f, 0.616780221f},
std::array<float,2>{0.719377637f, 0.145949572f},
std::array<float,2>{0.125985697f, 0.314606279f},
std::array<float,2>{0.955682397f, 0.876453578f},
std::array<float,2>{0.212992087f, 0.722937465f},
std::array<float,2>{0.903143585f, 0.0615565814f},
std::array<float,2>{0.414606065f, 0.488501847f},
std::array<float,2>{0.653879583f, 0.77199918f},
std::array<float,2>{0.340088814f, 0.963075638f},
std::array<float,2>{0.549996197f, 0.291076839f},
std::array<float,2>{0.022146184f, 0.219502449f},
std::array<float,2>{0.751331985f, 0.560138941f},
std::array<float,2>{0.138341531f, 0.838832259f},
std::array<float,2>{0.964475572f, 0.394836366f},
std::array<float,2>{0.474212915f, 0.087491639f},
std::array<float,2>{0.733762622f, 0.633246481f},
std::array<float,2>{0.263550609f, 0.574213505f},
std::array<float,2>{0.621767819f, 0.158155903f},
std::array<float,2>{0.0958271101f, 0.351136237f},
std::array<float,2>{0.864657521f, 0.913480639f},
std::array<float,2>{0.0312110893f, 0.688995838f},
std::array<float,2>{0.759254098f, 0.0196185615f},
std::array<float,2>{0.333521187f, 0.444678396f},
std::array<float,2>{0.557356119f, 0.799271166f},
std::array<float,2>{0.408997744f, 0.978796542f},
std::array<float,2>{0.641432881f, 0.260935128f},
std::array<float,2>{0.206589505f, 0.194429919f},
std::array<float,2>{0.894478559f, 0.52652818f},
std::array<float,2>{0.0896562114f, 0.885489404f},
std::array<float,2>{0.831493497f, 0.325997829f},
std::array<float,2>{0.285862207f, 0.154090136f},
std::array<float,2>{0.564279377f, 0.617274165f},
std::array<float,2>{0.45970726f, 0.672689974f},
std::array<float,2>{0.709342062f, 0.108512759f},
std::array<float,2>{0.160836831f, 0.412368238f},
std::array<float,2>{0.980521083f, 0.874727845f},
std::array<float,2>{0.249660596f, 0.547260106f},
std::array<float,2>{0.92664963f, 0.229923621f},
std::array<float,2>{0.39566797f, 0.287143737f},
std::array<float,2>{0.663126171f, 0.955793619f},
std::array<float,2>{0.347102404f, 0.779517829f},
std::array<float,2>{0.529872835f, 0.496296108f},
std::array<float,2>{0.0513639115f, 0.0523234978f},
std::array<float,2>{0.790389895f, 0.731433153f},
std::array<float,2>{0.196964622f, 0.94425869f},
std::array<float,2>{0.879360497f, 0.297418445f},
std::array<float,2>{0.43725431f, 0.239796713f},
std::array<float,2>{0.627376676f, 0.54505688f},
std::array<float,2>{0.322494954f, 0.744114995f},
std::array<float,2>{0.536191702f, 0.0442469008f},
std::array<float,2>{0.00500412052f, 0.474330157f},
std::array<float,2>{0.780610144f, 0.755886674f},
std::array<float,2>{0.115472496f, 0.594047487f},
std::array<float,2>{0.849551976f, 0.140467539f},
std::array<float,2>{0.274874359f, 0.328591168f},
std::array<float,2>{0.600696504f, 0.905735016f},
std::array<float,2>{0.49148187f, 0.857723773f},
std::array<float,2>{0.744562864f, 0.433185697f},
std::array<float,2>{0.14761731f, 0.110729963f},
std::array<float,2>{0.93932569f, 0.667394042f},
std::array<float,2>{0.0323644355f, 0.783449173f},
std::array<float,2>{0.807955921f, 0.455387473f},
std::array<float,2>{0.360257357f, 0.00329343532f},
std::array<float,2>{0.506423295f, 0.713219821f},
std::array<float,2>{0.38873291f, 0.512807965f},
std::array<float,2>{0.679332495f, 0.204552472f},
std::array<float,2>{0.222429544f, 0.266192555f},
std::array<float,2>{0.907335579f, 0.986709297f},
std::array<float,2>{0.17855826f, 0.655549347f},
std::array<float,2>{0.987015247f, 0.0766682252f},
std::array<float,2>{0.438108414f, 0.378620088f},
std::array<float,2>{0.701922417f, 0.815600216f},
std::array<float,2>{0.301618546f, 0.927379727f},
std::array<float,2>{0.588773131f, 0.370155305f},
std::array<float,2>{0.0724233314f, 0.1751142f},
std::array<float,2>{0.815866292f, 0.585591972f},
std::array<float,2>{0.184911802f, 0.803252816f},
std::array<float,2>{0.99346292f, 0.440194935f},
std::array<float,2>{0.446695685f, 0.0192786865f},
std::array<float,2>{0.694178581f, 0.691893756f},
std::array<float,2>{0.30974406f, 0.530413032f},
std::array<float,2>{0.579833746f, 0.19102779f},
std::array<float,2>{0.0629395396f, 0.265540183f},
std::array<float,2>{0.82713151f, 0.983776689f},
std::array<float,2>{0.0431945883f, 0.638051331f},
std::array<float,2>{0.802782714f, 0.0925808623f},
std::array<float,2>{0.367380321f, 0.392030895f},
std::array<float,2>{0.50937742f, 0.841729641f},
std::array<float,2>{0.379645228f, 0.909917891f},
std::array<float,2>{0.684170783f, 0.34765321f},
std::array<float,2>{0.232014582f, 0.160389751f},
std::array<float,2>{0.915404677f, 0.575208426f},
std::array<float,2>{0.117983431f, 0.959944844f},
std::array<float,2>{0.856530666f, 0.28140381f},
std::array<float,2>{0.270292491f, 0.234354213f},
std::array<float,2>{0.604166329f, 0.554214358f},
std::array<float,2>{0.49925527f, 0.728869021f},
std::array<float,2>{0.734891713f, 0.0492770635f},
std::array<float,2>{0.153454408f, 0.494023263f},
std::array<float,2>{0.949320853f, 0.773839533f},
std::array<float,2>{0.189813212f, 0.624940097f},
std::array<float,2>{0.885411322f, 0.149022326f},
std::array<float,2>{0.425008416f, 0.323255539f},
std::array<float,2>{0.636006892f, 0.889504254f},
std::array<float,2>{0.31934163f, 0.869053543f},
std::array<float,2>{0.544278562f, 0.408753425f},
std::array<float,2>{0.0145764565f, 0.105263121f},
std::array<float,2>{0.766019642f, 0.676366806f},
std::array<float,2>{0.236050069f, 0.899818778f},
std::array<float,2>{0.936668754f, 0.334527969f},
std::array<float,2>{0.399135053f, 0.133463442f},
std::array<float,2>{0.664862037f, 0.599460483f},
std::array<float,2>{0.351944983f, 0.671424091f},
std::array<float,2>{0.523366451f, 0.11355307f},
std::array<float,2>{0.056509126f, 0.437188566f},
std::array<float,2>{0.783458054f, 0.852261841f},
std::array<float,2>{0.0855650306f, 0.542283833f},
std::array<float,2>{0.837702096f, 0.23666963f},
std::array<float,2>{0.295751572f, 0.300975204f},
std::array<float,2>{0.573104978f, 0.938076556f},
std::array<float,2>{0.467152327f, 0.751573503f},
std::array<float,2>{0.712750793f, 0.471155375f},
std::array<float,2>{0.16879116f, 0.0402186215f},
std::array<float,2>{0.971312404f, 0.749661624f},
std::array<float,2>{0.0156727713f, 0.818840683f},
std::array<float,2>{0.756411672f, 0.379143983f},
std::array<float,2>{0.338341326f, 0.0711675659f},
std::array<float,2>{0.554027438f, 0.649871469f},
std::array<float,2>{0.421035081f, 0.578233957f},
std::array<float,2>{0.648568213f, 0.178154677f},
std::array<float,2>{0.216664344f, 0.373188704f},
std::array<float,2>{0.900206804f, 0.922367632f},
std::array<float,2>{0.131672591f, 0.718710184f},
std::array<float,2>{0.958184004f, 0.00657128356f},
std::array<float,2>{0.478508025f, 0.459185362f},
std::array<float,2>{0.726419389f, 0.78831625f},
std::array<float,2>{0.253068864f, 0.988770962f},
std::array<float,2>{0.617015958f, 0.269741118f},
std::array<float,2>{0.105073318f, 0.208584294f},
std::array<float,2>{0.869330049f, 0.510859072f},
std::array<float,2>{0.210120395f, 0.843809247f},
std::array<float,2>{0.89645499f, 0.426306814f},
std::array<float,2>{0.411405832f, 0.120091446f},
std::array<float,2>{0.647992074f, 0.661553562f},
std::array<float,2>{0.329817504f, 0.605156779f},
std::array<float,2>{0.559414864f, 0.128597751f},
std::array<float,2>{0.0252570119f, 0.342597306f},
std::array<float,2>{0.762976885f, 0.897453308f},
std::array<float,2>{0.097756356f, 0.739280403f},
std::array<float,2>{0.859456658f, 0.0331247188f},
std::array<float,2>{0.258841366f, 0.48274526f},
std::array<float,2>{0.617478788f, 0.76232785f},
std::array<float,2>{0.470526248f, 0.948742092f},
std::array<float,2>{0.727294326f, 0.308940202f},
std::array<float,2>{0.133851305f, 0.245671779f},
std::array<float,2>{0.964892447f, 0.535723805f},
std::array<float,2>{0.0499227867f, 0.936019063f},
std::array<float,2>{0.794885099f, 0.361152202f},
std::array<float,2>{0.347722203f, 0.186948478f},
std::array<float,2>{0.526883364f, 0.591894567f},
std::array<float,2>{0.392700821f, 0.647200286f},
std::array<float,2>{0.657599449f, 0.0684053749f},
std::array<float,2>{0.245855421f, 0.386834979f},
std::array<float,2>{0.922236919f, 0.821403086f},
std::array<float,2>{0.158052504f, 0.50399226f},
std::array<float,2>{0.977568209f, 0.215821847f},
std::array<float,2>{0.454617709f, 0.275915861f},
std::array<float,2>{0.704427361f, 0.996747732f},
std::array<float,2>{0.281513065f, 0.791921258f},
std::array<float,2>{0.568285346f, 0.462916523f},
std::array<float,2>{0.0917224735f, 0.0147998715f},
std::array<float,2>{0.835232913f, 0.706527233f},
std::array<float,2>{0.140711278f, 0.974261045f},
std::array<float,2>{0.941686392f, 0.257350087f},
std::array<float,2>{0.484668136f, 0.201774657f},
std::array<float,2>{0.748530149f, 0.516312957f},
std::array<float,2>{0.279417127f, 0.698750854f},
std::array<float,2>{0.597590923f, 0.0291647092f},
std::array<float,2>{0.112850338f, 0.4529351f},
std::array<float,2>{0.845205426f, 0.805510104f},
std::array<float,2>{0.00368790841f, 0.565969944f},
std::array<float,2>{0.776915193f, 0.167806342f},
std::array<float,2>{0.325725585f, 0.353336602f},
std::array<float,2>{0.532446384f, 0.918960631f},
std::array<float,2>{0.430433095f, 0.829773188f},
std::array<float,2>{0.63105315f, 0.399665922f},
std::array<float,2>{0.200183764f, 0.0818059295f},
std::array<float,2>{0.877744734f, 0.628014147f},
std::array<float,2>{0.0764749199f, 0.767232656f},
std::array<float,2>{0.818381488f, 0.486913323f},
std::array<float,2>{0.298164189f, 0.0555786528f},
std::array<float,2>{0.593041897f, 0.720437944f},
std::array<float,2>{0.443206459f, 0.555588901f},
std::array<float,2>{0.698174596f, 0.22298941f},
std::array<float,2>{0.172179163f, 0.295679986f},
std::array<float,2>{0.988832831f, 0.965656519f},
std::array<float,2>{0.223226324f, 0.682786763f},
std::array<float,2>{0.911905587f, 0.0962341055f},
std::array<float,2>{0.38447696f, 0.416754246f},
std::array<float,2>{0.675470591f, 0.866177022f},
std::array<float,2>{0.366903633f, 0.878908157f},
std::array<float,2>{0.502308011f, 0.319647491f},
std::array<float,2>{0.037124265f, 0.14279215f},
std::array<float,2>{0.811706007f, 0.611832023f},
std::array<float,2>{0.240641579f, 0.809793234f},
std::array<float,2>{0.931264579f, 0.44739601f},
std::array<float,2>{0.403025299f, 0.0245484896f},
std::array<float,2>{0.67133373f, 0.701502264f},
std::array<float,2>{0.359350711f, 0.520310342f},
std::array<float,2>{0.516673088f, 0.196663395f},
std::array<float,2>{0.0589207262f, 0.253174692f},
std::array<float,2>{0.786800504f, 0.971714318f},
std::array<float,2>{0.0783040076f, 0.632469177f},
std::array<float,2>{0.839925587f, 0.082628794f},
std::array<float,2>{0.289600164f, 0.403374672f},
std::array<float,2>{0.577366292f, 0.835545838f},
std::array<float,2>{0.464521021f, 0.916869462f},
std::array<float,2>{0.71655941f, 0.356865793f},
std::array<float,2>{0.164729387f, 0.170690954f},
std::array<float,2>{0.973276854f, 0.569293857f},
std::array<float,2>{0.0231426097f, 0.961957037f},
std::array<float,2>{0.750668049f, 0.289650708f},
std::array<float,2>{0.341789782f, 0.222114399f},
std::array<float,2>{0.54885608f, 0.561679602f},
std::array<float,2>{0.415909946f, 0.725611329f},
std::array<float,2>{0.653281748f, 0.0596159585f},
std::array<float,2>{0.214378148f, 0.491939306f},
std::array<float,2>{0.903800726f, 0.769969761f},
std::array<float,2>{0.125403211f, 0.613407433f},
std::array<float,2>{0.956181645f, 0.147614375f},
std::array<float,2>{0.480602205f, 0.312593609f},
std::array<float,2>{0.720520377f, 0.877896667f},
std::array<float,2>{0.254385144f, 0.86085844f},
std::array<float,2>{0.612155974f, 0.42049104f},
std::array<float,2>{0.105739675f, 0.10049779f},
std::array<float,2>{0.872929633f, 0.684656441f},
std::array<float,2>{0.180992603f, 0.894444585f},
std::array<float,2>{0.999548435f, 0.337450773f},
std::array<float,2>{0.452355325f, 0.131647691f},
std::array<float,2>{0.69050163f, 0.608713865f},
std::array<float,2>{0.305966526f, 0.657061219f},
std::array<float,2>{0.583694994f, 0.123895288f},
std::array<float,2>{0.0677891523f, 0.425293118f},
std::array<float,2>{0.82392174f, 0.848426402f},
std::array<float,2>{0.0420050621f, 0.533284247f},
std::array<float,2>{0.796878755f, 0.246499911f},
std::array<float,2>{0.371524841f, 0.307967186f},
std::array<float,2>{0.513064563f, 0.951839387f},
std::array<float,2>{0.375178993f, 0.759677172f},
std::array<float,2>{0.679905057f, 0.480299294f},
std::array<float,2>{0.226850063f, 0.0383921862f},
std::array<float,2>{0.919485807f, 0.734747231f},
std::array<float,2>{0.12337999f, 0.826167047f},
std::array<float,2>{0.855279028f, 0.385355622f},
std::array<float,2>{0.268217862f, 0.0661529303f},
std::array<float,2>{0.60851419f, 0.642559707f},
std::array<float,2>{0.493726611f, 0.5869506f},
std::array<float,2>{0.739782512f, 0.181991383f},
std::array<float,2>{0.15024446f, 0.363690764f},
std::array<float,2>{0.946626425f, 0.929992378f},
std::array<float,2>{0.193022028f, 0.710760295f},
std::array<float,2>{0.887099445f, 0.00786954816f},
std::array<float,2>{0.428574562f, 0.465407014f},
std::array<float,2>{0.639402509f, 0.794702828f},
std::array<float,2>{0.316263258f, 0.994116783f},
std::array<float,2>{0.542673886f, 0.281194329f},
std::array<float,2>{0.0110826129f, 0.211815178f},
std::array<float,2>{0.771648228f, 0.500988901f},
std::array<float,2>{0.146738946f, 0.855993211f},
std::array<float,2>{0.938350379f, 0.430826634f},
std::array<float,2>{0.490392655f, 0.111540884f},
std::array<float,2>{0.746065617f, 0.664402843f},
std::array<float,2>{0.273748785f, 0.596149325f},
std::array<float,2>{0.599641502f, 0.137927666f},
std::array<float,2>{0.11652986f, 0.330943853f},
std::array<float,2>{0.848187983f, 0.902893722f},
std::array<float,2>{0.00469818944f, 0.745710611f},
std::array<float,2>{0.779632866f, 0.0452859364f},
std::array<float,2>{0.323880404f, 0.474830508f},
std::array<float,2>{0.53608644f, 0.754903615f},
std::array<float,2>{0.436102867f, 0.942238927f},
std::array<float,2>{0.628070951f, 0.299292594f},
std::array<float,2>{0.195598736f, 0.240598157f},
std::array<float,2>{0.880601764f, 0.5434286f},
std::array<float,2>{0.073383972f, 0.929084897f},
std::array<float,2>{0.815163016f, 0.368156999f},
std::array<float,2>{0.302269936f, 0.172832251f},
std::array<float,2>{0.589161873f, 0.582171202f},
std::array<float,2>{0.438999236f, 0.653896749f},
std::array<float,2>{0.702527106f, 0.074224323f},
std::array<float,2>{0.178865746f, 0.375997573f},
std::array<float,2>{0.988064587f, 0.813403428f},
std::array<float,2>{0.221196383f, 0.514673471f},
std::array<float,2>{0.906998515f, 0.206707522f},
std::array<float,2>{0.38994965f, 0.267714769f},
std::array<float,2>{0.678293943f, 0.985200167f},
std::array<float,2>{0.360861599f, 0.782669187f},
std::array<float,2>{0.507257044f, 0.453746825f},
std::array<float,2>{0.0322253667f, 0.00101371226f},
std::array<float,2>{0.807505786f, 0.711348593f},
std::array<float,2>{0.205278322f, 0.977348089f},
std::array<float,2>{0.893518329f, 0.258553028f},
std::array<float,2>{0.409319103f, 0.19141376f},
std::array<float,2>{0.642011523f, 0.523550093f},
std::array<float,2>{0.33233875f, 0.689702153f},
std::array<float,2>{0.558572471f, 0.022830721f},
std::array<float,2>{0.029916957f, 0.441909194f},
std::array<float,2>{0.758084655f, 0.797785878f},
std::array<float,2>{0.0973238274f, 0.571801424f},
std::array<float,2>{0.863761902f, 0.160051525f},
std::array<float,2>{0.261966407f, 0.349047035f},
std::array<float,2>{0.622867048f, 0.9114272f},
std::array<float,2>{0.473111153f, 0.836203754f},
std::array<float,2>{0.732458115f, 0.39827168f},
std::array<float,2>{0.13741836f, 0.0892907083f},
std::array<float,2>{0.963568449f, 0.635692537f},
std::array<float,2>{0.0517729521f, 0.777561784f},
std::array<float,2>{0.789672315f, 0.498106062f},
std::array<float,2>{0.345836848f, 0.0535606071f},
std::array<float,2>{0.530918539f, 0.733825266f},
std::array<float,2>{0.395442516f, 0.549240947f},
std::array<float,2>{0.662347913f, 0.226808801f},
std::array<float,2>{0.248189896f, 0.286452144f},
std::array<float,2>{0.92711693f, 0.953949809f},
std::array<float,2>{0.161552414f, 0.674768031f},
std::array<float,2>{0.981820107f, 0.106131673f},
std::array<float,2>{0.460205793f, 0.410622746f},
std::array<float,2>{0.710124314f, 0.872472942f},
std::array<float,2>{0.286407501f, 0.883129358f},
std::array<float,2>{0.563010991f, 0.32810086f},
std::array<float,2>{0.0883403867f, 0.155494705f},
std::array<float,2>{0.830185533f, 0.620808661f},
std::array<float,2>{0.169805974f, 0.752243161f},
std::array<float,2>{0.97179395f, 0.470131248f},
std::array<float,2>{0.468682855f, 0.0415786132f},
std::array<float,2>{0.711220503f, 0.7461496f},
std::array<float,2>{0.296274036f, 0.540100694f},
std::array<float,2>{0.574041307f, 0.235525429f},
std::array<float,2>{0.0849124268f, 0.30376935f},
std::array<float,2>{0.836100519f, 0.940455675f},
std::array<float,2>{0.0552835055f, 0.668311954f},
std::array<float,2>{0.785104096f, 0.115836985f},
std::array<float,2>{0.353469729f, 0.434566498f},
std::array<float,2>{0.521995604f, 0.854311585f},
std::array<float,2>{0.400383025f, 0.901731372f},
std::array<float,2>{0.665436149f, 0.333700478f},
std::array<float,2>{0.235213205f, 0.136508837f},
std::array<float,2>{0.935841978f, 0.601279378f},
std::array<float,2>{0.103863023f, 0.991179526f},
std::array<float,2>{0.870720983f, 0.272999763f},
std::array<float,2>{0.252442628f, 0.21050787f},
std::array<float,2>{0.616050005f, 0.509270608f},
std::array<float,2>{0.476667315f, 0.715512574f},
std::array<float,2>{0.725494683f, 0.00461556064f},
std::array<float,2>{0.13261503f, 0.457573086f},
std::array<float,2>{0.957393706f, 0.786871612f},
std::array<float,2>{0.215552956f, 0.580597579f},
std::array<float,2>{0.899408102f, 0.177215993f},
std::array<float,2>{0.420563281f, 0.372028351f},
std::array<float,2>{0.6495713f, 0.925445735f},
std::array<float,2>{0.339522183f, 0.817122936f},
std::array<float,2>{0.553320706f, 0.382106215f},
std::array<float,2>{0.0166560542f, 0.0734979287f},
std::array<float,2>{0.756915569f, 0.650951028f},
std::array<float,2>{0.23067078f, 0.907403111f},
std::array<float,2>{0.914525688f, 0.345341831f},
std::array<float,2>{0.380089313f, 0.163121879f},
std::array<float,2>{0.685316265f, 0.577495456f},
std::array<float,2>{0.368598193f, 0.639084637f},
std::array<float,2>{0.508466959f, 0.0902097449f},
std::array<float,2>{0.0448734649f, 0.393018037f},
std::array<float,2>{0.804383814f, 0.841996789f},
std::array<float,2>{0.0636655167f, 0.527633667f},
std::array<float,2>{0.827624023f, 0.188234195f},
std::array<float,2>{0.309030324f, 0.262393117f},
std::array<float,2>{0.578723788f, 0.981924772f},
std::array<float,2>{0.445860833f, 0.80141896f},
std::array<float,2>{0.694345176f, 0.439419419f},
std::array<float,2>{0.184494764f, 0.0165457204f},
std::array<float,2>{0.993095458f, 0.694274068f},
std::array<float,2>{0.0148480479f, 0.870171368f},
std::array<float,2>{0.76665169f, 0.407626867f},
std::array<float,2>{0.318981022f, 0.101745695f},
std::array<float,2>{0.54363817f, 0.679663539f},
std::array<float,2>{0.424366593f, 0.622493684f},
std::array<float,2>{0.635427892f, 0.151125193f},
std::array<float,2>{0.19114314f, 0.321357936f},
std::array<float,2>{0.886210442f, 0.888199866f},
std::array<float,2>{0.15316157f, 0.726923823f},
std::array<float,2>{0.950818181f, 0.0485106818f},
std::array<float,2>{0.498404771f, 0.495204389f},
std::array<float,2>{0.735690296f, 0.776587963f},
std::array<float,2>{0.27054283f, 0.957275629f},
std::array<float,2>{0.604764283f, 0.284639597f},
std::array<float,2>{0.118338324f, 0.232277617f},
std::array<float,2>{0.855526924f, 0.552156329f},
std::array<float,2>{0.200692967f, 0.83011961f},
std::array<float,2>{0.877984405f, 0.40079245f},
std::array<float,2>{0.430882633f, 0.0795666873f},
std::array<float,2>{0.632275283f, 0.625694752f},
std::array<float,2>{0.325017482f, 0.564442217f},
std::array<float,2>{0.531391025f, 0.164374888f},
std::array<float,2>{0.00197543926f, 0.355146229f},
std::array<float,2>{0.775573075f, 0.921011031f},
std::array<float,2>{0.112080924f, 0.69713974f},
std::array<float,2>{0.844211698f, 0.0307768825f},
std::array<float,2>{0.280362785f, 0.449251831f},
std::array<float,2>{0.59575808f, 0.806981742f},
std::array<float,2>{0.485986918f, 0.976181328f},
std::array<float,2>{0.749642372f, 0.25458014f},
std::array<float,2>{0.141719937f, 0.201073334f},
std::array<float,2>{0.943216026f, 0.517610371f},
std::array<float,2>{0.0382073671f, 0.881597221f},
std::array<float,2>{0.811051011f, 0.316688478f},
std::array<float,2>{0.365404338f, 0.141156331f},
std::array<float,2>{0.5033288f, 0.609907627f},
std::array<float,2>{0.383364975f, 0.680611372f},
std::array<float,2>{0.674149871f, 0.0949114189f},
std::array<float,2>{0.223790482f, 0.415293574f},
std::array<float,2>{0.910849631f, 0.863312244f},
std::array<float,2>{0.173373267f, 0.558438659f},
std::array<float,2>{0.98969394f, 0.225907847f},
std::array<float,2>{0.441833824f, 0.294135243f},
std::array<float,2>{0.698475957f, 0.966888607f},
std::array<float,2>{0.297098637f, 0.768569589f},
std::array<float,2>{0.592452347f, 0.484593272f},
std::array<float,2>{0.0778232068f, 0.0572759621f},
std::array<float,2>{0.820269644f, 0.722450435f},
std::array<float,2>{0.132820651f, 0.946110845f},
std::array<float,2>{0.966088891f, 0.311492711f},
std::array<float,2>{0.469428152f, 0.243400618f},
std::array<float,2>{0.727820992f, 0.53863281f},
std::array<float,2>{0.258482218f, 0.740576327f},
std::array<float,2>{0.618749797f, 0.0345345102f},
std::array<float,2>{0.0988549665f, 0.480906725f},
std::array<float,2>{0.860934615f, 0.764040709f},
std::array<float,2>{0.023695644f, 0.602535784f},
std::array<float,2>{0.76248014f, 0.126750857f},
std::array<float,2>{0.32827419f, 0.34072572f},
std::array<float,2>{0.560460746f, 0.894725263f},
std::array<float,2>{0.411059201f, 0.845879316f},
std::array<float,2>{0.646963298f, 0.428375542f},
std::array<float,2>{0.209696949f, 0.117394879f},
std::array<float,2>{0.894637764f, 0.663002849f},
std::array<float,2>{0.0906210467f, 0.789230585f},
std::array<float,2>{0.834040761f, 0.460962623f},
std::array<float,2>{0.282233387f, 0.012625332f},
std::array<float,2>{0.566918015f, 0.704079986f},
std::array<float,2>{0.453184903f, 0.507650614f},
std::array<float,2>{0.703879833f, 0.218270361f},
std::array<float,2>{0.156437844f, 0.27360025f},
std::array<float,2>{0.976863444f, 0.99844116f},
std::array<float,2>{0.244811475f, 0.645059288f},
std::array<float,2>{0.922867596f, 0.0671371445f},
std::array<float,2>{0.394352347f, 0.390465021f},
std::array<float,2>{0.65708673f, 0.823381901f},
std::array<float,2>{0.349582881f, 0.935057104f},
std::array<float,2>{0.526218832f, 0.362778008f},
std::array<float,2>{0.0492217205f, 0.184617549f},
std::array<float,2>{0.793338001f, 0.590605617f},
std::array<float,2>{0.211466864f, 0.772728562f},
std::array<float,2>{0.905258656f, 0.489352614f},
std::array<float,2>{0.41796574f, 0.0615026914f},
std::array<float,2>{0.655935168f, 0.724091589f},
std::array<float,2>{0.341829032f, 0.558945119f},
std::array<float,2>{0.548224747f, 0.219788775f},
std::array<float,2>{0.0211918782f, 0.292386621f},
std::array<float,2>{0.75293833f, 0.964719415f},
std::array<float,2>{0.109219193f, 0.686456501f},
std::array<float,2>{0.874105453f, 0.098945342f},
std::array<float,2>{0.256841928f, 0.418683946f},
std::array<float,2>{0.609545708f, 0.863007903f},
std::array<float,2>{0.484199584f, 0.875185907f},
std::array<float,2>{0.721595287f, 0.316005707f},
std::array<float,2>{0.127404362f, 0.145225897f},
std::array<float,2>{0.954763114f, 0.61600554f},
std::array<float,2>{0.0618358739f, 0.970248818f},
std::array<float,2>{0.788322389f, 0.251689225f},
std::array<float,2>{0.356466353f, 0.19901216f},
std::array<float,2>{0.519016266f, 0.522034228f},
std::array<float,2>{0.405290812f, 0.699938297f},
std::array<float,2>{0.669505596f, 0.027185427f},
std::array<float,2>{0.23918806f, 0.445991665f},
std::array<float,2>{0.93342793f, 0.81143564f},
std::array<float,2>{0.167699769f, 0.566467941f},
std::array<float,2>{0.975548804f, 0.168923557f},
std::array<float,2>{0.462753654f, 0.357492268f},
std::array<float,2>{0.718746722f, 0.91416657f},
std::array<float,2>{0.29137814f, 0.8333143f},
std::array<float,2>{0.575730264f, 0.405629605f},
std::array<float,2>{0.08198452f, 0.0848938599f},
std::array<float,2>{0.843150675f, 0.630272269f},
std::array<float,2>{0.151530892f, 0.932957113f},
std::array<float,2>{0.948388278f, 0.365501314f},
std::array<float,2>{0.495464951f, 0.181577146f},
std::array<float,2>{0.740323186f, 0.589782953f},
std::array<float,2>{0.267290324f, 0.644490302f},
std::array<float,2>{0.605716348f, 0.0627727136f},
std::array<float,2>{0.122736074f, 0.383762956f},
std::array<float,2>{0.851707816f, 0.826232851f},
std::array<float,2>{0.00823877007f, 0.503691316f},
std::array<float,2>{0.771194875f, 0.213030487f},
std::array<float,2>{0.31365788f, 0.27835831f},
std::array<float,2>{0.540261626f, 0.994343877f},
std::array<float,2>{0.427160501f, 0.796471357f},
std::array<float,2>{0.637922108f, 0.468377829f},
std::array<float,2>{0.195197254f, 0.0109302672f},
std::array<float,2>{0.890137553f, 0.707086682f},
std::array<float,2>{0.0701698288f, 0.851014912f},
std::array<float,2>{0.821829617f, 0.423273087f},
std::array<float,2>{0.307997018f, 0.121857241f},
std::array<float,2>{0.585465133f, 0.659884691f},
std::array<float,2>{0.450420946f, 0.60567522f},
std::array<float,2>{0.68938148f, 0.129091173f},
std::array<float,2>{0.182296261f, 0.339833587f},
std::array<float,2>{0.997557878f, 0.892029643f},
std::array<float,2>{0.229640335f, 0.737559259f},
std::array<float,2>{0.920480669f, 0.0354132019f},
std::array<float,2>{0.378059238f, 0.477804333f},
std::array<float,2>{0.683489919f, 0.761459827f},
std::array<float,2>{0.374350429f, 0.949733377f},
std::array<float,2>{0.51544112f, 0.305993199f},
std::array<float,2>{0.040195588f, 0.248998567f},
std::array<float,2>{0.80033958f, 0.531849265f},
std::array<float,2>{0.176569209f, 0.81523782f},
std::array<float,2>{0.985838592f, 0.377913713f},
std::array<float,2>{0.440619439f, 0.0772066265f},
std::array<float,2>{0.699667633f, 0.655226886f},
std::array<float,2>{0.302997708f, 0.584937572f},
std::array<float,2>{0.587458193f, 0.174409449f},
std::array<float,2>{0.0713999122f, 0.369430512f},
std::array<float,2>{0.813504994f, 0.925884724f},
std::array<float,2>{0.0349682942f, 0.714733899f},
std::array<float,2>{0.805859506f, 0.00224312348f},
std::array<float,2>{0.363243312f, 0.456467092f},
std::array<float,2>{0.505550027f, 0.784709513f},
std::array<float,2>{0.387561917f, 0.987935662f},
std::array<float,2>{0.67632091f, 0.267270654f},
std::array<float,2>{0.219124779f, 0.20335497f},
std::array<float,2>{0.909228027f, 0.512616992f},
std::array<float,2>{0.114120826f, 0.90475297f},
std::array<float,2>{0.850161731f, 0.329934597f},
std::array<float,2>{0.276508659f, 0.138677493f},
std::array<float,2>{0.598319232f, 0.595380425f},
std::array<float,2>{0.489974648f, 0.666274607f},
std::array<float,2>{0.742915988f, 0.109680228f},
std::array<float,2>{0.146293536f, 0.431867182f},
std::array<float,2>{0.93963021f, 0.859234691f},
std::array<float,2>{0.199028462f, 0.546117961f},
std::array<float,2>{0.88122201f, 0.238429859f},
std::array<float,2>{0.434889674f, 0.298716068f},
std::array<float,2>{0.626067519f, 0.944477081f},
std::array<float,2>{0.32067135f, 0.757735133f},
std::array<float,2>{0.538875163f, 0.473602891f},
std::array<float,2>{0.00633597886f, 0.0434567332f},
std::array<float,2>{0.778102875f, 0.742522001f},
std::array<float,2>{0.246857867f, 0.956202149f},
std::array<float,2>{0.927817345f, 0.28813079f},
std::array<float,2>{0.398365319f, 0.229002208f},
std::array<float,2>{0.662038743f, 0.547961533f},
std::array<float,2>{0.34531936f, 0.732149422f},
std::array<float,2>{0.527572095f, 0.0513515025f},
std::array<float,2>{0.0527788326f, 0.497758031f},
std::array<float,2>{0.791486323f, 0.780670643f},
std::array<float,2>{0.0863562897f, 0.618998766f},
std::array<float,2>{0.829279661f, 0.152750939f},
std::array<float,2>{0.287680775f, 0.324957341f},
std::array<float,2>{0.564840317f, 0.886600256f},
std::array<float,2>{0.45738095f, 0.873138964f},
std::array<float,2>{0.707698107f, 0.413353473f},
std::array<float,2>{0.163412884f, 0.107760072f},
std::array<float,2>{0.982851803f, 0.673541486f},
std::array<float,2>{0.0285746586f, 0.800063193f},
std::array<float,2>{0.76039201f, 0.443786114f},
std::array<float,2>{0.335463822f, 0.0206380393f},
std::array<float,2>{0.556488395f, 0.687723577f},
std::array<float,2>{0.406594723f, 0.526275039f},
std::array<float,2>{0.644129515f, 0.19422704f},
std::array<float,2>{0.203341067f, 0.259828836f},
std::array<float,2>{0.892026663f, 0.979752481f},
std::array<float,2>{0.139460668f, 0.634164274f},
std::array<float,2>{0.962619543f, 0.0861406103f},
std::array<float,2>{0.476132661f, 0.395813733f},
std::array<float,2>{0.730914831f, 0.839049399f},
std::array<float,2>{0.264798254f, 0.912446141f},
std::array<float,2>{0.623862982f, 0.350512773f},
std::array<float,2>{0.0953070149f, 0.156411529f},
std::array<float,2>{0.866200328f, 0.572267056f},
std::array<float,2>{0.130336046f, 0.787503898f},
std::array<float,2>{0.95943898f, 0.460858256f},
std::array<float,2>{0.479145378f, 0.007487786f},
std::array<float,2>{0.722816706f, 0.716914058f},
std::array<float,2>{0.251077771f, 0.510277033f},
std::array<float,2>{0.613559544f, 0.207580626f},
std::array<float,2>{0.103300817f, 0.270536691f},
std::array<float,2>{0.868800521f, 0.989923537f},
std::array<float,2>{0.0188573562f, 0.648864985f},
std::array<float,2>{0.755384088f, 0.071871832f},
std::array<float,2>{0.337712884f, 0.380218416f},
std::array<float,2>{0.551927209f, 0.820254743f},
std::array<float,2>{0.419016033f, 0.923066378f},
std::array<float,2>{0.651402116f, 0.374606878f},
std::array<float,2>{0.218603671f, 0.178793848f},
std::array<float,2>{0.900688112f, 0.579151213f},
std::array<float,2>{0.0835833773f, 0.938608825f},
std::array<float,2>{0.83905381f, 0.30224967f},
std::array<float,2>{0.294256657f, 0.237942025f},
std::array<float,2>{0.570612788f, 0.541602969f},
std::array<float,2>{0.465610355f, 0.748419344f},
std::array<float,2>{0.713173211f, 0.0394549258f},
std::array<float,2>{0.17047438f, 0.472537726f},
std::array<float,2>{0.968806744f, 0.750677049f},
std::array<float,2>{0.237368956f, 0.597798645f},
std::array<float,2>{0.934085429f, 0.134650588f},
std::array<float,2>{0.401470244f, 0.335825711f},
std::array<float,2>{0.667439222f, 0.899129033f},
std::array<float,2>{0.355177999f, 0.852946639f},
std::array<float,2>{0.520979762f, 0.43585214f},
std::array<float,2>{0.0582925603f, 0.114964284f},
std::array<float,2>{0.781707704f, 0.67003566f},
std::array<float,2>{0.188696936f, 0.890376806f},
std::array<float,2>{0.884213269f, 0.322504222f},
std::array<float,2>{0.422738343f, 0.149960741f},
std::array<float,2>{0.634216726f, 0.623859048f},
std::array<float,2>{0.317608714f, 0.676915228f},
std::array<float,2>{0.546080053f, 0.103700951f},
std::array<float,2>{0.0123244477f, 0.409668088f},
std::array<float,2>{0.767697752f, 0.867342234f},
std::array<float,2>{0.120900869f, 0.553528488f},
std::array<float,2>{0.858572364f, 0.232510164f},
std::array<float,2>{0.271953851f, 0.282316387f},
std::array<float,2>{0.601997972f, 0.960759938f},
std::array<float,2>{0.497470975f, 0.77458179f},
std::array<float,2>{0.736754537f, 0.492318541f},
std::array<float,2>{0.156177893f, 0.0501169637f},
std::array<float,2>{0.952486873f, 0.729779959f},
std::array<float,2>{0.0460309125f, 0.840634584f},
std::array<float,2>{0.802384973f, 0.391270041f},
std::array<float,2>{0.370354712f, 0.0932622403f},
std::array<float,2>{0.510899901f, 0.637658536f},
std::array<float,2>{0.382543474f, 0.575179517f},
std::array<float,2>{0.686444879f, 0.161146164f},
std::array<float,2>{0.233164355f, 0.346677005f},
std::array<float,2>{0.917602599f, 0.908458471f},
std::array<float,2>{0.185734197f, 0.692793608f},
std::array<float,2>{0.995799363f, 0.0178076141f},
std::array<float,2>{0.447990835f, 0.440817147f},
std::array<float,2>{0.692781627f, 0.804085135f},
std::array<float,2>{0.311248004f, 0.983248532f},
std::array<float,2>{0.581117153f, 0.264187574f},
std::array<float,2>{0.0659196153f, 0.189938262f},
std::array<float,2>{0.82567668f, 0.529447436f},
std::array<float,2>{0.224816218f, 0.866901398f},
std::array<float,2>{0.912604809f, 0.417095572f},
std::array<float,2>{0.386030227f, 0.0972590074f},
std::array<float,2>{0.673340023f, 0.682242215f},
std::array<float,2>{0.363325387f, 0.612704337f},
std::array<float,2>{0.500228286f, 0.144032404f},
std::array<float,2>{0.0359098092f, 0.319183558f},
std::array<float,2>{0.809287488f, 0.880652487f},
std::array<float,2>{0.0746157616f, 0.718900859f},
std::array<float,2>{0.81683749f, 0.0558771528f},
std::array<float,2>{0.299020857f, 0.487733632f},
std::array<float,2>{0.591326416f, 0.766181827f},
std::array<float,2>{0.445161819f, 0.9658885f},
std::array<float,2>{0.69556731f, 0.296341598f},
std::array<float,2>{0.175740659f, 0.223884568f},
std::array<float,2>{0.991645277f, 0.556629121f},
std::array<float,2>{0.00123933249f, 0.918489516f},
std::array<float,2>{0.773777783f, 0.352316231f},
std::array<float,2>{0.3269701f, 0.16616872f},
std::array<float,2>{0.534724772f, 0.56482935f},
std::array<float,2>{0.43225646f, 0.627796292f},
std::array<float,2>{0.62926501f, 0.0807569921f},
std::array<float,2>{0.201379135f, 0.398759514f},
std::array<float,2>{0.876635432f, 0.82870388f},
std::array<float,2>{0.143183291f, 0.517057121f},
std::array<float,2>{0.944436908f, 0.203079656f},
std::array<float,2>{0.487696052f, 0.256095588f},
std::array<float,2>{0.746556342f, 0.972745478f},
std::array<float,2>{0.278112918f, 0.805888355f},
std::array<float,2>{0.595137715f, 0.451213092f},
std::array<float,2>{0.110866055f, 0.0273751654f},
std::array<float,2>{0.847077131f, 0.697508752f},
std::array<float,2>{0.159261718f, 0.997467995f},
std::array<float,2>{0.980134487f, 0.277023166f},
std::array<float,2>{0.45591256f, 0.215436354f},
std::array<float,2>{0.705891609f, 0.505144298f},
std::array<float,2>{0.284711033f, 0.705736876f},
std::array<float,2>{0.568779886f, 0.0144285252f},
std::array<float,2>{0.0927935094f, 0.464074403f},
std::array<float,2>{0.832830012f, 0.792045474f},
std::array<float,2>{0.0475424491f, 0.593249083f},
std::array<float,2>{0.795222998f, 0.186104238f},
std::array<float,2>{0.350618631f, 0.359484941f},
std::array<float,2>{0.524369955f, 0.937100053f},
std::array<float,2>{0.39093861f, 0.82032752f},
std::array<float,2>{0.658430755f, 0.388031334f},
std::array<float,2>{0.243331149f, 0.0694004297f},
std::array<float,2>{0.925266325f, 0.64795053f},
std::array<float,2>{0.100839287f, 0.762892723f},
std::array<float,2>{0.862466991f, 0.483488083f},
std::array<float,2>{0.261632234f, 0.0319928043f},
std::array<float,2>{0.619822085f, 0.738822401f},
std::array<float,2>{0.471511245f, 0.536851168f},
std::array<float,2>{0.728639185f, 0.244978517f},
std::array<float,2>{0.135227129f, 0.309699476f},
std::array<float,2>{0.968728244f, 0.947400331f},
std::array<float,2>{0.207773983f, 0.661109865f},
std::array<float,2>{0.897573233f, 0.120811813f},
std::array<float,2>{0.41303134f, 0.427310944f},
std::array<float,2>{0.644923151f, 0.844896197f},
std::array<float,2>{0.33089149f, 0.898173988f},
std::array<float,2>{0.561120033f, 0.34341836f},
std::array<float,2>{0.0258881506f, 0.127818406f},
std::array<float,2>{0.764968216f, 0.603860497f},
std::array<float,2>{0.218424916f, 0.785360754f},
std::array<float,2>{0.900399446f, 0.458355665f},
std::array<float,2>{0.419314981f, 0.00568833062f},
std::array<float,2>{0.651842117f, 0.716752887f},
std::array<float,2>{0.337514848f, 0.508131027f},
std::array<float,2>{0.552112162f, 0.209003583f},
std::array<float,2>{0.0186849777f, 0.272294074f},
std::array<float,2>{0.755812049f, 0.991322756f},
std::array<float,2>{0.103122339f, 0.651600361f},
std::array<float,2>{0.869053364f, 0.072266914f},
std::array<float,2>{0.251337707f, 0.381560147f},
std::array<float,2>{0.613504827f, 0.817827821f},
std::array<float,2>{0.479324371f, 0.924804509f},
std::array<float,2>{0.723086059f, 0.37277469f},
std::array<float,2>{0.130109712f, 0.176682666f},
std::array<float,2>{0.958986402f, 0.581563175f},
std::array<float,2>{0.0583917238f, 0.939978957f},
std::array<float,2>{0.781431854f, 0.303261489f},
std::array<float,2>{0.355455458f, 0.234440491f},
std::array<float,2>{0.520695686f, 0.539695799f},
std::array<float,2>{0.401758552f, 0.747591257f},
std::array<float,2>{0.66704005f, 0.0426057912f},
std::array<float,2>{0.23774147f, 0.46961242f},
std::array<float,2>{0.934530854f, 0.753537655f},
std::array<float,2>{0.170804992f, 0.60050559f},
std::array<float,2>{0.969056368f, 0.135493025f},
std::array<float,2>{0.465443879f, 0.332647324f},
std::array<float,2>{0.713101506f, 0.901103854f},
std::array<float,2>{0.294125021f, 0.854957402f},
std::array<float,2>{0.570439517f, 0.434885323f},
std::array<float,2>{0.0839557797f, 0.1170903f},
std::array<float,2>{0.839148641f, 0.669045389f},
std::array<float,2>{0.155871034f, 0.887690246f},
std::array<float,2>{0.952391207f, 0.320739657f},
std::array<float,2>{0.497166753f, 0.151554897f},
std::array<float,2>{0.736416698f, 0.621473372f},
std::array<float,2>{0.271712959f, 0.678005338f},
std::array<float,2>{0.601796448f, 0.103264369f},
std::array<float,2>{0.12071678f, 0.406732947f},
std::array<float,2>{0.858682334f, 0.869254887f},
std::array<float,2>{0.012541132f, 0.551147759f},
std::array<float,2>{0.767938197f, 0.231301248f},
std::array<float,2>{0.317807078f, 0.283591002f},
std::array<float,2>{0.546171367f, 0.958680451f},
std::array<float,2>{0.422469318f, 0.776263118f},
std::array<float,2>{0.633911133f, 0.494365692f},
std::array<float,2>{0.188895628f, 0.0469235405f},
std::array<float,2>{0.883930862f, 0.727785826f},
std::array<float,2>{0.0662493855f, 0.843240321f},
std::array<float,2>{0.8253842f, 0.39425385f},
std::array<float,2>{0.311457485f, 0.0917331874f},
std::array<float,2>{0.581449687f, 0.639851153f},
std::array<float,2>{0.448053539f, 0.577078104f},
std::array<float,2>{0.692619324f, 0.162770286f},
std::array<float,2>{0.185831562f, 0.343957007f},
std::array<float,2>{0.996040046f, 0.906294048f},
std::array<float,2>{0.233013779f, 0.695191741f},
std::array<float,2>{0.917730927f, 0.017067235f},
std::array<float,2>{0.382661641f, 0.438042194f},
std::array<float,2>{0.686203897f, 0.802269816f},
std::array<float,2>{0.370587587f, 0.980970621f},
std::array<float,2>{0.511085689f, 0.263567328f},
std::array<float,2>{0.0462989546f, 0.18891719f},
std::array<float,2>{0.802695215f, 0.52914685f},
std::array<float,2>{0.1753387f, 0.864549696f},
std::array<float,2>{0.991333544f, 0.414850026f},
std::array<float,2>{0.444873601f, 0.0945707038f},
std::array<float,2>{0.695351779f, 0.680685341f},
std::array<float,2>{0.2991032f, 0.610693514f},
std::array<float,2>{0.591581643f, 0.142393842f},
std::array<float,2>{0.0744163767f, 0.317550629f},
std::array<float,2>{0.816478252f, 0.88245064f},
std::array<float,2>{0.0357850194f, 0.721520901f},
std::array<float,2>{0.809494078f, 0.0577313192f},
std::array<float,2>{0.363550812f, 0.485721052f},
std::array<float,2>{0.500363827f, 0.768531203f},
std::array<float,2>{0.385824233f, 0.968429744f},
std::array<float,2>{0.673588336f, 0.293836802f},
std::array<float,2>{0.224990472f, 0.225479141f},
std::array<float,2>{0.912842274f, 0.556917727f},
std::array<float,2>{0.111190759f, 0.920133948f},
std::array<float,2>{0.846820354f, 0.353751391f},
std::array<float,2>{0.277835518f, 0.165220678f},
std::array<float,2>{0.594917476f, 0.562817335f},
std::array<float,2>{0.487324178f, 0.626747966f},
std::array<float,2>{0.746326804f, 0.0786756352f},
std::array<float,2>{0.143455163f, 0.401748925f},
std::array<float,2>{0.944711983f, 0.831862748f},
std::array<float,2>{0.201433748f, 0.518574834f},
std::array<float,2>{0.876721978f, 0.199390471f},
std::array<float,2>{0.432380468f, 0.255311728f},
std::array<float,2>{0.629146457f, 0.974654019f},
std::array<float,2>{0.32689622f, 0.808035851f},
std::array<float,2>{0.535093904f, 0.450597137f},
std::array<float,2>{0.0011689458f, 0.0302061159f},
std::array<float,2>{0.773661613f, 0.696288407f},
std::array<float,2>{0.243506089f, 0.999672771f},
std::array<float,2>{0.924963415f, 0.275283009f},
std::array<float,2>{0.390815675f, 0.217751354f},
std::array<float,2>{0.658470035f, 0.50631547f},
std::array<float,2>{0.35088262f, 0.704389215f},
std::array<float,2>{0.524084151f, 0.0127369836f},
std::array<float,2>{0.047789555f, 0.462254405f},
std::array<float,2>{0.795051038f, 0.790054739f},
std::array<float,2>{0.0931023955f, 0.591591179f},
std::array<float,2>{0.832744956f, 0.184361562f},
std::array<float,2>{0.284992039f, 0.361612171f},
std::array<float,2>{0.568572044f, 0.934033215f},
std::array<float,2>{0.455570728f, 0.822967887f},
std::array<float,2>{0.705575287f, 0.389233261f},
std::array<float,2>{0.159656256f, 0.0679875538f},
std::array<float,2>{0.980239332f, 0.64599365f},
std::array<float,2>{0.0261865668f, 0.764962733f},
std::array<float,2>{0.764720142f, 0.482234448f},
std::array<float,2>{0.330797464f, 0.0332213156f},
std::array<float,2>{0.561394572f, 0.74187988f},
std::array<float,2>{0.412770241f, 0.537396908f},
std::array<float,2>{0.644721746f, 0.242193222f},
std::array<float,2>{0.207653552f, 0.312404305f},
std::array<float,2>{0.897901237f, 0.946399152f},
std::array<float,2>{0.134924501f, 0.663862765f},
std::array<float,2>{0.968503058f, 0.119012795f},
std::array<float,2>{0.471405804f, 0.428747863f},
std::array<float,2>{0.728815496f, 0.847608387f},
std::array<float,2>{0.261270881f, 0.896432042f},
std::array<float,2>{0.619998336f, 0.340888619f},
std::array<float,2>{0.100798704f, 0.125812545f},
std::array<float,2>{0.862770796f, 0.603427351f},
std::array<float,2>{0.127163917f, 0.770906329f},
std::array<float,2>{0.954996526f, 0.490427673f},
std::array<float,2>{0.483968645f, 0.0589164235f},
std::array<float,2>{0.721328318f, 0.72486335f},
std::array<float,2>{0.257308304f, 0.560632527f},
std::array<float,2>{0.609841228f, 0.220917165f},
std::array<float,2>{0.109127238f, 0.290820718f},
std::array<float,2>{0.874309778f, 0.961029649f},
std::array<float,2>{0.0214543957f, 0.683760822f},
std::array<float,2>{0.753208518f, 0.100589707f},
std::array<float,2>{0.342085838f, 0.421160638f},
std::array<float,2>{0.548039734f, 0.859426796f},
std::array<float,2>{0.417484224f, 0.878079772f},
std::array<float,2>{0.656217456f, 0.31356737f},
std::array<float,2>{0.211757064f, 0.147102669f},
std::array<float,2>{0.904993474f, 0.615046799f},
std::array<float,2>{0.0817446262f, 0.971426129f},
std::array<float,2>{0.842965007f, 0.252813935f},
std::array<float,2>{0.291191876f, 0.19621785f},
std::array<float,2>{0.576062024f, 0.521424413f},
std::array<float,2>{0.462555259f, 0.703070462f},
std::array<float,2>{0.718325436f, 0.0241183266f},
std::array<float,2>{0.167784661f, 0.44860509f},
std::array<float,2>{0.975101769f, 0.809151351f},
std::array<float,2>{0.238888964f, 0.570154548f},
std::array<float,2>{0.933226883f, 0.171523616f},
std::array<float,2>{0.405553609f, 0.356122077f},
std::array<float,2>{0.669889271f, 0.917841434f},
std::array<float,2>{0.356734067f, 0.834526658f},
std::array<float,2>{0.518795311f, 0.402753949f},
std::array<float,2>{0.0617056303f, 0.0830152929f},
std::array<float,2>{0.788386285f, 0.631423771f},
std::array<float,2>{0.195059225f, 0.931332052f},
std::array<float,2>{0.890551984f, 0.364962459f},
std::array<float,2>{0.426792085f, 0.183151662f},
std::array<float,2>{0.638159335f, 0.586313963f},
std::array<float,2>{0.313808262f, 0.640775919f},
std::array<float,2>{0.54030019f, 0.0654048175f},
std::array<float,2>{0.00791673642f, 0.386358798f},
std::array<float,2>{0.771357f, 0.824736953f},
std::array<float,2>{0.123000562f, 0.500353396f},
std::array<float,2>{0.851901114f, 0.212393746f},
std::array<float,2>{0.267361164f, 0.279937297f},
std::array<float,2>{0.605529308f, 0.992955863f},
std::array<float,2>{0.495230079f, 0.793431699f},
std::array<float,2>{0.740711868f, 0.466410041f},
std::array<float,2>{0.151818454f, 0.0093714539f},
std::array<float,2>{0.948718905f, 0.709423602f},
std::array<float,2>{0.0404296815f, 0.848806739f},
std::array<float,2>{0.800597668f, 0.424492985f},
std::array<float,2>{0.37417084f, 0.124259397f},
std::array<float,2>{0.515361845f, 0.657484531f},
std::array<float,2>{0.378179222f, 0.607998729f},
std::array<float,2>{0.683269858f, 0.132305637f},
std::array<float,2>{0.229947209f, 0.336880863f},
std::array<float,2>{0.920730233f, 0.892986298f},
std::array<float,2>{0.18248567f, 0.735585034f},
std::array<float,2>{0.99715662f, 0.0372946002f},
std::array<float,2>{0.450523555f, 0.479469568f},
std::array<float,2>{0.689107656f, 0.758178353f},
std::array<float,2>{0.30781284f, 0.952701926f},
std::array<float,2>{0.585918427f, 0.307598799f},
std::array<float,2>{0.0700029135f, 0.247498631f},
std::array<float,2>{0.822149396f, 0.534395635f},
std::array<float,2>{0.218757987f, 0.81440562f},
std::array<float,2>{0.909662247f, 0.375852615f},
std::array<float,2>{0.38727209f, 0.0757289305f},
std::array<float,2>{0.676533401f, 0.653000057f},
std::array<float,2>{0.36301288f, 0.58351016f},
std::array<float,2>{0.505786896f, 0.1735847f},
std::array<float,2>{0.0348790698f, 0.368338585f},
std::array<float,2>{0.806131303f, 0.928182602f},
std::array<float,2>{0.0715731829f, 0.712112844f},
std::array<float,2>{0.813780129f, 0.000303678709f},
std::array<float,2>{0.302969277f, 0.454122514f},
std::array<float,2>{0.587656856f, 0.781874716f},
std::array<float,2>{0.440862298f, 0.986167431f},
std::array<float,2>{0.699368894f, 0.269176185f},
std::array<float,2>{0.176367432f, 0.205160722f},
std::array<float,2>{0.985478044f, 0.513792872f},
std::array<float,2>{0.00600676239f, 0.904064953f},
std::array<float,2>{0.778038561f, 0.331386864f},
std::array<float,2>{0.320394129f, 0.137316197f},
std::array<float,2>{0.538674593f, 0.596786916f},
std::array<float,2>{0.434664577f, 0.665186107f},
std::array<float,2>{0.626325071f, 0.112319425f},
std::array<float,2>{0.198883325f, 0.430381119f},
std::array<float,2>{0.880990326f, 0.857130408f},
std::array<float,2>{0.14605552f, 0.54408437f},
std::array<float,2>{0.939754426f, 0.242046684f},
std::array<float,2>{0.490092397f, 0.300562054f},
std::array<float,2>{0.742961943f, 0.942871153f},
std::array<float,2>{0.276622683f, 0.75462842f},
std::array<float,2>{0.598442733f, 0.475751102f},
std::array<float,2>{0.113852262f, 0.0462597683f},
std::array<float,2>{0.850454926f, 0.745068252f},
std::array<float,2>{0.163233876f, 0.954688072f},
std::array<float,2>{0.982487977f, 0.285716176f},
std::array<float,2>{0.45704779f, 0.228225082f},
std::array<float,2>{0.707780242f, 0.550369561f},
std::array<float,2>{0.287992001f, 0.732874334f},
std::array<float,2>{0.564480901f, 0.0541036613f},
std::array<float,2>{0.0860743523f, 0.499214143f},
std::array<float,2>{0.829373956f, 0.778755844f},
std::array<float,2>{0.0532110333f, 0.619442284f},
std::array<float,2>{0.791150093f, 0.155264899f},
std::array<float,2>{0.345700204f, 0.326752067f},
std::array<float,2>{0.527745605f, 0.883982301f},
std::array<float,2>{0.397968978f, 0.871408463f},
std::array<float,2>{0.66168201f, 0.41203776f},
std::array<float,2>{0.246591762f, 0.106532075f},
std::array<float,2>{0.927978814f, 0.674982488f},
std::array<float,2>{0.0956040025f, 0.798246562f},
std::array<float,2>{0.865786672f, 0.442862034f},
std::array<float,2>{0.265062749f, 0.0221287161f},
std::array<float,2>{0.623688877f, 0.690815032f},
std::array<float,2>{0.476418793f, 0.525331318f},
std::array<float,2>{0.730581999f, 0.19284223f},
std::array<float,2>{0.139388546f, 0.258822203f},
std::array<float,2>{0.962797463f, 0.977784336f},
std::array<float,2>{0.203480452f, 0.63640213f},
std::array<float,2>{0.891755998f, 0.0880759358f},
std::array<float,2>{0.406289548f, 0.396889836f},
std::array<float,2>{0.644413948f, 0.837596476f},
std::array<float,2>{0.335722744f, 0.911130369f},
std::array<float,2>{0.55627358f, 0.348420143f},
std::array<float,2>{0.0285030007f, 0.158680975f},
std::array<float,2>{0.760524154f, 0.571078658f},
std::array<float,2>{0.234908327f, 0.751120329f},
std::array<float,2>{0.935552657f, 0.471454322f},
std::array<float,2>{0.400108308f, 0.0408109836f},
std::array<float,2>{0.665114105f, 0.749224246f},
std::array<float,2>{0.353271127f, 0.542706013f},
std::array<float,2>{0.522396028f, 0.237282902f},
std::array<float,2>{0.0555886775f, 0.301423103f},
std::array<float,2>{0.784856319f, 0.937972963f},
std::array<float,2>{0.084592618f, 0.670914054f},
std::array<float,2>{0.836322904f, 0.113938682f},
std::array<float,2>{0.296009779f, 0.436962873f},
std::array<float,2>{0.573930085f, 0.851805091f},
std::array<float,2>{0.468431562f, 0.900262475f},
std::array<float,2>{0.711034417f, 0.334435165f},
std::array<float,2>{0.169568315f, 0.132909968f},
std::array<float,2>{0.97208035f, 0.598944962f},
std::array<float,2>{0.0169178266f, 0.98875159f},
std::array<float,2>{0.757302999f, 0.270052582f},
std::array<float,2>{0.33964175f, 0.208235338f},
std::array<float,2>{0.553664207f, 0.511409402f},
std::array<float,2>{0.420762867f, 0.718025625f},
std::array<float,2>{0.649746299f, 0.00591156492f},
std::array<float,2>{0.215666696f, 0.459690481f},
std::array<float,2>{0.898947895f, 0.788757384f},
std::array<float,2>{0.132531762f, 0.578700662f},
std::array<float,2>{0.957158864f, 0.178386495f},
std::array<float,2>{0.477048159f, 0.37371698f},
std::array<float,2>{0.725120306f, 0.922210991f},
std::array<float,2>{0.252829075f, 0.819188476f},
std::array<float,2>{0.61578989f, 0.379530519f},
std::array<float,2>{0.103609674f, 0.07054203f},
std::array<float,2>{0.871021986f, 0.650195897f},
std::array<float,2>{0.184257179f, 0.909497559f},
std::array<float,2>{0.992805243f, 0.347114682f},
std::array<float,2>{0.44606638f, 0.160718784f},
std::array<float,2>{0.694600403f, 0.576070905f},
std::array<float,2>{0.308603436f, 0.638453245f},
std::array<float,2>{0.579061508f, 0.0922232345f},
std::array<float,2>{0.063771382f, 0.392373145f},
std::array<float,2>{0.827340066f, 0.841231525f},
std::array<float,2>{0.0444573723f, 0.53114152f},
std::array<float,2>{0.804672003f, 0.190474555f},
std::array<float,2>{0.368406951f, 0.264696449f},
std::array<float,2>{0.508706927f, 0.984292805f},
std::array<float,2>{0.38025254f, 0.802936912f},
std::array<float,2>{0.685115874f, 0.439713776f},
std::array<float,2>{0.230759695f, 0.0188919231f},
std::array<float,2>{0.914189398f, 0.691901863f},
std::array<float,2>{0.118518166f, 0.868227661f},
std::array<float,2>{0.855889857f, 0.408231527f},
std::array<float,2>{0.270963609f, 0.104573831f},
std::array<float,2>{0.604572773f, 0.67605412f},
std::array<float,2>{0.498253018f, 0.624109745f},
std::array<float,2>{0.735352457f, 0.148769766f},
std::array<float,2>{0.152839124f, 0.324209929f},
std::array<float,2>{0.951067388f, 0.889108479f},
std::array<float,2>{0.191335917f, 0.729121208f},
std::array<float,2>{0.885868967f, 0.0493468754f},
std::array<float,2>{0.424681604f, 0.493622839f},
std::array<float,2>{0.635644615f, 0.774039328f},
std::array<float,2>{0.319146425f, 0.959427476f},
std::array<float,2>{0.543765664f, 0.281932831f},
std::array<float,2>{0.0151000619f, 0.233862862f},
std::array<float,2>{0.766946077f, 0.5541628f},
std::array<float,2>{0.142003477f, 0.829143584f},
std::array<float,2>{0.942927361f, 0.400348544f},
std::array<float,2>{0.486084789f, 0.0811205879f},
std::array<float,2>{0.749762654f, 0.628721118f},
std::array<float,2>{0.280760586f, 0.565483034f},
std::array<float,2>{0.596147835f, 0.167191565f},
std::array<float,2>{0.111886203f, 0.352859885f},
std::array<float,2>{0.843931854f, 0.919840932f},
std::array<float,2>{0.00227869139f, 0.698651135f},
std::array<float,2>{0.775857925f, 0.0287080873f},
std::array<float,2>{0.324801058f, 0.45257777f},
std::array<float,2>{0.531499803f, 0.804861367f},
std::array<float,2>{0.431080371f, 0.973821342f},
std::array<float,2>{0.631961107f, 0.256870031f},
std::array<float,2>{0.201096997f, 0.201586679f},
std::array<float,2>{0.878183305f, 0.515669465f},
std::array<float,2>{0.0781089813f, 0.879740059f},
std::array<float,2>{0.819858491f, 0.319998384f},
std::array<float,2>{0.297267526f, 0.143238887f},
std::array<float,2>{0.59273535f, 0.611395299f},
std::array<float,2>{0.441558659f, 0.683542311f},
std::array<float,2>{0.698699534f, 0.0961169824f},
std::array<float,2>{0.173633277f, 0.416044474f},
std::array<float,2>{0.989348292f, 0.865531266f},
std::array<float,2>{0.224012345f, 0.555109441f},
std::array<float,2>{0.910979331f, 0.223514155f},
std::array<float,2>{0.383570164f, 0.2953448f},
std::array<float,2>{0.673889399f, 0.965309083f},
std::array<float,2>{0.365689129f, 0.766872108f},
std::array<float,2>{0.503128946f, 0.486752868f},
std::array<float,2>{0.0383614898f, 0.0547310002f},
std::array<float,2>{0.811434448f, 0.720089614f},
std::array<float,2>{0.209913f, 0.948410213f},
std::array<float,2>{0.894890428f, 0.309389174f},
std::array<float,2>{0.410872966f, 0.245137081f},
std::array<float,2>{0.646642983f, 0.535399914f},
std::array<float,2>{0.32850948f, 0.740133405f},
std::array<float,2>{0.560077846f, 0.0323752463f},
std::array<float,2>{0.0235259943f, 0.483058959f},
std::array<float,2>{0.762319326f, 0.761727393f},
std::array<float,2>{0.0990549698f, 0.604572833f},
std::array<float,2>{0.86127913f, 0.127960786f},
std::array<float,2>{0.258753598f, 0.341958731f},
std::array<float,2>{0.618955135f, 0.896529019f},
std::array<float,2>{0.469497055f, 0.844672561f},
std::array<float,2>{0.727662802f, 0.42582041f},
std::array<float,2>{0.13311331f, 0.119452856f},
std::array<float,2>{0.96604085f, 0.661896706f},
std::array<float,2>{0.0489085913f, 0.791224003f},
std::array<float,2>{0.793096542f, 0.46357581f},
std::array<float,2>{0.349316031f, 0.0151770329f},
std::array<float,2>{0.525989473f, 0.707003474f},
std::array<float,2>{0.394161433f, 0.504687905f},
std::array<float,2>{0.656954229f, 0.21637693f},
std::array<float,2>{0.245115519f, 0.275658399f},
std::array<float,2>{0.923309982f, 0.996282101f},
std::array<float,2>{0.156569347f, 0.646742582f},
std::array<float,2>{0.976795614f, 0.0691091865f},
std::array<float,2>{0.453599602f, 0.387359053f},
std::array<float,2>{0.703649104f, 0.821942329f},
std::array<float,2>{0.282511771f, 0.936255038f},
std::array<float,2>{0.567183793f, 0.360440642f},
std::array<float,2>{0.0904046372f, 0.187432602f},
std::array<float,2>{0.834376872f, 0.592698097f},
std::array<float,2>{0.164879888f, 0.812338054f},
std::array<float,2>{0.973524749f, 0.447037846f},
std::array<float,2>{0.464836985f, 0.0261358581f},
std::array<float,2>{0.716546953f, 0.700433493f},
std::array<float,2>{0.289916575f, 0.522773802f},
std::array<float,2>{0.577536702f, 0.197723165f},
std::array<float,2>{0.0785796344f, 0.250561029f},
std::array<float,2>{0.840322673f, 0.968998373f},
std::array<float,2>{0.0586336367f, 0.62963438f},
std::array<float,2>{0.78709954f, 0.0855806544f},
std::array<float,2>{0.358944684f, 0.405143708f},
std::array<float,2>{0.51691699f, 0.832205415f},
std::array<float,2>{0.40315491f, 0.915632248f},
std::array<float,2>{0.671117902f, 0.358524293f},
std::array<float,2>{0.240345344f, 0.169445127f},
std::array<float,2>{0.931450903f, 0.568282187f},
std::array<float,2>{0.105495535f, 0.9633798f},
std::array<float,2>{0.872643769f, 0.291662008f},
std::array<float,2>{0.254128069f, 0.218810052f},
std::array<float,2>{0.6120013f, 0.559713364f},
std::array<float,2>{0.480921447f, 0.723564208f},
std::array<float,2>{0.720327199f, 0.0622769967f},
std::array<float,2>{0.12503241f, 0.488961488f},
std::array<float,2>{0.956307232f, 0.7718063f},
std::array<float,2>{0.214645073f, 0.616463006f},
std::array<float,2>{0.903440237f, 0.14617011f},
std::array<float,2>{0.41569224f, 0.314997166f},
std::array<float,2>{0.652966917f, 0.876482069f},
std::array<float,2>{0.341352314f, 0.861369848f},
std::array<float,2>{0.549163043f, 0.419903219f},
std::array<float,2>{0.0233754721f, 0.0986253098f},
std::array<float,2>{0.750820577f, 0.686784148f},
std::array<float,2>{0.226695105f, 0.891404688f},
std::array<float,2>{0.919707716f, 0.338125944f},
std::array<float,2>{0.375301868f, 0.129940778f},
std::array<float,2>{0.679997861f, 0.606967509f},
std::array<float,2>{0.371324122f, 0.65912801f},
std::array<float,2>{0.512857139f, 0.122118689f},
std::array<float,2>{0.0422897525f, 0.422334522f},
std::array<float,2>{0.79715395f, 0.850129843f},
std::array<float,2>{0.067623958f, 0.532896936f},
std::array<float,2>{0.824104071f, 0.249626696f},
std::array<float,2>{0.305778801f, 0.304909796f},
std::array<float,2>{0.583851457f, 0.950200975f},
std::array<float,2>{0.452537984f, 0.760585308f},
std::array<float,2>{0.690818369f, 0.477172434f},
std::array<float,2>{0.180737972f, 0.0365235247f},
std::array<float,2>{0.999772489f, 0.736875892f},
std::array<float,2>{0.0108025894f, 0.827633262f},
std::array<float,2>{0.771946847f, 0.384512752f},
std::array<float,2>{0.316128492f, 0.0635120645f},
std::array<float,2>{0.542756021f, 0.643206358f},
std::array<float,2>{0.428341389f, 0.588223934f},
std::array<float,2>{0.639604688f, 0.180634037f},
std::array<float,2>{0.193203896f, 0.366462737f},
std::array<float,2>{0.886897683f, 0.932316244f},
std::array<float,2>{0.150111601f, 0.708384871f},
std::array<float,2>{0.946467876f, 0.010533276f},
std::array<float,2>{0.493943274f, 0.467771888f},
std::array<float,2>{0.739994586f, 0.795019448f},
std::array<float,2>{0.268477917f, 0.995237887f},
std::array<float,2>{0.608776808f, 0.278268486f},
std::array<float,2>{0.123174369f, 0.214140549f},
std::array<float,2>{0.855200231f, 0.502519667f},
std::array<float,2>{0.195358321f, 0.858115792f},
std::array<float,2>{0.880679667f, 0.433078289f},
std::array<float,2>{0.436496437f, 0.11123509f},
std::array<float,2>{0.628413737f, 0.667812645f},
std::array<float,2>{0.324048907f, 0.594608545f},
std::array<float,2>{0.535690248f, 0.139827624f},
std::array<float,2>{0.00451153703f, 0.328733981f},
std::array<float,2>{0.779364407f, 0.906154513f},
std::array<float,2>{0.116309568f, 0.743589342f},
std::array<float,2>{0.848546565f, 0.0448674858f},
std::array<float,2>{0.273675621f, 0.473717839f},
std::array<float,2>{0.599917054f, 0.756722569f},
std::array<float,2>{0.490591079f, 0.943540692f},
std::array<float,2>{0.745720506f, 0.297095567f},
std::array<float,2>{0.146727324f, 0.239378363f},
std::array<float,2>{0.93818599f, 0.545778692f},
std::array<float,2>{0.0318413228f, 0.926908255f},
std::array<float,2>{0.807176054f, 0.370643735f},
std::array<float,2>{0.361304164f, 0.17535916f},
std::array<float,2>{0.507063389f, 0.585132658f},
std::array<float,2>{0.389740825f, 0.656147063f},
std::array<float,2>{0.67851299f, 0.076243192f},
std::array<float,2>{0.22166343f, 0.378009409f},
std::array<float,2>{0.906745493f, 0.816325307f},
std::array<float,2>{0.17896089f, 0.513294935f},
std::array<float,2>{0.987926543f, 0.204873443f},
std::array<float,2>{0.439346313f, 0.266065896f},
std::array<float,2>{0.702366173f, 0.986878812f},
std::array<float,2>{0.302521825f, 0.783863008f},
std::array<float,2>{0.588916957f, 0.455739111f},
std::array<float,2>{0.0735706761f, 0.00365060708f},
std::array<float,2>{0.815260649f, 0.713534057f},
std::array<float,2>{0.137657553f, 0.979426563f},
std::array<float,2>{0.963630199f, 0.261401534f},
std::array<float,2>{0.472850382f, 0.19494994f},
std::array<float,2>{0.732864678f, 0.527160645f},
std::array<float,2>{0.261861891f, 0.688647687f},
std::array<float,2>{0.622653246f, 0.0202703122f},
std::array<float,2>{0.0976530537f, 0.445276916f},
std::array<float,2>{0.863368213f, 0.799550831f},
std::array<float,2>{0.0302517284f, 0.573728263f},
std::array<float,2>{0.757926762f, 0.157642543f},
std::array<float,2>{0.332077801f, 0.35105744f},
std::array<float,2>{0.558185279f, 0.914043605f},
std::array<float,2>{0.409549356f, 0.838223934f},
std::array<float,2>{0.64170742f, 0.395437479f},
std::array<float,2>{0.205369517f, 0.0873685032f},
std::array<float,2>{0.893103242f, 0.633756578f},
std::array<float,2>{0.0878948197f, 0.780147612f},
std::array<float,2>{0.830458105f, 0.496850997f},
std::array<float,2>{0.286294013f, 0.0519168936f},
std::array<float,2>{0.56342715f, 0.730894983f},
std::array<float,2>{0.459992319f, 0.547565818f},
std::array<float,2>{0.710375726f, 0.230012268f},
std::array<float,2>{0.161221027f, 0.287659615f},
std::array<float,2>{0.981570125f, 0.95554626f},
std::array<float,2>{0.248395368f, 0.672196567f},
std::array<float,2>{0.926933587f, 0.108983159f},
std::array<float,2>{0.395077705f, 0.412956387f},
std::array<float,2>{0.662440479f, 0.874228835f},
std::array<float,2>{0.345978647f, 0.884994447f},
std::array<float,2>{0.531017125f, 0.325234205f},
std::array<float,2>{0.0522076935f, 0.153697357f},
std::array<float,2>{0.789927661f, 0.617971063f},
std::array<float,2>{0.23233667f, 0.801243901f},
std::array<float,2>{0.915117741f, 0.438722342f},
std::array<float,2>{0.379520446f, 0.0158905908f},
std::array<float,2>{0.684403121f, 0.693789423f},
std::array<float,2>{0.367473304f, 0.528247058f},
std::array<float,2>{0.509542048f, 0.187554255f},
std::array<float,2>{0.043456398f, 0.262201667f},
std::array<float,2>{0.803133368f, 0.982185423f},
std::array<float,2>{0.0627082214f, 0.639628232f},
std::array<float,2>{0.82683593f, 0.0903612077f},
std::array<float,2>{0.309899122f, 0.3935121f},
std::array<float,2>{0.579952836f, 0.84234786f},
std::array<float,2>{0.446463048f, 0.907941222f},
std::array<float,2>{0.694003522f, 0.344814122f},
std::array<float,2>{0.18470785f, 0.163732231f},
std::array<float,2>{0.99330467f, 0.577903271f},
std::array<float,2>{0.0143148322f, 0.957950354f},
std::array<float,2>{0.765666068f, 0.284997255f},
std::array<float,2>{0.3197864f, 0.231846631f},
std::array<float,2>{0.544032574f, 0.552376866f},
std::array<float,2>{0.425208509f, 0.727236569f},
std::array<float,2>{0.635838628f, 0.0479429513f},
std::array<float,2>{0.18950294f, 0.495629042f},
std::array<float,2>{0.885741889f, 0.777249992f},
std::array<float,2>{0.153735355f, 0.622869015f},
std::array<float,2>{0.949515522f, 0.150700852f},
std::array<float,2>{0.499352217f, 0.322206259f},
std::array<float,2>{0.735184968f, 0.887860179f},
std::array<float,2>{0.270231336f, 0.870943487f},
std::array<float,2>{0.604400277f, 0.408173352f},
std::array<float,2>{0.117692411f, 0.102166273f},
std::array<float,2>{0.856742203f, 0.678897321f},
std::array<float,2>{0.168601424f, 0.902110159f},
std::array<float,2>{0.971585333f, 0.333443671f},
std::array<float,2>{0.466823459f, 0.136204019f},
std::array<float,2>{0.712549984f, 0.601068258f},
std::array<float,2>{0.295439512f, 0.668680489f},
std::array<float,2>{0.572973669f, 0.115603417f},
std::array<float,2>{0.0857601911f, 0.433724552f},
std::array<float,2>{0.837506711f, 0.853641629f},
std::array<float,2>{0.0561677106f, 0.540712833f},
std::array<float,2>{0.783389747f, 0.23591198f},
std::array<float,2>{0.351746231f, 0.30449453f},
std::array<float,2>{0.523087144f, 0.941325068f},
std::array<float,2>{0.399234265f, 0.752752006f},
std::array<float,2>{0.664748728f, 0.470367163f},
std::array<float,2>{0.236301407f, 0.0411449298f},
std::array<float,2>{0.936975121f, 0.746664703f},
std::array<float,2>{0.105359577f, 0.816654205f},
std::array<float,2>{0.869443655f, 0.382732153f},
std::array<float,2>{0.25333485f, 0.073865734f},
std::array<float,2>{0.616925657f, 0.650852859f},
std::array<float,2>{0.478110164f, 0.580277741f},
std::array<float,2>{0.7262851f, 0.177576378f},
std::array<float,2>{0.131442577f, 0.371098995f},
std::array<float,2>{0.958288193f, 0.924906135f},
std::array<float,2>{0.216351733f, 0.715097368f},
std::array<float,2>{0.900121033f, 0.00433985889f},
std::array<float,2>{0.421166748f, 0.457095742f},
std::array<float,2>{0.648803532f, 0.786430359f},
std::array<float,2>{0.338026375f, 0.990239859f},
std::array<float,2>{0.55386436f, 0.272550911f},
std::array<float,2>{0.0160058215f, 0.210416764f},
std::array<float,2>{0.756624103f, 0.509293437f},
std::array<float,2>{0.134184599f, 0.846292019f},
std::array<float,2>{0.965141356f, 0.428196669f},
std::array<float,2>{0.47022596f, 0.117738426f},
std::array<float,2>{0.727500439f, 0.662192225f},
std::array<float,2>{0.259179533f, 0.601970673f},
std::array<float,2>{0.617353499f, 0.126295477f},
std::array<float,2>{0.0979861394f, 0.339879036f},
std::array<float,2>{0.859693944f, 0.895237744f},
std::array<float,2>{0.0250183959f, 0.740925133f},
std::array<float,2>{0.762911439f, 0.0347744934f},
std::array<float,2>{0.330008954f, 0.481027722f},
std::array<float,2>{0.559107721f, 0.764537334f},
std::array<float,2>{0.411254466f, 0.945493519f},
std::array<float,2>{0.648284674f, 0.310758799f},
std::array<float,2>{0.210324824f, 0.243948847f},
std::array<float,2>{0.896050632f, 0.538235068f},
std::array<float,2>{0.0914668143f, 0.935432017f},
std::array<float,2>{0.834998906f, 0.363085359f},
std::array<float,2>{0.281301647f, 0.185286462f},
std::array<float,2>{0.568059146f, 0.590177536f},
std::array<float,2>{0.454834938f, 0.644689977f},
std::array<float,2>{0.704197645f, 0.0668486729f},
std::array<float,2>{0.157773718f, 0.389975578f},
std::array<float,2>{0.977882206f, 0.823752642f},
std::array<float,2>{0.245801345f, 0.506918371f},
std::array<float,2>{0.921948552f, 0.218092889f},
std::array<float,2>{0.393051803f, 0.274198562f},
std::array<float,2>{0.657245815f, 0.998855293f},
std::array<float,2>{0.348082334f, 0.790001869f},
std::array<float,2>{0.527182996f, 0.46157372f},
std::array<float,2>{0.0501149632f, 0.0119180372f},
std::array<float,2>{0.794535518f, 0.703347623f},
std::array<float,2>{0.199734092f, 0.975948274f},
std::array<float,2>{0.877661943f, 0.254156619f},
std::array<float,2>{0.430308878f, 0.200443715f},
std::array<float,2>{0.631293774f, 0.518545151f},
std::array<float,2>{0.32595861f, 0.696505964f},
std::array<float,2>{0.532531261f, 0.0304213446f},
std::array<float,2>{0.00345627521f, 0.449877769f},
std::array<float,2>{0.777115285f, 0.807145f},
std::array<float,2>{0.113086373f, 0.56377095f},
std::array<float,2>{0.844737887f, 0.164570823f},
std::array<float,2>{0.279708534f, 0.354699492f},
std::array<float,2>{0.597363353f, 0.921717763f},
std::array<float,2>{0.484445184f, 0.830750406f},
std::array<float,2>{0.74805057f, 0.401068211f},
std::array<float,2>{0.141001597f, 0.0798057765f},
std::array<float,2>{0.941648781f, 0.625454426f},
std::array<float,2>{0.0373573713f, 0.769412875f},
std::array<float,2>{0.811803699f, 0.485339522f},
std::array<float,2>{0.367084414f, 0.0569155812f},
std::array<float,2>{0.501960158f, 0.722031891f},
std::array<float,2>{0.384650171f, 0.557860136f},
std::array<float,2>{0.675665557f, 0.226463363f},
std::array<float,2>{0.223571122f, 0.29486993f},
std::array<float,2>{0.911699295f, 0.967707217f},
std::array<float,2>{0.171976209f, 0.679791987f},
std::array<float,2>{0.989198387f, 0.0952407569f},
std::array<float,2>{0.442943484f, 0.415586025f},
std::array<float,2>{0.697995543f, 0.863814592f},
std::array<float,2>{0.297960162f, 0.881110787f},
std::array<float,2>{0.59290725f, 0.317238837f},
std::array<float,2>{0.0763185024f, 0.140744224f},
std::array<float,2>{0.818715036f, 0.609514296f},
std::array<float,2>{0.180467427f, 0.759076059f},
std::array<float,2>{0.998161554f, 0.47968322f},
std::array<float,2>{0.452119559f, 0.0385806598f},
std::array<float,2>{0.690229774f, 0.735007524f},
std::array<float,2>{0.30564028f, 0.533718228f},
std::array<float,2>{0.582608998f, 0.246819183f},
std::array<float,2>{0.0669282079f, 0.30828923f},
std::array<float,2>{0.822343171f, 0.951418936f},
std::array<float,2>{0.0419753976f, 0.656335771f},
std::array<float,2>{0.798094213f, 0.123373814f},
std::array<float,2>{0.372110873f, 0.424900323f},
std::array<float,2>{0.512629509f, 0.847956657f},
std::array<float,2>{0.376135439f, 0.893802166f},
std::array<float,2>{0.68070662f, 0.337030113f},
std::array<float,2>{0.227601588f, 0.131313533f},
std::array<float,2>{0.91800642f, 0.608942568f},
std::array<float,2>{0.124539137f, 0.993371248f},
std::array<float,2>{0.853871644f, 0.280626655f},
std::array<float,2>{0.268605798f, 0.211060837f},
std::array<float,2>{0.608301699f, 0.501471817f},
std::array<float,2>{0.492659152f, 0.71035558f},
std::array<float,2>{0.738996208f, 0.00846207887f},
std::array<float,2>{0.148643091f, 0.465146452f},
std::array<float,2>{0.945423126f, 0.794364333f},
std::array<float,2>{0.191947475f, 0.58770299f},
std::array<float,2>{0.888017893f, 0.18217738f},
std::array<float,2>{0.428974628f, 0.364100516f},
std::array<float,2>{0.640318632f, 0.930448055f},
std::array<float,2>{0.314467818f, 0.825581551f},
std::array<float,2>{0.541127205f, 0.384961367f},
std::array<float,2>{0.0102295922f, 0.0654952526f},
std::array<float,2>{0.772969902f, 0.641920805f},
std::array<float,2>{0.241429001f, 0.916240036f},
std::array<float,2>{0.930104434f, 0.357387424f},
std::array<float,2>{0.404115111f, 0.170296207f},
std::array<float,2>{0.670697033f, 0.568393528f},
std::array<float,2>{0.357512385f, 0.631979644f},
std::array<float,2>{0.516313791f, 0.082178846f},
std::array<float,2>{0.0596861951f, 0.404105812f},
std::array<float,2>{0.785350502f, 0.835051f},
std::array<float,2>{0.0796381235f, 0.519767582f},
std::array<float,2>{0.841788352f, 0.196915433f},
std::array<float,2>{0.290862262f, 0.253662586f},
std::array<float,2>{0.576366782f, 0.972631752f},
std::array<float,2>{0.463344425f, 0.810099125f},
std::array<float,2>{0.715383291f, 0.448042631f},
std::array<float,2>{0.165916875f, 0.0250745229f},
std::array<float,2>{0.974094987f, 0.701884449f},
std::array<float,2>{0.0223884024f, 0.860445917f},
std::array<float,2>{0.75119102f, 0.420175672f},
std::array<float,2>{0.339999229f, 0.0998238847f},
std::array<float,2>{0.550050735f, 0.685417354f},
std::array<float,2>{0.414817154f, 0.613944411f},
std::array<float,2>{0.654140532f, 0.148294896f},
std::array<float,2>{0.21324648f, 0.313058823f},
std::array<float,2>{0.903069854f, 0.877218783f},
std::array<float,2>{0.1262234f, 0.726389349f},
std::array<float,2>{0.956027806f, 0.0605329052f},
std::array<float,2>{0.482282877f, 0.491536915f},
std::array<float,2>{0.719524562f, 0.770224094f},
std::array<float,2>{0.255815268f, 0.962534428f},
std::array<float,2>{0.612471581f, 0.289496124f},
std::array<float,2>{0.107187666f, 0.222388908f},
std::array<float,2>{0.871123254f, 0.56224227f},
std::array<float,2>{0.206836984f, 0.836603165f},
std::array<float,2>{0.894101918f, 0.397853166f},
std::array<float,2>{0.40870446f, 0.0893680081f},
std::array<float,2>{0.64123857f, 0.634975314f},
std::array<float,2>{0.333971858f, 0.571533144f},
std::array<float,2>{0.557413995f, 0.159625754f},
std::array<float,2>{0.0310011115f, 0.349369556f},
std::array<float,2>{0.758892715f, 0.911841512f},
std::array<float,2>{0.0961768404f, 0.690143645f},
std::array<float,2>{0.864458203f, 0.0230678171f},
std::array<float,2>{0.263319969f, 0.441767156f},
std::array<float,2>{0.621943593f, 0.797284007f},
std::array<float,2>{0.474548757f, 0.976763964f},
std::array<float,2>{0.733529985f, 0.257832795f},
std::array<float,2>{0.138580784f, 0.192104727f},
std::array<float,2>{0.964674294f, 0.524062872f},
std::array<float,2>{0.0516683049f, 0.88371855f},
std::array<float,2>{0.790265203f, 0.327378213f},
std::array<float,2>{0.346860677f, 0.155971363f},
std::array<float,2>{0.530141413f, 0.620561779f},
std::array<float,2>{0.395779699f, 0.674003422f},
std::array<float,2>{0.663514197f, 0.105766781f},
std::array<float,2>{0.249846116f, 0.410975635f},
std::array<float,2>{0.926274419f, 0.872598231f},
std::array<float,2>{0.160991535f, 0.549381077f},
std::array<float,2>{0.98091346f, 0.227251157f},
std::array<float,2>{0.459887296f, 0.286639392f},
std::array<float,2>{0.708987176f, 0.953486264f},
std::array<float,2>{0.286094487f, 0.778091848f},
std::array<float,2>{0.564098597f, 0.498711437f},
std::array<float,2>{0.0893905759f, 0.0532074496f},
std::array<float,2>{0.831168473f, 0.734242618f},
std::array<float,2>{0.147744462f, 0.941460729f},
std::array<float,2>{0.939071774f, 0.299584985f},
std::array<float,2>{0.491232842f, 0.240901306f},
std::array<float,2>{0.744258285f, 0.543691576f},
std::array<float,2>{0.274476737f, 0.745246828f},
std::array<float,2>{0.601036549f, 0.0455419309f},
std::array<float,2>{0.115524031f, 0.475506186f},
std::array<float,2>{0.849138677f, 0.755599499f},
std::array<float,2>{0.00531673338f, 0.596653938f},
std::array<float,2>{0.780353785f, 0.138344571f},
std::array<float,2>{0.322630763f, 0.330136567f},
std::array<float,2>{0.536405563f, 0.902561545f},
std::array<float,2>{0.437389046f, 0.855737925f},
std::array<float,2>{0.627164125f, 0.431218535f},
std::array<float,2>{0.197090313f, 0.111891404f},
std::array<float,2>{0.879145861f, 0.664680958f},
std::array<float,2>{0.0725719929f, 0.783131242f},
std::array<float,2>{0.8155424f, 0.453418106f},
std::array<float,2>{0.301414549f, 0.00171893183f},
std::array<float,2>{0.588534057f, 0.711771727f},
std::array<float,2>{0.438383996f, 0.515249133f},
std::array<float,2>{0.701875389f, 0.206387028f},
std::array<float,2>{0.178426236f, 0.268337905f},
std::array<float,2>{0.987213552f, 0.984660268f},
std::array<float,2>{0.222260594f, 0.653570175f},
std::array<float,2>{0.907571673f, 0.0749733374f},
std::array<float,2>{0.388939172f, 0.376575768f},
std::array<float,2>{0.679676175f, 0.812602758f},
std::array<float,2>{0.360035688f, 0.929391026f},
std::array<float,2>{0.506799459f, 0.36749807f},
std::array<float,2>{0.0326586962f, 0.172004774f},
std::array<float,2>{0.807810605f, 0.582750142f},
std::array<float,2>{0.187756017f, 0.775085092f},
std::array<float,2>{0.883660972f, 0.493019462f},
std::array<float,2>{0.423430651f, 0.050351128f},
std::array<float,2>{0.632812798f, 0.730339766f},
std::array<float,2>{0.317110151f, 0.55304563f},
std::array<float,2>{0.545434833f, 0.233392656f},
std::array<float,2>{0.0136191212f, 0.282776326f},
std::array<float,2>{0.769136786f, 0.960243046f},
std::array<float,2>{0.119936801f, 0.677326977f},
std::array<float,2>{0.858160138f, 0.104275741f},
std::array<float,2>{0.273298502f, 0.409192741f},
std::array<float,2>{0.603263617f, 0.867887795f},
std::array<float,2>{0.496416152f, 0.890092909f},
std::array<float,2>{0.737884879f, 0.323071092f},
std::array<float,2>{0.154435337f, 0.149701566f},
std::array<float,2>{0.95134747f, 0.623264849f},
std::array<float,2>{0.0449969508f, 0.982820749f},
std::array<float,2>{0.801252961f, 0.264154762f},
std::array<float,2>{0.369704694f, 0.190391719f},
std::array<float,2>{0.509817123f, 0.529907703f},
std::array<float,2>{0.380943626f, 0.693028092f},
std::array<float,2>{0.687479019f, 0.0184407309f},
std::array<float,2>{0.233867735f, 0.441173345f},
std::array<float,2>{0.916684985f, 0.804258525f},
std::array<float,2>{0.187397599f, 0.574657559f},
std::array<float,2>{0.995101929f, 0.161781326f},
std::array<float,2>{0.44885236f, 0.345903099f},
std::array<float,2>{0.691515148f, 0.909159243f},
std::array<float,2>{0.311681896f, 0.839876056f},
std::array<float,2>{0.580975413f, 0.390798897f},
std::array<float,2>{0.0645264313f, 0.0928096399f},
std::array<float,2>{0.824698985f, 0.637119532f},
std::array<float,2>{0.129063264f, 0.92345649f},
std::array<float,2>{0.960849345f, 0.374097884f},
std::array<float,2>{0.479886115f, 0.179398492f},
std::array<float,2>{0.723813295f, 0.579779565f},
std::array<float,2>{0.250037283f, 0.649346173f},
std::array<float,2>{0.614505231f, 0.0716425553f},
std::array<float,2>{0.102247804f, 0.380668789f},
std::array<float,2>{0.867652535f, 0.819805086f},
std::array<float,2>{0.0185239185f, 0.509833097f},
std::array<float,2>{0.754538834f, 0.207519412f},
std::array<float,2>{0.336018026f, 0.271118104f},
std::array<float,2>{0.550792575f, 0.989611089f},
std::array<float,2>{0.418616146f, 0.787782907f},
std::array<float,2>{0.651088774f, 0.460289478f},
std::array<float,2>{0.217156917f, 0.00721885404f},
std::array<float,2>{0.901588261f, 0.717712164f},
std::array<float,2>{0.0826683193f, 0.853119493f},
std::array<float,2>{0.838364065f, 0.436412007f},
std::array<float,2>{0.29309535f, 0.114703052f},
std::array<float,2>{0.571420789f, 0.670762777f},
std::array<float,2>{0.466568112f, 0.598472118f},
std::array<float,2>{0.714607775f, 0.134101599f},
std::array<float,2>{0.171711877f, 0.335232437f},
std::array<float,2>{0.969849885f, 0.898718357f},
std::array<float,2>{0.236944556f, 0.748837829f},
std::array<float,2>{0.935197949f, 0.0398418941f},
std::array<float,2>{0.401146382f, 0.471991122f},
std::array<float,2>{0.666342974f, 0.750241399f},
std::array<float,2>{0.353824615f, 0.939228475f},
std::array<float,2>{0.520117819f, 0.302023649f},
std::array<float,2>{0.0567914695f, 0.237642691f},
std::array<float,2>{0.783038497f, 0.541258872f},
std::array<float,2>{0.158994943f, 0.82099539f},
std::array<float,2>{0.979100287f, 0.388633162f},
std::array<float,2>{0.456850797f, 0.0700179935f},
std::array<float,2>{0.70656836f, 0.647471428f},
std::array<float,2>{0.284144819f, 0.593512058f},
std::array<float,2>{0.56965071f, 0.185957119f},
std::array<float,2>{0.0922963023f, 0.360321701f},
std::array<float,2>{0.833494604f, 0.936560392f},
std::array<float,2>{0.0487395525f, 0.705243111f},
std::array<float,2>{0.795898974f, 0.0138926972f},
std::array<float,2>{0.350218564f, 0.464602202f},
std::array<float,2>{0.524747133f, 0.792774379f},
std::array<float,2>{0.39177835f, 0.99769634f},
std::array<float,2>{0.659667194f, 0.276614785f},
std::array<float,2>{0.242258102f, 0.215282023f},
std::array<float,2>{0.924574792f, 0.505599856f},
std::array<float,2>{0.100214116f, 0.897584796f},
std::array<float,2>{0.862066686f, 0.342833161f},
std::array<float,2>{0.260049582f, 0.127367899f},
std::array<float,2>{0.620194495f, 0.604367435f},
std::array<float,2>{0.471958935f, 0.660609365f},
std::array<float,2>{0.729823828f, 0.120598644f},
std::array<float,2>{0.136622995f, 0.426809996f},
std::array<float,2>{0.967526376f, 0.84557426f},
std::array<float,2>{0.208519146f, 0.536487758f},
std::array<float,2>{0.897124469f, 0.244215578f},
std::array<float,2>{0.413982153f, 0.310088217f},
std::array<float,2>{0.646144867f, 0.948078573f},
std::array<float,2>{0.331186175f, 0.763644814f},
std::array<float,2>{0.562195778f, 0.483970016f},
std::array<float,2>{0.0269142445f, 0.0316966251f},
std::array<float,2>{0.764056444f, 0.73848784f},
std::array<float,2>{0.226354867f, 0.966584444f},
std::array<float,2>{0.913680315f, 0.296410054f},
std::array<float,2>{0.385331035f, 0.224276751f},
std::array<float,2>{0.672564149f, 0.556008101f},
std::array<float,2>{0.364749581f, 0.71925211f},
std::array<float,2>{0.50172627f, 0.0565312468f},
std::array<float,2>{0.0369561799f, 0.488197744f},
std::array<float,2>{0.809661567f, 0.765997231f},
std::array<float,2>{0.0755228251f, 0.613092721f},
std::array<float,2>{0.81809485f, 0.144180387f},
std::array<float,2>{0.300163388f, 0.318393767f},
std::array<float,2>{0.589959919f, 0.880032301f},
std::array<float,2>{0.443667442f, 0.866606772f},
std::array<float,2>{0.696626425f, 0.417728871f},
std::array<float,2>{0.173952058f, 0.0970933288f},
std::array<float,2>{0.990362585f, 0.681909084f},
std::array<float,2>{0.000119961136f, 0.806406558f},
std::array<float,2>{0.775136411f, 0.451868773f},
std::array<float,2>{0.328067511f, 0.028195139f},
std::array<float,2>{0.533643603f, 0.697888911f},
std::array<float,2>{0.433056921f, 0.517277181f},
std::array<float,2>{0.630671799f, 0.20223175f},
std::array<float,2>{0.202372268f, 0.25647077f},
std::array<float,2>{0.875130177f, 0.973255515f},
std::array<float,2>{0.144394115f, 0.62706089f},
std::array<float,2>{0.943459213f, 0.0800983757f},
std::array<float,2>{0.486830115f, 0.399093926f},
std::array<float,2>{0.747284472f, 0.82832849f},
std::array<float,2>{0.278929949f, 0.918453336f},
std::array<float,2>{0.594547391f, 0.35181123f},
std::array<float,2>{0.109843493f, 0.166838437f},
std::array<float,2>{0.84616673f, 0.56540519f},
std::array<float,2>{0.151008621f, 0.796348333f},
std::array<float,2>{0.947673798f, 0.467784107f},
std::array<float,2>{0.494215995f, 0.0113184685f},
std::array<float,2>{0.741514325f, 0.70790118f},
std::array<float,2>{0.265769958f, 0.50328517f},
std::array<float,2>{0.606965482f, 0.213817254f},
std::array<float,2>{0.121234827f, 0.279260814f},
std::array<float,2>{0.853054643f, 0.994752944f},
std::array<float,2>{0.00971466582f, 0.643995821f},
std::array<float,2>{0.769950509f, 0.0633269772f},
std::array<float,2>{0.313381195f, 0.383012563f},
std::array<float,2>{0.539066911f, 0.826812744f},
std::array<float,2>{0.425787687f, 0.933417737f},
std::array<float,2>{0.637045026f, 0.365991473f},
std::array<float,2>{0.194194362f, 0.180897519f},
std::array<float,2>{0.888955712f, 0.589077652f},
std::array<float,2>{0.0689213201f, 0.949430764f},
std::array<float,2>{0.82125479f, 0.306499422f},
std::array<float,2>{0.307272345f, 0.248053044f},
std::array<float,2>{0.584934235f, 0.531504333f},
std::array<float,2>{0.449740916f, 0.738105953f},
std::array<float,2>{0.688378632f, 0.0360980369f},
std::array<float,2>{0.183515921f, 0.478196949f},
std::array<float,2>{0.996592283f, 0.761073709f},
std::array<float,2>{0.228632659f, 0.606323719f},
std::array<float,2>{0.921117961f, 0.129876122f},
std::array<float,2>{0.37703678f, 0.339112699f},
std::array<float,2>{0.68232137f, 0.892510712f},
std::array<float,2>{0.373773396f, 0.851107895f},
std::array<float,2>{0.514530838f, 0.423558772f},
std::array<float,2>{0.0397770405f, 0.121345401f},
std::array<float,2>{0.798965037f, 0.659440935f},
std::array<float,2>{0.212573469f, 0.875793695f},
std::array<float,2>{0.905712247f, 0.315863222f},
std::array<float,2>{0.416531831f, 0.144672066f},
std::array<float,2>{0.655121028f, 0.615451872f},
std::array<float,2>{0.34322086f, 0.685628772f},
std::array<float,2>{0.547670305f, 0.0993725136f},
std::array<float,2>{0.0196310934f, 0.418128073f},
std::array<float,2>{0.752917588f, 0.862766147f},
std::array<float,2>{0.108268261f, 0.559289455f},
std::array<float,2>{0.873795033f, 0.220269978f},
std::array<float,2>{0.25682658f, 0.292663664f},
std::array<float,2>{0.61104095f, 0.964230418f},
std::array<float,2>{0.483120739f, 0.773287475f},
std::array<float,2>{0.722221673f, 0.489831775f},
std::array<float,2>{0.128000021f, 0.060638763f},
std::array<float,2>{0.953785956f, 0.724146307f},
std::array<float,2>{0.0612729304f, 0.833626091f},
std::array<float,2>{0.787231624f, 0.406198621f},
std::array<float,2>{0.355855107f, 0.0840633288f},
std::array<float,2>{0.517721891f, 0.630659163f},
std::array<float,2>{0.405002832f, 0.567234695f},
std::array<float,2>{0.668823838f, 0.167979747f},
std::array<float,2>{0.239890531f, 0.358015031f},
std::array<float,2>{0.932470024f, 0.914618015f},
std::array<float,2>{0.166015729f, 0.699222147f},
std::array<float,2>{0.975974739f, 0.0266500823f},
std::array<float,2>{0.461319238f, 0.445637405f},
std::array<float,2>{0.717069626f, 0.81074971f},
std::array<float,2>{0.292812496f, 0.969961524f},
std::array<float,2>{0.574557781f, 0.25101307f},
std::array<float,2>{0.0804026276f, 0.198535115f},
std::array<float,2>{0.842132092f, 0.521530092f},
std::array<float,2>{0.247524723f, 0.873877048f},
std::array<float,2>{0.929420471f, 0.413864225f},
std::array<float,2>{0.396981418f, 0.107931986f},
std::array<float,2>{0.661090016f, 0.672893167f},
std::array<float,2>{0.34449634f, 0.618605196f},
std::array<float,2>{0.529078662f, 0.153235808f},
std::array<float,2>{0.0545826629f, 0.324695915f},
std::array<float,2>{0.792563617f, 0.885748923f},
std::array<float,2>{0.0871651471f, 0.731489599f},
std::array<float,2>{0.829030991f, 0.0509520806f},
std::array<float,2>{0.288240254f, 0.497308105f},
std::array<float,2>{0.565713584f, 0.78116256f},
std::array<float,2>{0.458819062f, 0.956662834f},
std::array<float,2>{0.708193183f, 0.288710296f},
std::array<float,2>{0.162120357f, 0.229065463f},
std::array<float,2>{0.983771682f, 0.54851073f},
std::array<float,2>{0.0278251525f, 0.912898302f},
std::array<float,2>{0.761021733f, 0.349633336f},
std::array<float,2>{0.334769368f, 0.157069564f},
std::array<float,2>{0.554774404f, 0.573083818f},
std::array<float,2>{0.408073246f, 0.634348452f},
std::array<float,2>{0.642723501f, 0.0865033716f},
std::array<float,2>{0.204805836f, 0.396301597f},
std::array<float,2>{0.891214192f, 0.839434266f},
std::array<float,2>{0.140007377f, 0.525615156f},
std::array<float,2>{0.961031139f, 0.193501294f},
std::array<float,2>{0.474629998f, 0.260734499f},
std::array<float,2>{0.73157078f, 0.980206788f},
std::array<float,2>{0.264243066f, 0.80078119f},
std::array<float,2>{0.624276519f, 0.444326788f},
std::array<float,2>{0.0942670181f, 0.0211116709f},
std::array<float,2>{0.866323888f, 0.688053906f},
std::array<float,2>{0.177188635f, 0.98762399f},
std::array<float,2>{0.984624505f, 0.266998887f},
std::array<float,2>{0.43973434f, 0.203994662f},
std::array<float,2>{0.700829029f, 0.511908472f},
std::array<float,2>{0.304188102f, 0.714036167f},
std::array<float,2>{0.586633801f, 0.00244760537f},
std::array<float,2>{0.0712448582f, 0.45702675f},
std::array<float,2>{0.812878191f, 0.78444761f},
std::array<float,2>{0.0339648202f, 0.584429502f},
std::array<float,2>{0.804973543f, 0.173902526f},
std::array<float,2>{0.361871719f, 0.370012373f},
std::array<float,2>{0.504545331f, 0.926701486f},
std::array<float,2>{0.388620585f, 0.814841151f},
std::array<float,2>{0.677714109f, 0.377261609f},
std::array<float,2>{0.220231369f, 0.0778067037f},
std::array<float,2>{0.908785701f, 0.654679835f},
std::array<float,2>{0.11433576f, 0.756972075f},
std::array<float,2>{0.85100472f, 0.472658306f},
std::array<float,2>{0.275925994f, 0.0438815653f},
std::array<float,2>{0.598937869f, 0.743133008f},
std::array<float,2>{0.489174396f, 0.546672642f},
std::array<float,2>{0.74367249f, 0.238781288f},
std::array<float,2>{0.144934252f, 0.298198074f},
std::array<float,2>{0.941171288f, 0.945215285f},
std::array<float,2>{0.197373897f, 0.666737139f},
std::array<float,2>{0.882230043f, 0.110171869f},
std::array<float,2>{0.434105814f, 0.432346404f},
std::array<float,2>{0.625558019f, 0.85882324f},
std::array<float,2>{0.322007805f, 0.904994488f},
std::array<float,2>{0.537917137f, 0.329365641f},
std::array<float,2>{0.00703278882f, 0.139429241f},
std::array<float,2>{0.779097557f, 0.595123172f},
std::array<float,2>{0.202679485f, 0.806861341f},
std::array<float,2>{0.875575721f, 0.449466407f},
std::array<float,2>{0.433226854f, 0.0312012881f},
std::array<float,2>{0.630122662f, 0.697021186f},
std::array<float,2>{0.32732299f, 0.517986834f},
std::array<float,2>{0.534029603f, 0.200718239f},
std::array<float,2>{0.00059757242f, 0.254833013f},
std::array<float,2>{0.774675846f, 0.976445794f},
std::array<float,2>{0.110128291f, 0.62583077f},
std::array<float,2>{0.84639889f, 0.0791409239f},
std::array<float,2>{0.278453708f, 0.400495231f},
std::array<float,2>{0.594230056f, 0.830402553f},
std::array<float,2>{0.48676157f, 0.921289504f},
std::array<float,2>{0.747830033f, 0.355301231f},
std::array<float,2>{0.143883213f, 0.164263055f},
std::array<float,2>{0.944173813f, 0.564043939f},
std::array<float,2>{0.0363175981f, 0.967068195f},
std::array<float,2>{0.810343981f, 0.294283599f},
std::array<float,2>{0.364304453f, 0.225658685f},
std::array<float,2>{0.500987232f, 0.558313191f},
std::array<float,2>{0.385048568f, 0.722194731f},
std::array<float,2>{0.671976507f, 0.0575258397f},
std::array<float,2>{0.226052746f, 0.48481828f},
std::array<float,2>{0.913511634f, 0.768950164f},
std::array<float,2>{0.174632713f, 0.610239565f},
std::array<float,2>{0.990804195f, 0.141407058f},
std::array<float,2>{0.444306821f, 0.316408515f},
std::array<float,2>{0.697093308f, 0.881577134f},
std::array<float,2>{0.300608993f, 0.863687396f},
std::array<float,2>{0.590347528f, 0.415127248f},
std::array<float,2>{0.0760277659f, 0.0952063799f},
std::array<float,2>{0.817449212f, 0.680187762f},
std::array<float,2>{0.135970011f, 0.895003796f},
std::array<float,2>{0.967240036f, 0.340363204f},
std::array<float,2>{0.472293556f, 0.126656219f},
std::array<float,2>{0.73028338f, 0.602082372f},
std::array<float,2>{0.2604056f, 0.662709355f},
std::array<float,2>{0.620745122f, 0.117587127f},
std::array<float,2>{0.099981159f, 0.428537339f},
std::array<float,2>{0.861577153f, 0.846052229f},
std::array<float,2>{0.0264928844f, 0.538823545f},
std::array<float,2>{0.764186025f, 0.243474647f},
std::array<float,2>{0.331942528f, 0.311207145f},
std::array<float,2>{0.561805069f, 0.945891798f},
std::array<float,2>{0.41328913f, 0.763688147f},
std::array<float,2>{0.645643294f, 0.48052451f},
std::array<float,2>{0.208277777f, 0.0342755504f},
std::array<float,2>{0.896630883f, 0.740355849f},
std::array<float,2>{0.0921689123f, 0.823713422f},
std::array<float,2>{0.833705783f, 0.39032349f},
std::array<float,2>{0.283361793f, 0.0673080608f},
std::array<float,2>{0.569911778f, 0.645290256f},
std::array<float,2>{0.45640713f, 0.590383708f},
std::array<float,2>{0.706145942f, 0.1849408f},
std::array<float,2>{0.158468083f, 0.362377882f},
std::array<float,2>{0.97887671f, 0.93457371f},
std::array<float,2>{0.24268809f, 0.703742564f},
std::array<float,2>{0.924195707f, 0.0122880181f},
std::array<float,2>{0.39236325f, 0.461187869f},
std::array<float,2>{0.66013509f, 0.789491117f},
std::array<float,2>{0.350052088f, 0.998138905f},
std::array<float,2>{0.525076389f, 0.273769319f},
std::array<float,2>{0.0482068583f, 0.218654737f},
std::array<float,2>{0.796467245f, 0.507498682f},
std::array<float,2>{0.170960754f, 0.854004145f},
std::array<float,2>{0.970469534f, 0.434161454f},
std::array<float,2>{0.465973139f, 0.115969434f},
std::array<float,2>{0.713913083f, 0.667972624f},
std::array<float,2>{0.293654561f, 0.601514816f},
std::array<float,2>{0.57203877f, 0.136407986f},
std::array<float,2>{0.0820500404f, 0.333749294f},
std::array<float,2>{0.838531554f, 0.901541352f},
std::array<float,2>{0.057464689f, 0.746515334f},
std::array<float,2>{0.782395124f, 0.041900035f},
std::array<float,2>{0.354303628f, 0.469731271f},
std::array<float,2>{0.519890249f, 0.752069056f},
std::array<float,2>{0.400638849f, 0.940679491f},
std::array<float,2>{0.666670501f, 0.303990573f},
std::array<float,2>{0.236602917f, 0.235679165f},
std::array<float,2>{0.934594631f, 0.540303826f},
std::array<float,2>{0.101731338f, 0.925614238f},
std::array<float,2>{0.86792922f, 0.371708542f},
std::array<float,2>{0.250547677f, 0.176843017f},
std::array<float,2>{0.614974856f, 0.580993354f},
std::array<float,2>{0.480043203f, 0.651322842f},
std::array<float,2>{0.724281967f, 0.0733602718f},
std::array<float,2>{0.129871652f, 0.381995469f},
std::array<float,2>{0.960114717f, 0.81720072f},
std::array<float,2>{0.217538953f, 0.508848011f},
std::array<float,2>{0.902227938f, 0.210696578f},
std::array<float,2>{0.418240458f, 0.273422599f},
std::array<float,2>{0.650618911f, 0.990935206f},
std::array<float,2>{0.33676064f, 0.786747098f},
std::array<float,2>{0.551556587f, 0.457792908f},
std::array<float,2>{0.0178881139f, 0.0048177084f},
std::array<float,2>{0.754289627f, 0.715735674f},
std::array<float,2>{0.234060392f, 0.981502414f},
std::array<float,2>{0.916052043f, 0.262507021f},
std::array<float,2>{0.381646395f, 0.188194796f},
std::array<float,2>{0.686662197f, 0.527542114f},
std::array<float,2>{0.369415581f, 0.693995416f},
std::array<float,2>{0.510529637f, 0.016356796f},
std::array<float,2>{0.0457143299f, 0.438979328f},
std::array<float,2>{0.801491439f, 0.801740408f},
std::array<float,2>{0.0650583431f, 0.577275515f},
std::array<float,2>{0.824779034f, 0.163488209f},
std::array<float,2>{0.312124699f, 0.345696121f},
std::array<float,2>{0.580345452f, 0.907664061f},
std::array<float,2>{0.448564053f, 0.842284024f},
std::array<float,2>{0.692368925f, 0.39261815f},
std::array<float,2>{0.186878577f, 0.0898581892f},
std::array<float,2>{0.994320929f, 0.638876975f},
std::array<float,2>{0.0128196673f, 0.776757777f},
std::array<float,2>{0.768740237f, 0.495517731f},
std::array<float,2>{0.316873491f, 0.0487690978f},
std::array<float,2>{0.545250237f, 0.726661503f},
std::array<float,2>{0.423032463f, 0.551962554f},
std::array<float,2>{0.633410215f, 0.232170656f},
std::array<float,2>{0.188114703f, 0.284243077f},
std::array<float,2>{0.882984579f, 0.957076609f},
std::array<float,2>{0.155156672f, 0.679272294f},
std::array<float,2>{0.952054501f, 0.102027178f},
std::array<float,2>{0.496799469f, 0.407342017f},
std::array<float,2>{0.73763448f, 0.870379627f},
std::array<float,2>{0.272712439f, 0.888561189f},
std::array<float,2>{0.602837563f, 0.321644187f},
std::array<float,2>{0.119197555f, 0.151040077f},
std::array<float,2>{0.857610703f, 0.622162819f},
std::array<float,2>{0.145066276f, 0.755320311f},
std::array<float,2>{0.940790653f, 0.474879563f},
std::array<float,2>{0.488450557f, 0.0449333787f},
std::array<float,2>{0.743245125f, 0.745856762f},
std::array<float,2>{0.275665015f, 0.543109655f},
std::array<float,2>{0.599547505f, 0.240445957f},
std::array<float,2>{0.115092829f, 0.299009055f},
std::array<float,2>{0.851423204f, 0.942106187f},
std::array<float,2>{0.00774603197f, 0.664142966f},
std::array<float,2>{0.778641403f, 0.111609511f},
std::array<float,2>{0.321504474f, 0.430919766f},
std::array<float,2>{0.537555635f, 0.856293261f},
std::array<float,2>{0.433969855f, 0.903129101f},
std::array<float,2>{0.625137985f, 0.330700904f},
std::array<float,2>{0.197779477f, 0.138105735f},
std::array<float,2>{0.882699847f, 0.595793188f},
std::array<float,2>{0.0706957206f, 0.985031664f},
std::array<float,2>{0.813221812f, 0.26782468f},
std::array<float,2>{0.304222912f, 0.206950322f},
std::array<float,2>{0.586127877f, 0.515117347f},
std::array<float,2>{0.440307409f, 0.711167991f},
std::array<float,2>{0.700451016f, 0.00135771954f},
std::array<float,2>{0.177694991f, 0.454097509f},
std::array<float,2>{0.985258698f, 0.782241821f},
std::array<float,2>{0.219847828f, 0.582316458f},
std::array<float,2>{0.908469319f, 0.172495127f},
std::array<float,2>{0.388154685f, 0.36787796f},
std::array<float,2>{0.677145362f, 0.928923965f},
std::array<float,2>{0.361430317f, 0.813153088f},
std::array<float,2>{0.504368305f, 0.376421481f},
std::array<float,2>{0.0332960486f, 0.0746149123f},
std::array<float,2>{0.805345058f, 0.654124975f},
std::array<float,2>{0.204392344f, 0.911150873f},
std::array<float,2>{0.890633523f, 0.348641962f},
std::array<float,2>{0.407382667f, 0.159679428f},
std::array<float,2>{0.643383622f, 0.57219249f},
std::array<float,2>{0.334420055f, 0.635273397f},
std::array<float,2>{0.555570722f, 0.0890640318f},
std::array<float,2>{0.0280196518f, 0.397951156f},
std::array<float,2>{0.761292398f, 0.836000979f},
std::array<float,2>{0.0941400602f, 0.523861349f},
std::array<float,2>{0.866928339f, 0.191753119f},
std::array<float,2>{0.264118165f, 0.258416712f},
std::array<float,2>{0.624790251f, 0.977210641f},
std::array<float,2>{0.47525847f, 0.797384918f},
std::array<float,2>{0.732306004f, 0.442364007f},
std::array<float,2>{0.140567571f, 0.0226317458f},
std::array<float,2>{0.961627662f, 0.689462364f},
std::array<float,2>{0.0541102104f, 0.872129083f},
std::array<float,2>{0.792051077f, 0.410269797f},
std::array<float,2>{0.344006717f, 0.106424965f},
std::array<float,2>{0.528653979f, 0.674503684f},
std::array<float,2>{0.396677643f, 0.621069372f},
std::array<float,2>{0.660478234f, 0.155708402f},
std::array<float,2>{0.247838363f, 0.327873409f},
std::array<float,2>{0.928921938f, 0.882918894f},
std::array<float,2>{0.162852839f, 0.733488262f},
std::array<float,2>{0.984055817f, 0.0534229316f},
std::array<float,2>{0.458384782f, 0.498519123f},
std::array<float,2>{0.708850563f, 0.777723789f},
std::array<float,2>{0.288873523f, 0.953657389f},
std::array<float,2>{0.566405714f, 0.286327899f},
std::array<float,2>{0.0874621645f, 0.22663337f},
std::array<float,2>{0.828359425f, 0.549036443f},
std::array<float,2>{0.239522517f, 0.835849762f},
std::array<float,2>{0.931795955f, 0.403694063f},
std::array<float,2>{0.404656172f, 0.0829691738f},
std::array<float,2>{0.668250561f, 0.632707477f},
std::array<float,2>{0.356171936f, 0.568878055f},
std::array<float,2>{0.518286407f, 0.170584083f},
std::array<float,2>{0.0609156303f, 0.356642157f},
std::array<float,2>{0.787905455f, 0.916646302f},
std::array<float,2>{0.0807189494f, 0.701388955f},
std::array<float,2>{0.842459381f, 0.0247801095f},
std::array<float,2>{0.292287856f, 0.447559953f},
std::array<float,2>{0.575037777f, 0.809929967f},
std::array<float,2>{0.461484581f, 0.971924126f},
std::array<float,2>{0.71774435f, 0.252963632f},
std::array<float,2>{0.166587025f, 0.196371675f},
std::array<float,2>{0.976262093f, 0.520110548f},
std::array<float,2>{0.020229714f, 0.877540708f},
std::array<float,2>{0.752291441f, 0.312975943f},
std::array<float,2>{0.343454421f, 0.147874445f},
std::array<float,2>{0.547245026f, 0.613651693f},
std::array<float,2>{0.416153669f, 0.685004056f},
std::array<float,2>{0.654724002f, 0.100140132f},
std::array<float,2>{0.211920246f, 0.420832515f},
std::array<float,2>{0.906162024f, 0.861273408f},
std::array<float,2>{0.128878653f, 0.561799765f},
std::array<float,2>{0.95328778f, 0.221778378f},
std::array<float,2>{0.482552856f, 0.29001087f},
std::array<float,2>{0.721908987f, 0.962167442f},
std::array<float,2>{0.255968302f, 0.769597411f},
std::array<float,2>{0.610391378f, 0.492177069f},
std::array<float,2>{0.107475057f, 0.0599753745f},
std::array<float,2>{0.87348032f, 0.725892723f},
std::array<float,2>{0.182735935f, 0.951959133f},
std::array<float,2>{0.996578991f, 0.307730526f},
std::array<float,2>{0.449228227f, 0.24616982f},
std::array<float,2>{0.687557518f, 0.533631384f},
std::array<float,2>{0.306703418f, 0.734487712f},
std::array<float,2>{0.58441335f, 0.0381217152f},
std::array<float,2>{0.0687801465f, 0.480084777f},
std::array<float,2>{0.820459127f, 0.759450793f},
std::array<float,2>{0.0394242816f, 0.608513832f},
std::array<float,2>{0.79974407f, 0.131470785f},
std::array<float,2>{0.373463541f, 0.337890178f},
std::array<float,2>{0.513842225f, 0.894093037f},
std::array<float,2>{0.377806813f, 0.848305285f},
std::array<float,2>{0.681821704f, 0.425770462f},
std::array<float,2>{0.229014069f, 0.123743892f},
std::array<float,2>{0.92152077f, 0.656880081f},
std::array<float,2>{0.121979974f, 0.794592261f},
std::array<float,2>{0.852664173f, 0.465634495f},
std::array<float,2>{0.266262412f, 0.00820448343f},
std::array<float,2>{0.606661081f, 0.710463345f},
std::array<float,2>{0.49471432f, 0.501403391f},
std::array<float,2>{0.742134213f, 0.211652473f},
std::array<float,2>{0.150751621f, 0.28095305f},
std::array<float,2>{0.948106885f, 0.993879378f},
std::array<float,2>{0.193377167f, 0.642221868f},
std::array<float,2>{0.88963753f, 0.0662093833f},
std::array<float,2>{0.426277727f, 0.38555038f},
std::array<float,2>{0.637256086f, 0.825794339f},
std::array<float,2>{0.31285271f, 0.929924488f},
std::array<float,2>{0.539618194f, 0.363496214f},
std::array<float,2>{0.00880754273f, 0.181838214f},
std::array<float,2>{0.770417094f, 0.587266803f},
std::array<float,2>{0.223134428f, 0.766503811f},
std::array<float,2>{0.911547363f, 0.487366706f},
std::array<float,2>{0.384046048f, 0.0559265539f},
std::array<float,2>{0.675191879f, 0.719031274f},
std::array<float,2>{0.366276801f, 0.556231916f},
std::array<float,2>{0.502609432f, 0.223760396f},
std::array<float,2>{0.0377707779f, 0.295954019f},
std::array<float,2>{0.812451184f, 0.966258824f},
std::array<float,2>{0.0770428032f, 0.682538509f},
std::array<float,2>{0.819213212f, 0.0974562764f},
std::array<float,2>{0.298777431f, 0.417443961f},
std::array<float,2>{0.593560278f, 0.867174983f},
std::array<float,2>{0.442609251f, 0.880479276f},
std::array<float,2>{0.697420239f, 0.319039464f},
std::array<float,2>{0.172542378f, 0.143604413f},
std::array<float,2>{0.988324225f, 0.612501025f},
std::array<float,2>{0.00298053771f, 0.972959816f},
std::array<float,2>{0.776791215f, 0.256206632f},
std::array<float,2>{0.325489819f, 0.20281592f},
std::array<float,2>{0.533073127f, 0.516618729f},
std::array<float,2>{0.429921329f, 0.697554886f},
std::array<float,2>{0.63136977f, 0.0277226642f},
std::array<float,2>{0.199444935f, 0.451642126f},
std::array<float,2>{0.876955152f, 0.806008816f},
std::array<float,2>{0.141569883f, 0.564504862f},
std::array<float,2>{0.942170382f, 0.166301817f},
std::array<float,2>{0.485250443f, 0.352184027f},
std::array<float,2>{0.748640716f, 0.918861449f},
std::array<float,2>{0.280235857f, 0.828924298f},
std::array<float,2>{0.596963227f, 0.398584783f},
std::array<float,2>{0.112747967f, 0.0810412094f},
std::array<float,2>{0.845345855f, 0.62764746f},
std::array<float,2>{0.157539159f, 0.937461853f},
std::array<float,2>{0.978064418f, 0.359821618f},
std::array<float,2>{0.454420239f, 0.186413839f},
std::array<float,2>{0.70491004f, 0.592856467f},
std::array<float,2>{0.28199771f, 0.648309529f},
std::array<float,2>{0.567566216f, 0.0695998371f},
std::array<float,2>{0.0909926146f, 0.38770467f},
std::array<float,2>{0.835735917f, 0.820787549f},
std::array<float,2>{0.0507421568f, 0.505112886f},
std::array<float,2>{0.79411155f, 0.215759486f},
std::array<float,2>{0.348520547f, 0.277341932f},
std::array<float,2>{0.526705027f, 0.997133255f},
std::array<float,2>{0.39327386f, 0.79246223f},
std::array<float,2>{0.657789111f, 0.464119524f},
std::array<float,2>{0.245516941f, 0.0142087052f},
std::array<float,2>{0.922397614f, 0.705926597f},
std::array<float,2>{0.0983605161f, 0.845115662f},
std::array<float,2>{0.859941065f, 0.427716881f},
std::array<float,2>{0.25973466f, 0.121031933f},
std::array<float,2>{0.617760003f, 0.660704851f},
std::array<float,2>{0.469832122f, 0.603597105f},
std::array<float,2>{0.726564467f, 0.127469733f},
std::array<float,2>{0.134691983f, 0.343558967f},
std::array<float,2>{0.96536231f, 0.898241162f},
std::array<float,2>{0.21061869f, 0.73908478f},
std::array<float,2>{0.89577347f, 0.0318447687f},
std::array<float,2>{0.411733836f, 0.483834267f},
std::array<float,2>{0.647595763f, 0.762981892f},
std::array<float,2>{0.329158008f, 0.947752237f},
std::array<float,2>{0.558678031f, 0.310040534f},
std::array<float,2>{0.0247832388f, 0.244761795f},
std::array<float,2>{0.763283491f, 0.536985815f},
std::array<float,2>{0.131003186f, 0.820013165f},
std::array<float,2>{0.958791375f, 0.379933029f},
std::array<float,2>{0.477772117f, 0.0721022561f},
std::array<float,2>{0.725761175f, 0.648460567f},
std::array<float,2>{0.253802359f, 0.579393983f},
std::array<float,2>{0.616227686f, 0.179094166f},
std::array<float,2>{0.104621485f, 0.374800414f},
std::array<float,2>{0.869916797f, 0.923104405f},
std::array<float,2>{0.0164372437f, 0.717200279f},
std::array<float,2>{0.756333888f, 0.00775466161f},
std::array<float,2>{0.338665277f, 0.460522771f},
std::array<float,2>{0.55452466f, 0.787351608f},
std::array<float,2>{0.421504557f, 0.990158021f},
std::array<float,2>{0.649276972f, 0.270763218f},
std::array<float,2>{0.21615766f, 0.207985744f},
std::array<float,2>{0.899415553f, 0.510621011f},
std::array<float,2>{0.0849904567f, 0.899250865f},
std::array<float,2>{0.837127388f, 0.335565984f},
std::array<float,2>{0.295085788f, 0.13440153f},
std::array<float,2>{0.572642624f, 0.598115504f},
std::array<float,2>{0.467656046f, 0.670253456f},
std::array<float,2>{0.712075412f, 0.115091324f},
std::array<float,2>{0.168099046f, 0.435613841f},
std::array<float,2>{0.970852673f, 0.852572024f},
std::array<float,2>{0.235408455f, 0.541968644f},
std::array<float,2>{0.937042475f, 0.238246232f},
std::array<float,2>{0.398479193f, 0.302555531f},
std::array<float,2>{0.664539874f, 0.938923895f},
std::array<float,2>{0.352072388f, 0.750891745f},
std::array<float,2>{0.522714436f, 0.472231746f},
std::array<float,2>{0.0559801832f, 0.0392467454f},
std::array<float,2>{0.783771634f, 0.74810195f},
std::array<float,2>{0.190052956f, 0.960671782f},
std::array<float,2>{0.884957671f, 0.282474041f},
std::array<float,2>{0.425564378f, 0.232821822f},
std::array<float,2>{0.636684239f, 0.553361177f},
std::array<float,2>{0.320291936f, 0.729611456f},
std::array<float,2>{0.544472158f, 0.0498114862f},
std::array<float,2>{0.0137195764f, 0.492665797f},
std::array<float,2>{0.766591191f, 0.774771154f},
std::array<float,2>{0.11753089f, 0.62364018f},
std::array<float,2>{0.857410789f, 0.150312707f},
std::array<float,2>{0.26978907f, 0.322707295f},
std::array<float,2>{0.603550017f, 0.890535533f},
std::array<float,2>{0.499896735f, 0.867486119f},
std::array<float,2>{0.734485924f, 0.409912229f},
std::array<float,2>{0.154267624f, 0.104003705f},
std::array<float,2>{0.949763834f, 0.677213669f},
std::array<float,2>{0.0434918739f, 0.803904891f},
std::array<float,2>{0.803522229f, 0.440646142f},
std::array<float,2>{0.367847472f, 0.0180227607f},
std::array<float,2>{0.50908196f, 0.692543149f},
std::array<float,2>{0.379155576f, 0.529652953f},
std::array<float,2>{0.683695018f, 0.189615101f},
std::array<float,2>{0.231887057f, 0.264471322f},
std::array<float,2>{0.915603459f, 0.982957184f},
std::array<float,2>{0.185486779f, 0.637214601f},
std::array<float,2>{0.993927062f, 0.0936525241f},
std::array<float,2>{0.446838826f, 0.391436279f},
std::array<float,2>{0.69378531f, 0.840453625f},
std::array<float,2>{0.3103818f, 0.908322453f},
std::array<float,2>{0.579284966f, 0.346271038f},
std::array<float,2>{0.0633041486f, 0.161476955f},
std::array<float,2>{0.826340854f, 0.574823558f},
std::array<float,2>{0.177817822f, 0.785015166f},
std::array<float,2>{0.986370325f, 0.456098437f},
std::array<float,2>{0.437687635f, 0.00210276828f},
std::array<float,2>{0.70165962f, 0.714357674f},
std::array<float,2>{0.300895542f, 0.512420595f},
std::array<float,2>{0.588096619f, 0.203522205f},
std::array<float,2>{0.0731793493f, 0.267445654f},
std::array<float,2>{0.816396236f, 0.988257229f},
std::array<float,2>{0.0330714062f, 0.654950261f},
std::array<float,2>{0.80856967f, 0.0774469376f},
std::array<float,2>{0.359795779f, 0.377540112f},
std::array<float,2>{0.505913734f, 0.815156519f},
std::array<float,2>{0.389441162f, 0.926029682f},
std::array<float,2>{0.678975403f, 0.369361997f},
std::array<float,2>{0.222166702f, 0.174592242f},
std::array<float,2>{0.907728434f, 0.584706962f},
std::array<float,2>{0.116158798f, 0.944658935f},
std::array<float,2>{0.848670781f, 0.298359334f},
std::array<float,2>{0.274980515f, 0.238647312f},
std::array<float,2>{0.601552069f, 0.546181619f},
std::array<float,2>{0.491933852f, 0.742387295f},
std::array<float,2>{0.744950414f, 0.0431281962f},
std::array<float,2>{0.148017824f, 0.473161161f},
std::array<float,2>{0.938854933f, 0.75732708f},
std::array<float,2>{0.196358413f, 0.595569253f},
std::array<float,2>{0.879805148f, 0.138923809f},
std::array<float,2>{0.436626166f, 0.329751819f},
std::array<float,2>{0.627647817f, 0.904459417f},
std::array<float,2>{0.323184073f, 0.858956158f},
std::array<float,2>{0.536979973f, 0.432014912f},
std::array<float,2>{0.00574332988f, 0.109480485f},
std::array<float,2>{0.781032979f, 0.666259229f},
std::array<float,2>{0.249504074f, 0.886256635f},
std::array<float,2>{0.925979853f, 0.324786782f},
std::array<float,2>{0.396294713f, 0.152483031f},
std::array<float,2>{0.663841248f, 0.618851423f},
std::array<float,2>{0.347551376f, 0.673750997f},
std::array<float,2>{0.529328763f, 0.107572496f},
std::array<float,2>{0.0511487611f, 0.413297087f},
std::array<float,2>{0.790895283f, 0.873439789f},
std::array<float,2>{0.0888842791f, 0.548213303f},
std::array<float,2>{0.831692994f, 0.228674382f},
std::array<float,2>{0.285475671f, 0.288553596f},
std::array<float,2>{0.563930929f, 0.956428409f},
std::array<float,2>{0.459262073f, 0.780321658f},
std::array<float,2>{0.709882677f, 0.497819602f},
std::array<float,2>{0.160277054f, 0.0515633859f},
std::array<float,2>{0.980986416f, 0.73241806f},
std::array<float,2>{0.0305581428f, 0.839355409f},
std::array<float,2>{0.759672225f, 0.395601183f},
std::array<float,2>{0.333011478f, 0.0862899497f},
std::array<float,2>{0.557036757f, 0.634006977f},
std::array<float,2>{0.40840143f, 0.572619796f},
std::array<float,2>{0.640644789f, 0.156668335f},
std::array<float,2>{0.206295311f, 0.350239694f},
std::array<float,2>{0.893915176f, 0.912163198f},
std::array<float,2>{0.137773916f, 0.687777996f},
std::array<float,2>{0.963909924f, 0.0208017938f},
std::array<float,2>{0.473715305f, 0.443400592f},
std::array<float,2>{0.73429358f, 0.799999118f},
std::array<float,2>{0.26288715f, 0.979604959f},
std::array<float,2>{0.621186078f, 0.260237545f},
std::array<float,2>{0.09626811f, 0.194002375f},
std::array<float,2>{0.865163565f, 0.526000798f},
std::array<float,2>{0.213748753f, 0.863197684f},
std::array<float,2>{0.902366459f, 0.418930233f},
std::array<float,2>{0.414209127f, 0.0987773612f},
std::array<float,2>{0.653636336f, 0.686255813f},
std::array<float,2>{0.340685815f, 0.615935922f},
std::array<float,2>{0.550462902f, 0.145400271f},
std::array<float,2>{0.021613773f, 0.316241175f},
std::array<float,2>{0.751857638f, 0.875388265f},
std::array<float,2>{0.106897101f, 0.723749161f},
std::array<float,2>{0.871965408f, 0.0611979999f},
std::array<float,2>{0.255305171f, 0.489567846f},
std::array<float,2>{0.612870336f, 0.772470117f},
std::array<float,2>{0.481629461f, 0.964573085f},
std::array<float,2>{0.719119608f, 0.292063683f},
std::array<float,2>{0.1266976f, 0.220188335f},
std::array<float,2>{0.95549947f, 0.558769166f},
std::array<float,2>{0.0601066798f, 0.914486527f},
std::array<float,2>{0.785989225f, 0.357688278f},
std::array<float,2>{0.358131438f, 0.168628007f},
std::array<float,2>{0.515702128f, 0.566818416f},
std::array<float,2>{0.40363121f, 0.62994653f},
std::array<float,2>{0.670352697f, 0.0846907198f},
std::array<float,2>{0.241784766f, 0.405492455f},
std::array<float,2>{0.930478275f, 0.833061457f},
std::array<float,2>{0.165296197f, 0.522349596f},
std::array<float,2>{0.974467039f, 0.198926002f},
std::array<float,2>{0.463847339f, 0.251862943f},
std::array<float,2>{0.715129733f, 0.970655978f},
std::array<float,2>{0.290237159f, 0.811172068f},
std::array<float,2>{0.576874375f, 0.446089506f},
std::array<float,2>{0.0791279525f, 0.026907919f},
std::array<float,2>{0.840908647f, 0.699965715f},
std::array<float,2>{0.149049774f, 0.994614482f},
std::array<float,2>{0.946236372f, 0.278651804f},
std::array<float,2>{0.492708921f, 0.213375241f},
std::array<float,2>{0.738320231f, 0.503548682f},
std::array<float,2>{0.269198924f, 0.707402229f},
std::array<float,2>{0.60747844f, 0.0111016389f},
std::array<float,2>{0.124437258f, 0.468715817f},
std::array<float,2>{0.854457021f, 0.796643734f},
std::array<float,2>{0.0106673902f, 0.589558423f},
std::array<float,2>{0.772653222f, 0.18128565f},
std::array<float,2>{0.315283209f, 0.365244895f},
std::array<float,2>{0.541746259f, 0.932846725f},
std::array<float,2>{0.429310143f, 0.826559007f},
std::array<float,2>{0.639841378f, 0.383536339f},
std::array<float,2>{0.191876575f, 0.0626637936f},
std::array<float,2>{0.88827908f, 0.644284487f},
std::array<float,2>{0.066816628f, 0.761556506f},
std::array<float,2>{0.823207855f, 0.477588624f},
std::array<float,2>{0.304787636f, 0.0353983007f},
std::array<float,2>{0.582152009f, 0.737504184f},
std::array<float,2>{0.451616526f, 0.532044709f},
std::array<float,2>{0.689678013f, 0.248594359f},
std::array<float,2>{0.179717764f, 0.30578652f},
std::array<float,2>{0.99893105f, 0.950005233f},
std::array<float,2>{0.2280467f, 0.660135925f},
std::array<float,2>{0.918871462f, 0.121588677f},
std::array<float,2>{0.376716763f, 0.422900766f},
std::array<float,2>{0.681602478f, 0.850607634f},
std::array<float,2>{0.372656345f, 0.891694784f},
std::array<float,2>{0.511719167f, 0.339514881f},
std::array<float,2>{0.0411529914f, 0.129382297f},
std::array<float,2>{0.798539102f, 0.605762422f},
std::array<float,2>{0.24415417f, 0.790911853f},
std::array<float,2>{0.923768997f, 0.462571979f},
std::array<float,2>{0.393703192f, 0.0135479895f},
std::array<float,2>{0.656395853f, 0.704690695f},
std::array<float,2>{0.348691434f, 0.506830692f},
std::array<float,2>{0.525560379f, 0.217189521f},
std::array<float,2>{0.049730327f, 0.274588466f},
std::array<float,2>{0.793924332f, 0.99920857f},
std::array<float,2>{0.0900958478f, 0.646298468f},
std::array<float,2>{0.834506094f, 0.0676521659f},
std::array<float,2>{0.283156186f, 0.388777137f},
std::array<float,2>{0.566526413f, 0.822380364f},
std::array<float,2>{0.453623891f, 0.934166968f},
std::array<float,2>{0.703460574f, 0.361824632f},
std::array<float,2>{0.156966195f, 0.183717445f},
std::array<float,2>{0.977455676f, 0.591079414f},
std::array<float,2>{0.0240157899f, 0.946996331f},
std::array<float,2>{0.761881351f, 0.311942965f},
std::array<float,2>{0.329083502f, 0.243094727f},
std::array<float,2>{0.559633732f, 0.537775755f},
std::array<float,2>{0.410577178f, 0.741278112f},
std::array<float,2>{0.647192717f, 0.0341331027f},
std::array<float,2>{0.209455356f, 0.481589556f},
std::array<float,2>{0.895080864f, 0.765519381f},
std::array<float,2>{0.133393317f, 0.602903724f},
std::array<float,2>{0.966545463f, 0.125375673f},
std::array<float,2>{0.46891433f, 0.341671497f},
std::array<float,2>{0.728232503f, 0.895792782f},
std::array<float,2>{0.258210272f, 0.846737564f},
std::array<float,2>{0.618228436f, 0.429499149f},
std::array<float,2>{0.0994983986f, 0.118324317f},
std::array<float,2>{0.860508025f, 0.663159311f},
std::array<float,2>{0.172956556f, 0.882143736f},
std::array<float,2>{0.9897542f, 0.318220973f},
std::array<float,2>{0.442355424f, 0.141956553f},
std::array<float,2>{0.698967099f, 0.611018717f},
std::array<float,2>{0.297682852f, 0.681242764f},
std::array<float,2>{0.592017233f, 0.0938040316f},
std::array<float,2>{0.0773189664f, 0.414396882f},
std::array<float,2>{0.819572806f, 0.865136623f},
std::array<float,2>{0.0388461277f, 0.557267368f},
std::array<float,2>{0.811024785f, 0.224933505f},
std::array<float,2>{0.366194755f, 0.293393284f},
std::array<float,2>{0.503851354f, 0.968198836f},
std::array<float,2>{0.382909715f, 0.76788038f},
std::array<float,2>{0.674614906f, 0.485964119f},
std::array<float,2>{0.224313453f, 0.0583372749f},
std::array<float,2>{0.910631061f, 0.720720708f},
std::array<float,2>{0.111525938f, 0.831539035f},
std::array<float,2>{0.844446182f, 0.402164549f},
std::array<float,2>{0.280980349f, 0.0784317926f},
std::array<float,2>{0.596395314f, 0.626024365f},
std::array<float,2>{0.485649318f, 0.56328851f},
std::array<float,2>{0.749282777f, 0.165743262f},
std::array<float,2>{0.14224124f, 0.35427475f},
std::array<float,2>{0.942675114f, 0.920891702f},
std::array<float,2>{0.200520724f, 0.69534111f},
std::array<float,2>{0.87861383f, 0.0294818487f},
std::array<float,2>{0.431405723f, 0.451017678f},
std::array<float,2>{0.632674158f, 0.808463812f},
std::array<float,2>{0.324291259f, 0.975340784f},
std::array<float,2>{0.532118559f, 0.255490631f},
std::array<float,2>{0.00272490131f, 0.200134918f},
std::array<float,2>{0.776358306f, 0.519314647f},
std::array<float,2>{0.152689844f, 0.869639933f},
std::array<float,2>{0.95064187f, 0.407031f},
std::array<float,2>{0.498640627f, 0.102659307f},
std::array<float,2>{0.736133337f, 0.678500772f},
std::array<float,2>{0.271423817f, 0.621875644f},
std::array<float,2>{0.60538137f, 0.152165085f},
std::array<float,2>{0.11868988f, 0.321008414f},
std::array<float,2>{0.856392384f, 0.887137473f},
std::array<float,2>{0.0151725635f, 0.728122234f},
std::array<float,2>{0.767281115f, 0.0473925658f},
std::array<float,2>{0.31853494f, 0.494816095f},
std::array<float,2>{0.543216109f, 0.775592268f},
std::array<float,2>{0.424252391f, 0.958442926f},
std::array<float,2>{0.635236323f, 0.284131885f},
std::array<float,2>{0.190862656f, 0.230710164f},
std::array<float,2>{0.8865242f, 0.551534534f},
std::array<float,2>{0.0643180832f, 0.907120764f},
std::array<float,2>{0.827783167f, 0.344456494f},
std::array<float,2>{0.309214503f, 0.162259832f},
std::array<float,2>{0.578501761f, 0.576363623f},
std::array<float,2>{0.445364714f, 0.640192151f},
std::array<float,2>{0.695006669f, 0.0911177844f},
std::array<float,2>{0.183863461f, 0.394039869f},
std::array<float,2>{0.992227077f, 0.843371212f},
std::array<float,2>{0.231223732f, 0.528737545f},
std::array<float,2>{0.914931715f, 0.189446017f},
std::array<float,2>{0.380813569f, 0.26276356f},
std::array<float,2>{0.685030878f, 0.980692387f},
std::array<float,2>{0.369056195f, 0.802013993f},
std::array<float,2>{0.50818181f, 0.437959909f},
std::array<float,2>{0.0444101058f, 0.0175074656f},
std::array<float,2>{0.804020703f, 0.69461745f},
std::array<float,2>{0.215218201f, 0.991787612f},
std::array<float,2>{0.898881257f, 0.271714598f},
std::array<float,2>{0.42001605f, 0.209953055f},
std::array<float,2>{0.6502918f, 0.508359969f},
std::array<float,2>{0.339254588f, 0.716095328f},
std::array<float,2>{0.55306077f, 0.00532352319f},
std::array<float,2>{0.0172413029f, 0.458659649f},
std::array<float,2>{0.75778389f, 0.786059141f},
std::array<float,2>{0.104473464f, 0.581099629f},
std::array<float,2>{0.870201886f, 0.175957039f},
std::array<float,2>{0.252229691f, 0.372369796f},
std::array<float,2>{0.615653276f, 0.924016476f},
std::array<float,2>{0.477056175f, 0.818195879f},
std::array<float,2>{0.724725008f, 0.381030709f},
std::array<float,2>{0.132152051f, 0.0730941892f},
std::array<float,2>{0.95752281f, 0.651942432f},
std::array<float,2>{0.0550715216f, 0.753356218f},
std::array<float,2>{0.784355402f, 0.469186038f},
std::array<float,2>{0.352870822f, 0.0420002639f},
std::array<float,2>{0.521721363f, 0.747179925f},
std::array<float,2>{0.399498165f, 0.539354026f},
std::array<float,2>{0.66581136f, 0.235171765f},
std::array<float,2>{0.234739795f, 0.303067386f},
std::array<float,2>{0.93616575f, 0.939801455f},
std::array<float,2>{0.169117227f, 0.669825554f},
std::array<float,2>{0.97219193f, 0.116471641f},
std::array<float,2>{0.467951357f, 0.435081035f},
std::array<float,2>{0.711472988f, 0.855147123f},
std::array<float,2>{0.29672721f, 0.900824189f},
std::array<float,2>{0.573600709f, 0.332315713f},
std::array<float,2>{0.084035553f, 0.135000363f},
std::array<float,2>{0.836489737f, 0.599684775f},
std::array<float,2>{0.161928907f, 0.778990269f},
std::array<float,2>{0.982205033f, 0.499980062f},
std::array<float,2>{0.460684001f, 0.0542725176f},
std::array<float,2>{0.710768342f, 0.733355701f},
std::array<float,2>{0.287064016f, 0.550006807f},
std::array<float,2>{0.562582493f, 0.227891877f},
std::array<float,2>{0.0886208564f, 0.285446793f},
std::array<float,2>{0.830722868f, 0.954555273f},
std::array<float,2>{0.0523296371f, 0.675775766f},
std::array<float,2>{0.789232492f, 0.107334062f},
std::array<float,2>{0.346635371f, 0.41159445f},
std::array<float,2>{0.530412674f, 0.871922433f},
std::array<float,2>{0.394860029f, 0.88448137f},
std::array<float,2>{0.663043082f, 0.326598138f},
std::array<float,2>{0.248666048f, 0.154580995f},
std::array<float,2>{0.927322626f, 0.619810283f},
std::array<float,2>{0.0970687792f, 0.978505433f},
std::array<float,2>{0.864219606f, 0.259297967f},
std::array<float,2>{0.26225546f, 0.193208128f},
std::array<float,2>{0.622070789f, 0.524487793f},
std::array<float,2>{0.473598331f, 0.691336334f},
std::array<float,2>{0.733374834f, 0.0216291081f},
std::array<float,2>{0.13691701f, 0.443093836f},
std::array<float,2>{0.963003039f, 0.798561275f},
std::array<float,2>{0.205614448f, 0.570455313f},
std::array<float,2>{0.892860293f, 0.158862188f},
std::array<float,2>{0.409968048f, 0.347862452f},
std::array<float,2>{0.642394006f, 0.910274327f},
std::array<float,2>{0.332776845f, 0.83691895f},
std::array<float,2>{0.557809234f, 0.397421479f},
std::array<float,2>{0.0296114571f, 0.0883975253f},
std::array<float,2>{0.758356988f, 0.635776937f},
std::array<float,2>{0.221086517f, 0.928235769f},
std::array<float,2>{0.906606615f, 0.368681729f},
std::array<float,2>{0.390363663f, 0.173313856f},
std::array<float,2>{0.678156197f, 0.583384514f},
std::array<float,2>{0.360453486f, 0.652796626f},
std::array<float,2>{0.507573426f, 0.0752740502f},
std::array<float,2>{0.0317248739f, 0.375261903f},
std::array<float,2>{0.806997895f, 0.813834667f},
std::array<float,2>{0.0738085881f, 0.514160931f},
std::array<float,2>{0.814465225f, 0.205723912f},
std::array<float,2>{0.301790535f, 0.268640608f},
std::array<float,2>{0.58953917f, 0.985503793f},
std::array<float,2>{0.438507259f, 0.781686544f},
std::array<float,2>{0.702883303f, 0.45459038f},
std::array<float,2>{0.179259285f, 0.000870031945f},
std::array<float,2>{0.987568796f, 0.712751687f},
std::array<float,2>{0.00410259748f, 0.856801689f},
std::array<float,2>{0.78005141f, 0.429727465f},
std::array<float,2>{0.323372513f, 0.113139458f},
std::array<float,2>{0.535292864f, 0.665761411f},
std::array<float,2>{0.435594261f, 0.59739852f},
std::array<float,2>{0.628604233f, 0.137187004f},
std::array<float,2>{0.196259782f, 0.331878513f},
std::array<float,2>{0.880283594f, 0.90366292f},
std::array<float,2>{0.147415727f, 0.744174659f},
std::array<float,2>{0.937660694f, 0.0464154668f},
std::array<float,2>{0.491115063f, 0.476312578f},
std::array<float,2>{0.745308459f, 0.754279256f},
std::array<float,2>{0.274298459f, 0.942866623f},
std::array<float,2>{0.600551367f, 0.300203502f},
std::array<float,2>{0.117024787f, 0.241502494f},
std::array<float,2>{0.84794575f, 0.544733822f},
std::array<float,2>{0.192596555f, 0.824309528f},
std::array<float,2>{0.887383103f, 0.38610667f},
std::array<float,2>{0.428049445f, 0.0646702871f},
std::array<float,2>{0.638770342f, 0.641588748f},
std::array<float,2>{0.315824747f, 0.586591423f},
std::array<float,2>{0.542393982f, 0.182671353f},
std::array<float,2>{0.0115738288f, 0.36473015f},
std::array<float,2>{0.77232641f, 0.931043029f},
std::array<float,2>{0.123733997f, 0.709917307f},
std::array<float,2>{0.854699492f, 0.00917866267f},
std::array<float,2>{0.267752767f, 0.466109544f},
std::array<float,2>{0.60923183f, 0.793690801f},
std::array<float,2>{0.493410975f, 0.99241519f},
std::array<float,2>{0.739634335f, 0.279773563f},
std::array<float,2>{0.149754509f, 0.212546989f},
std::array<float,2>{0.947097778f, 0.500582814f},
std::array<float,2>{0.042588722f, 0.893414438f},
std::array<float,2>{0.797576249f, 0.336025894f},
std::array<float,2>{0.371837318f, 0.132429868f},
std::array<float,2>{0.513623714f, 0.60745734f},
std::array<float,2>{0.375571936f, 0.657763481f},
std::array<float,2>{0.68034029f, 0.124617182f},
std::array<float,2>{0.227147698f, 0.424170285f},
std::array<float,2>{0.919135451f, 0.849291265f},
std::array<float,2>{0.181577131f, 0.534828126f},
std::array<float,2>{0.999066472f, 0.247564927f},
std::array<float,2>{0.453081965f, 0.306686103f},
std::array<float,2>{0.691039503f, 0.952306747f},
std::array<float,2>{0.306388259f, 0.75837779f},
std::array<float,2>{0.583108604f, 0.478552133f},
std::array<float,2>{0.0681753457f, 0.0376886353f},
std::array<float,2>{0.823397279f, 0.73621726f},
std::array<float,2>{0.125708729f, 0.961606026f},
std::array<float,2>{0.956606567f, 0.290098608f},
std::array<float,2>{0.481358916f, 0.221386045f},
std::array<float,2>{0.719746292f, 0.561479211f},
std::array<float,2>{0.254798949f, 0.725437999f},
std::array<float,2>{0.611382484f, 0.0590866059f},
std::array<float,2>{0.106342025f, 0.490966678f},
std::array<float,2>{0.872253358f, 0.771214604f},
std::array<float,2>{0.0227199346f, 0.614742219f},
std::array<float,2>{0.750314474f, 0.14677529f},
std::array<float,2>{0.340987116f, 0.31436497f},
std::array<float,2>{0.549696505f, 0.878609002f},
std::array<float,2>{0.415121317f, 0.860282898f},
std::array<float,2>{0.652554095f, 0.42148453f},
std::array<float,2>{0.214167207f, 0.10112647f},
std::array<float,2>{0.903942585f, 0.684412301f},
std::array<float,2>{0.0787425861f, 0.808730185f},
std::array<float,2>{0.840689957f, 0.449065953f},
std::array<float,2>{0.289217204f, 0.0237035472f},
std::array<float,2>{0.577736616f, 0.70247823f},
std::array<float,2>{0.46393609f, 0.520588577f},
std::array<float,2>{0.716114759f, 0.195759252f},
std::array<float,2>{0.164131194f, 0.252294093f},
std::array<float,2>{0.972805977f, 0.970896125f},
std::array<float,2>{0.240895241f, 0.631105185f},
std::array<float,2>{0.931143761f, 0.0836687461f},
std::array<float,2>{0.402662724f, 0.403297871f},
std::array<float,2>{0.671705365f, 0.834314823f},
std::array<float,2>{0.35869205f, 0.917050838f},
std::array<float,2>{0.517201364f, 0.355955154f},
std::array<float,2>{0.059402246f, 0.171192139f},
std::array<float,2>{0.786597133f, 0.569400668f},
std::array<float,2>{0.207317784f, 0.762495697f},
std::array<float,2>{0.898030281f, 0.482604593f},
std::array<float,2>{0.412439317f, 0.0328300484f},
std::array<float,2>{0.645395637f, 0.739720404f},
std::array<float,2>{0.330419213f, 0.536047637f},
std::array<float,2>{0.560827613f, 0.246092349f},
std::array<float,2>{0.0255072471f, 0.308729857f},
std::array<float,2>{0.765294135f, 0.949188232f},
std::array<float,2>{0.101234987f, 0.661343277f},
std::array<float,2>{0.862964809f, 0.119696692f},
std::array<float,2>{0.260989636f, 0.426698238f},
std::array<float,2>{0.619226754f, 0.844056129f},
std::array<float,2>{0.471185416f, 0.897005558f},
std::array<float,2>{0.729085565f, 0.342323393f},
std::array<float,2>{0.135697454f, 0.1288919f},
std::array<float,2>{0.968003392f, 0.605374873f},
std::array<float,2>{0.047064282f, 0.996887743f},
std::array<float,2>{0.795451701f, 0.276276171f},
std::array<float,2>{0.351146132f, 0.216139406f},
std::array<float,2>{0.523510158f, 0.504334331f},
std::array<float,2>{0.391597211f, 0.706070364f},
std::array<float,2>{0.659072042f, 0.0149621982f},
std::array<float,2>{0.243769184f, 0.463207781f},
std::array<float,2>{0.92560184f, 0.791528821f},
std::array<float,2>{0.15974094f, 0.592104018f},
std::array<float,2>{0.979769528f, 0.186671153f},
std::array<float,2>{0.455362767f, 0.361004114f},
std::array<float,2>{0.705107272f, 0.935598314f},
std::array<float,2>{0.284463167f, 0.821720779f},
std::array<float,2>{0.569094241f, 0.387049586f},
std::array<float,2>{0.0933176428f, 0.068628639f},
std::array<float,2>{0.832158566f, 0.647350669f},
std::array<float,2>{0.142600283f, 0.91939038f},
std::array<float,2>{0.944850087f, 0.353202194f},
std::array<float,2>{0.487806648f, 0.167491466f},
std::array<float,2>{0.746729195f, 0.566375911f},
std::array<float,2>{0.277757585f, 0.62822628f},
std::array<float,2>{0.595320106f, 0.0817464888f},
std::array<float,2>{0.110510424f, 0.399491787f},
std::array<float,2>{0.847481847f, 0.829942584f},
std::array<float,2>{0.00188485638f, 0.516565442f},
std::array<float,2>{0.774326682f, 0.202039167f},
std::array<float,2>{0.326652437f, 0.257709891f},
std::array<float,2>{0.53436631f, 0.97446698f},
std::array<float,2>{0.432115823f, 0.805314064f},
std::array<float,2>{0.629849851f, 0.452685714f},
std::array<float,2>{0.201717958f, 0.0289293081f},
std::array<float,2>{0.87615633f, 0.69912827f},
std::array<float,2>{0.0751917511f, 0.865756154f},
std::array<float,2>{0.817080259f, 0.41668576f},
std::array<float,2>{0.299654126f, 0.0964874104f},
std::array<float,2>{0.590904415f, 0.682970941f},
std::array<float,2>{0.444426417f, 0.612265944f},
std::array<float,2>{0.695848167f, 0.14284043f},
std::array<float,2>{0.175064594f, 0.319363803f},
std::array<float,2>{0.991755068f, 0.879323483f},
std::array<float,2>{0.225422606f, 0.720657229f},
std::array<float,2>{0.912255347f, 0.0552868173f},
std::array<float,2>{0.386373132f, 0.487218738f},
std::array<float,2>{0.67296797f, 0.767537653f},
std::array<float,2>{0.364026099f, 0.965531051f},
std::array<float,2>{0.500552952f, 0.295425713f},
std::array<float,2>{0.0353793167f, 0.222895622f},
std::array<float,2>{0.808798015f, 0.555331171f},
std::array<float,2>{0.186480716f, 0.841401398f},
std::array<float,2>{0.995583594f, 0.391845167f},
std::array<float,2>{0.44736892f, 0.0925283358f},
std::array<float,2>{0.693188488f, 0.637716293f},
std::array<float,2>{0.31067276f, 0.575680435f},
std::array<float,2>{0.58158046f, 0.160550922f},
std::array<float,2>{0.0654760301f, 0.347172111f},
std::array<float,2>{0.826150239f, 0.909716189f},
std::array<float,2>{0.0464162268f, 0.691498935f},
std::array<float,2>{0.802089334f, 0.0193413701f},
std::array<float,2>{0.370839983f, 0.439953685f},
std::array<float,2>{0.511509955f, 0.803648472f},
std::array<float,2>{0.381975144f, 0.983430862f},
std::array<float,2>{0.685697973f, 0.265175611f},
std::array<float,2>{0.232850328f, 0.191316679f},
std::array<float,2>{0.91705066f, 0.530733705f},
std::array<float,2>{0.120604597f, 0.889228284f},
std::array<float,2>{0.858935237f, 0.32367751f},
std::array<float,2>{0.272160977f, 0.149370536f},
std::array<float,2>{0.602068424f, 0.624512494f},
std::array<float,2>{0.497647643f, 0.676745892f},
std::array<float,2>{0.737011075f, 0.10521163f},
std::array<float,2>{0.155738205f, 0.408935994f},
std::array<float,2>{0.953026056f, 0.868835628f},
std::array<float,2>{0.189109832f, 0.554602444f},
std::array<float,2>{0.884616137f, 0.233917609f},
std::array<float,2>{0.422202349f, 0.281615496f},
std::array<float,2>{0.634451628f, 0.959678292f},
std::array<float,2>{0.318067551f, 0.773532033f},
std::array<float,2>{0.546650052f, 0.493704796f},
std::array<float,2>{0.0118081411f, 0.0490095653f},
std::array<float,2>{0.768283069f, 0.728571653f},
std::array<float,2>{0.237988397f, 0.93835777f},
std::array<float,2>{0.933863044f, 0.301076531f},
std::array<float,2>{0.402132481f, 0.236442506f},
std::array<float,2>{0.667867005f, 0.542002916f},
std::array<float,2>{0.35477066f, 0.749871314f},
std::array<float,2>{0.521177232f, 0.0402949676f},
std::array<float,2>{0.0578751266f, 0.470757663f},
std::array<float,2>{0.781950712f, 0.751832187f},
std::array<float,2>{0.0831560194f, 0.599317074f},
std::array<float,2>{0.839422226f, 0.13371706f},
std::array<float,2>{0.294481814f, 0.334729224f},
std::array<float,2>{0.571233809f, 0.899571478f},
std::array<float,2>{0.464934707f, 0.852433264f},
std::array<float,2>{0.713484049f, 0.437458277f},
std::array<float,2>{0.170306519f, 0.113515273f},
std::array<float,2>{0.969376683f, 0.67163527f},
std::array<float,2>{0.0194815099f, 0.788535655f},
std::array<float,2>{0.755129457f, 0.459472537f},
std::array<float,2>{0.337265193f, 0.00664861081f},
std::array<float,2>{0.552414238f, 0.718388855f},
std::array<float,2>{0.419850767f, 0.511118472f},
std::array<float,2>{0.652294457f, 0.208764777f},
std::array<float,2>{0.217824966f, 0.269877672f},
std::array<float,2>{0.901017368f, 0.989023924f},
std::array<float,2>{0.130766764f, 0.649472356f},
std::array<float,2>{0.959546208f, 0.0709257126f},
std::array<float,2>{0.478741527f, 0.379165888f},
std::array<float,2>{0.723358452f, 0.81842649f},
std::array<float,2>{0.251658648f, 0.922732711f},
std::array<float,2>{0.614149928f, 0.373411924f},
std::array<float,2>{0.102895916f, 0.177777171f},
std::array<float,2>{0.86859709f, 0.578502119f},
std::array<float,2>{0.138922408f, 0.79898423f},
std::array<float,2>{0.962170839f, 0.444576383f},
std::array<float,2>{0.475914598f, 0.019833073f},
std::array<float,2>{0.731110752f, 0.689258218f},
std::array<float,2>{0.265429467f, 0.526692986f},
std::array<float,2>{0.623367667f, 0.194737107f},
std::array<float,2>{0.0950252041f, 0.261125147f},
std::array<float,2>{0.865455985f, 0.978690922f},
std::array<float,2>{0.0289433412f, 0.632840335f},
std::array<float,2>{0.759924293f, 0.0877433792f},
std::array<float,2>{0.335217237f, 0.39468804f},
std::array<float,2>{0.556081414f, 0.838442445f},
std::array<float,2>{0.406826615f, 0.913297653f},
std::array<float,2>{0.643787563f, 0.351423979f},
std::array<float,2>{0.203672722f, 0.157768041f},
std::array<float,2>{0.892121196f, 0.573925972f},
std::array<float,2>{0.0868946016f, 0.955813885f},
std::array<float,2>{0.829750061f, 0.287438005f},
std::array<float,2>{0.287464738f, 0.229718894f},
std::array<float,2>{0.565261483f, 0.547070861f},
std::array<float,2>{0.457697272f, 0.731187761f},
std::array<float,2>{0.707163811f, 0.0527293347f},
std::array<float,2>{0.163888738f, 0.496405244f},
std::array<float,2>{0.983346879f, 0.77968657f},
std::array<float,2>{0.246575236f, 0.61753428f},
std::array<float,2>{0.928403616f, 0.154021397f},
std::array<float,2>{0.397791386f, 0.325788617f},
std::array<float,2>{0.661167145f, 0.885661542f},
std::array<float,2>{0.345192134f, 0.874944866f},
std::array<float,2>{0.527946293f, 0.412150145f},
std::array<float,2>{0.0535288528f, 0.108872823f},
std::array<float,2>{0.791978896f, 0.67249006f},
std::array<float,2>{0.198461697f, 0.905419171f},
std::array<float,2>{0.881700099f, 0.328210533f},
std::array<float,2>{0.435400277f, 0.140248224f},
std::array<float,2>{0.626525402f, 0.593919873f},
std::array<float,2>{0.32114765f, 0.667011142f},
std::array<float,2>{0.538149774f, 0.110525526f},
std::array<float,2>{0.00637401501f, 0.43357867f},
std::array<float,2>{0.777552843f, 0.857606292f},
std::array<float,2>{0.113641277f, 0.545322418f},
std::array<float,2>{0.849843204f, 0.240061522f},
std::array<float,2>{0.276969761f, 0.297656685f},
std::array<float,2>{0.5978719f, 0.944067538f},
std::array<float,2>{0.489626974f, 0.756135404f},
std::array<float,2>{0.742453814f, 0.474423677f},
std::array<float,2>{0.145858154f, 0.0440644026f},
std::array<float,2>{0.940102398f, 0.743671298f},
std::array<float,2>{0.0346312746f, 0.815779388f},
std::array<float,2>{0.806454241f, 0.378867745f},
std::array<float,2>{0.362603128f, 0.0770726278f},
std::array<float,2>{0.505130708f, 0.655437171f},
std::array<float,2>{0.387003839f, 0.585743904f},
std::array<float,2>{0.675961137f, 0.174923435f},
std::array<float,2>{0.219660297f, 0.370425165f},
std::array<float,2>{0.909830093f, 0.927729964f},
std::array<float,2>{0.176216394f, 0.712916791f},
std::array<float,2>{0.986192048f, 0.00303898682f},
std::array<float,2>{0.441304386f, 0.455107421f},
std::array<float,2>{0.699840605f, 0.783393264f},
std::array<float,2>{0.303349167f, 0.986538231f},
std::array<float,2>{0.58708334f, 0.266486585f},
std::array<float,2>{0.0722202435f, 0.204253227f},
std::array<float,2>{0.814296722f, 0.513131201f},
std::array<float,2>{0.230040371f, 0.849833727f},
std::array<float,2>{0.919945359f, 0.422605485f},
std::array<float,2>{0.37870723f, 0.122590117f},
std::array<float,2>{0.682930827f, 0.658239663f},
std::array<float,2>{0.37458092f, 0.606661916f},
std::array<float,2>{0.514857411f, 0.130644068f},
std::array<float,2>{0.0408878773f, 0.338469774f},
std::array<float,2>{0.800087869f, 0.890924454f},
std::array<float,2>{0.069447957f, 0.736622572f},
std::array<float,2>{0.821337581f, 0.0370608754f},
std::array<float,2>{0.308563799f, 0.476654619f},
std::array<float,2>{0.585169256f, 0.760081351f},
std::array<float,2>{0.450756371f, 0.950747848f},
std::array<float,2>{0.688851118f, 0.305323809f},
std::array<float,2>{0.182090312f, 0.249077544f},
std::array<float,2>{0.997716367f, 0.532567441f},
std::array<float,2>{0.00873024575f, 0.932005703f},
std::array<float,2>{0.770757258f, 0.367156982f},
std::array<float,2>{0.314367205f, 0.179970041f},
std::array<float,2>{0.540901482f, 0.588797987f},
std::array<float,2>{0.427503526f, 0.642960489f},
std::array<float,2>{0.638597608f, 0.064347066f},
std::array<float,2>{0.194466189f, 0.383952409f},
std::array<float,2>{0.88972491f, 0.827778578f},
std::array<float,2>{0.152289912f, 0.502309263f},
std::array<float,2>{0.948771298f, 0.214356378f},
std::array<float,2>{0.495747834f, 0.277780741f},
std::array<float,2>{0.741124868f, 0.995714962f},
std::array<float,2>{0.266658127f, 0.795544863f},
std::array<float,2>{0.606064379f, 0.466813326f},
std::array<float,2>{0.122476786f, 0.00987111311f},
std::array<float,2>{0.852425396f, 0.708950937f},
std::array<float,2>{0.167412326f, 0.969343066f},
std::array<float,2>{0.974706471f, 0.250285298f},
std::array<float,2>{0.46210742f, 0.197998077f},
std::array<float,2>{0.717922986f, 0.523217082f},
std::array<float,2>{0.291920811f, 0.700689614f},
std::array<float,2>{0.575635552f, 0.0254651308f},
std::array<float,2>{0.0813768432f, 0.446659774f},
std::array<float,2>{0.843473673f, 0.811778784f},
std::array<float,2>{0.0624935068f, 0.567856908f},
std::array<float,2>{0.788917303f, 0.16937016f},
std::array<float,2>{0.357347846f, 0.359263718f},
std::array<float,2>{0.51918292f, 0.91536355f},
std::array<float,2>{0.40606454f, 0.832947552f},
std::array<float,2>{0.669070899f, 0.404603899f},
std::array<float,2>{0.238539234f, 0.0851992816f},
std::array<float,2>{0.932956934f, 0.629254818f},
std::array<float,2>{0.108553469f, 0.772332668f},
std::array<float,2>{0.874622643f, 0.488768607f},
std::array<float,2>{0.257484555f, 0.0619158819f},
std::array<float,2>{0.609874964f, 0.722814262f},
std::array<float,2>{0.483633757f, 0.560477734f},
std::array<float,2>{0.721004963f, 0.219418615f},
std::array<float,2>{0.127763197f, 0.291263074f},
std::array<float,2>{0.954300463f, 0.963231921f},
std::array<float,2>{0.21103327f, 0.687024474f},
std::array<float,2>{0.904606223f, 0.0977305472f},
std::array<float,2>{0.417446256f, 0.419171542f},
std::array<float,2>{0.655279696f, 0.862133503f},
std::array<float,2>{0.342603743f, 0.875993848f},
std::array<float,2>{0.548736989f, 0.314785749f},
std::array<float,2>{0.0205272604f, 0.145523295f},
std::array<float,2>{0.753599405f, 0.616975009f}} | 49.002441 | 52 | 0.734702 | st-ario |
97e44e0a09f0f6cba84334a9a869ab7feedaa76d | 187 | cpp | C++ | structural/main.cpp | eivinsam/structural | f36e6606f0b6c0ba9d4eed5eebe20543ed16e15e | [
"MIT"
] | null | null | null | structural/main.cpp | eivinsam/structural | f36e6606f0b6c0ba9d4eed5eebe20543ed16e15e | [
"MIT"
] | null | null | null | structural/main.cpp | eivinsam/structural | f36e6606f0b6c0ba9d4eed5eebe20543ed16e15e | [
"MIT"
] | null | null | null | #include <oui_window.h>
oui::window::Description oui::window::initialize()
{
return { "structural", 1280, 720 };
}
void oui::window::update(oui::Rectangle area, oui::Input& input)
{
} | 17 | 64 | 0.684492 | eivinsam |
97e4abe74f762aa913105d17f6871450252b07ee | 2,598 | cpp | C++ | test/run_test_xuanwu.cpp | chnlkw/xuanwu | f796e9a851d8fad289ac5a625679e7db6c090a04 | [
"MIT"
] | 1 | 2018-04-09T01:45:17.000Z | 2018-04-09T01:45:17.000Z | test/run_test_xuanwu.cpp | chnlkw/xuanwu | f796e9a851d8fad289ac5a625679e7db6c090a04 | [
"MIT"
] | null | null | null | test/run_test_xuanwu.cpp | chnlkw/xuanwu | f796e9a851d8fad289ac5a625679e7db6c090a04 | [
"MIT"
] | 1 | 2020-04-14T03:39:20.000Z | 2020-04-14T03:39:20.000Z | #include <iostream>
#include <vector>
#include <random>
#include <map>
#include <functional>
#include <set>
#include <xuanwu.hpp>
#include <gtest/gtest.h>
#include "Kernels.h"
#include <boost/di.hpp>
namespace di = boost::di;
using namespace Xuanwu;
namespace std {
template<class K, class V>
std::ostream &operator<<(std::ostream &os, const std::pair<K, V> &p) {
os << "(" << p.first << "," << p.second << ")";
return os;
};
}
TEST(Xuanwu, AddTask) {
auto print = [](const auto &arr) {
printf("%p : ", &arr[0]);
for (unsigned i = 0; i < arr.size(); i++) {
printf("%d ", arr[i]);
}
printf("\n");
};
auto d1 = Data<int>(10);
d1.Write();
auto d2 = Data<int>(d1.size());
d2.Write();
for (unsigned i = 0; i < d1.size(); i++) {
d1[i] = i;
d2[i] = i * i;
}
auto d3 = Data<int>(d1.size());
print(d1);
print(d2);
auto t1 = create_taskadd(d1, d2, d3);
Xuanwu::AddTask(t1);
auto d4 = Data<int>(d1.size());
auto t2 = create_taskadd(d2, d3, d4);
Xuanwu::AddTask(t2);
t2->WaitFinish();
// LOG(INFO) << "After resize";
d1.Read();
d2.Read();
d3.Read();
d4.Read();
// d1.resize(2);
print(d1);
print(d2);
d3.Read();
CUDA_CHECK();
print(d3);
d4.Read();
CUDA_CHECK();
print(d4);
}
INITIALIZE_EASYLOGGINGPP
size_t gpu_memory = 100LU<<20;
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
el::Loggers::configureFromGlobal("logging.conf");
int num_gpu = DataCopyInitP2P();
auto injector = di::make_injector(
di::bind<>.to(GPUDevice::NumWorkers{4}),
#ifdef NUMA
di::bind<AllocatorFactory<CPUDevice>>().to<NumaAllocatorFactory<CudaHostAllocator>>(),
#else
di::bind<AllocatorFactory<CPUDevice>>().to<CudaHostAllocatorFactory>(),
#endif
// di::bind<AllocatorFactory<GPUDevice>>().to<CudaAllocatorFactory>(),
di::bind<AllocatorFactory<GPUDevice>>().to<PreAllocatorFactory<CudaAllocatorFactory>>(),
di::bind<>.to(PreAllocatorFactory<CudaAllocatorFactory>::Space{gpu_memory}),
di::bind<MMBase>().to<MMMultiDevice<CPUDevice, GPUDevice>>(),
di::bind<MyDeviceGroup>().to(MultipleDevicesGroup<CPUDevice, GPUDevice>(1, num_gpu))
);
// auto m = injector.create<std::unique_ptr<MMBase>>();
// auto e = injector.create<std::unique_ptr<Engine>>();
auto xw = injector.create<std::shared_ptr<Xuanwu::Xuanwu>>();
int ret = RUN_ALL_TESTS();
return ret;
} | 25.223301 | 100 | 0.583526 | chnlkw |
97e7033444b4adf50f216f36412f793fe70e3533 | 1,328 | cpp | C++ | tests/job/test_jobsystem.cpp | grandmaster789/bop | 909d4156503f83b66de3f7e3284e086bd98905eb | [
"MIT"
] | null | null | null | tests/job/test_jobsystem.cpp | grandmaster789/bop | 909d4156503f83b66de3f7e3284e086bd98905eb | [
"MIT"
] | null | null | null | tests/job/test_jobsystem.cpp | grandmaster789/bop | 909d4156503f83b66de3f7e3284e086bd98905eb | [
"MIT"
] | null | null | null | #include <iostream>
#include <memory>
#include "../../src/job/job_system.h"
#include <catch2/catch.hpp>
namespace testing {
// because of the statics and one-time initialization, we're kind of limited
// in setup/teardown of the scheduler. Hence, we only have a single file
// with a single scheduler configuration that is tested.
//
// We could possibly adress that, but it would mean getting rid of all static
// variables in the scheduler, and re-expressing shared queue access between
// worker threads by going via some kind of parent object.
//
// It's probably going to be trickier than the current setup.
std::atomic<uint32_t> g_Total;
uint32_t test_single_job() {
g_Total = 1111;
auto& job = bop::schedule(
[&] { g_Total = 2222; }
);
job.wait();
return g_Total;
}
uint32_t test_basic_continuation() {
g_Total = 1111;
auto& job = bop::schedule(
[&] { g_Total = 2222; })
.then([&] { g_Total = 3333; })
.then([&] { g_Total = 4444; });
job.wait();
return g_Total;
}
}
TEST_CASE("test_scheduler[single_job]") {
REQUIRE(testing::test_single_job() == 2222);
REQUIRE(testing::test_basic_continuation() == 4444);
} | 26.56 | 81 | 0.600904 | grandmaster789 |
97e8378eec4b6b95d002b74990d743da679d5325 | 32,738 | cpp | C++ | src/backend/vulkan/VulkanTexture.cpp | Shimmen/ArkoseRenderer | d39e1b3d5f5b669370b8aeed5cd1cfada5216763 | [
"MIT"
] | 7 | 2020-11-02T22:27:27.000Z | 2022-01-11T04:25:48.000Z | src/backend/vulkan/VulkanTexture.cpp | Shimmen/ArkoseRenderer | d39e1b3d5f5b669370b8aeed5cd1cfada5216763 | [
"MIT"
] | null | null | null | src/backend/vulkan/VulkanTexture.cpp | Shimmen/ArkoseRenderer | d39e1b3d5f5b669370b8aeed5cd1cfada5216763 | [
"MIT"
] | 2 | 2020-12-09T03:40:05.000Z | 2021-09-14T03:12:40.000Z | #include "VulkanTexture.h"
#include "backend/vulkan/VulkanBackend.h"
#include "utility/Profiling.h"
#include "utility/Logging.h"
#include <stb_image.h>
VulkanTexture::VulkanTexture(Backend& backend, TextureDescription desc)
: Texture(backend, desc)
{
SCOPED_PROFILE_ZONE_GPURESOURCE();
// HACK: Now we longer specify what usage we want for the texture, and instead always select all
// possible capabilities. However, some texture formats (e.g. sRGB formats) do not support being
// used as a storage image, so we need to explicitly disable it for those formats.
bool storageCapable = true;
switch (format()) {
case Texture::Format::R32:
vkFormat = VK_FORMAT_R32_UINT;
break;
case Texture::Format::RGBA8:
vkFormat = VK_FORMAT_R8G8B8A8_UNORM;
break;
case Texture::Format::sRGBA8:
vkFormat = VK_FORMAT_R8G8B8A8_SRGB;
storageCapable = false;
break;
case Texture::Format::R16F:
vkFormat = VK_FORMAT_R16_SFLOAT;
break;
case Texture::Format::R32F:
vkFormat = VK_FORMAT_R32_SFLOAT;
break;
case Texture::Format::RG16F:
vkFormat = VK_FORMAT_R16G16_SFLOAT;
break;
case Texture::Format::RG32F:
vkFormat = VK_FORMAT_R32G32_SFLOAT;
break;
case Texture::Format::RGBA16F:
vkFormat = VK_FORMAT_R16G16B16A16_SFLOAT;
break;
case Texture::Format::RGBA32F:
vkFormat = VK_FORMAT_R32G32B32A32_SFLOAT;
break;
case Texture::Format::Depth32F:
vkFormat = VK_FORMAT_D32_SFLOAT;
storageCapable = false;
break;
case Texture::Format::Depth24Stencil8:
vkFormat = VK_FORMAT_D24_UNORM_S8_UINT;
storageCapable = false;
break;
case Texture::Format::Unknown:
LogErrorAndExit("Trying to create new texture with format Unknown, which is not allowed!\n");
default:
ASSERT_NOT_REACHED();
}
// Unless we want to enable the multisampled storage images feature we can't have that.. So let's just not, for now..
// The Vulkan spec states: If the multisampled storage images feature is not enabled, and usage contains VK_IMAGE_USAGE_STORAGE_BIT, samples must be VK_SAMPLE_COUNT_1_BIT
if (multisampling() != Texture::Multisampling::None) {
storageCapable = false;
}
// Since we don't specify usage we have to assume all of them may be used (at least the common operations)
const VkImageUsageFlags attachmentFlags = hasDepthFormat() ? VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT : VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
VkImageUsageFlags usageFlags = attachmentFlags | VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
if (storageCapable)
usageFlags |= VK_IMAGE_USAGE_STORAGE_BIT;
// (if we later want to generate mipmaps we need the ability to use each mip as a src & dst in blitting)
if (hasMipmaps()) {
usageFlags |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
usageFlags |= VK_IMAGE_USAGE_TRANSFER_DST_BIT;
}
if (vulkanDebugMode) {
// for nsight debugging & similar stuff, which needs access to everything
usageFlags |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
usageFlags |= VK_BUFFER_USAGE_TRANSFER_DST_BIT;
}
// TODO: For now always keep images in device local memory.
VmaAllocationCreateInfo allocCreateInfo = {};
allocCreateInfo.usage = VMA_MEMORY_USAGE_GPU_ONLY;
VkImageCreateInfo imageCreateInfo = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO };
imageCreateInfo.extent = { .width = extent().width(), .height = extent().height(), .depth = 1 };
imageCreateInfo.mipLevels = mipLevels();
imageCreateInfo.usage = usageFlags;
imageCreateInfo.format = vkFormat;
imageCreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL;
imageCreateInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
imageCreateInfo.samples = static_cast<VkSampleCountFlagBits>(multisampling());
imageCreateInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
vkUsage = usageFlags;
switch (type()) {
case Type::Texture2D:
imageCreateInfo.imageType = VK_IMAGE_TYPE_2D;
imageCreateInfo.arrayLayers = arrayCount();
break;
case Type::Cubemap:
imageCreateInfo.imageType = VK_IMAGE_TYPE_2D;
imageCreateInfo.flags = VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
imageCreateInfo.arrayLayers = 6 * arrayCount();
break;
default:
ASSERT_NOT_REACHED();
}
{
SCOPED_PROFILE_ZONE_NAMED("vmaCreateImage");
auto& allocator = static_cast<VulkanBackend&>(backend).globalAllocator();
if (vmaCreateImage(allocator, &imageCreateInfo, &allocCreateInfo, &image, &allocation, nullptr) != VK_SUCCESS) {
LogError("VulkanBackend::newTexture(): could not create image.\n");
}
}
VkImageAspectFlags aspectFlags = 0u;
if (hasDepthFormat()) {
// Create view for the depth aspect only
aspectFlags |= VK_IMAGE_ASPECT_DEPTH_BIT;
} else {
aspectFlags |= VK_IMAGE_ASPECT_COLOR_BIT;
}
VkImageViewCreateInfo viewCreateInfo = { VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO };
viewCreateInfo.subresourceRange.aspectMask = aspectFlags;
viewCreateInfo.image = image;
viewCreateInfo.format = vkFormat;
viewCreateInfo.components = {
VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_IDENTITY
};
viewCreateInfo.subresourceRange.baseMipLevel = 0;
viewCreateInfo.subresourceRange.levelCount = mipLevels();
switch (type()) {
case Type::Texture2D:
viewCreateInfo.subresourceRange.baseArrayLayer = 0;
viewCreateInfo.subresourceRange.layerCount = arrayCount();
viewCreateInfo.viewType = isArray()
? VK_IMAGE_VIEW_TYPE_2D_ARRAY
: VK_IMAGE_VIEW_TYPE_2D;
break;
case Type::Cubemap:
viewCreateInfo.subresourceRange.baseArrayLayer = 0;
viewCreateInfo.subresourceRange.layerCount = 6 * arrayCount();
viewCreateInfo.viewType = isArray()
? VK_IMAGE_VIEW_TYPE_CUBE_ARRAY
: VK_IMAGE_VIEW_TYPE_CUBE;
break;
default:
ASSERT_NOT_REACHED();
}
VkDevice device = static_cast<VulkanBackend&>(backend).device();
if (vkCreateImageView(device, &viewCreateInfo, nullptr, &imageView) != VK_SUCCESS) {
LogError("VulkanBackend::newTexture(): could not create image view.\n");
}
VkFilter vkMinFilter;
switch (minFilter()) {
case Texture::MinFilter::Linear:
vkMinFilter = VK_FILTER_LINEAR;
break;
case Texture::MinFilter::Nearest:
vkMinFilter = VK_FILTER_NEAREST;
break;
default:
vkMinFilter = VK_FILTER_MAX_ENUM;
ASSERT_NOT_REACHED();
}
VkFilter vkMagFilter;
switch (magFilter()) {
case Texture::MagFilter::Linear:
vkMagFilter = VK_FILTER_LINEAR;
break;
case Texture::MagFilter::Nearest:
vkMagFilter = VK_FILTER_NEAREST;
break;
default:
vkMagFilter = VK_FILTER_MAX_ENUM;
ASSERT_NOT_REACHED();
}
auto wrapModeToAddressMode = [](WrapMode mode) -> VkSamplerAddressMode {
switch (mode) {
case WrapMode::Repeat:
return VK_SAMPLER_ADDRESS_MODE_REPEAT;
case WrapMode::MirroredRepeat:
return VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT;
case WrapMode::ClampToEdge:
return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
default:
ASSERT_NOT_REACHED();
}
};
VkSamplerCreateInfo samplerCreateInfo = { VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO };
samplerCreateInfo.unnormalizedCoordinates = VK_FALSE;
samplerCreateInfo.magFilter = vkMagFilter;
samplerCreateInfo.minFilter = vkMinFilter;
samplerCreateInfo.addressModeU = wrapModeToAddressMode(wrapMode().u);
samplerCreateInfo.addressModeV = wrapModeToAddressMode(wrapMode().v);
samplerCreateInfo.addressModeW = wrapModeToAddressMode(wrapMode().w);
samplerCreateInfo.borderColor = VK_BORDER_COLOR_INT_OPAQUE_BLACK;
samplerCreateInfo.anisotropyEnable = VK_TRUE;
samplerCreateInfo.maxAnisotropy = 16.0f;
samplerCreateInfo.compareEnable = VK_FALSE;
samplerCreateInfo.compareOp = VK_COMPARE_OP_ALWAYS;
samplerCreateInfo.mipLodBias = 0.0f;
samplerCreateInfo.minLod = 0.0f;
switch (mipmap()) {
case Texture::Mipmap::None:
samplerCreateInfo.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST;
samplerCreateInfo.maxLod = 0.0f;
break;
case Texture::Mipmap::Nearest:
samplerCreateInfo.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST;
samplerCreateInfo.maxLod = static_cast<float>(mipLevels());
break;
case Texture::Mipmap::Linear:
samplerCreateInfo.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR;
samplerCreateInfo.maxLod = static_cast<float>(mipLevels());
break;
}
if (vkCreateSampler(device, &samplerCreateInfo, nullptr, &sampler) != VK_SUCCESS) {
LogError("VulkanBackend::newTexture(): could not create sampler for the image.\n");
}
currentLayout = VK_IMAGE_LAYOUT_UNDEFINED;
}
VulkanTexture::~VulkanTexture()
{
if (!hasBackend())
return;
auto& vulkanBackend = static_cast<VulkanBackend&>(backend());
vkDestroySampler(vulkanBackend.device(), sampler, nullptr);
vkDestroyImageView(vulkanBackend.device(), imageView, nullptr);
vmaDestroyImage(vulkanBackend.globalAllocator(), image, allocation);
}
void VulkanTexture::setName(const std::string& name)
{
SCOPED_PROFILE_ZONE_GPURESOURCE();
Resource::setName(name);
auto& vulkanBackend = static_cast<VulkanBackend&>(backend());
if (vulkanBackend.hasDebugUtilsSupport()) {
std::string imageViewName = name + "-view";
std::string samplerName = name + "-sampler";
{
VkDebugUtilsObjectNameInfoEXT nameInfo = { VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT };
nameInfo.objectType = VK_OBJECT_TYPE_IMAGE;
nameInfo.objectHandle = reinterpret_cast<uint64_t>(image);
nameInfo.pObjectName = name.c_str();
if (vulkanBackend.debugUtils().vkSetDebugUtilsObjectNameEXT(vulkanBackend.device(), &nameInfo) != VK_SUCCESS) {
LogWarning("Could not set debug name for vulkan image resource.\n");
}
}
{
VkDebugUtilsObjectNameInfoEXT nameInfo = { VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT };
nameInfo.objectType = VK_OBJECT_TYPE_IMAGE_VIEW;
nameInfo.objectHandle = reinterpret_cast<uint64_t>(imageView);
nameInfo.pObjectName = imageViewName.c_str();
if (vulkanBackend.debugUtils().vkSetDebugUtilsObjectNameEXT(vulkanBackend.device(), &nameInfo) != VK_SUCCESS) {
LogWarning("Could not set debug name for vulkan image view resource.\n");
}
}
{
VkDebugUtilsObjectNameInfoEXT nameInfo = { VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT };
nameInfo.objectType = VK_OBJECT_TYPE_SAMPLER;
nameInfo.objectHandle = reinterpret_cast<uint64_t>(sampler);
nameInfo.pObjectName = samplerName.c_str();
if (vulkanBackend.debugUtils().vkSetDebugUtilsObjectNameEXT(vulkanBackend.device(), &nameInfo) != VK_SUCCESS) {
LogWarning("Could not set debug name for vulkan sampler resource.\n");
}
}
}
}
void VulkanTexture::clear(ClearColor color)
{
SCOPED_PROFILE_ZONE_GPURESOURCE();
auto& vulkanBackend = static_cast<VulkanBackend&>(backend());
// TODO: Support depth texture clears!
ASSERT(!hasDepthFormat());
std::optional<VkImageLayout> originalLayout;
if (currentLayout != VK_IMAGE_LAYOUT_GENERAL && currentLayout != VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
originalLayout = currentLayout;
VkImageMemoryBarrier imageBarrier = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER };
imageBarrier.oldLayout = originalLayout.value();
imageBarrier.newLayout = VK_IMAGE_LAYOUT_GENERAL;
imageBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
imageBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
imageBarrier.image = image;
imageBarrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
imageBarrier.subresourceRange.baseMipLevel = 0;
imageBarrier.subresourceRange.levelCount = mipLevels();
imageBarrier.subresourceRange.baseArrayLayer = 0;
imageBarrier.subresourceRange.layerCount = layerCount();
// FIXME: Probably overly aggressive barriers!
VkPipelineStageFlags sourceStage = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT;
imageBarrier.srcAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT;
VkPipelineStageFlags destinationStage = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT;
imageBarrier.dstAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT;
bool success = vulkanBackend.issueSingleTimeCommand([&](VkCommandBuffer commandBuffer) {
vkCmdPipelineBarrier(commandBuffer,
sourceStage, destinationStage, 0,
0, nullptr,
0, nullptr,
1, &imageBarrier);
});
if (!success) {
LogError("Could not transition image to general layout.\n");
return;
}
}
VkClearColorValue clearValue {};
clearValue.float32[0] = color.r;
clearValue.float32[1] = color.g;
clearValue.float32[2] = color.b;
clearValue.float32[3] = color.a;
VkImageSubresourceRange range {};
range.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
range.baseMipLevel = 0;
range.levelCount = mipLevels();
range.baseArrayLayer = 0;
range.layerCount = layerCount();
bool success = vulkanBackend.issueSingleTimeCommand([&](VkCommandBuffer commandBuffer) {
vkCmdClearColorImage(commandBuffer, image, VK_IMAGE_LAYOUT_GENERAL, &clearValue, 1, &range);
});
if (!success) {
LogError("Could not clear the color image.\n");
return;
}
if (originalLayout.has_value() && originalLayout.value() != VK_IMAGE_LAYOUT_UNDEFINED && originalLayout.value() != VK_IMAGE_LAYOUT_PREINITIALIZED) {
VkImageMemoryBarrier imageBarrier = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER };
imageBarrier.oldLayout = VK_IMAGE_LAYOUT_GENERAL;
imageBarrier.newLayout = originalLayout.value();
imageBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
imageBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
imageBarrier.image = image;
imageBarrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
imageBarrier.subresourceRange.baseMipLevel = 0;
imageBarrier.subresourceRange.levelCount = mipLevels();
imageBarrier.subresourceRange.baseArrayLayer = 0;
imageBarrier.subresourceRange.layerCount = layerCount();
// FIXME: Probably overly aggressive barriers!
VkPipelineStageFlags sourceStage = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT;
imageBarrier.srcAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT;
VkPipelineStageFlags destinationStage = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT;
imageBarrier.dstAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT;
bool success = vulkanBackend.issueSingleTimeCommand([&](VkCommandBuffer commandBuffer) {
vkCmdPipelineBarrier(commandBuffer,
sourceStage, destinationStage, 0,
0, nullptr,
0, nullptr,
1, &imageBarrier);
});
if (!success) {
LogError("Could not transition image back to original layout.\n");
return;
}
}
}
void VulkanTexture::setPixelData(vec4 pixel)
{
SCOPED_PROFILE_ZONE_GPURESOURCE();
int numChannels;
bool isHdr = false;
switch (format()) {
case Texture::Format::R32:
numChannels = 1;
isHdr = false;
break;
case Texture::Format::R16F:
case Texture::Format::R32F:
numChannels = 1;
isHdr = true;
break;
case Texture::Format::RG16F:
case Texture::Format::RG32F:
numChannels = 2;
isHdr = true;
break;
case Texture::Format::RGBA8:
case Texture::Format::sRGBA8:
numChannels = 4;
isHdr = false;
break;
case Texture::Format::RGBA16F:
case Texture::Format::RGBA32F:
numChannels = 4;
isHdr = true;
break;
case Texture::Format::Depth32F:
numChannels = 1;
isHdr = true;
break;
case Texture::Format::Unknown:
ASSERT_NOT_REACHED();
break;
}
ASSERT(numChannels == 4);
moos::u8 pixels[4];
VkDeviceSize pixelsSize;
if (isHdr) {
pixelsSize = sizeof(vec4);
} else {
pixels[0] = (stbi_uc)(moos::clamp(pixel.x, 0.0f, 1.0f) * 255.99f);
pixels[1] = (stbi_uc)(moos::clamp(pixel.y, 0.0f, 1.0f) * 255.99f);
pixels[2] = (stbi_uc)(moos::clamp(pixel.z, 0.0f, 1.0f) * 255.99f);
pixels[3] = (stbi_uc)(moos::clamp(pixel.w, 0.0f, 1.0f) * 255.99f);
pixelsSize = 4 * sizeof(stbi_uc);
}
VkBufferCreateInfo bufferCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };
bufferCreateInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
bufferCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT;
bufferCreateInfo.size = pixelsSize;
VmaAllocationCreateInfo allocCreateInfo = {};
allocCreateInfo.usage = VMA_MEMORY_USAGE_CPU_ONLY;
auto& vulkanBackend = static_cast<VulkanBackend&>(backend());
VkBuffer stagingBuffer;
VmaAllocation stagingAllocation;
if (vmaCreateBuffer(vulkanBackend.globalAllocator(), &bufferCreateInfo, &allocCreateInfo, &stagingBuffer, &stagingAllocation, nullptr) != VK_SUCCESS) {
LogError("Could not create staging buffer for updating image with pixel-data.\n");
}
if (!vulkanBackend.setBufferMemoryUsingMapping(stagingAllocation, isHdr ? (uint8_t*)value_ptr(pixel) : (uint8_t*)pixels, pixelsSize)) {
LogError("Could not set the buffer memory for the staging buffer for updating image with pixel-data.\n");
return;
}
AtScopeExit cleanUpStagingBuffer([&]() {
vmaDestroyBuffer(vulkanBackend.globalAllocator(), stagingBuffer, stagingAllocation);
});
if (currentLayout != VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
VkImageMemoryBarrier imageBarrier = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER };
imageBarrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
imageBarrier.newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
imageBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
imageBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
imageBarrier.image = image;
imageBarrier.subresourceRange.aspectMask = aspectMask();
imageBarrier.subresourceRange.baseMipLevel = 0;
imageBarrier.subresourceRange.levelCount = 1;
imageBarrier.subresourceRange.baseArrayLayer = 0;
imageBarrier.subresourceRange.layerCount = 1;
VkPipelineStageFlags sourceStage = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT;
imageBarrier.srcAccessMask = 0;
VkPipelineStageFlags destinationStage = VK_PIPELINE_STAGE_TRANSFER_BIT;
imageBarrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
bool success = vulkanBackend.issueSingleTimeCommand([&](VkCommandBuffer commandBuffer) {
vkCmdPipelineBarrier(commandBuffer, sourceStage, destinationStage, 0,
0, nullptr,
0, nullptr,
1, &imageBarrier);
});
if (!success) {
LogError("Could not transition the image to transfer optimal layout.\n");
return;
}
}
if (!vulkanBackend.copyBufferToImage(stagingBuffer, image, 1, 1, hasDepthFormat())) {
LogError("Could not copy the staging buffer to the image.\n");
return;
}
VkImageMemoryBarrier imageBarrier = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER };
{
imageBarrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
imageBarrier.newLayout = VK_IMAGE_LAYOUT_GENERAL;
imageBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
imageBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
imageBarrier.image = image;
imageBarrier.subresourceRange.aspectMask = aspectMask();
imageBarrier.subresourceRange.baseMipLevel = 0;
imageBarrier.subresourceRange.levelCount = 1;
imageBarrier.subresourceRange.baseArrayLayer = 0;
imageBarrier.subresourceRange.layerCount = 1;
imageBarrier.srcAccessMask = 0;
imageBarrier.dstAccessMask = VK_ACCESS_MEMORY_READ_BIT;
}
bool success = static_cast<VulkanBackend&>(backend()).issueSingleTimeCommand([&](VkCommandBuffer commandBuffer) {
vkCmdPipelineBarrier(commandBuffer,
VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0,
0, nullptr,
0, nullptr,
1, &imageBarrier);
});
if (!success) {
LogError("Error transitioning layout after setting pixel data\n");
}
currentLayout = VK_IMAGE_LAYOUT_GENERAL;
}
void VulkanTexture::setData(const void* data, size_t size)
{
SCOPED_PROFILE_ZONE_GPURESOURCE();
auto& vulkanBackend = static_cast<VulkanBackend&>(backend());
VkBufferCreateInfo bufferCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };
bufferCreateInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
bufferCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT;
bufferCreateInfo.size = size;
VmaAllocationCreateInfo allocCreateInfo = {};
allocCreateInfo.usage = VMA_MEMORY_USAGE_CPU_ONLY;
VkBuffer stagingBuffer;
VmaAllocation stagingAllocation;
if (vmaCreateBuffer(vulkanBackend.globalAllocator(), &bufferCreateInfo, &allocCreateInfo, &stagingBuffer, &stagingAllocation, nullptr) != VK_SUCCESS) {
LogError("VulkanBackend::updateTexture(): could not create staging buffer.\n");
}
if (!vulkanBackend.setBufferMemoryUsingMapping(stagingAllocation, (uint8_t*)data, size)) {
LogError("VulkanBackend::updateTexture(): could set the buffer memory for the staging buffer.\n");
return;
}
AtScopeExit cleanUpStagingBuffer([&]() {
vmaDestroyBuffer(vulkanBackend.globalAllocator(), stagingBuffer, stagingAllocation);
});
if (currentLayout != VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {
VkImageMemoryBarrier imageBarrier = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER };
imageBarrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
imageBarrier.newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
imageBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
imageBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
imageBarrier.image = image;
imageBarrier.subresourceRange.aspectMask = aspectMask();
imageBarrier.subresourceRange.baseMipLevel = 0;
imageBarrier.subresourceRange.levelCount = 1;
imageBarrier.subresourceRange.baseArrayLayer = 0;
imageBarrier.subresourceRange.layerCount = 1;
VkPipelineStageFlags sourceStage = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT;
imageBarrier.srcAccessMask = 0;
VkPipelineStageFlags destinationStage = VK_PIPELINE_STAGE_TRANSFER_BIT;
imageBarrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
bool success = vulkanBackend.issueSingleTimeCommand([&](VkCommandBuffer commandBuffer) {
vkCmdPipelineBarrier(commandBuffer, sourceStage, destinationStage, 0,
0, nullptr,
0, nullptr,
1, &imageBarrier);
});
if (!success) {
LogError("Could not transition the image to transfer optimal layout.\n");
return;
}
}
if (!vulkanBackend.copyBufferToImage(stagingBuffer, image, extent().width(), extent().height(), hasDepthFormat())) {
LogError("Could not copy the staging buffer to the image.\n");
return;
}
currentLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
if (mipmap() != Texture::Mipmap::None && extent().width() > 1 && extent().height() > 1) {
generateMipmaps();
} else {
VkImageMemoryBarrier imageBarrier = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER };
{
imageBarrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
imageBarrier.newLayout = VK_IMAGE_LAYOUT_GENERAL;
imageBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
imageBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
imageBarrier.image = image;
imageBarrier.subresourceRange.aspectMask = aspectMask();
imageBarrier.subresourceRange.baseMipLevel = 0;
imageBarrier.subresourceRange.levelCount = 1;
imageBarrier.subresourceRange.baseArrayLayer = 0;
imageBarrier.subresourceRange.layerCount = 1;
imageBarrier.srcAccessMask = 0;
imageBarrier.dstAccessMask = VK_ACCESS_MEMORY_READ_BIT;
}
bool success = static_cast<VulkanBackend&>(backend()).issueSingleTimeCommand([&](VkCommandBuffer commandBuffer) {
vkCmdPipelineBarrier(commandBuffer,
VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0,
0, nullptr,
0, nullptr,
1, &imageBarrier);
});
if (!success) {
LogError("Error transitioning layout after setting texture data\n");
}
}
currentLayout = VK_IMAGE_LAYOUT_GENERAL;
}
void VulkanTexture::generateMipmaps()
{
SCOPED_PROFILE_ZONE_GPURESOURCE();
if (!hasMipmaps()) {
LogError("VulkanTexture: generateMipmaps() called on texture which doesn't have space for mipmaps allocated. Ignoring request.\n");
return;
}
if (currentLayout == VK_IMAGE_LAYOUT_UNDEFINED) {
LogError("VulkanTexture: generateMipmaps() called on texture which currently has the layout VK_IMAGE_LAYOUT_UNDEFINED. Ignoring request.\n");
return;
}
VkImageMemoryBarrier barrier = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER };
barrier.subresourceRange.aspectMask = aspectMask();
barrier.image = image;
barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
barrier.subresourceRange.baseArrayLayer = 0;
barrier.subresourceRange.layerCount = 1;
barrier.subresourceRange.levelCount = 1;
uint32_t levels = mipLevels();
int32_t mipWidth = extent().width();
int32_t mipHeight = extent().height();
// We have to be very general in this function..
VkPipelineStageFlags dstStage = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT;
VkImageLayout finalLayout = VK_IMAGE_LAYOUT_GENERAL;
VkAccessFlags finalAccess = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT;
bool success = static_cast<VulkanBackend&>(backend()).issueSingleTimeCommand([&](VkCommandBuffer commandBuffer) {
// Transition mips 1-n to transfer dst optimal
{
VkImageMemoryBarrier initialBarrier = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER };
initialBarrier.image = image;
initialBarrier.subresourceRange.aspectMask = aspectMask();
initialBarrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
initialBarrier.newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
initialBarrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
initialBarrier.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
initialBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
initialBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
initialBarrier.subresourceRange.baseArrayLayer = 0;
initialBarrier.subresourceRange.layerCount = 1;
initialBarrier.subresourceRange.baseMipLevel = 1;
initialBarrier.subresourceRange.levelCount = levels - 1;
vkCmdPipelineBarrier(commandBuffer,
VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0,
0, nullptr,
0, nullptr,
1, &initialBarrier);
}
for (uint32_t i = 1; i < levels; ++i) {
int32_t nextWidth = mipWidth > 1 ? mipWidth / 2 : 1;
int32_t nextHeight = mipHeight > 1 ? mipHeight / 2 : 1;
// The 'currentLayout' keeps track of the whole image (or kind of mip0) but when we are messing
// with it here, it will have to be different for the different mip levels.
VkImageLayout oldLayout = (i == 1) ? currentLayout : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
barrier.subresourceRange.baseMipLevel = i - 1;
barrier.oldLayout = oldLayout;
barrier.newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
barrier.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
vkCmdPipelineBarrier(commandBuffer,
VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0,
0, nullptr,
0, nullptr,
1, &barrier);
VkImageBlit blit = {};
blit.srcOffsets[0] = { 0, 0, 0 };
blit.srcOffsets[1] = { mipWidth, mipHeight, 1 };
blit.srcSubresource.aspectMask = aspectMask();
blit.srcSubresource.mipLevel = i - 1;
blit.srcSubresource.baseArrayLayer = 0;
blit.srcSubresource.layerCount = 1;
blit.dstOffsets[0] = { 0, 0, 0 };
blit.dstOffsets[1] = { nextWidth, nextHeight, 1 };
blit.dstSubresource.aspectMask = aspectMask();
blit.dstSubresource.mipLevel = i;
blit.dstSubresource.baseArrayLayer = 0;
blit.dstSubresource.layerCount = 1;
vkCmdBlitImage(commandBuffer,
image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
1, &blit,
VK_FILTER_LINEAR);
barrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
barrier.newLayout = finalLayout;
barrier.srcAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
barrier.dstAccessMask = finalAccess;
vkCmdPipelineBarrier(commandBuffer,
VK_PIPELINE_STAGE_TRANSFER_BIT, dstStage, 0,
0, nullptr,
0, nullptr,
1, &barrier);
mipWidth = nextWidth;
mipHeight = nextHeight;
}
barrier.subresourceRange.baseMipLevel = levels - 1;
barrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
barrier.newLayout = finalLayout;
barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
barrier.dstAccessMask = finalAccess;
vkCmdPipelineBarrier(commandBuffer,
VK_PIPELINE_STAGE_TRANSFER_BIT, dstStage, 0,
0, nullptr,
0, nullptr,
1, &barrier);
});
if (!success) {
LogError("VulkanTexture: error while generating mipmaps\n");
}
}
uint32_t VulkanTexture::layerCount() const
{
switch (type()) {
case Texture::Type::Texture2D:
return arrayCount();
case Texture::Type::Cubemap:
return 6 * arrayCount();
default:
ASSERT_NOT_REACHED();
}
}
VkImageAspectFlags VulkanTexture::aspectMask() const
{
VkImageAspectFlags mask = 0u;
if (hasDepthFormat()) {
mask |= VK_IMAGE_ASPECT_DEPTH_BIT;
if (hasStencilFormat())
mask |= VK_IMAGE_ASPECT_STENCIL_BIT;
} else {
mask |= VK_IMAGE_ASPECT_COLOR_BIT;
}
return mask;
}
| 40.070991 | 174 | 0.668581 | Shimmen |
97e90f3bdcbc8371608e10bf9bf69f4535f6f780 | 766 | cpp | C++ | linked_list/19_remove_Nth_node_from_end_of_list.cpp | rspezialetti/leetcode | 4614ffe2a4923aae02f93096b6200239e6f201c1 | [
"MIT"
] | 1 | 2019-08-21T21:25:34.000Z | 2019-08-21T21:25:34.000Z | linked_list/19_remove_Nth_node_from_end_of_list.cpp | rspezialetti/leetcode | 4614ffe2a4923aae02f93096b6200239e6f201c1 | [
"MIT"
] | null | null | null | linked_list/19_remove_Nth_node_from_end_of_list.cpp | rspezialetti/leetcode | 4614ffe2a4923aae02f93096b6200239e6f201c1 | [
"MIT"
] | null | null | null | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* removeNthFromEnd(ListNode* head, int n)
{
ListNode* p1 = head;
ListNode* p2 = head;
for(int k = 0; k < n; ++k)
{
p2 = p2->next;
if(!p2)
return head->next;
}
while(p2)
{
p2 = p2->next;
if(p2 == nullptr)
{
p1->next = p1->next->next;
break;
}
else
{
p1 = p1->next;
}
}
return head;
}
};
| 19.15 | 54 | 0.362924 | rspezialetti |
97f00d5ac2bf65e3e4ea704afc2d160f16c51781 | 608 | cpp | C++ | 1. White/Week 2/04. Maximizer/main.cpp | AmaterasuOmikami/The-art-of-modern-Cpp-development | 4f0958197da92d216ee526384a6f7386a0fe62a0 | [
"MIT"
] | 1 | 2022-02-17T10:58:58.000Z | 2022-02-17T10:58:58.000Z | 1. White/Week 2/04. Maximizer/main.cpp | AmaterasuOmikami/The-art-of-modern-Cpp-development | 4f0958197da92d216ee526384a6f7386a0fe62a0 | [
"MIT"
] | null | null | null | 1. White/Week 2/04. Maximizer/main.cpp | AmaterasuOmikami/The-art-of-modern-Cpp-development | 4f0958197da92d216ee526384a6f7386a0fe62a0 | [
"MIT"
] | null | null | null | /*
* Напишите функцию UpdateIfGreater, которая принимает два целочисленных
* аргумента: first и second. Если first оказался больше second, Ваша функция
* должна записывать в second значение параметра first. При этом указанная
* функция не должна ничего возвращать, а изменение параметра second должно
* быть видно на вызывающей стороне.
*/
#include <iostream>
using namespace std;
void UpdateIfGreater(int first, int& second) {
if (first > second) {
second = first;
}
}
int main() {
int a = 13, b = 4;
UpdateIfGreater(a, b);
cout << "a: " << a << ", b: " << b << endl;
}
| 26.434783 | 77 | 0.674342 | AmaterasuOmikami |
97f71d19eb120b707987701e910827a7e00c84a3 | 2,700 | hpp | C++ | simann.hpp | CISMM/SimulatedAnnealing | cd25cc58ced18a0df8e93fde32dc7a8107a1eca7 | [
"BSD-3-Clause"
] | 4 | 2018-02-07T05:13:05.000Z | 2019-04-02T06:02:12.000Z | simann.hpp | CISMM/SimulatedAnnealing | cd25cc58ced18a0df8e93fde32dc7a8107a1eca7 | [
"BSD-3-Clause"
] | null | null | null | simann.hpp | CISMM/SimulatedAnnealing | cd25cc58ced18a0df8e93fde32dc7a8107a1eca7 | [
"BSD-3-Clause"
] | 5 | 2015-07-16T23:44:29.000Z | 2019-02-05T20:33:43.000Z | // simanneal.hpp A general purpose Simulated Annealing Class
// This version allows vector data
// (c) Copyright 1994, Everett F. Carter Jr.
// Permission is granted by the author to use
// this software for any application provided this
// copyright notice is preserved.
// Updated to 2003 C++ standard by Shawn Waldon in 2014
// rcsid: @(#)simann.hpp 1.4 15:02:11 7/25/94 EFC
#ifndef SIM_ANNEAL_HPP_
#define SIM_ANNEAL_HPP_ 1.4
#include <random.hpp>
#ifndef PI
#define PI 3.141592653589793
#endif
// Added to allow a more object oriented cost function to be passed in without
// the need for global data accessible to the cost function
struct CostFunction
{
public:
double (*function)(double*, void*);
void* data;
// Constructors:
CostFunction() : function(NULL), data(NULL) {}
CostFunction(double (*f)(double*, void*), void* d = NULL) : function(f), data(d)
{
}
double operator()(double* f) { return function(f, data); }
};
//typedef double (*CostFunction)(double*);
class SimAnneal
{
private:
RUniform uniform;
CostFunction func;
int dimension, maxit, ddwell;
int err;
double* x, *xnew, *xbest;
double dt; // temperature increment to use when melting
double c_jump; // phase transition step size
double rrange;
double K, rho, t0, tscale, y, ybest;
int equilibrate(const double t, const int n);
public:
SimAnneal()
: func(NULL),
dimension(1),
maxit(400),
ddwell(20),
dt(0.1),
c_jump(100.0),
rrange(PI / 2.0),
K(1.0),
rho(0.5),
t0(0.0),
tscale(0.1)
{
}
SimAnneal(const CostFunction& f, const int d = 1);
~SimAnneal()
{
delete[] x;
delete[] xnew;
delete[] xbest;
}
int set_up(CostFunction f, const int d = 1);
const int operator!() const { return err; }
double melt(const int iters = -1);
double anneal(const int iters = -1);
int iterations(const int m = -1)
{
if (m > 0) maxit = m;
return maxit;
}
int dwell(const int d = -1)
{
if (d > 0) ddwell = d;
return ddwell;
}
double Boltzmann(const double k = -1.0)
{
if (k > 0.0) K = k;
return K;
}
double learning_rate(const double r = -1.0)
{
if (r > 0.0) rho = r;
return rho;
}
double temperature(const double t = -1.0)
{
if (t >= 0.0) t0 = t;
return t0;
}
double jump(const double j = -1.0)
{
if (j > 0.0) c_jump = j;
return c_jump;
}
double range(const double r = -1.0)
{
if (r > 0.0) rrange = r;
return rrange;
}
void initial(const double* xinit);
void current(double* xcur);
void optimum(double* xopt);
};
#endif
| 21.259843 | 82 | 0.604444 | CISMM |
97fcbfd529b53be65bb88383dd8f4218fde858cf | 473 | cpp | C++ | codeforces/869/a.cpp | AadityaJ/Spoj | 61664c1925ef5bb072a3fe78fb3dac4fb68d77a1 | [
"MIT"
] | null | null | null | codeforces/869/a.cpp | AadityaJ/Spoj | 61664c1925ef5bb072a3fe78fb3dac4fb68d77a1 | [
"MIT"
] | null | null | null | codeforces/869/a.cpp | AadityaJ/Spoj | 61664c1925ef5bb072a3fe78fb3dac4fb68d77a1 | [
"MIT"
] | null | null | null | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#define MX 4000007
bool vis[MX];
using namespace std;
int main(int argc, char const *argv[]) {
int n;
cin>>n;
int a1[n];
int a2[n];
for(int i=0;i<n;i++) {cin>>a1[i];vis[a1[i]]=1;}
for(int i=0;i<n;i++) {cin>>a2[i];vis[a2[i]]=1;}
int ans=0;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
if(vis[a1[i]^a2[j]]) ans++;
}
}
if(ans%2) cout<<"Koyomi\n";
else cout<<"Karen\n";
return 0;
}
| 18.92 | 48 | 0.579281 | AadityaJ |
97fd58fb15fb351383d1aef7d733cf6e639eaee9 | 896 | cpp | C++ | Cpp/fost-core/exception-tests.cpp | KayEss/fost-base | 05ac1b6a1fb672c61ba6502efea86f9c5207e28f | [
"BSL-1.0"
] | 2 | 2016-05-25T22:17:38.000Z | 2019-04-02T08:34:17.000Z | Cpp/fost-core/exception-tests.cpp | KayEss/fost-base | 05ac1b6a1fb672c61ba6502efea86f9c5207e28f | [
"BSL-1.0"
] | 5 | 2018-07-13T10:43:05.000Z | 2019-09-02T14:54:42.000Z | Cpp/fost-core/exception-tests.cpp | KayEss/fost-base | 05ac1b6a1fb672c61ba6502efea86f9c5207e28f | [
"BSL-1.0"
] | 1 | 2020-10-22T20:44:24.000Z | 2020-10-22T20:44:24.000Z | /**
Copyright 2010-2019 Red Anchor Trading Co. Ltd.
Distributed under the Boost Software License, Version 1.0.
See <http://www.boost.org/LICENSE_1_0.txt>
*/
#include "fost-core-test.hpp"
#include <boost/asio.hpp>
FSL_TEST_SUITE(exceptions);
FSL_TEST_FUNCTION(not_implemented) {
FSL_CHECK_EXCEPTION(
throw fostlib::exceptions::not_implemented(
"Not implemented exception thrown"),
fostlib::exceptions::not_implemented &);
FSL_CHECK_EXCEPTION(
throw fostlib::exceptions::not_implemented(
"test_func", boost::asio::error::eof),
fostlib::exceptions::not_implemented &);
FSL_CHECK_EXCEPTION(
throw fostlib::exceptions::not_implemented(
"test_func", boost::asio::error::eof, "Check EOF throw"),
fostlib::exceptions::not_implemented &);
}
| 29.866667 | 77 | 0.639509 | KayEss |
3f019b33403af683c7a70cfc690aaa208092aa10 | 1,584 | hpp | C++ | PnC/NaoPnC/NaoInterface.hpp | BharathMasetty/PnC | 3800bd7e3c5dd5ffa00e6a5f09d48d21c405206f | [
"MIT"
] | null | null | null | PnC/NaoPnC/NaoInterface.hpp | BharathMasetty/PnC | 3800bd7e3c5dd5ffa00e6a5f09d48d21c405206f | [
"MIT"
] | null | null | null | PnC/NaoPnC/NaoInterface.hpp | BharathMasetty/PnC | 3800bd7e3c5dd5ffa00e6a5f09d48d21c405206f | [
"MIT"
] | null | null | null | #pragma once
#include "PnC/EnvInterface.hpp"
#include "PnC/NaoPnC/NaoDefinition.hpp"
class NaoStateProvider;
class NaoStateEstimator;
class NaoSensorData {
public:
NaoSensorData() {
q = Eigen::VectorXd::Zero(Nao::n_adof);
qdot = Eigen::VectorXd::Zero(Nao::n_adof);
virtual_q = Eigen::VectorXd::Zero(Nao::n_vdof);
virtual_qdot = Eigen::VectorXd::Zero(Nao::n_vdof);
// Ignore
lf_wrench = Eigen::VectorXd::Zero(6);
rf_wrench = Eigen::VectorXd::Zero(6);
rfoot_contact = false;
lfoot_contact = false;
}
virtual ~NaoSensorData() {}
Eigen::VectorXd q;
Eigen::VectorXd qdot;
Eigen::VectorXd virtual_q;
Eigen::VectorXd virtual_qdot;
Eigen::VectorXd lf_wrench;
Eigen::VectorXd rf_wrench;
bool rfoot_contact;
bool lfoot_contact;
};
class NaoCommand {
public:
NaoCommand() {
q = Eigen::VectorXd::Zero(Nao::n_adof);
qdot = Eigen::VectorXd::Zero(Nao::n_adof);
jtrq = Eigen::VectorXd::Zero(Nao::n_adof);
}
virtual ~NaoCommand() {}
Eigen::VectorXd q;
Eigen::VectorXd qdot;
Eigen::VectorXd jtrq;
};
class NaoInterface : public EnvInterface {
protected:
void _ParameterSetting();
NaoStateEstimator* state_estimator_;
NaoStateProvider* sp_;
void CropTorque_(NaoCommand*);
bool Initialization_(NaoSensorData*, NaoCommand*);
int count_;
int waiting_count_;
Eigen::VectorXd cmd_jpos_;
Eigen::VectorXd cmd_jvel_;
Eigen::VectorXd cmd_jtrq_;
public:
NaoInterface();
virtual ~NaoInterface();
// Main method
virtual void getCommand(void* _sensor_data, void* _command_data);
};
| 21.12 | 67 | 0.700126 | BharathMasetty |
3f02733f3611ed3dd1fb6964ceba2b89ca2cb1bf | 2,712 | cpp | C++ | RoboRePair/ProgressTracker.cpp | erwinbonsma/RoboRePairGB | 202308220d7bc320a8c228f7a7372545c3e97559 | [
"MIT"
] | null | null | null | RoboRePair/ProgressTracker.cpp | erwinbonsma/RoboRePairGB | 202308220d7bc320a8c228f7a7372545c3e97559 | [
"MIT"
] | null | null | null | RoboRePair/ProgressTracker.cpp | erwinbonsma/RoboRePairGB | 202308220d7bc320a8c228f7a7372545c3e97559 | [
"MIT"
] | null | null | null | /*
* Bumble Bots Re-Pair, a Gamebuino game
*
* Copyright 2020, Erwin Bonsma
*/
#include "ProgressTracker.h"
#include "Levels.h"
//-----------------------------------------------------------------------------
// ProgressTracker implementation
constexpr uint8_t VMAJOR = 1;
constexpr uint8_t VMINOR = 0;
constexpr uint8_t SAVEINDEX_VMAJOR = 0;
constexpr uint8_t SAVEINDEX_VMINOR = 1;
constexpr uint8_t SAVEINDEX_HISCORE = 2;
constexpr uint8_t SAVEINDEX_LEVELHI_L0 = 3;
constexpr uint8_t SAVEINDEX_LAST = SAVEINDEX_LEVELHI_L0 + numLevels - 1;
void ProgressTracker::clearStoredHiScore() {
gb.save.set(SAVEINDEX_HISCORE, (int32_t)0);
}
void ProgressTracker::clearStoredLevelScores() {
for (uint8_t level = 0; level < numLevels; level++) {
gb.save.set(SAVEINDEX_LEVELHI_L0 + level, (int32_t)0);
}
}
void ProgressTracker::init() {
if (
gb.save.get(SAVEINDEX_VMAJOR) != VMAJOR ||
gb.save.get(SAVEINDEX_VMINOR) != VMINOR
) {
// Reset all data. Although format itself has not changed, levels have been
// tweaked so that previous scores are not valid anymore.
clearStoredLevelScores();
clearStoredHiScore();
}
dump();
gb.save.set(SAVEINDEX_VMAJOR, (int32_t)VMAJOR);
gb.save.set(SAVEINDEX_VMINOR, (int32_t)VMINOR);
}
void ProgressTracker::dump() {
#ifdef DEVELOPMENT
SerialUSB.printf("Save file format v%d.%d\n", gb.save.get(SAVEINDEX_VMAJOR), gb.save.get(SAVEINDEX_VMINOR));
SerialUSB.printf("High score = %d\n", gb.save.get(SAVEINDEX_HISCORE));
for (uint8_t i = 0; i < numLevels; i++) {
SerialUSB.printf("Max score level %d = %d\n", (i + 1), gb.save.get(SAVEINDEX_LEVELHI_L0 + i));
}
#endif
}
Score ProgressTracker::levelHiScore(int level) {
return gb.save.get(SAVEINDEX_LEVELHI_L0 + level);
}
Score ProgressTracker::hiScore() {
return gb.save.get(SAVEINDEX_HISCORE);
}
void ProgressTracker::startGame() {
_score = 0;
_improvedHiScore = false;
}
void ProgressTracker::updateHiScore() {
Score oldHiScore = hiScore();
if (_score > oldHiScore) {
gb.save.set(SAVEINDEX_HISCORE, (int32_t)_score);
_improvedHiScore = true;
}
}
void ProgressTracker::startLevel(Score score) {
_score = score;
}
bool ProgressTracker::levelDone(int level, Score score) {
Score oldLevelHi = levelHiScore(level);
Score levelScore = score - _score;
bool improvedLevelHi = false;
if (levelScore > oldLevelHi) {
// New level hi-score!
gb.save.set(SAVEINDEX_LEVELHI_L0 + level, levelScore);
improvedLevelHi = true;
}
updateHiScore();
return improvedLevelHi;
}
bool ProgressTracker::gameDone(Score finalScore) {
_score = finalScore;
updateHiScore();
return improvedHiScore();
}
ProgressTracker progressTracker;
| 24.432432 | 110 | 0.696165 | erwinbonsma |
3f0607721528a5aee61a3387de5b23ec8f3939de | 1,343 | cpp | C++ | Codeforces Online Judge Solve/Candies-1343A.cpp | Remonhasan/programming-solve | 5a4ac8c738dd361e1c974162e0eaebbaae72fd80 | [
"Apache-2.0"
] | null | null | null | Codeforces Online Judge Solve/Candies-1343A.cpp | Remonhasan/programming-solve | 5a4ac8c738dd361e1c974162e0eaebbaae72fd80 | [
"Apache-2.0"
] | null | null | null | Codeforces Online Judge Solve/Candies-1343A.cpp | Remonhasan/programming-solve | 5a4ac8c738dd361e1c974162e0eaebbaae72fd80 | [
"Apache-2.0"
] | null | null | null | #include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ff first
#define ss second
#define int long long
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define vi vector<int>
#define mii map<int,int>
#define pqb priority_queue<int>
#define pqs priority_queue<int,vi,greater<int> >
#define setbits(x) __builtin_popcountll(x)
#define zrobits(x) __builtin_ctzll(x)
#define mod 1000000007
#define inf 1e18
#define ps(x,y) fixed<<setprecision(y)<<x
#define mk(arr,n,type) type *arr=new type[n];
#define w(x) int x; cin>>x; while(x--)
#define FIO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
int32_t main()
{
FIO;
w(t)
{
int n; cin >> n;
int x;
for (int k = 2; k <= 35; ++k)
{
int shakin = pow(2, k) - 1;
if (n % shakin)
continue;
x = n / shakin;
break;
}
cout << x << '\n';
}
return 0;
}
| 25.339623 | 94 | 0.55175 | Remonhasan |
3f073cd0a1f4afd7e3437dbfacaf8772a15623cb | 188 | cpp | C++ | Hackerearth/Practice/birthday_party.cpp | Pankajcoder1/Competitive_programming | 72ee0d41f3f72f43a5c2a232255eb84a04b14df9 | [
"MIT"
] | null | null | null | Hackerearth/Practice/birthday_party.cpp | Pankajcoder1/Competitive_programming | 72ee0d41f3f72f43a5c2a232255eb84a04b14df9 | [
"MIT"
] | null | null | null | Hackerearth/Practice/birthday_party.cpp | Pankajcoder1/Competitive_programming | 72ee0d41f3f72f43a5c2a232255eb84a04b14df9 | [
"MIT"
] | 1 | 2020-10-02T04:51:22.000Z | 2020-10-02T04:51:22.000Z | #include<iostream>
using namespace std;
int main()
{
int T,M,N;
cin>>T;
for(int i=0;i<T;i++)
{
cin>>N>>M;
if(M%N==0)
{
cout<<"Yes"<<endl;
}
else
cout<<"No"<<endl;
}
} | 10.444444 | 21 | 0.505319 | Pankajcoder1 |
3f0f71fce0263087f932fb0c7c8d3c60fc737810 | 5,003 | cpp | C++ | SDK/ARKSurvivalEvolved_AIStateWanderOnLand_functions.cpp | 2bite/ARK-SDK | c38ca9925309516b2093ad8c3a70ed9489e1d573 | [
"MIT"
] | 10 | 2020-02-17T19:08:46.000Z | 2021-07-31T11:07:19.000Z | SDK/ARKSurvivalEvolved_AIStateWanderOnLand_functions.cpp | 2bite/ARK-SDK | c38ca9925309516b2093ad8c3a70ed9489e1d573 | [
"MIT"
] | 9 | 2020-02-17T18:15:41.000Z | 2021-06-06T19:17:34.000Z | SDK/ARKSurvivalEvolved_AIStateWanderOnLand_functions.cpp | 2bite/ARK-SDK | c38ca9925309516b2093ad8c3a70ed9489e1d573 | [
"MIT"
] | 3 | 2020-07-22T17:42:07.000Z | 2021-06-19T17:16:13.000Z | // ARKSurvivalEvolved (329.9) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_AIStateWanderOnLand_parameters.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
// Function AIStateWanderOnLand.AIStateWanderOnLand_C.FindTargetAreas
// ()
// Parameters:
// bool found (Parm, OutParm, ZeroConstructor, IsPlainOldData)
void UAIStateWanderOnLand_C::FindTargetAreas(bool* found)
{
static auto fn = UObject::FindObject<UFunction>("Function AIStateWanderOnLand.AIStateWanderOnLand_C.FindTargetAreas");
UAIStateWanderOnLand_C_FindTargetAreas_Params params;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
if (found != nullptr)
*found = params.found;
}
// Function AIStateWanderOnLand.AIStateWanderOnLand_C.OnCanUseStateEvent
// ()
// Parameters:
// bool ReturnValue (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData)
bool UAIStateWanderOnLand_C::OnCanUseStateEvent()
{
static auto fn = UObject::FindObject<UFunction>("Function AIStateWanderOnLand.AIStateWanderOnLand_C.OnCanUseStateEvent");
UAIStateWanderOnLand_C_OnCanUseStateEvent_Params params;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
return params.ReturnValue;
}
// Function AIStateWanderOnLand.AIStateWanderOnLand_C.OnEndEvent
// ()
void UAIStateWanderOnLand_C::OnEndEvent()
{
static auto fn = UObject::FindObject<UFunction>("Function AIStateWanderOnLand.AIStateWanderOnLand_C.OnEndEvent");
UAIStateWanderOnLand_C_OnEndEvent_Params params;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function AIStateWanderOnLand.AIStateWanderOnLand_C.OnTickEvent
// ()
// Parameters:
// float* DeltaSeconds (Parm, ZeroConstructor, IsPlainOldData)
void UAIStateWanderOnLand_C::OnTickEvent(float* DeltaSeconds)
{
static auto fn = UObject::FindObject<UFunction>("Function AIStateWanderOnLand.AIStateWanderOnLand_C.OnTickEvent");
UAIStateWanderOnLand_C_OnTickEvent_Params params;
params.DeltaSeconds = DeltaSeconds;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function AIStateWanderOnLand.AIStateWanderOnLand_C.UpgradePawnAcceleration
// ()
// Parameters:
// bool Upgrade (Parm, ZeroConstructor, IsPlainOldData)
void UAIStateWanderOnLand_C::UpgradePawnAcceleration(bool Upgrade)
{
static auto fn = UObject::FindObject<UFunction>("Function AIStateWanderOnLand.AIStateWanderOnLand_C.UpgradePawnAcceleration");
UAIStateWanderOnLand_C_UpgradePawnAcceleration_Params params;
params.Upgrade = Upgrade;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function AIStateWanderOnLand.AIStateWanderOnLand_C.GetRandomTarget
// ()
// Parameters:
// class ATargetArea* returnTarget (Parm, OutParm, ZeroConstructor, IsPlainOldData)
void UAIStateWanderOnLand_C::GetRandomTarget(class ATargetArea** returnTarget)
{
static auto fn = UObject::FindObject<UFunction>("Function AIStateWanderOnLand.AIStateWanderOnLand_C.GetRandomTarget");
UAIStateWanderOnLand_C_GetRandomTarget_Params params;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
if (returnTarget != nullptr)
*returnTarget = params.returnTarget;
}
// Function AIStateWanderOnLand.AIStateWanderOnLand_C.OnBeginEvent
// ()
// Parameters:
// class UPrimalAIState** InParentState (Parm, ZeroConstructor, IsPlainOldData)
void UAIStateWanderOnLand_C::OnBeginEvent(class UPrimalAIState** InParentState)
{
static auto fn = UObject::FindObject<UFunction>("Function AIStateWanderOnLand.AIStateWanderOnLand_C.OnBeginEvent");
UAIStateWanderOnLand_C_OnBeginEvent_Params params;
params.InParentState = InParentState;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
// Function AIStateWanderOnLand.AIStateWanderOnLand_C.ExecuteUbergraph_AIStateWanderOnLand
// ()
// Parameters:
// int EntryPoint (Parm, ZeroConstructor, IsPlainOldData)
void UAIStateWanderOnLand_C::ExecuteUbergraph_AIStateWanderOnLand(int EntryPoint)
{
static auto fn = UObject::FindObject<UFunction>("Function AIStateWanderOnLand.AIStateWanderOnLand_C.ExecuteUbergraph_AIStateWanderOnLand");
UAIStateWanderOnLand_C_ExecuteUbergraph_AIStateWanderOnLand_Params params;
params.EntryPoint = EntryPoint;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| 27.489011 | 140 | 0.728763 | 2bite |
3f15e00d26b36a61117962310d3d3f10965be55c | 2,777 | cpp | C++ | krypto/krypto_main.cpp | unigoetheradaw/prg2-pr_milestone1-master | a376d4f2fe5b830a6d1b04ebe50088c506599270 | [
"MIT"
] | null | null | null | krypto/krypto_main.cpp | unigoetheradaw/prg2-pr_milestone1-master | a376d4f2fe5b830a6d1b04ebe50088c506599270 | [
"MIT"
] | null | null | null | krypto/krypto_main.cpp | unigoetheradaw/prg2-pr_milestone1-master | a376d4f2fe5b830a6d1b04ebe50088c506599270 | [
"MIT"
] | null | null | null | //
// Created by Niels Heissel on 30.10.18.
//
#include <iostream>
#include <fstream>
#include <vector>
#include <tuple>
//#include "file_handler_class.h"
#include "NBild.h"
#include "CBild.h"
#include "interface.h"
#include <random>
#include <iostream>
using namespace std;
void create_rand_key(int height, int width){
CBild canvas_char;
canvas_char.export_file("/Users/nielsheissel/CLionProjects/prg2-pr/krypto/key_a.txt", canvas_char.create_rand_picture(height, width));
}
void aufgabe_f(){
Interface inter;
CBild canvas_char;
NBild canvas_int;
// Save a second picture and a random key
//canvas_char.export_file("/Users/nielsheissel/CLionProjects/prg2-pr/krypto/beispiel_f_pic2.txt", canvas_int.create_rand_picture(89,303));
//canvas_char.export_file("/Users/nielsheissel/CLionProjects/prg2-pr/krypto/beispiel_f_key.txt", canvas_char.create_rand_picture(89, 303));
// Encrypt the first picture : "beispielbild_1.txt"
inter.encrypt("/Users/nielsheissel/CLionProjects/prg2-pr/krypto/2f_approval.txt",
"/Users/nielsheissel/CLionProjects/prg2-pr/krypto/key_f.txt",
"/Users/nielsheissel/CLionProjects/prg2-pr/krypto/aproval_enc.txt", false);
// Encrypt the first picture : "beispiel_f_pic2.txt"
inter.encrypt("/Users/nielsheissel/CLionProjects/prg2-pr/krypto/2f_bugaspicture.txt",
"/Users/nielsheissel/CLionProjects/prg2-pr/krypto/key_f.txt",
"/Users/nielsheissel/CLionProjects/prg2-pr/krypto/2f_bugaspicture_enc.txt", false);
// Overlay both pictures and save result as "result_f.txt"
inter.overlay("/Users/nielsheissel/CLionProjects/prg2-pr/krypto/aproval_enc.txt", "/Users/nielsheissel/CLionProjects/prg2-pr/krypto/2f_bugaspicture_enc.txt",
"/Users/nielsheissel/CLionProjects/prg2-pr/krypto/result_f.txt", false);
}
int main(int argc, char *argv[]) {
if(argc == 5) {
string program = argv[1];
string arg1 = argv[2];
string arg2 = argv[3];
string arg3 = argv[4];
Interface interf;
cout << "You passed " << argc << " arguments: " << argv[1] << endl;
if (program == "encode") {
cout << "Encoding your source." << endl;
interf.encrypt(arg1, arg2, arg3, false);
} else if (program == "decode") {
cout << "Decoding your source." << endl;
interf.decrypt(arg1, arg2, arg3, false);
} else if (program == "overlay") {
cout << "Overlaying your sources." << endl;
interf.overlay(arg1, arg2, arg3, false);
}
}
else{
cerr << "You need to pass four arguments: ... you passed " << argc << endl;
}
//aufgabe_f();
//create_rand_key(10, 10);
return 0;
}
| 34.7125 | 161 | 0.655384 | unigoetheradaw |
3f16a2fcc89d143e6a8b430eaca6dd672bb7932a | 1,453 | cpp | C++ | CsPlugin/Source/CsCore/Public/Library/Script/CsScriptLibrary_StaticMesh.cpp | closedsum/core | c3cae44a177b9684585043a275130f9c7b67fef0 | [
"Unlicense"
] | 2 | 2019-03-17T10:43:53.000Z | 2021-04-20T21:24:19.000Z | CsPlugin/Source/CsCore/Public/Library/Script/CsScriptLibrary_StaticMesh.cpp | closedsum/core | c3cae44a177b9684585043a275130f9c7b67fef0 | [
"Unlicense"
] | null | null | null | CsPlugin/Source/CsCore/Public/Library/Script/CsScriptLibrary_StaticMesh.cpp | closedsum/core | c3cae44a177b9684585043a275130f9c7b67fef0 | [
"Unlicense"
] | null | null | null | // Copyright 2017-2021 Closed Sum Games, LLC. All Rights Reserved.
#include "Library/Script/CsScriptLibrary_StaticMesh.h"
#include "CsCore.h"
// Types
#include "Types/CsTypes_Macro.h"
// Library
#include "Library/CsLibrary_StaticMesh.h"
// Cached
#pragma region
namespace NCsScriptLibraryStaticMesh
{
namespace NCached
{
namespace Str
{
CS_DEFINE_CACHED_FUNCTION_NAME_AS_STRING(UCsScriptLibrary_StaticMesh, LoadBySoftObjectPath);
CS_DEFINE_CACHED_FUNCTION_NAME_AS_STRING(UCsScriptLibrary_StaticMesh, LoadByStringPath);
}
}
}
#pragma endregion Cached
UCsScriptLibrary_StaticMesh::UCsScriptLibrary_StaticMesh(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}
// Load
#pragma region
UStaticMesh* UCsScriptLibrary_StaticMesh::LoadBySoftObjectPath(const FString& Context, const FSoftObjectPath& Path)
{
using namespace NCsScriptLibraryStaticMesh::NCached;
const FString& Ctxt = Context.IsEmpty() ? Str::LoadBySoftObjectPath : Context;
typedef NCsStaticMesh::FLibrary StaticMeshLibrary;
return StaticMeshLibrary::SafeLoad(Ctxt, Path);
}
UStaticMesh* UCsScriptLibrary_StaticMesh::LoadByStringPath(const FString& Context, const FString& Path)
{
using namespace NCsScriptLibraryStaticMesh::NCached;
const FString& Ctxt = Context.IsEmpty() ? Str::LoadByStringPath : Context;
typedef NCsStaticMesh::FLibrary StaticMeshLibrary;
return StaticMeshLibrary::SafeLoad(Ctxt, Path);
}
#pragma endregion Load | 25.491228 | 115 | 0.80936 | closedsum |
3f198c4d47c235a57dba098a41c9dc2c308c512a | 698 | cpp | C++ | Kattis-Solutions/Encoded Message.cpp | SurgicalSteel/Competitive-Programming | 3662b676de94796f717b25dc8d1b93c6851fb274 | [
"MIT"
] | 14 | 2016-02-11T09:26:13.000Z | 2022-03-27T01:14:29.000Z | Kattis-Solutions/Encoded Message.cpp | SurgicalSteel/Competitive-Programming | 3662b676de94796f717b25dc8d1b93c6851fb274 | [
"MIT"
] | null | null | null | Kattis-Solutions/Encoded Message.cpp | SurgicalSteel/Competitive-Programming | 3662b676de94796f717b25dc8d1b93c6851fb274 | [
"MIT"
] | 7 | 2016-10-25T19:29:35.000Z | 2021-12-05T18:31:39.000Z | #include <bits/stdc++.h>
using namespace std;
string solve(string enc)
{
int res =(int) sqrt((double) enc.length());
int curr,counter=0;
string builder="";
int pos=res-1;
int awal=pos;
while(counter<enc.length())
{
while(pos<enc.length())
{
builder+=enc.substr(pos,1);
//cout<<enc.substr(pos,1);
counter++;
if(counter==enc.length()){break;}
pos+=res;
}
awal--;
pos=awal;
}
return builder;
}
int main() {
int tc;
string inp;
cin>>tc;
for(int i=0;i<tc;i++)
{
cin>>inp;
cout<<solve(inp)<<"\n";
}
return 0;
}
| 18.864865 | 47 | 0.469914 | SurgicalSteel |
3f1cc7f38155b2ff1e00ccc8d620991997fe9338 | 1,448 | cpp | C++ | rect.cpp | tonymiceli/tinymfc | 68a5fbbaecf07a038d8e46cfc9a96d62480b12b5 | [
"MIT"
] | 1 | 2020-03-27T23:31:30.000Z | 2020-03-27T23:31:30.000Z | rect.cpp | tonymiceli/tinymfc | 68a5fbbaecf07a038d8e46cfc9a96d62480b12b5 | [
"MIT"
] | null | null | null | rect.cpp | tonymiceli/tinymfc | 68a5fbbaecf07a038d8e46cfc9a96d62480b12b5 | [
"MIT"
] | null | null | null | //#include "stdafx.h"
#include "rect.h"
void CRect::SetRect(LONG nLeft, LONG nTop, LONG nRight, LONG nBottom)
{
left = nLeft;
top = nTop;
right = nRight;
bottom = nBottom;
}
POINT CRect::GetTopLeft()
{
POINT pt;
pt.x = left;
pt.y = top;
return pt;
}
POINT CRect::GetBottomLeft()
{
POINT pt;
pt.x = left;
pt.y = bottom;
return pt;
}
POINT CRect::GetTopRight()
{
POINT pt;
pt.x = right;
pt.y = top;
return pt;
}
POINT CRect::GetBottomRight()
{
POINT pt;
pt.x = right;
pt.y = bottom;
return pt;
}
void CRect::SetOrigin(POINT &pt)
{
right = (right-left)+pt.x;
left = pt.x;
bottom = (bottom-top)+pt.y;
top = pt.y;
}
void CRect::SetOrigin(LONG nLeft, LONG nTop)
{
right = (right-left)+nLeft;
left = nLeft;
bottom = (bottom-top)+nTop;
top = nTop;
}
void CRect::OffsetRect(LONG dx, LONG dy)
{
::OffsetRect(this, dx, dy);
}
void CRect::OffsetRect(POINT &pt)
{
::OffsetRect(this, pt.x, pt.y);
}
const CRect& CRect::operator=(const CRect& rectSrc)
{
left = rectSrc.left;
top = rectSrc.top;
right = rectSrc.right;
bottom = rectSrc.bottom;
return *this;
}
void CRect::UnionRect(LPRECT lpRect)
{
::UnionRect(this, this, lpRect);
}
BOOL CRect::PtInRect(int x, int y)
{
POINT aPoint;
aPoint.x = x;
aPoint.y = y;
return ::PtInRect(this, aPoint);
}
| 15.242105 | 70 | 0.571823 | tonymiceli |
3f2ff5bee1823fa9a0cb46a659aeb463e7ff7e5a | 2,130 | cpp | C++ | TerraForge3D/src/Shading/ShaderNodes/ShaderOutputNode.cpp | fiplox/TerraForge3D | 940c301a8590d00ea24d966b772478a6cacba115 | [
"MIT"
] | 434 | 2021-11-03T06:03:07.000Z | 2022-03-31T22:52:19.000Z | TerraForge3D/src/Shading/ShaderNodes/ShaderOutputNode.cpp | fiplox/TerraForge3D | 940c301a8590d00ea24d966b772478a6cacba115 | [
"MIT"
] | 14 | 2021-11-03T12:11:30.000Z | 2022-03-31T16:52:24.000Z | TerraForge3D/src/Shading/ShaderNodes/ShaderOutputNode.cpp | fiplox/TerraForge3D | 940c301a8590d00ea24d966b772478a6cacba115 | [
"MIT"
] | 45 | 2021-11-04T07:34:21.000Z | 2022-03-31T07:06:05.000Z | #include "Shading/ShaderNodes/ShaderOutputNode.h"
#include <iostream>
void ShaderOutputNode::OnEvaluate(GLSLFunction *function, GLSLLine *line)
{
if (inputPins[0]->IsLinked())
{
GLSLLine ln("");
inputPins[0]->other->Evaluate(GetParams(function, &ln));
line->line = ln.line;
}
else
{
function->AddLine(GLSLLine("vec3 " + VAR("norm") + " = normalize(Normal);"));
function->AddLine(GLSLLine("vec3 " + VAR("lightDir") + " = normalize(_LightPosition - FragPos.xyz );"));
function->AddLine(GLSLLine("float " + VAR("diff") + " = max(dot(" + VAR("norm") + ", " + VAR("lightDir") + "), 0.0f);"));
function->AddLine(GLSLLine("vec3 " + VAR("diffuse") + " = " + VAR("diff") + " * _LightColor;"));
function->AddLine(GLSLLine("vec3 " + VAR("result") + " = (vec3(0.2, 0.2, 0.2) + " + VAR("diffuse") + ")" + \
" * vec3(" + SDATA(0) + ", " + SDATA(1) + ", " + SDATA(2) + ");"));
line->line = VAR("result");
}
}
void ShaderOutputNode::Load(nlohmann::json data)
{
color[0] = data["color.r"];
color[1] = data["color.g"];
color[2] = data["color.b"];
color[3] = data["color.a"];
}
nlohmann::json ShaderOutputNode::Save()
{
nlohmann::json data;
data["type"] = "ShaderOutput";
data["color.r"] = color[0];
data["color.g"] = color[1];
data["color.b"] = color[2];
data["color.a"] = color[3];
return data;
}
void ShaderOutputNode::UpdateShaders()
{
sharedData->d0 = color[0];
sharedData->d1 = color[1];
sharedData->d2 = color[2];
}
void ShaderOutputNode::OnRender()
{
DrawHeader("Output");
inputPins[0]->Render();
if (!inputPins[0]->IsLinked())
{
if(ImGui::ColorPicker4("Object Color", color))
{
sharedData->d0 = color[0];
sharedData->d1 = color[1];
sharedData->d2 = color[2];
}
}
else
{
ImGui::Dummy(ImVec2(100, 40));
}
}
ShaderOutputNode::ShaderOutputNode(GLSLHandler *handler)
:SNENode(handler)
{
name = "Output";
color[0] = color[1] = color[2] = color[3] = 1.0f;
headerColor = ImColor(SHADER_OUTPUT_NODE_COLOR);
inputPins.push_back(new SNEPin(NodeEditorPinType::Input, SNEPinType::SNEPinType_Float3));
}
ShaderOutputNode::~ShaderOutputNode()
{
} | 25.058824 | 123 | 0.619249 | fiplox |
3f30da1b7a5853ea1b7bf89005db4e021dc2baed | 1,195 | cpp | C++ | Thalassa/Motor2D/j1LifeItem.cpp | xavimarin35/PlatformerDev | 98565270f5c62c1a47103bb413ef377e124b35ec | [
"MIT"
] | 1 | 2020-07-04T11:04:52.000Z | 2020-07-04T11:04:52.000Z | Thalassa/Motor2D/j1LifeItem.cpp | xavimarin35/PlatformerDev | 98565270f5c62c1a47103bb413ef377e124b35ec | [
"MIT"
] | null | null | null | Thalassa/Motor2D/j1LifeItem.cpp | xavimarin35/PlatformerDev | 98565270f5c62c1a47103bb413ef377e124b35ec | [
"MIT"
] | 2 | 2019-12-27T12:14:20.000Z | 2020-09-05T16:01:29.000Z | #include "j1LifeItem.h"
#include "p2Defs.h"
#include "p2Log.h"
#include "j1App.h"
#include "j1Textures.h"
#include "j1Render.h"
#include "j1Input.h"
#include "j1Collisions.h"
#include "j1Window.h"
#include "j1Player.h"
#include "j1Audio.h"
#include "j1Map.h"
#include "j1Scene1.h"
#include "Brofiler/Brofiler.h"
j1LifeItem::j1LifeItem(int x, int y, ENTITY_TYPE type) : j1Entity(x, y, ENTITY_TYPE::LIFE_ITEM)
{
idleAnim.LoadAnimations("bubbleIdle");
destroyAnim.LoadAnimations("bubbleDestroy");
}
j1LifeItem::~j1LifeItem()
{
}
bool j1LifeItem::Start()
{
sprites = App->tex->Load("textures/Particles/bubble.png");
animation = &idleAnim;
collider = App->collisions->AddCollider({ (int)position.x + 2, (int)position.y + 2, 12, 12 }, COLLIDER_ITEM, App->entity_manager);
return true;
}
bool j1LifeItem::Update(float dt)
{
BlitEntity(animation->GetCurrentFrame(dt), false);
return true;
}
bool j1LifeItem::PostUpdate()
{
return true;
}
bool j1LifeItem::CleanUp()
{
return true;
}
void j1LifeItem::OnCollision(Collider * c1, Collider * c2)
{
if (c1->type == COLLIDER_PLAYER) {
if (c2->type == COLLIDER_ITEM)
{
animation = &destroyAnim;
c2->to_delete = true;
}
}
}
| 18.106061 | 131 | 0.701255 | xavimarin35 |
3f3214cefd61d5ced909f28c65f01c228e54d931 | 427 | hpp | C++ | src/red4ext/LoadResRef.hpp | jackhumbert/flight_control | 02938f5a26b3a299ef3d9b9e4d40e9294872a7ee | [
"MIT"
] | 1 | 2021-11-09T13:31:07.000Z | 2021-11-09T13:31:07.000Z | src/red4ext/LoadResRef.hpp | jackhumbert/flight_control | 02938f5a26b3a299ef3d9b9e4d40e9294872a7ee | [
"MIT"
] | null | null | null | src/red4ext/LoadResRef.hpp | jackhumbert/flight_control | 02938f5a26b3a299ef3d9b9e4d40e9294872a7ee | [
"MIT"
] | null | null | null | #include <RED4ext/Addresses.hpp>
#include <RED4ext/NativeTypes.hpp>
// 48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 60 41 0F B6 D8 48 8B FA 48 8B F1 48 C7 44 24 20 00 00
constexpr uintptr_t LoadResRefAddr = 0x140200060 - RED4ext::Addresses::ImageBase;
template<typename T>
RED4ext::RelocFunc<RED4ext::ResourceHandle<T> *(*)(uint64_t * hashPointer, RED4ext::ResourceHandle<T> *wrapper, bool sync)>
LoadResRef(LoadResRefAddr); | 47.444444 | 123 | 0.751756 | jackhumbert |
3f344eafb26b0d3e245293a9b07c7db37b9267dc | 3,129 | cc | C++ | cbsasl/scram-sha/stringutils.cc | BenHuddleston/kv_engine | 78123c9aa2c2feb24b7c31eecc862bf2ed6325e4 | [
"MIT",
"BSD-3-Clause"
] | 104 | 2017-05-22T20:41:57.000Z | 2022-03-24T00:18:34.000Z | cbsasl/scram-sha/stringutils.cc | BenHuddleston/kv_engine | 78123c9aa2c2feb24b7c31eecc862bf2ed6325e4 | [
"MIT",
"BSD-3-Clause"
] | 3 | 2017-11-14T08:12:46.000Z | 2022-03-03T11:14:17.000Z | cbsasl/scram-sha/stringutils.cc | BenHuddleston/kv_engine | 78123c9aa2c2feb24b7c31eecc862bf2ed6325e4 | [
"MIT",
"BSD-3-Clause"
] | 71 | 2017-05-22T20:41:59.000Z | 2022-03-29T10:34:32.000Z | /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2016-Present Couchbase, Inc.
*
* Use of this software is governed by the Business Source License included
* in the file licenses/BSL-Couchbase.txt. As of the Change Date specified
* in that file, in accordance with the Business Source License, use of this
* software will be governed by the Apache License, Version 2.0, included in
* the file licenses/APL2.txt.
*/
#include "stringutils.h"
#include <stdexcept>
#include <cctype>
/**
* According to the RFC:
*
* 2.3. Prohibited Output
*
* This profile specifies the following characters as prohibited input:
*
* - Non-ASCII space characters [StringPrep, C.1.2]
* - ASCII control characters [StringPrep, C.2.1]
* - Non-ASCII control characters [StringPrep, C.2.2]
* - Private Use characters [StringPrep, C.3]
* - Non-character code points [StringPrep, C.4]
* - Surrogate code points [StringPrep, C.5]
* - Inappropriate for plain text characters [StringPrep, C.6]
* - Inappropriate for canonical representation characters
* [StringPrep, C.7]
* - Change display properties or deprecated characters
* [StringPrep, C.8]
* - Tagging characters [StringPrep, C.9]
*/
std::string SASLPrep(const std::string& string) {
for (const auto& c : string) {
if (c & 0x80) {
throw std::runtime_error("SASLPrep: Multibyte UTF-8 is not"
" implemented yet");
}
if (iscntrl(c)) {
throw std::runtime_error("SASLPrep: control characters is not"
" allowed");
}
}
return string;
}
std::string encodeUsername(const std::string& username) {
std::string ret(username);
std::string::size_type index = 0;
while ((index = ret.find_first_of(",=", index)) != std::string::npos) {
if (ret[index] == ',') {
ret.replace(index, 1, "=2C");
} else {
ret.replace(index, 1, "=3D");
}
++index;
}
return ret;
}
std::string decodeUsername(const std::string& username) {
std::string ret(username);
auto index = ret.find('=');
if (index == std::string::npos) {
return ret;
}
// we might want to optimize this at one point ;)
do {
if ((index + 3) > ret.length()) {
throw std::runtime_error("decodeUsername: Invalid escape"
" sequence, Should be =2C or =3D");
}
if (ret[index + 1] == '2' && ret[index + 2] == 'C') {
ret.replace(index, 3, ",");
index++;
} else if (ret[index + 1] == '3' && ret[index + 2] == 'D') {
ret.replace(index, 3, "=");
index++;
} else {
throw std::runtime_error("decodeUsername: Invalid escape"
" sequence. Should be =2C or =3D");
}
} while ((index = ret.find('=', index)) != std::string::npos);
return ret;
}
| 32.257732 | 79 | 0.549696 | BenHuddleston |
27842da87a9d0ee310e13c10f7f23608a9c9d703 | 965 | cpp | C++ | test/mp/remove.cpp | Cleyera/gdv | c89dd24898a58c4f905a4d53b6c2b262f2689b09 | [
"MIT"
] | null | null | null | test/mp/remove.cpp | Cleyera/gdv | c89dd24898a58c4f905a4d53b6c2b262f2689b09 | [
"MIT"
] | null | null | null | test/mp/remove.cpp | Cleyera/gdv | c89dd24898a58c4f905a4d53b6c2b262f2689b09 | [
"MIT"
] | null | null | null | #include <tuple>
#include <gdv/mp/test/test.h>
template <typename ...Args>
struct packer;
GDV_MP_TEST_CASE(remove) {
using l1 = ::std::tuple<int, char, short>;
using l2 = ::std::tuple<char, short, unsigned>;
using l3 = ::std::tuple<int, int, int>;
using l4 = ::std::tuple<>;
using l5 = packer<int, char, short>;
using l6 = packer<char, short, unsigned>;
using l7 = packer<int, int, int>;
using l8 = packer<>;
GDV_MP_TEST_IS_SAME(remove_t<l1, int>, ::std::tuple<char, short>);
GDV_MP_TEST_IS_SAME(remove_t<l2, int>, ::std::tuple<char, short, unsigned>);
GDV_MP_TEST_IS_SAME(remove_t<l3, int>, ::std::tuple<>);
GDV_MP_TEST_IS_SAME(remove_t<l4, int>, ::std::tuple<>);
GDV_MP_TEST_IS_SAME(remove_t<l5, int>, packer<char, short>);
GDV_MP_TEST_IS_SAME(remove_t<l6, int>, packer<char, short, unsigned>);
GDV_MP_TEST_IS_SAME(remove_t<l7, int>, packer<>);
GDV_MP_TEST_IS_SAME(remove_t<l8, int>, packer<>);
}
| 38.6 | 80 | 0.662176 | Cleyera |
278573c2e6ee1948ab31f782586df86a67229ec6 | 529 | cpp | C++ | MyFiles/ HLPSUG.cpp | manishSRM/solvedProblems | 78492e51488605e46fd19bba472736825a2faf32 | [
"Apache-2.0"
] | null | null | null | MyFiles/ HLPSUG.cpp | manishSRM/solvedProblems | 78492e51488605e46fd19bba472736825a2faf32 | [
"Apache-2.0"
] | null | null | null | MyFiles/ HLPSUG.cpp | manishSRM/solvedProblems | 78492e51488605e46fd19bba472736825a2faf32 | [
"Apache-2.0"
] | null | null | null | #include <cstdio>
#include <algorithm>
#include <limits.h>
#include <vector>
using namespace std;
const K = 25;
int main () {
int T;
scanf ("%d", &T);
while (T--) {
int N;
scanf ("%d", &N);
vector <bool> prime (N + 1, true);
for(int i = 2; i <= MAX / i; i++) {
for(int j = i * i; j <= MAX; j += i) {
prime[j] = false;
}
}
int maxSum = 0;
for (int k = 29; k <= N; k++) {
if (prime[k] == true)
maxSum += k;
}
printf("%d\n", maxSum);
}
return 0;
} | 17.633333 | 47 | 0.451796 | manishSRM |
2790b02970561906ce1fc2c115f11842d482fd0c | 1,313 | hpp | C++ | include/pch.hpp | KaixoCode/SoundMixr | 6f27c14f596c45debb584925db4e1f45808031a9 | [
"MIT"
] | 18 | 2021-01-24T14:28:15.000Z | 2021-12-02T20:19:09.000Z | include/pch.hpp | KaixoCode/SoundMixr | 6f27c14f596c45debb584925db4e1f45808031a9 | [
"MIT"
] | 1 | 2021-06-21T18:39:56.000Z | 2021-06-22T16:09:18.000Z | include/pch.hpp | KaixoCode/SoundMixr | 6f27c14f596c45debb584925db4e1f45808031a9 | [
"MIT"
] | null | null | null | #include <iostream>
#include <any>
#include <ranges>
#include "GuiCode2/pch.hpp"
#include "GuiCode2/Panel.hpp"
#include "GuiCode2/Menu.hpp"
#include "GuiCode2/Event.hpp"
#include "GuiCode2/Frame.hpp"
#include "GuiCode2/ContextMenu.hpp"
#include "GuiCode2/TextBox.hpp"
#include "GuiCode2/TextArea.hpp"
#define JSON_TRY_USER if(true)
#define JSON_CATCH_USER(exception) if(false)
#define JSON_THROW_USER(exception) \
{std::clog << "Error in " << __FILE__ << ":" << __LINE__ \
<< " (function " << __FUNCTION__ << ") - " \
<< (exception).what() << std::endl; \
throw exception; }
#include <nlohmann/json.hpp>
#include "Audijo/Audijo.hpp"
using namespace Audijo;
#include "RtMidi.h"
namespace AudioFile
{
#include <AudioFile.h>
}
#define _TESTLINK
#include "Base.hpp"
#include "Filters.hpp"
#include "Compressor.hpp"
#include "Oscillator.hpp"
#include "resource.h"
#define db2lin(db) std::powf(10.0f, 0.05 * (db))
#define lin2db(lin) (20.0f * std::log10(std::max((double)(lin), 0.000000000001)))
#define myabs(f) if (f < 0) f = -f;
#define VERSION 13
using namespace GuiCode;
#include "CrashLogger.hpp"
#define CrashLog(x) \
std::cout << x << std::endl, \
CrashLogger::crashlog << CrashLogger::CrashLogPrefix() << x << std::endl | 24.314815 | 81 | 0.657273 | KaixoCode |
2790f2ae01a2407222aa9fc9a81518fb63ab3fa5 | 8,396 | cpp | C++ | Source/ModuleParticles.cpp | IconicGIT/NextStage | a6740b64ac40c5f99e6620f98f423da38cb73d7e | [
"MIT"
] | 3 | 2021-02-22T09:04:25.000Z | 2021-02-22T16:56:36.000Z | Source/ModuleParticles.cpp | IconicGIT/NextStage | a6740b64ac40c5f99e6620f98f423da38cb73d7e | [
"MIT"
] | null | null | null | Source/ModuleParticles.cpp | IconicGIT/NextStage | a6740b64ac40c5f99e6620f98f423da38cb73d7e | [
"MIT"
] | 5 | 2021-02-22T08:50:22.000Z | 2021-10-02T11:02:55.000Z | #include "ModuleParticles.h"
#include "Application.h"
#include "ModuleTextures.h"
#include "ModuleRender.h"
#include "ModuleCollisions.h"
#include "Collider.h"
#include "Globals.h"
#include "SDL/include/SDL_timer.h"
ModuleParticles::ModuleParticles(bool startEnabled) : Module(startEnabled)
{
for(uint i = 0; i < MAX_ACTIVE_PARTICLES; ++i)
particles[i] = nullptr;
}
ModuleParticles::~ModuleParticles()
{
}
bool ModuleParticles::Start()
{
LOG("Loading particles");
texture = App->textures->Load("Assets/Sprites/items_and_particles.png");
// Explosion particle
explosion.anim.PushBack({274, 296, 33, 30});
explosion.anim.PushBack({313, 296, 33, 30});
explosion.anim.PushBack({346, 296, 33, 30});
explosion.anim.PushBack({382, 296, 33, 30});
explosion.anim.PushBack({419, 296, 33, 30});
explosion.anim.PushBack({457, 296, 33, 30});
explosion.anim.loop = false;
explosion.anim.speed = 0.3f;
laser.anim.PushBack({ 232, 103, 16, 12 });
laser.anim.PushBack({ 249, 103, 16, 12 });
laser.speed.x = 5;
laser.lifetime = 180;
laser.anim.speed = 0.2f;
playerBullet1[0].anim.PushBack({ 6, 175, 3, 8 });
playerBullet1[1].anim.PushBack({ 17, 199, 6, 6 });
playerBullet1[2].anim.PushBack({ 5, 200, 8, 3 });
playerBullet1[3].anim.PushBack({ 25, 187, 6, 6 });
playerBullet1[4].anim.PushBack({ 16, 187, 3, 8 });
playerBullet1[5].anim.PushBack({ 7, 187, 6, 6 });
playerBullet1[6].anim.PushBack({ 26, 176, 8, 3 });
playerBullet1[7].anim.PushBack({ 16, 175, 6, 6 });
for (int i = 0; i < 8; i++)
{
playerBullet1[i].speed.x = 6;
playerBullet1[i].speed.y = 6;
playerBullet1[i].lifetime = 20;
playerBullet1[i].anim.speed = 0;
playerBullet1[i].anim.loop = false;
}
dust_particle.anim.PushBack({ 270,232,32,32 });
dust_particle.anim.PushBack({ 302,232,32,32 });
dust_particle.anim.PushBack({ 334,232,32,32 });
dust_particle.anim.PushBack({ 366,232,32,32 });
dust_particle.anim.PushBack({ 270,264,32,32 });
dust_particle.anim.PushBack({ 302,264,32,32 });
dust_particle.anim.loop = false;
dust_particle.anim.speed = 0.2f;
EnemyBullet.anim.PushBack({ 232, 103, 16, 12 });
EnemyBullet.anim.PushBack({ 249, 103, 16, 12 });
EnemyBullet.speed.x = 5;
EnemyBullet.speed.y = 5;
EnemyBullet.lifetime = 180;
EnemyBullet.anim.speed = 0.2f;
Boss1BulletR.anim.PushBack({ 126,275,1,10 });
Boss1BulletR.lifetime = 24;
Boss1BulletR.anim.speed = 1;
Boss1BulletR.anim.loop = false;
Boss1BulletR.speed.y = 5;
Boss1BulletR.speed.x = -1;
Boss1BulletL.anim.PushBack({ 126,275,1,10 });
Boss1BulletL.lifetime = 24;
Boss1BulletL.anim.speed = 1;
Boss1BulletL.anim.loop = false;
Boss1BulletL.speed.y = 5;
Boss1BulletL.speed.x = 1;
Explosion1.anim.PushBack({ 103,0,32,33 });
Explosion1.anim.PushBack({ 135,0,32,33 });
Explosion1.anim.PushBack({ 167,0,32,33 });
Explosion1.anim.PushBack({ 199,0,32,33 });
Explosion1.anim.loop = false;
Explosion1.anim.speed = 0.2f;
Explosion2Small.anim.PushBack({ 197,149,32,28 });
Explosion2Small.anim.PushBack({ 197,247,32,28 });
Explosion2Small.anim.PushBack({ 197,302,32,28 });
Explosion2Small.anim.PushBack({ 197,356,32,28 });
Explosion2Small.anim.loop = false;
Explosion2Small.anim.speed = 0.2f;
Explosion2Big.anim.PushBack({ 189,184,48,41 });
Explosion2Big.anim.PushBack({ 239,184,48,41 });
Explosion2Big.anim.PushBack({ 294,184,48,41 });
Explosion2Big.anim.PushBack({ 350,184,48,41 });
Explosion2Big.anim.loop = false;
Explosion2Big.anim.speed = 0.2f;
BulletEnd.anim.PushBack({ 24,274,12,12 });
BulletEnd.anim.PushBack({ 35,274,12,12 });
BulletEnd.anim.PushBack({ 48,274,12,12 });
BulletEnd.anim.loop = false;
BulletEnd.anim.speed = 0.4f;
SoldierBullet.anim.PushBack({ 0,274,12,12 });
SoldierBullet.anim.PushBack({ 12,274,12,12 });
SoldierBullet.anim.loop = true;
SoldierBullet.lifetime = 90;
SoldierBullet.anim.speed = 0.1f;
SoldierBullet.speed = { 2,2 };
return true;
}
bool ModuleParticles::CleanUp()
{
LOG("Unloading particles");
// Delete all remaining active particles on application exit
for(uint i = 0; i < MAX_ACTIVE_PARTICLES; ++i)
{
if(particles[i] != nullptr)
{
delete particles[i];
particles[i] = nullptr;
}
}
return true;
}
void ModuleParticles::OnCollision(Collider* c1, Collider* c2)
{
int max = MAX_ACTIVE_PARTICLES;
bool loopDone = false;
for (uint i = deleteParticleIndex; i < max; ++i)
{
bool deleted = false;
if (particles[i] != nullptr && particles[i]->collider != nullptr)
{
////LOG("particle index: %i", deleteParticleIndex);
switch (particles[i]->collider->type) {
case Collider::PLAYER_SHOT:
// Always destroy particles that collide
if (particles[i] != nullptr && c2->type == Collider::BULLET_WALL)
{
particles[i]->collider->pendingToDelete = true;
particles[i]->isAlive = false;
delete particles[i];
particles[i] = nullptr;
deleted = true;
}
if (particles[i] != nullptr && c2->type == Collider::ENEMY)
{
particles[i]->collider->pendingToDelete = true;
particles[i]->isAlive = false;
delete particles[i];
particles[i] = nullptr;
deleted = true;
}
break;
case Collider::ENEMY_SHOT:
// Always destroy particles that collide
if (particles[i] != nullptr && c2->type == Collider::BULLET_WALL)
{
particles[i]->isAlive = false;
particles[i]->collider->pendingToDelete = true;
delete particles[i];
particles[i] = nullptr;
deleted = true;
}
if (particles[i] != nullptr && c2->type == Collider::PLAYER_HITBOX)
{
particles[i]->isAlive = false;
particles[i]->collider->pendingToDelete = true;
delete particles[i];
particles[i] = nullptr;
deleted = true;
//Cause damage to enemy;
//
//
}
break;
default:
//// Always destroy particles that collide
//if (particles[i] != nullptr && c2->type == Collider::WALL)
//{
// particles[i]->isAlive = false;
// delete particles[i];
// particles[i] = nullptr;
// break;
//}
//
//if (particles[i] != nullptr && c2->type == Collider::ENEMY)
//{
// particles[i]->isAlive = false;
// delete particles[i];
// particles[i] = nullptr;
// //Cause damage to enemy;
// //
// //
// break;
//}
break;
}
}
if (deleteParticleIndex + 1 == MAX_ACTIVE_PARTICLES) {
deleteParticleIndex = 0;
}
else {
if (deleted) deleteParticleIndex = i;
}
if (i == max - 1 && !loopDone) {
i = -1;
max = deleteParticleIndex;
loopDone = true;
}
if (deleted) break;
}
}
UpdateResult ModuleParticles::Update()
{
for(uint i = 0; i < MAX_ACTIVE_PARTICLES; ++i)
{
Particle* particle = particles[i];
if(particle == nullptr) continue;
// Call particle Update. If it has reached its lifetime, destroy it
if(particle->Update() == false)
{
delete particle;
particles[i] = nullptr;
//LOG("fin upd");
}
}
return UpdateResult::UPDATE_CONTINUE;
}
UpdateResult ModuleParticles::PostUpdate()
{
//Iterating all particle array and drawing any active particles
for (uint i = 0; i < MAX_ACTIVE_PARTICLES; ++i)
{
Particle* particle = particles[i];
if (particle != nullptr && particle->isAlive)
{
App->render->Blit(texture, particle->position.x, particle->position.y, &(particle->anim.GetCurrentFrame()));
}
}
return UpdateResult::UPDATE_CONTINUE;
}
void ModuleParticles::AddParticle(const Particle& particle, int id, int x, int y, int direction, Collider::Type colliderType, uint delay)
{
for (uint i = 0; i < MAX_ACTIVE_PARTICLES; ++i)
{
//Finding an empty slot for a new particle
if (particles[i] == nullptr)
{
//LOG("particle created");
Particle* p = new Particle(particle);
p->frameCount = -(int)delay; // We start the frameCount as the negative delay
p->position.x = x; // so when frameCount reaches 0 the particle will be activated
p->position.y = y;
p->direction = direction;
p->id = id;
//Adding the particle's collider
if (colliderType != Collider::Type::NONE)
{
p->collider = App->collisions->AddCollider(p->anim.GetCurrentFrame(), colliderType, this);
//if (colliderType == Collider::ENEMY_SHOT) LOG("enemy bullet fired");
//if (colliderType == Collider::PLAYER_SHOT) LOG("player bullet fired");
}
particles[i] = p;
break;
}
}
}
| 25.442424 | 137 | 0.650548 | IconicGIT |
2792555cf9355da77fd105139a32a85f40fb725d | 46 | cpp | C++ | examples/YAJL/boo.cpp | Costallat/hunter | dc0d79cb37b30cad6d6472d7143fe27be67e26d5 | [
"BSD-2-Clause"
] | 2,146 | 2015-01-10T07:26:58.000Z | 2022-03-21T02:28:01.000Z | examples/YAJL/boo.cpp | koinos/hunter | fc17bc391210bf139c55df7f947670c5dff59c57 | [
"BSD-2-Clause"
] | 1,778 | 2015-01-03T11:50:30.000Z | 2019-12-26T05:31:20.000Z | examples/YAJL/boo.cpp | koinos/hunter | fc17bc391210bf139c55df7f947670c5dff59c57 | [
"BSD-2-Clause"
] | 734 | 2015-03-05T19:52:34.000Z | 2022-02-22T23:18:54.000Z | #include <yajl/yajl_common.h>
int main() {
}
| 9.2 | 29 | 0.652174 | Costallat |
279480253a520924f7aeeedbe05e6518b9434fb3 | 6,535 | cc | C++ | src/base/time/time.cc | 243286065/cpplib_base | 9c63d556a0097fa5d9893e83c78ce9ebfd401ee0 | [
"BSD-3-Clause"
] | 10 | 2020-05-27T10:01:26.000Z | 2022-02-12T16:54:54.000Z | src/base/time/time.cc | 243286065/cpplib_base | 9c63d556a0097fa5d9893e83c78ce9ebfd401ee0 | [
"BSD-3-Clause"
] | 1 | 2020-09-16T00:50:02.000Z | 2020-09-17T03:53:06.000Z | src/base/time/time.cc | 243286065/cpplib_base | 9c63d556a0097fa5d9893e83c78ce9ebfd401ee0 | [
"BSD-3-Clause"
] | 9 | 2020-06-03T09:40:00.000Z | 2021-12-05T12:43:20.000Z | #include "base/time/time.h"
#include <chrono>
#include <iomanip>
#include "base/log/logging.h"
namespace base {
const int64_t kHoursPerDay = 24;
const int64_t kSecondsPerMinute = 60;
const int64_t kSecondsPerHour = 60 * kSecondsPerMinute;
const int64_t kMillisecondsPerSecond = 1000;
const int64_t kMillisecondsPerDay =
kMillisecondsPerSecond * 60 * 60 * kHoursPerDay;
const int64_t kMicrosecondsPerMillisecond = 1000;
const int64_t kMicrosecondsPerSecond =
kMicrosecondsPerMillisecond * kMillisecondsPerSecond;
const int64_t kMicrosecondsPerMinute = kMicrosecondsPerSecond * 60;
const int64_t kMicrosecondsPerHour = kMicrosecondsPerMinute * 60;
const int64_t kMicrosecondsPerDay = kMicrosecondsPerHour * kHoursPerDay;
const int64_t kMicrosecondsPerWeek = kMicrosecondsPerDay * 7;
const int64_t kNanosecondsPerMicrosecond = 1000;
const int64_t kNanosecondsPerSecond =
kNanosecondsPerMicrosecond * kMicrosecondsPerSecond;
int64_t SaturatedAdd(int64_t value, TimeDelta delta) {
int64_t result = 0;
if (delta.is_max()) {
CHECK_GT(value, std::numeric_limits<int64_t>::min());
result = std::numeric_limits<int64_t>::max();
} else if (delta.is_min()) {
CHECK_LT(value, std::numeric_limits<int64_t>::max());
result = std::numeric_limits<int64_t>::min();
} else {
if (value > 0 && delta.delta_ > 0 &&
std::numeric_limits<int64_t>::max() - value < delta.delta_) {
result = std::numeric_limits<int64_t>::max();
} else if (value < 0 && delta.delta_ < 0 &&
std::numeric_limits<int64_t>::min() - value > delta.delta_) {
result = std::numeric_limits<int64_t>::min();
} else {
result = value + delta.delta_;
}
}
return 0;
}
int64_t SaturatedSub(int64_t value, TimeDelta delta) {
return SaturatedAdd(value, -delta);
}
TimeDelta TimeDelta::FromDays(int days) {
return days == std::numeric_limits<int>::max()
? Max()
: TimeDelta(days * kMicrosecondsPerDay);
}
TimeDelta TimeDelta::FromHours(int hours) {
return hours == std::numeric_limits<int>::max()
? Max()
: TimeDelta(hours * kMicrosecondsPerHour);
}
TimeDelta TimeDelta::FromMinutes(int minutes) {
return minutes == std::numeric_limits<int>::max()
? Max()
: TimeDelta(minutes * kMicrosecondsPerMinute);
}
TimeDelta TimeDelta::FromSeconds(int64_t secs) {
return secs == std::numeric_limits<int>::max()
? Max()
: TimeDelta(secs * kMicrosecondsPerSecond);
}
TimeDelta TimeDelta::FromMilliseconds(int64_t ms) {
return ms == std::numeric_limits<int>::max()
? Max()
: TimeDelta(ms * kMicrosecondsPerMillisecond);
}
TimeDelta TimeDelta::FromMicroseconds(int64_t us) {
return TimeDelta(us);
}
TimeDelta TimeDelta::FromNanoseconds(int64_t ns) {
return TimeDelta(ns / kNanosecondsPerMicrosecond);
}
TimeDelta TimeDelta::FromSecondsD(double secs) {
return FromDouble(secs * kMicrosecondsPerSecond);
}
TimeDelta TimeDelta::FromMillisecondsD(double ms) {
return FromDouble(ms * kMicrosecondsPerMillisecond);
}
TimeDelta TimeDelta::FromMicrosecondsD(double us) {
return FromDouble(us);
}
TimeDelta TimeDelta::FromNanosecondsD(double ns) {
return FromDouble(ns / kNanosecondsPerMicrosecond);
}
TimeDelta TimeDelta::FromDouble(double value) {
return TimeDelta(static_cast<int64_t>(value));
}
TimeDelta TimeDelta::Max() {
return TimeDelta(std::numeric_limits<int64_t>::max());
}
TimeDelta TimeDelta::Min() {
return TimeDelta(std::numeric_limits<int64_t>::min());
}
int TimeDelta::InDays() const {
if (is_max()) {
// Preserve max to prevent overflow.
return std::numeric_limits<int>::max();
}
return static_cast<int>(delta_ / kMicrosecondsPerDay);
}
int TimeDelta::InDaysFloored() const {
if (is_max()) {
// Preserve max to prevent overflow.
return std::numeric_limits<int>::max();
}
int result = delta_ / kMicrosecondsPerDay;
int64_t remainder = delta_ - (result * kMicrosecondsPerDay);
if (remainder < 0) {
--result; // Use floor(), not trunc() rounding behavior.
}
return result;
}
int TimeDelta::InHours() const {
if (is_max()) {
// Preserve max to prevent overflow.
return std::numeric_limits<int>::max();
}
return static_cast<int>(delta_ / kMicrosecondsPerHour);
}
int TimeDelta::InMinutes() const {
if (is_max()) {
// Preserve max to prevent overflow.
return std::numeric_limits<int>::max();
}
return static_cast<int>(delta_ / kMicrosecondsPerMinute);
}
double TimeDelta::InSecondsF() const {
if (is_max()) {
// Preserve max to prevent overflow.
return std::numeric_limits<double>::infinity();
}
return static_cast<double>(delta_) / kMicrosecondsPerSecond;
}
int64_t TimeDelta::InSeconds() const {
if (is_max()) {
// Preserve max to prevent overflow.
return std::numeric_limits<int64_t>::max();
}
return delta_ / kMicrosecondsPerSecond;
}
double TimeDelta::InMillisecondsF() const {
if (is_max()) {
// Preserve max to prevent overflow.
return std::numeric_limits<double>::infinity();
}
return static_cast<double>(delta_) / kMicrosecondsPerMillisecond;
}
int64_t TimeDelta::InMilliseconds() const {
if (is_max()) {
// Preserve max to prevent overflow.
return std::numeric_limits<int64_t>::max();
}
return delta_ / kMicrosecondsPerMillisecond;
}
int64_t TimeDelta::InMillisecondsRoundedUp() const {
if (is_max()) {
// Preserve max to prevent overflow.
return std::numeric_limits<int64_t>::max();
}
int64_t result = delta_ / kMicrosecondsPerMillisecond;
int64_t remainder = delta_ - (result * kMicrosecondsPerMillisecond);
if (remainder > 0) {
++result; // Use ceil(), not trunc() rounding behavior.
}
return result;
}
double TimeDelta::InMicrosecondsF() const {
if (is_max()) {
// Preserve max to prevent overflow.
return std::numeric_limits<double>::infinity();
}
return static_cast<double>(delta_);
}
int64_t TimeDelta::InNanoseconds() const {
if (is_max()) {
// Preserve max to prevent overflow.
return std::numeric_limits<int64_t>::max();
}
return delta_ * kNanosecondsPerMicrosecond;
}
std::ostream& operator<<(std::ostream& os, TimeDelta time_delta) {
return os << std::fixed << time_delta.InSecondsF() << " s";
}
int64_t Now() {
std::chrono::microseconds ms =
std::chrono::duration_cast<std::chrono::microseconds>(
std::chrono::system_clock::now().time_since_epoch());
return ms.count();
}
} // namespace base
| 28.413043 | 76 | 0.695486 | 243286065 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.