text
stringlengths
5
1.04M
#include <catboost/libs/train_lib/train_model.h> #include <catboost/libs/algo/features_layout.h> #include <catboost/libs/options/plain_options_helper.h> #include <library/unittest/registar.h> #include <library/json/json_reader.h> #include <util/random/fast.h> #include <util/generic/vector.h> Y_UNIT_TEST_SUITE(TTrainTest) { Y_UNIT_TEST(TestRepeatableTrain) { const size_t TestDocCount = 1000; const size_t FactorCount = 10; TReallyFastRng32 rng(123); TPool pool; pool.Docs.Resize(TestDocCount, FactorCount, /*baseline dimension*/ 0, /*has queryId*/ false, /*has subgroupId*/ false); for (size_t i = 0; i < TestDocCount; ++i) { pool.Docs.Target[i] = rng.GenRandReal2(); for (size_t j = 0; j < FactorCount; ++j) { pool.Docs.Factors[j][i] = rng.GenRandReal2(); } } TPool poolCopy(pool); NJson::TJsonValue plainFitParams; plainFitParams.InsertValue("random_seed", 5); plainFitParams.InsertValue("iterations", 1); plainFitParams.InsertValue("train_dir", "."); NJson::TJsonValue metadata; metadata["a"] = "b"; plainFitParams.InsertValue("metadata", metadata); std::vector<int> emptyCatFeatures; TEvalResult testApprox; TPool testPool; TFullModel model; TrainModel(plainFitParams, Nothing(), Nothing(), pool, false, testPool, "", &model, &testApprox); { TrainModel(plainFitParams, Nothing(), Nothing(), pool, false, testPool, "model_for_test.cbm", nullptr, &testApprox); TFullModel otherCallVariant = ReadModel("model_for_test.cbm"); UNIT_ASSERT(model.ModelInfo.has("a")); UNIT_ASSERT_VALUES_EQUAL(model.ModelInfo["a"], "b"); UNIT_ASSERT_EQUAL(model, otherCallVariant); } UNIT_ASSERT_EQUAL(pool.Docs.GetDocCount(), poolCopy.Docs.GetDocCount()); UNIT_ASSERT_EQUAL(pool.Docs.GetEffectiveFactorCount(), poolCopy.Docs.GetEffectiveFactorCount()); for (int j = 0; j < pool.Docs.GetEffectiveFactorCount(); ++j) { const auto& factors = pool.Docs.Factors[j]; const auto& factorsCopy = poolCopy.Docs.Factors[j]; for (size_t i = 0; i < pool.Docs.GetDocCount(); ++i) { UNIT_ASSERT_EQUAL(factors[i], factorsCopy[i]); } } } Y_UNIT_TEST(TestFeaturesLayout) { std::vector<int> catFeatures = {1, 5, 9}; int featuresCount = 10; TFeaturesLayout layout(featuresCount, catFeatures, TVector<TString>()); UNIT_ASSERT_EQUAL(layout.GetFeatureType(0), EFeatureType::Float); UNIT_ASSERT_EQUAL(layout.GetFeatureType(1), EFeatureType::Categorical); UNIT_ASSERT_EQUAL(layout.GetFeatureType(3), EFeatureType::Float); UNIT_ASSERT_EQUAL(layout.GetFeatureType(9), EFeatureType::Categorical); UNIT_ASSERT_EQUAL(layout.GetInternalFeatureIdx(9), 2); UNIT_ASSERT_EQUAL(layout.GetInternalFeatureIdx(2), 1); UNIT_ASSERT_EQUAL(layout.GetFeature(2, EFeatureType::Categorical), 9); UNIT_ASSERT_EQUAL(layout.GetFeature(1, EFeatureType::Float), 2); } }
// ========================================================================== // Munin Button. // // Copyright (C) 2011 Matthew Chaplain, All Rights Reserved. // // Permission to reproduce, distribute, perform, display, and to prepare // derivitive works from this file under the following conditions: // // 1. Any copy, reproduction or derivitive work of any part of this file // contains this copyright notice and licence in its entirety. // // 2. The rights granted to you under this license automatically terminate // should you attempt to assert any patent claims against the licensor // or contributors, which in any way restrict the ability of any party // from using this software or portions thereof in any form under the // terms of this license. // // Disclaimer: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY // KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE // WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS // OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR // OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // ========================================================================== #include "munin/button.hpp" #include "munin/aligned_layout.hpp" #include "munin/background_fill.hpp" #include "munin/container.hpp" #include "munin/framed_component.hpp" #include "munin/grid_layout.hpp" #include "munin/image.hpp" #include "munin/solid_frame.hpp" #include "munin/view.hpp" #include <terminalpp/ansi/mouse.hpp> #include <terminalpp/virtual_key.hpp> namespace munin { // ========================================================================== // BUTTON::IMPLEMENTATION STRUCTURE // ========================================================================== struct button::impl { // ====================================================================== // CONSTRUCTOR // ====================================================================== impl() { } }; // ========================================================================== // CONSTRUCTOR // ========================================================================== button::button(terminalpp::string const &caption) : pimpl_(std::make_shared<impl>()) { auto image = munin::make_image(caption); image->set_can_focus(true); auto content = get_container(); content->set_layout(munin::make_grid_layout(1, 1)); content->add_component( munin::make_framed_component( munin::make_solid_frame(), munin::view( munin::make_aligned_layout(), image, munin::alignment_hcvc))); content->set_layout(munin::make_grid_layout(1, 1), munin::LOWEST_LAYER); content->add_component( munin::make_background_fill(), {}, munin::LOWEST_LAYER); } // ========================================================================== // DESTRUCTOR // ========================================================================== button::~button() { } // ========================================================================== // DO_EVENT // ========================================================================== void button::do_event(boost::any const &event) { auto vk = boost::any_cast<terminalpp::virtual_key>(&event); if (vk) { if (vk->key == terminalpp::vk::space || vk->key == terminalpp::vk::enter) { on_click(); } } auto report = boost::any_cast<terminalpp::ansi::mouse::report>(&event); if (report && report->button_ == terminalpp::ansi::mouse::report::LEFT_BUTTON_DOWN) { on_click(); } } // ========================================================================== // MAKE_BUTTON // ========================================================================== std::shared_ptr<button> make_button(terminalpp::string const &caption) { return std::make_shared<button>(caption); } }
/* * Copyright (c) 2008, Alberto Alonso * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, this * list of conditions and the following disclaimer in the documentation and/or other * materials provided with the distribution. * * Neither the name of the mta-mysql 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 OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <dlfcn.h> #include <stdarg.h> #include "ILuaModuleManager.h" #include "lauxlib.h" #include "luaconf.h" #include "lua.h" #include "lualib.h" /* This file extracts the lua function addresses from the server core to avoid lua gc crashes */ extern ILuaModuleManager* pModuleManager; /* ** state manipulation */ static void* plua_newstate = 0; static void* plua_close = 0; static void* plua_newthread = 0; static void* plua_atpanic = 0; /* ** basic stack manipulation */ static void* plua_gettop = 0; static void* plua_settop = 0; static void* plua_pushvalue = 0; static void* plua_remove = 0; static void* plua_insert = 0; static void* plua_replace = 0; static void* plua_checkstack = 0; static void* plua_xmove = 0; /* ** access functions (stack -> C) */ static void* plua_isnumber = 0; static void* plua_isstring = 0; static void* plua_iscfunction = 0; static void* plua_isuserdata = 0; static void* plua_type = 0; static void* plua_typename = 0; static void* plua_equal = 0; static void* plua_rawequal = 0; static void* plua_lessthan = 0; static void* plua_tonumber = 0; static void* plua_tointeger = 0; static void* plua_toboolean = 0; static void* plua_tolstring = 0; static void* plua_objlen = 0; static void* plua_tocfunction = 0; static void* plua_touserdata = 0; static void* plua_tothread = 0; static void* plua_topointer = 0; /* ** push functions (C -> stack) */ static void* plua_pushnil = 0; static void* plua_pushnumber = 0; static void* plua_pushinteger = 0; static void* plua_pushlstring = 0; static void* plua_pushstring = 0; static void* plua_pushvfstring = 0; static void* plua_pushfstring = 0; static void* plua_pushcclosure = 0; static void* plua_pushboolean = 0; static void* plua_pushlightuserdata = 0; static void* plua_pushthread = 0; /* ** get functions (Lua -> stack) */ static void* plua_gettable = 0; static void* plua_getfield = 0; static void* plua_rawget = 0; static void* plua_rawgeti = 0; static void* plua_createtable = 0; static void* plua_newuserdata = 0; static void* plua_getmetatable = 0; static void* plua_getfenv = 0; /* ** set functions (stack -> Lua) */ static void* plua_settable = 0; static void* plua_setfield = 0; static void* plua_rawset = 0; static void* plua_rawseti = 0; static void* plua_setmetatable = 0; static void* plua_setfenv = 0; /* ** `load' and `call' functions (load and run Lua code) */ static void* plua_call = 0; static void* plua_pcall = 0; static void* plua_cpcall = 0; static void* plua_load = 0; static void* plua_dump = 0; /* ** coroutine functions */ static void* plua_yield = 0; static void* plua_resume = 0; static void* plua_status = 0; /* ** garbage-collection function and options */ static void* plua_gc = 0; /* ** miscellaneous functions */ static void* plua_error = 0; static void* plua_next = 0; static void* plua_concat = 0; static void* plua_getallocf = 0; static void* plua_setallocf = 0; /* Functions to be called by the debuger in specific events */ static void* plua_getstack = 0; static void* plua_getinfo = 0; static void* plua_getlocal = 0; static void* plua_setlocal = 0; static void* plua_getupvalue = 0; static void* plua_setupvalue = 0; static void* plua_sethook = 0; static void* plua_gethook = 0; static void* plua_gethookmask = 0; static void* plua_gethookcount = 0; /* ** Lua auxlib */ #if defined(LUA_COMPAT_GETN) static void* pluaL_getn = 0; static void* pluaL_setn = 0; #endif static void* pluaL_register = 0; static void* pluaL_getmetafield = 0; static void* pluaL_callmeta = 0; static void* pluaL_typerror = 0; static void* pluaL_argerror = 0; static void* pluaL_checklstring = 0; static void* pluaL_optlstring = 0; static void* pluaL_checknumber = 0; static void* pluaL_optnumber = 0; static void* pluaL_checkinteger = 0; static void* pluaL_optinteger = 0; static void* pluaL_checkstack = 0; static void* pluaL_checktype = 0; static void* pluaL_checkany = 0; static void* pluaL_newmetatable = 0; static void* pluaL_checkudata = 0; static void* pluaL_where = 0; static void* pluaL_error = 0; static void* pluaL_checkoption = 0; static void* pluaL_ref = 0; static void* pluaL_unref = 0; static void* pluaL_loadfile = 0; static void* pluaL_loadbuffer = 0; static void* pluaL_loadstring = 0; static void* pluaL_newstate = 0; static void* pluaL_gsub = 0; static void* pluaL_findtable = 0; static void* pluaL_buffinit = 0; static void* pluaL_prepbuffer = 0; static void* pluaL_addlstring = 0; static void* pluaL_addstring = 0; static void* pluaL_addvalue = 0; static void* pluaL_pushresult = 0; static void* plua_getmainstate = 0; #define SAFE_IMPORT(x) \ p ## x = dlsym(dl, #x); \ if (p ## x == 0) \ { \ pModuleManager->Printf("Unable to import " #x ": %s\n", dlerror()); \ return false; \ } #ifdef __cplusplus extern "C" #endif bool ImportLua() { #ifdef __x86_64 void* dl = dlopen("x64/deathmatch.so", RTLD_NOW | RTLD_NOLOAD); #else void* dl = dlopen("mods/deathmatch/deathmatch.so", RTLD_NOW | RTLD_NOLOAD); #endif if (!dl) { pModuleManager->ErrorPrintf("Unable to open deathmatch.so: %s\n", dlerror()); return false; } /* ** state manipulation */ SAFE_IMPORT(lua_newstate); SAFE_IMPORT(lua_close); SAFE_IMPORT(lua_newthread); SAFE_IMPORT(lua_atpanic); /* ** basic stack manipulation */ SAFE_IMPORT(lua_gettop); SAFE_IMPORT(lua_settop); SAFE_IMPORT(lua_pushvalue); SAFE_IMPORT(lua_remove); SAFE_IMPORT(lua_insert); SAFE_IMPORT(lua_replace); SAFE_IMPORT(lua_checkstack); SAFE_IMPORT(lua_xmove); /* ** access functions (stack -> C) */ SAFE_IMPORT(lua_isnumber); SAFE_IMPORT(lua_isstring); SAFE_IMPORT(lua_iscfunction); SAFE_IMPORT(lua_isuserdata); SAFE_IMPORT(lua_type); SAFE_IMPORT(lua_typename); SAFE_IMPORT(lua_equal); SAFE_IMPORT(lua_rawequal); SAFE_IMPORT(lua_lessthan); SAFE_IMPORT(lua_tonumber); SAFE_IMPORT(lua_tointeger); SAFE_IMPORT(lua_toboolean); SAFE_IMPORT(lua_tolstring); SAFE_IMPORT(lua_objlen); SAFE_IMPORT(lua_tocfunction); SAFE_IMPORT(lua_touserdata); SAFE_IMPORT(lua_tothread); SAFE_IMPORT(lua_topointer); /* ** push functions (C -> stack) */ SAFE_IMPORT(lua_pushnil); SAFE_IMPORT(lua_pushnumber); SAFE_IMPORT(lua_pushinteger); SAFE_IMPORT(lua_pushlstring); SAFE_IMPORT(lua_pushstring); SAFE_IMPORT(lua_pushvfstring); SAFE_IMPORT(lua_pushfstring); SAFE_IMPORT(lua_pushcclosure); SAFE_IMPORT(lua_pushboolean); SAFE_IMPORT(lua_pushlightuserdata); SAFE_IMPORT(lua_pushthread); /* ** get functions (Lua -> stack) */ SAFE_IMPORT(lua_gettable); SAFE_IMPORT(lua_getfield); SAFE_IMPORT(lua_rawget); SAFE_IMPORT(lua_rawgeti); SAFE_IMPORT(lua_createtable); SAFE_IMPORT(lua_newuserdata); SAFE_IMPORT(lua_getmetatable); SAFE_IMPORT(lua_getfenv); /* ** set functions (stack -> Lua) */ SAFE_IMPORT(lua_settable); SAFE_IMPORT(lua_setfield); SAFE_IMPORT(lua_rawset); SAFE_IMPORT(lua_rawseti); SAFE_IMPORT(lua_setmetatable); SAFE_IMPORT(lua_setfenv); /* ** `load' and `call' functions (load and run Lua code) */ SAFE_IMPORT(lua_call); SAFE_IMPORT(lua_pcall); SAFE_IMPORT(lua_cpcall); SAFE_IMPORT(lua_load); SAFE_IMPORT(lua_dump); /* ** coroutine functions */ SAFE_IMPORT(lua_yield); SAFE_IMPORT(lua_resume); SAFE_IMPORT(lua_status); /* ** garbage-collection function and options */ SAFE_IMPORT(lua_gc); /* ** miscellaneous functions */ SAFE_IMPORT(lua_error); SAFE_IMPORT(lua_next); SAFE_IMPORT(lua_concat); SAFE_IMPORT(lua_getallocf); SAFE_IMPORT(lua_setallocf); /* Functions to be called by the debuger in specific events */ SAFE_IMPORT(lua_getstack); SAFE_IMPORT(lua_getinfo); SAFE_IMPORT(lua_getlocal); SAFE_IMPORT(lua_setlocal); SAFE_IMPORT(lua_getupvalue); SAFE_IMPORT(lua_setupvalue); SAFE_IMPORT(lua_sethook); SAFE_IMPORT(lua_gethook); SAFE_IMPORT(lua_gethookmask); SAFE_IMPORT(lua_gethookcount); /* ** Lua auxlib */ #if defined(LUA_COMPAT_GETN) SAFE_IMPORT(luaL_getn); SAFE_IMPORT(luaL_setn); #endif SAFE_IMPORT(luaL_register); SAFE_IMPORT(luaL_getmetafield); SAFE_IMPORT(luaL_callmeta); SAFE_IMPORT(luaL_typerror); SAFE_IMPORT(luaL_argerror); SAFE_IMPORT(luaL_checklstring); SAFE_IMPORT(luaL_optlstring); SAFE_IMPORT(luaL_checknumber); SAFE_IMPORT(luaL_optnumber); SAFE_IMPORT(luaL_checkinteger); SAFE_IMPORT(luaL_optinteger); SAFE_IMPORT(luaL_checkstack); SAFE_IMPORT(luaL_checktype); SAFE_IMPORT(luaL_checkany); SAFE_IMPORT(luaL_newmetatable); SAFE_IMPORT(luaL_checkudata); SAFE_IMPORT(luaL_where); SAFE_IMPORT(luaL_error); SAFE_IMPORT(luaL_checkoption); SAFE_IMPORT(luaL_ref); SAFE_IMPORT(luaL_unref); SAFE_IMPORT(luaL_loadfile); SAFE_IMPORT(luaL_loadbuffer); SAFE_IMPORT(luaL_loadstring); SAFE_IMPORT(luaL_newstate); SAFE_IMPORT(luaL_gsub); SAFE_IMPORT(luaL_findtable); SAFE_IMPORT(luaL_buffinit); SAFE_IMPORT(luaL_prepbuffer); SAFE_IMPORT(luaL_addlstring); SAFE_IMPORT(luaL_addstring); SAFE_IMPORT(luaL_addvalue); SAFE_IMPORT(luaL_pushresult); SAFE_IMPORT(lua_getmainstate); return true; } #undef SAFE_IMPORT /** typedefs **/ /* ** state manipulation */ typedef lua_State *(*lua_newstate_t)(lua_Alloc f, void *ud); typedef void (*lua_close_t)(lua_State *ls); typedef lua_State *(*lua_newthread_t)(lua_State *ls); typedef lua_CFunction (*lua_atpanic_t)(lua_State *ls, lua_CFunction panicf); /* ** basic stack manipulation */ typedef int (*lua_gettop_t)(lua_State *ls); typedef void (*lua_settop_t)(lua_State *ls, int idx); typedef void (*lua_pushvalue_t)(lua_State *ls, int idx); typedef void (*lua_remove_t)(lua_State *ls, int idx); typedef void (*lua_insert_t)(lua_State *ls, int idx); typedef void (*lua_replace_t)(lua_State *ls, int idx); typedef int (*lua_checkstack_t)(lua_State *ls, int sz); typedef void (*lua_xmove_t)(lua_State *from, lua_State *to, int n); /* ** access functions (stack -> C) */ typedef int (*lua_isnumber_t)(lua_State *ls, int idx); typedef int (*lua_isstring_t)(lua_State *ls, int idx); typedef int (*lua_iscfunction_t)(lua_State *ls, int idx); typedef int (*lua_isuserdata_t)(lua_State *ls, int idx); typedef int (*lua_type_t)(lua_State *ls, int idx); typedef const char *(*lua_typename_t)(lua_State *ls, int tp); typedef int (*lua_equal_t)(lua_State *ls, int idx1, int idx2); typedef int (*lua_rawequal_t)(lua_State *ls, int idx1, int idx2); typedef int (*lua_lessthan_t)(lua_State *ls, int idx1, int idx2); typedef lua_Number (*lua_tonumber_t)(lua_State *ls, int idx); typedef lua_Integer (*lua_tointeger_t)(lua_State *ls, int idx); typedef int (*lua_toboolean_t)(lua_State *ls, int idx); typedef const char *(*lua_tolstring_t)(lua_State *ls, int idx, size_t *len); typedef size_t (*lua_objlen_t)(lua_State *ls, int idx); typedef lua_CFunction (*lua_tocfunction_t)(lua_State *ls, int idx); typedef void *(*lua_touserdata_t)(lua_State *ls, int idx); typedef lua_State *(*lua_tothread_t)(lua_State *ls, int idx); typedef const void *(*lua_topointer_t)(lua_State *ls, int idx); /* ** push functions (C -> stack) */ typedef void (*lua_pushnil_t)(lua_State *ls); typedef void (*lua_pushnumber_t)(lua_State *ls, lua_Number n); typedef void (*lua_pushinteger_t)(lua_State *ls, lua_Integer n); typedef void (*lua_pushlstring_t)(lua_State *ls, const char *s, size_t l); typedef void (*lua_pushstring_t)(lua_State *ls, const char *s); typedef const char *(*lua_pushvfstring_t) (lua_State *ls, const char *fmt, va_list argp); typedef const char *(*lua_pushfstring_t)(lua_State *ls, const char *fmt, ...); typedef void (*lua_pushcclosure_t)(lua_State *ls, lua_CFunction fn, int n); typedef void (*lua_pushboolean_t)(lua_State *ls, int b); typedef void (*lua_pushlightuserdata_t)(lua_State *ls, void *p); typedef int (*lua_pushthread_t)(lua_State *ls); /* ** get functions (Lua -> stack) */ typedef void (*lua_gettable_t)(lua_State *ls, int idx); typedef void (*lua_getfield_t)(lua_State *ls, int idx, const char *k); typedef void (*lua_rawget_t)(lua_State *ls, int idx); typedef void (*lua_rawgeti_t)(lua_State *ls, int idx, int n); typedef void (*lua_createtable_t)(lua_State *ls, int narr, int nrec); typedef void *(*lua_newuserdata_t)(lua_State *ls, size_t sz); typedef int (*lua_getmetatable_t)(lua_State *ls, int objindex); typedef void (*lua_getfenv_t)(lua_State *ls, int idx); /* ** set functions (stack -> Lua) */ typedef void (*lua_settable_t)(lua_State *ls, int idx); typedef void (*lua_setfield_t)(lua_State *ls, int idx, const char *k); typedef void (*lua_rawset_t)(lua_State *ls, int idx); typedef void (*lua_rawseti_t)(lua_State *ls, int idx, int n); typedef int (*lua_setmetatable_t)(lua_State *ls, int objindex); typedef int (*lua_setfenv_t)(lua_State *ls, int idx); /* ** `load' and `call' functions (load and run Lua code) */ typedef void (*lua_call_t)(lua_State *ls, int nargs, int nresults); typedef int (*lua_pcall_t)(lua_State *ls, int nargs, int nresults, int errfunc); typedef int (*lua_cpcall_t)(lua_State *ls, lua_CFunction func, void *ud); typedef int (*lua_load_t) (lua_State *ls, lua_Reader reader, void *dt, const char *chunkname); typedef int (*lua_dump_t)(lua_State *ls, lua_Writer writer, void *data); /* ** coroutine functions */ typedef int (*lua_yield_t)(lua_State *ls, int nresults); typedef int (*lua_resume_t)(lua_State *ls, int narg); typedef int (*lua_status_t)(lua_State *ls); /* ** garbage-collection function and options */ typedef int (*lua_gc_t)(lua_State *ls, int what, int data); /* ** miscellaneous functions */ typedef int (*lua_error_t)(lua_State *ls); typedef int (*lua_next_t)(lua_State *ls, int idx); typedef void (*lua_concat_t)(lua_State *ls, int n); typedef lua_Alloc (*lua_getallocf_t) (lua_State *ls, void **ud); typedef void (*lua_setallocf_t) (lua_State *ls, lua_Alloc f, void *ud); /* Functions to be called by the debuger in specific events */ typedef int (*lua_getstack_t) (lua_State *ls, int level, lua_Debug *ar); typedef int (*lua_getinfo_t) (lua_State *ls, const char *what, lua_Debug *ar); typedef const char *(*lua_getlocal_t) (lua_State *ls, const lua_Debug *ar, int n); typedef const char *(*lua_setlocal_t) (lua_State *ls, const lua_Debug *ar, int n); typedef const char *(*lua_getupvalue_t) (lua_State *ls, int funcindex, int n); typedef const char *(*lua_setupvalue_t) (lua_State *ls, int funcindex, int n); typedef int (*lua_sethook_t) (lua_State *ls, lua_Hook func, int mask, int count); typedef lua_Hook (*lua_gethook_t) (lua_State *ls); typedef int (*lua_gethookmask_t) (lua_State *ls); typedef int (*lua_gethookcount_t) (lua_State *ls); /* ** Lua auxlib */ #if defined(LUA_COMPAT_GETN) typedef int (*luaL_getn_t) (lua_State *ls, int t); typedef void (*luaL_setn_t) (lua_State *ls, int t, int n); #endif typedef void (*luaL_register_t)(lua_State *ls, const char *libname, const luaL_Reg *l); typedef int (*luaL_getmetafield_t)(lua_State *ls, int obj, const char *e); typedef int (*luaL_callmeta_t)(lua_State *ls, int obj, const char *e); typedef int (*luaL_typerror_t)(lua_State *ls, int narg, const char *tname); typedef int (*luaL_argerror_t)(lua_State *ls, int numarg, const char *extramsg); typedef const char *(*luaL_checklstring_t)(lua_State *ls, int numArg, size_t *l); typedef const char *(*luaL_optlstring_t)(lua_State *ls, int numArg, const char *def, size_t *l); typedef lua_Number (*luaL_checknumber_t)(lua_State *ls, int numArg); typedef lua_Number (*luaL_optnumber_t)(lua_State *ls, int nArg, lua_Number def); typedef lua_Integer (*luaL_checkinteger_t)(lua_State *ls, int numArg); typedef lua_Integer (*luaL_optinteger_t)(lua_State *ls, int nArg, lua_Integer def); typedef void (*luaL_checkstack_t)(lua_State *ls, int sz, const char *msg); typedef void (*luaL_checktype_t)(lua_State *ls, int narg, int t); typedef void (*luaL_checkany_t)(lua_State *ls, int narg); typedef int (*luaL_newmetatable_t)(lua_State *ls, const char *tname); typedef void *(*luaL_checkudata_t)(lua_State *ls, int ud, const char *tname); typedef void (*luaL_where_t)(lua_State *ls, int lvl); typedef int (*luaL_error_t)(lua_State *ls, const char *fmt, ...); typedef int (*luaL_checkoption_t)(lua_State *ls, int narg, const char *def, const char *const lst[]); typedef int (*luaL_ref_t)(lua_State *ls, int t); typedef void (*luaL_unref_t)(lua_State *ls, int t, int ref); typedef int (*luaL_loadfile_t)(lua_State *ls, const char *filename); typedef int (*luaL_loadbuffer_t)(lua_State *ls, const char *buff, size_t sz, const char *name); typedef int (*luaL_loadstring_t)(lua_State *ls, const char *s); typedef lua_State *(*luaL_newstate_t)(void); typedef const char *(*luaL_gsub_t)(lua_State *ls, const char *s, const char *p, const char *r); typedef const char *(*luaL_findtable_t)(lua_State *ls, int idx, const char *fname, int szhint); typedef void (*luaL_buffinit_t)(lua_State *ls, luaL_Buffer *B); typedef char *(*luaL_prepbuffer_t)(luaL_Buffer *B); typedef void (*luaL_addlstring_t)(luaL_Buffer *B, const char *s, size_t l); typedef void (*luaL_addstring_t)(luaL_Buffer *B, const char *s); typedef void (*luaL_addvalue_t)(luaL_Buffer *B); typedef void (*luaL_pushresult_t)(luaL_Buffer *B); typedef lua_State* (*lua_getmainstate_t)(lua_State* L); /** functions **/ #ifdef __cplusplus extern "C" { #endif /* ** state manipulation */ #define LRET(f, ...) return ((f ## _t)p ## f)(__VA_ARGS__) #define LCALL(f, ...) ((f ## _t)p ## f)(__VA_ARGS__) lua_State *(lua_newstate) (lua_Alloc f, void *ud) { LRET(lua_newstate, f, ud); } void (lua_close) (lua_State *ls) { LRET(lua_close, ls); } lua_State *(lua_newthread) (lua_State *ls) { LRET(lua_newthread, ls); } lua_CFunction (lua_atpanic) (lua_State *ls, lua_CFunction panicf) { LRET(lua_atpanic, ls, panicf); } /* ** basic stack manipulation */ int (lua_gettop) (lua_State *ls) { LRET(lua_gettop, ls); } void (lua_settop) (lua_State *ls, int idx) { LCALL(lua_settop, ls, idx); } void (lua_pushvalue) (lua_State *ls, int idx) { LCALL(lua_pushvalue, ls, idx); } void (lua_remove) (lua_State *ls, int idx) { LCALL(lua_remove, ls, idx); } void (lua_insert) (lua_State *ls, int idx) { LCALL(lua_insert, ls, idx); } void (lua_replace) (lua_State *ls, int idx) { LCALL(lua_replace, ls, idx); } int (lua_checkstack) (lua_State *ls, int sz) { LRET(lua_checkstack, ls, sz); } void (lua_xmove) (lua_State *from, lua_State *to, int n) { LCALL(lua_xmove, from, to, n); } /* ** access functions (stack -> C) */ int (lua_isnumber) (lua_State *ls, int idx) { LRET(lua_isnumber, ls, idx); } int (lua_isstring) (lua_State *ls, int idx) { LRET(lua_isstring, ls, idx); } int (lua_iscfunction) (lua_State *ls, int idx) { LRET(lua_iscfunction, ls, idx); } int (lua_isuserdata) (lua_State *ls, int idx) { LRET(lua_isuserdata, ls, idx); } int (lua_type) (lua_State *ls, int idx) { LRET(lua_type, ls, idx); } const char *(lua_typename) (lua_State *ls, int tp) { LRET(lua_typename, ls, tp); } int (lua_equal) (lua_State *ls, int idx1, int idx2) { LRET(lua_equal, ls, idx1, idx2); } int (lua_rawequal) (lua_State *ls, int idx1, int idx2) { LRET(lua_rawequal, ls, idx1, idx2); } int (lua_lessthan) (lua_State *ls, int idx1, int idx2) { LRET(lua_lessthan, ls, idx1, idx2); } lua_Number (lua_tonumber) (lua_State *ls, int idx) { LRET(lua_tonumber, ls, idx); } lua_Integer (lua_tointeger) (lua_State *ls, int idx) { LRET(lua_tointeger, ls, idx); } int (lua_toboolean) (lua_State *ls, int idx) { LRET(lua_toboolean, ls, idx); } const char *(lua_tolstring) (lua_State *ls, int idx, size_t *len) { LRET(lua_tolstring, ls, idx, len); } size_t (lua_objlen) (lua_State *ls, int idx) { LRET(lua_objlen, ls, idx); } lua_CFunction (lua_tocfunction) (lua_State *ls, int idx) { LRET(lua_tocfunction, ls, idx); } void *(lua_touserdata) (lua_State *ls, int idx) { LRET(lua_touserdata, ls, idx); } lua_State *(lua_tothread) (lua_State *ls, int idx) { LRET(lua_tothread, ls, idx); } const void *(lua_topointer) (lua_State *ls, int idx) { LRET(lua_topointer, ls, idx); } /* ** push functions (C -> stack) */ void (lua_pushnil) (lua_State *ls) { LCALL(lua_pushnil, ls); } void (lua_pushnumber) (lua_State *ls, lua_Number n) { LCALL(lua_pushnumber, ls, n); } void (lua_pushinteger) (lua_State *ls, lua_Integer n) { LCALL(lua_pushinteger, ls, n); } void (lua_pushlstring) (lua_State *ls, const char *s, size_t l) { LCALL(lua_pushlstring, ls, s, l); } void (lua_pushstring) (lua_State *ls, const char *s) { LCALL(lua_pushstring, ls, s); } const char *(lua_pushvfstring) (lua_State *ls, const char *fmt, va_list argp) { LRET(lua_pushvfstring, ls, fmt, argp); } const char *(lua_pushfstring) (lua_State *ls, const char *fmt, ...) { char buffer[1024]; va_list vl; va_start(vl, fmt); vsnprintf(buffer, 1024, fmt, vl); va_end(vl); LRET(lua_pushfstring, ls, buffer); } void (lua_pushcclosure) (lua_State *ls, lua_CFunction fn, int n) { LCALL(lua_pushcclosure, ls, fn, n); } void (lua_pushboolean) (lua_State *ls, int b) { LCALL(lua_pushboolean, ls, b); } void (lua_pushlightuserdata) (lua_State *ls, void *p) { LCALL(lua_pushlightuserdata, ls, p); } int (lua_pushthread) (lua_State *ls) { LRET(lua_pushthread, ls); } /* ** get functions (Lua -> stack) */ void (lua_gettable) (lua_State *ls, int idx) { LCALL(lua_gettable, ls, idx); } void (lua_getfield) (lua_State *ls, int idx, const char *k) { LCALL(lua_getfield, ls, idx, k); } void (lua_rawget) (lua_State *ls, int idx) { LCALL(lua_rawget, ls, idx); } void (lua_rawgeti) (lua_State *ls, int idx, int n) { LCALL(lua_rawgeti, ls, idx, n); } void (lua_createtable) (lua_State *ls, int narr, int nrec) { LCALL(lua_createtable, ls, narr, nrec); } void *(lua_newuserdata) (lua_State *ls, size_t sz) { LRET(lua_newuserdata, ls, sz); } int (lua_getmetatable) (lua_State *ls, int objindex) { LRET(lua_getmetatable, ls, objindex); } void (lua_getfenv) (lua_State *ls, int idx) { LCALL(lua_getfenv, ls, idx); } /* ** set functions (stack -> Lua) */ void (lua_settable) (lua_State *ls, int idx) { LCALL(lua_settable, ls, idx); } void (lua_setfield) (lua_State *ls, int idx, const char *k) { LCALL(lua_setfield, ls, idx, k); } void (lua_rawset) (lua_State *ls, int idx) { LCALL(lua_rawset, ls, idx); } void (lua_rawseti) (lua_State *ls, int idx, int n) { LCALL(lua_rawseti, ls, idx, n); } int (lua_setmetatable) (lua_State *ls, int objindex) { LRET(lua_setmetatable, ls, objindex); } int (lua_setfenv) (lua_State *ls, int idx) { LRET(lua_setfenv, ls, idx); } /* ** `load' and `call' functions (load and run Lua code) */ void (lua_call) (lua_State *ls, int nargs, int nresults) { LCALL(lua_call, ls, nargs, nresults); } int (lua_pcall) (lua_State *ls, int nargs, int nresults, int errfunc) { LRET(lua_pcall, ls, nargs, nresults, errfunc); } int (lua_cpcall) (lua_State *ls, lua_CFunction func, void *ud) { LRET(lua_cpcall, ls, func, ud); } int (lua_load) (lua_State *ls, lua_Reader reader, void *dt, const char *chunkname) { LRET(lua_load, ls, reader, dt, chunkname); } int (lua_dump) (lua_State *ls, lua_Writer writer, void *data) { LRET(lua_dump, ls, writer, data); } /* ** coroutine functions */ int (lua_yield) (lua_State *ls, int nresults) { LRET(lua_yield, ls, nresults); } int (lua_resume) (lua_State *ls, int narg) { LRET(lua_resume, ls, narg); } int (lua_status) (lua_State *ls) { LRET(lua_status, ls); } /* ** garbage-collection function and options */ int (lua_gc) (lua_State *ls, int what, int data) { LRET(lua_gc, ls, what, data); } /* ** miscellaneous functions */ int (lua_error) (lua_State *ls) { LRET(lua_error, ls); } int (lua_next) (lua_State *ls, int idx) { LRET(lua_next, ls, idx); } void (lua_concat) (lua_State *ls, int n) { LCALL(lua_concat, ls, n); } lua_Alloc (lua_getallocf) (lua_State *ls, void **ud) { LRET(lua_getallocf, ls, ud); } void lua_setallocf (lua_State *ls, lua_Alloc f, void *ud) { LCALL(lua_setallocf, ls, f, ud); } /* Functions to be called by the debuger in specific events */ int lua_getstack (lua_State *ls, int level, lua_Debug *ar) { LRET(lua_getstack, ls, level, ar); } int lua_getinfo (lua_State *ls, const char *what, lua_Debug *ar) { LRET(lua_getinfo, ls, what, ar); } const char *lua_getlocal (lua_State *ls, const lua_Debug *ar, int n) { LRET(lua_getlocal, ls, ar, n); } const char *lua_setlocal (lua_State *ls, const lua_Debug *ar, int n) { LRET(lua_setlocal, ls, ar, n); } const char *lua_getupvalue (lua_State *ls, int funcindex, int n) { LRET(lua_getupvalue, ls, funcindex, n); } const char *lua_setupvalue (lua_State *ls, int funcindex, int n) { LRET(lua_setupvalue, ls, funcindex, n); } int lua_sethook (lua_State *ls, lua_Hook func, int mask, int count) { LRET(lua_sethook, ls, func, mask, count); } lua_Hook lua_gethook (lua_State *ls) { LRET(lua_gethook, ls); } int lua_gethookmask (lua_State *ls) { LRET(lua_gethookmask, ls); } int lua_gethookcount (lua_State *ls) { LRET(lua_gethookcount, ls); } /** ** Lua auxlib **/ #if defined(LUA_COMPAT_GETN) int (luaL_getn) (lua_State *ls, int t) { LRET(luaL_getn, ls, t); } void (luaL_setn) (lua_State *ls, int t, int n) { LRET(luaL_setn, ls, t, n); } #endif void (luaL_register) (lua_State *ls, const char *libname, const luaL_Reg *l) { LCALL(luaL_register, ls, libname, l); } int (luaL_getmetafield) (lua_State *ls, int obj, const char *e) { LRET(luaL_getmetafield, ls, obj, e); } int (luaL_callmeta) (lua_State *ls, int obj, const char *e) { LRET(luaL_callmeta, ls, obj, e); } int (luaL_typerror) (lua_State *ls, int narg, const char *tname) { LRET(luaL_typerror, ls, narg, tname); } int (luaL_argerror) (lua_State *ls, int numarg, const char *extramsg) { LRET(luaL_argerror, ls, numarg, extramsg); } const char *(luaL_checklstring) (lua_State *ls, int numArg, size_t *l) { LRET(luaL_checklstring, ls, numArg, l); } const char *(luaL_optlstring) (lua_State *ls, int numArg, const char *def, size_t *l) { LRET(luaL_optlstring, ls, numArg, def, l); } lua_Number (luaL_checknumber) (lua_State *ls, int numArg) { LRET(luaL_checknumber, ls, numArg); } lua_Number (luaL_optnumber) (lua_State *ls, int nArg, lua_Number def) { LRET(luaL_optnumber, ls, nArg, def); } lua_Integer (luaL_checkinteger) (lua_State *ls, int numArg) { LRET(luaL_checkinteger, ls, numArg); } lua_Integer (luaL_optinteger) (lua_State *ls, int nArg, lua_Integer def) { LRET(luaL_optinteger, ls, nArg, def); } void (luaL_checkstack) (lua_State *ls, int sz, const char *msg) { LRET(luaL_checkstack, ls, sz, msg); } void (luaL_checktype) (lua_State *ls, int narg, int t) { LCALL(luaL_checktype, ls, narg, t); } void (luaL_checkany) (lua_State *ls, int narg) { LCALL(luaL_checkany, ls, narg); } int (luaL_newmetatable) (lua_State *ls, const char *tname) { LRET(luaL_newmetatable, ls, tname); } void *(luaL_checkudata) (lua_State *ls, int ud, const char *tname) { LRET(luaL_checkudata, ls, ud, tname); } void (luaL_where) (lua_State *ls, int lvl) { LCALL(luaL_where, ls, lvl); } int (luaL_error) (lua_State *ls, const char *fmt, ...) { char buffer[1024]; va_list vl; va_start(vl, fmt); vsnprintf(buffer, 1024, fmt, vl); va_end(vl); LRET(luaL_error, ls, buffer); } int (luaL_checkoption) (lua_State *ls, int narg, const char *def, const char *const lst[]) { LRET(luaL_checkoption, ls, narg, def, lst); } int (luaL_ref) (lua_State *ls, int t) { LRET(luaL_ref, ls, t); } void (luaL_unref) (lua_State *ls, int t, int ref) { LCALL(luaL_unref, ls, t, ref); } int (luaL_loadfile) (lua_State *ls, const char *filename) { LRET(luaL_loadfile, ls, filename); } int (luaL_loadbuffer) (lua_State *ls, const char *buff, size_t sz, const char *name) { LRET(luaL_loadbuffer, ls, buff, sz, name); } int (luaL_loadstring) (lua_State *ls, const char *s) { LRET(luaL_loadstring, ls, s); } lua_State *(luaL_newstate) (void) { LRET(luaL_newstate); } const char *(luaL_gsub) (lua_State *ls, const char *s, const char *p, const char *r) { LRET(luaL_gsub, ls, s, p, r); } const char *(luaL_findtable) (lua_State *ls, int idx, const char *fname, int szhint) { LRET(luaL_findtable, ls, idx, fname, szhint); } void (luaL_buffinit) (lua_State *ls, luaL_Buffer *B) { LCALL(luaL_buffinit, ls, B); } char *(luaL_prepbuffer) (luaL_Buffer *B) { LRET(luaL_prepbuffer, B); } void (luaL_addlstring) (luaL_Buffer *B, const char *s, size_t l) { LCALL(luaL_addlstring, B, s, l); } void (luaL_addstring) (luaL_Buffer *B, const char *s) { LCALL(luaL_addstring, B, s); } void (luaL_addvalue) (luaL_Buffer *B) { LCALL(luaL_addvalue, B); } void (luaL_pushresult) (luaL_Buffer *B) { LCALL(luaL_pushresult, B); } lua_State* (lua_getmainstate) (lua_State* L) { LRET(lua_getmainstate, L); } #ifdef __cplusplus } #endif #undef LRET #undef LCALL
// Copyright (c) 2021 Vitaly Dikov // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt) #include"locator.hpp" namespace game { namespace global { using namespace std; global::Factory Locator::factory_; unique_ptr<global::Options> Locator::options_; bool Locator::initialized_{ false }; ///************************************************************************************************ void Locator::initialize() { if (isInitialized()) return; options_ = Locator::getFactory().createOptions(); initialized_ = true; } } // namespace global } // namespace game
#include<bits/stdc++.h> using namespace std; int AddN(int n) { if(n==0) { return 0; } int presum = AddN(n-1); return n + presum; } int main() { #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif int n; cin>>n; cout<<AddN(n); return 0; }
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "services/audio/stream_factory.h" #include <utility> #include "base/bind.h" #include "base/strings/stringprintf.h" #include "base/trace_event/trace_event.h" #include "base/unguessable_token.h" #include "build/chromecast_buildflags.h" #include "media/audio/audio_device_description.h" #include "services/audio/input_stream.h" #include "services/audio/local_muter.h" #include "services/audio/loopback_stream.h" #include "services/audio/output_stream.h" #include "services/audio/user_input_monitor.h" namespace audio { StreamFactory::StreamFactory(media::AudioManager* audio_manager) : audio_manager_(audio_manager), loopback_worker_thread_("Loopback Worker") { } StreamFactory::~StreamFactory() { DCHECK_CALLED_ON_VALID_SEQUENCE(owning_sequence_); } void StreamFactory::Bind(mojo::PendingReceiver<mojom::StreamFactory> receiver) { DCHECK_CALLED_ON_VALID_SEQUENCE(owning_sequence_); receivers_.Add(this, std::move(receiver)); } void StreamFactory::CreateInputStream( mojo::PendingReceiver<media::mojom::AudioInputStream> stream_receiver, mojo::PendingRemote<media::mojom::AudioInputStreamClient> client, mojo::PendingRemote<media::mojom::AudioInputStreamObserver> observer, mojo::PendingRemote<media::mojom::AudioLog> pending_log, const std::string& device_id, const media::AudioParameters& params, uint32_t shared_memory_count, bool enable_agc, base::ReadOnlySharedMemoryRegion key_press_count_buffer, CreateInputStreamCallback created_callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(owning_sequence_); TRACE_EVENT_NESTABLE_ASYNC_INSTANT2("audio", "CreateInputStream", this, "device id", device_id, "params", params.AsHumanReadableString()); // Unretained is safe since |this| indirectly owns the InputStream. auto deleter_callback = base::BindOnce(&StreamFactory::DestroyInputStream, base::Unretained(this)); input_streams_.insert(std::make_unique<InputStream>( std::move(created_callback), std::move(deleter_callback), std::move(stream_receiver), std::move(client), std::move(observer), std::move(pending_log), audio_manager_, UserInputMonitor::Create(std::move(key_press_count_buffer)), device_id, params, shared_memory_count, enable_agc)); } void StreamFactory::AssociateInputAndOutputForAec( const base::UnguessableToken& input_stream_id, const std::string& output_device_id) { DCHECK_CALLED_ON_VALID_SEQUENCE(owning_sequence_); for (const auto& stream : input_streams_) { if (stream->id() == input_stream_id) { stream->SetOutputDeviceForAec(output_device_id); return; } } } void StreamFactory::CreateOutputStream( mojo::PendingReceiver<media::mojom::AudioOutputStream> stream_receiver, mojo::PendingAssociatedRemote<media::mojom::AudioOutputStreamObserver> observer, mojo::PendingRemote<media::mojom::AudioLog> log, const std::string& output_device_id, const media::AudioParameters& params, const base::UnguessableToken& group_id, CreateOutputStreamCallback created_callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(owning_sequence_); TRACE_EVENT_NESTABLE_ASYNC_INSTANT2("audio", "CreateOutputStream", this, "device id", output_device_id, "params", params.AsHumanReadableString()); // Unretained is safe since |this| indirectly owns the OutputStream. auto deleter_callback = base::BindOnce(&StreamFactory::DestroyOutputStream, base::Unretained(this)); // This is required for multizone audio playback on Cast devices. // See //chromecast/media/cast_audio_manager.h for more information. const std::string device_id_or_group_id = #if BUILDFLAG(IS_CHROMECAST) (::media::AudioDeviceDescription::IsCommunicationsDevice( output_device_id) || group_id.is_empty()) ? output_device_id : group_id.ToString(); #else output_device_id; #endif output_streams_.insert(std::make_unique<OutputStream>( std::move(created_callback), std::move(deleter_callback), std::move(stream_receiver), std::move(observer), std::move(log), audio_manager_, device_id_or_group_id, params, &coordinator_, group_id)); } void StreamFactory::BindMuter( mojo::PendingAssociatedReceiver<mojom::LocalMuter> receiver, const base::UnguessableToken& group_id) { DCHECK_CALLED_ON_VALID_SEQUENCE(owning_sequence_); TRACE_EVENT_NESTABLE_ASYNC_INSTANT1("audio", "BindMuter", this, "group id", group_id.GetLowForSerialization()); // Find the existing LocalMuter for this group, or create one on-demand. auto it = std::find_if(muters_.begin(), muters_.end(), [&group_id](const std::unique_ptr<LocalMuter>& muter) { return muter->group_id() == group_id; }); LocalMuter* muter; if (it == muters_.end()) { auto muter_ptr = std::make_unique<LocalMuter>(&coordinator_, group_id); muter = muter_ptr.get(); muter->SetAllBindingsLostCallback(base::BindOnce( &StreamFactory::DestroyMuter, base::Unretained(this), muter)); muters_.emplace_back(std::move(muter_ptr)); } else { muter = it->get(); } // Add the receiver. muter->AddReceiver(std::move(receiver)); } void StreamFactory::CreateLoopbackStream( mojo::PendingReceiver<media::mojom::AudioInputStream> receiver, mojo::PendingRemote<media::mojom::AudioInputStreamClient> client, mojo::PendingRemote<media::mojom::AudioInputStreamObserver> observer, const media::AudioParameters& params, uint32_t shared_memory_count, const base::UnguessableToken& group_id, CreateLoopbackStreamCallback created_callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(owning_sequence_); TRACE_EVENT_NESTABLE_ASYNC_INSTANT2("audio", "CreateLoopbackStream", this, "group id", group_id.GetLowForSerialization(), "params", params.AsHumanReadableString()); // All LoopbackStreams share a single realtime worker thread. This is because // the execution timing of scheduled tasks must be precise, and top priority // should be given to the smooth continuous flow of audio while in low-CPU // situations; all to avoid glitches. The thread is started just before the // first LoopbackStream will be created, and stopped after all LoopbackStreams // are gone. scoped_refptr<base::SequencedTaskRunner> task_runner; if (loopback_worker_thread_.IsRunning()) { task_runner = loopback_worker_thread_.task_runner(); } else { TRACE_EVENT_BEGIN0("audio", "Start Loopback Worker"); base::Thread::Options options; options.timer_slack = base::TIMER_SLACK_NONE; options.priority = base::ThreadPriority::REALTIME_AUDIO; if (loopback_worker_thread_.StartWithOptions(options)) { task_runner = loopback_worker_thread_.task_runner(); TRACE_EVENT_END1("audio", "Start Loopback Worker", "success", true); } else { // Something about this platform or its current environment has prevented // a realtime audio thread from being started. Fall-back to using the // AudioManager worker thread. LOG(ERROR) << "Unable to start realtime loopback worker thread."; task_runner = audio_manager_->GetWorkerTaskRunner(); TRACE_EVENT_END1("audio", "Start Loopback Worker", "success", false); } } auto stream = std::make_unique<LoopbackStream>( std::move(created_callback), base::BindOnce(&StreamFactory::DestroyLoopbackStream, base::Unretained(this)), std::move(task_runner), std::move(receiver), std::move(client), std::move(observer), params, shared_memory_count, &coordinator_, group_id); loopback_streams_.emplace_back(std::move(stream)); } void StreamFactory::DestroyInputStream(InputStream* stream) { DCHECK_CALLED_ON_VALID_SEQUENCE(owning_sequence_); size_t erased = input_streams_.erase(stream); DCHECK_EQ(1u, erased); } void StreamFactory::DestroyOutputStream(OutputStream* stream) { DCHECK_CALLED_ON_VALID_SEQUENCE(owning_sequence_); size_t erased = output_streams_.erase(stream); DCHECK_EQ(1u, erased); } void StreamFactory::DestroyMuter(LocalMuter* muter) { DCHECK_CALLED_ON_VALID_SEQUENCE(owning_sequence_); DCHECK(muter); // Output streams have a task posting before destruction (see the OnError // function in output_stream.cc). To ensure that stream destruction and // unmuting is done in the intended order (the order in which the messages are // received by the service), we post a task for destroying the muter as well. // Otherwise, a "destroy all streams, then destroy the muter" sequence may // result in a brief blip of audio. auto do_destroy = [](base::WeakPtr<StreamFactory> weak_this, LocalMuter* muter) { if (weak_this) { const auto it = std::find_if(weak_this->muters_.begin(), weak_this->muters_.end(), base::MatchesUniquePtr(muter)); DCHECK(it != weak_this->muters_.end()); weak_this->muters_.erase(it); } }; base::SequencedTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(do_destroy, weak_ptr_factory_.GetWeakPtr(), muter)); } void StreamFactory::DestroyLoopbackStream(LoopbackStream* stream) { DCHECK_CALLED_ON_VALID_SEQUENCE(owning_sequence_); DCHECK(stream); const auto it = std::find_if(loopback_streams_.begin(), loopback_streams_.end(), base::MatchesUniquePtr(stream)); DCHECK(it != loopback_streams_.end()); loopback_streams_.erase(it); // If all LoopbackStreams have ended, stop and join the worker thread. if (loopback_streams_.empty()) { TRACE_EVENT0("audio", "Stop Loopback Worker"); loopback_worker_thread_.Stop(); } } } // namespace audio
/** * @file */ #include "src/expression/Generic.hpp" #include "src/visitor/all.hpp" birch::Generic::Generic(const Annotation annotation, Name* name, Type* type, Location* loc) : Expression(loc), Annotated(annotation), Named(name), Typed(type) { // } birch::Generic::~Generic() { // } birch::Expression* birch::Generic::accept(Cloner* visitor) const { return visitor->clone(this); } birch::Expression* birch::Generic::accept(Modifier* visitor) { return visitor->modify(this); } void birch::Generic::accept(Visitor* visitor) const { visitor->visit(this); }
/* * Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ #include <LibJS/Runtime/WeakSet.h> namespace JS { WeakSet* WeakSet::create(GlobalObject& global_object) { return global_object.heap().allocate<WeakSet>(global_object, *global_object.weak_set_prototype()); } WeakSet::WeakSet(Object& prototype) : Object(prototype) { heap().did_create_weak_set({}, *this); } WeakSet::~WeakSet() { heap().did_destroy_weak_set({}, *this); } void WeakSet::remove_sweeped_cells(Badge<Heap>, Vector<Cell*>& cells) { for (auto* cell : cells) m_values.remove(cell); } }
// Copyright 2021 Michael Both // // 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 <QMouseEvent> #include <QPainter> #include <QAction> #include <QMenu> #include "EventsView.hpp" #include "HelpfulFunctions.hpp" #include "main.hpp" #define MIN_SELECTION_PIXEL_DIFF 5 #define LINE_SEPARATOR_COLOR QColor(230, 230, 230) #define ROLLOVER_BG_COLOR QColor(200, 200, 200, 220) #define ROLLOVER_TEXT_COLOR QColor(50, 50, 50) #define ROLLOVER_TITLE_COLOR QColor(125, 125, 125) #define ROLLOVER_SEPARATOR_COLOR QColor(175, 175, 175) #define ROW_HIGHLIGHT_COLOR2 QColor(0, 0, 0, 15) #define HISTOGRAM_BAR_BG_COLOR QColor(230,230,230) #define ALIGNMENT_COLOR QColor(150, 150, 150) EventsView::EventsView(QWidget *parent) : QWidget(parent) { // Track mouse when not pressed setMouseTracking(true); // Allow keyboard input //setFocusPolicy(Qt::StrongFocus); // Allow for keyboard focus now //setFocus(); // Allow mouse right click this->setContextMenuPolicy(Qt::CustomContextMenu); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(popupContextMenu(const QPoint &))); // Load the logo QImage image = QImage(":/unikorn_logo.png"); recolorImage(image, QColor(220,220,220)); logo = QPixmap::fromImage(image); } EventsView::~EventsView() { // Nothing to do } static uint32_t findEventIndexAtTime(Events *events, EventTreeNode *node, uint64_t time, int32_t index_offset) { uint32_t first = 0; uint32_t last = node->num_event_instances-1; // See if before first event uint32_t first_event_index = node->event_indices[first]; Event *first_event = &events->event_buffer[first_event_index]; if (time <= first_event->time) { return first; } // See if after last event uint32_t last_event_index = node->event_indices[last]; Event *last_event = &events->event_buffer[last_event_index]; if (time > last_event->time) { return last+1; } // Binary search while ((last-first) > 1) { uint32_t mid = first + (last-first)/2; uint32_t event_index = node->event_indices[mid]; Event *event = &events->event_buffer[event_index]; if (event->time <= time) { first = mid; } else { last = mid; } } first++; // NOTE: want the first event to the right of the mouse, not the left if (first > 0 && index_offset < 0) { first--; index_offset++; } if (first < (node->num_event_instances-1) && index_offset > 0) { first++; index_offset--; } return first; } void EventsView::popupContextMenu(const QPoint &mouse_location) { if (G_event_tree_map.count() == 0) return; QMenu menu("Right click menu", this); QString style_text = "QMenu {\n" " icon-size: 32px;\n" " background-color: #bbbbbb;\n" " border: 1px solid black;\n" "}\n" "QMenu::item {\n" " background-color: transparent;\n" "}\n" "QMenu::item:selected {\n" " background-color: #999999;\n" "}\n"; menu.setStyleSheet(style_text); QAction zoom_to_region_action(QIcon(":/zoom_to_selected.png"), "Zoom To Region", this); QAction zoom_to_all_action(QIcon(":/zoom_to_all.png"), "Zoom To All", this); QAction zoom_in_action(QIcon(":/zoom_in.png"), "Zoom In", this); QAction zoom_out_action(QIcon(":/zoom_out.png"), "Zoom Out", this); if (timeRangeSelected()) { connect(&zoom_to_region_action, SIGNAL(triggered()), this, SLOT(zoomToRegion())); menu.addAction(&zoom_to_region_action); } if (percent_visible < 1.0) { connect(&zoom_to_all_action, SIGNAL(triggered()), this, SLOT(zoomToAll())); menu.addAction(&zoom_to_all_action); } connect(&zoom_in_action, SIGNAL(triggered()), this, SLOT(zoomIn())); menu.addAction(&zoom_in_action); if (percent_visible < 1.0) { connect(&zoom_out_action, SIGNAL(triggered()), this, SLOT(zoomOut())); menu.addAction(&zoom_out_action); } // Display the menu menu.exec(mapToGlobal(mouse_location)); } void EventsView::setMouseMode(MouseMode _mouse_mode) { mouse_mode = _mouse_mode; } void EventsView::prepareIcon(QString filename, bool recolor, QColor color) { QImage image = QImage(":/"+filename); if (recolor) { recolorImage(image, color); } image = image.scaledToHeight((int)(line_h*G_pixels_per_point), Qt::SmoothTransformation); QPixmap pixmap = QPixmap::fromImage(image); //pixmap.setDevicePixelRatio(G_pixels_per_point); // Does not seems to be needed probably because main.cpp calls QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); icon_map[filename] = pixmap; } void EventsView::updateLineHeight() { // Update font size QFont font = this->font(); font.setPointSize(G_font_point_size); this->setFont(font); // Calculate geometry QFontMetrics fm = QFontMetrics(this->font()); line_h = fm.height(); // Rebuild icons to make sure there are correctly sized; if not, then edges will looked aliased prepareIcon("hierarchy_closed_folder.png", true, FOLDER_ICON_COLOR); prepareIcon("hierarchy_closed_thread.png", true, THREAD_ICON_COLOR); prepareIcon("hierarchy_file.png", false, Qt::black); prepareIcon("hierarchy_opened_folder.png", true, FOLDER_ICON_COLOR); prepareIcon("hierarchy_opened_thread.png", true, THREAD_ICON_COLOR); } void EventsView::updateVOffset(int offset) { v_offset = offset; rebuildAndUpdate(); } void EventsView::getTimeRange(double *percent_visible_ret, double *percent_offset_ret) { *percent_visible_ret = percent_visible; *percent_offset_ret = percent_offset; } bool EventsView::timeRangeSelected() { return (selected_time_range_x1 != -1 && selected_time_range_x2 != -1); } void EventsView::updateTimeOffset(double percent_scroll_offset) { double max_offset = 1.0 - percent_visible; percent_offset = percent_scroll_offset * max_offset; rebuildAndUpdate(); } void EventsView::zoomToAll() { percent_visible = 1.0; percent_offset = 0.0; selected_time_range_x1 = -1; selected_time_range_x2 = -1; emit timeRangeChanged(); rebuildAndUpdate(); } void EventsView::zoomIn() { percent_visible /= 2.0; percent_offset += percent_visible/2.0; selected_time_range_x1 = -1; selected_time_range_x2 = -1; emit timeRangeChanged(); rebuildAndUpdate(); } void EventsView::zoomOut() { percent_offset -= percent_visible/2.0; percent_visible *= 2.0; if (percent_visible > 1.0) { percent_visible = 1.0; percent_offset = 0.0; } if (percent_offset < 0) { percent_offset = 0.0; } if (percent_offset > (1.0 - percent_visible)) { percent_offset = 1.0 - percent_visible; } selected_time_range_x1 = -1; selected_time_range_x2 = -1; emit timeRangeChanged(); rebuildAndUpdate(); } void EventsView::zoomToRegion() { if (selected_time_range_x1 != -1 && selected_time_range_x2 != -1) { int w = width(); int x1 = std::min(selected_time_range_x1, selected_time_range_x2); int x2 = std::max(selected_time_range_x1, selected_time_range_x2); x1 = std::max(x1, 0); x2 = std::min(x2, w-1); double w_factor = (x2-x1) / (double)w; double offset_factor = x1 / (double)w; percent_offset += offset_factor*percent_visible; percent_visible *= w_factor; } selected_time_range_x1 = -1; selected_time_range_x2 = -1; emit timeRangeChanged(); rebuildAndUpdate(); } void EventsView::centerPrevEvent(Events *events, EventTreeNode *events_row) { // Check if zoomed in, otherwise all events are visible if (percent_visible < 1.0) { // IMPORTANT: Using time range that was last calculated from the paintEvent() // Get event currently at center uint64_t center_time = start_time + (end_time - start_time)/2; uint32_t center_event_index = findEventIndexAtTime(events, events_row, center_time, 0); if (center_event_index >= events_row->num_event_instances) center_event_index = events_row->num_event_instances-1; Event *event = &events->event_buffer[events_row->event_indices[center_event_index]]; // See if need to skip to the prev event uint64_t margin = (uint64_t)(0.01*(end_time-start_time)); // 1% of visible time if (event->time >= (center_time-margin)) { if (center_event_index > 0) { center_event_index--; event = &events->event_buffer[events_row->event_indices[center_event_index]]; } } if (event->time < center_time) { // Move the percent_offset to center this event // From: // [-------|+++X+++++++++|-------------------] // To: // [----|++++++X++++++|----------------------] double center_percent = (event->time - full_start_time) / (double)(full_end_time - full_start_time); percent_offset = std::max(center_percent - percent_visible/2.0, 0.0); selected_time_range_x1 = -1; selected_time_range_x2 = -1; emit timeRangeChanged(); rebuildAndUpdate(); } } } void EventsView::centerNextEvent(Events *events, EventTreeNode *events_row) { // Check if zoomed in, otherwise all events are visible if (percent_visible < 1.0) { // IMPORTANT: Using time range that was last calculated from the paintEvent() // Get event currently at center uint64_t center_time = start_time + (end_time - start_time)/2; uint32_t center_event_index = findEventIndexAtTime(events, events_row, center_time, 0); if (center_event_index >= events_row->num_event_instances) center_event_index = events_row->num_event_instances-1; Event *event = &events->event_buffer[events_row->event_indices[center_event_index]]; // See if need to skip to the next event uint64_t margin = (uint64_t)(0.01*(end_time-start_time)); // 1% of visible time if (event->time <= (center_time+margin)) { if (center_event_index < (events_row->num_event_instances-1)) { center_event_index++; event = &events->event_buffer[events_row->event_indices[center_event_index]]; } } if (event->time > center_time) { // Move the percent_offset to center this event // From: // [-------|+++++++++X+++|-------------------] // To: // [----------|++++++X++++++|----------------] double center_percent = (event->time - full_start_time) / (double)(full_end_time - full_start_time); percent_offset = std::max(center_percent - percent_visible/2.0, 0.0); selected_time_range_x1 = -1; selected_time_range_x2 = -1; emit timeRangeChanged(); rebuildAndUpdate(); } } } void EventsView::mousePressEvent(QMouseEvent *event) { if (G_event_tree_map.count() == 0) return; if (event->button() == Qt::LeftButton) { // Start selection of time range mouse_button_pressed = true; selected_time_range_x1 = event->x(); selected_time_range_x2 = selected_time_range_x1; update(); // Avoids full redraw } } EventTreeNode *EventsView::mouseOnEventsLine(EventTreeNode *parent) { if (parent->events_row_rect.contains(mouse_location)) { return parent; } for (auto child: parent->children) { EventTreeNode *node_with_mouse = mouseOnEventsLine(child); if (node_with_mouse != NULL) return node_with_mouse; } return NULL; } void EventsView::mouseMoveEvent(QMouseEvent *event) { mouse_location = QPoint(event->x(), event->y()); if (mouse_button_pressed) { // Selecting time range selected_time_range_x2 = event->x(); update(); // Avoids full redraw } else { // See if mouse is on an event line update(); // Avoids full redraw, but needed to draw rollover } } void EventsView::mouseReleaseEvent(QMouseEvent * /*event*/) { if (mouse_button_pressed) { mouse_button_pressed = false; int diff = std::abs(selected_time_range_x1 - selected_time_range_x2); if (diff < MIN_SELECTION_PIXEL_DIFF) { selected_time_range_x1 = -1; selected_time_range_x2 = -1; } emit timeRangeSelectionChanged(); update(); // Avoids full redraw } } void EventsView::leaveEvent(QEvent * /*event*/) { mouse_location = QPoint(-1,-1); update(); // Avoids full redraw } void EventsView::hasEventsOutsideOfVisibleRegion(Events *events, EventTreeNode *events_row, bool *events_to_the_left_ret, bool *events_to_the_right_ret) { *events_to_the_left_ret = false; *events_to_the_right_ret = false; // Check if zoomed in, otherwise all events are visible if (percent_visible < 1.0) { // IMPORTANT: Using time range that was last calculated from the paintEvent() uint32_t first_visible_event_index = findEventIndexAtTime(events, events_row, start_time, 0); uint32_t last_visible_event_index = findEventIndexAtTime(events, events_row, end_time, 0); if (first_visible_event_index > 0) { *events_to_the_left_ret = true; } if (last_visible_event_index < events_row->num_event_instances) { *events_to_the_right_ret = true; } } } void EventsView::drawHierarchyLine(QPainter *painter, Events *events, EventTreeNode *parent, int &line_index, int ancestor_open) { int h = height(); int w = width(); int y = -v_offset + line_index * line_h; parent->events_row_rect = QRect(); parent->utilization = 0.0; bool parent_is_filtered = (parent->tree_node_type == TREE_NODE_IS_EVENT && G_event_filters.contains(parent->name)); // only draw if visible if (!parent_is_filtered && y > -line_h && y < h) { // Remember the row geometry QRect row_rect = QRect(0,y,w,line_h); parent->events_row_rect = row_rect; // Highlight row if selected (selected in hierarchy view) if (parent->row_selected) { painter->fillRect(row_rect, ROW_SELECTED_COLOR); } if (parent->num_event_instances > 0) { // Determin the ragne of events to draw based on visible time region uint32_t first_visible_event_index = findEventIndexAtTime(events, parent, start_time, -3); uint32_t last_visible_event_index = findEventIndexAtTime(events, parent, end_time, 3); if (last_visible_event_index >= parent->num_event_instances) last_visible_event_index = parent->num_event_instances - 1; // NOTE: just outside of range // Draw events int prev_x = 0; int prev_prev_x = 0; uint64_t prev_time = 0; bool prev_is_start = false; EventInfo *event_info = &events->event_info_list[parent->event_info_index]; painter->setPen(QPen(parent->color, 1, Qt::SolidLine)); int y2 = y + (int)(line_h * 0.2f); int y3 = y + (int)(line_h * 0.4f); int y4 = y + (int)(line_h * 0.6f); int y5 = y + (int)(line_h * 0.8f); int range_h = y4 - y3 + 1; uint64_t total_time_usage = 0; for (uint32_t i=first_visible_event_index; i<=last_visible_event_index; i++) { uint32_t event_index = parent->event_indices[i]; Event *event = &events->event_buffer[event_index]; bool is_start = event->event_id == event_info->start_id; // X location in visible region double x_percent; if (event->time < start_time) { // To the left of the visible area x_percent = (start_time - event->time) / -time_range; } else { // In the visible area or to the right x_percent = (event->time - start_time) / time_range; } int x = (int)(x_percent * (w-1)); if (x == prev_prev_x) { // Overlapped with other events, so draw tall event painter->drawLine(x, y+1, x, y+line_h-2); } else { int top_y = is_start ? y2 : y3; int bottom_y = is_start ? y4 : y5; painter->drawLine(x, top_y, x, bottom_y); } // Draw duration between start and end if (!is_start && prev_is_start) { int range_w = x - prev_x; painter->fillRect(QRect(prev_x,y3,range_w,range_h), parent->color); // Accumulate time usage, to be displayed in the utilization column { uint64_t t1 = std::min(std::max(prev_time, start_time), end_time); uint64_t t2 = std::min(std::max(event->time, start_time), end_time); total_time_usage += t2-t1; } } // Remember some stuff prev_time = event->time; prev_is_start = is_start; prev_prev_x = prev_x; prev_x = x; } parent->utilization = total_time_usage / (double)(end_time - start_time); } // Draw separator line painter->setPen(QPen(LINE_SEPARATOR_COLOR, 1, Qt::SolidLine)); int separator_y = y + line_h - 1; painter->drawLine(0, separator_y, w, separator_y); } // Recurse if (!parent->is_open) { ancestor_open = false; } for (auto child: parent->children) { bool child_is_filtered = (child->tree_node_type == TREE_NODE_IS_EVENT && G_event_filters.contains(child->name)); if (ancestor_open && parent->is_open && !child_is_filtered) line_index++; drawHierarchyLine(painter, events, child, line_index, ancestor_open ? parent->is_open : false); } } uint32_t EventsView::calculateHistogram(int num_buckets, uint32_t *buckets, EventTreeNode *node, Events *events, uint64_t *min_ret, uint64_t *ave_ret, uint64_t *max_ret) { EventInfo *event_info = &events->event_info_list[node->event_info_index]; // Get the first visible event uint32_t first_event_index = findEventIndexAtTime(events, node, start_time, 0); // NOTE: gets the first index to the right of the start time // Determine the min and max durations to know how to divy out the buckets Event *prev_event = NULL; uint64_t min_duration = 0; uint64_t max_duration = 0; uint64_t total_duration = 0; uint32_t num_durations = 0; uint32_t event_index = first_event_index; while (event_index < node->num_event_instances) { Event *event = &events->event_buffer[node->event_indices[event_index]]; if (event->time > end_time) break; // Out of visible range if (prev_event != NULL && prev_event->event_id == event_info->start_id && event->event_id == event_info->end_id) { // Found a duration uint64_t duration = event->time - prev_event->time; total_duration += duration; if (num_durations == 0 || duration < min_duration) min_duration = duration; if (num_durations == 0 || duration > max_duration) max_duration = duration; num_durations++; } prev_event = event; event_index++; } if (num_durations == 0) return 0; // Fill in the buckets uint64_t duration_range = max_duration - min_duration; event_index = first_event_index; while (event_index < node->num_event_instances) { Event *event = &events->event_buffer[node->event_indices[event_index]]; if (event->time > end_time) break; // Out of visible range if (prev_event != NULL && prev_event->event_id == event_info->start_id && event->event_id == event_info->end_id) { // Found a duration uint64_t duration = event->time - prev_event->time; double factor = (duration - min_duration) / (double)duration_range; int bucket_index = factor * (num_buckets-1); bucket_index = std::clamp(bucket_index, 0, num_buckets-1); buckets[bucket_index]++; } prev_event = event; event_index++; } // Return values *min_ret = min_duration; *ave_ret = total_duration / num_durations; *max_ret = max_duration; return num_durations; } void EventsView::drawEventHistogram(QPainter &painter, EventTreeNode *node, Events *events) { int w = width(); int h = height(); bool ancestor_collapsed = node->isAncestorCollapsed(); // Determine dialog geometry QFontMetrics fm = painter.fontMetrics(); int th = fm.height(); int m = th / 2; int num_lines = 14; int dialog_w = fm.horizontalAdvance("9999.999 usecs 9999.999 usecs 9999.999 usecs"); int dialog_h = th*num_lines; int dialog_x = mouse_location.x() + m; int dialog_y = mouse_location.y() + m; if (dialog_x+dialog_w > w) dialog_x -= dialog_w + 2*m; if (dialog_y+dialog_h > h) dialog_y -= dialog_h + 2*m; // Dialog background painter.setPen(QPen(ROLLOVER_TEXT_COLOR, 1, Qt::SolidLine)); painter.setBrush(ROLLOVER_BG_COLOR); painter.drawRect(dialog_x, dialog_y, dialog_w, dialog_h); painter.setPen(QPen(ROLLOVER_SEPARATOR_COLOR, 1, Qt::SolidLine)); // Horizontal lines painter.drawLine(dialog_x+1, dialog_y+th, dialog_x+dialog_w-1, dialog_y+th); painter.drawLine(dialog_x+1, dialog_y+th*(num_lines-2), dialog_x+dialog_w-1, dialog_y+th*(num_lines-2)); painter.drawLine(dialog_x+1, dialog_y+th*(num_lines-1), dialog_x+dialog_w-1, dialog_y+th*(num_lines-1)); painter.setPen(QPen(ROLLOVER_TEXT_COLOR, 1, Qt::SolidLine)); // Draw icon QPixmap image_icon; if (node->tree_node_type == TREE_NODE_IS_FILE) { image_icon = icon_map["hierarchy_file.png"]; } else if (node->tree_node_type == TREE_NODE_IS_FOLDER) { image_icon = node->is_open ? icon_map["hierarchy_opened_folder.png"] : icon_map["hierarchy_closed_folder.png"]; } else if (node->tree_node_type == TREE_NODE_IS_THREAD) { image_icon = node->is_open ? icon_map["hierarchy_opened_thread.png"] : icon_map["hierarchy_closed_thread.png"]; } else { image_icon = drawEventIcon(th, node->color); } int icon_offset = 0; if (!image_icon.isNull()) { painter.setRenderHint(QPainter::SmoothPixmapTransform,true); icon_offset = m+image_icon.width(); int image_w = th * image_icon.width() / (float)image_icon.height(); painter.drawPixmap(dialog_x+m, dialog_y, image_w, th, image_icon); painter.setRenderHint(QPainter::SmoothPixmapTransform,false); } // Draw name QString name_text = " " + node->name; painter.drawText(dialog_x+icon_offset, dialog_y, dialog_w-icon_offset, th, Qt::AlignLeft | Qt::AlignVCenter, name_text); if (ancestor_collapsed) { // Nothing to show QString message = "Open this item in left\npanel to see event histograms"; painter.drawText(dialog_x, dialog_y+th, dialog_w, th*(num_lines-2), Qt::AlignCenter, message); } if (node->tree_node_type != TREE_NODE_IS_EVENT) { return; } // Calculate histogram int bucket_w = th / 2; if (bucket_w <= 1) bucket_w = 2; int num_buckets = (dialog_w-2) / bucket_w; uint32_t *buckets = (uint32_t *)malloc(num_buckets*sizeof(uint32_t)); for (int i=0; i<num_buckets; i++) buckets[i] = 0; uint64_t min, ave, max; uint32_t num_durations = calculateHistogram(num_buckets, buckets, node, events, &min, &ave, &max); // Draw number of durations QString suffix = (num_durations == 1) ? " duration " : " durations "; painter.drawText(dialog_x, dialog_y, dialog_w, th, Qt::AlignRight | Qt::AlignVCenter, QString::number(num_durations) + suffix); // Draw histogram int hist_x = dialog_x + (dialog_w - bucket_w*num_buckets)/2; int hist_y = dialog_y + dialog_h - th*2 - 1; int hist_h = dialog_h - th*3 - 2; for (int i=0; i<num_buckets; i++) { int bar_x = hist_x + i*bucket_w; painter.fillRect(QRect(bar_x, hist_y-hist_h, bucket_w-1, hist_h), HISTOGRAM_BAR_BG_COLOR); if (buckets[i] > 0) { int bar_h = hist_h * (buckets[i] / (float)num_durations); if (bar_h == 0) bar_h = 1; int bar_y = hist_y - bar_h; painter.fillRect(QRect(bar_x, bar_y, bucket_w-1, bar_h), node->color); } } // Draw min ave and max { // Min uint64_t units_factor; QString time_units = getTimeUnitsAndFactor(min, 1, &units_factor); double adjusted_time = min / (double)units_factor; char val_text[40]; sprintf(val_text, "%0.3f", adjusted_time); QString text = " " + QString(val_text) + " " + time_units; painter.drawText(dialog_x, dialog_y+th*(num_lines-2), dialog_w, th, Qt::AlignLeft | Qt::AlignVCenter, text); painter.drawText(dialog_x, dialog_y+th*(num_lines-1), dialog_w, th, Qt::AlignLeft | Qt::AlignVCenter, " min"); } { // Ave uint64_t units_factor; QString time_units = getTimeUnitsAndFactor(ave, 1, &units_factor); double adjusted_time = ave / (double)units_factor; char val_text[40]; sprintf(val_text, "%0.3f", adjusted_time); QString text = QString(val_text) + " " + time_units; painter.drawText(dialog_x, dialog_y+th*(num_lines-2), dialog_w, th, Qt::AlignCenter, text); painter.drawText(dialog_x, dialog_y+th*(num_lines-1), dialog_w, th, Qt::AlignCenter, "average"); } { // Max uint64_t units_factor; QString time_units = getTimeUnitsAndFactor(max, 1, &units_factor); double adjusted_time = max / (double)units_factor; char val_text[40]; sprintf(val_text, "%0.3f", adjusted_time); QString text = QString(val_text) + " " + time_units + " "; painter.drawText(dialog_x, dialog_y+th*(num_lines-2), dialog_w, th, Qt::AlignRight | Qt::AlignVCenter, text); painter.drawText(dialog_x, dialog_y+th*(num_lines-1), dialog_w, th, Qt::AlignRight | Qt::AlignVCenter, "max "); } free(buckets); } void EventsView::drawEventInfo(QPainter &painter, EventTreeNode *node, Events *events) { int w = width(); int h = height(); bool ancestor_collapsed = node->isAncestorCollapsed(); double time_range_factor = mouse_location.x()/(double)w; uint64_t time_at_mouse = start_time + (uint64_t)(time_range_factor * time_range); // Determine dialog geometry QFontMetrics fm = painter.fontMetrics(); int th = fm.height(); int m = th / 2; int num_lines = 8; int instance_w = fm.horizontalAdvance(" Instance "); int dialog_w = fm.horizontalAdvance(" xxxfilename::function_name::line_numberxxx "); int dialog_h = th*num_lines; int dialog_x = mouse_location.x() + m; int dialog_y = mouse_location.y() + m; if (dialog_x+dialog_w > w) dialog_x -= dialog_w + 2*m; if (dialog_y+dialog_h > h) dialog_y -= dialog_h + 2*m; // Dialog background painter.setPen(QPen(ROLLOVER_TEXT_COLOR, 1, Qt::SolidLine)); painter.setBrush(ROLLOVER_BG_COLOR); painter.drawRect(dialog_x, dialog_y, dialog_w, dialog_h); painter.setPen(QPen(ROLLOVER_SEPARATOR_COLOR, 1, Qt::SolidLine)); // Horizontal lines int num_lines_to_draw = ancestor_collapsed ? 3 : num_lines; for (int i=1; i<num_lines_to_draw; i++) { int line_y = i*th; painter.drawLine(dialog_x+1, dialog_y+line_y, dialog_x+dialog_w-1, dialog_y+line_y); } int mid_x = dialog_w/2; int col1_x = (dialog_w - instance_w)/2; int col2_x = col1_x + instance_w; // Veritical lines if (!ancestor_collapsed) { painter.drawLine(dialog_x+mid_x, dialog_y+th*1, dialog_x+mid_x, dialog_y+th*3); painter.drawLine(dialog_x+col1_x, dialog_y+th*3, dialog_x+col1_x, dialog_y+th*6); painter.drawLine(dialog_x+col2_x, dialog_y+th*3, dialog_x+col2_x, dialog_y+th*6); } // Titles painter.setPen(QPen(ROLLOVER_TITLE_COLOR, 1, Qt::SolidLine)); painter.drawText(dialog_x, dialog_y+th*1, mid_x, th, Qt::AlignRight | Qt::AlignVCenter, "Mouse Over Time "); if (!ancestor_collapsed) { painter.drawText(dialog_x, dialog_y+th*2, mid_x, th, Qt::AlignRight | Qt::AlignVCenter, "Duration/Gap "); painter.drawText(dialog_x+col1_x, dialog_y+th*3, col2_x-col1_x, th, Qt::AlignCenter, "Time"); painter.drawText(dialog_x+col1_x, dialog_y+th*4, col2_x-col1_x, th, Qt::AlignCenter, "Instance"); painter.drawText(dialog_x+col1_x, dialog_y+th*5, col2_x-col1_x, th, Qt::AlignCenter, "Value"); } painter.setPen(QPen(ROLLOVER_TEXT_COLOR, 1, Qt::SolidLine)); // Draw icon QPixmap image_icon; if (node->tree_node_type == TREE_NODE_IS_FILE) { image_icon = icon_map["hierarchy_file.png"]; } else if (node->tree_node_type == TREE_NODE_IS_FOLDER) { image_icon = node->is_open ? icon_map["hierarchy_opened_folder.png"] : icon_map["hierarchy_closed_folder.png"]; } else if (node->tree_node_type == TREE_NODE_IS_THREAD) { image_icon = node->is_open ? icon_map["hierarchy_opened_thread.png"] : icon_map["hierarchy_closed_thread.png"]; } else { image_icon = drawEventIcon(th, node->color); } int icon_offset = 0; if (!image_icon.isNull()) { painter.setRenderHint(QPainter::SmoothPixmapTransform,true); icon_offset = m + image_icon.width() / G_pixels_per_point; int image_w = th * image_icon.width() / (float)image_icon.height(); painter.drawPixmap(dialog_x+m, dialog_y, image_w, th, image_icon); painter.setRenderHint(QPainter::SmoothPixmapTransform,false); } // Draw name QString name_text = " " + node->name; painter.drawText(dialog_x+icon_offset, dialog_y, dialog_w-icon_offset, th, Qt::AlignLeft | Qt::AlignVCenter, name_text); dialog_y += th; // Draw mouse time uint64_t mouse_time_units_factor; QString mouse_time_units = getTimeUnitsAndFactor(time_at_mouse, 1, &mouse_time_units_factor); double adjusted_mouse_time = time_at_mouse / (double)mouse_time_units_factor; char val_text[40]; sprintf(val_text, "%0.3f", adjusted_mouse_time); QString mouse_time_text = " " + QString(val_text) + " " + mouse_time_units; painter.drawText(dialog_x+mid_x, dialog_y, dialog_w-mid_x, th, Qt::AlignLeft | Qt::AlignVCenter, mouse_time_text); dialog_y += th; if (ancestor_collapsed) { // Nothing to show QString message = "Open this item in left\npanel to see event details"; painter.drawText(dialog_x, dialog_y, dialog_w, th*(num_lines-3), Qt::AlignCenter, message); } else if (node->tree_node_type == TREE_NODE_IS_EVENT) { // Show event info uint32_t event_index_to_right_of_mouse = findEventIndexAtTime(events, node, time_at_mouse, 0); bool has_next_event = event_index_to_right_of_mouse < node->num_event_instances; uint32_t event_index_to_left_of_mouse = (event_index_to_right_of_mouse > 0) ? event_index_to_right_of_mouse-1 : 0; bool has_prev_event = event_index_to_left_of_mouse < event_index_to_right_of_mouse; Event *prev_event = has_prev_event ? &events->event_buffer[node->event_indices[event_index_to_left_of_mouse]] : NULL; Event *next_event = has_next_event ? &events->event_buffer[node->event_indices[event_index_to_right_of_mouse]] : NULL; // Duration if (has_prev_event && has_next_event) { uint64_t duration = next_event->time - prev_event->time; uint64_t units_factor; QString time_units = getTimeUnitsAndFactor(duration, 1, &units_factor); double adjusted_duration = duration / (double)units_factor; sprintf(val_text, "%0.3f", adjusted_duration); QString text = " " + QString(val_text) + " " + time_units; painter.drawText(dialog_x+mid_x, dialog_y, dialog_w-mid_x, th, Qt::AlignLeft | Qt::AlignVCenter, text); } dialog_y += th; // Prev/Next Times if (has_prev_event) { uint64_t units_factor; QString time_units = getTimeUnitsAndFactor(prev_event->time, 1, &units_factor); double adjusted_time = prev_event->time / (double)units_factor; sprintf(val_text, "%0.3f", adjusted_time); QString text = QString(val_text) + " " + time_units + " "; painter.drawText(dialog_x, dialog_y, col1_x, th, Qt::AlignRight | Qt::AlignVCenter, text); } if (has_next_event) { uint64_t units_factor; QString time_units = getTimeUnitsAndFactor(next_event->time, 1, &units_factor); double adjusted_time = next_event->time / (double)units_factor; sprintf(val_text, "%0.3f", adjusted_time); QString text = " " + QString(val_text) + " " + time_units; painter.drawText(dialog_x+col2_x, dialog_y, col1_x, th, Qt::AlignLeft | Qt::AlignVCenter, text); } dialog_y += th; // Prev/Next Instances if (has_prev_event) { QString text = events->includes_instance ? QString::number(prev_event->instance) + " " : "- "; painter.drawText(dialog_x, dialog_y, col1_x, th, Qt::AlignRight | Qt::AlignVCenter, text); } if (has_next_event) { QString text = events->includes_instance ? " " + QString::number(next_event->instance) : " -"; painter.drawText(dialog_x+col2_x, dialog_y, col1_x, th, Qt::AlignLeft | Qt::AlignVCenter, text); } dialog_y += th; // Prev/Next Values if (has_prev_event) { QString text = events->includes_value ? QString::number(prev_event->value) + " " : "- "; painter.drawText(dialog_x, dialog_y, col1_x, th, Qt::AlignRight | Qt::AlignVCenter, text); } if (has_next_event) { QString text = events->includes_value ? " " + QString::number(next_event->value) : " -"; painter.drawText(dialog_x+col2_x, dialog_y, col1_x, th, Qt::AlignLeft | Qt::AlignVCenter, text); } dialog_y += th; // Prev/Next Locations if (has_prev_event) { QString text = "Location not recorded"; if (events->includes_file_location) { text = " " + QString(events->file_name_list[prev_event->file_name_index]); text += "," + QString(events->function_name_list[prev_event->function_name_index]); text += "():" + QString::number(prev_event->line_number); } painter.drawText(dialog_x, dialog_y, dialog_w-m, th, Qt::AlignRight | Qt::AlignVCenter, text); } dialog_y += th; if (has_next_event) { QString text = "Location not recorded"; if (events->includes_file_location) { text = " " + QString(events->file_name_list[next_event->file_name_index]); text += "," + QString(events->function_name_list[next_event->function_name_index]); text += "():" + QString::number(next_event->line_number); } painter.drawText(dialog_x, dialog_y, dialog_w-m, th, Qt::AlignRight | Qt::AlignVCenter, text); } } } void EventsView::updateTimeAlignment() { QString alignment_mode = G_settings->value("alignment_mode", "Native").toString(); // One of "Native", "TimeZero", "EventId" if (alignment_mode == "Native") { QMapIterator<QString, EventTree*> i(G_event_tree_map); while (i.hasNext()) { i.next(); EventTree *event_tree = i.value(); Events *events = event_tree->events; uint64_t first_time = events->event_buffer[0].time; bool increase_time = (first_time < event_tree->native_start_time); uint64_t delta = increase_time ? event_tree->native_start_time - first_time : first_time - event_tree->native_start_time; if (delta > 0) { if (increase_time) { for (uint32_t j=0; j<events->event_count; j++) events->event_buffer[j].time += delta; } else { for (uint32_t j=0; j<events->event_count; j++) events->event_buffer[j].time -= delta; } } } } else if (alignment_mode == "TimeZero") { QMapIterator<QString, EventTree*> i(G_event_tree_map); while (i.hasNext()) { i.next(); EventTree *event_tree = i.value(); Events *events = event_tree->events; uint64_t first_time = events->event_buffer[0].time; if (first_time > 0) { for (uint32_t j=0; j<events->event_count; j++) { events->event_buffer[j].time -= first_time; } } } } else { // "EventId" // Move all event files to time zero { QMapIterator<QString, EventTree*> i(G_event_tree_map); while (i.hasNext()) { i.next(); EventTree *event_tree = i.value(); Events *events = event_tree->events; uint64_t first_time = events->event_buffer[0].time; if (first_time > 0) { for (uint32_t j=0; j<events->event_count; j++) { events->event_buffer[j].time -= first_time; } } } } // Get the alignment values bool is_start = G_settings->value("alignment_event_is_start", false).toBool(); QString event_name = G_settings->value("alignment_event_name", "unset").toString(); uint32_t instance_index = (uint32_t)G_settings->value("alignment_instance_index", 0).toInt(); // Find the greatest time across files uint64_t max_time = 0; { QMapIterator<QString, EventTree*> i(G_event_tree_map); while (i.hasNext()) { i.next(); EventTree *event_tree = i.value(); Events *events = event_tree->events; // Get the event ID uint16_t event_id = 0; for (uint16_t j=0; j<events->event_info_count; j++) { EventInfo *event_info = &events->event_info_list[j]; if (QString(event_info->name) == event_name) { event_id = is_start ? event_info->start_id : event_info->end_id; break; } } // Find the event time with event_id and instance for (uint32_t j=0; j<events->event_count; j++) { Event *event = &events->event_buffer[j]; if (event->event_id == event_id && event->instance == instance_index) { if (event->time > max_time) max_time = event->time; break; } } } } // Adjust times alignment_time = max_time; if (max_time > 0) { QMapIterator<QString, EventTree*> i(G_event_tree_map); while (i.hasNext()) { i.next(); EventTree *event_tree = i.value(); Events *events = event_tree->events; // Get the event ID uint16_t event_id = 0; for (uint16_t j=0; j<events->event_info_count; j++) { EventInfo *event_info = &events->event_info_list[j]; if (QString(event_info->name) == event_name) { event_id = is_start ? event_info->start_id : event_info->end_id; break; } } // Find the event time with event_id and instance uint64_t max_time2 = 0; for (uint32_t j=0; j<events->event_count; j++) { Event *event = &events->event_buffer[j]; if (event->event_id == event_id && event->instance == instance_index) { max_time2 = event->time; break; } } // Adjust all times bool increase_time = (max_time2 < max_time); uint64_t delta = increase_time ? max_time - max_time2 : max_time2 - max_time; if (delta > 0) { if (increase_time) { for (uint32_t j=0; j<events->event_count; j++) events->event_buffer[j].time += delta; } else { for (uint32_t j=0; j<events->event_count; j++) events->event_buffer[j].time -= delta; } } } } } // Update display percent_visible = 1.0; percent_offset = 0.0; selected_time_range_x1 = -1; selected_time_range_x2 = -1; emit timeRangeChanged(); rebuildAndUpdate(); } void EventsView::paintEvent(QPaintEvent* /*event*/) { int w = width(); int h = height(); if (w <= 0 || h <= 0) { return; } // Define painter QPainter painter(this); // Fill in background painter.fillRect(QRect(0,0,w,h), QColor(255,255,255)); if (G_event_tree_map.count() == 0) { // Draw the logo QRect inside_rect = getFittedRect(FitType::Inside, w/2, h, logo.width(), logo.height()); inside_rect.moveLeft(w/4); painter.setRenderHint(QPainter::SmoothPixmapTransform,true); painter.drawPixmap(inside_rect, logo); painter.setRenderHint(QPainter::SmoothPixmapTransform,false); // Clear some stuff just in case it's active selected_time_range_x1 = -1; selected_time_range_x2 = -1; percent_visible = 1.0; percent_offset = 0.0; emit visibleTimeRangeChanged(0, 0); // Signal to the header emit selectionTimeRangeChanged(0); // Signal to the header emit timeRangeSelectionChanged(); // Signal to the toolbar widgets emit utilizationRecalculated(); // Signal to utilization column return; } // Determine time range full_start_time = 0; full_end_time = 0; start_time = 0; end_time = 0; { bool got_first_time_range = false; QMapIterator<QString, EventTree*> i(G_event_tree_map); while (i.hasNext()) { // Get old tree info i.next(); EventTree *event_tree = i.value(); Events *events = event_tree->events; Event *first_event = &events->event_buffer[0]; Event *last_event = &events->event_buffer[events->event_count-1]; if (!got_first_time_range) { // Record initial times full_start_time = first_event->time; full_end_time = last_event->time; got_first_time_range = true; } else { // Update time range if (first_event->time < full_start_time) full_start_time = first_event->time; if (last_event->time > full_end_time) full_end_time = last_event->time; } } } // Zoom in as needed start_time = full_start_time; end_time = full_end_time; if (percent_visible < 1.0) { uint64_t elapsed_nanoseconds = end_time - start_time; start_time = full_start_time + (uint64_t)(elapsed_nanoseconds * percent_offset); end_time = start_time + (uint64_t)(elapsed_nanoseconds * percent_visible); } time_range = (double)(end_time - start_time); // Update units header emit visibleTimeRangeChanged(start_time, end_time); // Make sure the frame buffer is the correct size if (frame_buffer.width() != w || frame_buffer.height() != h) { frame_buffer = QImage(w, h, QImage::Format_ARGB32); rebuild_frame_buffer = true; } // Draw event tree if (rebuild_frame_buffer) { rebuild_frame_buffer = false; QPainter painter2(&frame_buffer); painter2.fillRect(QRect(0,0,w,h), QColor(255,255,255)); // Draw alignment time if (G_event_tree_map.count() > 1) { QString alignment_mode = G_settings->value("alignment_mode", "Native").toString(); // One of "Native", "TimeZero", "EventId" if (alignment_mode == "EventId") { if (alignment_time > start_time && alignment_time < end_time) { painter2.setPen(QPen(ALIGNMENT_COLOR, 1, Qt::DashLine)); int x = (int)(w * (alignment_time-start_time) / time_range); painter2.drawLine(x, 0, x, h); } } } // Draw event tree int line_index = 0; QMapIterator<QString, EventTree*> i(G_event_tree_map); while (i.hasNext()) { // Get old tree info i.next(); EventTree *event_tree = i.value(); drawHierarchyLine(&painter2, event_tree->events, event_tree->tree, line_index, true); line_index++; } emit utilizationRecalculated(); } painter.drawImage(QRect(0,0,w,h), frame_buffer); // Draw selection area if (selected_time_range_x1 != -1 && selected_time_range_x2 != -1) { int x1 = std::min(selected_time_range_x1, selected_time_range_x2); int x2 = std::max(selected_time_range_x1, selected_time_range_x2); x1 = std::max(x1, 0); x2 = std::min(x2, w-1); QColor time_selection_color = TIME_SELECTION_COLOR; painter.setPen(QPen(time_selection_color, 1, Qt::SolidLine)); painter.drawLine(x1, 0, x1, h-1); painter.drawLine(x2, 0, x2, h-1); time_selection_color.setAlpha(20); painter.fillRect(QRect(x1,0,x2-x1+1,h), time_selection_color); double time_range_factor = (x2 - x1)/(double)w; uint64_t selected_time_range = (uint64_t)(time_range_factor * time_range); emit selectionTimeRangeChanged(selected_time_range); } else { emit selectionTimeRangeChanged(0); } if (mouse_button_pressed) return; // Draw rollover info or histogram if (mouse_location.x() >= 0 && mouse_location.y() >= 0) { EventTreeNode *node_with_mouse = NULL; Events *events_with_mouse = NULL; QMapIterator<QString, EventTree*> i(G_event_tree_map); while (i.hasNext()) { // Get old tree info i.next(); EventTree *event_tree = i.value(); node_with_mouse = mouseOnEventsLine(event_tree->tree); if (node_with_mouse != NULL) { events_with_mouse = event_tree->events; break; } } if (node_with_mouse != NULL) { if (mouse_mode == MOUSE_MODE_EVENT_HISTOGRAM) { painter.fillRect(node_with_mouse->events_row_rect, ROW_HIGHLIGHT_COLOR2); drawEventHistogram(painter, node_with_mouse, events_with_mouse); } else if (mouse_mode == MOUSE_MODE_EVENT_INFO) { painter.fillRect(node_with_mouse->events_row_rect, ROW_HIGHLIGHT_COLOR2); drawEventInfo(painter, node_with_mouse, events_with_mouse); } } } } void EventsView::rebuildAndUpdate() { rebuild_frame_buffer = true; update(); }
/****************************************************************************** * $Id$ * * Project: MapServer * Purpose: OpenGIS Web Mapping Service support implementation. * Author: Steve Lime and the MapServer team. * ****************************************************************************** * Copyright (c) 1996-2005 Regents of the University of Minnesota. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies of this Software or works derived from this Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. *****************************************************************************/ #define NEED_IGNORE_RET_VAL #include "mapserver.h" #include "maperror.h" #include "mapthread.h" #include "mapgml.h" #include <ctype.h> #include "maptemplate.h" #include "mapows.h" #include "mapogcsld.h" #include "mapogcfilter.h" #include "mapowscommon.h" #include "maptime.h" #include "mapproject.h" #include <cassert> #include <stdarg.h> #include <time.h> #include <string.h> #include <set> #include <string> #include <vector> #ifdef WIN32 #include <process.h> #endif /* ================================================================== * WMS Server stuff. * ================================================================== */ #ifdef USE_WMS_SVR /* ** msWMSException() ** ** Report current MapServer error in requested format. */ static int msWMSException(mapObj *map, int nVersion, const char *exception_code, const char *wms_exception_format) { char *schemalocation = NULL; /* Default to WMS 1.3.0 exceptions if version not set yet */ if (nVersion <= 0) nVersion = OWS_1_3_0; /* get scheam location */ schemalocation = msEncodeHTMLEntities( msOWSGetSchemasLocation(map) ); /* Establish default exception format depending on VERSION */ if (wms_exception_format == NULL) { if (nVersion <= OWS_1_0_0) wms_exception_format = "INIMAGE"; /* WMS 1.0.0 */ else if (nVersion <= OWS_1_0_7) wms_exception_format = "SE_XML"; /* WMS 1.0.1 to 1.0.7 */ else if (nVersion <= OWS_1_1_1) wms_exception_format = "application/vnd.ogc.se_xml"; /* WMS 1.1.0 and later */ else wms_exception_format = "text/xml"; } if (strcasecmp(wms_exception_format, "INIMAGE") == 0 || strcasecmp(wms_exception_format, "BLANK") == 0 || strcasecmp(wms_exception_format, "application/vnd.ogc.se_inimage")== 0 || strcasecmp(wms_exception_format, "application/vnd.ogc.se_blank") == 0) { int blank = 0; if (strcasecmp(wms_exception_format, "BLANK") == 0 || strcasecmp(wms_exception_format, "application/vnd.ogc.se_blank") == 0) { blank = 1; } msWriteErrorImage(map, NULL, blank); } else if (strcasecmp(wms_exception_format, "WMS_XML") == 0) { /* Only in V1.0.0 */ msIO_setHeader("Content-Type","text/xml; charset=UTF-8"); msIO_sendHeaders(); msIO_printf("<WMTException version=\"1.0.0\">\n"); msWriteErrorXML(stdout); msIO_printf("</WMTException>\n"); } else /* XML error, the default: SE_XML (1.0.1 to 1.0.7) */ /* or application/vnd.ogc.se_xml (1.1.0 and later) */ { if (nVersion <= OWS_1_0_7) { /* In V1.0.1 to 1.0.7, the MIME type was text/xml */ msIO_setHeader("Content-Type","text/xml; charset=UTF-8"); msIO_sendHeaders(); msIO_printf("<?xml version='1.0' encoding=\"UTF-8\" standalone=\"no\" ?>\n"); msIO_printf("<!DOCTYPE ServiceExceptionReport SYSTEM \"http://www.digitalearth.gov/wmt/xml/exception_1_0_1.dtd\">\n"); msIO_printf("<ServiceExceptionReport version=\"1.0.1\">\n"); } else if (nVersion <= OWS_1_1_0) { /* In V1.1.0 and later, we have OGC-specific MIME types */ /* we cannot return anything else than application/vnd.ogc.se_xml here. */ msIO_setHeader("Content-Type","application/vnd.ogc.se_xml; charset=UTF-8"); msIO_sendHeaders(); msIO_printf("<?xml version='1.0' encoding=\"UTF-8\" standalone=\"no\" ?>\n"); msIO_printf("<!DOCTYPE ServiceExceptionReport SYSTEM \"%s/wms/1.1.0/exception_1_1_0.dtd\">\n",schemalocation); msIO_printf("<ServiceExceptionReport version=\"1.1.0\">\n"); } else if (nVersion <= OWS_1_1_1) { /* 1.1.1 */ msIO_setHeader("Content-Type","application/vnd.ogc.se_xml; charset=UTF-8"); msIO_sendHeaders(); msIO_printf("<?xml version='1.0' encoding=\"UTF-8\" standalone=\"no\" ?>\n"); msIO_printf("<!DOCTYPE ServiceExceptionReport SYSTEM \"%s/wms/1.1.1/exception_1_1_1.dtd\">\n", schemalocation); msIO_printf("<ServiceExceptionReport version=\"1.1.1\">\n"); } else { /*1.3.0*/ if (strcasecmp(wms_exception_format, "application/vnd.ogc.se_xml") == 0) { msIO_setHeader("Content-Type","application/vnd.ogc.se_xml; charset=UTF-8"); } else { msIO_setHeader("Content-Type","text/xml; charset=UTF-8"); } msIO_sendHeaders(); msIO_printf("<?xml version='1.0' encoding=\"UTF-8\" standalone=\"no\" ?>\n"); msIO_printf("<ServiceExceptionReport version=\"1.3.0\" xmlns=\"http://www.opengis.net/ogc\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.opengis.net/ogc %s/wms/1.3.0/exceptions_1_3_0.xsd\">\n", schemalocation); } if (exception_code) msIO_printf("<ServiceException code=\"%s\">\n", exception_code); else msIO_printf("<ServiceException>\n"); msWriteErrorXML(stdout); msIO_printf("</ServiceException>\n"); msIO_printf("</ServiceExceptionReport>\n"); } free(schemalocation); return MS_FAILURE; /* so that we can call 'return msWMSException();' anywhere */ } static bool msWMSSetTimePattern(const char *timepatternstring, const char *timestring, bool checkonly) { if (timepatternstring && timestring) { /* parse the time parameter to extract a distinct time. */ /* time value can be dicrete times (eg 2004-09-21), */ /* multiple times (2004-09-21, 2004-09-22, ...) */ /* and range(s) (2004-09-21/2004-09-25, 2004-09-27/2004-09-29) */ const auto atimes = msStringSplit(timestring, ','); /* get the pattern to use */ if (!atimes.empty()) { auto patterns = msStringSplit(timepatternstring, ','); for (auto& pattern: patterns) { msStringTrimBlanks(pattern); msStringTrimLeft(pattern); } for (const auto& atime: atimes) { const auto ranges = msStringSplit(atime.c_str(), '/'); for( const auto& range: ranges) { bool match = false; for (const auto& pattern: patterns) { if (!pattern.empty()) { if (msTimeMatchPattern(range.c_str(), pattern.c_str()) == MS_TRUE) { if (!checkonly) msSetLimitedPatternsToUse(pattern.c_str()); match = true; break; } } } if (!match) { msSetError(MS_WMSERR, "Time value %s given does not match the time format pattern.", "msWMSSetTimePattern", range.c_str()); return false; } } } } } return true; } /* ** Apply the TIME parameter to layers that are time aware */ static int msWMSApplyTime(mapObj *map, int version, const char *time, const char *wms_exception_format) { if (map) { const char* timepattern = msOWSLookupMetadata(&(map->web.metadata), "MO", "timeformat"); for (int i=0; i<map->numlayers; i++) { layerObj* lp = (GET_LAYER(map, i)); if (lp->status != MS_ON && lp->status != MS_DEFAULT) continue; /* check if the layer is time aware */ const char* timeextent = msOWSLookupMetadata(&(lp->metadata), "MO", "timeextent"); const char* timefield = msOWSLookupMetadata(&(lp->metadata), "MO", "timeitem"); const char* timedefault = msOWSLookupMetadata(&(lp->metadata), "MO", "timedefault"); if (timeextent && timefield) { /* check to see if the time value is given. If not */ /* use default time. If default time is not available */ /* send an exception */ if (time == NULL || strlen(time) <=0) { if (timedefault == NULL) { msSetError(MS_WMSERR, "No Time value was given, and no default time value defined.", "msWMSApplyTime"); return msWMSException(map, version, "MissingDimensionValue", wms_exception_format); } else { if (msValidateTimeValue((char *)timedefault, timeextent) == MS_FALSE) { msSetError(MS_WMSERR, "No Time value was given, and the default time value %s is invalid or outside the time extent defined %s", "msWMSApplyTime", timedefault, timeextent); /* return MS_FALSE; */ return msWMSException(map, version, "InvalidDimensionValue", wms_exception_format); } msLayerSetTimeFilter(lp, timedefault, timefield); } } else { /* ** Check to see if there is a list of possible patterns defined. If it is the case, use ** it to set the time pattern to use for the request. ** ** Last argument is set to TRUE (checkonly) to not trigger the patterns info setting, rather ** to only apply the wms_timeformats on the user request values, not the mapfile values. */ if (timepattern && time && strlen(time) > 0) { if (!msWMSSetTimePattern(timepattern, time, true)) return msWMSException(map, version,"InvalidDimensionValue", wms_exception_format); } /* check if given time is in the range */ if (msValidateTimeValue(time, timeextent) == MS_FALSE) { if (timedefault == NULL) { msSetError(MS_WMSERR, "Time value(s) %s given is invalid or outside the time extent defined (%s).", "msWMSApplyTime", time, timeextent); /* return MS_FALSE; */ return msWMSException(map, version, "InvalidDimensionValue", wms_exception_format); } else { if (msValidateTimeValue((char *)timedefault, timeextent) == MS_FALSE) { msSetError(MS_WMSERR, "Time value(s) %s given is invalid or outside the time extent defined (%s), and default time set is invalid (%s)", "msWMSApplyTime", time, timeextent, timedefault); /* return MS_FALSE; */ return msWMSException(map, version, "InvalidDimensionValue", wms_exception_format); } else msLayerSetTimeFilter(lp, timedefault, timefield); } } else { /* build the time string */ msLayerSetTimeFilter(lp, time, timefield); timeextent= NULL; } } } } /* last argument is MS_FALSE to trigger a method call that set the patterns info. some drivers use it */ if (timepattern && time && strlen(time) > 0) { if (!msWMSSetTimePattern(timepattern, time, false)) return msWMSException(map, version, "InvalidDimensionValue", wms_exception_format); } } return MS_SUCCESS; } /* ** Apply the FILTER parameter to layers (RFC118) */ static int msWMSApplyFilter(mapObj *map, int version, const char *filter, int def_srs_needs_axis_swap, const char *wms_exception_format, owsRequestObj *ows_request) { // Empty filter should be ignored if (!filter || strlen(filter) == 0) return MS_SUCCESS; if (!map) return MS_FAILURE; /* Count number of requested layers / groups / etc. * Only layers with STATUS ON were in the LAYERS request param. * Layers with STATUS DEFAULT were set in the mapfile and are * not expected to have a corresponding filter in the request */ int numlayers = 0; for(int i=0; i<map->numlayers; i++) { layerObj *lp=NULL; if(map->layerorder[i] != -1) { lp = (GET_LAYER(map, map->layerorder[i])); if (lp->status == MS_ON) numlayers++; } } /* -------------------------------------------------------------------- */ /* Parse the Filter parameter. If there are several Filter */ /* parameters, each Filter is inside parentheses. */ /* -------------------------------------------------------------------- */ int numfilters = 0; char **paszFilters = NULL; if (filter[0] == '(') { paszFilters = FLTSplitFilters(filter, &numfilters); } else if (numlayers == 1) { numfilters=1; paszFilters = (char **)msSmallMalloc(sizeof(char *)*numfilters); paszFilters[0] = msStrdup(filter); } if (numfilters != ows_request->numwmslayerargs) { msSetError(MS_WMSERR, "Wrong number of filter elements, one filter must be specified for each requested layer or groups.", "msWMSApplyFilter" ); msFreeCharArray(paszFilters, numfilters); return msWMSException(map, version, "InvalidParameterValue", wms_exception_format); } /* We're good to go. Apply each filter to the corresponding layer */ for(int i=0; i<map->numlayers; i++) { layerObj *lp=NULL; if(map->layerorder[i] != -1) lp = (GET_LAYER(map, map->layerorder[i])); /* Only layers with STATUS ON were in the LAYERS request param.*/ if (lp == NULL || lp->status != MS_ON) continue; const int curfilter = ows_request->layerwmsfilterindex[lp->index]; /* Skip empty filters */ assert(paszFilters); assert(curfilter >= 0 && curfilter < numfilters); if (paszFilters[curfilter][0] == '\0') { continue; } /* Force setting a template to enable query. */ if (lp->_template == NULL) lp->_template = msStrdup("ttt.html"); /* Parse filter */ FilterEncodingNode* psNode = FLTParseFilterEncoding(paszFilters[curfilter]); if (!psNode) { msSetError(MS_WMSERR, "Invalid or Unsupported FILTER : %s", "msWMSApplyFilter()", paszFilters[curfilter]); msFreeCharArray(paszFilters, numfilters); return msWMSException(map, version, "InvalidParameterValue", wms_exception_format); } /* For WMS 1.3 and up, we may need to swap the axis of bbox and geometry * elements inside the filter(s) */ if (version >= OWS_1_3_0) FLTDoAxisSwappingIfNecessary(map, psNode, def_srs_needs_axis_swap); #ifdef do_we_need_this FLTProcessPropertyIsNull(psNode, map, lp->index); /*preparse the filter for gml aliases*/ FLTPreParseFilterForAliasAndGroup(psNode, map, lp->index, "G"); /* Check that FeatureId filters are consistent with the active layer */ if( FLTCheckFeatureIdFilters(psNode, map, lp->index) == MS_FAILURE) { FLTFreeFilterEncodingNode( psNode ); return msWFSException(map, "mapserv", MS_OWS_ERROR_NO_APPLICABLE_CODE, paramsObj->pszVersion); } /* FIXME?: could probably apply to WFS 1.1 too */ if( nWFSVersion >= OWS_2_0_0 ) { int nEvaluation; if( FLTCheckInvalidOperand(psNode) == MS_FAILURE) { FLTFreeFilterEncodingNode( psNode ); msFreeCharArray(paszFilters, numfilters); return msWFSException(map, "filter", MS_WFS_ERROR_OPERATION_PROCESSING_FAILED, paramsObj->pszVersion); } if( FLTCheckInvalidProperty(psNode, map, lp->index) == MS_FAILURE) { FLTFreeFilterEncodingNode( psNode ); msFreeCharArray(paszFilters, numfilters); return msWFSException(map, "filter", MS_OWS_ERROR_INVALID_PARAMETER_VALUE, paramsObj->pszVersion); } psNode = FLTSimplify(psNode, &nEvaluation); if( psNode == NULL ) { FLTFreeFilterEncodingNode( psNode ); msFreeCharArray(paszFilters, numfilters); if( nEvaluation == 1 ) { /* return full layer */ return msWFSRunBasicGetFeature(map, lp, paramsObj, nWFSVersion); } else { /* return empty result set */ return MS_SUCCESS; } } } #endif /* Apply filter to this layer */ /* But first, start by removing any wfs_use_default_extent_for_getfeature metadata item */ /* that could result in the BBOX to be removed */ std::string old_value_wfs_use_default_extent_for_getfeature; { const char* old_value_tmp = msLookupHashTable( &(lp->metadata), "wfs_use_default_extent_for_getfeature"); if( old_value_tmp ) { old_value_wfs_use_default_extent_for_getfeature = old_value_tmp; msRemoveHashTable(&(lp->metadata), "wfs_use_default_extent_for_getfeature"); } } msInsertHashTable(&(lp->metadata), "gml_wmsfilter_flag", "true"); int ret = FLTApplyFilterToLayer(psNode, map, lp->index); msRemoveHashTable(&(lp->metadata), "gml_wmsfilter_flag"); if( !old_value_wfs_use_default_extent_for_getfeature.empty() ) { msInsertHashTable(&(lp->metadata), "wfs_use_default_extent_for_getfeature", old_value_wfs_use_default_extent_for_getfeature.c_str()); } if( ret != MS_SUCCESS ) { errorObj* ms_error = msGetErrorObj(); if(ms_error->code != MS_NOTFOUND) { msSetError(MS_WMSERR, "FLTApplyFilterToLayer() failed", "msWMSApplyFilter()"); FLTFreeFilterEncodingNode( psNode ); msFreeCharArray(paszFilters, numfilters); return msWMSException(map, version, "InvalidParameterValue", wms_exception_format); } } FLTFreeFilterEncodingNode( psNode ); }/* for */ msFreeCharArray(paszFilters, numfilters); return MS_SUCCESS; } /* ** msWMSPrepareNestedGroups() ** ** purpose: Parse WMS_LAYER_GROUP settings into arrays ** ** params: ** - nestedGroups: This array holds the arrays of groups that have been set ** through the WMS_LAYER_GROUP metadata ** - numNestedGroups: This array holds the number of groups set in ** WMS_LAYER_GROUP for each layer ** - isUsedInNestedGroup: This array indicates if the layer is used as group ** as set through the WMS_LAYER_GROUP metadata */ static void msWMSPrepareNestedGroups(mapObj* map, int /* nVersion */, char*** nestedGroups, int* numNestedGroups, int* isUsedInNestedGroup) { //Create set to hold unique groups std::set<std::string> uniqgroups; for (int i = 0; i < map->numlayers; i++) { nestedGroups[i] = NULL; /* default */ numNestedGroups[i] = 0; /* default */ isUsedInNestedGroup[i] = 0; /* default */ const char* groups = msOWSLookupMetadata(&(GET_LAYER(map, i)->metadata), "MO", "layer_group"); if ((groups != NULL) && (strlen(groups) != 0)) { if (GET_LAYER(map, i)->group != NULL && strlen(GET_LAYER(map, i)->group) != 0) { const char* errorMsg = "It is not allowed to set both the GROUP and WMS_LAYER_GROUP for a layer"; msSetError(MS_WMSERR, errorMsg, "msWMSPrepareNestedGroups()", NULL); msIO_fprintf(stdout, "<!-- ERROR: %s -->\n", errorMsg); /* cannot return exception at this point because we are already writing to stdout */ } else { if (groups[0] != '/') { const char* errorMsg = "The WMS_LAYER_GROUP metadata does not start with a '/'"; msSetError(MS_WMSERR, errorMsg, "msWMSPrepareNestedGroups()", NULL); msIO_fprintf(stdout, "<!-- ERROR: %s -->\n", errorMsg); /* cannot return exception at this point because we are already writing to stdout */ } else { /* split into subgroups. Start at address + 1 because the first '/' would cause an extra empty group */ nestedGroups[i] = msStringSplit(groups + 1, '/', &numNestedGroups[i]); /* Iterate through the groups and add them to the unique groups array */ for (int k=0; k<numNestedGroups[i]; k++) { uniqgroups.insert(msStringToLower(std::string(nestedGroups[i][k]))); } } } } } /* Iterate through layers to find out whether they are in any of the nested groups */ for (int i = 0; i < map->numlayers; i++) { if( uniqgroups.find(msStringToLower(std::string(GET_LAYER(map, i)->name))) != uniqgroups.end() ) { isUsedInNestedGroup[i] = 1; } } } /* ** Validate that a given dimension is inside the extents defined */ static bool msWMSValidateDimensionValue(const char *value, const char *dimensionextent, bool forcecharacter) { std::vector<pointObj> aextentranges; bool isextentavalue = false; bool isextentarange = false; bool ischaracter = false; if (forcecharacter) ischaracter = true; if (!value || !dimensionextent) return false; /*for the value, we support descrete values (2005) */ /* multiple values (abc, def, ...) */ /* and range(s) (1000/2000, 3000/5000) */ /** we do not support resolution*/ /* -------------------------------------------------------------------- */ /* parse the extent first. */ /* -------------------------------------------------------------------- */ auto extents = msStringSplit (dimensionextent, ','); for( auto& extent: extents ) // Make sure to get by reference so that it is updated in place msStringTrim(extent); std::vector<std::string> aextentvalues; if (extents.size() == 1) { if (strstr(dimensionextent, "/") == NULL) { /*single value*/ isextentavalue = true; aextentvalues.push_back(dimensionextent); if (!forcecharacter) ischaracter= FLTIsNumeric(dimensionextent) == MS_FALSE; } else { const auto ranges = msStringSplit (dimensionextent, '/'); if(ranges.size() == 2 || ranges.size() == 3) { /*single range*/ isextentarange = true; aextentranges.resize(1); aextentranges[0].x = atof(ranges[0].c_str()); aextentranges[0].y = atof(ranges[1].c_str()); /*ranges should be numeric*/ ischaracter = false; } } } else if (extents.size() > 1) { /*check if it is muliple values or mutliple ranges*/ if (strstr(dimensionextent, "/") == NULL) { /*multiple values*/ isextentavalue = true; aextentvalues = extents; if (!forcecharacter) ischaracter= FLTIsNumeric(aextentvalues[0].c_str()) == MS_FALSE; } else { /*multiple range extent*/ int isvalidextent = MS_TRUE; /*ranges should be numeric*/ ischaracter = false; isextentarange = true; aextentranges.resize(extents.size()); size_t nextentranges=0; for(const auto& extent: extents) { const auto onerange = msStringSplit(extent.c_str(), '/'); if (onerange.size() != 2 && onerange.size() != 3) { isvalidextent = MS_FALSE; break; } if (isvalidextent) { aextentranges[nextentranges].x = atof(onerange[0].c_str()); aextentranges[nextentranges++].y = atof(onerange[1].c_str()); } } if (!isvalidextent) { nextentranges = 0; isextentarange = false; } aextentranges.resize(nextentranges); } } /* make sure that we got a valid extent*/ if (!isextentavalue && !isextentarange) { return false; } /*for the extent of the dimesion, we support single value, or list of mulitiple values comma separated, a single range or multipe ranges */ const auto uservalues = msStringSplit (value, ','); bool uservaluevalid = false; if (uservalues.size() == 1) { /*user iput=single*/ /*is it descret or range*/ const auto ranges = msStringSplit(uservalues[0].c_str(), '/'); if (ranges.size() == 1) { /*discrete*/ if (isextentavalue) { /*single user value, single/multiple values extent*/ for (const auto& extentvalue: aextentvalues) { if (ischaracter) uservaluevalid = (uservalues[0] == extentvalue); else { if (atof(uservalues[0].c_str()) == atof(extentvalue.c_str())) uservaluevalid = true; } if(uservaluevalid) break; } } else if (isextentarange) { /*single user value, single/multiple range extent*/ const float currentval = atof(uservalues[0].c_str()); for (const auto& extentrange: aextentranges) { const float minval = extentrange.x; const float maxval = extentrange.y; if (currentval >= minval && currentval <= maxval) { uservaluevalid= true; break; } } } } else if (ranges.size() == 2 || ranges.size() == 3) { /*range*/ /*user input=single range. In this case the extents must be of a range type.*/ const float mincurrentval = atof(ranges[0].c_str()); const float maxcurrentval = atof(ranges[1].c_str()); if (isextentarange) { for (const auto& extentrange: aextentranges) { const float minval = extentrange.x; const float maxval = extentrange.y; if(minval <= mincurrentval && maxval >= maxcurrentval && minval <= maxval) { uservaluevalid= true; break; } } } } } else if (uservalues.size() > 1) { /*user input=multiple*/ if (strstr(value, "/") == NULL) { /*user input=multiple value*/ bool valueisvalid = false; for (const auto& uservalue: uservalues) { valueisvalid = false; if (isextentavalue) { /*user input is multiple values, extent is defned as one or multiple values*/ for (const auto& extentvalue: aextentvalues) { if (ischaracter) { if (uservalue == extentvalue) { valueisvalid = true; break; } } else { if (atof(uservalue.c_str()) == atof(extentvalue.c_str())) { valueisvalid = true; break; } } } /*every value shoule be valid*/ if (!valueisvalid) break; } else if (isextentarange) { /*user input is multiple values, extent is defned as one or multiple ranges*/ for (const auto& extentrange: aextentranges) { const float minval = extentrange.x; const float maxval = extentrange.y; const float currentval = atof(uservalue.c_str()); if(minval <= currentval && maxval >= currentval && minval <= maxval) { valueisvalid = true; break; } } if (!valueisvalid) break; } } uservaluevalid = valueisvalid; } else { /*user input multiple ranges*/ bool valueisvalid = true; for (const auto& uservalue: uservalues) { /*each ranges should be valid*/ const auto onerange = msStringSplit(uservalue.c_str(), '/'); if (onerange.size() == 2 || onerange.size() == 3) { const float mincurrentval = atof(onerange[0].c_str()); const float maxcurrentval = atof(onerange[1].c_str()); /*extent must be defined also as a rangle*/ if (isextentarange) { bool found = false; for (const auto& extentrange: aextentranges) { const float mincurrentrange = extentrange.x; const float maxcurrentrange = extentrange.y; if(mincurrentval >=mincurrentrange && maxcurrentval <= maxcurrentrange && mincurrentval <= maxcurrentval) { found = true; break; } } if (!found) { valueisvalid = false; break; } } } else { valueisvalid = false; } } uservaluevalid = valueisvalid; } } return uservaluevalid; } static bool msWMSApplyDimensionLayer(layerObj *lp, const char *item, const char *value, bool forcecharacter) { bool result = false; if (lp && item && value) { /*for the value, we support descrete values (2005) */ /* multiple values (abc, def, ...) */ /* and range(s) (1000/2000, 3000/5000) */ char* pszExpression = FLTGetExpressionForValuesRanges(lp, item, value, forcecharacter ? MS_TRUE : MS_FALSE); if (pszExpression) { // If tileindex is set, the filter is applied to tileindex too. int tlpindex = -1; if (lp->tileindex && (tlpindex = msGetLayerIndex(lp->map, lp->tileindex)) != -1) { result = FLTApplyExpressionToLayer((GET_LAYER(lp->map, tlpindex)), pszExpression) != MS_FALSE; } else { result = true; } result &= FLTApplyExpressionToLayer(lp, pszExpression) != MS_FALSE; msFree(pszExpression); } } return result; } static bool msWMSApplyDimension(layerObj *lp, int /* version */, const char *dimensionname, const char *value, const char * /* wms_exception_format */) { bool forcecharacter = false; bool result = false; if (lp && dimensionname && value) { /*check if the dimension name passes starts with dim_. All dimensions should start with dim_, except elevation*/ std::string dimension; if (strncasecmp(dimensionname, "dim_", 4) == 0) dimension = dimensionname+4; else dimension = dimensionname; /*if value is empty and a default is defined, use it*/ std::string currentvalue; if (strlen(value) > 0) currentvalue = value; else { const char* dimensiondefault = msOWSLookupMetadata(&(lp->metadata), "M", (dimension + "_default").c_str()); if (dimensiondefault) currentvalue = dimensiondefault; } /*check if the manadatory metada related to the dimension are set*/ const char* dimensionitem = msOWSLookupMetadata(&(lp->metadata), "M", (dimension + "_item").c_str()); const char* dimensionextent = msOWSLookupMetadata(&(lp->metadata), "M", (dimension + "_extent").c_str()); const char* dimensionunit = msOWSLookupMetadata(&(lp->metadata), "M", (dimension + "_units").c_str()); /*if the server want to force the type to character*/ const char* dimensiontype = msOWSLookupMetadata(&(lp->metadata), "M", (dimension + "_type").c_str()); if (dimensiontype && strcasecmp(dimensiontype, "Character") == 0) forcecharacter = true; if (dimensionitem && dimensionextent && dimensionunit && !currentvalue.empty()) { if(msWMSValidateDimensionValue(currentvalue.c_str(), dimensionextent, forcecharacter)) { result = msWMSApplyDimensionLayer(lp, dimensionitem, currentvalue.c_str(), forcecharacter); } else { msSetError(MS_WMSERR, "Dimension %s with a value of %s is invalid or outside the extents defined", "msWMSApplyDimension", dimension.c_str(), currentvalue.c_str()); result = false; } } else msSetError(MS_WMSERR, "Dimension %s : invalid settings. Make sure that item, units and extent are set.", "msWMSApplyDimension", dimension.c_str()); } return result; } /* ** */ int msWMSLoadGetMapParams(mapObj *map, int nVersion, char **names, char **values, int numentries, const char *wms_exception_format, const char * /*wms_request*/, owsRequestObj *ows_request) { bool adjust_extent = false; bool nonsquare_enabled = false; int transparent = MS_NOOVERRIDE; bool bbox_pixel_is_point = false; outputFormatObj *format = NULL; int validlayers = 0; const char *styles = NULL; int invalidlayers = 0; std::string epsgbuf; std::string srsbuffer; bool epsgvalid = false; bool timerequest = false; const char *stime = NULL; bool srsfound = false; bool bboxfound = false; bool formatfound = false; bool widthfound = false; bool heightfound = false; const char *request = NULL; int status = 0; const char *layerlimit = NULL; bool tiled = false; const char *sldenabled=NULL; const char *sld_url=NULL; const char *sld_body=NULL; const char *filter = NULL; /* Some of the getMap parameters are actually required depending on the */ /* request, but for now we assume all are optional and the map file */ /* defaults will apply. */ msAdjustExtent(&(map->extent), map->width, map->height); /* Check for SLDs first. If SLD is available LAYERS and STYLES parameters are non mandatory */ for(int i=0; i<numentries; i++) { /* check if SLD is passed. If yes, check for OGR support */ if (strcasecmp(names[i], "SLD") == 0 || strcasecmp(names[i], "SLD_BODY") == 0) { sldenabled = msOWSLookupMetadata(&(map->web.metadata), "MO", "sld_enabled"); if (sldenabled == NULL) { sldenabled = "true"; } if (strcasecmp(sldenabled, "true") == 0) { if (strcasecmp(names[i], "SLD") == 0) { sld_url = values[i]; } if (strcasecmp(names[i], "SLD_BODY") == 0) { sld_body = values[i]; } } } } std::vector<std::string> wmslayers; for(int i=0; i<numentries; i++) { /* getMap parameters */ if (strcasecmp(names[i], "REQUEST") == 0) { request = values[i]; } if (strcasecmp(names[i], "LAYERS") == 0) { std::vector<int> layerOrder(map->numlayers); wmslayers = msStringSplit(values[i], ','); if (wmslayers.empty()) { if (sld_url == NULL && sld_body == NULL) { msSetError(MS_WMSERR, "At least one layer name required in LAYERS.", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, NULL, wms_exception_format); } } if (nVersion >= OWS_1_3_0) { layerlimit = msOWSLookupMetadata(&(map->web.metadata), "MO", "layerlimit"); if(layerlimit) { if (static_cast<int>(wmslayers.size()) > atoi(layerlimit)) { msSetError(MS_WMSERR, "Number of layers requested exceeds LayerLimit.", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, NULL, wms_exception_format); } } } for (int iLayer=0; iLayer < map->numlayers; iLayer++) { map->layerorder[iLayer] = iLayer; } int nLayerOrder = 0; for(int j=0; j<map->numlayers; j++) { /* Keep only layers with status=DEFAULT by default */ /* Layer with status DEFAULT is drawn first. */ if (GET_LAYER(map, j)->status != MS_DEFAULT) GET_LAYER(map, j)->status = MS_OFF; else { map->layerorder[nLayerOrder++] = j; layerOrder[j] = 1; } } char*** nestedGroups = (char***)msSmallCalloc(map->numlayers, sizeof(char**)); int* numNestedGroups = (int*)msSmallCalloc(map->numlayers, sizeof(int)); int* isUsedInNestedGroup = (int*)msSmallCalloc(map->numlayers, sizeof(int)); msWMSPrepareNestedGroups(map, nVersion, nestedGroups, numNestedGroups, isUsedInNestedGroup); if (ows_request->layerwmsfilterindex != NULL) msFree(ows_request->layerwmsfilterindex); ows_request->layerwmsfilterindex = (int*)msSmallMalloc(map->numlayers * sizeof(int)); for(int j=0; j<map->numlayers; j++) { ows_request->layerwmsfilterindex[j] = -1; } ows_request->numwmslayerargs = static_cast<int>(wmslayers.size()); for (int k = 0; k < static_cast<int>(wmslayers.size()); k++) { const auto& wmslayer = wmslayers[k]; bool layerfound = false; for (int j=0; j<map->numlayers; j++) { /* Turn on selected layers only. */ if ( ((GET_LAYER(map, j)->name && strcasecmp(GET_LAYER(map, j)->name, wmslayer.c_str()) == 0) || (map->name && strcasecmp(map->name, wmslayer.c_str()) == 0) || (GET_LAYER(map, j)->group && strcasecmp(GET_LAYER(map, j)->group, wmslayer.c_str()) == 0) || ((numNestedGroups[j] >0) && msStringInArray(wmslayer.c_str(), nestedGroups[j], numNestedGroups[j]))) && ((msIntegerInArray(GET_LAYER(map, j)->index, ows_request->enabled_layers, ows_request->numlayers))) ) { if (GET_LAYER(map, j)->status != MS_DEFAULT) { if (layerOrder[j] == 0) { map->layerorder[nLayerOrder++] = j; layerOrder[j] = 1; GET_LAYER(map, j)->status = MS_ON; } } /* if a layer name is repeated assign the first matching filter */ /* duplicate names will be assigned filters later when layer copies are created */ if (ows_request->layerwmsfilterindex[j] == -1) { ows_request->layerwmsfilterindex[j] = k; } validlayers++; layerfound = true; } } if (layerfound == false && !wmslayers.empty()) invalidlayers++; } /* free the stuff used for nested layers */ for (int k = 0; k < map->numlayers; k++) { if (numNestedGroups[k] > 0) { msFreeCharArray(nestedGroups[k], numNestedGroups[k]); } } free(nestedGroups); free(numNestedGroups); free(isUsedInNestedGroup); /* set all layers with status off at end of array */ for (int j=0; j<map->numlayers; j++) { if (GET_LAYER(map, j)->status == MS_OFF) if (layerOrder[j] == 0) map->layerorder[nLayerOrder++] = j; } } else if (strcasecmp(names[i], "STYLES") == 0) { styles = values[i]; } else if ((strcasecmp(names[i], "SRS") == 0 && nVersion < OWS_1_3_0) || (strcasecmp(names[i], "CRS") == 0 && nVersion >= OWS_1_3_0)) { srsfound = true; /* SRS is in format "EPSG:epsg_id" or "AUTO:proj_id,unit_id,lon0,lat0" */ if (strncasecmp(values[i], "EPSG:", 5) == 0) { /* SRS=EPSG:xxxx */ /* don't need to copy init=xxx since the srsbuffer is only used with msLoadProjection and that does already the job */ srsbuffer = "EPSG:"; srsbuffer += (values[i]+5); epsgbuf = srsbuffer; /* This test was to correct a request by the OCG cite 1.3.0 test sending CRS=ESPG:4326, Bug:*/ if (nVersion >= OWS_1_3_0) { if (srsbuffer.back() == ',') { srsbuffer.resize(srsbuffer.size() - 1); epsgbuf = srsbuffer; } } /* we need to wait until all params are read before */ /* loading the projection into the map. This will help */ /* insure that the passes srs is valid for all layers. */ /* if (msLoadProjectionString(&(map->projection), buffer) != 0) return msWMSException(map, nVersion, NULL); iUnits = GetMapserverUnitUsingProj(&(map->projection)); if (iUnits != -1) map->units = iUnits; */ } else if (strncasecmp(values[i], "AUTO:", 5) == 0 && nVersion < OWS_1_3_0) { srsbuffer = values[i]; /* SRS=AUTO:proj_id,unit_id,lon0,lat0 */ /* if (msLoadProjectionString(&(map->projection), values[i]) != 0) return msWMSException(map, nVersion, NULL); iUnits = GetMapserverUnitUsingProj(&(map->projection)); if (iUnits != -1) map->units = iUnits; */ } else if (nVersion >= OWS_1_3_0 && (strncasecmp(values[i], "AUTO2:", 6) == 0 || strncasecmp(values[i], "CRS:", 4) == 0)) { srsbuffer = values[i]; } else { if (nVersion >= OWS_1_3_0) { msSetError(MS_WMSERR, "Unsupported CRS namespace (only EPSG, AUTO2, CRS currently supported).", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, "InvalidCRS", wms_exception_format); } else { msSetError(MS_WMSERR, "Unsupported SRS namespace (only EPSG and AUTO currently supported).", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, "InvalidSRS", wms_exception_format); } } } else if (strcasecmp(names[i], "BBOX") == 0) { bboxfound = true; const auto tokens = msStringSplit(values[i], ','); if (tokens.size() != 4) { msSetError(MS_WMSERR, "Wrong number of arguments for BBOX.", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, NULL, wms_exception_format); } map->extent.minx = atof(tokens[0].c_str()); map->extent.miny = atof(tokens[1].c_str()); map->extent.maxx = atof(tokens[2].c_str()); map->extent.maxy = atof(tokens[3].c_str()); /*for wms 1.3.0 we will do the validation of the bbox after all parameters are read to account for the axes order*/ if (nVersion < OWS_1_3_0) { /* validate bbox values */ if ( map->extent.minx >= map->extent.maxx || map->extent.miny >= map->extent.maxy) { msSetError(MS_WMSERR, "Invalid values for BBOX.", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, NULL, wms_exception_format); } adjust_extent = true; } } else if (strcasecmp(names[i], "WIDTH") == 0) { widthfound = true; map->width = atoi(values[i]); } else if (strcasecmp(names[i], "HEIGHT") == 0) { heightfound = true; map->height = atoi(values[i]); } else if (strcasecmp(names[i], "FORMAT") == 0) { formatfound = true; if (strcasecmp(values[i], "application/openlayers")!=0) { /*check to see if a predefined list is given*/ const char* format_list = msOWSLookupMetadata(&(map->web.metadata), "M","getmap_formatlist"); if (format_list) { format = msOwsIsOutputFormatValid(map, values[i], &(map->web.metadata), "M", "getmap_formatlist"); if (format == NULL) { msSetError(MS_IMGERR, "Unsupported output format (%s).", "msWMSLoadGetMapParams()", values[i] ); return msWMSException(map, nVersion, "InvalidFormat", wms_exception_format); } } else { format = msSelectOutputFormat( map, values[i] ); if( format == NULL || (strncasecmp(format->driver, "MVT", 3) != 0 && strncasecmp(format->driver, "GDAL/", 5) != 0 && strncasecmp(format->driver, "AGG/", 4) != 0 && strncasecmp(format->driver, "UTFGRID", 7) != 0 && strncasecmp(format->driver, "CAIRO/", 6) != 0 && strncasecmp(format->driver, "OGL/", 4) != 0 && strncasecmp(format->driver, "KML", 3) != 0 && strncasecmp(format->driver, "KMZ", 3) != 0)) { msSetError(MS_IMGERR, "Unsupported output format (%s).", "msWMSLoadGetMapParams()", values[i] ); return msWMSException(map, nVersion, "InvalidFormat", wms_exception_format); } } } msFree( map->imagetype ); map->imagetype = msStrdup(values[i]); } else if (strcasecmp(names[i], "TRANSPARENT") == 0) { transparent = (strcasecmp(values[i], "TRUE") == 0); } else if (strcasecmp(names[i], "BGCOLOR") == 0) { long c; c = strtol(values[i], NULL, 16); map->imagecolor.red = (c/0x10000)&0xff; map->imagecolor.green = (c/0x100)&0xff; map->imagecolor.blue = c&0xff; } /* value of time can be empty. We should look for a default value */ /* see function msWMSApplyTime */ else if (strcasecmp(names[i], "TIME") == 0) { /* && values[i]) */ stime = values[i]; timerequest = true; } /* Vendor-specific ANGLE param (for map rotation), added in ticket #3332, * also supported by GeoServer */ else if (strcasecmp(names[i], "ANGLE") == 0) { msMapSetRotation(map, atof(values[i])); } /* Vendor-specific bbox_pixel_is_point, added in ticket #4652 */ else if (strcasecmp(names[i], "BBOX_PIXEL_IS_POINT") == 0) { bbox_pixel_is_point = (strcasecmp(values[i], "TRUE") == 0); } /* Vendor specific TILED (WMS-C) */ else if (strcasecmp(names[i], "TILED") == 0) { tiled = (strcasecmp(values[i], "TRUE") == 0); } /* Vendor-specific FILTER, added in RFC-118 */ else if (strcasecmp(names[i], "FILTER") == 0) { filter = values[i]; } } /*validate the exception format WMS 1.3.0 section 7.3.3.11*/ if (nVersion >= OWS_1_3_0 && wms_exception_format != NULL) { if (strcasecmp(wms_exception_format, "INIMAGE") != 0 && strcasecmp(wms_exception_format, "BLANK") != 0 && strcasecmp(wms_exception_format, "XML") != 0) { msSetError(MS_WMSERR, "Invalid format %s for the EXCEPTIONS parameter.", "msWMSLoadGetMapParams()", wms_exception_format); return msWMSException(map, nVersion, "InvalidFormat", wms_exception_format); } } int need_axis_swap = MS_FALSE; if (bboxfound && nVersion >= OWS_1_3_0) { rectObj rect; projectionObj proj; /*we have already validated that the request format when reading the request parameters*/ rect = map->extent; /*try to adjust the axes if necessary*/ if (srsbuffer.size() > 1) { msInitProjection(&proj); msProjectionInheritContextFrom(&proj, &(map->projection)); if (msLoadProjectionStringEPSG(&proj, srsbuffer.c_str()) == 0 && (need_axis_swap = msIsAxisInvertedProj(&proj) ) ) { msAxisNormalizePoints( &proj, 1, &rect.minx, &rect.miny ); msAxisNormalizePoints( &proj, 1, &rect.maxx, &rect.maxy ); } msFreeProjection( &proj ); } /*if the CRS is AUTO2:auto_crs_id,factor,lon0,lat0, we need to grab the factor parameter and use it with the bbox*/ if (srsbuffer.size() > 1 && strncasecmp(srsbuffer.c_str(), "AUTO2:", 6) == 0) { const auto args = msStringSplit(srsbuffer.c_str(), ','); if (args.size() == 4) { const double factor = atof(args[1].c_str()); if (factor > 0 && factor != 1.0) { rect.minx = rect.minx*factor; rect.miny = rect.miny*factor; rect.maxx = rect.maxx*factor; rect.maxx = rect.maxy*factor; } } } map->extent = rect; /* validate bbox values */ if ( map->extent.minx >= map->extent.maxx || map->extent.miny >= map->extent.maxy) { msSetError(MS_WMSERR, "Invalid values for BBOX.", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, NULL, wms_exception_format); } adjust_extent = true; } if (tiled) { const char *value; hashTableObj *meta = &(map->web.metadata); int map_edge_buffer = 0; if ((value = msLookupHashTable(meta, "tile_map_edge_buffer")) != NULL) { map_edge_buffer = atoi(value); } if (map_edge_buffer > 0) { /* adjust bbox and width and height to the buffer */ const double buffer_x = map_edge_buffer * (map->extent.maxx - map->extent.minx) / (double)map->width; const double buffer_y = map_edge_buffer * (map->extent.maxy - map->extent.miny) / (double)map->height; // TODO: we should probably clamp the extent to avoid going outside of -180,-90,180,90 for geographic CRS for example map->extent.minx -= buffer_x; map->extent.maxx += buffer_x; map->extent.miny -= buffer_y; map->extent.maxy += buffer_y; map->width += 2 * map_edge_buffer; map->height += 2 * map_edge_buffer; if( map_edge_buffer > 0 ) { char tilebufferstr[64]; /* Write the tile buffer to a string */ snprintf(tilebufferstr, sizeof(tilebufferstr), "-%d", map_edge_buffer); /* Hm, the labelcache buffer is set... */ if((value = msLookupHashTable(meta, "labelcache_map_edge_buffer")) != NULL) { /* If it's too small, replace with a bigger one */ if( map_edge_buffer > abs(atoi(value)) ) { msRemoveHashTable(meta, "labelcache_map_edge_buffer"); msInsertHashTable(meta, "labelcache_map_edge_buffer", tilebufferstr); } } /* No labelcache buffer value? Then we use the tile buffer. */ else { msInsertHashTable(meta, "labelcache_map_edge_buffer", tilebufferstr); } } } } /* ** If any select layers have a default time, we will apply the default ** time value even if no TIME request was in the url. */ if( !timerequest && map ) { for (int i=0; i<map->numlayers && !timerequest; i++) { layerObj *lp = NULL; lp = (GET_LAYER(map, i)); if (lp->status != MS_ON && lp->status != MS_DEFAULT) continue; if( msOWSLookupMetadata(&(lp->metadata), "MO", "timedefault") ) timerequest = true; } } /* ** Apply time filters if available in the request. */ if (timerequest) { if (msWMSApplyTime(map, nVersion, stime, wms_exception_format) == MS_FAILURE) { return MS_FAILURE;/* msWMSException(map, nVersion, "InvalidTimeRequest"); */ } } /* ** Check/apply wms dimensions ** all dimension requests should start with dim_xxxx, except time and elevation. */ for (int i=0; i<map->numlayers; i++) { layerObj *lp = (GET_LAYER(map, i)); if (lp->status != MS_ON && lp->status != MS_DEFAULT) continue; const char* dimensionlist = msOWSLookupMetadata(&(lp->metadata), "M", "dimensionlist"); if (dimensionlist) { auto tokens = msStringSplit(dimensionlist, ','); for (auto& token: tokens) { msStringTrim(token); for(int k=0; k<numentries; k++) { const std::string dimensionname(names[k]); /*the dim_ is supposed to be part of the dimension name in the request*/ std::string stmp; if (strcasecmp(token.c_str(), "elevation") == 0) stmp = token; else { stmp = "dim_"; stmp += token; } if (strcasecmp(dimensionname.c_str(), stmp.c_str()) == 0) { if (!msWMSApplyDimension(lp, nVersion, dimensionname.c_str(), values[k], wms_exception_format)) { return msWMSException(lp->map, nVersion, "InvalidDimensionValue", wms_exception_format); } break; } } } } } /* ** Apply the selected output format (if one was selected), and override ** the transparency if needed. */ if( format != NULL ) msApplyOutputFormat( &(map->outputformat), format, transparent, MS_NOOVERRIDE, MS_NOOVERRIDE ); /* Validate all layers given. ** If an invalid layer is sent, return an exception. */ if (validlayers == 0 || invalidlayers > 0) { if (invalidlayers > 0) { msSetError(MS_WMSERR, "Invalid layer(s) given in the LAYERS parameter. A layer might be disabled for \ this request. Check wms/ows_enable_request settings.", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, "LayerNotDefined", wms_exception_format); } if (validlayers == 0 && sld_url == NULL && sld_body == NULL) { msSetError(MS_WMSERR, "Missing required parameter LAYERS", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, "MissingParameterValue", wms_exception_format); } } /* validate srs value: When the SRS parameter in a GetMap request contains a ** SRS that is valid for some, but not all of the layers being requested, ** then the server shall throw a Service Exception (code = "InvalidSRS"). ** Validate first against epsg in the map and if no matching srs is found ** validate all layers requested. */ if (epsgbuf.size() >= 2) { /*at least 2 chars*/ char *projstring; epsgvalid = false; msOWSGetEPSGProj(&(map->projection), &(map->web.metadata), "MO", MS_FALSE, &projstring); if (projstring) { const auto tokens = msStringSplit(projstring, ' '); for( const auto& token: tokens) { if (strcasecmp(token.c_str(), epsgbuf.c_str()) == 0) { epsgvalid = true; break; } } msFree(projstring); } if (!epsgvalid) { for (int i=0; i<map->numlayers; i++) { epsgvalid = false; if (GET_LAYER(map, i)->status == MS_ON) { msOWSGetEPSGProj(&(GET_LAYER(map, i)->projection), &(GET_LAYER(map, i)->metadata), "MO", MS_FALSE, &projstring); if (projstring) { const auto tokens = msStringSplit(projstring, ' '); for( const auto& token: tokens) { if (strcasecmp(token.c_str(), epsgbuf.c_str()) == 0) { epsgvalid = true; break; } } msFree(projstring); } if (!epsgvalid) { if (nVersion >= OWS_1_3_0) { msSetError(MS_WMSERR, "Invalid CRS given : CRS must be valid for all requested layers.", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, "InvalidSRS", wms_exception_format); } else { msSetError(MS_WMSERR, "Invalid SRS given : SRS must be valid for all requested layers.", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, "InvalidSRS", wms_exception_format); } } } } } } if (request == NULL || strcasecmp(request, "DescribeLayer") != 0) { /* Validate requested image size. */ if(map->width > map->maxsize || map->height > map->maxsize || map->width < 1 || map->height < 1) { msSetError(MS_WMSERR, "Image size out of range, WIDTH and HEIGHT must be between 1 and %d pixels.", "msWMSLoadGetMapParams()", map->maxsize); /* Restore valid default values in case errors INIMAGE are used */ map->width = 400; map->height= 300; return msWMSException(map, nVersion, NULL, wms_exception_format); } /* Check whether requested BBOX and width/height result in non-square pixels */ nonsquare_enabled = msTestConfigOption( map, "MS_NONSQUARE", MS_FALSE ) != MS_FALSE; if (!nonsquare_enabled) { const double dx = MS_ABS(map->extent.maxx - map->extent.minx); const double dy = MS_ABS(map->extent.maxy - map->extent.miny); const double reqy = ((double)map->width) * dy / dx; /* Allow up to 1 pixel of error on the width/height ratios. */ /* If more than 1 pixel then enable non-square pixels */ if ( MS_ABS((reqy - (double)map->height)) > 1.0 ) { if (map->debug) msDebug("msWMSLoadGetMapParams(): enabling non-square pixels.\n"); msSetConfigOption(map, "MS_NONSQUARE", "YES"); nonsquare_enabled = true; } } } /* If the requested SRS is different from the default mapfile projection, or ** if a BBOX resulting in non-square pixels is requested then ** copy the original mapfile's projection to any layer that doesn't already ** have a projection. This will prevent problems when users forget to ** explicitly set a projection on all layers in a WMS mapfile. */ if (srsbuffer.size() > 1 || nonsquare_enabled) { projectionObj newProj; if (map->projection.numargs <= 0) { if (nVersion >= OWS_1_3_0) { msSetError(MS_WMSERR, "Cannot set new CRS on a map that doesn't " "have any projection set. Please make sure your mapfile " "has a projection defined at the top level.", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, "InvalidCRS", wms_exception_format); } else { msSetError(MS_WMSERR, "Cannot set new SRS on a map that doesn't " "have any projection set. Please make sure your mapfile " "has a projection defined at the top level.", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, "InvalidSRS", wms_exception_format); } } msInitProjection(&newProj); msProjectionInheritContextFrom(&newProj, &map->projection); if (srsbuffer.size() > 1) { int nTmp; if (nVersion >= OWS_1_3_0) nTmp = msLoadProjectionStringEPSG(&newProj, srsbuffer.c_str()); else nTmp = msLoadProjectionString(&newProj, srsbuffer.c_str()); if (nTmp != 0) { msFreeProjection(&newProj); return msWMSException(map, nVersion, NULL, wms_exception_format); } } if (nonsquare_enabled || msProjectionsDiffer(&(map->projection), &newProj)) { msMapSetLayerProjections(map); } msFreeProjection(&newProj); } /* apply the srs to the map file. This is only done after validating */ /* that the srs given as parameter is valid for all layers */ if (srsbuffer.size() > 1) { int nTmp; msFreeProjectionExceptContext(&map->projection); if (nVersion >= OWS_1_3_0) nTmp = msLoadProjectionStringEPSG(&(map->projection), srsbuffer.c_str()); else nTmp = msLoadProjectionString(&(map->projection), srsbuffer.c_str()); if (nTmp != 0) return msWMSException(map, nVersion, NULL, wms_exception_format); nTmp = GetMapserverUnitUsingProj(&(map->projection)); if( nTmp != -1 ) { map->units = static_cast<MS_UNITS>(nTmp); } } if (sld_url || sld_body) { char *pszLayerNames = NULL; const int nLayersBefore = map->numlayers; /* -------------------------------------------------------------------- */ /* if LAYERS parameter was not given, set all layers to off */ /* -------------------------------------------------------------------- */ if (validlayers == 0) { /*no LAYERS parameter is give*/ for(int j=0; j<map->numlayers; j++) { if (GET_LAYER(map, j)->status != MS_DEFAULT) GET_LAYER(map, j)->status = MS_OFF; } } /*apply sld if defined. This is done here so that bbox and srs are already applied*/ if (sld_url) { if ((status = msSLDApplySLDURL(map, sld_url, -1, NULL, &pszLayerNames)) != MS_SUCCESS) return msWMSException(map, nVersion, NULL, wms_exception_format); } else if (sld_body) { if ((status =msSLDApplySLD(map, sld_body, -1, NULL, &pszLayerNames)) != MS_SUCCESS) return msWMSException(map, nVersion, NULL, wms_exception_format); } /* -------------------------------------------------------------------- */ /* SLD and styles can use the same layer multiple times. If */ /* that is the case we duplicate the layer for drawing */ /* purpose. We need to reset the ows request enable settings (#1602)*/ /* -------------------------------------------------------------------- */ const int nLayerAfter = map->numlayers; if (nLayersBefore != nLayerAfter) { msOWSRequestLayersEnabled(map, "M", "GetMap", ows_request); } /* -------------------------------------------------------------------- */ /* We need to take into account where the LAYERS parameter was */ /* not given (the LAYERS is option when an SLD is given). In */ /* this particular case, we need to turn on the layers */ /* identified the SLD (#1166). */ /* */ /* -------------------------------------------------------------------- */ if (validlayers == 0) { if (pszLayerNames) { const auto tokens = msStringSplit(pszLayerNames, ','); for (const auto& token: tokens) { for (int j=0; j<map->numlayers; j++) { if ( ((GET_LAYER(map, j)->name && strcasecmp(GET_LAYER(map, j)->name, token.c_str()) == 0) || (map->name && strcasecmp(map->name, token.c_str()) == 0) || (GET_LAYER(map, j)->group && strcasecmp(GET_LAYER(map, j)->group, token.c_str()) == 0)) && ((msIntegerInArray(GET_LAYER(map, j)->index, ows_request->enabled_layers, ows_request->numlayers))) ) { if (GET_LAYER(map, j)->status != MS_DEFAULT) GET_LAYER(map, j)->status = MS_ON; } } } } } msFree(pszLayerNames); } /* Validate Styles : ** MapServer advertize styles through the group setting in a class object. ** If no styles are set MapServer expects to have empty values ** for the styles parameter (...&STYLES=&...) Or for multiple Styles/Layers, ** we could have ...&STYLES=,,,. If that is not the ** case, we generate an exception. */ if(styles && strlen(styles) > 0) { bool hasCheckedLayerUnicity = false; int n=0; int layerCopyIndex; char** tokens = msStringSplitComplex(styles, ",",&n,MS_ALLOWEMPTYTOKENS); for (int i=0; i<n; i++) { if (tokens[i] && strlen(tokens[i]) > 0 && strcasecmp(tokens[i],"default") != 0) { if (!hasCheckedLayerUnicity) { hasCheckedLayerUnicity = true; bool bLayerInserted = false; /* -------------------------------------------------------------------- */ /* If the same layer is given more that once, we need to */ /* duplicate it. */ /* -------------------------------------------------------------------- */ for (size_t m=0; m<wmslayers.size(); m++) { for (size_t l=m+1; l<wmslayers.size(); l++) { const int nIndex = msGetLayerIndex(map, wmslayers[m].c_str()); if (nIndex != -1 && strcasecmp(wmslayers[m].c_str(), wmslayers[l].c_str())== 0) { layerObj* psTmpLayer = (layerObj *) malloc(sizeof(layerObj)); initLayer(psTmpLayer, map); msCopyLayer(psTmpLayer, GET_LAYER(map,nIndex)); /* open the source layer */ if ( !psTmpLayer->vtable) msInitializeVirtualTable(psTmpLayer); /*make the name unique*/ char tmpId[128]; snprintf(tmpId, sizeof(tmpId), "%lx_%x_%d",(long)time(NULL),(int)getpid(), map->numlayers); if (psTmpLayer->name) msFree(psTmpLayer->name); psTmpLayer->name = msStrdup(tmpId); wmslayers[l] = tmpId; layerCopyIndex = msInsertLayer(map, psTmpLayer, -1); // expand the array mapping map layer index to filter indexes ows_request->layerwmsfilterindex = (int*)msSmallRealloc(ows_request->layerwmsfilterindex, map->numlayers * sizeof(int)); ows_request->layerwmsfilterindex[layerCopyIndex] = l; // the filter index matches the index of the layer name in the WMS param bLayerInserted = true; /* layer was copied, we need to decrement its refcount */ MS_REFCNT_DECR(psTmpLayer); } } } if (bLayerInserted) { msOWSRequestLayersEnabled(map, "M", "GetMap", ows_request); } } if (static_cast<int>(wmslayers.size()) == n) { for (int j=0; j<map->numlayers; j++) { layerObj* lp = GET_LAYER(map, j); if ((lp->name && strcasecmp(lp->name, wmslayers[i].c_str()) == 0) || (lp->group && strcasecmp(lp->group, wmslayers[i].c_str()) == 0)) { bool found = false; for (int k=0; k<lp->numclasses; k++) { if (lp->_class[k]->group && strcasecmp(lp->_class[k]->group, tokens[i]) == 0) { msFree(lp->classgroup); lp->classgroup = msStrdup( tokens[i]); found = true; break; } } if (!found) { msSetError(MS_WMSERR, "Style (%s) not defined on layer.", "msWMSLoadGetMapParams()", tokens[i]); msFreeCharArray(tokens, n); return msWMSException(map, nVersion, "StyleNotDefined", wms_exception_format); } /* Check the style of the root layer */ } else if (map->name && strcasecmp(map->name, wmslayers[i].c_str()) == 0) { const char* styleName = msOWSLookupMetadata(&(map->web.metadata), "MO", "style_name"); if (styleName == NULL) styleName = "default"; char* pszEncodedStyleName = msEncodeHTMLEntities(styleName); if (strcasecmp(pszEncodedStyleName, tokens[i]) != 0) { msSetError(MS_WMSERR, "Style (%s) not defined on root layer.", "msWMSLoadGetMapParams()", tokens[i]); msFreeCharArray(tokens, n); msFree(pszEncodedStyleName); return msWMSException(map, nVersion, "StyleNotDefined", wms_exception_format); } msFree(pszEncodedStyleName); } } } else { msSetError(MS_WMSERR, "Invalid style (%s). Mapserver is expecting an empty string for the STYLES : STYLES= or STYLES=,,, or using keyword default STYLES=default,default, ...", "msWMSLoadGetMapParams()", styles); msFreeCharArray(tokens, n); return msWMSException(map, nVersion, "StyleNotDefined", wms_exception_format); } } } msFreeCharArray(tokens, n); } /* ** WMS extents are edge to edge while MapServer extents are center of ** pixel to center of pixel. Here we try to adjust the WMS extents ** in by half a pixel. We wait till here because we want to ensure we ** are doing this in terms of the correct WIDTH and HEIGHT. */ if( adjust_extent && map->width>1 && map->height>1 && !bbox_pixel_is_point) { double dx, dy; dx = (map->extent.maxx - map->extent.minx) / map->width; map->extent.minx += dx*0.5; map->extent.maxx -= dx*0.5; dy = (map->extent.maxy - map->extent.miny) / map->height; map->extent.miny += dy*0.5; map->extent.maxy -= dy*0.5; } if (request && strcasecmp(request, "DescribeLayer") != 0) { if (!srsfound) { if ( nVersion >= OWS_1_3_0) msSetError(MS_WMSERR, "Missing required parameter CRS", "msWMSLoadGetMapParams()"); else msSetError(MS_WMSERR, "Missing required parameter SRS", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, "MissingParameterValue", wms_exception_format); } if (!bboxfound) { msSetError(MS_WMSERR, "Missing required parameter BBOX", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, "MissingParameterValue", wms_exception_format); } if (!formatfound && (strcasecmp(request, "GetMap") == 0 || strcasecmp(request, "map") == 0)) { msSetError(MS_WMSERR, "Missing required parameter FORMAT", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, "MissingParameterValue", wms_exception_format); } if (!widthfound) { msSetError(MS_WMSERR, "Missing required parameter WIDTH", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, "MissingParameterValue", wms_exception_format); } if (!heightfound) { msSetError(MS_WMSERR, "Missing required parameter HEIGHT", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, "MissingParameterValue", wms_exception_format); } if (styles == nullptr && sld_url == nullptr && sld_body == nullptr && (strcasecmp(request, "GetMap") == 0 || strcasecmp(request, "GetFeatureInfo") == 0) && msOWSLookupMetadata(&(map->web.metadata), "M", "allow_getmap_without_styles") == nullptr) { msSetError(MS_WMSERR, "Missing required parameter STYLES. Note to service administrators: " "defining the \"wms_allow_getmap_without_styles\" \"true\" MAP.WEB.METADATA " "item will disable this check (backward compatibility with behaviour " "of MapServer < 8.0)", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, "MissingParameterValue", wms_exception_format); } } /* ** Apply vendor-specific filter if specified */ if (filter) { if (sld_url || sld_body) { msSetError(MS_WMSERR, "Vendor-specific FILTER parameter cannot be used with SLD or SLD_BODY.", "msWMSLoadGetMapParams()"); return msWMSException(map, nVersion, NULL, wms_exception_format); } if (msWMSApplyFilter(map, nVersion, filter, need_axis_swap, wms_exception_format, ows_request) == MS_FAILURE) { return MS_FAILURE;/* msWMSException(map, nVersion, "InvalidFilterRequest"); */ } } return MS_SUCCESS; } /* ** */ static void msWMSPrintRequestCap(int nVersion, const char *request, const char *script_url, const char *formats, ...) { va_list argp; msIO_printf(" <%s>\n", request); /* We expect to receive a NULL-terminated args list of formats */ va_start(argp, formats); const char* fmt = formats; while(fmt != NULL) { /* Special case for early WMS with subelements in Format (bug 908) */ char *encoded; if( nVersion <= OWS_1_0_7 ) { encoded = msStrdup( fmt ); } /* otherwise we HTML code special characters */ else { encoded = msEncodeHTMLEntities(fmt); } msIO_printf(" <Format>%s</Format>\n", encoded); msFree(encoded); fmt = va_arg(argp, const char *); } va_end(argp); msIO_printf(" <DCPType>\n"); msIO_printf(" <HTTP>\n"); /* The URL should already be HTML encoded. */ if (nVersion == OWS_1_0_0) { msIO_printf(" <Get onlineResource=\"%s\" />\n", script_url); msIO_printf(" <Post onlineResource=\"%s\" />\n", script_url); } else { msIO_printf(" <Get><OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"%s\"/></Get>\n", script_url); msIO_printf(" <Post><OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"%s\"/></Post>\n", script_url); } msIO_printf(" </HTTP>\n"); msIO_printf(" </DCPType>\n"); msIO_printf(" </%s>\n", request); } void msWMSPrintAttribution(FILE *stream, const char *tabspace, hashTableObj *metadata, const char * /*namespaces*/) { if (stream && metadata) { const char* title = msOWSLookupMetadata(metadata, "MO", "attribution_title"); const char* onlineres = msOWSLookupMetadata(metadata, "MO", "attribution_onlineresource"); const char* logourl = msOWSLookupMetadata(metadata, "MO", "attribution_logourl_width"); if (title || onlineres || logourl) { msIO_printf("%s<Attribution>\n",tabspace); if (title) { char* pszEncodedValue = msEncodeHTMLEntities(title); msIO_fprintf(stream, "%s%s<Title>%s</Title>\n", tabspace, tabspace, pszEncodedValue); free(pszEncodedValue); } if (onlineres) { char* pszEncodedValue = msEncodeHTMLEntities(onlineres); msIO_fprintf(stream, "%s%s<OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"%s\"/>\n", tabspace, tabspace, pszEncodedValue); free(pszEncodedValue); } if (logourl) { msOWSPrintURLType(stream, metadata, "MO","attribution_logourl", OWS_NOERR, NULL, "LogoURL", NULL, " width=\"%s\"", " height=\"%s\"", ">\n <Format>%s</Format", "\n <OnlineResource " "xmlns:xlink=\"http://www.w3.org/1999/xlink\"" " xlink:type=\"simple\" xlink:href=\"%s\"/>\n" " ", MS_FALSE, MS_TRUE, MS_TRUE, MS_TRUE, MS_TRUE, NULL, NULL, NULL, NULL, NULL, " "); } msIO_printf("%s</Attribution>\n", tabspace); } } } /* ** msWMSPrintScaleHint() ** ** Print a Min/MaxScaleDenominator tag for the layer if applicable. ** used for WMS >=1.3.0 */ void msWMSPrintScaleDenominator(const char *tabspace, double minscaledenom, double maxscaledenom) { if (minscaledenom > 0) msIO_printf("%s<MinScaleDenominator>%g</MinScaleDenominator>\n", tabspace, minscaledenom); if (maxscaledenom > 0) msIO_printf("%s<MaxScaleDenominator>%g</MaxScaleDenominator>\n", tabspace, maxscaledenom); } /* ** msWMSPrintScaleHint() ** ** Print a ScaleHint tag for this layer if applicable. ** ** (see WMS 1.1.0 sect. 7.1.5.4) The WMS defines the scalehint values as ** the ground distance in meters of the southwest to northeast diagonal of ** the central pixel of a map. ScaleHint values are the min and max ** recommended values of that diagonal. */ void msWMSPrintScaleHint(const char *tabspace, double minscaledenom, double maxscaledenom, double resolution) { double scalehintmin=0.0, scalehintmax=0.0; const double diag = sqrt(2.0); if (minscaledenom > 0) scalehintmin = diag*(minscaledenom/resolution)/msInchesPerUnit(MS_METERS,0); if (maxscaledenom > 0) scalehintmax = diag*(maxscaledenom/resolution)/msInchesPerUnit(MS_METERS,0); if (scalehintmin > 0.0 || scalehintmax > 0.0) { msIO_printf("%s<ScaleHint min=\"%.15g\" max=\"%.15g\" />\n", tabspace, scalehintmin, scalehintmax); if (scalehintmax == 0.0) msIO_printf("%s<!-- WARNING: Only MINSCALEDENOM and no MAXSCALEDENOM specified in " "the mapfile. A default value of 0 has been returned for the " "Max ScaleHint but this is probably not what you want. -->\n", tabspace); } } /* ** msWMSPrintAuthorityURL() ** ** Print an AuthorityURL tag if applicable. */ void msWMSPrintAuthorityURL(FILE *stream, const char *tabspace, hashTableObj *metadata, const char *namespaces) { if (stream && metadata) { const char* pszWmsAuthorityName = msOWSLookupMetadata(metadata, namespaces, "authorityurl_name"); const char* pszWMSAuthorityHref = msOWSLookupMetadata(metadata, namespaces, "authorityurl_href"); /* AuthorityURL only makes sense if you have *both* the name and url */ if( pszWmsAuthorityName && pszWMSAuthorityHref ) { msOWSPrintEncodeMetadata(stream, metadata, namespaces, "authorityurl_name", OWS_NOERR, (std::string(tabspace) + "<AuthorityURL name=\"%s\">\n").c_str(), NULL); msOWSPrintEncodeMetadata(stream, metadata, namespaces, "authorityurl_href", OWS_NOERR, (std::string(tabspace) + " <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"%s\"/>\n").c_str(), NULL); msIO_printf("%s</AuthorityURL>\n", tabspace); } else if ( pszWmsAuthorityName || pszWMSAuthorityHref ) { msIO_printf("%s<!-- WARNING: Both wms_authorityurl_name and wms_authorityurl_href must be set to output an AuthorityURL -->\n", tabspace); } } } /* ** msWMSPrintIdentifier() ** ** Print an Identifier tag if applicable. */ void msWMSPrintIdentifier(FILE *stream, const char *tabspace, hashTableObj *metadata, const char *namespaces) { if (stream && metadata) { const char* pszWMSIdentifierAuthority = msOWSLookupMetadata(metadata, namespaces, "identifier_authority"); const char* pszWMSIdentifierValue = msOWSLookupMetadata(metadata, namespaces, "identifier_value"); /* Identifier only makes sense if you have *both* the authority and value */ if( pszWMSIdentifierAuthority && pszWMSIdentifierValue ) { msOWSPrintEncodeMetadata(stream, metadata, namespaces, "identifier_authority", OWS_NOERR, (std::string(tabspace) + "<Identifier authority=\"%s\">").c_str(), NULL); msOWSPrintEncodeMetadata(stream, metadata, namespaces, "identifier_value", OWS_NOERR, "%s</Identifier>\n", NULL); } else if ( pszWMSIdentifierAuthority || pszWMSIdentifierValue ) { msIO_printf("%s<!-- WARNING: Both wms_identifier_authority and wms_identifier_value must be set to output an Identifier -->\n", tabspace); } } } /* ** msWMSPrintKeywordlist() ** ** Print a Keywordlist tag if applicable. */ void msWMSPrintKeywordlist(FILE *stream, const char *tabspace, const char *name, hashTableObj *metadata, const char *namespaces, int nVersion) { std::string newname(name); /* max. rootlayer_keywordlist_items */ newname += "_items"; std::string vocname(name); /* max. rootlayer_keywordlist_vocabulary */ vocname += "_vocabulary"; if (nVersion == OWS_1_0_0) { /* <Keywords> in V 1.0.0 */ /* The 1.0.0 spec doesn't specify which delimiter to use so let's use spaces */ msOWSPrintEncodeMetadataList(stream, metadata, namespaces, name, (std::string(tabspace) + "<Keywords>").c_str(), (std::string(tabspace) + "</Keywords>\n").c_str(), "%s ", NULL); } else if ( msOWSLookupMetadata(metadata, namespaces, name) || msOWSLookupMetadata(metadata, namespaces, newname.c_str()) || msOWSLookupMetadata(metadata, namespaces, vocname.c_str()) ) { /* <KeywordList><Keyword> ... in V1.0.6+ */ msIO_printf("%s<KeywordList>\n", tabspace); std::string template1(tabspace); template1 += " <Keyword>%s</Keyword>\n"; /* print old styled ..._keywordlist */ msOWSPrintEncodeMetadataList(stream, metadata, namespaces, name, NULL, NULL, template1.c_str(), NULL); /* print new styled ..._keywordlist_items */ msOWSPrintEncodeMetadataList(stream, metadata, namespaces, newname.c_str(), NULL, NULL, template1.c_str(), NULL); /* find out if there's a vocabulary list set */ const char* vocabularylist = msOWSLookupMetadata(metadata, namespaces, vocname.c_str()); if ( vocabularylist && nVersion >= OWS_1_3_0 ) { const auto tokens = msStringSplit(vocabularylist, ','); for (const auto& token: tokens) { msOWSPrintEncodeMetadataList( stream, metadata, namespaces, (std::string(name) + '_' + token + "_items").c_str(), NULL, NULL, (std::string(tabspace) + " <Keyword vocabulary=\"" + token + "\">%s</Keyword>\n").c_str(), NULL); } } msIO_printf("%s</KeywordList>\n", tabspace); } } /* ** msDumpLayer() */ static int msDumpLayer(mapObj *map, layerObj *lp, int nVersion, const char *script_url_encoded, const char *indent, const char *validated_language, int grouplayer, int hasQueryableSubLayers) { rectObj ext; char **classgroups = NULL; int iclassgroups=0; char *pszMapEPSG,*pszLayerEPSG; /* if the layer status is set to MS_DEFAULT, output a warning */ if (lp->status == MS_DEFAULT) msIO_fprintf(stdout, "<!-- WARNING: This layer has its status set to DEFAULT and will always be displayed when doing a GetMap request even if it is not requested by the client. This is not in line with the expected behavior of a WMS server. Using status ON or OFF is recommended. -->\n"); if (nVersion <= OWS_1_0_7) { msIO_printf("%s <Layer queryable=\"%d\">\n", indent, hasQueryableSubLayers || msIsLayerQueryable(lp)); } else { /* 1.1.0 and later: opaque and cascaded are new. */ int cascaded=0, opaque=0; const char* value = msOWSLookupMetadata(&(lp->metadata), "MO", "opaque"); if (value != NULL) opaque = atoi(value); if (lp->connectiontype == MS_WMS) cascaded = 1; msIO_printf("%s <Layer queryable=\"%d\" opaque=\"%d\" cascaded=\"%d\">\n", indent, hasQueryableSubLayers || msIsLayerQueryable(lp), opaque, cascaded); } if (lp->name && strlen(lp->name) > 0 && (msIsXMLTagValid(lp->name) == MS_FALSE || isdigit(lp->name[0]))) msIO_fprintf(stdout, "<!-- WARNING: The layer name '%s' might contain spaces or " "invalid characters or may start with a number. This could lead to potential problems. -->\n", lp->name); msOWSPrintEncodeParam(stdout, "LAYER.NAME", lp->name, OWS_NOERR, " <Name>%s</Name>\n", NULL); /* the majority of this section is dependent on appropriately named metadata in the LAYER object */ msOWSPrintEncodeMetadata2(stdout, &(lp->metadata), "MO", "title", OWS_WARN, " <Title>%s</Title>\n", lp->name, validated_language); msOWSPrintEncodeMetadata2(stdout, &(lp->metadata), "MO", "abstract", OWS_NOERR, " <Abstract>%s</Abstract>\n", NULL, validated_language); msWMSPrintKeywordlist(stdout, " ", "keywordlist", &(lp->metadata), "MO", nVersion); msOWSGetEPSGProj(&(map->projection),&(map->web.metadata), "MO", MS_FALSE, &pszMapEPSG); msOWSGetEPSGProj(&(lp->projection),&(lp->metadata), "MO", MS_FALSE, &pszLayerEPSG); if(pszMapEPSG == NULL) { /* If map has no proj then every layer MUST have one or produce a warning */ if (nVersion > OWS_1_1_0) { /* starting 1.1.1 SRS are given in individual tags */ if (nVersion >= OWS_1_3_0) { msOWSPrintEncodeParamList(stdout, "(at least one of) " "MAP.PROJECTION, LAYER.PROJECTION " "or wms_srs metadata", pszLayerEPSG, OWS_WARN, ' ', NULL, NULL, " <CRS>%s</CRS>\n", NULL); } else { msOWSPrintEncodeParamList(stdout, "(at least one of) " "MAP.PROJECTION, LAYER.PROJECTION " "or wms_srs metadata", pszLayerEPSG, OWS_WARN, ' ', NULL, NULL, " <SRS>%s</SRS>\n", NULL); } } else { msOWSPrintEncodeParam(stdout, "(at least one of) MAP.PROJECTION, " "LAYER.PROJECTION or wms_srs metadata", pszLayerEPSG, OWS_WARN, " <SRS>%s</SRS>\n", NULL); } } else { /* No warning required in this case since there's at least a map proj. */ if (nVersion > OWS_1_1_0) { /* starting 1.1.1 SRS are given in individual tags */ if (nVersion >= OWS_1_3_0) { msOWSPrintEncodeParamList(stdout, "(at least one of) " "MAP.PROJECTION, LAYER.PROJECTION " "or wms_srs metadata", pszLayerEPSG, OWS_NOERR, ' ', NULL, NULL, " <CRS>%s</CRS>\n", NULL); } else { msOWSPrintEncodeParamList(stdout, "(at least one of) " "MAP.PROJECTION, LAYER.PROJECTION " "or wms_srs metadata", pszLayerEPSG, OWS_NOERR, ' ', NULL, NULL, " <SRS>%s</SRS>\n", NULL); } } else { msOWSPrintEncodeParam(stdout, " LAYER.PROJECTION (or wms_srs metadata)", pszLayerEPSG, OWS_NOERR, " <SRS>%s</SRS>\n", NULL); } } msFree(pszLayerEPSG); msFree(pszMapEPSG); /* If layer has no proj set then use map->proj for bounding box. */ if (msOWSGetLayerExtent(map, lp, "MO", &ext) == MS_SUCCESS) { if(lp->projection.numargs > 0) { if (nVersion >= OWS_1_3_0) msOWSPrintEX_GeographicBoundingBox(stdout, " ", &(ext), &(lp->projection)); else msOWSPrintLatLonBoundingBox(stdout, " ", &(ext), &(lp->projection), NULL, OWS_WMS); msOWSPrintBoundingBox( stdout," ", &(ext), &(lp->projection), &(lp->metadata), &(map->web.metadata), "MO", nVersion ); } else { if (nVersion >= OWS_1_3_0) msOWSPrintEX_GeographicBoundingBox(stdout, " ", &(ext), &(map->projection)); else msOWSPrintLatLonBoundingBox(stdout, " ", &(ext), &(map->projection), NULL, OWS_WMS); msOWSPrintBoundingBox(stdout," ", &(ext), &(map->projection), &(lp->metadata), &(map->web.metadata), "MO", nVersion ); } } else { if (nVersion >= OWS_1_3_0) msIO_printf(" <!-- WARNING: Optional Ex_GeographicBoundingBox could not be established for this layer. Consider setting the EXTENT in the LAYER object, or wms_extent metadata. Also check that your data exists in the DATA statement -->\n"); else msIO_printf(" <!-- WARNING: Optional LatLonBoundingBox could not be established for this layer. Consider setting the EXTENT in the LAYER object, or wms_extent metadata. Also check that your data exists in the DATA statement -->\n"); } /* time support */ const char* pszWmsTimeExtent = msOWSLookupMetadata(&(lp->metadata), "MO", "timeextent"); if (pszWmsTimeExtent) { const char* pszWmsTimeDefault = msOWSLookupMetadata(&(lp->metadata), "MO", "timedefault"); if (nVersion >= OWS_1_3_0) { if (pszWmsTimeDefault) msIO_fprintf(stdout, " <Dimension name=\"time\" units=\"ISO8601\" default=\"%s\" nearestValue=\"0\">%s</Dimension>\n",pszWmsTimeDefault, pszWmsTimeExtent); else msIO_fprintf(stdout, " <Dimension name=\"time\" units=\"ISO8601\" nearestValue=\"0\">%s</Dimension>\n",pszWmsTimeExtent); } else { msIO_fprintf(stdout, " <Dimension name=\"time\" units=\"ISO8601\"/>\n"); if (pszWmsTimeDefault) msIO_fprintf(stdout, " <Extent name=\"time\" default=\"%s\" nearestValue=\"0\">%s</Extent>\n",pszWmsTimeDefault, pszWmsTimeExtent); else msIO_fprintf(stdout, " <Extent name=\"time\" nearestValue=\"0\">%s</Extent>\n",pszWmsTimeExtent); } } /*dimensions support: elevation + other user defined dimensions*/ const char* pszDimensionlist = msOWSLookupMetadata(&(lp->metadata), "M", "dimensionlist"); if (pszDimensionlist) { auto tokens = msStringSplit(pszDimensionlist, ','); for( auto& dimension: tokens ) { /*check if manadatory unit and extent are set. Item should also be set. default value is optional*/ msStringTrim(dimension); const char* pszDimensionItem = msOWSLookupMetadata( &(lp->metadata), "M", (dimension + "_item").c_str()); const char* pszDimensionExtent = msOWSLookupMetadata( &(lp->metadata), "M", (dimension + "_extent").c_str()); const char* pszDimensionUnit = msOWSLookupMetadata( &(lp->metadata), "M", (dimension + "_units").c_str()); const char* pszDimensionDefault = msOWSLookupMetadata( &(lp->metadata), "M", (dimension + "_default").c_str()); if (pszDimensionItem && pszDimensionExtent && pszDimensionUnit) { if (nVersion >= OWS_1_3_0) { if(pszDimensionDefault && strlen(pszDimensionDefault) > 0) msIO_fprintf(stdout, " <Dimension name=\"%s\" units=\"%s\" default=\"%s\" multipleValues=\"1\" nearestValue=\"0\">%s</Dimension>\n", dimension.c_str(), pszDimensionUnit, pszDimensionDefault, pszDimensionExtent); else msIO_fprintf(stdout, " <Dimension name=\"%s\" units=\"%s\" multipleValues=\"1\" nearestValue=\"0\">%s</Dimension>\n", dimension.c_str(), pszDimensionUnit, pszDimensionExtent); } else { msIO_fprintf(stdout, " <Dimension name=\"%s\" units=\"%s\"/>\n", dimension.c_str(), pszDimensionUnit); if(pszDimensionDefault && strlen(pszDimensionDefault) > 0) msIO_fprintf(stdout, " <Extent name=\"%s\" default=\"%s\" nearestValue=\"0\">%s</Extent>\n", dimension.c_str(), pszDimensionDefault, pszDimensionExtent); else msIO_fprintf(stdout, " <Extent name=\"%s\" nearestValue=\"0\">%s</Extent>\n", dimension.c_str(), pszDimensionExtent); } } } } if (nVersion >= OWS_1_0_7) { msWMSPrintAttribution(stdout, " ", &(lp->metadata), "MO"); } /* AuthorityURL support and Identifier support, only available >= WMS 1.1.0 */ if(nVersion >= OWS_1_1_0) { msWMSPrintAuthorityURL(stdout, " ", &(lp->metadata), "MO"); msWMSPrintIdentifier(stdout, " ", &(lp->metadata), "MO"); } if(nVersion >= OWS_1_1_0) { const char* metadataurl_list = msOWSLookupMetadata(&(lp->metadata), "MO", "metadataurl_list"); if( metadataurl_list ) { const auto tokens = msStringSplit(metadataurl_list, ' '); for( const auto& token: tokens ) { std::string key("metadataurl_"); key += token; msOWSPrintURLType(stdout, &(lp->metadata), "MO", key.c_str(), OWS_NOERR, NULL, "MetadataURL", " type=\"%s\"", NULL, NULL, ">\n <Format>%s</Format", "\n <OnlineResource xmlns:xlink=\"" "http://www.w3.org/1999/xlink\" " "xlink:type=\"simple\" xlink:href=\"%s\"/>\n ", MS_TRUE, MS_FALSE, MS_FALSE, MS_TRUE, MS_TRUE, NULL, NULL, NULL, NULL, NULL, " "); } } else { if (! msOWSLookupMetadata(&(lp->metadata), "MO", "metadataurl_href")) msMetadataSetGetMetadataURL(lp, script_url_encoded); msOWSPrintURLType(stdout, &(lp->metadata), "MO", "metadataurl", OWS_NOERR, NULL, "MetadataURL", " type=\"%s\"", NULL, NULL, ">\n <Format>%s</Format", "\n <OnlineResource xmlns:xlink=\"" "http://www.w3.org/1999/xlink\" " "xlink:type=\"simple\" xlink:href=\"%s\"/>\n ", MS_TRUE, MS_FALSE, MS_FALSE, MS_TRUE, MS_TRUE, NULL, NULL, NULL, NULL, NULL, " "); } } if(nVersion < OWS_1_1_0) msOWSPrintEncodeMetadata(stdout, &(lp->metadata), "MO", "dataurl_href", OWS_NOERR, " <DataURL>%s</DataURL>\n", NULL); else { const char* dataurl_list = msOWSLookupMetadata(&(lp->metadata), "MO", "dataurl_list"); if( dataurl_list ) { const auto tokens = msStringSplit(dataurl_list, ' '); for( const auto& token: tokens ) { std::string key("dataurl_"); key += token; msOWSPrintURLType(stdout, &(lp->metadata), "MO", key.c_str(), OWS_NOERR, NULL, "DataURL", NULL, NULL, NULL, ">\n <Format>%s</Format", "\n <OnlineResource xmlns:xlink=\"" "http://www.w3.org/1999/xlink\" " "xlink:type=\"simple\" xlink:href=\"%s\"/>\n ", MS_FALSE, MS_FALSE, MS_FALSE, MS_TRUE, MS_TRUE, NULL, NULL, NULL, NULL, NULL, " "); } } else { msOWSPrintURLType(stdout, &(lp->metadata), "MO", "dataurl", OWS_NOERR, NULL, "DataURL", NULL, NULL, NULL, ">\n <Format>%s</Format", "\n <OnlineResource xmlns:xlink=\"" "http://www.w3.org/1999/xlink\" " "xlink:type=\"simple\" xlink:href=\"%s\"/>\n ", MS_FALSE, MS_FALSE, MS_FALSE, MS_TRUE, MS_TRUE, NULL, NULL, NULL, NULL, NULL, " "); } } /* The LegendURL reside in a style. The Web Map Context spec already */ /* included the support on this in mapserver. However, it is not in the */ /* wms_legendurl_... metadatas it's in the styles metadata, */ /* In wms_style_<style_name>_lengendurl_... metadata. So we have to detect */ /* the current style before reading it. Also in the Style block, we need */ /* a Title and a name. Title is derived from wms_style_<style>_title, */ /* which allows mutiple style definitions, e.g. by using classgroups. */ const char* pszStyle = msOWSLookupMetadata(&(lp->metadata), "MO", "style"); const char *pszLegendURL=NULL; if (pszStyle) { pszLegendURL = msOWSLookupMetadata(&(lp->metadata), "MO", (std::string("style_") + pszStyle + "_legendurl_href").c_str()); } else pszStyle = "default"; if(nVersion <= OWS_1_0_0 && pszLegendURL) { /* First, print the style block */ msIO_fprintf(stdout, " <Style>\n"); msIO_fprintf(stdout, " <Name>%s</Name>\n", pszStyle); /* Print the real Title or Style name otherwise */ msOWSPrintEncodeMetadata2(stdout, &(lp->metadata), "MO", (std::string("style_") + pszStyle + "_title").c_str(), OWS_NOERR, " <Title>%s</Title>\n", pszStyle, validated_language); /* Inside, print the legend url block */ msOWSPrintEncodeMetadata(stdout, &(lp->metadata), "MO", (std::string("style_") + pszStyle + "_legendurl_href").c_str(), OWS_NOERR, " <StyleURL>%s</StyleURL>\n", NULL); /* close the style block */ msIO_fprintf(stdout, " </Style>\n"); } else if(nVersion >= OWS_1_1_0) { if (pszLegendURL) { /* First, print the style block */ msIO_fprintf(stdout, " <Style>\n"); msIO_fprintf(stdout, " <Name>%s</Name>\n", pszStyle); /* Print the real Title or Style name otherwise */ msOWSPrintEncodeMetadata2(stdout, &(lp->metadata), "MO", (std::string("style_") + pszStyle + "_title").c_str(), OWS_NOERR, " <Title>%s</Title>\n", pszStyle, validated_language); /* Inside, print the legend url block */ msOWSPrintURLType(stdout, &(lp->metadata), "MO", (std::string("style_") + pszStyle + "_legendurl").c_str(), OWS_NOERR, NULL, "LegendURL", NULL, " width=\"%s\"", " height=\"%s\"", ">\n <Format>%s</Format", "\n <OnlineResource " "xmlns:xlink=\"http://www.w3.org/1999/xlink\"" " xlink:type=\"simple\" xlink:href=\"%s\"/>\n" " ", MS_FALSE, MS_TRUE, MS_TRUE, MS_TRUE, MS_TRUE, NULL, NULL, NULL, NULL, NULL, " "); msIO_fprintf(stdout, " </Style>\n"); } else { if (script_url_encoded) { if (lp->connectiontype != MS_WMS && lp->connectiontype != MS_WFS && lp->connectiontype != MS_UNUSED_1 && lp->numclasses > 0) { bool classnameset = false; for (int i=0; i<lp->numclasses; i++) { if (lp->_class[i]->name && strlen(lp->_class[i]->name) > 0) { classnameset = true; break; } } if (classnameset) { int size_x=0, size_y=0; std::vector<int> group_layers; group_layers.reserve(map->numlayers); char ***nestedGroups = (char***)msSmallCalloc(map->numlayers, sizeof(char**)); int *numNestedGroups = (int*)msSmallCalloc(map->numlayers, sizeof(int)); int* isUsedInNestedGroup = (int*)msSmallCalloc(map->numlayers, sizeof(int)); msWMSPrepareNestedGroups(map, nVersion, nestedGroups, numNestedGroups, isUsedInNestedGroup); group_layers.push_back(lp->index); if (isUsedInNestedGroup[lp->index]) { for (int j=0; j < map->numlayers; j++) { if (j == lp->index) continue; for(int k = 0; k < numNestedGroups[j]; k++) { if (strcasecmp(lp->name, nestedGroups[j][k]) == 0) { group_layers.push_back(j); break; } } } } if (msLegendCalcSize(map, 1, &size_x, &size_y, group_layers.data(), static_cast<int>(group_layers.size()), NULL, 1) == MS_SUCCESS) { const std::string width(std::to_string(size_x)); const std::string height(std::to_string(size_y)); char* mimetype = NULL; #if defined USE_PNG mimetype = msEncodeHTMLEntities("image/png"); #endif #if defined USE_JPEG if (!mimetype) mimetype = msEncodeHTMLEntities("image/jpeg"); #endif if (!mimetype) mimetype = msEncodeHTMLEntities(MS_IMAGE_MIME_TYPE(map->outputformat)); /* -------------------------------------------------------------------- */ /* check if the group parameters for the classes are set. We */ /* should then publish the different class groups as different styles.*/ /* -------------------------------------------------------------------- */ iclassgroups = 0; classgroups = NULL; const char* styleName = msOWSLookupMetadata(&(map->web.metadata), "MO", "style_name"); if (styleName == NULL) styleName = "default"; char* pszEncodedStyleName = msEncodeHTMLEntities(styleName); for (int i=0; i<lp->numclasses; i++) { if (lp->_class[i]->name && lp->_class[i]->group) { /* Check that style is not inherited from root layer (#4442). */ if (strcasecmp(pszEncodedStyleName, lp->_class[i]->group) == 0) continue; /* Check that style is not inherited from group layer(s) (#4442). */ if (numNestedGroups[lp->index] > 0) { int j=0; layerObj *lp2 = NULL; for (; j<numNestedGroups[lp->index]; j++) { int l = 0; for (int k=0; k < map->numlayers; k++) { if (GET_LAYER(map, k)->name && strcasecmp(GET_LAYER(map, k)->name, nestedGroups[lp->index][j]) == 0) { lp2 = (GET_LAYER(map, k)); for (l=0; l < lp2->numclasses; l++) { if (strcasecmp(lp2->_class[l]->group, lp->_class[i]->group) == 0) break; } break; } } if (lp2 && l < lp2->numclasses) break; } if (j < numNestedGroups[lp->index]) continue; } if (!classgroups) { classgroups = (char **)msSmallMalloc(sizeof(char *)); classgroups[iclassgroups++]= msStrdup(lp->_class[i]->group); } else { /* Output style only once. */ bool found = false; for (int j=0; j<iclassgroups; j++) { if (strcasecmp(classgroups[j], lp->_class[i]->group) == 0) { found = true; break; } } if (!found) { iclassgroups++; classgroups = (char **)msSmallRealloc(classgroups, sizeof(char *)*iclassgroups); classgroups[iclassgroups-1]= msStrdup(lp->_class[i]->group); } } } } msFree(pszEncodedStyleName); if (classgroups == NULL) { classgroups = (char **)msSmallMalloc(sizeof(char *)); classgroups[0]= msStrdup("default"); iclassgroups = 1; } for (int i=0; i<iclassgroups; i++) { char *name_encoded = msEncodeHTMLEntities(lp->name); char *classgroup_encoded = msEncodeHTMLEntities(classgroups[i]); std::string legendurl(script_url_encoded); legendurl += "version="; char szVersionBuf[OWS_VERSION_MAXLEN]; legendurl += msOWSGetVersionString(nVersion, szVersionBuf); legendurl += "&amp;service=WMS&amp;request=GetLegendGraphic&amp;"; if (nVersion >= OWS_1_3_0) { legendurl += "sld_version=1.1.0&amp;layer="; } else { legendurl += "layer="; } legendurl += name_encoded; legendurl += "&amp;format="; legendurl += mimetype; legendurl += "&amp;STYLE="; legendurl += classgroup_encoded; msFree(name_encoded); msFree(classgroup_encoded); msIO_fprintf(stdout, " <Style>\n"); msIO_fprintf(stdout, " <Name>%s</Name>\n", classgroups[i]); msOWSPrintEncodeMetadata2(stdout, &(lp->metadata), "MO", (std::string("style_") + classgroups[i] + "_title").c_str(), OWS_NOERR, " <Title>%s</Title>\n", classgroups[i], validated_language); /* A legendurl from wms_style_<style>_legendurl_href will override a self generated legend graphic */ pszLegendURL = msOWSLookupMetadata(&(lp->metadata), "MO", (std::string("style_") + classgroups[i] + "_legendurl_href").c_str()); if (pszLegendURL) { msOWSPrintURLType(stdout, &(lp->metadata), "MO", (std::string("style_") + classgroups[i] + "_legendurl").c_str(), OWS_NOERR, NULL, "LegendURL", NULL, " width=\"%s\"", " height=\"%s\"", ">\n <Format>%s</Format", "\n <OnlineResource " "xmlns:xlink=\"http://www.w3.org/1999/xlink\"" " xlink:type=\"simple\" xlink:href=\"%s\"/>\n" " ", MS_FALSE, MS_TRUE, MS_TRUE, MS_TRUE, MS_TRUE, NULL, NULL, NULL, NULL, NULL, " "); } else { msOWSPrintURLType(stdout, NULL, "O", "ttt", OWS_NOERR, NULL, "LegendURL", NULL, " width=\"%s\"", " height=\"%s\"", ">\n <Format>%s</Format", "\n <OnlineResource " "xmlns:xlink=\"http://www.w3.org/1999/xlink\"" " xlink:type=\"simple\" xlink:href=\"%s\"/>\n" " ", MS_FALSE, MS_FALSE, MS_FALSE, MS_FALSE, MS_FALSE, NULL, width.c_str(), height.c_str(), mimetype, legendurl.c_str(), " "); } msIO_fprintf(stdout, " </Style>\n"); } msFreeCharArray(classgroups, iclassgroups); msFree(mimetype); } /* free the stuff used for nested layers */ for (int i = 0; i < map->numlayers; i++) { if (numNestedGroups[i] > 0) { msFreeCharArray(nestedGroups[i], numNestedGroups[i]); } } free(nestedGroups); free(numNestedGroups); free(isUsedInNestedGroup); } } } } } /* print Min/Max ScaleDenominator */ if (nVersion < OWS_1_3_0) msWMSPrintScaleHint(" ", lp->minscaledenom, lp->maxscaledenom, map->resolution); else msWMSPrintScaleDenominator(" ", lp->minscaledenom, lp->maxscaledenom); if ( grouplayer == MS_FALSE ) msIO_printf("%s </Layer>\n", indent); return MS_SUCCESS; } /* * msWMSIsSubGroup */ static bool msWMSIsSubGroup(char** currentGroups, int currentLevel, char** otherGroups, int numOtherGroups) { /* no match if otherGroups[] has less levels than currentLevel */ if (numOtherGroups <= currentLevel) { return false; } /* compare all groups below the current level */ for (int i = 0; i <= currentLevel; i++) { if (strcmp(currentGroups[i], otherGroups[i]) != 0) { return false; /* if one of these is not equal it is not a sub group */ } } return true; } /* * msWMSHasQueryableSubLayers */ static int msWMSHasQueryableSubLayers(mapObj* map, int index, int level, char*** nestedGroups, int* numNestedGroups) { for (int j = index; j < map->numlayers; j++) { if (msWMSIsSubGroup(nestedGroups[index], level, nestedGroups[j], numNestedGroups[j])) { if( msIsLayerQueryable( GET_LAYER(map,j) ) ) return MS_TRUE; } } return MS_FALSE; } /*********************************************************************************** * msWMSPrintNestedGroups() * * * * purpose: Writes the layers to the capabilities that have the * * "WMS_LAYER_GROUP" metadata set. * * * * params: * * -map: The main map object * * -nVersion: OGC WMS version * * -pabLayerProcessed: boolean array indicating which layers have been dealt with. * * -index: the index of the current layer. * * -level: the level of depth in the group tree (root = 0) * * -nestedGroups: This array holds the arrays of groups that have * * been set through the WMS_LAYER_GROUP metadata * * -numNestedGroups: This array holds the number of nested groups for each layer * ***********************************************************************************/ void msWMSPrintNestedGroups(mapObj* map, int nVersion, char* pabLayerProcessed, int index, int level, char*** nestedGroups, int* numNestedGroups, int* isUsedInNestedGroup, const char *script_url_encoded, const char *validated_language) { bool groupAdded = false; std::string indent; for (int i = 0; i < level; i++) { indent += " "; } if (numNestedGroups[index] <= level) { /* no more subgroups */ if ((!pabLayerProcessed[index]) && (!isUsedInNestedGroup[index])) { /* we are at the deepest level of the group branchings, so add layer now. */ msDumpLayer(map, GET_LAYER(map, index), nVersion, script_url_encoded, indent.c_str(), validated_language, MS_FALSE, MS_FALSE); pabLayerProcessed[index] = 1; /* done */ } } else { /* not yet there, we have to deal with this group and possible subgroups and layers. */ int j; for (j = 0; j < map->numlayers; j++) { if ( GET_LAYER(map, j)->name && strcasecmp(GET_LAYER(map, j)->name, nestedGroups[index][level]) == 0 ) { break; } } /* Beginning of a new group... enclose the group in a layer block */ if ( j < map->numlayers ) { if (!pabLayerProcessed[j]) { msDumpLayer(map, GET_LAYER(map, j), nVersion, script_url_encoded, indent.c_str(), validated_language, MS_TRUE, msWMSHasQueryableSubLayers(map, index, level, nestedGroups, numNestedGroups)); pabLayerProcessed[j] = 1; /* done */ groupAdded = true; } } else { msIO_printf("%s <Layer%s>\n", indent.c_str(), msWMSHasQueryableSubLayers(map, index, level, nestedGroups, numNestedGroups) ? " queryable=\"1\"" : ""); msIO_printf("%s <Name>%s</Name>\n", indent.c_str(), nestedGroups[index][level]); msIO_printf("%s <Title>%s</Title>\n", indent.c_str(), nestedGroups[index][level]); groupAdded = true; } /* Look for one group deeper in the current layer */ if (!pabLayerProcessed[index]) { msWMSPrintNestedGroups(map, nVersion, pabLayerProcessed, index, level + 1, nestedGroups, numNestedGroups, isUsedInNestedGroup, script_url_encoded, validated_language); } /* look for subgroups in other layers. */ for (j = index + 1; j < map->numlayers; j++) { if (msWMSIsSubGroup(nestedGroups[index], level, nestedGroups[j], numNestedGroups[j])) { if (!pabLayerProcessed[j]) { msWMSPrintNestedGroups(map, nVersion, pabLayerProcessed, j, level + 1, nestedGroups, numNestedGroups, isUsedInNestedGroup, script_url_encoded, validated_language); } } else { /* TODO: if we would sort all layers on "WMS_LAYER_GROUP" beforehand */ /* we could break out of this loop at this point, which would increase */ /* performance. */ } } /* Close group layer block */ if (groupAdded) msIO_printf("%s </Layer>\n", indent.c_str()); } } /* msWMSPrintNestedGroups */ /* ** msWMSGetCapabilities() */ static int msWMSGetCapabilities(mapObj *map, int nVersion, cgiRequestObj *req, owsRequestObj *ows_request, const char *requested_updatesequence, const char *wms_exception_format, const char *requested_language) { const char* updatesequence = msOWSLookupMetadata(&(map->web.metadata), "MO", "updatesequence"); const char* sldenabled = msOWSLookupMetadata(&(map->web.metadata), "MO", "sld_enabled"); if (sldenabled == NULL) sldenabled = "true"; if (requested_updatesequence != NULL) { int i = msOWSNegotiateUpdateSequence(requested_updatesequence, updatesequence); if (i == 0) { /* current */ msSetError(MS_WMSERR, "UPDATESEQUENCE parameter (%s) is equal to server (%s)", "msWMSGetCapabilities()", requested_updatesequence, updatesequence); return msWMSException(map, nVersion, "CurrentUpdateSequence", wms_exception_format); } if (i > 0) { /* invalid */ msSetError(MS_WMSERR, "UPDATESEQUENCE parameter (%s) is higher than server (%s)", "msWMSGetCapabilities()", requested_updatesequence, updatesequence); return msWMSException(map, nVersion, "InvalidUpdateSequence", wms_exception_format); } } std::string schemalocation; { char* pszSchemalocation = msEncodeHTMLEntities( msOWSGetSchemasLocation(map) ); schemalocation = pszSchemalocation; msFree(pszSchemalocation); } if (nVersion < 0) nVersion = OWS_1_3_0; /* Default to 1.3.0 */ /* Decide which version we're going to return. */ std::string dtd_url; if (nVersion < OWS_1_0_7) { nVersion = OWS_1_0_0; dtd_url = schemalocation; dtd_url += "/wms/1.0.0/capabilities_1_0_0.dtd"; } else if (nVersion < OWS_1_1_0) { nVersion = OWS_1_0_7; dtd_url = schemalocation; dtd_url += "/wms/1.0.7/capabilities_1_0_7.dtd"; } else if (nVersion < OWS_1_1_1) { nVersion = OWS_1_1_0; dtd_url = schemalocation; dtd_url += "/wms/1.1.0/capabilities_1_1_0.dtd"; } else if (nVersion < OWS_1_3_0) { nVersion = OWS_1_1_1; dtd_url = schemalocation; /* this exception was added to accomadote the OGC test suite (Bug 1576)*/ if (strcasecmp(schemalocation.c_str(), OWS_DEFAULT_SCHEMAS_LOCATION) == 0) dtd_url += "/wms/1.1.1/WMS_MS_Capabilities.dtd"; else dtd_url += "/wms/1.1.1/capabilities_1_1_1.dtd"; } else nVersion = OWS_1_3_0; /* This function owns validated_language, so remember to free it later*/ std::string validated_language; { char* pszValidated_language = msOWSGetLanguageFromList(map, "MO", requested_language); if( pszValidated_language ) { validated_language = pszValidated_language; msMapSetLanguageSpecificConnection(map, pszValidated_language); } msFree(pszValidated_language); } /* We need this server's onlineresource. */ /* Default to use the value of the "onlineresource" metadata, and if not */ /* set then build it: "http://$(SERVER_NAME):$(SERVER_PORT)$(SCRIPT_NAME)?" */ /* the returned string should be freed once we're done with it. */ char *script_url_encoded=NULL; { char *script_url = msOWSGetOnlineResource2(map, "MO", "onlineresource", req, validated_language.c_str()); if (script_url == NULL || (script_url_encoded = msEncodeHTMLEntities(script_url)) == NULL) { free(script_url); return msWMSException(map, nVersion, NULL, wms_exception_format); } free(script_url); } if (nVersion <= OWS_1_0_7 || nVersion >= OWS_1_3_0) /* 1.0.0 to 1.0.7 and >=1.3.0*/ msIO_setHeader("Content-Type","text/xml; charset=UTF-8"); else /* 1.1.0 and later */ msIO_setHeader("Content-Type","application/vnd.ogc.wms_xml; charset=UTF-8"); msIO_sendHeaders(); msIO_printf("<?xml version='1.0' encoding=\"UTF-8\" standalone=\"no\" ?>\n"); /*TODO review wms1.3.0*/ if ( nVersion < OWS_1_3_0) { msIO_printf("<!DOCTYPE WMT_MS_Capabilities SYSTEM \"%s\"\n", dtd_url.c_str()); msIO_printf(" [\n"); if (nVersion == OWS_1_1_1 && msOWSLookupMetadata(&(map->web.metadata), "MO", "inspire_capabilities") ) { msIO_printf("<!ELEMENT VendorSpecificCapabilities (inspire_vs:ExtendedCapabilities)><!ELEMENT inspire_vs:ExtendedCapabilities ((inspire_common:MetadataUrl, inspire_common:SupportedLanguages, inspire_common:ResponseLanguage) | (inspire_common:ResourceLocator+, inspire_common:ResourceType, inspire_common:TemporalReference+, inspire_common:Conformity+, inspire_common:MetadataPointOfContact+, inspire_common:MetadataDate, inspire_common:SpatialDataServiceType, inspire_common:MandatoryKeyword+, inspire_common:Keyword*, inspire_common:SupportedLanguages, inspire_common:ResponseLanguage, inspire_common:MetadataUrl?))><!ATTLIST inspire_vs:ExtendedCapabilities xmlns:inspire_vs CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/inspire_vs/1.0\" ><!ELEMENT inspire_common:MetadataUrl (inspire_common:URL, inspire_common:MediaType*)><!ATTLIST inspire_common:MetadataUrl xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" xmlns:xsi CDATA #FIXED \"http://www.w3.org/2001/XMLSchema-instance\" xsi:type CDATA #FIXED \"inspire_common:resourceLocatorType\" ><!ELEMENT inspire_common:URL (#PCDATA)><!ATTLIST inspire_common:URL xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\"><!ELEMENT inspire_common:MediaType (#PCDATA)><!ATTLIST inspire_common:MediaType xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\"><!ELEMENT inspire_common:SupportedLanguages (inspire_common:DefaultLanguage, inspire_common:SupportedLanguage*)><!ATTLIST inspire_common:SupportedLanguages xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:DefaultLanguage (inspire_common:Language)><!ATTLIST inspire_common:DefaultLanguage xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:SupportedLanguage (inspire_common:Language)><!ATTLIST inspire_common:SupportedLanguage xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" >" "<!ELEMENT inspire_common:ResponseLanguage (inspire_common:Language)><!ATTLIST inspire_common:ResponseLanguage xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:Language (#PCDATA)><!ATTLIST inspire_common:Language xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:ResourceLocator (inspire_common:URL, inspire_common:MediaType*)><!ATTLIST inspire_common:ResourceLocator xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\"><!ELEMENT inspire_common:ResourceType (#PCDATA)> <!ATTLIST inspire_common:ResourceType xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:TemporalReference (inspire_common:DateOfCreation?, inspire_common:DateOfLastRevision?, inspire_common:DateOfPublication*, inspire_common:TemporalExtent*)><!ATTLIST inspire_common:TemporalReference xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:DateOfCreation (#PCDATA)> <!ATTLIST inspire_common:DateOfCreation xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\"><!ELEMENT inspire_common:DateOfLastRevision (#PCDATA)><!ATTLIST inspire_common:DateOfLastRevision xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\"><!ELEMENT inspire_common:DateOfPublication (#PCDATA)><!ATTLIST inspire_common:DateOfPublication xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\"><!ELEMENT inspire_common:TemporalExtent (inspire_common:IndividualDate | inspire_common:IntervalOfDates)><!ATTLIST inspire_common:TemporalExtent xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:IndividualDate (#PCDATA)> <!ATTLIST inspire_common:IndividualDate xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\">" "<!ELEMENT inspire_common:IntervalOfDates (inspire_common:StartingDate, inspire_common:EndDate)><!ATTLIST inspire_common:IntervalOfDates xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:StartingDate (#PCDATA)><!ATTLIST inspire_common:StartingDate xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:EndDate (#PCDATA)><!ATTLIST inspire_common:EndDate xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:Conformity (inspire_common:Specification, inspire_common:Degree)><!ATTLIST inspire_common:Conformity xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:Specification (inspire_common:Title, (inspire_common:DateOfPublication | inspire_common:DateOfCreation | inspire_common:DateOfLastRevision), inspire_common:URI*, inspire_common:ResourceLocator*)><!ATTLIST inspire_common:Specification xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:Title (#PCDATA)><!ATTLIST inspire_common:Title xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:URI (#PCDATA)><!ATTLIST inspire_common:URI xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:Degree (#PCDATA)><!ATTLIST inspire_common:Degree xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:MetadataPointOfContact (inspire_common:OrganisationName, inspire_common:EmailAddress)><!ATTLIST inspire_common:MetadataPointOfContact xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" >" "<!ELEMENT inspire_common:OrganisationName (#PCDATA)><!ATTLIST inspire_common:OrganisationName xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:EmailAddress (#PCDATA)><!ATTLIST inspire_common:EmailAddress xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:MetadataDate (#PCDATA)><!ATTLIST inspire_common:MetadataDate xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:SpatialDataServiceType (#PCDATA)><!ATTLIST inspire_common:SpatialDataServiceType xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:MandatoryKeyword (inspire_common:KeywordValue)><!ATTLIST inspire_common:MandatoryKeyword xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" ><!ELEMENT inspire_common:KeywordValue (#PCDATA)><!ATTLIST inspire_common:KeywordValue xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" >" "<!ELEMENT inspire_common:Keyword (inspire_common:OriginatingControlledVocabulary?, inspire_common:KeywordValue)><!ATTLIST inspire_common:Keyword xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\" xmlns:xsi CDATA #FIXED \"http://www.w3.org/2001/XMLSchemainstance\" xsi:type (inspire_common:inspireTheme_bul | inspire_common:inspireTheme_cze | inspire_common:inspireTheme_dan | inspire_common:inspireTheme_dut | inspire_common:inspireTheme_eng | inspire_common:inspireTheme_est | inspire_common:inspireTheme_fin | inspire_common:inspireTheme_fre | inspire_common:inspireTheme_ger | inspire_common:inspireTheme_gre | inspire_common:inspireTheme_hun | inspire_common:inspireTheme_gle | inspire_common:inspireTheme_ita | inspire_common:inspireTheme_lav | inspire_common:inspireTheme_lit | inspire_common:inspireTheme_mlt | inspire_common:inspireTheme_pol | inspire_common:inspireTheme_por | inspire_common:inspireTheme_rum | inspire_common:inspireTheme_slo | inspire_common:inspireTheme_slv | inspire_common:inspireTheme_spa | inspire_common:inspireTheme_swe) #IMPLIED ><!ELEMENT inspire_common:OriginatingControlledVocabulary (inspire_common:Title, (inspire_common:DateOfPublication | inspire_common:DateOfCreation | inspire_common:DateOfLastRevision), inspire_common:URI*, inspire_common:ResourceLocator*)><!ATTLIST inspire_common:OriginatingControlledVocabulary xmlns:inspire_common CDATA #FIXED \"http://inspire.ec.europa.eu/schemas/common/1.0\">\n"); } else { /* some mapserver specific declarations will go here */ msIO_printf(" <!ELEMENT VendorSpecificCapabilities EMPTY>\n"); } msIO_printf(" ]> <!-- end of DOCTYPE declaration -->\n\n"); } char szVersionBuf[OWS_VERSION_MAXLEN]; const char* pszVersion = msOWSGetVersionString(nVersion, szVersionBuf); if ( nVersion >= OWS_1_3_0) msIO_printf("<WMS_Capabilities version=\"%s\"", pszVersion); else msIO_printf("<WMT_MS_Capabilities version=\"%s\"", pszVersion); if (updatesequence) msIO_printf(" updateSequence=\"%s\"",updatesequence); if ( nVersion == OWS_1_3_0) { msIO_printf(" xmlns=\"http://www.opengis.net/wms\"" " xmlns:sld=\"http://www.opengis.net/sld\"" " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" " xmlns:ms=\"http://mapserver.gis.umn.edu/mapserver\""); if ( msOWSLookupMetadata(&(map->web.metadata), "MO", "inspire_capabilities") ) { msIO_printf(" xmlns:" MS_INSPIRE_COMMON_NAMESPACE_PREFIX "=\"" MS_INSPIRE_COMMON_NAMESPACE_URI "\"" " xmlns:" MS_INSPIRE_VS_NAMESPACE_PREFIX "=\"" MS_INSPIRE_VS_NAMESPACE_URI "\"" ); } msIO_printf(" xsi:schemaLocation=\"http://www.opengis.net/wms %s/wms/%s/capabilities_1_3_0.xsd " " http://www.opengis.net/sld %s/sld/1.1.0/sld_capabilities.xsd ", msOWSGetSchemasLocation(map), pszVersion, msOWSGetSchemasLocation(map)); if ( msOWSLookupMetadata(&(map->web.metadata), "MO", "inspire_capabilities") ) { char* inspireschemalocation = msEncodeHTMLEntities( msOWSGetInspireSchemasLocation(map) ); msIO_printf(" " MS_INSPIRE_VS_NAMESPACE_URI " " " %s%s", inspireschemalocation, MS_INSPIRE_VS_SCHEMA_LOCATION); free(inspireschemalocation); } msIO_printf(" http://mapserver.gis.umn.edu/mapserver %sservice=WMS&amp;version=1.3.0&amp;request=GetSchemaExtension\"", script_url_encoded); } msIO_printf(">\n"); /* Report MapServer Version Information */ msIO_printf("\n<!-- %s -->\n\n", msGetVersion()); /* WMS definition */ msIO_printf("<Service>\n"); /* Service name is defined by the spec and changed at v1.0.0 */ if (nVersion <= OWS_1_0_7) msIO_printf(" <Name>GetMap</Name>\n"); /* v 1.0.0 to 1.0.7 */ else if (nVersion > OWS_1_0_7 && nVersion < OWS_1_3_0) msIO_printf(" <Name>OGC:WMS</Name>\n"); /* v 1.1.0 to 1.1.1*/ else msIO_printf(" <Name>WMS</Name>\n"); /* v 1.3.0+ */ /* the majority of this section is dependent on appropriately named metadata in the WEB object */ msOWSPrintEncodeMetadata2(stdout, &(map->web.metadata), "MO", "title", OWS_WARN, " <Title>%s</Title>\n", map->name, validated_language.c_str()); msOWSPrintEncodeMetadata2(stdout, &(map->web.metadata), "MO", "abstract", OWS_NOERR, " <Abstract>%s</Abstract>\n", NULL, validated_language.c_str()); msWMSPrintKeywordlist(stdout, " ", "keywordlist", &(map->web.metadata), "MO", nVersion); /* Service/onlineresource */ /* Defaults to same as request onlineresource if wms_service_onlineresource */ /* is not set. */ if (nVersion== OWS_1_0_0) msOWSPrintEncodeMetadata(stdout, &(map->web.metadata), "MO", "service_onlineresource", OWS_NOERR, " <OnlineResource>%s</OnlineResource>\n", script_url_encoded); else msOWSPrintEncodeMetadata(stdout, &(map->web.metadata), "MO", "service_onlineresource", OWS_NOERR, " <OnlineResource xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"%s\"/>\n", script_url_encoded); /* contact information is a required element in 1.0.7 but the */ /* sub-elements such as ContactPersonPrimary, etc. are not! */ /* In 1.1.0, ContactInformation becomes optional. */ msOWSPrintContactInfo(stdout, " ", nVersion, &(map->web.metadata), "MO"); msOWSPrintEncodeMetadata(stdout, &(map->web.metadata), "MO", "fees", OWS_NOERR, " <Fees>%s</Fees>\n", NULL); msOWSPrintEncodeMetadata(stdout, &(map->web.metadata), "MO", "accessconstraints", OWS_NOERR, " <AccessConstraints>%s</AccessConstraints>\n", NULL); if (nVersion >= OWS_1_3_0) { const char* layerlimit = msOWSLookupMetadata(&(map->web.metadata), "MO", "layerlimit"); if (layerlimit) { msIO_printf(" <LayerLimit>%s</LayerLimit>\n", layerlimit); } msIO_printf(" <MaxWidth>%d</MaxWidth>\n", map->maxsize); msIO_printf(" <MaxHeight>%d</MaxHeight>\n", map->maxsize); } msIO_printf("</Service>\n\n"); /* WMS capabilities definitions */ msIO_printf("<Capability>\n"); msIO_printf(" <Request>\n"); if (nVersion <= OWS_1_0_7) { /* WMS 1.0.0 to 1.0.7 - We don't try to use outputformats list here for now */ if (msOWSRequestIsEnabled(map, NULL, "M", "GetMap", MS_FALSE)) msWMSPrintRequestCap(nVersion, "Map", script_url_encoded, "" #if defined USE_PNG "<PNG />" #endif #if defined USE_JPEG "<JPEG />" #endif "<SVG />" , NULL); if (msOWSRequestIsEnabled(map, NULL, "M", "GetCapabilities", MS_TRUE)) msWMSPrintRequestCap(nVersion, "Capabilities", script_url_encoded, "<WMS_XML />", NULL); if (msOWSRequestIsEnabled(map, NULL, "M", "GetFeatureInfo", MS_FALSE)) msWMSPrintRequestCap(nVersion, "FeatureInfo", script_url_encoded, "<MIME /><GML.1 />", NULL); } else { const char *mime_list[20]; int mime_count = 0; int max_mime = 20; /* WMS 1.1.0 and later */ /* Note changes to the request names, their ordering, and to the formats */ if (msOWSRequestIsEnabled(map, NULL, "M", "GetCapabilities", MS_TRUE)) { if (nVersion >= OWS_1_3_0) msWMSPrintRequestCap(nVersion, "GetCapabilities", script_url_encoded, "text/xml", NULL); else msWMSPrintRequestCap(nVersion, "GetCapabilities", script_url_encoded, "application/vnd.ogc.wms_xml", NULL); } msGetOutputFormatMimeListWMS(map,mime_list,sizeof(mime_list)/sizeof(char*)); if (msOWSRequestIsEnabled(map, NULL, "M", "GetMap", MS_FALSE)) msWMSPrintRequestCap(nVersion, "GetMap", script_url_encoded, mime_list[0], mime_list[1], mime_list[2], mime_list[3], mime_list[4], mime_list[5], mime_list[6], mime_list[7], mime_list[8], mime_list[9], mime_list[10], mime_list[11], mime_list[12], mime_list[13], mime_list[14], mime_list[15], mime_list[16], mime_list[17], mime_list[18], mime_list[19], NULL ); const char* format_list = msOWSLookupMetadata(&(map->web.metadata), "M", "getfeatureinfo_formatlist"); /*feature_info_mime_type depricated for MapServer 6.0*/ if (!format_list) format_list = msOWSLookupMetadata(&(map->web.metadata), "MO", "feature_info_mime_type"); if (format_list && strlen(format_list) > 0) { auto tokens = msStringSplit(format_list, ','); for(auto& token: tokens) { msStringTrim(token); /*text plain and gml do not need to be a format and accepted by default*/ /*can not really validate since the old way of using template with wei->header, layer->template ... should be kept*/ if (!token.empty() && mime_count<max_mime) mime_list[mime_count++] = token.c_str(); } /*add text/plain and gml */ if (strcasestr(format_list, "GML") == 0 && strcasestr(format_list, "application/vnd.ogc.gml") == 0) { if (mime_count<max_mime) mime_list[mime_count++] = "application/vnd.ogc.gml"; } if (strcasestr(format_list, "text/plain") == 0 && strcasestr(format_list, "MIME") == 0) { if (mime_count<max_mime) mime_list[mime_count++] = "text/plain"; else /*force always this format*/ mime_list[max_mime-1] = "text/plain"; } if (msOWSRequestIsEnabled(map, NULL, "M", "GetFeatureInfo", MS_FALSE)) { if (mime_count>0) { if (mime_count<max_mime) mime_list[mime_count] = NULL; msWMSPrintRequestCap(nVersion, "GetFeatureInfo", script_url_encoded, mime_list[0], mime_list[1], mime_list[2], mime_list[3], mime_list[4], mime_list[5], mime_list[6], mime_list[7], mime_list[8], mime_list[9], mime_list[10], mime_list[11], mime_list[12], mime_list[13], mime_list[14], mime_list[15], mime_list[16], mime_list[17], mime_list[18], mime_list[19], NULL); } /*if all formats given are invalid go to default*/ else msWMSPrintRequestCap(nVersion, "GetFeatureInfo", script_url_encoded, "text/plain", "application/vnd.ogc.gml", NULL); } } else { if (msOWSRequestIsEnabled(map, NULL, "M", "GetFeatureInfo", MS_FALSE)) msWMSPrintRequestCap(nVersion, "GetFeatureInfo", script_url_encoded, "text/plain", "application/vnd.ogc.gml", NULL); } if (strcasecmp(sldenabled, "true") == 0) { if (msOWSRequestIsEnabled(map, NULL, "M", "DescribeLayer", MS_FALSE)) { if (nVersion == OWS_1_3_0) msWMSPrintRequestCap(nVersion, "sld:DescribeLayer", script_url_encoded, "text/xml", NULL); else msWMSPrintRequestCap(nVersion, "DescribeLayer", script_url_encoded, "text/xml", NULL); } msGetOutputFormatMimeListImg(map,mime_list,sizeof(mime_list)/sizeof(char*)); if (nVersion >= OWS_1_1_1) { if (nVersion == OWS_1_3_0) { if (msOWSRequestIsEnabled(map, NULL, "M", "GetLegendGraphic", MS_FALSE)) msWMSPrintRequestCap(nVersion, "sld:GetLegendGraphic", script_url_encoded, mime_list[0], mime_list[1], mime_list[2], mime_list[3], mime_list[4], mime_list[5], mime_list[6], mime_list[7], mime_list[8], mime_list[9], mime_list[10], mime_list[11], mime_list[12], mime_list[13], mime_list[14], mime_list[15], mime_list[16], mime_list[17], mime_list[18], mime_list[19], NULL ); if (msOWSRequestIsEnabled(map, NULL, "M", "GetStyles", MS_FALSE)) msWMSPrintRequestCap(nVersion, "ms:GetStyles", script_url_encoded, "text/xml", NULL); } else { if (msOWSRequestIsEnabled(map, NULL, "M", "GetLegendGraphic", MS_FALSE)) msWMSPrintRequestCap(nVersion, "GetLegendGraphic", script_url_encoded, mime_list[0], mime_list[1], mime_list[2], mime_list[3], mime_list[4], mime_list[5], mime_list[6], mime_list[7], mime_list[8], mime_list[9], mime_list[10], mime_list[11], mime_list[12], mime_list[13], mime_list[14], mime_list[15], mime_list[16], mime_list[17], mime_list[18], mime_list[19], NULL ); if (msOWSRequestIsEnabled(map, NULL, "M", "GetStyles", MS_FALSE)) msWMSPrintRequestCap(nVersion, "GetStyles", script_url_encoded, "text/xml", NULL); } } } } msIO_printf(" </Request>\n"); msIO_printf(" <Exception>\n"); if (nVersion <= OWS_1_0_7) msIO_printf(" <Format><BLANK /><INIMAGE /><WMS_XML /></Format>\n"); else if (nVersion <= OWS_1_1_1) { msIO_printf(" <Format>application/vnd.ogc.se_xml</Format>\n"); msIO_printf(" <Format>application/vnd.ogc.se_inimage</Format>\n"); msIO_printf(" <Format>application/vnd.ogc.se_blank</Format>\n"); } else { /*>=1.3.0*/ msIO_printf(" <Format>XML</Format>\n"); msIO_printf(" <Format>INIMAGE</Format>\n"); msIO_printf(" <Format>BLANK</Format>\n"); } msIO_printf(" </Exception>\n"); if (nVersion != OWS_1_3_0) { /* INSPIRE extended capabilities for WMS 1.1.1 */ if (nVersion == OWS_1_1_1 && msOWSLookupMetadata(&(map->web.metadata), "MO", "inspire_capabilities") ) { msIO_printf(" <VendorSpecificCapabilities>\n"); msOWSPrintInspireCommonExtendedCapabilities(stdout, map, "MO", OWS_WARN, "inspire_vs:ExtendedCapabilities", NULL, validated_language.c_str(), OWS_WMS); msIO_printf(" </VendorSpecificCapabilities>\n"); } else { msIO_printf(" <VendorSpecificCapabilities />\n"); /* nothing yet */ } } /* SLD support */ if (strcasecmp(sldenabled, "true") == 0) { if (nVersion >= OWS_1_0_7) { if (nVersion >= OWS_1_3_0) msIO_printf(" <sld:UserDefinedSymbolization SupportSLD=\"1\" UserLayer=\"0\" UserStyle=\"1\" RemoteWFS=\"0\" InlineFeature=\"0\" RemoteWCS=\"0\"/>\n"); else msIO_printf(" <UserDefinedSymbolization SupportSLD=\"1\" UserLayer=\"0\" UserStyle=\"1\" RemoteWFS=\"0\"/>\n"); } } /* INSPIRE extended capabilities for WMS 1.3.0 */ if (nVersion >= OWS_1_3_0 && msOWSLookupMetadata(&(map->web.metadata), "MO", "inspire_capabilities") ) { msOWSPrintInspireCommonExtendedCapabilities(stdout, map, "MO", OWS_WARN, "inspire_vs:ExtendedCapabilities", NULL, validated_language.c_str(), OWS_WMS); } /* Top-level layer with map extents and SRS, encloses all map layers */ /* Output only if at least one layers is enabled. */ if (ows_request->numlayers == 0) { msIO_fprintf(stdout, " <!-- WARNING: No WMS layers are enabled. Check wms/ows_enable_request settings. -->\n"); } else { int root_is_queryable = MS_FALSE; const char* rootlayer_name = msOWSLookupMetadata(&(map->web.metadata), "MO", "rootlayer_name"); /* Root layer is queryable if it has a valid name and at list one layer */ /* is queryable */ if( !rootlayer_name || strlen(rootlayer_name) > 0 ) { int j; for(j=0; j<map->numlayers; j++) { layerObj* layer = GET_LAYER(map, j); if( msIsLayerQueryable(layer) && msIntegerInArray(layer->index, ows_request->enabled_layers, ows_request->numlayers) ) { root_is_queryable = MS_TRUE; break; } } } msIO_printf(" <Layer%s>\n",root_is_queryable ? " queryable=\"1\"" : ""); /* Layer Name is optional but title is mandatory. */ if (map->name && strlen(map->name) > 0 && (msIsXMLTagValid(map->name) == MS_FALSE || isdigit(map->name[0]))) msIO_fprintf(stdout, "<!-- WARNING: The layer name '%s' might contain spaces or " "invalid characters or may start with a number. This could lead to potential problems. -->\n", map->name); if (rootlayer_name) { if (strlen(rootlayer_name) > 0) { msOWSPrintEncodeMetadata(stdout, &(map->web.metadata), "MO", "rootlayer_name", OWS_NOERR, " <Name>%s</Name>\n", NULL); } } else { msOWSPrintEncodeParam(stdout, "MAP.NAME", map->name, OWS_NOERR, " <Name>%s</Name>\n", NULL); } if (msOWSLookupMetadataWithLanguage(&(map->web.metadata), "MO", "rootlayer_title", validated_language.c_str())) msOWSPrintEncodeMetadata2(stdout, &(map->web.metadata), "MO", "rootlayer_title", OWS_WARN, " <Title>%s</Title>\n", map->name, validated_language.c_str()); else msOWSPrintEncodeMetadata2(stdout, &(map->web.metadata), "MO", "title", OWS_WARN, " <Title>%s</Title>\n", map->name, validated_language.c_str()); if (msOWSLookupMetadataWithLanguage(&(map->web.metadata), "MO", "rootlayer_abstract", validated_language.c_str())) msOWSPrintEncodeMetadata2(stdout, &(map->web.metadata), "MO", "rootlayer_abstract", OWS_NOERR, " <Abstract>%s</Abstract>\n", map->name, validated_language.c_str()); else msOWSPrintEncodeMetadata2(stdout, &(map->web.metadata), "MO", "abstract", OWS_NOERR, " <Abstract>%s</Abstract>\n", map->name, validated_language.c_str()); const char* pszTmp; if (msOWSLookupMetadata(&(map->web.metadata), "MO", "rootlayer_keywordlist") || msOWSLookupMetadata(&(map->web.metadata), "MO", "rootlayer_keywordlist_vocabulary")) pszTmp = "rootlayer_keywordlist"; else pszTmp = "keywordlist"; msWMSPrintKeywordlist(stdout, " ", pszTmp, &(map->web.metadata), "MO", nVersion); /* According to normative comments in the 1.0.7 DTD, the root layer's SRS tag */ /* is REQUIRED. It also suggests that we use an empty SRS element if there */ /* is no common SRS. */ char *pszMapEPSG; msOWSGetEPSGProj(&(map->projection), &(map->web.metadata), "MO", MS_FALSE, &pszMapEPSG); if (nVersion > OWS_1_1_0) { /* starting 1.1.1 SRS are given in individual tags */ if (nVersion >= OWS_1_3_0) { msOWSPrintEncodeParamList(stdout, "(at least one of) " "MAP.PROJECTION, LAYER.PROJECTION " "or wms_srs metadata", pszMapEPSG, OWS_WARN, ' ', NULL, NULL, " <CRS>%s</CRS>\n", ""); } else { msOWSPrintEncodeParamList(stdout, "(at least one of) " "MAP.PROJECTION, LAYER.PROJECTION " "or wms_srs metadata", pszMapEPSG, OWS_WARN, ' ', NULL, NULL, " <SRS>%s</SRS>\n", ""); } } else { /* If map has no proj then every layer MUST have one or produce a warning */ msOWSPrintEncodeParam(stdout, "MAP.PROJECTION (or wms_srs metadata)", pszMapEPSG, OWS_WARN, " <SRS>%s</SRS>\n", ""); } msFree(pszMapEPSG); if (nVersion >= OWS_1_3_0) msOWSPrintEX_GeographicBoundingBox(stdout, " ", &(map->extent), &(map->projection)); else msOWSPrintLatLonBoundingBox(stdout, " ", &(map->extent), &(map->projection), NULL, OWS_WMS); msOWSPrintBoundingBox( stdout, " ", &(map->extent), &(map->projection), NULL, &(map->web.metadata), "MO", nVersion); if (nVersion >= OWS_1_0_7) { msWMSPrintAttribution(stdout, " ", &(map->web.metadata), "MO"); } /* AuthorityURL support and Identifier support, only available >= WMS 1.1.0 */ if(nVersion >= OWS_1_1_0) { msWMSPrintAuthorityURL(stdout, " ", &(map->web.metadata), "MO"); msWMSPrintIdentifier(stdout, " ", &(map->web.metadata), "MO"); } /* MetadataURL */ if(nVersion >= OWS_1_1_0) msOWSPrintURLType(stdout, &(map->web.metadata), "MO", "metadataurl", OWS_NOERR, NULL, "MetadataURL", " type=\"%s\"", NULL, NULL, ">\n <Format>%s</Format", "\n <OnlineResource xmlns:xlink=\"" "http://www.w3.org/1999/xlink\" " "xlink:type=\"simple\" xlink:href=\"%s\"/>\n ", MS_TRUE, MS_FALSE, MS_FALSE, MS_TRUE, MS_TRUE, NULL, NULL, NULL, NULL, NULL, " "); /* DataURL */ if(nVersion < OWS_1_1_0) msOWSPrintEncodeMetadata(stdout, &(map->web.metadata), "MO", "dataurl_href", OWS_NOERR, " <DataURL>%s</DataURL>\n", NULL); else msOWSPrintURLType(stdout, &(map->web.metadata), "MO", "dataurl", OWS_NOERR, NULL, "DataURL", NULL, NULL, NULL, ">\n <Format>%s</Format", "\n <OnlineResource xmlns:xlink=\"" "http://www.w3.org/1999/xlink\" " "xlink:type=\"simple\" xlink:href=\"%s\"/>\n ", MS_FALSE, MS_FALSE, MS_FALSE, MS_TRUE, MS_TRUE, NULL, NULL, NULL, NULL, NULL, " "); if (map->name && strlen(map->name) > 0 && msOWSLookupMetadata(&(map->web.metadata), "MO", "inspire_capabilities") ) { char *pszEncodedName = NULL; const char *styleName = NULL; char *pszEncodedStyleName = NULL; const char *legendURL = NULL; pszEncodedName = msEncodeHTMLEntities(map->name); styleName = msOWSLookupMetadata(&(map->web.metadata), "MO", "style_name"); if (styleName == NULL) styleName = "default"; pszEncodedStyleName = msEncodeHTMLEntities(styleName); msIO_fprintf(stdout, " <Style>\n"); msIO_fprintf(stdout, " <Name>%s</Name>\n", pszEncodedStyleName); msOWSPrintEncodeMetadata2(stdout, &(map->web.metadata), "MO", "style_title", OWS_NOERR, " <Title>%s</Title>\n", styleName, validated_language.c_str()); legendURL = msOWSLookupMetadata(&(map->web.metadata), "MO", "style_legendurl_href"); if (legendURL) { msOWSPrintURLType(stdout, &(map->web.metadata), "MO", "style_legendurl", OWS_NOERR, NULL, "LegendURL", NULL, " width=\"%s\"", " height=\"%s\"", ">\n <Format>%s</Format", "\n <OnlineResource " "xmlns:xlink=\"http://www.w3.org/1999/xlink\"" " xlink:type=\"simple\" xlink:href=\"%s\"/>\n" " ", MS_FALSE, MS_TRUE, MS_TRUE, MS_TRUE, MS_TRUE, NULL, NULL, NULL, NULL, NULL, " "); } else { std::vector<int> group_layers; group_layers.reserve(map->numlayers); for(int i=0; i<map->numlayers; i++) if (msIntegerInArray(GET_LAYER(map, i)->index, ows_request->enabled_layers, ows_request->numlayers)) group_layers.push_back(i); if (!group_layers.empty()) { int size_x=0, size_y=0; if (msLegendCalcSize(map, 1, &size_x, &size_y, group_layers.data(), static_cast<int>(group_layers.size()), NULL, 1) == MS_SUCCESS) { const std::string width(std::to_string(size_x)); const std::string height(std::to_string(size_y)); const char* format_list = msOWSLookupMetadata(&(map->web.metadata), "M", "getlegendgraphic_formatlist"); char *pszMimetype = NULL; if (format_list && strlen(format_list) > 0) { const auto tokens = msStringSplit(format_list, ','); if (!tokens.empty()) { /*just grab the first mime type*/ pszMimetype = msEncodeHTMLEntities(tokens[0].c_str()); } } else pszMimetype = msEncodeHTMLEntities("image/png"); std::string legendurl(script_url_encoded); legendurl += "version="; char szVersionBuf[OWS_VERSION_MAXLEN]; legendurl += msOWSGetVersionString(nVersion, szVersionBuf); legendurl += "&amp;service=WMS&amp;request=GetLegendGraphic&amp;"; if (nVersion >= OWS_1_3_0) { legendurl += "sld_version=1.1.0&amp;layer="; } else { legendurl += "layer="; } legendurl += pszEncodedName; legendurl += "&amp;format="; legendurl += pszMimetype; legendurl += "&amp;STYLE="; legendurl += pszEncodedStyleName; msOWSPrintURLType(stdout, NULL, "O", "ttt", OWS_NOERR, NULL, "LegendURL", NULL, " width=\"%s\"", " height=\"%s\"", ">\n <Format>%s</Format", "\n <OnlineResource " "xmlns:xlink=\"http://www.w3.org/1999/xlink\"" " xlink:type=\"simple\" xlink:href=\"%s\"/>\n" " ", MS_FALSE, MS_FALSE, MS_FALSE, MS_FALSE, MS_FALSE, NULL, width.c_str(), height.c_str(), pszMimetype, legendurl.c_str(), " "); msFree(pszMimetype); } } } msIO_fprintf(stdout, " </Style>\n"); msFree(pszEncodedName); msFree(pszEncodedStyleName); } if (nVersion < OWS_1_3_0) msWMSPrintScaleHint(" ", map->web.minscaledenom, map->web.maxscaledenom, map->resolution); else msWMSPrintScaleDenominator(" ", map->web.minscaledenom, map->web.maxscaledenom); /* */ /* Dump list of layers organized by groups. Layers with no group are listed */ /* individually, at the same level as the groups in the layer hierarchy */ /* */ if (map->numlayers) { char ***nestedGroups = NULL; int *numNestedGroups = NULL; int *isUsedInNestedGroup = NULL; /* We'll use this array of booleans to track which layer/group have been */ /* processed already */ std::vector<char> pabLayerProcessed(map->numlayers); /* Mark disabled layers as processed to prevent from being displayed in nested groups (#4533)*/ for(int i=0; i<map->numlayers; i++) { if (!msIntegerInArray(GET_LAYER(map, i)->index, ows_request->enabled_layers, ows_request->numlayers)) pabLayerProcessed[i] = 1; } nestedGroups = (char***)msSmallCalloc(map->numlayers, sizeof(char**)); numNestedGroups = (int*)msSmallCalloc(map->numlayers, sizeof(int)); isUsedInNestedGroup = (int*)msSmallCalloc(map->numlayers, sizeof(int)); msWMSPrepareNestedGroups(map, nVersion, nestedGroups, numNestedGroups, isUsedInNestedGroup); for(int i=0; i<map->numlayers; i++) { layerObj *lp = (GET_LAYER(map, i)); if (pabLayerProcessed[i] || (lp->status == MS_DELETE)) continue; /* Layer is hidden or has already been handled */ if (numNestedGroups[i] > 0) { /* Has nested groups. */ msWMSPrintNestedGroups(map, nVersion, pabLayerProcessed.data(), i, 0, nestedGroups, numNestedGroups, isUsedInNestedGroup, script_url_encoded, validated_language.c_str()); } else if (lp->group == NULL || strlen(lp->group) == 0) { /* Don't dump layer if it is used in wms_group_layer. */ if (!isUsedInNestedGroup[i]) { /* This layer is not part of a group... dump it directly */ msDumpLayer(map, lp, nVersion, script_url_encoded, "", validated_language.c_str(), MS_FALSE, MS_FALSE); pabLayerProcessed[i] = 1; } } else { bool group_is_queryable = false; /* Group is queryable as soon as its member layers is. */ for(int j=i; j<map->numlayers; j++) { if (GET_LAYER(map, j)->group && strcmp(lp->group, GET_LAYER(map, j)->group) == 0 && msIntegerInArray(GET_LAYER(map, j)->index, ows_request->enabled_layers, ows_request->numlayers) && msIsLayerQueryable(GET_LAYER(map, j)) ) { group_is_queryable = true; break; } } /* Beginning of a new group... enclose the group in a layer block */ msIO_printf(" <Layer%s>\n", group_is_queryable ? " queryable=\"1\"" : ""); /* Layer Name is optional but title is mandatory. */ if (lp->group && strlen(lp->group) > 0 && (msIsXMLTagValid(lp->group) == MS_FALSE || isdigit(lp->group[0]))) msIO_fprintf(stdout, "<!-- WARNING: The layer name '%s' might contain spaces or " "invalid characters or may start with a number. This could lead to potential problems. -->\n", lp->group); msOWSPrintEncodeParam(stdout, "GROUP.NAME", lp->group, OWS_NOERR, " <Name>%s</Name>\n", NULL); msOWSPrintGroupMetadata2(stdout, map, lp->group, "MO", "GROUP_TITLE", OWS_WARN, " <Title>%s</Title>\n", lp->group, validated_language.c_str()); msOWSPrintGroupMetadata2(stdout, map, lp->group, "MO", "GROUP_ABSTRACT", OWS_NOERR, " <Abstract>%s</Abstract>\n", lp->group, validated_language.c_str()); /*build a getlegendgraphicurl*/ if( script_url_encoded) { if (lp->group && strlen(lp->group) > 0) { char *pszEncodedName = NULL; const char *styleName = NULL; char *pszEncodedStyleName = NULL; const char *legendURL = NULL; pszEncodedName = msEncodeHTMLEntities(lp->group); styleName = msOWSLookupMetadata(&(lp->metadata), "MO", "group_style_name"); if (styleName == NULL) styleName = "default"; pszEncodedStyleName = msEncodeHTMLEntities(styleName); msIO_fprintf(stdout, " <Style>\n"); msIO_fprintf(stdout, " <Name>%s</Name>\n", pszEncodedStyleName); msOWSPrintEncodeMetadata(stdout, &(lp->metadata), "MO", "group_style_title", OWS_NOERR, " <Title>%s</Title>\n", styleName); legendURL = msOWSLookupMetadata(&(lp->metadata), "MO", "group_style_legendurl_href"); if (legendURL) { msOWSPrintURLType(stdout, &(lp->metadata), "MO", "group_style_legendurl", OWS_NOERR, NULL, "LegendURL", NULL, " width=\"%s\"", " height=\"%s\"", ">\n <Format>%s</Format", "\n <OnlineResource " "xmlns:xlink=\"http://www.w3.org/1999/xlink\"" " xlink:type=\"simple\" xlink:href=\"%s\"/>\n" " ", MS_FALSE, MS_TRUE, MS_TRUE, MS_TRUE, MS_TRUE, NULL, NULL, NULL, NULL, NULL, " "); } else { std::vector<int> group_layers; group_layers.reserve(map->numlayers); for(int j=i; j<map->numlayers; j++) if (!pabLayerProcessed[j] && GET_LAYER(map, j)->group && strcmp(lp->group, GET_LAYER(map, j)->group) == 0 && msIntegerInArray(GET_LAYER(map, j)->index, ows_request->enabled_layers, ows_request->numlayers)) group_layers.push_back(j); if (!group_layers.empty()) { int size_x=0, size_y=0; char *pszMimetype = NULL; if (msLegendCalcSize(map, 1, &size_x, &size_y, group_layers.data(), static_cast<int>(group_layers.size()), NULL, 1) == MS_SUCCESS) { const std::string width(std::to_string(size_x)); const std::string height(std::to_string(size_y)); const char* format_list = msOWSLookupMetadata(&(map->web.metadata), "M", "getlegendgraphic_formatlist"); if (format_list && strlen(format_list) > 0) { const auto tokens = msStringSplit(format_list, ','); if (!tokens.empty()) { /*just grab the first mime type*/ pszMimetype = msEncodeHTMLEntities(tokens[0].c_str()); } } else pszMimetype = msEncodeHTMLEntities("image/png"); std::string legendurl(script_url_encoded); legendurl += "version="; char szVersionBuf[OWS_VERSION_MAXLEN]; legendurl += msOWSGetVersionString(nVersion, szVersionBuf); legendurl += "&amp;service=WMS&amp;request=GetLegendGraphic&amp;"; if (nVersion >= OWS_1_3_0) { legendurl += "sld_version=1.1.0&amp;layer="; } else { legendurl += "layer="; } legendurl += pszEncodedName; legendurl += "&amp;format="; legendurl += pszMimetype; legendurl += "&amp;STYLE="; legendurl += pszEncodedStyleName; msOWSPrintURLType(stdout, NULL, "O", "ttt", OWS_NOERR, NULL, "LegendURL", NULL, " width=\"%s\"", " height=\"%s\"", ">\n <Format>%s</Format", "\n <OnlineResource " "xmlns:xlink=\"http://www.w3.org/1999/xlink\"" " xlink:type=\"simple\" xlink:href=\"%s\"/>\n" " ", MS_FALSE, MS_FALSE, MS_FALSE, MS_FALSE, MS_FALSE, NULL, width.c_str(), height.c_str(), pszMimetype, legendurl.c_str(), " "); msFree(pszMimetype); } } } msIO_fprintf(stdout, " </Style>\n"); msFree(pszEncodedName); msFree(pszEncodedStyleName); } } /* Dump all layers for this group */ for(int j=i; j<map->numlayers; j++) { if (!pabLayerProcessed[j] && GET_LAYER(map, j)->group && strcmp(lp->group, GET_LAYER(map, j)->group) == 0 && msIntegerInArray(GET_LAYER(map, j)->index, ows_request->enabled_layers, ows_request->numlayers)) { msDumpLayer(map, (GET_LAYER(map, j)), nVersion, script_url_encoded, " ", validated_language.c_str(), MS_FALSE, MS_FALSE); pabLayerProcessed[j] = 1; } } /* Close group layer block */ msIO_printf(" </Layer>\n"); } } /* free the stuff used for nested layers */ for (int i = 0; i < map->numlayers; i++) { if (numNestedGroups[i] > 0) { msFreeCharArray(nestedGroups[i], numNestedGroups[i]); } } free(nestedGroups); free(numNestedGroups); free(isUsedInNestedGroup); } msIO_printf(" </Layer>\n"); } msIO_printf("</Capability>\n"); if ( nVersion >= OWS_1_3_0) msIO_printf("</WMS_Capabilities>\n"); else msIO_printf("</WMT_MS_Capabilities>\n"); free(script_url_encoded); return(MS_SUCCESS); } /* * This function look for params that can be used * by mapserv when generating template. */ int msTranslateWMS2Mapserv(const char **names, const char **values, int numentries, char ***translated_names, char ***translated_values, int *translated_numentries) { int num_allocated = numentries; *translated_names = (char**)msSmallMalloc(num_allocated * sizeof(char*)); *translated_values = (char**)msSmallMalloc(num_allocated * sizeof(char*)); *translated_numentries = 0; for (int i=0; i<numentries; i++) { (*translated_values)[*translated_numentries] = msStrdup(values[i]); (*translated_names)[*translated_numentries] = msStrdup(names[i]); (*translated_numentries)++; if (strcasecmp("X", names[i]) == 0) { num_allocated++; *translated_names = (char**)msSmallRealloc(*translated_names, num_allocated * sizeof(char*)); *translated_values = (char**)msSmallRealloc(*translated_values, num_allocated * sizeof(char*)); (*translated_values)[*translated_numentries] = msStrdup(values[i]); (*translated_names)[*translated_numentries] = msStrdup("img.x"); (*translated_numentries)++; } else if (strcasecmp("Y", names[i]) == 0) { num_allocated++; *translated_names = (char**)msSmallRealloc(*translated_names, num_allocated * sizeof(char*)); *translated_values = (char**)msSmallRealloc(*translated_values, num_allocated * sizeof(char*)); (*translated_values)[*translated_numentries] = msStrdup(values[i]); (*translated_names)[*translated_numentries] = msStrdup("img.y"); (*translated_numentries)++; } else if (strcasecmp("LAYERS", names[i]) == 0) { char **layers; int tok; int j; layers = msStringSplit(values[i], ',', &tok); num_allocated += tok; *translated_names = (char**)msSmallRealloc(*translated_names, num_allocated * sizeof(char*)); *translated_values = (char**)msSmallRealloc(*translated_values, num_allocated * sizeof(char*)); for (j=0; j<tok; j++) { (*translated_values)[*translated_numentries] = layers[j]; (*translated_names)[*translated_numentries] = msStrdup("layer"); (*translated_numentries)++; layers[j] = NULL; } free(layers); } else if (strcasecmp("QUERY_LAYERS", names[i]) == 0) { char **layers; int tok; int j; layers = msStringSplit(values[i], ',', &tok); num_allocated += tok; *translated_names = (char**)msSmallRealloc(*translated_names, num_allocated * sizeof(char*)); *translated_values = (char**)msSmallRealloc(*translated_values, num_allocated * sizeof(char*)); for (j=0; j<tok; j++) { (*translated_values)[*translated_numentries] = layers[j]; (*translated_names)[*translated_numentries] = msStrdup("qlayer"); (*translated_numentries)++; layers[j] = NULL; } free(layers); } else if (strcasecmp("BBOX", names[i]) == 0) { char *imgext; num_allocated++; *translated_names = (char**)msSmallRealloc(*translated_names, num_allocated * sizeof(char*)); *translated_values = (char**)msSmallRealloc(*translated_values, num_allocated * sizeof(char*)); /* Note msReplaceSubstring() works on the string itself, so we need to make a copy */ imgext = msStrdup(values[i]); imgext = msReplaceSubstring(imgext, ",", " "); (*translated_values)[*translated_numentries] = imgext; (*translated_names)[*translated_numentries] = msStrdup("imgext"); (*translated_numentries)++; } } return MS_SUCCESS; } /* ** msWMSGetMap() */ static int msWMSGetMap(mapObj *map, int nVersion, char **names, char **values, int numentries, const char *wms_exception_format, owsRequestObj *ows_request) { imageObj *img; int sldrequested = MS_FALSE, sldspatialfilter = MS_FALSE; int drawquerymap = MS_FALSE; /* __TODO__ msDrawMap() will try to adjust the extent of the map */ /* to match the width/height image ratio. */ /* The spec states that this should not happen so that we can deliver */ /* maps to devices with non-square pixels. */ /* If there was an SLD in the request, we need to treat it */ /* diffrently : some SLD may contain spatial filters requiring */ /* to do a query. While parsing the SLD and applying it to the */ /* layer, we added a temporary metadata on the layer */ /* (tmp_wms_sld_query) for layers with a spatial filter. */ for (int i=0; i<numentries; i++) { if ((strcasecmp(names[i], "SLD") == 0 && values[i] && strlen(values[i]) > 0) || (strcasecmp(names[i], "SLD_BODY") == 0 && values[i] && strlen(values[i]) > 0)) { sldrequested = MS_TRUE; break; } } if (sldrequested) { for (int i=0; i<map->numlayers; i++) { if (msLookupHashTable(&(GET_LAYER(map, i)->metadata), "tmp_wms_sld_query")) { sldspatialfilter = MS_TRUE; break; } } } /* If FILTER is passed then we'll render layers as querymap */ for (int i=0; i<numentries; i++) { if ((strcasecmp(names[i], "FILTER") == 0 && values[i] && strlen(values[i]) > 0)) { drawquerymap = MS_TRUE; map->querymap.status = MS_ON; map->querymap.style = MS_SELECTED; break; } } /* turn off layer if WMS GetMap is not enabled */ for (int i=0; i<map->numlayers; i++) if (!msIntegerInArray(GET_LAYER(map, i)->index, ows_request->enabled_layers, ows_request->numlayers)) GET_LAYER(map, i)->status = MS_OFF; if (sldrequested && sldspatialfilter) { /* set the quermap style so that only selected features will be retruned */ map->querymap.status = MS_ON; map->querymap.style = MS_SELECTED; img = msPrepareImage(map, MS_TRUE); /* compute layer scale factors now */ for(int i=0; i<map->numlayers; i++) { if(GET_LAYER(map, i)->sizeunits != MS_PIXELS) GET_LAYER(map, i)->scalefactor = (msInchesPerUnit(GET_LAYER(map, i)->sizeunits,0)/msInchesPerUnit(map->units,0)) / map->cellsize; else if(GET_LAYER(map, i)->symbolscaledenom > 0 && map->scaledenom > 0) GET_LAYER(map, i)->scalefactor = GET_LAYER(map, i)->symbolscaledenom/map->scaledenom; else GET_LAYER(map, i)->scalefactor = 1; } for (int i=0; i<map->numlayers; i++) { if (msLookupHashTable(&(GET_LAYER(map, i)->metadata), "tmp_wms_sld_query") && (GET_LAYER(map, i)->type == MS_LAYER_POINT || GET_LAYER(map, i)->type == MS_LAYER_LINE || GET_LAYER(map, i)->type == MS_LAYER_POLYGON || GET_LAYER(map, i)->type == MS_LAYER_TILEINDEX)) { /* make sure that there is a resultcache. If not just ignore */ /* the layer */ if (GET_LAYER(map, i)->resultcache) msDrawQueryLayer(map, GET_LAYER(map, i), img); } else IGNORE_RET_VAL(msDrawLayer(map, GET_LAYER(map, i), img)); } } else { /* intercept requests for Mapbox vector tiles */ if(!strcmp(MS_IMAGE_MIME_TYPE(map->outputformat), "application/x-protobuf")) { int status=0; if((status = msMVTWriteTile(map, MS_TRUE)) != MS_SUCCESS) return MS_FAILURE; return MS_SUCCESS; } img = msDrawMap(map, drawquerymap); } /* see if we have tiled = true and a buffer */ /* if so, clip the image */ for (int i=0; i<numentries; i++) { if (strcasecmp(names[i], "TILED") == 0 && strcasecmp(values[i], "TRUE") == 0) { hashTableObj *meta = &(map->web.metadata); const char *value; if ((value = msLookupHashTable(meta, "tile_map_edge_buffer")) != NULL) { const int map_edge_buffer = atoi(value); if ( map_edge_buffer > 0 ) { /* we have to clip the image */ // TODO: we could probably avoid the use of an intermediate image // by playing with the rasterBufferObj's data->rgb.pixels and data->rgb.row_stride values. rendererVTableObj* renderer = MS_MAP_RENDERER(map); rasterBufferObj imgBuffer; if( renderer->getRasterBufferHandle((imageObj*)img,&imgBuffer) != MS_SUCCESS ) { msFreeImage(img); return MS_FAILURE; } int width = map->width - map_edge_buffer - map_edge_buffer; int height = map->height - map_edge_buffer - map_edge_buffer; imageObj* tmp = msImageCreate( width, height, map->outputformat, NULL, NULL, map->resolution, map->defresolution, NULL); if((MS_FAILURE == renderer->mergeRasterBuffer(tmp,&imgBuffer,1.0,map_edge_buffer, map_edge_buffer,0, 0, width, height ))) { msFreeImage(tmp); msFreeImage(img); img = NULL; } else { msFreeImage(img); img = tmp; } } } break; } } if (img == NULL) return msWMSException(map, nVersion, NULL, wms_exception_format); /* Set the HTTP Cache-control headers if they are defined in the map object */ const char* http_max_age = msOWSLookupMetadata(&(map->web.metadata), "MO", "http_max_age"); if( http_max_age ) { msIO_setHeader("Cache-Control","max-age=%s", http_max_age); } if (strcasecmp(map->imagetype, "application/openlayers")!=0) { if(!strcmp(MS_IMAGE_MIME_TYPE(map->outputformat), "application/json")) { msIO_setHeader("Content-Type","application/json; charset=utf-8"); } else { msOutputFormatResolveFromImage( map, img ); msIO_setHeader("Content-Type", "%s", MS_IMAGE_MIME_TYPE(map->outputformat)); } msIO_sendHeaders(); if (msSaveImage(map, img, NULL) != MS_SUCCESS) { msFreeImage(img); return msWMSException(map, nVersion, NULL, wms_exception_format); } } msFreeImage(img); return(MS_SUCCESS); } static int msDumpResult(mapObj *map, int nVersion, const char *wms_exception_format) { int numresults=0; for(int i=0; i<map->numlayers; i++) { layerObj *lp = (GET_LAYER(map, i)); if(lp->status != MS_ON || lp->resultcache==NULL || lp->resultcache->numresults == 0) continue; /* if(msLayerOpen(lp) != MS_SUCCESS || msLayerGetItems(lp) != MS_SUCCESS) return msWMSException(map, nVersion, NULL); */ /* Use metadata to control which fields to output. We use the same * metadata names as for GML: * wms/ows_include_items: comma delimited list or keyword 'all' * wms/ows_exclude_items: comma delimited list (all items are excluded by default) */ /* get a list of items that should be excluded in output */ std::vector<std::string> incitems; const char *value; if((value = msOWSLookupMetadata(&(lp->metadata), "MO", "include_items")) != NULL) incitems = msStringSplit(value, ','); /* get a list of items that should be excluded in output */ std::vector<std::string> excitems; if((value = msOWSLookupMetadata(&(lp->metadata), "MO", "exclude_items")) != NULL) excitems = msStringSplit(value, ','); std::vector<bool> itemvisible(lp->numitems); for(int k=0; k<lp->numitems; k++) { /* check visibility, included items first... */ if(incitems.size() == 1 && strcasecmp("all", incitems[0].c_str()) == 0) { itemvisible[k] = true; } else { for( const auto& incitem: incitems ) { if(strcasecmp(lp->items[k], incitem.c_str()) == 0) itemvisible[k] = true; } } /* ...and now excluded items */ for( const auto& excitem: excitems ) { if(strcasecmp(lp->items[k], excitem.c_str()) == 0) itemvisible[k] = false; } } /* Output selected shapes for this layer */ msIO_printf("\nLayer '%s'\n", lp->name); for(int j=0; j<lp->resultcache->numresults; j++) { shapeObj shape; msInitShape(&shape); if (msLayerGetShape(lp, &shape, &(lp->resultcache->results[j])) != MS_SUCCESS) { return msWMSException(map, nVersion, NULL, wms_exception_format); } msIO_printf(" Feature %ld: \n", lp->resultcache->results[j].shapeindex); for(int k=0; k<lp->numitems; k++) { if (itemvisible[k]) { value = msOWSLookupMetadata(&(lp->metadata), "MO", (std::string(lp->items[k]) + "_alias").c_str()); const char *lineTemplate=" %s = '%s'\n"; msIO_printf(lineTemplate, value != NULL ? value : lp->items[k], shape.values[k]); } } msFreeShape(&shape); numresults++; } /* msLayerClose(lp); */ } return numresults; } /* ** msWMSFeatureInfo() */ static int msWMSFeatureInfo(mapObj *map, int nVersion, char **names, char **values, int numentries, const char *wms_exception_format, owsRequestObj *ows_request) { int feature_count=1, numlayers_found=0; pointObj point = {-1.0, -1.0, -1.0, -1.0}; const char *info_format="MIME"; errorObj *ms_error = msGetErrorObj(); int query_status=MS_NOERR; int query_layer = 0; const char *format_list=NULL; int valid_format=MS_FALSE; int format_found = MS_FALSE; int use_bbox = MS_FALSE; int wms_layer = MS_FALSE; const char *wms_connection = NULL; int numOWSLayers = 0; char*** nestedGroups = (char***)msSmallCalloc(map->numlayers, sizeof(char**)); int* numNestedGroups = (int*)msSmallCalloc(map->numlayers, sizeof(int)); int* isUsedInNestedGroup = (int*)msSmallCalloc(map->numlayers, sizeof(int)); msWMSPrepareNestedGroups(map, nVersion, nestedGroups, numNestedGroups, isUsedInNestedGroup); for(int i=0; i<numentries; i++) { if(strcasecmp(names[i], "QUERY_LAYERS") == 0) { query_layer = 1; /* flag set if QUERY_LAYERS is the request */ const auto wmslayers = msStringSplit(values[i], ','); if(wmslayers.empty()) { msSetError(MS_WMSERR, "At least one layer name required in QUERY_LAYERS.", "msWMSFeatureInfo()"); return msWMSException(map, nVersion, "LayerNotDefined", wms_exception_format); } for(int j=0; j<map->numlayers; j++) { /* Force all layers OFF by default */ GET_LAYER(map, j)->status = MS_OFF; } /* Special case for root layer */ const char* rootlayer_name = msOWSLookupMetadata(&(map->web.metadata), "MO", "rootlayer_name"); if( !rootlayer_name ) rootlayer_name = map->name; if( rootlayer_name && msStringInArray(rootlayer_name, wmslayers) ) { for(int j=0; j<map->numlayers; j++) { layerObj* layer = GET_LAYER(map, j); if( msIsLayerQueryable(layer) && msIntegerInArray(layer->index, ows_request->enabled_layers, ows_request->numlayers) ) { if (layer->connectiontype == MS_WMS) { wms_layer = MS_TRUE; wms_connection = layer->connection; } numlayers_found++; layer->status = MS_ON; } } } for(int j=0; j<map->numlayers; j++) { layerObj* layer = GET_LAYER(map, j); if( !msIsLayerQueryable(layer) ) continue; for(const auto& wmslayer: wmslayers) { if (((layer->name && strcasecmp(layer->name, wmslayer.c_str()) == 0) || (layer->group && strcasecmp(layer->group, wmslayer.c_str()) == 0) || ((numNestedGroups[j] >0) && msStringInArray(wmslayer.c_str(), nestedGroups[j], numNestedGroups[j]))) && (msIntegerInArray(layer->index, ows_request->enabled_layers, ows_request->numlayers)) ) { if (layer->connectiontype == MS_WMS) { wms_layer = MS_TRUE; wms_connection = layer->connection; } numlayers_found++; layer->status = MS_ON; } } } } else if (strcasecmp(names[i], "INFO_FORMAT") == 0) { if (values[i] && strlen(values[i]) > 0) { info_format = values[i]; format_found = MS_TRUE; } } else if (strcasecmp(names[i], "FEATURE_COUNT") == 0) feature_count = atoi(values[i]); else if(strcasecmp(names[i], "X") == 0 || strcasecmp(names[i], "I") == 0) point.x = atof(values[i]); else if (strcasecmp(names[i], "Y") == 0 || strcasecmp(names[i], "J") == 0) point.y = atof(values[i]); else if (strcasecmp(names[i], "RADIUS") == 0) { /* RADIUS in pixels. */ /* This is not part of the spec, but some servers such as cubeserv */ /* support it as a vendor-specific feature. */ /* It's easy for MapServer to handle this so let's do it! */ /* Special RADIUS value that changes the query into a bbox query */ /* based on the bbox in the request parameters. */ if( strcasecmp(values[i], "BBOX") == 0) { use_bbox = MS_TRUE; } else { int j; for(j=0; j<map->numlayers; j++) { GET_LAYER(map, j)->tolerance = atoi(values[i]); GET_LAYER(map, j)->toleranceunits = MS_PIXELS; } } } } /* free the stuff used for nested layers */ for (int i = 0; i < map->numlayers; i++) { if (numNestedGroups[i] > 0) { msFreeCharArray(nestedGroups[i], numNestedGroups[i]); } } free(nestedGroups); free(numNestedGroups); free(isUsedInNestedGroup); if(numlayers_found == 0) { if (query_layer) { msSetError(MS_WMSERR, "Layer(s) specified in QUERY_LAYERS parameter is not offered by the service instance.", "msWMSFeatureInfo()"); return msWMSException(map, nVersion, "LayerNotDefined", wms_exception_format); } else { msSetError(MS_WMSERR, "Required QUERY_LAYERS parameter missing for getFeatureInfo.", "msWMSFeatureInfo()"); return msWMSException(map, nVersion, "LayerNotDefined", wms_exception_format); } } /*make sure to initialize the map scale so that layers that are scale dependent are resepected for the query*/ msCalculateScale(map->extent,map->units,map->width,map->height, map->resolution, &map->scaledenom); /* -------------------------------------------------------------------- */ /* check if all layers selected are queryable. If not send an */ /* exception. */ /* -------------------------------------------------------------------- */ /* If a layer of type WMS was found... all layers have to be of that type and with the same connection */ for (int i=0; i<map->numlayers; i++) { if (GET_LAYER(map, i)->status == MS_ON) { if (wms_layer == MS_TRUE) { if ( (GET_LAYER(map, i)->connectiontype != MS_WMS) || (strcasecmp(wms_connection, GET_LAYER(map, i)->connection) != 0) ) { msSetError(MS_WMSERR, "Requested WMS layer(s) are not queryable: type or connection differ", "msWMSFeatureInfo()"); return msWMSException(map, nVersion, "LayerNotQueryable", wms_exception_format); } ++numOWSLayers; } } } /* It's a valid Cascading WMS GetFeatureInfo request */ if (wms_layer) return msWMSLayerExecuteRequest(map, numOWSLayers, point.x, point.y, feature_count, info_format, WMS_GETFEATUREINFO); if( use_bbox == MS_FALSE ) { if(point.x == -1.0 || point.y == -1.0) { if (nVersion >= OWS_1_3_0) msSetError(MS_WMSERR, "Required I/J parameters missing for getFeatureInfo.", "msWMSFeatureInfo()"); else msSetError(MS_WMSERR, "Required X/Y parameters missing for getFeatureInfo.", "msWMSFeatureInfo()"); return msWMSException(map, nVersion, NULL, wms_exception_format); } /*wms1.3.0: check if the points are valid*/ if (nVersion >= OWS_1_3_0) { if (point.x > map->width || point.y > map->height) { msSetError(MS_WMSERR, "Invalid I/J values", "msWMSFeatureInfo()"); return msWMSException(map, nVersion, "InvalidPoint", wms_exception_format); } } /* Perform the actual query */ const double cellx = MS_CELLSIZE(map->extent.minx, map->extent.maxx, map->width); /* note: don't adjust extent, WMS assumes incoming extent is correct */ const double celly = MS_CELLSIZE(map->extent.miny, map->extent.maxy, map->height); point.x = MS_IMAGE2MAP_X(point.x, map->extent.minx, cellx); point.y = MS_IMAGE2MAP_Y(point.y, map->extent.maxy, celly); /* WMS 1.3.0 states that feature_count is *per layer*. * Its value is a positive integer, if omitted then the default is 1 */ if (feature_count < 1) feature_count = 1; map->query.type = MS_QUERY_BY_POINT; map->query.mode = (feature_count==1?MS_QUERY_SINGLE:MS_QUERY_MULTIPLE); map->query.layer = -1; map->query.point = point; map->query.buffer = 0; map->query.maxresults = feature_count; if(msQueryByPoint(map) != MS_SUCCESS) if((query_status=ms_error->code) != MS_NOTFOUND) return msWMSException(map, nVersion, NULL, wms_exception_format); } else { /* use_bbox == MS_TRUE */ map->query.type = MS_QUERY_BY_RECT; map->query.mode = MS_QUERY_MULTIPLE; map->query.layer = -1; map->query.rect = map->extent; map->query.buffer = 0; map->query.maxresults = feature_count; if(msQueryByRect(map) != MS_SUCCESS) if((query_status=ms_error->code) != MS_NOTFOUND) return msWMSException(map, nVersion, NULL, wms_exception_format); } /*validate the INFO_FORMAT*/ valid_format = MS_FALSE; format_list = msOWSLookupMetadata(&(map->web.metadata), "M", "getfeatureinfo_formatlist"); /*feature_info_mime_type depricated for MapServer 6.0*/ if (!format_list) format_list = msOWSLookupMetadata(&(map->web.metadata), "MO", "feature_info_mime_type"); if (format_list) { /*can not really validate if it is a valid output format since old way of using template with web->header/footer and layer templates need to still be supported. We can only validate if it was part of the format list*/ if (strcasestr(format_list, info_format)) valid_format = MS_TRUE; } /*check to see if the format passed is text/plain or GML and if is defined in the formatlist. If that is the case, It is a valid format*/ if (strcasecmp(info_format, "MIME") == 0 || strcasecmp(info_format, "text/plain") == 0 || strncasecmp(info_format, "GML", 3) == 0 || strcasecmp(info_format, "application/vnd.ogc.gml") == 0) valid_format = MS_TRUE; /*last case: if the info_format is not part of the request, it defaults to MIME*/ if (!valid_format && format_found == MS_FALSE) valid_format =MS_TRUE; if (!valid_format) { msSetError(MS_WMSERR, "Unsupported INFO_FORMAT value (%s).", "msWMSFeatureInfo()", info_format); if (nVersion >= OWS_1_3_0) return msWMSException(map, nVersion, "InvalidFormat", wms_exception_format); else return msWMSException(map, nVersion, NULL, wms_exception_format); } /* Generate response */ if (strcasecmp(info_format, "MIME") == 0 || strcasecmp(info_format, "text/plain") == 0) { /* MIME response... we're free to use any valid MIME type */ int numresults = 0; msIO_setHeader("Content-Type","text/plain; charset=UTF-8"); msIO_sendHeaders(); msIO_printf("GetFeatureInfo results:\n"); numresults = msDumpResult(map, nVersion, wms_exception_format); if (numresults == 0) msIO_printf("\n Search returned no results.\n"); } else if (strncasecmp(info_format, "GML", 3) == 0 || /* accept GML.1 or GML */ strcasecmp(info_format, "application/vnd.ogc.gml") == 0) { if (nVersion <= OWS_1_0_7) /* 1.0.0 to 1.0.7 */ msIO_setHeader("Content-Type","text/xml; charset=UTF-8"); else /* 1.1.0 and later */ msIO_setHeader("Content-Type","application/vnd.ogc.gml; charset=UTF-8"); msIO_sendHeaders(); msGMLWriteQuery(map, NULL, "MGO"); /* default is stdout */ } else { mapservObj *msObj; char **translated_names, **translated_values; int translated_numentries; msObj = msAllocMapServObj(); /* Translate some vars from WMS to mapserv */ msTranslateWMS2Mapserv((const char**)names, (const char**)values, numentries, &translated_names, &translated_values, &translated_numentries); msObj->map = map; msFreeCharArray(msObj->request->ParamNames, msObj->request->NumParams); msFreeCharArray(msObj->request->ParamValues, msObj->request->NumParams); msObj->request->ParamNames = translated_names; msObj->request->ParamValues = translated_values; msObj->Mode = QUERY; msObj->request->NumParams = translated_numentries; msObj->mappnt.x = point.x; msObj->mappnt.y = point.y; if (query_status == MS_NOTFOUND && msObj->map->web.empty) { if(msReturnURL(msObj, msObj->map->web.empty, BROWSE) != MS_SUCCESS) return msWMSException(map, nVersion, NULL, wms_exception_format); } else if (msReturnTemplateQuery(msObj, (char *)info_format, NULL) != MS_SUCCESS) return msWMSException(map, nVersion, NULL, wms_exception_format); /* We don't want to free the map since it */ /* belongs to the caller, set it to NULL before freeing the mapservObj */ msObj->map = NULL; msFreeMapServObj(msObj); } return(MS_SUCCESS); } /* ** msWMSDescribeLayer() */ static int msWMSDescribeLayer(mapObj *map, int nVersion, char **names, char **values, int numentries, const char *wms_exception_format) { std::vector<std::string> wmslayers; const char *version = NULL; const char *sld_version = NULL; for(int i=0; i<numentries; i++) { if(strcasecmp(names[i], "LAYERS") == 0) { wmslayers = msStringSplit(values[i], ','); } if(strcasecmp(names[i], "VERSION") == 0) { version = values[i]; } if(strcasecmp(names[i], "SLD_VERSION") == 0) { sld_version = values[i]; } } if (nVersion >= OWS_1_3_0 && sld_version == NULL) { msSetError(MS_WMSERR, "Missing required parameter SLD_VERSION", "DescribeLayer()"); return msWMSException(map, nVersion, "MissingParameterValue", wms_exception_format); } if (nVersion >= OWS_1_3_0 && strcasecmp(sld_version, "1.1.0") != 0) { msSetError(MS_WMSERR, "SLD_VERSION must be 1.1.0", "DescribeLayer()"); return msWMSException(map, nVersion, "InvalidParameterValue", wms_exception_format); } msIO_setHeader("Content-Type","text/xml; charset=UTF-8"); msIO_sendHeaders(); msIO_printf("<?xml version='1.0' encoding=\"UTF-8\"?>\n"); { char* schemalocation = msEncodeHTMLEntities(msOWSGetSchemasLocation(map)); if (nVersion < OWS_1_3_0) { msIO_printf("<!DOCTYPE WMS_DescribeLayerResponse SYSTEM \"%s/wms/1.1.1/WMS_DescribeLayerResponse.dtd\">\n", schemalocation); msIO_printf("<WMS_DescribeLayerResponse version=\"%s\" >\n", version); } else { msIO_printf("<DescribeLayerResponse xmlns=\"http://www.opengis.net/sld\" xmlns:ows=\"http://www.opengis.net/ows\" xmlns:se=\"http://www.opengis.net/se\" xmlns:wfs=\"http://www.opengis.net/wfs\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xsi:schemaLocation=\"http://www.opengis.net/sld %s/sld/1.1.0/DescribeLayer.xsd\">\n", schemalocation); msIO_printf("<Version>%s</Version>\n",sld_version); } free(schemalocation); } /* check if map-level metadata wfs(wcs)_onlineresource is available */ const char* pszOnlineResMapWFS = msOWSLookupMetadata(&(map->web.metadata), "FO", "onlineresource"); if (pszOnlineResMapWFS && strlen(pszOnlineResMapWFS) == 0) pszOnlineResMapWFS = NULL; const char* pszOnlineResMapWCS = msOWSLookupMetadata(&(map->web.metadata), "CO", "onlineresource"); if (pszOnlineResMapWCS && strlen(pszOnlineResMapWCS) == 0) pszOnlineResMapWCS = NULL; char*** nestedGroups = (char***)msSmallCalloc(map->numlayers, sizeof(char**)); int* numNestedGroups = (int*)msSmallCalloc(map->numlayers, sizeof(int)); int * isUsedInNestedGroup = (int*)msSmallCalloc(map->numlayers, sizeof(int)); msWMSPrepareNestedGroups(map, nVersion, nestedGroups, numNestedGroups, isUsedInNestedGroup); for(const auto& wmslayer: wmslayers) { for(int k=0; k<map->numlayers; k++) { layerObj* lp = GET_LAYER(map, k); if ((map->name && strcasecmp(map->name, wmslayer.c_str()) == 0) || (lp->name && strcasecmp(lp->name, wmslayer.c_str()) == 0) || (lp->group && strcasecmp(lp->group, wmslayer.c_str()) == 0) || ((numNestedGroups[k] >0) && msStringInArray(wmslayer.c_str(), nestedGroups[k], numNestedGroups[k]))) { /* Look for a WFS onlineresouce at the layer level and then at * the map level. */ const char* pszOnlineResLyrWFS = msOWSLookupMetadata(&(lp->metadata), "FO", "onlineresource"); const char* pszOnlineResLyrWCS = msOWSLookupMetadata(&(lp->metadata), "CO", "onlineresource"); if (pszOnlineResLyrWFS == NULL || strlen(pszOnlineResLyrWFS) == 0) pszOnlineResLyrWFS = pszOnlineResMapWFS; if (pszOnlineResLyrWCS == NULL || strlen(pszOnlineResLyrWCS) == 0) pszOnlineResLyrWCS = pszOnlineResMapWCS; if (pszOnlineResLyrWFS && (lp->type == MS_LAYER_POINT || lp->type == MS_LAYER_LINE || lp->type == MS_LAYER_POLYGON) ) { char* pszOnlineResEncoded = msEncodeHTMLEntities(pszOnlineResLyrWFS); char* pszLayerName = msEncodeHTMLEntities(lp->name); if (nVersion < OWS_1_3_0) { msIO_printf("<LayerDescription name=\"%s\" wfs=\"%s\" owsType=\"WFS\" owsURL=\"%s\">\n", pszLayerName, pszOnlineResEncoded, pszOnlineResEncoded); msIO_printf("<Query typeName=\"%s\" />\n", pszLayerName); msIO_printf("</LayerDescription>\n"); } else { /*wms 1.3.0*/ msIO_printf(" <LayerDescription>\n"); msIO_printf(" <owsType>wfs</owsType>\n"); msIO_printf(" <se:OnlineResource xlink:type=\"simple\" xlink:href=\"%s\"/>\n", pszOnlineResEncoded); msIO_printf(" <TypeName>\n"); msIO_printf(" <se:FeatureTypeName>%s</se:FeatureTypeName>\n",pszLayerName); msIO_printf(" </TypeName>\n"); msIO_printf(" </LayerDescription>\n"); } msFree(pszOnlineResEncoded); msFree(pszLayerName); } else if (pszOnlineResLyrWCS && lp->type == MS_LAYER_RASTER && lp->connectiontype != MS_WMS) { char* pszOnlineResEncoded = msEncodeHTMLEntities(pszOnlineResLyrWCS); char* pszLayerName = msEncodeHTMLEntities(lp->name); if (nVersion < OWS_1_3_0) { msIO_printf("<LayerDescription name=\"%s\" owsType=\"WCS\" owsURL=\"%s\">\n", pszLayerName, pszOnlineResEncoded); msIO_printf("<Query typeName=\"%s\" />\n", pszLayerName); msIO_printf("</LayerDescription>\n"); msFree(pszOnlineResEncoded); msFree(pszLayerName); } else { msIO_printf(" <LayerDescription>\n"); msIO_printf(" <owsType>wcs</owsType>\n"); msIO_printf(" <se:OnlineResource xlink:type=\"simple\" xlink:href=\"%s\"/>\n", pszOnlineResEncoded); msIO_printf(" <TypeName>\n"); msIO_printf(" <se:CoverageTypeName>%s</se:CoverageTypeName>\n",pszLayerName); msIO_printf(" </TypeName>\n"); msIO_printf(" </LayerDescription>\n"); } } else { char *pszLayerName = msEncodeHTMLEntities(lp->name); if (nVersion < OWS_1_3_0) msIO_printf("<LayerDescription name=\"%s\"></LayerDescription>\n", pszLayerName); else { /*wms 1.3.0*/ msIO_printf(" <LayerDescription>\n"); /*need to have a owstype for the DescribeLayer to be valid*/ if (lp->type == MS_LAYER_RASTER && lp->connectiontype != MS_WMS) msIO_printf(" <owsType>wcs</owsType>\n"); else msIO_printf(" <owsType>wfs</owsType>\n"); msIO_printf(" <se:OnlineResource xlink:type=\"simple\"/>\n"); msIO_printf(" <TypeName>\n"); if (lp->type == MS_LAYER_RASTER && lp->connectiontype != MS_WMS) msIO_printf(" <se:CoverageTypeName>%s</se:CoverageTypeName>\n",pszLayerName); else msIO_printf(" <se:FeatureTypeName>%s</se:FeatureTypeName>\n",pszLayerName); msIO_printf(" </TypeName>\n"); msIO_printf(" </LayerDescription>\n"); } msFree(pszLayerName); } /* break; */ } } } if (nVersion < OWS_1_3_0) msIO_printf("</WMS_DescribeLayerResponse>\n"); else msIO_printf("</DescribeLayerResponse>\n"); /* free the stuff used for nested layers */ for (int i = 0; i < map->numlayers; i++) { if (numNestedGroups[i] > 0) { msFreeCharArray(nestedGroups[i], numNestedGroups[i]); } } free(nestedGroups); free(numNestedGroups); free(isUsedInNestedGroup); return(MS_SUCCESS); } /* ** msWMSGetLegendGraphic() */ static int msWMSLegendGraphic(mapObj *map, int nVersion, char **names, char **values, int numentries, const char *wms_exception_format, owsRequestObj *ows_request, map_hittest *hittest) { const char *pszLayer = NULL; const char *pszFormat = NULL; const char *psRule = NULL; const char *psScale = NULL; int iLayerIndex = -1; outputFormatObj *psFormat = NULL; imageObj *img=NULL; int nWidth = -1, nHeight =-1; const char *pszStyle = NULL; const char *sld_version = NULL; int wms_layer = MS_FALSE; const char *sldenabled = NULL; const char *format_list = NULL; int nLayers =0; if(!hittest) { /* we can skip alot of testing if we already have a hittest, as it has already been done in the hittesting phase */ sldenabled = msOWSLookupMetadata(&(map->web.metadata), "MO", "sld_enabled"); if (sldenabled == NULL) sldenabled = "true"; for(int i=0; i<numentries; i++) { if (strcasecmp(names[i], "LAYER") == 0) { pszLayer = values[i]; } else if (strcasecmp(names[i], "WIDTH") == 0) nWidth = atoi(values[i]); else if (strcasecmp(names[i], "HEIGHT") == 0) nHeight = atoi(values[i]); else if (strcasecmp(names[i], "FORMAT") == 0) pszFormat = values[i]; else if (strcasecmp(names[i], "SCALE") == 0) psScale = values[i]; /* -------------------------------------------------------------------- */ /* SLD support : */ /* - check if the SLD parameter is there. it is supposed to */ /* refer a valid URL containing an SLD document. */ /* - check the SLD_BODY parameter that should contain the SLD */ /* xml string. */ /* -------------------------------------------------------------------- */ else if (strcasecmp(names[i], "SLD") == 0 && values[i] && strlen(values[i]) > 0 && strcasecmp(sldenabled, "true") == 0) msSLDApplySLDURL(map, values[i], -1, NULL, NULL); else if (strcasecmp(names[i], "SLD_BODY") == 0 && values[i] && strlen(values[i]) > 0 && strcasecmp(sldenabled, "true") == 0) msSLDApplySLD(map, values[i], -1, NULL, NULL); else if (strcasecmp(names[i], "RULE") == 0) psRule = values[i]; else if (strcasecmp(names[i], "STYLE") == 0) pszStyle = values[i]; /* -------------------------------------------------------------------- */ /* SLD support: */ /* - because the request parameter "sld_version" is required in */ /* in WMS 1.3.0, it will be set regardless of OGR support. */ /* -------------------------------------------------------------------- */ else if(strcasecmp(names[i], "SLD_VERSION") == 0) sld_version = values[i]; } if (!pszLayer) { msSetError(MS_WMSERR, "Mandatory LAYER parameter missing in GetLegendGraphic request.", "msWMSGetLegendGraphic()"); return msWMSException(map, nVersion, "LayerNotDefined", wms_exception_format); } if (!pszFormat) { msSetError(MS_WMSERR, "Mandatory FORMAT parameter missing in GetLegendGraphic request.", "msWMSGetLegendGraphic()"); return msWMSException(map, nVersion, "InvalidFormat", wms_exception_format); } if (nVersion >= OWS_1_3_0 && sld_version == NULL) { msSetError(MS_WMSERR, "Missing required parameter SLD_VERSION", "GetLegendGraphic()"); return msWMSException(map, nVersion, "MissingParameterValue", wms_exception_format); } if (nVersion >= OWS_1_3_0 && strcasecmp(sld_version, "1.1.0") != 0) { msSetError(MS_WMSERR, "SLD_VERSION must be 1.1.0", "GetLegendGraphic()"); return msWMSException(map, nVersion, "InvalidParameterValue", wms_exception_format); } char*** nestedGroups = (char***)msSmallCalloc(map->numlayers, sizeof(char**)); int* numNestedGroups = (int*)msSmallCalloc(map->numlayers, sizeof(int)); int* isUsedInNestedGroup = (int*)msSmallCalloc(map->numlayers, sizeof(int)); msWMSPrepareNestedGroups(map, nVersion, nestedGroups, numNestedGroups, isUsedInNestedGroup); /* check if layer name is valid. we check for layer's and group's name */ /* as well as wms_layer_group names */ for (int i=0; i<map->numlayers; i++) { layerObj* lp = GET_LAYER(map, i); if ( ((map->name && strcasecmp(map->name, pszLayer) == 0) || (lp->name && strcasecmp(lp->name, pszLayer) == 0) || (lp->group && strcasecmp(lp->group, pszLayer) == 0) || ((numNestedGroups[i] >0) && (msStringInArray(pszLayer, nestedGroups[i], numNestedGroups[i]))) ) && (msIntegerInArray(lp->index, ows_request->enabled_layers, ows_request->numlayers)) ) { nLayers++; lp->status = MS_ON; iLayerIndex = i; if (GET_LAYER(map, i)->connectiontype == MS_WMS) { /* we do not cascade a wms layer if it contains at least * one class with the property name set */ wms_layer = MS_TRUE; for (int j=0; j<lp->numclasses; j++) { if (lp->_class[j]->name != NULL && strlen(lp->_class[j]->name)>0) { wms_layer = MS_FALSE; break; } } } } else lp->status = MS_OFF; } /* free the stuff used for nested layers */ for (int i = 0; i < map->numlayers; i++) { if (numNestedGroups[i] > 0) { msFreeCharArray(nestedGroups[i], numNestedGroups[i]); } } free(nestedGroups); free(numNestedGroups); free(isUsedInNestedGroup); if (nLayers == 0) { msSetError(MS_WMSERR, "Invalid layer given in the LAYER parameter. A layer might be disabled for \ this request. Check wms/ows_enable_request settings.", "msWMSGetLegendGraphic()"); return msWMSException(map, nVersion, "LayerNotDefined", wms_exception_format); } /* if SCALE was provided in request, calculate an extent and use a default width and height */ if ( psScale != NULL ) { double scale, cellsize; scale = atof(psScale); map->width = 600; map->height = 600; cellsize = (scale/map->resolution)/msInchesPerUnit(map->units, 0.0); map->extent.maxx = cellsize*map->width/2.0; map->extent.maxy = cellsize*map->height/2.0; map->extent.minx = -map->extent.maxx; map->extent.miny = -map->extent.maxy; } /* It's a valid Cascading WMS GetLegendGraphic request */ if (wms_layer) return msWMSLayerExecuteRequest(map, 1, 0, 0, 0, NULL, WMS_GETLEGENDGRAPHIC); /*if STYLE is set, check if it is a valid style (valid = at least one of the classes have a the group value equals to the style */ /*style is only validated when there is only one layer #3411*/ if (nLayers == 1 && pszStyle && strlen(pszStyle) > 0 && strcasecmp(pszStyle, "default") != 0) { bool found = false; for (int i=0; i<GET_LAYER(map, iLayerIndex)->numclasses; i++) { if (GET_LAYER(map, iLayerIndex)->_class[i]->group && strcasecmp(GET_LAYER(map, iLayerIndex)->_class[i]->group, pszStyle) == 0) { found = true; break; } } if (!found) { msSetError(MS_WMSERR, "style used in the STYLE parameter is not defined on the layer.", "msWMSGetLegendGraphic()"); return msWMSException(map, nVersion, "StyleNotDefined", wms_exception_format); } else { msFree(GET_LAYER(map, iLayerIndex)->classgroup); GET_LAYER(map, iLayerIndex)->classgroup = msStrdup(pszStyle); } } } else { /* extract the parameters we need */ for(int i=0; i<numentries; i++) { if (strcasecmp(names[i], "FORMAT") == 0) pszFormat = values[i]; else if (strcasecmp(names[i], "RULE") == 0) psRule = values[i]; } } /* validate format */ /*check to see if a predefined list is given*/ format_list = msOWSLookupMetadata(&(map->web.metadata), "M","getlegendgraphic_formatlist"); if (format_list) { psFormat = msOwsIsOutputFormatValid(map, pszFormat, &(map->web.metadata), "M", "getlegendgraphic_formatlist"); if (psFormat == NULL) { msSetError(MS_IMGERR, "Unsupported output format (%s).", "msWMSGetLegendGraphic()", pszFormat); return msWMSException(map, nVersion, "InvalidFormat", wms_exception_format); } } else { psFormat = msSelectOutputFormat( map, pszFormat); if( psFormat == NULL || ! MS_RENDERER_PLUGIN(psFormat) ) /* msDrawLegend and msCreateLegendIcon both switch the alpha channel to gd ** after creation, so they can be called here without going through ** the msAlphaGD2AGG functions */ { msSetError(MS_IMGERR, "Unsupported output format (%s).", "msWMSGetLegendGraphic()", pszFormat); return msWMSException(map, nVersion, "InvalidFormat", wms_exception_format); } } msApplyOutputFormat(&(map->outputformat), psFormat, MS_NOOVERRIDE, MS_NOOVERRIDE, MS_NOOVERRIDE ); if ( psRule == NULL || nLayers > 1) { if ( psScale != NULL ) { /* Scale-dependent legend. map->scaledenom will be calculated in msDrawLegend */ img = msDrawLegend(map, MS_FALSE, NULL); } else { /* Scale-independent legend */ img = msDrawLegend(map, MS_TRUE, hittest); } } else { /* RULE was specified. Get the class corresponding to the RULE */ /* (RULE = class->name) */ /* TBT FIXME? also check the map->scaledenom if multiple scale-dependant classes with same name */ layerObj* lp = GET_LAYER(map, iLayerIndex); int i; for (i=0; i<lp->numclasses; i++) { if (lp->classgroup && (lp->_class[i]->group == NULL || strcasecmp(lp->_class[i]->group, lp->classgroup) != 0)) continue; if (lp->_class[i]->name && strlen(lp->_class[i]->name) > 0 && strcasecmp(lp->_class[i]->name,psRule) == 0) break; } if (i < lp->numclasses) { /* set the map legend parameters */ if (nWidth < 0) { if (map->legend.keysizex > 0) nWidth = map->legend.keysizex; else nWidth = 20; /* default values : this in not defined in the specs */ } if (nHeight < 0) { if (map->legend.keysizey > 0) nHeight = map->legend.keysizey; else nHeight = 20; } if ( psScale != NULL ) { /* Scale-dependent legend. calculate map->scaledenom */ map->cellsize = msAdjustExtent(&(map->extent), map->width, map->height); msCalculateScale(map->extent, map->units, map->width, map->height, map->resolution, &map->scaledenom); img = msCreateLegendIcon(map, lp, lp->_class[i], nWidth, nHeight, MS_FALSE); } else { /* Scale-independent legend */ img = msCreateLegendIcon(map, lp, lp->_class[i], nWidth, nHeight, MS_TRUE); } } if (img == NULL) { msSetError(MS_IMGERR, "Unavailable RULE (%s).", "msWMSGetLegendGraphic()", psRule); return msWMSException(map, nVersion, "InvalidRule", wms_exception_format); } } if (img == NULL) return msWMSException(map, nVersion, NULL, wms_exception_format); msIO_setHeader("Content-Type", "%s", MS_IMAGE_MIME_TYPE(map->outputformat)); msIO_sendHeaders(); if (msSaveImage(map, img, NULL) != MS_SUCCESS) return msWMSException(map, nVersion, NULL, wms_exception_format); msFreeImage(img); return(MS_SUCCESS); } /* ** msWMSGetContentDependantLegend() */ static int msWMSGetContentDependantLegend(mapObj *map, int nVersion, char **names, char **values, int numentries, const char *wms_exception_format, owsRequestObj *ows_request) { /* turn off layer if WMS GetMap is not enabled */ for (int i=0; i<map->numlayers; i++) if (!msIntegerInArray(GET_LAYER(map, i)->index, ows_request->enabled_layers, ows_request->numlayers)) GET_LAYER(map, i)->status = MS_OFF; map_hittest hittest; initMapHitTests(map,&hittest); int status = msHitTestMap(map,&hittest); if(status == MS_SUCCESS) { status = msWMSLegendGraphic(map,nVersion,names,values,numentries,wms_exception_format,ows_request,&hittest); } freeMapHitTests(map,&hittest); if(status != MS_SUCCESS) { return msWMSException(map, nVersion, NULL, wms_exception_format); } else { return MS_SUCCESS; } } /* ** msWMSGetStyles() : return an SLD document for all layers that ** have a status set to on or default. */ static int msWMSGetStyles(mapObj *map, int nVersion, char **names, char **values, int numentries, const char *wms_exception_format) { bool validlayer = false; char*** nestedGroups = (char***)msSmallCalloc(map->numlayers, sizeof(char**)); int* numNestedGroups = (int*)msSmallCalloc(map->numlayers, sizeof(int)); int* isUsedInNestedGroup = (int*)msSmallCalloc(map->numlayers, sizeof(int)); msWMSPrepareNestedGroups(map, nVersion, nestedGroups, numNestedGroups, isUsedInNestedGroup); const char* sldenabled = msOWSLookupMetadata(&(map->web.metadata), "MO", "sld_enabled"); if (sldenabled == NULL) sldenabled = "true"; for(int i=0; i<numentries; i++) { /* getMap parameters */ if (strcasecmp(names[i], "LAYERS") == 0) { const auto wmslayers = msStringSplit(values[i], ','); if (wmslayers.empty()) { msSetError(MS_WMSERR, "At least one layer name required in LAYERS.", "msWMSGetStyles()"); return msWMSException(map, nVersion, NULL, wms_exception_format); } for(int j=0; j<map->numlayers; j++) GET_LAYER(map, j)->status = MS_OFF; for (int k=0; k < static_cast<int>(wmslayers.size()); k++) { const auto& wmslayer = wmslayers[k]; for (int j=0; j<map->numlayers; j++) { if ((map->name && strcasecmp(map->name, wmslayer.c_str()) == 0) || (GET_LAYER(map, j)->name && strcasecmp(GET_LAYER(map, j)->name, wmslayer.c_str()) == 0) || (GET_LAYER(map, j)->group && strcasecmp(GET_LAYER(map, j)->group, wmslayer.c_str()) == 0) || ((numNestedGroups[j] >0) && msStringInArray(wmslayer.c_str(), nestedGroups[j], numNestedGroups[j])) ) { GET_LAYER(map, j)->status = MS_ON; validlayer = true; } } } } else if (strcasecmp(names[i], "SLD") == 0 && values[i] && strlen(values[i]) > 0 && strcasecmp(sldenabled, "true") == 0) { msSLDApplySLDURL(map, values[i], -1, NULL, NULL); } else if (strcasecmp(names[i], "SLD_BODY") == 0 && values[i] && strlen(values[i]) > 0 && strcasecmp(sldenabled, "true") == 0) { msSLDApplySLD(map, values[i], -1, NULL, NULL); } } /* free the stuff used for nested layers */ for (int i = 0; i < map->numlayers; i++) { if (numNestedGroups[i] > 0) { msFreeCharArray(nestedGroups[i], numNestedGroups[i]); } } free(nestedGroups); free(numNestedGroups); free(isUsedInNestedGroup); /* validate all layers given. If an invalid layer is sent, return an exception. */ if (!validlayer) { msSetError(MS_WMSERR, "Invalid layer(s) given in the LAYERS parameter. A layer might be disabled for \ this request. Check wms/ows_enable_request settings.", "msWMSGetStyles()"); return msWMSException(map, nVersion, "LayerNotDefined", wms_exception_format); } char *sld = NULL; if (nVersion <= OWS_1_1_1) { msIO_setHeader("Content-Type","application/vnd.ogc.sld+xml; charset=UTF-8"); msIO_sendHeaders(); sld = msSLDGenerateSLD(map, -1, "1.0.0"); } else { /*for wms 1.3.0 generate a 1.1 sld*/ msIO_setHeader("Content-Type","text/xml; charset=UTF-8"); msIO_sendHeaders(); sld = msSLDGenerateSLD(map, -1, "1.1.0"); } if (sld) { msIO_printf("%s\n", sld); free(sld); } return(MS_SUCCESS); } int msWMSGetSchemaExtension(mapObj *map) { char* schemalocation = msEncodeHTMLEntities(msOWSGetSchemasLocation(map)); msIO_setHeader("Content-Type","text/xml; charset=UTF-8"); msIO_sendHeaders(); msIO_printf("<?xml version='1.0' encoding=\"UTF-8\"?>\n"); msIO_printf("<schema xmlns=\"http://www.w3.org/2001/XMLSchema\" xmlns:wms=\"http://www.opengis.net/wms\" xmlns:ms=\"http://mapserver.gis.umn.edu/mapserver\" targetNamespace=\"http://mapserver.gis.umn.edu/mapserver\" elementFormDefault=\"qualified\" version=\"1.0.0\">\n"); msIO_printf(" <import namespace=\"http://www.opengis.net/wms\" schemaLocation=\"%s/wms/1.3.0/capabilities_1_3_0.xsd\"/>\n", schemalocation); msIO_printf(" <element name=\"GetStyles\" type=\"wms:OperationType\" substitutionGroup=\"wms:_ExtendedOperation\"/>\n"); msIO_printf("</schema>"); free(schemalocation); return(MS_SUCCESS); } #endif /* USE_WMS_SVR */ /* ** msWMSDispatch() is the entry point for WMS requests. ** - If this is a valid request then it is processed and MS_SUCCESS is returned ** on success, or MS_FAILURE on failure. ** - If this does not appear to be a valid WMS request then MS_DONE ** is returned and MapServer is expected to process this as a regular ** MapServer request. */ int msWMSDispatch(mapObj *map, cgiRequestObj *req, owsRequestObj *ows_request, int force_wms_mode) { #ifdef USE_WMS_SVR int nVersion=OWS_VERSION_NOTSET; const char *version=NULL, *request=NULL, *service=NULL, *format=NULL, *updatesequence=NULL, *language=NULL; const char *wms_exception_format = NULL; /* ** Process Params common to all requests */ /* VERSION (WMTVER in 1.0.0) and REQUEST must be present in a valid request */ for(int i=0; i<req->NumParams; i++) { if(strcasecmp(req->ParamNames[i], "VERSION") == 0) version = req->ParamValues[i]; else if (strcasecmp(req->ParamNames[i], "WMTVER") == 0 && version == NULL) version = req->ParamValues[i]; else if (strcasecmp(req->ParamNames[i], "UPDATESEQUENCE") == 0) updatesequence = req->ParamValues[i]; else if (strcasecmp(req->ParamNames[i], "REQUEST") == 0) request = req->ParamValues[i]; else if (strcasecmp(req->ParamNames[i], "EXCEPTIONS") == 0) wms_exception_format = req->ParamValues[i]; else if (strcasecmp(req->ParamNames[i], "SERVICE") == 0) service = req->ParamValues[i]; else if (strcasecmp(req->ParamNames[i], "FORMAT") == 0) format = req->ParamValues[i]; else if (strcasecmp(req->ParamNames[i], "LANGUAGE") == 0 && msOWSLookupMetadata(&(map->web.metadata), "MO", "inspire_capabilities")) language = req->ParamValues[i]; } /* If SERVICE is specified then it MUST be "WMS" */ if (service != NULL && strcasecmp(service, "WMS") != 0) return MS_DONE; /* Not a WMS request */ nVersion = msOWSParseVersionString(version); if (nVersion == OWS_VERSION_BADFORMAT) { /* Invalid version format. msSetError() has been called by * msOWSParseVersionString() and we return the error as an exception */ return msWMSException(map, OWS_VERSION_NOTSET, NULL, wms_exception_format); } /* ** GetCapbilities request needs the service parametr defined as WMS: see section 7.1.3.2 wms 1.1.1 specs for decsription. */ if (request && service == NULL && (strcasecmp(request, "capabilities") == 0 || strcasecmp(request, "GetCapabilities") == 0) && (nVersion >= OWS_1_0_7 || nVersion == OWS_VERSION_NOTSET)) { if (force_wms_mode) { msSetError(MS_WMSERR, "Required SERVICE parameter missing.", "msWMSDispatch"); return msWMSException(map, nVersion, "ServiceNotDefined", wms_exception_format); } else return MS_DONE; } /* ** Dispatch request... we should probably do some validation on VERSION here ** vs the versions we actually support. */ if (request && (strcasecmp(request, "capabilities") == 0 || strcasecmp(request, "GetCapabilities") == 0) ) { const char *enable_request; int globally_enabled, disabled = MS_FALSE; if (nVersion == OWS_VERSION_NOTSET) { version = msOWSLookupMetadata(&(map->web.metadata), "M", "getcapabilities_version"); if (version) nVersion = msOWSParseVersionString(version); else nVersion = OWS_1_3_0;/* VERSION is optional with getCapabilities only */ } if (msOWSMakeAllLayersUnique(map) != MS_SUCCESS) return msWMSException(map, nVersion, NULL, wms_exception_format); msOWSRequestLayersEnabled(map, "M", "GetCapabilities", ows_request); enable_request = msOWSLookupMetadata(&map->web.metadata, "OM", "enable_request"); globally_enabled = msOWSParseRequestMetadata(enable_request, "GetCapabilities", &disabled); if (ows_request->numlayers == 0 && !globally_enabled) { msSetError(MS_WMSERR, "WMS request not enabled. Check wms/ows_enable_request settings.", "msWMSGetCapabilities()"); return msWMSException(map, nVersion, NULL, wms_exception_format); } msAcquireLock(TLOCK_WxS); const int status=msWMSGetCapabilities(map, nVersion, req, ows_request, updatesequence, wms_exception_format, language); msReleaseLock(TLOCK_WxS); return status; } else if (request && (strcasecmp(request, "context") == 0 || strcasecmp(request, "GetContext") == 0) ) { /* Return a context document with all layers in this mapfile * This is not a standard WMS request. * __TODO__ The real implementation should actually return only context * info for selected layers in the LAYERS parameter. */ const char *getcontext_enabled; getcontext_enabled = msOWSLookupMetadata(&(map->web.metadata), "MO", "getcontext_enabled"); if (nVersion != OWS_VERSION_NOTSET) { /* VERSION, if specified, is Map Context version, not WMS version */ /* Pass it via wms_context_version metadata */ char szVersion[OWS_VERSION_MAXLEN]; msInsertHashTable(&(map->web.metadata), "wms_context_version", msOWSGetVersionString(nVersion, szVersion)); } /* Now set version to 1.1.1 for error handling purposes */ nVersion = OWS_1_1_1; if (getcontext_enabled==NULL || atoi(getcontext_enabled) == 0) { msSetError(MS_WMSERR, "GetContext not enabled on this server.", "msWMSDispatch()"); return msWMSException(map, nVersion, NULL, wms_exception_format); } if (msOWSMakeAllLayersUnique(map) != MS_SUCCESS) return msWMSException(map, nVersion, NULL, wms_exception_format); msIO_setHeader("Content-Type","text/xml; charset=UTF-8"); msIO_sendHeaders(); if ( msWriteMapContext(map, stdout) != MS_SUCCESS ) return msWMSException(map, nVersion, NULL, wms_exception_format); /* Request completed */ return MS_SUCCESS; } else if (request && strcasecmp(request, "GetMap") == 0 && format && strcasecmp(format, "image/txt") == 0) { /* Until someone adds full support for ASCII graphics this should do. ;) */ msIO_setHeader("Content-Type","text/plain; charset=UTF-8"); msIO_sendHeaders(); msIO_printf(".\n ,,ggddY\"\"\"Ybbgg,,\n ,agd888b,_ " "\"Y8, ___'\"\"Ybga,\n ,gdP\"\"88888888baa,.\"\"8b \"" "888g,\n ,dP\" ]888888888P' \"Y '888Yb,\n ,dP\"" " ,88888888P\" db, \"8P\"\"Yb,\n ,8\" ,8888" "88888b, d8888a \"8,\n ,8' d88888888888,88P\"" "' a, '8,\n,8' 88888888888888PP\" \"\" " " '8,\nd' I88888888888P\" 'b\n8" " '8\"88P\"\"Y8P' 8\n8 " " Y 8[ _ \" 8\n8 \"Y8d8" "b \"Y a 8\n8 '\"\"8d, __" " 8\nY, '\"8bd888b, " " ,P\n'8, ,d8888888baaa ,8'\n '8" ", 888888888888' ,8'\n '8a " " \"8888888888I a8'\n 'Yba 'Y88" "88888P' adP'\n \"Yba '888888P' adY\"" "\n '\"Yba, d8888P\" ,adP\"' \n '\"" "Y8baa, ,d888P,ad8P\"' \n ''\"\"YYba8888P\"" "\"''\n"); return MS_SUCCESS; } /* If SERVICE, VERSION and REQUEST not included than this isn't a WMS req*/ if (service == NULL && nVersion == OWS_VERSION_NOTSET && request==NULL) return MS_DONE; /* Not a WMS request */ /* VERSION *and* REQUEST required by both getMap and getFeatureInfo */ if (nVersion == OWS_VERSION_NOTSET) { msSetError(MS_WMSERR, "Incomplete WMS request: VERSION parameter missing", "msWMSDispatch()"); return msWMSException(map, OWS_VERSION_NOTSET, NULL, wms_exception_format); } /*check if the version is one of the supported vcersions*/ if (nVersion != OWS_1_0_0 && nVersion != OWS_1_0_6 && nVersion != OWS_1_0_7 && nVersion != OWS_1_1_0 && nVersion != OWS_1_1_1 && nVersion != OWS_1_3_0) { msSetError(MS_WMSERR, "Invalid WMS version: VERSION %s is not supported. Supported versions are 1.0.0, 1.0.6, 1.0.7, 1.1.0, 1.1.1, 1.3.0", "msWMSDispatch()", version); return msWMSException(map, OWS_VERSION_NOTSET, NULL, wms_exception_format); } if (request==NULL) { msSetError(MS_WMSERR, "Incomplete WMS request: REQUEST parameter missing", "msWMSDispatch()"); return msWMSException(map, nVersion, NULL, wms_exception_format); } /* hack !? The function can return MS_DONE ... be sure it's a wms request * before checking the enabled layers */ if ( (strcasecmp(request, "GetStyles") == 0) || (strcasecmp(request, "GetLegendGraphic") == 0) || (strcasecmp(request, "GetSchemaExtension") == 0) || (strcasecmp(request, "map") == 0 || strcasecmp(request, "GetMap") == 0) || (strcasecmp(request, "feature_info") == 0 || strcasecmp(request, "GetFeatureInfo") == 0) || (strcasecmp(request, "DescribeLayer") == 0) ) { const char* request_tmp; if (strcasecmp(request, "map") == 0) request_tmp = "GetMap"; else if (strcasecmp(request, "feature_info") == 0) request_tmp = "GetFeatureInfo"; else request_tmp = request; msOWSRequestLayersEnabled(map, "M", request_tmp, ows_request); if (ows_request->numlayers == 0) { msSetError(MS_WMSERR, "WMS request not enabled. Check wms/ows_enable_request settings.", "msWMSDispatch()"); return msWMSException(map, nVersion, NULL, wms_exception_format); } } if (msOWSMakeAllLayersUnique(map) != MS_SUCCESS) return msWMSException(map, nVersion, NULL, wms_exception_format); bool isContentDependantLegend = false; if (strcasecmp(request, "GetLegendGraphic") == 0) { /* * check for a BBOX in the request, in that case we have a content-dependant legend request, * and should be following the GetMap path a bit more */ bool found = false; for(int i=0; i<req->NumParams; i++) { if(strcasecmp(req->ParamNames[i], "BBOX") == 0) { if(req->ParamValues[i] && *req->ParamValues[i]) { found = true; break; } } } if(found) { isContentDependantLegend = true; /* getLegendGraphic uses LAYER= , we need to create a LAYERS= value that is identical * we'll suppose that the client is conformat and hasn't included a LAYERS= parameter * in its request */ for(int i=0; i<req->NumParams; i++) { if(strcasecmp(req->ParamNames[i], "LAYER") == 0) { req->ParamNames[req->NumParams] = msStrdup("LAYERS"); req->ParamValues[req->NumParams] = msStrdup(req->ParamValues[i]); req->NumParams++; } } } else { return msWMSLegendGraphic(map, nVersion, req->ParamNames, req->ParamValues, req->NumParams, wms_exception_format, ows_request, NULL); } } if (strcasecmp(request, "GetStyles") == 0) return msWMSGetStyles(map, nVersion, req->ParamNames, req->ParamValues, req->NumParams, wms_exception_format); else if (request && strcasecmp(request, "GetSchemaExtension") == 0) return msWMSGetSchemaExtension(map); /* getMap parameters are used by both getMap, getFeatureInfo, and content dependant legendgraphics */ if (strcasecmp(request, "map") == 0 || strcasecmp(request, "GetMap") == 0 || strcasecmp(request, "feature_info") == 0 || strcasecmp(request, "GetFeatureInfo") == 0 || strcasecmp(request, "DescribeLayer") == 0 || isContentDependantLegend) { const int status = msWMSLoadGetMapParams(map, nVersion, req->ParamNames, req->ParamValues, req->NumParams, wms_exception_format, request, ows_request); if (status != MS_SUCCESS) return status; } /* This function owns validated_language, so remember to free it later*/ char* validated_language = msOWSGetLanguageFromList(map, "MO", language); if (validated_language != NULL) { msMapSetLanguageSpecificConnection(map, validated_language); } msFree(validated_language); if (strcasecmp(request, "map") == 0 || strcasecmp(request, "GetMap") == 0) return msWMSGetMap(map, nVersion, req->ParamNames, req->ParamValues, req->NumParams, wms_exception_format, ows_request); else if (strcasecmp(request, "feature_info") == 0 || strcasecmp(request, "GetFeatureInfo") == 0) return msWMSFeatureInfo(map, nVersion, req->ParamNames, req->ParamValues, req->NumParams, wms_exception_format, ows_request); else if (strcasecmp(request, "DescribeLayer") == 0) { return msWMSDescribeLayer(map, nVersion, req->ParamNames, req->ParamValues, req->NumParams, wms_exception_format); } else if (isContentDependantLegend) { return msWMSGetContentDependantLegend(map,nVersion, req->ParamNames, req->ParamValues, req->NumParams, wms_exception_format, ows_request); } /* Hummmm... incomplete or unsupported WMS request */ if (service != NULL && strcasecmp(service, "WMS") == 0) { msSetError(MS_WMSERR, "Incomplete or unsupported WMS request", "msWMSDispatch()"); return msWMSException(map, nVersion, NULL, wms_exception_format); } else return MS_DONE; /* Not a WMS request */ #else msSetError(MS_WMSERR, "WMS server support is not available.", "msWMSDispatch()"); return(MS_FAILURE); #endif }
// TAVL -*- C++ -*- // BSD 3-Clause License // Copyright (c) 2018-2019, wxr001 // All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // * Redistributions of source code must retain the above copyright notice, this // list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // * Neither the name of the copyright holder nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. #include "../TAVL.hpp" #include <iostream> namespace tavl { template <typename T, T lhs, T rhs> struct compare<std::integral_constant<T, lhs>, std::integral_constant<T, rhs>> { static constexpr int value = lhs - rhs; }; } // namespace tavl template <int val> using int_v = std::integral_constant<int, val>; using namespace tavl; template <typename T, int V, int count> struct insert_n { using type = tavl_insert_t<typename insert_n<T, V, count - 1>::type, int_v<V + count>>; }; template <typename T, int V> struct insert_n<T, V, 0> { using type = T; }; int main() { using search_first = tavl_insert_t<typename insert_n<empty_node, 0, 2000>::type, int_v<2002>>; using search_last = typename insert_n<tavl_insert_t<empty_node, int_v<2002>>, 0, 2000>:: type; using search_middle = typename insert_n< tavl_insert_t<typename insert_n<empty_node, 0, 1000>::type, int_v<2002>>, 1001, 1000>::type; if (!std::is_same_v<tavl_find_t<search_first, int_v<2002>>::key, int_v<2002>> && !std::is_same_v<tavl_find_t<search_last, int_v<2002>>::key, int_v<2002>> && !std::is_same_v<tavl_find_t<search_middle, int_v<2002>>::key, int_v<2002>>) { std::cout << 3 << std::endl; } return 0; }
/**************************************************************************** * * Copyright (c) 2013-2016 PX4 Development Team. 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 PX4 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 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************/ /** * @file navigator_main.cpp * * Handles mission items, geo fencing and failsafe navigation behavior. * Published the position setpoint triplet for the position controller. * * @author Lorenz Meier <lm@inf.ethz.ch> * @author Jean Cyr <jean.m.cyr@gmail.com> * @author Julian Oes <julian@oes.ch> * @author Anton Babushkin <anton.babushkin@me.com> * @author Thomas Gubler <thomasgubler@gmail.com> */ #include "navigator.h" #include <cfloat> #include <dataman/dataman.h> #include <drivers/drv_hrt.h> #include <geo/geo.h> #include <mathlib/mathlib.h> #include <px4_config.h> #include <px4_defines.h> #include <px4_posix.h> #include <px4_tasks.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <sys/types.h> #include <systemlib/mavlink_log.h> #include <systemlib/systemlib.h> #include <uORB/topics/fence.h> #include <uORB/topics/fw_pos_ctrl_status.h> #include <uORB/topics/home_position.h> #include <uORB/topics/mission.h> #include <uORB/topics/vehicle_command.h> #include <uORB/topics/vehicle_status.h> #include <uORB/uORB.h> /** * navigator app start / stop handling function * * @ingroup apps */ extern "C" __EXPORT int navigator_main(int argc, char *argv[]); #define GEOFENCE_CHECK_INTERVAL 200000 namespace navigator { Navigator *g_navigator; } Navigator::Navigator() : SuperBlock(nullptr, "NAV"), _loop_perf(perf_alloc(PC_ELAPSED, "navigator")), _geofence(this), _mission(this, "MIS"), _loiter(this, "LOI"), _takeoff(this, "TKF"), _land(this, "LND"), _rtl(this, "RTL"), _rcLoss(this, "RCL"), _dataLinkLoss(this, "DLL"), _engineFailure(this, "EF"), _gpsFailure(this, "GPSF"), _follow_target(this, "TAR"), _param_loiter_radius(this, "LOITER_RAD"), _param_acceptance_radius(this, "ACC_RAD"), _param_fw_alt_acceptance_radius(this, "FW_ALT_RAD"), _param_mc_alt_acceptance_radius(this, "MC_ALT_RAD") { /* Create a list of our possible navigation types */ _navigation_mode_array[0] = &_mission; _navigation_mode_array[1] = &_loiter; _navigation_mode_array[2] = &_rtl; _navigation_mode_array[3] = &_dataLinkLoss; _navigation_mode_array[4] = &_engineFailure; _navigation_mode_array[5] = &_gpsFailure; _navigation_mode_array[6] = &_rcLoss; _navigation_mode_array[7] = &_takeoff; _navigation_mode_array[8] = &_land; _navigation_mode_array[9] = &_follow_target; updateParams(); } Navigator::~Navigator() { if (_navigator_task != -1) { /* task wakes up every 100ms or so at the longest */ _task_should_exit = true; /* wait for a second for the task to quit at our request */ unsigned i = 0; do { /* wait 20ms */ usleep(20000); /* if we have given up, kill it */ if (++i > 50) { px4_task_delete(_navigator_task); break; } } while (_navigator_task != -1); } navigator::g_navigator = nullptr; } void Navigator::global_position_update() { orb_copy(ORB_ID(vehicle_global_position), _global_pos_sub, &_global_pos); } void Navigator::local_position_update() { orb_copy(ORB_ID(vehicle_local_position), _local_pos_sub, &_local_pos); } void Navigator::gps_position_update() { orb_copy(ORB_ID(vehicle_gps_position), _gps_pos_sub, &_gps_pos); } void Navigator::sensor_combined_update() { orb_copy(ORB_ID(sensor_combined), _sensor_combined_sub, &_sensor_combined); } void Navigator::home_position_update(bool force) { bool updated = false; orb_check(_home_pos_sub, &updated); if (updated || force) { orb_copy(ORB_ID(home_position), _home_pos_sub, &_home_pos); } } void Navigator::fw_pos_ctrl_status_update(bool force) { bool updated = false; orb_check(_fw_pos_ctrl_status_sub, &updated); if (updated || force) { orb_copy(ORB_ID(fw_pos_ctrl_status), _fw_pos_ctrl_status_sub, &_fw_pos_ctrl_status); } } void Navigator::vehicle_status_update() { if (orb_copy(ORB_ID(vehicle_status), _vstatus_sub, &_vstatus) != OK) { /* in case the commander is not be running */ _vstatus.arming_state = vehicle_status_s::ARMING_STATE_STANDBY; } } void Navigator::vehicle_land_detected_update() { orb_copy(ORB_ID(vehicle_land_detected), _land_detected_sub, &_land_detected); } void Navigator::params_update() { parameter_update_s param_update; orb_copy(ORB_ID(parameter_update), _param_update_sub, &param_update); updateParams(); if (_navigation_mode) { _navigation_mode->updateParams(); } } void Navigator::task_main_trampoline(int argc, char *argv[]) { navigator::g_navigator->task_main(); } void Navigator::task_main() { bool have_geofence_position_data = false; /* Try to load the geofence: * if /fs/microsd/etc/geofence.txt load from this file * else clear geofence data in datamanager */ struct stat buffer; if (stat(GEOFENCE_FILENAME, &buffer) == 0) { PX4_INFO("Try to load geofence.txt"); _geofence.loadFromFile(GEOFENCE_FILENAME); } else { if (_geofence.clearDm() != OK) { mavlink_log_critical(&_mavlink_log_pub, "failed clearing geofence"); } } /* do subscriptions */ _global_pos_sub = orb_subscribe(ORB_ID(vehicle_global_position)); _local_pos_sub = orb_subscribe(ORB_ID(vehicle_local_position)); _gps_pos_sub = orb_subscribe(ORB_ID(vehicle_gps_position)); _sensor_combined_sub = orb_subscribe(ORB_ID(sensor_combined)); _fw_pos_ctrl_status_sub = orb_subscribe(ORB_ID(fw_pos_ctrl_status)); _vstatus_sub = orb_subscribe(ORB_ID(vehicle_status)); _land_detected_sub = orb_subscribe(ORB_ID(vehicle_land_detected)); _home_pos_sub = orb_subscribe(ORB_ID(home_position)); _onboard_mission_sub = orb_subscribe(ORB_ID(onboard_mission)); _offboard_mission_sub = orb_subscribe(ORB_ID(offboard_mission)); _param_update_sub = orb_subscribe(ORB_ID(parameter_update)); _vehicle_command_sub = orb_subscribe(ORB_ID(vehicle_command)); /* copy all topics first time */ vehicle_status_update(); vehicle_land_detected_update(); global_position_update(); local_position_update(); gps_position_update(); sensor_combined_update(); home_position_update(true); fw_pos_ctrl_status_update(true); params_update(); /* wakeup source(s) */ px4_pollfd_struct_t fds[1] = {}; /* Setup of loop */ fds[0].fd = _global_pos_sub; fds[0].events = POLLIN; bool global_pos_available_once = false; /* rate-limit global pos subscription to 20 Hz / 50 ms */ orb_set_interval(_global_pos_sub, 49); while (!_task_should_exit) { /* wait for up to 1000ms for data */ int pret = px4_poll(&fds[0], (sizeof(fds) / sizeof(fds[0])), 1000); if (pret == 0) { /* timed out - periodic check for _task_should_exit, etc. */ if (global_pos_available_once) { global_pos_available_once = false; PX4_WARN("global position timeout"); } /* Let the loop run anyway, don't do `continue` here. */ } else if (pret < 0) { /* this is undesirable but not much we can do - might want to flag unhappy status */ PX4_ERR("nav: poll error %d, %d", pret, errno); usleep(10000); continue; } else { if (fds[0].revents & POLLIN) { /* success, global pos is available */ global_position_update(); if (_geofence.getSource() == Geofence::GF_SOURCE_GLOBALPOS) { have_geofence_position_data = true; } global_pos_available_once = true; } } perf_begin(_loop_perf); bool updated; /* gps updated */ orb_check(_gps_pos_sub, &updated); if (updated) { gps_position_update(); if (_geofence.getSource() == Geofence::GF_SOURCE_GPS) { have_geofence_position_data = true; } } /* local position updated */ orb_check(_local_pos_sub, &updated); if (updated) { local_position_update(); } /* sensors combined updated */ orb_check(_sensor_combined_sub, &updated); if (updated) { sensor_combined_update(); } /* parameters updated */ orb_check(_param_update_sub, &updated); if (updated) { params_update(); } /* vehicle status updated */ orb_check(_vstatus_sub, &updated); if (updated) { vehicle_status_update(); } /* vehicle land detected updated */ orb_check(_land_detected_sub, &updated); if (updated) { vehicle_land_detected_update(); } /* navigation capabilities updated */ orb_check(_fw_pos_ctrl_status_sub, &updated); if (updated) { fw_pos_ctrl_status_update(); } /* home position updated */ orb_check(_home_pos_sub, &updated); if (updated) { home_position_update(); } orb_check(_vehicle_command_sub, &updated); if (updated) { vehicle_command_s cmd = {}; orb_copy(ORB_ID(vehicle_command), _vehicle_command_sub, &cmd); if (cmd.command == vehicle_command_s::VEHICLE_CMD_DO_REPOSITION) { struct position_setpoint_triplet_s *rep = get_reposition_triplet(); // store current position as previous position and goal as next rep->previous.yaw = get_global_position()->yaw; rep->previous.lat = get_global_position()->lat; rep->previous.lon = get_global_position()->lon; rep->previous.alt = get_global_position()->alt; rep->current.loiter_radius = get_loiter_radius(); rep->current.loiter_direction = 1; rep->current.type = position_setpoint_s::SETPOINT_TYPE_LOITER; // Go on and check which changes had been requested if (PX4_ISFINITE(cmd.param4)) { rep->current.yaw = cmd.param4; } else { rep->current.yaw = NAN; } if (PX4_ISFINITE(cmd.param5) && PX4_ISFINITE(cmd.param6)) { rep->current.lat = (cmd.param5 < 1000) ? cmd.param5 : cmd.param5 / (double)1e7; rep->current.lon = (cmd.param6 < 1000) ? cmd.param6 : cmd.param6 / (double)1e7; } else { rep->current.lat = get_global_position()->lat; rep->current.lon = get_global_position()->lon; } if (PX4_ISFINITE(cmd.param7)) { rep->current.alt = cmd.param7; } else { rep->current.alt = get_global_position()->alt; } rep->previous.valid = true; rep->current.valid = true; rep->next.valid = false; } else if (cmd.command == vehicle_command_s::VEHICLE_CMD_NAV_TAKEOFF) { struct position_setpoint_triplet_s *rep = get_takeoff_triplet(); // store current position as previous position and goal as next rep->previous.yaw = get_global_position()->yaw; rep->previous.lat = get_global_position()->lat; rep->previous.lon = get_global_position()->lon; rep->previous.alt = get_global_position()->alt; rep->current.loiter_radius = get_loiter_radius(); rep->current.loiter_direction = 1; rep->current.type = position_setpoint_s::SETPOINT_TYPE_TAKEOFF; if (home_position_valid()) { rep->current.yaw = cmd.param4; rep->previous.valid = true; } else { rep->current.yaw = get_local_position()->yaw; rep->previous.valid = false; } if (PX4_ISFINITE(cmd.param5) && PX4_ISFINITE(cmd.param6)) { rep->current.lat = (cmd.param5 < 1000) ? cmd.param5 : cmd.param5 / (double)1e7; rep->current.lon = (cmd.param6 < 1000) ? cmd.param6 : cmd.param6 / (double)1e7; } else { // If one of them is non-finite, reset both rep->current.lat = NAN; rep->current.lon = NAN; } rep->current.alt = cmd.param7; rep->current.valid = true; rep->next.valid = false; } else if (cmd.command == vehicle_command_s::VEHICLE_CMD_DO_LAND_START) { /* find NAV_CMD_DO_LAND_START in the mission and * use MAV_CMD_MISSION_START to start the mission there */ int land_start = _mission.find_offboard_land_start(); if (land_start != -1) { vehicle_command_s vcmd = {}; vcmd.target_system = get_vstatus()->system_id; vcmd.target_component = get_vstatus()->component_id; vcmd.command = vehicle_command_s::VEHICLE_CMD_MISSION_START; vcmd.param1 = land_start; vcmd.param2 = 0; publish_vehicle_cmd(vcmd); } else { PX4_WARN("planned landing not available"); } } else if (cmd.command == vehicle_command_s::VEHICLE_CMD_MISSION_START) { if (get_mission_result()->valid && PX4_ISFINITE(cmd.param1) && (cmd.param1 >= 0) && (cmd.param1 < _mission_result.seq_total)) { _mission.set_current_offboard_mission_index(cmd.param1); } } else if (cmd.command == vehicle_command_s::VEHICLE_CMD_DO_PAUSE_CONTINUE) { warnx("navigator: got pause/continue command"); } else if (cmd.command == vehicle_command_s::VEHICLE_CMD_DO_CHANGE_SPEED) { if (cmd.param2 > FLT_EPSILON) { // XXX not differentiating ground and airspeed yet set_cruising_speed(cmd.param2); } else { set_cruising_speed(); /* if no speed target was given try to set throttle */ if (cmd.param3 > FLT_EPSILON) { set_cruising_throttle(cmd.param3 / 100); } else { set_cruising_throttle(); } } } } /* Check geofence violation */ static hrt_abstime last_geofence_check = 0; if (have_geofence_position_data && (_geofence.getGeofenceAction() != geofence_result_s::GF_ACTION_NONE) && (hrt_elapsed_time(&last_geofence_check) > GEOFENCE_CHECK_INTERVAL)) { bool inside = _geofence.inside(_global_pos, _gps_pos, _sensor_combined.baro_alt_meter); last_geofence_check = hrt_absolute_time(); have_geofence_position_data = false; _geofence_result.timestamp = hrt_absolute_time(); _geofence_result.geofence_action = _geofence.getGeofenceAction(); _geofence_result.home_required = _geofence.isHomeRequired(); if (!inside) { /* inform other apps via the mission result */ _geofence_result.geofence_violated = true; /* Issue a warning about the geofence violation once */ if (!_geofence_violation_warning_sent) { mavlink_log_critical(&_mavlink_log_pub, "Geofence violation"); _geofence_violation_warning_sent = true; } } else { /* inform other apps via the mission result */ _geofence_result.geofence_violated = false; /* Reset the _geofence_violation_warning_sent field */ _geofence_violation_warning_sent = false; } publish_geofence_result(); } /* Do stuff according to navigation state set by commander */ switch (_vstatus.nav_state) { case vehicle_status_s::NAVIGATION_STATE_AUTO_MISSION: _pos_sp_triplet_published_invalid_once = false; _navigation_mode = &_mission; break; case vehicle_status_s::NAVIGATION_STATE_AUTO_LOITER: _pos_sp_triplet_published_invalid_once = false; _navigation_mode = &_loiter; break; case vehicle_status_s::NAVIGATION_STATE_AUTO_RCRECOVER: _pos_sp_triplet_published_invalid_once = false; _navigation_mode = &_rcLoss; break; case vehicle_status_s::NAVIGATION_STATE_AUTO_RTL: _pos_sp_triplet_published_invalid_once = false; _navigation_mode = &_rtl; break; case vehicle_status_s::NAVIGATION_STATE_AUTO_TAKEOFF: _pos_sp_triplet_published_invalid_once = false; _navigation_mode = &_takeoff; break; case vehicle_status_s::NAVIGATION_STATE_AUTO_LAND: _pos_sp_triplet_published_invalid_once = false; _navigation_mode = &_land; break; case vehicle_status_s::NAVIGATION_STATE_DESCEND: _pos_sp_triplet_published_invalid_once = false; _navigation_mode = &_land; break; case vehicle_status_s::NAVIGATION_STATE_AUTO_RTGS: _pos_sp_triplet_published_invalid_once = false; _navigation_mode = &_dataLinkLoss; break; case vehicle_status_s::NAVIGATION_STATE_AUTO_LANDENGFAIL: _pos_sp_triplet_published_invalid_once = false; _navigation_mode = &_engineFailure; break; case vehicle_status_s::NAVIGATION_STATE_AUTO_LANDGPSFAIL: _pos_sp_triplet_published_invalid_once = false; _navigation_mode = &_gpsFailure; break; case vehicle_status_s::NAVIGATION_STATE_AUTO_FOLLOW_TARGET: _pos_sp_triplet_published_invalid_once = false; _navigation_mode = &_follow_target; break; case vehicle_status_s::NAVIGATION_STATE_MANUAL: case vehicle_status_s::NAVIGATION_STATE_ACRO: case vehicle_status_s::NAVIGATION_STATE_ALTCTL: case vehicle_status_s::NAVIGATION_STATE_POSCTL: case vehicle_status_s::NAVIGATION_STATE_TERMINATION: case vehicle_status_s::NAVIGATION_STATE_OFFBOARD: case vehicle_status_s::NAVIGATION_STATE_STAB: default: _pos_sp_triplet_published_invalid_once = false; _navigation_mode = nullptr; _can_loiter_at_sp = false; break; } /* iterate through navigation modes and set active/inactive for each */ for (unsigned int i = 0; i < NAVIGATOR_MODE_ARRAY_SIZE; i++) { _navigation_mode_array[i]->run(_navigation_mode == _navigation_mode_array[i]); } /* if we landed and have not received takeoff setpoint then stay in idle */ if (_land_detected.landed && !((_vstatus.nav_state == vehicle_status_s::NAVIGATION_STATE_AUTO_TAKEOFF) || (_vstatus.nav_state == vehicle_status_s::NAVIGATION_STATE_AUTO_MISSION))) { _pos_sp_triplet.current.type = position_setpoint_s::SETPOINT_TYPE_IDLE; _pos_sp_triplet.current.valid = true; _pos_sp_triplet.previous.valid = false; _pos_sp_triplet.next.valid = false; } /* if nothing is running, set position setpoint triplet invalid once */ if (_navigation_mode == nullptr && !_pos_sp_triplet_published_invalid_once) { _pos_sp_triplet_published_invalid_once = true; _pos_sp_triplet.previous.valid = false; _pos_sp_triplet.current.valid = false; _pos_sp_triplet.next.valid = false; _pos_sp_triplet_updated = true; } if (_pos_sp_triplet_updated) { _pos_sp_triplet.timestamp = hrt_absolute_time(); publish_position_setpoint_triplet(); _pos_sp_triplet_updated = false; } if (_mission_result_updated) { publish_mission_result(); _mission_result_updated = false; } perf_end(_loop_perf); } PX4_INFO("exiting"); _navigator_task = -1; } int Navigator::start() { ASSERT(_navigator_task == -1); /* start the task */ _navigator_task = px4_task_spawn_cmd("navigator", SCHED_DEFAULT, SCHED_PRIORITY_DEFAULT + 5, 1800, (px4_main_t)&Navigator::task_main_trampoline, nullptr); if (_navigator_task < 0) { warn("task start failed"); return -errno; } return OK; } void Navigator::status() { if (_geofence.valid()) { PX4_INFO("Geofence is valid"); } else { PX4_INFO("Geofence not set (no /etc/geofence.txt on microsd) or not valid"); } } void Navigator::publish_position_setpoint_triplet() { /* do not publish an empty triplet */ if (!_pos_sp_triplet.current.valid) { return; } /* lazily publish the position setpoint triplet only once available */ if (_pos_sp_triplet_pub != nullptr) { orb_publish(ORB_ID(position_setpoint_triplet), _pos_sp_triplet_pub, &_pos_sp_triplet); } else { _pos_sp_triplet_pub = orb_advertise(ORB_ID(position_setpoint_triplet), &_pos_sp_triplet); } } float Navigator::get_default_acceptance_radius() { return _param_acceptance_radius.get(); } float Navigator::get_acceptance_radius() { return get_acceptance_radius(_param_acceptance_radius.get()); } float Navigator::get_altitude_acceptance_radius() { if (!get_vstatus()->is_rotary_wing) { return _param_fw_alt_acceptance_radius.get(); } else { return _param_mc_alt_acceptance_radius.get(); } } float Navigator::get_cruising_speed() { /* there are three options: The mission-requested cruise speed, or the current hover / plane speed */ if (_vstatus.is_rotary_wing) { if (is_planned_mission() && _mission_cruising_speed_mc > 0.0f) { return _mission_cruising_speed_mc; } else { return -1.0f; } } else { if (is_planned_mission() && _mission_cruising_speed_fw > 0.0f) { return _mission_cruising_speed_fw; } else { return -1.0f; } } } void Navigator::set_cruising_speed(float speed) { if (_vstatus.is_rotary_wing) { _mission_cruising_speed_mc = speed; } else { _mission_cruising_speed_fw = speed; } } void Navigator::reset_cruising_speed() { _mission_cruising_speed_mc = -1.0f; _mission_cruising_speed_fw = -1.0f; } float Navigator::get_cruising_throttle() { /* Return the mission-requested cruise speed, or default FW_THR_CRUISE value */ if (_mission_throttle > FLT_EPSILON) { return _mission_throttle; } else { return -1.0f; } } float Navigator::get_acceptance_radius(float mission_item_radius) { float radius = mission_item_radius; // XXX only use navigation capabilities for now // when in fixed wing mode // this might need locking against a commanded transition // so that a stale _vstatus doesn't trigger an accepted mission item. if (!_vstatus.is_rotary_wing && !_vstatus.in_transition_mode) { if ((hrt_elapsed_time(&_fw_pos_ctrl_status.timestamp) < 5000000) && (_fw_pos_ctrl_status.turn_distance > radius)) { radius = _fw_pos_ctrl_status.turn_distance; } } return radius; } void Navigator::add_fence_point(int argc, char *argv[]) { _geofence.addPoint(argc, argv); } void Navigator::load_fence_from_file(const char *filename) { _geofence.loadFromFile(filename); } bool Navigator::abort_landing() { bool should_abort = false; if (!_vstatus.is_rotary_wing && !_vstatus.in_transition_mode) { if (hrt_elapsed_time(&_fw_pos_ctrl_status.timestamp) < 1000000) { if (get_position_setpoint_triplet()->current.valid && get_position_setpoint_triplet()->current.type == position_setpoint_s::SETPOINT_TYPE_LAND) { should_abort = _fw_pos_ctrl_status.abort_landing; } } } return should_abort; } static void usage() { PX4_INFO("usage: navigator {start|stop|status|fence|fencefile}"); } int navigator_main(int argc, char *argv[]) { if (argc < 2) { usage(); return 1; } if (!strcmp(argv[1], "start")) { if (navigator::g_navigator != nullptr) { PX4_WARN("already running"); return 1; } navigator::g_navigator = new Navigator; if (navigator::g_navigator == nullptr) { PX4_ERR("alloc failed"); return 1; } if (OK != navigator::g_navigator->start()) { delete navigator::g_navigator; navigator::g_navigator = nullptr; PX4_ERR("start failed"); return 1; } return 0; } if (navigator::g_navigator == nullptr) { PX4_INFO("not running"); return 1; } if (!strcmp(argv[1], "stop")) { delete navigator::g_navigator; navigator::g_navigator = nullptr; } else if (!strcmp(argv[1], "status")) { navigator::g_navigator->status(); } else if (!strcmp(argv[1], "fence")) { navigator::g_navigator->add_fence_point(argc - 2, argv + 2); } else if (!strcmp(argv[1], "fencefile")) { navigator::g_navigator->load_fence_from_file(GEOFENCE_FILENAME); } else { usage(); return 1; } return 0; } void Navigator::publish_mission_result() { _mission_result.timestamp = hrt_absolute_time(); _mission_result.instance_count = _mission_instance_count; /* lazily publish the mission result only once available */ if (_mission_result_pub != nullptr) { /* publish mission result */ orb_publish(ORB_ID(mission_result), _mission_result_pub, &_mission_result); } else { /* advertise and publish */ _mission_result_pub = orb_advertise(ORB_ID(mission_result), &_mission_result); } // Don't reset current waypoint because it won't be updated e.g. if not in mission mode // however, the current is still valid and therefore helpful for ground stations. //_mission_result.seq_current = 0; /* reset some of the flags */ _mission_result.reached = false; _mission_result.item_do_jump_changed = false; _mission_result.item_changed_index = 0; _mission_result.item_do_jump_remaining = 0; _mission_result.valid = true; } void Navigator::publish_geofence_result() { /* lazily publish the geofence result only once available */ if (_geofence_result_pub != nullptr) { /* publish mission result */ orb_publish(ORB_ID(geofence_result), _geofence_result_pub, &_geofence_result); } else { /* advertise and publish */ _geofence_result_pub = orb_advertise(ORB_ID(geofence_result), &_geofence_result); } } void Navigator::publish_att_sp() { /* lazily publish the attitude sp only once available */ if (_att_sp_pub != nullptr) { /* publish att sp*/ orb_publish(ORB_ID(vehicle_attitude_setpoint), _att_sp_pub, &_att_sp); } else { /* advertise and publish */ _att_sp_pub = orb_advertise(ORB_ID(vehicle_attitude_setpoint), &_att_sp); } } void Navigator::publish_vehicle_cmd(const struct vehicle_command_s &vcmd) { if (_vehicle_cmd_pub != nullptr) { orb_publish(ORB_ID(vehicle_command), _vehicle_cmd_pub, &vcmd); } else { _vehicle_cmd_pub = orb_advertise_queue(ORB_ID(vehicle_command), &vcmd, vehicle_command_s::ORB_QUEUE_LENGTH); } } void Navigator::set_mission_failure(const char *reason) { if (!_mission_result.failure) { _mission_result.failure = true; set_mission_result_updated(); mavlink_log_critical(&_mavlink_log_pub, "%s", reason); } }
#include"../../include/fast_io.h" #include"../../include/fast_io_device.h" #include"../../include/fast_io_legacy.h" int main() { fast_io::c_file cf(fast_io::io_cookie,"wb",fast_io::out); fprintf(cf.native_handle(),"Hello World from fprintf, number: %d\n",5); println(cf,"Hello World from fast_io::println, number: ",100); }
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/bind.h" #include "base/callback.h" #include "base/files/file_util.h" #include "base/logging.h" #include "base/path_service.h" #include "base/rand_util.h" #include "base/run_loop.h" #include "base/strings/string_util.h" #include "base/sys_info.h" #include "dart/runtime/include/dart_api.h" #include "dart/runtime/include/dart_native_api.h" #include "mojo/common/message_pump_mojo.h" #include "mojo/dart/embedder/builtin.h" #include "mojo/dart/embedder/dart_controller.h" #include "mojo/dart/embedder/mojo_dart_state.h" #include "mojo/dart/embedder/vmservice.h" #include "mojo/public/c/system/core.h" #include "tonic/dart_converter.h" #include "tonic/dart_debugger.h" #include "tonic/dart_dependency_catcher.h" #include "tonic/dart_error.h" #include "tonic/dart_library_loader.h" #include "tonic/dart_library_provider.h" #include "tonic/dart_library_provider_files.h" #include "tonic/dart_library_provider_network.h" namespace mojo { namespace dart { extern const uint8_t* vm_isolate_snapshot_buffer; extern const uint8_t* isolate_snapshot_buffer; static const char* kAsyncLibURL = "dart:async"; static const char* kInternalLibURL = "dart:_internal"; static const char* kIsolateLibURL = "dart:isolate"; static const char* kCoreLibURL = "dart:core"; static Dart_Handle SetWorkingDirectory(Dart_Handle builtin_lib) { base::FilePath current_dir; PathService::Get(base::DIR_CURRENT, &current_dir); const int kNumArgs = 1; Dart_Handle dart_args[kNumArgs]; std::string current_dir_string = current_dir.AsUTF8Unsafe(); dart_args[0] = Dart_NewStringFromUTF8( reinterpret_cast<const uint8_t*>(current_dir_string.data()), current_dir_string.length()); return Dart_Invoke(builtin_lib, Dart_NewStringFromCString("_setWorkingDirectory"), kNumArgs, dart_args); } static Dart_Handle ResolveScriptUri(Dart_Handle builtin_lib, Dart_Handle uri) { const int kNumArgs = 1; Dart_Handle dart_args[kNumArgs]; dart_args[0] = uri; return Dart_Invoke(builtin_lib, Dart_NewStringFromCString("_resolveScriptUri"), kNumArgs, dart_args); } static Dart_Handle PrepareIsolateLibraries(const std::string& package_root, const std::string& script_uri) { // First ensure all required libraries are available. Dart_Handle builtin_lib = Builtin::GetLibrary(Builtin::kBuiltinLibrary); Dart_Handle url = Dart_NewStringFromCString(kInternalLibURL); DART_CHECK_VALID(url); Dart_Handle internal_lib = Dart_LookupLibrary(url); DART_CHECK_VALID(internal_lib); url = Dart_NewStringFromCString(kCoreLibURL); DART_CHECK_VALID(url); Dart_Handle core_lib = Dart_LookupLibrary(url); DART_CHECK_VALID(internal_lib); url = Dart_NewStringFromCString(kAsyncLibURL); DART_CHECK_VALID(url); Dart_Handle async_lib = Dart_LookupLibrary(url); DART_CHECK_VALID(async_lib); url = Dart_NewStringFromCString(kIsolateLibURL); DART_CHECK_VALID(url); Dart_Handle isolate_lib = Dart_LookupLibrary(url); DART_CHECK_VALID(isolate_lib); Dart_Handle mojo_internal_lib = Builtin::GetLibrary(Builtin::kMojoInternalLibrary); DART_CHECK_VALID(mojo_internal_lib); // We need to ensure that all the scripts loaded so far are finalized // as we are about to invoke some Dart code below to setup closures. Dart_Handle result = Dart_FinalizeLoading(false); DART_CHECK_VALID(result); // Import dart:_internal into dart:mojo.builtin for setting up hooks. result = Dart_LibraryImportLibrary(builtin_lib, internal_lib, Dart_Null()); DART_CHECK_VALID(result); // Setup the internal library's 'internalPrint' function. Dart_Handle print = Dart_Invoke(builtin_lib, Dart_NewStringFromCString("_getPrintClosure"), 0, nullptr); DART_CHECK_VALID(print); result = Dart_SetField(internal_lib, Dart_NewStringFromCString("_printClosure"), print); DART_CHECK_VALID(result); DART_CHECK_VALID(Dart_Invoke( builtin_lib, Dart_NewStringFromCString("_setupHooks"), 0, nullptr)); DART_CHECK_VALID(Dart_Invoke( isolate_lib, Dart_NewStringFromCString("_setupHooks"), 0, nullptr)); // Setup the 'scheduleImmediate' closure. Dart_Handle schedule_immediate_closure = Dart_Invoke( isolate_lib, Dart_NewStringFromCString("_getIsolateScheduleImmediateClosure"), 0, nullptr); Dart_Handle schedule_args[1]; schedule_args[0] = schedule_immediate_closure; result = Dart_Invoke( async_lib, Dart_NewStringFromCString("_setScheduleImmediateClosure"), 1, schedule_args); DART_CHECK_VALID(result); // Set current working directory. result = SetWorkingDirectory(builtin_lib); if (Dart_IsError(result)) { return result; } // Set script entry uri. Dart_Handle uri = Dart_NewStringFromUTF8( reinterpret_cast<const uint8_t*>(script_uri.c_str()), script_uri.length()); DART_CHECK_VALID(uri); result = ResolveScriptUri(builtin_lib, uri); // Set up package root. result = Dart_NewStringFromUTF8( reinterpret_cast<const uint8_t*>(package_root.c_str()), package_root.length()); DART_CHECK_VALID(result); const int kNumArgs = 1; Dart_Handle dart_args[kNumArgs]; dart_args[0] = result; result = Dart_Invoke(builtin_lib, Dart_NewStringFromCString("_setPackageRoot"), kNumArgs, dart_args); DART_CHECK_VALID(result); // Setup the uriBase with the base uri of the mojo app. Dart_Handle uri_base = Dart_Invoke( builtin_lib, Dart_NewStringFromCString("_getUriBaseClosure"), 0, nullptr); DART_CHECK_VALID(uri_base); result = Dart_SetField(core_lib, Dart_NewStringFromCString("_uriBaseClosure"), uri_base); DART_CHECK_VALID(result); return result; } static const intptr_t kStartIsolateArgumentsLength = 2; static void SetupStartIsolateArguments( const DartControllerConfig& config, Dart_Handle main_closure, Dart_Handle* start_isolate_args) { // start_isolate_args: // [0] -> main closure // [1] -> args list. // args list: // [0] -> mojo handle. // [1] -> script uri // [2] -> list of script arguments in config. start_isolate_args[0] = main_closure; // entryPoint DART_CHECK_VALID(start_isolate_args[0]); start_isolate_args[1] = Dart_NewList(3); // args DART_CHECK_VALID(start_isolate_args[1]); Dart_Handle script_uri = Dart_NewStringFromUTF8( reinterpret_cast<const uint8_t*>(config.script_uri.data()), config.script_uri.length()); Dart_ListSetAt(start_isolate_args[1], 0, Dart_NewInteger(config.handle)); Dart_ListSetAt(start_isolate_args[1], 1, script_uri); Dart_Handle script_args = Dart_NewList(config.script_flags_count); DART_CHECK_VALID(script_args); Dart_ListSetAt(start_isolate_args[1], 2, script_args); for (intptr_t i = 0; i < config.script_flags_count; i++) { Dart_ListSetAt(script_args, i, Dart_NewStringFromCString(config.script_flags[i])); } } static void RunIsolate(Dart_Isolate isolate, const DartControllerConfig& config) { tonic::DartIsolateScope isolate_scope(isolate); tonic::DartApiScope api_scope; Dart_Handle result; // Load the root library into the builtin library so that main can be found. Dart_Handle builtin_lib = Builtin::GetLibrary(Builtin::kBuiltinLibrary); DART_CHECK_VALID(builtin_lib); Dart_Handle root_lib = Dart_RootLibrary(); DART_CHECK_VALID(root_lib); result = Dart_LibraryImportLibrary(builtin_lib, root_lib, Dart_Null()); DART_CHECK_VALID(result); if (config.compile_all) { result = Dart_CompileAll(); DART_CHECK_VALID(result); } Dart_Handle main_closure = Dart_Invoke( builtin_lib, Dart_NewStringFromCString("_getMainClosure"), 0, nullptr); DART_CHECK_VALID(main_closure); Dart_Handle start_isolate_args[kStartIsolateArgumentsLength]; SetupStartIsolateArguments(config, main_closure, &start_isolate_args[0]); Dart_Handle isolate_lib = Dart_LookupLibrary(Dart_NewStringFromCString(kIsolateLibURL)); DART_CHECK_VALID(isolate_lib); result = Dart_Invoke(isolate_lib, Dart_NewStringFromCString("_startMainIsolate"), kStartIsolateArgumentsLength, start_isolate_args); DART_CHECK_VALID(result); result = Dart_RunLoop(); tonic::LogIfError(result); DART_CHECK_VALID(result); } Dart_Handle DartController::LibraryTagHandler(Dart_LibraryTag tag, Dart_Handle library, Dart_Handle url) { if (tag == Dart_kCanonicalizeUrl) { std::string string = tonic::StdStringFromDart(url); if (StartsWithASCII(string, "dart:", true)) return url; } return tonic::DartLibraryLoader::HandleLibraryTag(tag, library, url); } Dart_Isolate DartController::CreateIsolateHelper( void* dart_app, bool strict_compilation, IsolateCallbacks callbacks, const std::string& script_uri, const std::string& package_root, char** error, bool use_network_loader) { auto isolate_data = new MojoDartState(dart_app, strict_compilation, callbacks, script_uri, package_root); Dart_Isolate isolate = Dart_CreateIsolate(script_uri.c_str(), "main", isolate_snapshot_buffer, nullptr, isolate_data, error); if (isolate == nullptr) { delete isolate_data; return nullptr; } Dart_ExitIsolate(); isolate_data->SetIsolate(isolate); if (service_connector_ != nullptr) { // This is not supported in the unit test harness. isolate_data->BindNetworkService( service_connector_->ConnectToService( DartControllerServiceConnector::kNetworkServiceId)); } // Setup isolate and load script. { tonic::DartIsolateScope isolate_scope(isolate); tonic::DartApiScope api_scope; // Setup loader. const char* package_root_str = nullptr; if (package_root.empty()) { package_root_str = "/"; } else { package_root_str = package_root.c_str(); } if (use_network_loader) { mojo::NetworkService* network_service = isolate_data->network_service(); isolate_data->set_library_provider( new tonic::DartLibraryProviderNetwork(network_service)); } else { isolate_data->set_library_provider( new tonic::DartLibraryProviderFiles( base::FilePath(package_root_str))); } Dart_Handle result = Dart_SetLibraryTagHandler(LibraryTagHandler); DART_CHECK_VALID(result); // Toggle checked mode. Dart_IsolateSetStrictCompilation(strict_compilation); // Setup the native resolvers for the builtin libraries as they are not set // up when the snapshot is read. CHECK(isolate_snapshot_buffer != nullptr); Builtin::PrepareLibrary(Builtin::kBuiltinLibrary); Builtin::PrepareLibrary(Builtin::kMojoInternalLibrary); Builtin::PrepareLibrary(Builtin::kDartMojoIoLibrary); // TODO(johnmccutchan): Remove? if (!callbacks.create.is_null()) { DCHECK(false); callbacks.create.Run(script_uri.c_str(), "main", package_root.c_str(), isolate_data, error); } // Prepare builtin and its dependent libraries. result = PrepareIsolateLibraries(package_root, script_uri); DART_CHECK_VALID(result); // The VM is creating the service isolate. if (Dart_IsServiceIsolate(isolate)) { const intptr_t port = SupportDartMojoIo() ? 0 : -1; InitializeDartMojoIo(); StartHandleWatcherIsolate(); if (!VmService::Setup("127.0.0.1", port)) { *error = strdup(VmService::GetErrorMessage()); return nullptr; } return isolate; } if ((script_uri == "vm-service") || (script_uri == "stop-handle-watcher")) { // Special case for starting and stopping the the handle watcher isolate. LoadEmptyScript(script_uri); } else { LoadScript(script_uri, isolate_data->library_provider()); } InitializeDartMojoIo(); } // Make the isolate runnable so that it is ready to handle messages. bool retval = Dart_IsolateMakeRunnable(isolate); if (!retval) { *error = strdup("Invalid isolate state - Unable to make it runnable"); Dart_EnterIsolate(isolate); Dart_ShutdownIsolate(); return nullptr; } DCHECK(Dart_CurrentIsolate() == nullptr); return isolate; } Dart_Isolate DartController::IsolateCreateCallback(const char* script_uri, const char* main, const char* package_root, Dart_IsolateFlags* flags, void* callback_data, char** error) { auto parent_isolate_data = MojoDartState::Cast(callback_data); std::string script_uri_string; std::string package_root_string; if (script_uri == nullptr) { if (callback_data == nullptr) { *error = strdup("Invalid 'callback_data' - Unable to spawn new isolate"); return nullptr; } script_uri_string = parent_isolate_data->script_uri(); } else { script_uri_string = std::string(script_uri); } if (package_root == nullptr) { if (parent_isolate_data != nullptr) { package_root_string = parent_isolate_data->package_root(); } } else { package_root_string = std::string(package_root); } // Inherit parameters from parent isolate (if any). void* dart_app = nullptr; bool strict_compilation = true; // TODO(johnmccutchan): Use parent's setting? bool use_network_loader = false; IsolateCallbacks callbacks; if (parent_isolate_data != nullptr) { dart_app = parent_isolate_data->application_data(); strict_compilation = parent_isolate_data->strict_compilation(); callbacks = parent_isolate_data->callbacks(); } return CreateIsolateHelper(dart_app, strict_compilation, callbacks, script_uri_string, package_root_string, error, use_network_loader); } void DartController::IsolateShutdownCallback(void* callback_data) { { tonic::DartApiScope api_scope; ShutdownDartMojoIo(); } auto isolate_data = MojoDartState::Cast(callback_data); if (!isolate_data->callbacks().shutdown.is_null()) { isolate_data->callbacks().shutdown.Run(callback_data); } delete isolate_data; } void DartController::UnhandledExceptionCallback(Dart_Handle error) { auto isolate_data = MojoDartState::Current(); if (!isolate_data->callbacks().exception.is_null()) { // TODO(zra): Instead of passing an error handle, it may make life easier // for clients if we pass any error string here instead. isolate_data->callbacks().exception.Run(error); } // Close handles generated by the isolate. std::set<MojoHandle>& handles = isolate_data->unclosed_handles(); for (auto it = handles.begin(); it != handles.end(); ++it) { MojoClose((*it)); } handles.clear(); } bool DartController::initialized_ = false; bool DartController::service_isolate_running_ = false; bool DartController::strict_compilation_ = false; DartControllerServiceConnector* DartController::service_connector_ = nullptr; base::Lock DartController::lock_; bool DartController::SupportDartMojoIo() { return service_connector_ != nullptr; } void DartController::InitializeDartMojoIo() { Dart_Isolate current_isolate = Dart_CurrentIsolate(); CHECK(current_isolate != nullptr); if (!SupportDartMojoIo()) { return; } CHECK(service_connector_ != nullptr); MojoHandle network_service_mojo_handle = MOJO_HANDLE_INVALID; network_service_mojo_handle = service_connector_->ConnectToService( DartControllerServiceConnector::kNetworkServiceId); if (network_service_mojo_handle == MOJO_HANDLE_INVALID) { // Not supported. return; } // Pass handle into 'dart:io' library. Dart_Handle mojo_io_library = Builtin::GetLibrary(Builtin::kDartMojoIoLibrary); CHECK(!Dart_IsError(mojo_io_library)); Dart_Handle method_name = Dart_NewStringFromCString("_initialize"); CHECK(!Dart_IsError(method_name)); Dart_Handle network_service_handle = Dart_NewInteger(network_service_mojo_handle); CHECK(!Dart_IsError(network_service_handle)); Dart_Handle result = Dart_Invoke(mojo_io_library, method_name, 1, &network_service_handle); CHECK(!Dart_IsError(result)); } void DartController::ShutdownDartMojoIo() { Dart_Isolate current_isolate = Dart_CurrentIsolate(); CHECK(current_isolate != nullptr); if (!SupportDartMojoIo()) { return; } Dart_Handle mojo_io_library = Builtin::GetLibrary(Builtin::kDartMojoIoLibrary); CHECK(!Dart_IsError(mojo_io_library)); Dart_Handle method_name = Dart_NewStringFromCString("_shutdown"); CHECK(!Dart_IsError(method_name)); Dart_Handle result = Dart_Invoke(mojo_io_library, method_name, 0, nullptr); if (Dart_IsError(result)) { Dart_PropagateError(result); } } void DartController::StartHandleWatcherIsolate() { Dart_Handle result; // Start the Mojo handle watcher isolate. Dart_Handle mojo_core_lib = Builtin::GetLibrary(Builtin::kMojoInternalLibrary); DART_CHECK_VALID(mojo_core_lib); Dart_Handle handle_watcher_type = Dart_GetType( mojo_core_lib, Dart_NewStringFromCString("MojoHandleWatcher"), 0, nullptr); DART_CHECK_VALID(handle_watcher_type); result = Dart_Invoke( handle_watcher_type, Dart_NewStringFromCString("_start"), 0, nullptr); DART_CHECK_VALID(result); } // TODO(johnmccutchan): Move handle watcher shutdown into the service isolate // once the VM can shutdown cleanly. void DartController::StopHandleWatcherIsolate() { // Spin up an isolate to initiate the handle watcher shutdown. IsolateCallbacks callbacks; char* error; Dart_Isolate shutdown_isolate = CreateIsolateHelper( nullptr, false, callbacks, "stop-handle-watcher", "", &error, false); CHECK(shutdown_isolate); Dart_EnterIsolate(shutdown_isolate); Dart_EnterScope(); Dart_Handle result; // Stop the Mojo handle watcher isolate. Dart_Handle mojo_core_lib = Builtin::GetLibrary(Builtin::kMojoInternalLibrary); DART_CHECK_VALID(mojo_core_lib); Dart_Handle handle_watcher_type = Dart_GetType( mojo_core_lib, Dart_NewStringFromCString("MojoHandleWatcher"), 0, nullptr); DART_CHECK_VALID(handle_watcher_type); result = Dart_Invoke( handle_watcher_type, Dart_NewStringFromCString("_stop"), 0, nullptr); DART_CHECK_VALID(result); // Run until the handle watcher isolate has exited. result = Dart_RunLoop(); tonic::LogIfError(result); DART_CHECK_VALID(result); Dart_ExitScope(); Dart_ShutdownIsolate(); } void DartController::InitVmIfNeeded(Dart_EntropySource entropy, const char** vm_flags, int vm_flags_count) { base::AutoLock al(lock_); if (initialized_) { return; } const int kNumFlags = vm_flags_count + 1; const char* flags[kNumFlags]; // TODO(zra): Fix Dart VM Shutdown race. // There is a bug in Dart VM shutdown which causes its thread pool threads // to potentially fail to exit when the rest of the VM is going down. This // results in a segfault if they begin running again after the Dart // embedder has been unloaded. Setting this flag to 0 ensures that these // threads sleep forever instead of waking up and trying to run code // that isn't there anymore. flags[0] = "--worker-timeout-millis=0"; for (int i = 0; i < vm_flags_count; ++i) { flags[i + 1] = vm_flags[i]; } bool result = Dart_SetVMFlags(kNumFlags, flags); CHECK(result); // This should be called before calling Dart_Initialize. tonic::DartDebugger::InitDebugger(); result = Dart_Initialize(vm_isolate_snapshot_buffer, IsolateCreateCallback, nullptr, // Isolate interrupt callback. UnhandledExceptionCallback, IsolateShutdownCallback, // File IO callbacks. nullptr, nullptr, nullptr, nullptr, entropy); CHECK(result); // By waiting for the load port, we ensure that the service isolate is fully // running before returning. Dart_ServiceWaitForLoadPort(); initialized_ = true; service_isolate_running_ = true; } void DartController::BlockWaitingForDependencies( tonic::DartLibraryLoader* loader, const std::unordered_set<tonic::DartDependency*>& dependencies) { { scoped_refptr<base::SingleThreadTaskRunner> task_runner = base::MessageLoop::current()->task_runner(); base::RunLoop run_loop; task_runner->PostTask( FROM_HERE, base::Bind( &tonic::DartLibraryLoader::WaitForDependencies, base::Unretained(loader), dependencies, base::Bind( base::IgnoreResult(&base::SingleThreadTaskRunner::PostTask), task_runner.get(), FROM_HERE, run_loop.QuitClosure()))); run_loop.Run(); } } void DartController::LoadEmptyScript(const std::string& script_uri) { Dart_Handle uri = Dart_NewStringFromUTF8( reinterpret_cast<const uint8_t*>(script_uri.c_str()), script_uri.length()); DART_CHECK_VALID(uri); Dart_Handle script_source = Dart_NewStringFromCString(""); DART_CHECK_VALID(script_source); Dart_Handle result = Dart_LoadScript(uri, script_source, 0, 0); DART_CHECK_VALID(result); tonic::LogIfError(Dart_FinalizeLoading(true)); } void DartController::InnerLoadScript( const std::string& script_uri, tonic::DartLibraryProvider* library_provider) { // When spawning isolates, Dart expects the script loading to be completed // before returning from the isolate creation callback. The mojo dart // controller also expects the isolate to be finished loading a script // before the isolate creation callback returns. // We block here by creating a nested message pump and waiting for the load // to complete. DCHECK(base::MessageLoop::current() != nullptr); base::MessageLoop::ScopedNestableTaskAllower allow( base::MessageLoop::current()); // Initiate the load. auto dart_state = tonic::DartState::Current(); DCHECK(library_provider != nullptr); tonic::DartLibraryLoader& loader = dart_state->library_loader(); loader.set_library_provider(library_provider); std::unordered_set<tonic::DartDependency*> dependencies; { tonic::DartDependencyCatcher dependency_catcher(loader); loader.LoadScript(script_uri); // Copy dependencies before dependency_catcher goes out of scope. dependencies = std::unordered_set<tonic::DartDependency*>( dependency_catcher.dependencies()); } // Run inner message loop. BlockWaitingForDependencies(&loader, dependencies); // Finalize loading. tonic::LogIfError(Dart_FinalizeLoading(true)); } void DartController::LoadScript(const std::string& script_uri, tonic::DartLibraryProvider* library_provider) { if (base::MessageLoop::current() == nullptr) { // Threads running on the Dart thread pool may not have a message loop, // we rely on a message loop during loading. Create a temporary one // here. base::MessageLoop message_loop(common::MessagePumpMojo::Create()); InnerLoadScript(script_uri, library_provider); } else { // Thread has a message loop, use it. InnerLoadScript(script_uri, library_provider); } } bool DartController::RunSingleDartScript(const DartControllerConfig& config) { InitVmIfNeeded(config.entropy, config.vm_flags, config.vm_flags_count); Dart_Isolate isolate = CreateIsolateHelper(config.application_data, config.strict_compilation, config.callbacks, config.script_uri, config.package_root, config.error, config.use_network_loader); if (isolate == nullptr) { return false; } RunIsolate(isolate, config); // Cleanup. Dart_EnterIsolate(isolate); Dart_ShutdownIsolate(); Dart_Cleanup(); return true; } static bool generateEntropy(uint8_t* buffer, intptr_t length) { base::RandBytes(reinterpret_cast<void*>(buffer), length); return true; } bool DartController::Initialize( DartControllerServiceConnector* service_connector, bool strict_compilation) { service_connector_ = service_connector; strict_compilation_ = strict_compilation; InitVmIfNeeded(generateEntropy, nullptr, 0); return true; } bool DartController::RunDartScript(const DartControllerConfig& config) { CHECK(service_isolate_running_); const bool strict = strict_compilation_ || config.strict_compilation; Dart_Isolate isolate = CreateIsolateHelper(config.application_data, strict, config.callbacks, config.script_uri, config.package_root, config.error, config.use_network_loader); if (isolate == nullptr) { return false; } RunIsolate(isolate, config); // Cleanup. Dart_EnterIsolate(isolate); Dart_ShutdownIsolate(); return true; } void DartController::Shutdown() { base::AutoLock al(lock_); if (!initialized_) { return; } StopHandleWatcherIsolate(); Dart_Cleanup(); service_isolate_running_ = false; initialized_ = false; } } // namespace apps } // namespace mojo
/* Problem Statement: https://leetcode.com/problems/excel-sheet-column-number/ Time: O(n) Space: O(1) Author: Mohammed Shoaib, github.com/Mohammed-Shoaib */ class Solution { public: int titleToNumber(string s) { return accumulate(s.begin(), s.end(), 0, [](int& num, char& c) { return 26 * num + (c - 'A' + 1); }); } };
#include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/random.hpp> #include "Generators\NameGenerator.h" #include "Generators\ColorGenerator.h" #include "CivilianNPC.h" CivilianNPC::CivilianNPC() : NPC(NameGenerator::GetRandomName(), "", (NPC::Shape)glm::linearRand(0, (int)NPC::Shape::COUNT - 1), ColorGenerator::GetCivilianColor(), 5), // TODO configurable state(State::Loitering) {} std::string CivilianNPC::GetDescription() const { std::string stateString("acting unusually."); switch (state) { case State::Criminalizing: stateString = "breaking local laws."; break; case State::Fleeing: stateString = "running away"; break; case State::Loitering: stateString = "hanging out."; break; case State::Traveling: stateString = "on the move."; break; case State::Vigilanteeing: default: stateString = "fighting crime."; break; } return std::string("Civilian is currently ") + stateString; } void CivilianNPC::Update(float gameTime, float elapsedTime) { NPC::Update(gameTime, elapsedTime); // TODO perform action based on state. }
#include "pages/Pages.h" #include "setup-html.h" #include <LinkedList.hpp> #include <WifiHandler.hpp> String setupProcessor(const String &var) { String selected = F("selected"); String checked = F("checked"); if (var == A_admin_password) return String(appcfg.admin_password); // Wifi if (var == "wifi_mode_ap" && appcfg.wifi_mode == WIFI_AP) return selected; if (var == "wifi_mode_station" && appcfg.wifi_mode == WIFI_STA) return selected; if (var == "scanned_network_options") { ListNode *node = wifiHandler.getScannedNetworks(); String options = ""; while (node != NULL) { options += F("<option>"); options += String(*node->value); options += F("</option>"); node = node->next; } return options; } if (var == A_wifi_ssid) return String(appcfg.wifi_ssid); if (var == A_wifi_password) return String(appcfg.wifi_password); // Network if (var == "net_mode_dhcp" && appcfg.net_mode == NET_MODE_DHCP) return selected; if (var == "net_mode_static" && appcfg.net_mode == NET_MODE_STATIC) return selected; if (var == A_net_host) return String(appcfg.net_host); if (var == A_net_gateway) return String(appcfg.net_gateway); if (var == A_net_mask) return String(appcfg.net_mask); if (var == A_net_dns) return String(appcfg.net_dns); // OTA if (var == A_ota_hostname) return String(appcfg.ota_hostname); if (var == A_ota_password) return String(appcfg.ota_password); // OpenHAB if (var == A_ohab_enabled && appcfg.ohab_enabled == true) return checked; if (var == "ohab_v1" && appcfg.ohab_version == 1) return selected; if (var == "ohab_v2" && appcfg.ohab_version == 2) return selected; if (var == A_ohab_itemname) return String(appcfg.ohab_itemname); if (var == A_ohab_host) return String(appcfg.ohab_host); if (var == A_ohab_port) return String(appcfg.ohab_port); if (var == A_ohab_useauth && appcfg.ohab_useauth == true) return checked; if (var == A_ohab_user) return String(appcfg.ohab_user); if (var == A_ohab_password) return String(appcfg.ohab_password); #ifdef HAVE_ENERGY_SENSOR if (var == A_ohab_item_voltage) return String(appcfg.ohab_item_voltage); if (var == A_ohab_item_current) return String(appcfg.ohab_item_current); if (var == A_ohab_item_power) return String(appcfg.ohab_item_power); if (var == A_ohab_sending_interval) return String(appcfg.ohab_sending_interval); #endif // Alexa if (var == A_alexa_enabled && appcfg.alexa_enabled == true) return checked; if (var == A_alexa_devicename) return String(appcfg.alexa_devicename); // MQTT if (var == A_mqtt_enabled && appcfg.mqtt_enabled == true) return checked; if (var == A_mqtt_clientid) return String(appcfg.mqtt_clientid); if (var == A_mqtt_host) return String(appcfg.mqtt_host); if (var == A_mqtt_port) return String(appcfg.mqtt_port); if (var == A_mqtt_useauth && appcfg.mqtt_useauth == true) return checked; if (var == A_mqtt_user) return String(appcfg.mqtt_user); if (var == A_mqtt_password) return String(appcfg.mqtt_password); if (var == A_mqtt_intopic) return String(appcfg.mqtt_intopic); if (var == A_mqtt_outtopic) return String(appcfg.mqtt_outtopic); #ifdef HAVE_ENERGY_SENSOR if (var == A_mqtt_topic_voltage) return String(appcfg.mqtt_topic_voltage); if (var == A_mqtt_topic_current) return String(appcfg.mqtt_topic_current); if (var == A_mqtt_topic_power) return String(appcfg.mqtt_topic_power); if (var == A_mqtt_topic_json) return String(appcfg.mqtt_topic_json); if (var == A_mqtt_sending_interval) return String(appcfg.mqtt_sending_interval); #endif // Syslog if (var == A_syslog_enabled && appcfg.syslog_enabled == true) return checked; if (var == A_syslog_host) return String(appcfg.syslog_host); if (var == A_syslog_port) return String(appcfg.syslog_port); if (var == A_syslog_app_name) return String(appcfg.syslog_app_name); if (var == "millis") return String(millis()); #ifdef POWER_BUTTON_IS_MULTIMODE // Power Button Mode if (var == "power_button_mode_switch" && appcfg.power_button_mode == POWER_BUTTON_MODE_SWITCH) return selected; if (var == "power_button_mode_toggle" && appcfg.power_button_mode == POWER_BUTTON_MODE_TOGGLE) return selected; if (var == "power_button_mode_toggle_switch" && appcfg.power_button_mode == POWER_BUTTON_MODE_TOGGLE_SWITCH) return selected; #endif #ifdef WIFI_LED if (var == A_led_night_mode_enabled && appcfg.led_night_mode_enabled == true) return checked; if (var == A_led_night_mode_timeout) return String(appcfg.led_night_mode_timeout); #endif if (var == A_inet_check_enabled && appcfg.inet_check_enabled == true) return checked; if (var == A_inet_check_period) return String(appcfg.inet_check_period); String ica = String( A_inet_check_action ); ica += "_"; ica += appcfg.inet_check_action; if ( var == ica ) return selected; return String(); } void handleSetupPage(AsyncWebServerRequest *request) { LOG0("handleSetupPage\n"); if (!request->authenticate("admin", appcfg.admin_password)) { LOG0("authenticate\n"); return request->requestAuthentication(); } LOG0("build response\n"); AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", SETUP_HTML, setupProcessor); response->addHeader("Cache-Control", "no-cache, no-store, must-revalidate"); response->addHeader("Pragma", "no-cache"); response->addHeader("Expires", "0"); LOG0("send response\n"); request->send(response); }
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE134_Uncontrolled_Format_String__char_listen_socket_vprintf_74b.cpp Label Definition File: CWE134_Uncontrolled_Format_String.vasinks.label.xml Template File: sources-vasinks-74b.tmpl.cpp */ /* * @description * CWE: 134 Uncontrolled Format String * BadSource: listen_socket Read data using a listen socket (server side) * GoodSource: Copy a fixed string into data * Sinks: vprintf * GoodSink: vprintf with a format string * BadSink : vprintf without a format string * Flow Variant: 74 Data flow: data passed in a map from one function to another in different source files * * */ #include <stdarg.h> #include <map> #include "std_testcase.h" #ifndef _WIN32 #include <wchar.h> #endif using namespace std; namespace CWE134_Uncontrolled_Format_String__char_listen_socket_vprintf_74 { #ifndef OMITBAD static void badVaSink(char * data, ...) { { va_list args; va_start(args, data); /* POTENTIAL FLAW: Do not specify the format allowing a possible format string vulnerability */ vprintf(data, args); va_end(args); } } void badSink(map<int, char *> dataMap) { /* copy data out of dataMap */ char * data = dataMap[2]; badVaSink(data, data); } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B uses the GoodSource with the BadSink */ static void goodG2BVaSink(char * data, ...) { { va_list args; va_start(args, data); /* POTENTIAL FLAW: Do not specify the format allowing a possible format string vulnerability */ vprintf(data, args); va_end(args); } } void goodG2BSink(map<int, char *> dataMap) { char * data = dataMap[2]; goodG2BVaSink(data, data); } /* goodB2G uses the BadSource with the GoodSink */ static void goodB2GVaSink(char * data, ...) { { va_list args; va_start(args, data); /* FIX: Specify the format disallowing a format string vulnerability */ vprintf("%s", args); va_end(args); } } void goodB2GSink(map<int, char *> dataMap) { char * data = dataMap[2]; goodB2GVaSink(data, data); } #endif /* OMITGOOD */ } /* close namespace */
#include "integer.hpp" class Integer : public node::ObjectWrap { public: static void Init(v8::Local<v8::Object> exports, v8::Local<v8::Object> module) { v8::Isolate* isolate = v8::Isolate::GetCurrent(); v8::HandleScope scope(isolate); v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(isolate, New); t->InstanceTemplate()->SetInternalFieldCount(1); t->PrototypeTemplate()->SetInternalFieldCount(1); t->SetClassName(StringFromLatin1(isolate, "Integer")); NODE_SET_PROTOTYPE_GETTER(t, "low", Low); NODE_SET_PROTOTYPE_GETTER(t, "high", High); NODE_SET_PROTOTYPE_METHOD(t, "add", Add); NODE_SET_PROTOTYPE_METHOD(t, "subtract", Subtract); NODE_SET_PROTOTYPE_METHOD(t, "multiply", Multiply); NODE_SET_PROTOTYPE_METHOD(t, "divide", Divide); NODE_SET_PROTOTYPE_METHOD(t, "modulo", Modulo); NODE_SET_PROTOTYPE_METHOD(t, "negate", Negate); NODE_SET_PROTOTYPE_METHOD(t, "abs", Abs); NODE_SET_PROTOTYPE_METHOD(t, "and", And); NODE_SET_PROTOTYPE_METHOD(t, "or", Or); NODE_SET_PROTOTYPE_METHOD(t, "xor", Xor); NODE_SET_PROTOTYPE_METHOD(t, "not", Not); NODE_SET_PROTOTYPE_METHOD(t, "shiftLeft", ShiftLeft); NODE_SET_PROTOTYPE_METHOD(t, "shiftRight", ShiftRight); NODE_SET_PROTOTYPE_METHOD(t, "equals", Equals); NODE_SET_PROTOTYPE_METHOD(t, "notEquals", NotEquals); NODE_SET_PROTOTYPE_METHOD(t, "greaterThan", GreaterThan); NODE_SET_PROTOTYPE_METHOD(t, "greaterThanOrEquals", GreaterThanOrEquals); NODE_SET_PROTOTYPE_METHOD(t, "lessThan", LessThan); NODE_SET_PROTOTYPE_METHOD(t, "lessThanOrEquals", LessThanOrEquals); NODE_SET_PROTOTYPE_METHOD(t, "compare", Compare); NODE_SET_PROTOTYPE_METHOD(t, "bitSizeAbs", BitSizeAbs); NODE_SET_PROTOTYPE_METHOD(t, "isEven", IsEven); NODE_SET_PROTOTYPE_METHOD(t, "isOdd", IsOdd); NODE_SET_PROTOTYPE_METHOD(t, "isPositive", IsPositive); NODE_SET_PROTOTYPE_METHOD(t, "isNegative", IsNegative); NODE_SET_PROTOTYPE_METHOD(t, "isZero", IsZero); NODE_SET_PROTOTYPE_METHOD(t, "isNonZero", IsNonZero); NODE_SET_PROTOTYPE_METHOD(t, "isSafe", IsSafe); NODE_SET_PROTOTYPE_METHOD(t, "isUnsafe", IsUnsafe); NODE_SET_PROTOTYPE_METHOD(t, "toNumberUnsafe", ToNumberUnsafe); NODE_SET_PROTOTYPE_METHOD(t, "toString", ToString); NODE_SET_PROTOTYPE_METHOD(t, "valueOf", ValueOf); v8::Local<v8::Function> c = t->GetFunction(isolate->GetCurrentContext()).ToLocalChecked(); v8::Local<v8::Object>::Cast(c->Get(isolate->GetCurrentContext(), StringFromLatin1(isolate, "prototype")).ToLocalChecked())->SetAlignedPointerInInternalField(0, &controller); exports->Set(isolate->GetCurrentContext(), StringFromLatin1(isolate, "Integer"), c).FromJust(); NODE_SET_METHOD(v8::Local<v8::Object>::Cast(c), "fromString", FromString); NODE_SET_METHOD(v8::Local<v8::Object>::Cast(c), "fromNumber", FromNumber); NODE_SET_METHOD(v8::Local<v8::Object>::Cast(c), "fromBits", FromBits); NODE_SET_METHOD(v8::Local<v8::Object>::Cast(c), "isInstance", IsInstance); constructor.Reset(isolate, c); constructorTemplate.Reset(isolate, t); controller.privileges = false; controller.value = 0; } private: explicit Integer(int64_t _value) : node::ObjectWrap(), value(_value) {} NODE_METHOD(New) { if (info.IsConstructCall()) { if (!controller.privileges) { return ThrowTypeError(info, "Disabled constructor (use fromString, fromNumber, or fromBits)"); } controller.privileges = false; (new Integer(controller.value))->Wrap(info.This()); return info.GetReturnValue().Set(info.This()); } if (info.Length() == 0) return ReturnNew(info, 0); Result cast = Cast(info, info[0]); // TODO: ideally if info[0] is an Integer, that same object is returned. cast.error ? ThrowException(info, *cast.error) : ReturnNew(info, cast.Checked()); } NODE_METHOD(FromBits) { int32_t low; int32_t high = 0; REQUIRE_ARGUMENT_INT32(first, low); if (info.Length() > 1) { REQUIRE_ARGUMENT_INT32(second, high); } ReturnNew(info, (int64_t)((((uint64_t)((uint32_t)high)) << 32) | (uint32_t)low)); } NODE_METHOD(FromNumber) { REQUIRE_ARGUMENT_NUMBER(first, v8::Local<v8::Number> number); Result cast = Cast(number); if (!cast.error) return ReturnNew(info, cast.Checked()); if (info.Length() == 1) return ThrowException(info, *cast.error); v8::Local<v8::Value> defValue = info[1]; if (HasInstance(info, defValue)) return info.GetReturnValue().Set(defValue); if (!defValue->IsNumber()) return ThrowTypeError(info, "Expected the default value to be a number or Integer"); Result def = Cast(v8::Local<v8::Number>::Cast(defValue)); if (!def.error) return ReturnNew(info, def.Checked()); ThrowTypeError(info, "The default value could not be converted to an Integer"); } NODE_METHOD(FromString) { REQUIRE_ARGUMENT_STRING(first, v8::Local<v8::String> string); uint32_t radix = 10; if (info.Length() > 1) { REQUIRE_ARGUMENT_UINT32(second, radix); if (radix < 2 || radix > 36) return ThrowRangeError(info, "Radix argument must be within 2 - 36"); } Result cast = Cast(info, string, (uint8_t)radix); if (!cast.error) return ReturnNew(info, cast.Checked()); if (info.Length() < 3) return ThrowException(info, *cast.error); v8::Local<v8::Value> defValue = info[2]; if (HasInstance(info, defValue)) return info.GetReturnValue().Set(defValue); if (!defValue->IsString()) return ThrowTypeError(info, "Expected the default value to be a string or Integer"); Result def = Cast(info, v8::Local<v8::String>::Cast(defValue), (uint8_t)radix); if (!def.error) return ReturnNew(info, def.Checked()); ThrowTypeError(info, "The default value could not be converted to an Integer"); } NODE_METHOD(IsInstance) { Return(info, info.Length() != 0 && HasInstance(info, info[0])); } NODE_GETTER(Low) { UseValue; Return(info, (int32_t)((uint32_t)(((uint64_t)value) & U32_in_U64))); } NODE_GETTER(High) { UseValue; Return(info, (int32_t)((uint32_t)(((uint64_t)value) >> 32))); } NODE_METHOD(Add) { UseValue; UseArgument; if ((arg > 0 && value > MAX_VALUE - arg) || (arg < 0 && value < MIN_VALUE - arg)) return ThrowRangeError(info, "Integer overflow"); ReturnNew(info, value + arg); } NODE_METHOD(Subtract) { UseValue; UseArgument; if ((arg < 0 && value > MAX_VALUE + arg) || (arg > 0 && value < MIN_VALUE + arg)) return ThrowRangeError(info, "Integer overflow"); ReturnNew(info, value - arg); } NODE_METHOD(Multiply) { UseValue; UseArgument; if (value > 0 ? (arg > 0 ? value > MAX_VALUE / arg : arg < MIN_VALUE / value) : (arg > 0 ? value < MIN_VALUE / arg : (value != 0 && arg < MAX_VALUE / value))) return ThrowRangeError(info, "Integer overflow"); ReturnNew(info, value * arg); } NODE_METHOD(Divide) { UseValue; UseArgument; if (arg == 0) return ThrowRangeError(info, "Divide by zero"); if (arg == -1 && value == MIN_VALUE) return ThrowRangeError(info, "Integer overflow"); ReturnNew(info, value / arg); } NODE_METHOD(Modulo) { UseValue; UseArgument; if (arg == 0) return ThrowRangeError(info, "Divide by zero"); ReturnNew(info, arg == -1 ? 0 : value % arg); } NODE_METHOD(Negate) { UseValue; if (value == MIN_VALUE) return ThrowRangeError(info, "Integer overflow"); ReturnNew(info, -value); } NODE_METHOD(Abs) { UseValue; if (value == MIN_VALUE) return ThrowRangeError(info, "Integer overflow"); ReturnNew(info, value >= 0 ? value : -value); } NODE_METHOD(And) { UseValue; UseArgument; ReturnNew(info, value & arg); } NODE_METHOD(Or) { UseValue; UseArgument; ReturnNew(info, value | arg); } NODE_METHOD(Xor) { UseValue; UseArgument; ReturnNew(info, value ^ arg); } NODE_METHOD(Not) { UseValue; ReturnNew(info, ~value); } NODE_METHOD(ShiftLeft) { UseValue; REQUIRE_ARGUMENT_UINT32(first, uint32_t shift); ReturnNew(info, (int64_t)((uint64_t)value << (shift & 63))); } NODE_METHOD(ShiftRight) { UseValue; REQUIRE_ARGUMENT_UINT32(first, uint32_t shift); ReturnNew(info, value >> (shift & 63)); } NODE_METHOD(Equals) { UseValue; UseArgument; Return(info, value == arg); } NODE_METHOD(NotEquals) { UseValue; UseArgument; Return(info, value != arg); } NODE_METHOD(GreaterThan) { UseValue; UseArgument; Return(info, value > arg); } NODE_METHOD(GreaterThanOrEquals) { UseValue; UseArgument; Return(info, value >= arg); } NODE_METHOD(LessThan) { UseValue; UseArgument; Return(info, value < arg); } NODE_METHOD(LessThanOrEquals) { UseValue; UseArgument; Return(info, value <= arg); } NODE_METHOD(Compare) { UseValue; UseArgument; Return(info, value < arg ? -1 : value > arg ? 1 : 0); } NODE_METHOD(BitSizeAbs) { UseValue; if (value < 0) { if (value == MIN_VALUE) return Return(info, (uint32_t)64); value = -value; } uint64_t uvalue = (uint64_t)value; uint32_t bits = 1; while (uvalue >>= 1) { ++bits; } Return(info, bits); } NODE_METHOD(IsEven) { UseValue; Return(info, (value & 1) == 0); } NODE_METHOD(IsOdd) { UseValue; Return(info, (value & 1) != 0); } NODE_METHOD(IsPositive) { UseValue; Return(info, value >= 0); } NODE_METHOD(IsNegative) { UseValue; Return(info, value < 0); } NODE_METHOD(IsZero) { UseValue; Return(info, value == 0); } NODE_METHOD(IsNonZero) { UseValue; Return(info, value != 0); } NODE_METHOD(IsSafe) { UseValue; Return(info, value <= MAX_SAFE && value >= MIN_SAFE); } NODE_METHOD(IsUnsafe) { UseValue; Return(info, value > MAX_SAFE || value < MIN_SAFE); } NODE_METHOD(ToNumberUnsafe) { UseValue; Return(info, (double)value); } NODE_METHOD(ToString) { UseValue; uint32_t radix = 10; if (info.Length()) { REQUIRE_ARGUMENT_UINT32(first, radix); if (radix < 2 || radix > 36) return ThrowRangeError(info, "Radix argument must be within 2 - 36"); } char buffer[STRING_BUFFER_LENGTH]; info.GetReturnValue().Set(StringFromLatin1(info.GetIsolate(), WriteString(buffer, value, (uint8_t)radix))); } NODE_METHOD(ValueOf) { UseValue; if (value <= MAX_SAFE && value >= MIN_SAFE) return Return(info, (double)value); char buffer[STRING_BUFFER_LENGTH]; std::string message = "Cannot losslessly convert "; message += WriteString(buffer, value, 10); message += " to a number"; ThrowRangeError(info, message.c_str()); } static inline bool HasInstance(NODE_ARGUMENTS info, v8::Local<v8::Value> value) { return v8::Local<v8::FunctionTemplate>::New(info.GetIsolate(), constructorTemplate)->HasInstance(value); } static inline void Return(NODE_GETTER_ARGUMENTS info, int32_t value) { info.GetReturnValue().Set(value); } static inline void Return(NODE_ARGUMENTS info, int32_t value) { info.GetReturnValue().Set(value); } static inline void Return(NODE_ARGUMENTS info, uint32_t value) { info.GetReturnValue().Set(value); } static inline void Return(NODE_ARGUMENTS info, double value) { info.GetReturnValue().Set(value); } static inline void Return(NODE_ARGUMENTS info, bool value) { info.GetReturnValue().Set(value); } static inline void ReturnNew(NODE_ARGUMENTS info, int64_t value) { v8::Isolate* isolate = info.GetIsolate(); controller.privileges = true; controller.value = value; info.GetReturnValue().Set(v8::Local<v8::Function>::New(isolate, constructor)->NewInstance(isolate->GetCurrentContext()).ToLocalChecked()); } static Result Cast(NODE_ARGUMENTS info, v8::Local<v8::Value> value) { if (value->IsNumber()) return Cast(v8::Local<v8::Number>::Cast(value)); if (value->IsString()) return Cast(info, v8::Local<v8::String>::Cast(value), 10); if (HasInstance(info, value)) return Result(node::ObjectWrap::Unwrap<Integer>(v8::Local<v8::Object>::Cast(value))->value); return Result("Expected a number, string, or Integer"); } static Result Cast(v8::Local<v8::Number> number) { double value = number->Value(); if (!std::isfinite(value) || std::floor(value) != value) return Result("The given number is not an integer"); if (value > MAX_SAFE_DOUBLE || value < MIN_SAFE_DOUBLE) return Result("The precision of the given number cannot be guaranteed", true); return Result((int64_t)value); } static Result Cast(NODE_ARGUMENTS info, v8::Local<v8::String> string, uint8_t radix) { auto IsWhitespace = [](uint16_t c) { return c == ' ' || (c <= '\r' && c >= '\t'); }; v8::String::Value utf16(EXTRACT_STRING(info.GetIsolate(), string)); const uint16_t* str = *utf16; int len = utf16.length(); int i = 0; // Skip leading whitespace. while (i<len && IsWhitespace(str[i])) { ++i; } if (i == len) return Result("The given string does not contain a number"); uint64_t value = 0; uint8_t max_digit = radix > 10 ? '9' : (radix - 1 + '0'); uint8_t max_alpha = radix > 10 ? (radix - 11 + 'a') : 0; uint8_t min_alpha = radix > 10 ? 'a' : 255; bool is_negative = (i + 1 < len) && (str[i] == '-') && !IsWhitespace(str[i + 1]); for (i+=is_negative; i<len; ++i) { uint16_t c = str[i]; if (c < '0' || c > max_digit) { if (c <= 'Z') c += 32; if (c < min_alpha || c > max_alpha) { if (c == 78 && ((i + 1 < len && !IsWhitespace(str[i + 1])) || (i != 0 && !IsWhitespace(str[i - 1]) && str[i - 1] != '-'))) { // Skip zeros after a decimal point. do { ++i; } while (i<len && str[i] == '0'); } break; } c -= 39; } uint64_t previous = value; if (previous > (value = value * radix + (c - '0'))) return Result("The given string represents a number that is too large", true); } // Skip trailing whitespace. while (i<len && IsWhitespace(str[i])) { ++i; } if (i != len) return Result("The given string contains non-integer characters"); if (value > I64_in_U64 + is_negative) return Result("The given string represents a number that is too large", true); return Result((is_negative && value) ? -((int64_t)(value - 1)) - 1 : (int64_t)value); } static char* WriteString(char* buffer, int64_t value, uint8_t radix) { bool is_negative = value < 0; uint64_t x = (uint64_t)(value ^ -is_negative) + is_negative; unsigned char* slot = reinterpret_cast<unsigned char*>(buffer + STRING_BUFFER_LENGTH - 1); *slot = '\0'; do { uint64_t digit = x % radix; *(--slot) = digit + '0' + (digit > 9) * 39; } while (x /= radix); *(slot - 1) = '-'; return reinterpret_cast<char*>(slot - is_negative); } struct ConstructorController { bool privileges; int64_t value; }; static const int64_t MAX_VALUE = 0x7fffffffffffffffLL; static const int64_t MIN_VALUE = -0x7fffffffffffffffLL - 1LL; static const int64_t MAX_SAFE = 9007199254740991LL; static const int64_t MIN_SAFE = -9007199254740991LL; static constexpr double MAX_SAFE_DOUBLE = (double)MAX_SAFE; static constexpr double MIN_SAFE_DOUBLE = (double)MIN_SAFE; static constexpr uint64_t I64_in_U64 = (uint64_t)MAX_VALUE; static constexpr uint64_t U32_in_U64 = (uint64_t)0xffffffffLU; static const size_t STRING_BUFFER_LENGTH = 72; static v8::Persistent<v8::Function> constructor; static v8::Persistent<v8::FunctionTemplate> constructorTemplate; static ConstructorController controller; const int64_t value; }; v8::Persistent<v8::Function> Integer::constructor; v8::Persistent<v8::FunctionTemplate> Integer::constructorTemplate; Integer::ConstructorController Integer::controller; NODE_MODULE(integer, Integer::Init);
#include "time.h" #include <iostream> time::time() { this->time_init(); } time::~time() { delete this->pq; } int time::time_init() { this->pq = new pq_t(); this->time_update(); } void time::handle_expire_time_ns() { while (!this->pq->pq_is_empty()) { this->time_update(); time_n_t* t_n = (time_n_t*)this->pq->pq_front(); if (t_n->deleted) { //TODO:改进实现方式,不需要使用delete,可以通过堆的直接覆盖,然后从顶向下进行调整 this->pq->pq_pop(); continue; } if (t_n->key > this->current_time) { return; } if (t_n->handler) { t_n->handler(t_n->request); } this->pq->pq_pop(); } } void time::time_n_add(http_request_t* request ,size_t timeout , handler_pq handler) { //request 中的timer指针和时间节点中的request是互相指向的,有点双向链表的感觉 this->time_update(); time_n_t* t_n = new time_n_t; request->timer = t_n; t_n->key = this->current_time + timeout; t_n->deleted = 0; t_n->handler = handler; t_n->request = request; int rc = this->pq->pq_insert(t_n); //TODO:判断是否插入成功 } void time::time_n_del(http_request_t* request) { this->time_update(); time_n_t* t_n = request->timer; //惰性删除 //标记为已删除,在检查队列时进行真正的删除 t_n->deleted = 1; } void time::time_update() { struct timeval tv; int rc = gettimeofday(&tv, nullptr); if (rc == -1) { return; } this->current_time = ((tv.tv_sec * 1000) + (tv.tv_usec/1000)); }
#include "MSXRTC.hh" #include "SRAM.hh" #include "RP5C01.hh" #include "serialize.hh" #include "unreachable.hh" #include "memory.hh" namespace openmsx { MSXRTC::MSXRTC(const DeviceConfig& config) : MSXDevice(config) , sram(make_unique<SRAM>(getName() + " SRAM", 4 * 13, config)) , rp5c01(make_unique<RP5C01>( getCommandController(), *sram, getCurrentTime(), getName())) { reset(getCurrentTime()); } MSXRTC::~MSXRTC() { } void MSXRTC::reset(EmuTime::param time) { // TODO verify on real hardware .. how? // - registerLatch set to zero or some other value? // - only on power-up or also on reset? registerLatch = 0; rp5c01->reset(time); } byte MSXRTC::readIO(word port, EmuTime::param time) { return peekIO(port, time); } byte MSXRTC::peekIO(word /*port*/, EmuTime::param time) const { return rp5c01->readPort(registerLatch, time) | 0xF0; } void MSXRTC::writeIO(word port, byte value, EmuTime::param time) { switch (port & 0x01) { case 0: registerLatch = value & 0x0F; break; case 1: rp5c01->writePort(registerLatch, value & 0x0F, time); break; default: UNREACHABLE; } } template<typename Archive> void MSXRTC::serialize(Archive& ar, unsigned /*version*/) { ar.template serializeBase<MSXDevice>(*this); ar.serialize("sram", *sram); ar.serialize("rp5c01", *rp5c01); ar.serialize("registerLatch", registerLatch); } INSTANTIATE_SERIALIZE_METHODS(MSXRTC); REGISTER_MSXDEVICE(MSXRTC, "RTC"); } // namespace openmsx
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<iomanip> #include<algorithm> #include<stack> #include<vector> #define ri register int #define ll long long using namespace std; const int MAXN=10005; const int INF=0x7fffffff/2; struct node{int to,val;}; vector<node>a[MAXN]; int n,m,dist[MAXN]; bool bj,vst[MAXN]; inline int getint() { int num=0,bj=1; char c=getchar(); while(c<'0'||c>'9')bj=(c=='-'||bj==-1)?-1:1,c=getchar(); while(c>='0'&&c<='9')num=num*10+c-'0',c=getchar(); return num*bj; } void SPFA(int u) { vst[u]=1; vector<node>::iterator it; for(it=a[u].begin();it!=a[u].end();++it) { if(dist[it->to]>dist[u]+it->val) { if(vst[it->to]){bj=1;return;} dist[it->to]=dist[u]+it->val; SPFA(it->to); } } vst[u]=0; } int main() { n=getint(),m=getint(); for(ri i=1;i<=m;i++) { int op=getint(); if(op==1) { int x=getint(),y=getint(),z=getint(); a[x].push_back((node){y,-z}); } if(op==2) { int x=getint(),y=getint(),z=getint(); a[y].push_back((node){x,z}); } if(op==3) { int x=getint(),y=getint(); a[x].push_back((node){y,0}); a[y].push_back((node){x,0}); } } for(ri i=1;i<=n;i++)dist[i]=INF; for(ri i=1;i<=n;i++) { SPFA(i); if(bj){printf("No\n");return 0;} } printf("Yes\n"); return 0; }
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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 <tencentcloud/cdn/v20180606/model/DescribePushQuotaResponse.h> #include <tencentcloud/core/utils/rapidjson/document.h> #include <tencentcloud/core/utils/rapidjson/writer.h> #include <tencentcloud/core/utils/rapidjson/stringbuffer.h> using TencentCloud::CoreInternalOutcome; using namespace TencentCloud::Cdn::V20180606::Model; using namespace std; DescribePushQuotaResponse::DescribePushQuotaResponse() : m_urlPushHasBeenSet(false) { } CoreInternalOutcome DescribePushQuotaResponse::Deserialize(const string &payload) { rapidjson::Document d; d.Parse(payload.c_str()); if (d.HasParseError() || !d.IsObject()) { return CoreInternalOutcome(Core::Error("response not json format")); } if (!d.HasMember("Response") || !d["Response"].IsObject()) { return CoreInternalOutcome(Core::Error("response `Response` is null or not object")); } rapidjson::Value &rsp = d["Response"]; if (!rsp.HasMember("RequestId") || !rsp["RequestId"].IsString()) { return CoreInternalOutcome(Core::Error("response `Response.RequestId` is null or not string")); } string requestId(rsp["RequestId"].GetString()); SetRequestId(requestId); if (rsp.HasMember("Error")) { if (!rsp["Error"].IsObject() || !rsp["Error"].HasMember("Code") || !rsp["Error"]["Code"].IsString() || !rsp["Error"].HasMember("Message") || !rsp["Error"]["Message"].IsString()) { return CoreInternalOutcome(Core::Error("response `Response.Error` format error").SetRequestId(requestId)); } string errorCode(rsp["Error"]["Code"].GetString()); string errorMsg(rsp["Error"]["Message"].GetString()); return CoreInternalOutcome(Core::Error(errorCode, errorMsg).SetRequestId(requestId)); } if (rsp.HasMember("UrlPush") && !rsp["UrlPush"].IsNull()) { if (!rsp["UrlPush"].IsArray()) return CoreInternalOutcome(Core::Error("response `UrlPush` is not array type")); const rapidjson::Value &tmpValue = rsp["UrlPush"]; for (rapidjson::Value::ConstValueIterator itr = tmpValue.Begin(); itr != tmpValue.End(); ++itr) { Quota item; CoreInternalOutcome outcome = item.Deserialize(*itr); if (!outcome.IsSuccess()) { outcome.GetError().SetRequestId(requestId); return outcome; } m_urlPush.push_back(item); } m_urlPushHasBeenSet = true; } return CoreInternalOutcome(true); } string DescribePushQuotaResponse::ToJsonString() const { rapidjson::Document value; value.SetObject(); rapidjson::Document::AllocatorType& allocator = value.GetAllocator(); if (m_urlPushHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "UrlPush"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(rapidjson::kArrayType).Move(), allocator); int i=0; for (auto itr = m_urlPush.begin(); itr != m_urlPush.end(); ++itr, ++i) { value[key.c_str()].PushBack(rapidjson::Value(rapidjson::kObjectType).Move(), allocator); (*itr).ToJsonObject(value[key.c_str()][i], allocator); } } rapidjson::Value iKey(rapidjson::kStringType); string key = "RequestId"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value().SetString(GetRequestId().c_str(), allocator), allocator); rapidjson::StringBuffer buffer; rapidjson::Writer<rapidjson::StringBuffer> writer(buffer); value.Accept(writer); return buffer.GetString(); } vector<Quota> DescribePushQuotaResponse::GetUrlPush() const { return m_urlPush; } bool DescribePushQuotaResponse::UrlPushHasBeenSet() const { return m_urlPushHasBeenSet; }
/* =========FOR INTERNAL USE ONLY. NO DISTRIBUTION PLEASE ========== */ /********************************************************************* Copyright 1999-2007, University of Cincinnati. All rights reserved. By using this software the USER indicates that he or she has read, understood and will comply with the following: --- University of Cincinnati hereby grants USER nonexclusive permission to use, copy and/or modify this software for internal, noncommercial, research purposes only. Any distribution, including commercial sale or license, of this software, copies of the software, its associated documentation and/or modifications of either is strictly prohibited without the prior consent of University of Cincinnati. Title to copyright to this software and its associated documentation shall at all times remain with University of Cincinnati. Appropriate copyright notice shall be placed on all software copies, and a complete copy of this notice shall be included in all copies of the associated documentation. No right is granted to use in advertising, publicity or otherwise any trademark, service mark, or the name of University of Cincinnati. --- This software and any associated documentation is provided "as is" UNIVERSITY OF CINCINNATI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING THOSE OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR THAT USE OF THE SOFTWARE, MODIFICATIONS, OR ASSOCIATED DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER INTELLECTUAL PROPERTY RIGHTS OF A THIRD PARTY. University of Cincinnati shall not be liable under any circumstances for any direct, indirect, special, incidental, or consequential damages with respect to any claim by USER or any third party on account of or arising from the use, or inability to use, this software or its associated documentation, even if University of Cincinnati has been advised of the possibility of those damages. *********************************************************************/ #include "sbsat.h" #include "sbsat_solver.h" /* pop the information */ #define YES_AUTARKY 1 #define NO_AUTARKY 0 tSmurfStatesStack* AU_arrSmurfStatesStack; int AU_nSmurfStatesStackIdx; ITE_INLINE void AU_check_pop_information_init(); ITE_INLINE int AU_check_pop_information_specfn(); ITE_INLINE int AU_check_pop_information_smurfs(); ITE_INLINE int AU_is_autarky(); ITE_INLINE int AU_check_pop_information_smurfs() { if (arrCurrentStates == NULL) return YES_AUTARKY; while (AU_arrSmurfStatesStack[AU_nSmurfStatesStackIdx].smurf != LEVEL_START) { int smurf=AU_arrSmurfStatesStack[AU_nSmurfStatesStackIdx].smurf; if (smurf == POOL_START) { AU_nSmurfStatesStackIdx--; tSmurfStatesStack *new_arrSmurfStatesStack = (tSmurfStatesStack*) (AU_arrSmurfStatesStack[AU_nSmurfStatesStackIdx--].smurf); AU_nSmurfStatesStackIdx = AU_arrSmurfStatesStack[AU_nSmurfStatesStackIdx].smurf; if (new_arrSmurfStatesStack == NULL) break; assert(new_arrSmurfStatesStack[AU_nSmurfStatesStackIdx].smurf==POOL_END); AU_arrSmurfStatesStack = new_arrSmurfStatesStack; } else { if (smurf >= 0) { d9_printf3("autarky: check_pop_information_smurfs(%d), state: %s\n", smurf, arrCurrentStates[smurf] == pTrueSmurfState?"True":"non-true"); if (arrCurrentStates[smurf] != pTrueSmurfState) return NO_AUTARKY; } } AU_nSmurfStatesStackIdx--; } AU_nSmurfStatesStackIdx--; return YES_AUTARKY; } tSpecialFnStack* AU_arrSpecialFnStack; int AU_nSpecialFnStackIdx; ITE_INLINE int AU_check_pop_information_specfn() { if (arrNumRHSUnknowns == NULL) return YES_AUTARKY; while (AU_arrSpecialFnStack[AU_nSpecialFnStackIdx].fn != LEVEL_START) { int fn=AU_arrSpecialFnStack[AU_nSpecialFnStackIdx].fn; if (fn == POOL_START) { AU_nSpecialFnStackIdx--; tSpecialFnStack *new_arrSpecialFnStack = (tSpecialFnStack*)(AU_arrSpecialFnStack[AU_nSpecialFnStackIdx--].fn); AU_nSpecialFnStackIdx = AU_arrSpecialFnStack[AU_nSpecialFnStackIdx].fn; if (new_arrSpecialFnStack == NULL) break; assert(new_arrSpecialFnStack[AU_nSpecialFnStackIdx].fn==POOL_END); AU_arrSpecialFnStack = new_arrSpecialFnStack; } else { if (fn >= 0) { d9_printf3("autarky: check_pop_information_specfn(%d), #RHSUnknowns: %d\n", fn, arrNumRHSUnknowns[fn]); if (arrNumRHSUnknowns[fn] != 0) return NO_AUTARKY; } } AU_nSpecialFnStackIdx--; } AU_nSpecialFnStackIdx--; return YES_AUTARKY; } ITE_INLINE void AU_check_pop_information_init() { AU_arrSmurfStatesStack = arrSmurfStatesStack; AU_nSmurfStatesStackIdx = nSmurfStatesStackIdx; AU_arrSpecialFnStack = arrSpecialFnStack; AU_nSpecialFnStackIdx = nSpecialFnStackIdx; } /* in the end of backjump loop */ ITE_INLINE int AU_is_autarky() { d9_printf1("Autarky check\n"); if (AU_nSpecialFnStackIdx <= 0) return NO_AUTARKY; if (AU_nSmurfStatesStackIdx <= 0) return NO_AUTARKY; /* check each affected smurf -- if not satisfied => not autarky */ if (AU_check_pop_information_smurfs()==YES_AUTARKY) { /* check each affected special function -- if not satisfied => not autarky */ if (AU_check_pop_information_specfn()==YES_AUTARKY) { return YES_AUTARKY; } } return NO_AUTARKY; }
/* * 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. */ /*! * \file relay/backend/build_module.cc * \brief Code generation for TVM's graph runtime. */ #include <tvm/relay/analysis.h> #include <tvm/driver/driver_api.h> #include <tvm/runtime/device_api.h> #include <tvm/runtime/vm.h> #include <tvm/relay/expr.h> #include <tvm/relay/transform.h> #include <tvm/relay/qnn/transform.h> #include <memory> #include "utils.h" namespace tvm { namespace relay { namespace backend { using tir::LoweredFunc; using TargetsMap = Map<tvm::Integer, tvm::Target>; using namespace tvm::relay::transform; /*! * \brief Output of building module * */ struct BuildOutput { std::string graph_json; runtime::Module mod; std::unordered_map<std::string, tvm::runtime::NDArray> params; }; /*! * \brief GraphCodegen module wrapper * */ struct GraphCodegen { public: GraphCodegen() { auto pf = GetPackedFunc("relay.build_module._GraphRuntimeCodegen"); mod = (*pf)(); } ~GraphCodegen() {} void Init(runtime::Module* m, TargetsMap targets) { CallFunc("init", m, targets); } void Codegen(const Function& func) { CallFunc("codegen", func); } std::string GetJSON() { return CallFunc<std::string>("get_graph_json", nullptr); } Array<tvm::runtime::Module> GetExternalModules() { return CallFunc<Array<tvm::runtime::Module> >("get_external_modules", nullptr); } Map<std::string, Array<LoweredFunc> > GetLoweredFunc() { return CallFunc<Map<std::string, Array<LoweredFunc> > >("get_lowered_funcs", nullptr); } std::unordered_map<std::string, tvm::runtime::NDArray> GetParams() { std::unordered_map<std::string, tvm::runtime::NDArray> ret; auto names = CallFunc<Array<tvm::PrimExpr> >("list_params_name", nullptr); for (auto expr : names) { auto key = expr.as<tir::StringImmNode>()->value; ret[key] = CallFunc<runtime::NDArray>("get_param_by_name", key); } return ret; } protected: tvm::runtime::Module mod; template<typename R, typename ...Args> R CallFunc(const std::string &name, Args... args) { auto pf = mod.GetFunction(name, false); return pf(std::forward<Args>(args)...); } template<typename ...Args> void CallFunc(const std::string &name, Args... args) { auto pf = mod.GetFunction(name, false); pf(std::forward<Args>(args)...); return; } }; /*! * \brief Relay build module * */ class RelayBuildModule : public runtime::ModuleNode { public: /*! * \brief Get member function to front-end * \param name The name of the function. * \param sptr_to_self The pointer to the module node. * \return The corresponding member function. */ PackedFunc GetFunction(const std::string& name, const ObjectPtr<Object>& sptr_to_self) final { if (name == "get_graph_json") { return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = this->GetGraphJSON(); }); } else if (name == "get_module") { return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = this->GetModule(); }); } else if (name == "build") { return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { CHECK_EQ(args.num_args, 3); this->Build(args[0], args[1], args[2]); }); } else if (name == "list_params") { return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = this->ListParamNames(); }); } else if (name == "get_params") { return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = this->GetParams(); }); } else if (name == "set_params") { return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { Map<std::string, Constant> params = args[0]; for (const auto& kv : params) { this->SetParam(kv.first, kv.second->data); } }); } else if (name == "get_lowered_funcs") { return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = this->graph_codegen_->GetLoweredFunc(); }); } else if (name == "get_external_modules") { return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = this->graph_codegen_->GetExternalModules(); }); } else if (name == "optimize") { return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { CHECK_EQ(args.num_args, 2); *rv = this->Optimize(args[0], args[1], this->params_); }); } else { LOG(FATAL) << "Unknown packed function: " << name; return PackedFunc([sptr_to_self, name](TVMArgs args, TVMRetValue* rv) {}); } } /*! * \brief Get the GraphJSON for runtime * * \return const std::string graph_json */ const std::string& GetGraphJSON() { return ret_.graph_json; } /*! * \brief Get the Module object * * \return runtime::Module */ runtime::Module GetModule() { return ret_.mod; } /*! * \brief List all paramter names * * \return Array<StringImm> names of params */ Array<tvm::PrimExpr> ListParamNames() { Array<tvm::PrimExpr> ret; for (const auto& kv : params_) { ret.push_back(tir::StringImmNode::make(kv.first)); } return ret; } /*! * \brief Get params dictionary * * \return Map<std::string, Constant> params dictionary */ Map<std::string, Constant> GetParams() { Map<std::string, Constant> ret; for (const auto& kv : ret_.params) { ret.Set(kv.first, ConstantNode::make(kv.second)); } return ret; } /*! * \brief Set the parameters * * \param name name of parameter * \param data_in input DLTensor */ void SetParam(const std::string& name, runtime::NDArray data_in) { params_[name] = data_in; } /*! * \brief type key * * \return const char* */ const char* type_key() const final { return "RelayBuildModule"; } /*! * \brief Build relay function for graph runtime * * \param func Relay Function * \param target Target device * \param target_host Host target device */ void Build(Function func, const TargetsMap& targets, const tvm::Target& target_host) { targets_ = targets; target_host_ = target_host; BuildRelay(func, params_); } protected: /*! * \brief Optimize a Relay Function. * * \param func The input Function where optmization will be applied on. * \param targets The device type to `Target` mapping. * \param params The param name to value mapping. * * \return relay::Module The updated Relay module after optimization. */ IRModule Optimize( Function func, const TargetsMap& targets, const std::unordered_map<std::string, runtime::NDArray>& params) { if (params.size()) { func = BindParamsByName(func, params); } // Perform Module->Module optimizations. IRModule relay_module = IRModule::FromExpr(func); Array<Pass> pass_seqs; // Run all dialect legalization passes. pass_seqs.push_back(relay::qnn::transform::Legalize()); // Legalize pass is restricted to homogeneous execution for now. if (targets.size() == 1) { pass_seqs.push_back(transform::Legalize()); } pass_seqs.push_back(transform::SimplifyInference()); PackedFunc fskip = PackedFunc([](TVMArgs args, TVMRetValue* rv) { Expr expr = args[0]; *rv = false; if (expr.as<CallNode>()) { auto call_node = expr.as<CallNode>(); auto op_node = call_node->op.as<OpNode>(); if (op_node->name == "cast") { auto attrs = call_node->attrs.as<CastAttrs>(); if (attrs->dtype == DataType::Int(32)) { *rv = true; } } } }); pass_seqs.push_back(transform::EliminateCommonSubexpr(fskip)); pass_seqs.push_back(transform::CombineParallelConv2D(3)); pass_seqs.push_back(transform::CombineParallelDense(3)); pass_seqs.push_back(transform::FoldConstant()); pass_seqs.push_back(transform::FoldScaleAxis()); pass_seqs.push_back(transform::CanonicalizeCast()); pass_seqs.push_back(transform::CanonicalizeOps()); // Alter layout transformation is only applied to homogeneous execution yet. if (targets.size() == 1) { pass_seqs.push_back(transform::AlterOpLayout()); } pass_seqs.push_back(transform::FoldConstant()); // Create a sequential pass and perform optimizations. transform::Pass seq = transform::Sequential(pass_seqs); if (targets.size() == 1) { const auto& it = targets.begin(); With<Target> tctx((*it).second); relay_module = seq(relay_module); } else { relay_module = seq(relay_module); } // Handle heterogeneous compilation. transform::PassContext pass_ctx = PassContext::Current(); if (targets_.size() > 1) { relay_module = RunDeviceAnnotationPass(relay_module, pass_ctx->fallback_device); } // Fuse the operations if it is needed. relay_module = transform::FuseOps()(relay_module); relay_module = transform::InferType()(relay_module); CHECK(relay_module.defined()); return relay_module; } /*! * \brief Create a default type. * \param device_type The device type index. * \return the default target for the device. */ Target CreateDefaultTarget(int device_type) { std::string name = runtime::DeviceName(device_type); if (name == "cpu") return Target::Create("llvm"); if (name == "gpu") return Target::Create("cuda"); return Target::Create(name); } /*! * \brief Update the target and fallback device required for heterogeneous * compilation. CPU is used as the fallback device if it wasn't provided. * Meanwhile, a CPU device type and "llvm" pair will be added to the target * dictionary in this case. * * \param fallback_device The fallback device for heterogeneous execution. */ void UpdateHeterogeneousInputs(int fallback_device) { std::unordered_map<int64_t, tvm::Target> tmp_map; for (const auto& kv : targets_) { tmp_map[kv.first->value] = kv.second; } if (tmp_map.count(fallback_device) == 0) { targets_.Set(fallback_device, CreateDefaultTarget(fallback_device)); } } /*! * \brief Execute the device annotation passes to update the input program and * target information. * * \param relay_module The input Relay module. * \param fallback_device The fallback device for heterogeneous execution. * * \return updated_module The updated module after device annotation. */ IRModule RunDeviceAnnotationPass(const IRModule& relay_module, int fallback_device) { UpdateHeterogeneousInputs(fallback_device); auto rewrite = transform::RewriteAnnotatedOps(fallback_device); auto updated_module = rewrite(relay_module); CHECK(updated_module.defined()); tvm::Map<Expr, Integer> device_map; for (const auto& it : updated_module->functions) { device_map = relay::CollectDeviceInfo(it.second); if (!device_map.empty()) break; } if (device_map.empty()) { tvm::Map<Expr, Integer> annotation_map; for (const auto& it : relay_module->functions) { annotation_map = relay::CollectDeviceAnnotationOps(it.second); if (!annotation_map.empty()) break; } // None op is annotated but they are fallen back to the default device. if (annotation_map.empty()) { targets_.Set(0, CreateDefaultTarget(fallback_device)); } else { // All ops are annotated to the same device type. int64_t dev_type = -1; for (auto kv : annotation_map) { dev_type = kv.second->value; break; } for (auto kv : annotation_map) { CHECK_EQ(kv.second->value, dev_type) << "Expressions in the function are " << "annotated with various device types," << "but not device copy operators " << "found. Please check the " << "RewriteAnnotation pass."; } targets_.Set(0, CreateDefaultTarget(dev_type)); } } return updated_module; } /*! * \brief Compile a Relay function to runtime module. * * \param func The Relay function. * \param params The parameters. */ void BuildRelay( Function func, const std::unordered_map<std::string, tvm::runtime::NDArray>& params) { // Optimize input Relay Function and returns Relay Module IRModule relay_module = Optimize(func, targets_, params); // Get the updated function. func = Downcast<Function>(relay_module->Lookup("main")); // Generate code for the updated function. graph_codegen_ = std::unique_ptr<GraphCodegen>(new GraphCodegen()); graph_codegen_->Init(nullptr, targets_); graph_codegen_->Codegen(func); ret_.graph_json = graph_codegen_->GetJSON(); ret_.params = graph_codegen_->GetParams(); auto lowered_funcs = graph_codegen_->GetLoweredFunc(); if (lowered_funcs.size() == 0) { LOG(WARNING) << "no lowered funcs exist in the compiled module"; } else { ret_.mod = tvm::build( lowered_funcs, target_host_, BuildConfig::Current()); } Array<tvm::runtime::Module> ext_mods = graph_codegen_->GetExternalModules(); if (!ext_mods.empty()) { CHECK(lowered_funcs.size() > 0 || ext_mods.size() == 1) << "Expect to have a TVM DSOModule when multiple external runtime modules exist"; if (lowered_funcs.size() == 0) { // Execute the whole module using external runtime. ret_.mod = ext_mods[0]; } else { // Import all external runtime modules. for (const auto& it : ext_mods) { ret_.mod.Import(it); } } } } protected: std::unique_ptr<GraphCodegen> graph_codegen_; /*! \brief target device */ TargetsMap targets_; /*! \brief target host device */ tvm::Target target_host_; /*! \brief parameters */ std::unordered_map<std::string, runtime::NDArray> params_; /*! \brief building output */ BuildOutput ret_; }; runtime::Module RelayBuildCreate() { auto exec = make_object<RelayBuildModule>(); return runtime::Module(exec); } TVM_REGISTER_GLOBAL("relay.build_module._BuildModule") .set_body([](TVMArgs args, TVMRetValue* rv) { *rv = RelayBuildCreate(); }); TVM_REGISTER_GLOBAL("relay.build_module.BindParamsByName") .set_body([](TVMArgs args, TVMRetValue* rv) { Map<std::string, Constant> params = args[1]; std::unordered_map<std::string, runtime::NDArray> params_; for (const auto& kv : params) { params_[kv.first] = kv.second->data; } *rv = relay::backend::BindParamsByName(args[0], params_); }); } // namespace backend } // namespace relay } // namespace tvm
/****************************************************************************** * Copyright 2019 The Apollo 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 "modules/planning/tasks/deciders/rule_based_stop_decider/rule_based_stop_decider.h" #include <string> #include <tuple> #include <vector> #include "modules/common/vehicle_state/vehicle_state_provider.h" #include "modules/planning/common/planning_context.h" #include "modules/planning/common/planning_gflags.h" #include "modules/planning/common/util/common.h" #include "modules/planning/tasks/deciders/lane_change_decider/lane_change_decider.h" namespace apollo { namespace planning { using apollo::common::ErrorCode; using apollo::common::SLPoint; using apollo::common::Status; using apollo::common::TrajectoryPoint; using apollo::common::math::Vec2d; namespace { // TODO(ALL): temporarily copy the value from lane_follow_stage.cc, will extract // as a common value for planning later constexpr double kStraightForwardLineCost = 10.0; } // namespace RuleBasedStopDecider::RuleBasedStopDecider(const TaskConfig &config) : Decider(config) { CHECK(config.has_rule_based_stop_decider_config()); rule_based_stop_decider_config_ = config.rule_based_stop_decider_config(); SetName("RuleBasedStopDecider"); } apollo::common::Status RuleBasedStopDecider::Process( Frame *const frame, ReferenceLineInfo *const reference_line_info) { // 1. Rule_based stop for side pass onto reverse lane if (FLAGS_enable_nonscenario_side_pass) { StopOnSidePass(frame, reference_line_info); } // 2. Rule_based stop for urgent lane change if (FLAGS_enable_lane_change_urgency_checking) { CheckLaneChangeUrgency(frame); } // 3. Rule_based stop at path end position AddPathEndStop(frame, reference_line_info); return Status::OK(); } void RuleBasedStopDecider::CheckLaneChangeUrgency(Frame *const frame) { for (auto &reference_line_info : *frame->mutable_reference_line_info()) { // Check if the target lane is blocked or not if (reference_line_info.IsChangeLanePath()) { is_clear_to_change_lane_ = LaneChangeDecider::IsClearToChangeLane(&reference_line_info); is_change_lane_planning_succeed_ = reference_line_info.Cost() < kStraightForwardLineCost; continue; } // If it's not in lane-change scenario || (target lane is not blocked && // change lane planning succeed), skip if (frame->reference_line_info().size() <= 1 || (is_clear_to_change_lane_ && is_change_lane_planning_succeed_)) { continue; } // When the target lane is blocked in change-lane case, check the urgency // Get the end point of current routing const auto &route_end_waypoint = reference_line_info.Lanes().RouteEndWaypoint(); // If can't get lane from the route's end waypoint, then skip if (!route_end_waypoint.lane) { continue; } auto point = route_end_waypoint.lane->GetSmoothPoint(route_end_waypoint.s); auto *reference_line = reference_line_info.mutable_reference_line(); common::SLPoint sl_point; // Project the end point to sl_point on current reference lane if (reference_line->XYToSL({point.x(), point.y()}, &sl_point) && reference_line->IsOnLane(sl_point)) { // Check the distance from ADC to the end point of current routing double distance_to_passage_end = sl_point.s() - reference_line_info.AdcSlBoundary().end_s(); // If ADC is still far from the end of routing, no need to stop, skip if (distance_to_passage_end > rule_based_stop_decider_config_.approach_distance_for_lane_change()) { continue; } // In urgent case, set a temporary stop fence and wait to change lane // TODO(Jiaxuan Xu): replace the stop fence to more intelligent actions const std::string stop_wall_id = "lane_change_stop"; std::vector<std::string> wait_for_obstacles; util::BuildStopDecision( stop_wall_id, sl_point.s(), rule_based_stop_decider_config_.urgent_distance_for_lane_change(), StopReasonCode::STOP_REASON_LANE_CHANGE_URGENCY, wait_for_obstacles, "RuleBasedStopDecider", frame, &reference_line_info); } } } void RuleBasedStopDecider::AddPathEndStop( Frame *const frame, ReferenceLineInfo *const reference_line_info) { const std::string stop_wall_id = "path_end_stop"; std::vector<std::string> wait_for_obstacles; if (!reference_line_info->path_data().path_label().empty() && reference_line_info->path_data().frenet_frame_path().back().s() - reference_line_info->path_data().frenet_frame_path().front().s() < FLAGS_short_path_length_threshold) { util::BuildStopDecision( stop_wall_id, reference_line_info->path_data().frenet_frame_path().back().s() - 5.0, 0.0, StopReasonCode::STOP_REASON_REFERENCE_END, wait_for_obstacles, "RuleBasedStopDecider", frame, reference_line_info); } } void RuleBasedStopDecider::StopOnSidePass( Frame *const frame, ReferenceLineInfo *const reference_line_info) { const PathData &path_data = reference_line_info->path_data(); double stop_s_on_pathdata = 0.0; const auto &side_pass_info = PlanningContext::Instance()->planning_status().side_pass_stop(); auto *mutable_side_pass_info = PlanningContext::Instance() ->mutable_planning_status() ->mutable_side_pass_stop(); if (path_data.path_label().find("self") != std::string::npos) { mutable_side_pass_info->set_check_clear_flag(false); mutable_side_pass_info->mutable_change_lane_stop_path_point()->Clear(); return; } if (side_pass_info.check_clear_flag() && CheckClearDone(*reference_line_info, side_pass_info.change_lane_stop_path_point())) { mutable_side_pass_info->set_check_clear_flag(false); } if (!side_pass_info.check_clear_flag() && CheckSidePassStop(path_data, *reference_line_info, &stop_s_on_pathdata)) { if (!LaneChangeDecider::IsPerceptionBlocked( *reference_line_info, rule_based_stop_decider_config_.search_beam_length(), rule_based_stop_decider_config_.search_beam_radius_intensity(), rule_based_stop_decider_config_.search_range(), rule_based_stop_decider_config_.is_block_angle_threshold()) && LaneChangeDecider::IsClearToChangeLane(reference_line_info)) { return; } if (!CheckADCStop(path_data, *reference_line_info, stop_s_on_pathdata)) { if (!BuildSidePassStopFence( path_data, stop_s_on_pathdata, mutable_side_pass_info->mutable_change_lane_stop_path_point(), frame, reference_line_info)) { AERROR << "Set side pass stop fail"; } } else { if (LaneChangeDecider::IsClearToChangeLane(reference_line_info)) { mutable_side_pass_info->set_check_clear_flag(true); } } } } // @brief Check if necessary to set stop fence used for nonscenario side pass bool RuleBasedStopDecider::CheckSidePassStop( const PathData &path_data, const ReferenceLineInfo &reference_line_info, double *stop_s_on_pathdata) { const std::vector<std::tuple<double, PathData::PathPointType, double>> &path_point_decision_guide = path_data.path_point_decision_guide(); PathData::PathPointType last_path_point_type = PathData::PathPointType::UNKNOWN; for (const auto &point_guide : path_point_decision_guide) { if (last_path_point_type == PathData::PathPointType::IN_LANE && std::get<1>(point_guide) == PathData::PathPointType::OUT_ON_REVERSE_LANE) { *stop_s_on_pathdata = std::get<0>(point_guide); // Approximate the stop fence s based on the vehicle position const auto &vehicle_config = common::VehicleConfigHelper::Instance()->GetConfig(); const double ego_front_to_center = vehicle_config.vehicle_param().front_edge_to_center(); common::PathPoint stop_pathpoint; if (!path_data.GetPathPointWithRefS(*stop_s_on_pathdata, &stop_pathpoint)) { AERROR << "Can't get stop point on path data"; return false; } const double ego_theta = stop_pathpoint.theta(); Vec2d shift_vec{ego_front_to_center * std::cos(ego_theta), ego_front_to_center * std::sin(ego_theta)}; const Vec2d stop_fence_pose = shift_vec + Vec2d(stop_pathpoint.x(), stop_pathpoint.y()); double stop_l_on_pathdata = 0.0; const auto &nearby_path = reference_line_info.reference_line().map_path(); stop_s_on_pathdata -= nearby_path.GetNearestPoint( stop_fence_pose, stop_s_on_pathdata, &stop_l_on_pathdata); return true; } last_path_point_type = std::get<1>(point_guide); } return false; } // @brief Set stop fence for side pass bool RuleBasedStopDecider::BuildSidePassStopFence( const PathData &path_data, const double stop_s_on_pathdata, common::PathPoint *stop_point, Frame *const frame, ReferenceLineInfo *const reference_line_info) { CHECK_NOTNULL(frame); CHECK_NOTNULL(reference_line_info); if (!path_data.GetPathPointWithRefS(stop_s_on_pathdata, stop_point)) { AERROR << "Can't get stop point on path data"; return false; } const std::string stop_wall_id = "Side_Pass_Stop"; std::vector<std::string> wait_for_obstacles; const auto &nearby_path = reference_line_info->reference_line().map_path(); double stop_point_s = 0.0; double stop_point_l = 0.0; nearby_path.GetNearestPoint({stop_point->x(), stop_point->y()}, &stop_point_s, &stop_point_l); util::BuildStopDecision(stop_wall_id, stop_point_s, 0.0, StopReasonCode::STOP_REASON_SIDEPASS_SAFETY, wait_for_obstacles, "RuleBasedStopDecider", frame, reference_line_info); return true; } // @brief Check if ADV stop at a stop fence bool RuleBasedStopDecider::CheckADCStop( const PathData &path_data, const ReferenceLineInfo &reference_line_info, const double stop_s_on_pathdata) { common::PathPoint stop_point; if (!path_data.GetPathPointWithRefS(stop_s_on_pathdata, &stop_point)) { AERROR << "Can't get stop point on path data"; return false; } const double adc_speed = common::VehicleStateProvider::Instance()->linear_velocity(); if (adc_speed > rule_based_stop_decider_config_.max_adc_stop_speed()) { ADEBUG << "ADC not stopped: speed[" << adc_speed << "]"; return false; } // check stop close enough to stop line of the stop_sign const double adc_front_edge_s = reference_line_info.AdcSlBoundary().end_s(); const auto &nearby_path = reference_line_info.reference_line().map_path(); double stop_point_s = 0.0; double stop_point_l = 0.0; nearby_path.GetNearestPoint({stop_point.x(), stop_point.y()}, &stop_point_s, &stop_point_l); const double distance_stop_line_to_adc_front_edge = stop_point_s - adc_front_edge_s; if (distance_stop_line_to_adc_front_edge > rule_based_stop_decider_config_.max_valid_stop_distance()) { ADEBUG << "not a valid stop. too far from stop line."; return false; } return true; } bool RuleBasedStopDecider::CheckClearDone( const ReferenceLineInfo &reference_line_info, const common::PathPoint &stop_point) { const double adc_front_edge_s = reference_line_info.AdcSlBoundary().end_s(); const double adc_back_edge_s = reference_line_info.AdcSlBoundary().start_s(); const double adc_start_l = reference_line_info.AdcSlBoundary().start_l(); const double adc_end_l = reference_line_info.AdcSlBoundary().end_l(); double lane_left_width = 0.0; double lane_right_width = 0.0; reference_line_info.reference_line().GetLaneWidth( (adc_front_edge_s + adc_back_edge_s) / 2.0, &lane_left_width, &lane_right_width); SLPoint stop_sl_point; reference_line_info.reference_line().XYToSL({stop_point.x(), stop_point.y()}, &stop_sl_point); // use distance to last stop point to determine if needed to check clear // again if (adc_back_edge_s > stop_sl_point.s()) { if (adc_start_l > -lane_right_width || adc_end_l < lane_left_width) { return true; } } return false; } } // namespace planning } // namespace apollo
// Copyright (c) 2017 Ajai V George // Copyright (c) 2020 Akhil J Nair // // SPDX-License-Identifier: BSL-1.0 // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include <hpx/config.hpp> #include <hpx/runtime.hpp> #if !defined(HPX_COMPUTE_DEVICE_CODE) #include <hpx/hpx_main.hpp> #include <hpx/include/parallel_minmax.hpp> #include <hpx/include/partitioned_vector.hpp> #include <hpx/modules/testing.hpp> #include <cstddef> #include <iostream> #include <vector> /////////////////////////////////////////////////////////////////////////////// // Define the vector types to be used. HPX_REGISTER_PARTITIONED_VECTOR(double) /////////////////////////////////////////////////////////////////////////////// #define SIZE 64 template <typename T> void initialize(hpx::partitioned_vector<T>& xvalues) { T init_array[SIZE] = {1, 2, 3, 4, 5, 6, 2, 3, 3, 5, 5, 3, 4, 2, 3, 2, 6, 2, 3, 4, 5, 6, 5, 6, 6, 2, 3, 4, 6, 6, 2, 3, 4, 5, 4, 3, 2, 6, 6, 2, 3, 4, 6, 2, 3, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 5, 8, 5, 4, 2, 3, 4, 5, 2}; for (int i = 0; i < SIZE; i++) { xvalues.set_value(i, init_array[i]); } } template <typename ExPolicy, typename T, typename Func> void test_max_element(ExPolicy&& policy, hpx::partitioned_vector<T>& xvalues, Func&& f, T expected_result) { auto result = hpx::max_element(policy, xvalues.begin(), xvalues.end(), f); HPX_TEST_EQ(*result, expected_result); } template <typename ExPolicy, typename T, typename Func> void test_max_element_async(ExPolicy&& policy, hpx::partitioned_vector<T>& xvalues, Func&& f, T expected_result) { auto result = hpx::max_element(policy, xvalues.begin(), xvalues.end(), f).get(); HPX_TEST_EQ(*result, expected_result); } template <typename T> void max_element_tests(std::vector<hpx::id_type>& localities) { hpx::partitioned_vector<T> xvalues( SIZE, T(0), hpx::container_layout(localities)); initialize(xvalues); test_max_element(hpx::execution::seq, xvalues, std::less<T>(), T(8)); test_max_element(hpx::execution::par, xvalues, std::less<T>(), T(8)); test_max_element_async(hpx::execution::seq(hpx::execution::task), xvalues, std::less<T>(), T(8)); test_max_element_async(hpx::execution::par(hpx::execution::task), xvalues, std::less<T>(), T(8)); test_max_element(hpx::execution::seq, xvalues, std::greater<T>(), T(1)); test_max_element(hpx::execution::par, xvalues, std::greater<T>(), T(1)); test_max_element_async(hpx::execution::seq(hpx::execution::task), xvalues, std::greater<T>(), T(1)); test_max_element_async(hpx::execution::par(hpx::execution::task), xvalues, std::greater<T>(), T(1)); } /////////////////////////////////////////////////////////////////////////////// int main() { std::vector<hpx::id_type> localities = hpx::find_all_localities(); max_element_tests<double>(localities); return hpx::util::report_errors(); } #endif
/////////////////////////////////////////////////////////////////////////////// // NAME: DeleteFile.cpp // // AUTHOR: Ethan D. Twardy <edtwardy@mtu.edu> // // DESCRIPTION: The operation that deletes a file. // // CREATED: 09/10/2019 // // LAST EDITED: 09/11/2019 //// #include <SortMedia/Exceptions/OperationalError.h> #include <SortMedia/Interfaces/ILogger.h> #include <SortMedia/Operations/DeleteFile.h> SortMedia::Operations::DeleteFile ::DeleteFile(FileTypes::LibraryFile file, Interfaces::ILogger& logger) : m_file{std::move(file)}, m_logger{logger} {} void SortMedia::Operations::DeleteFile::apply() { m_logger.log("Deleting file " + m_file.getPath().string(), Logging::LogLevel::INFO); m_file.remove(); } void SortMedia::Operations::DeleteFile::revert() { throw Exceptions::OperationalError("This exception cannot be reverted."); } ///////////////////////////////////////////////////////////////////////////////
/* Copyright 2016 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/distributed_runtime/rpc/grpc_server_lib.h" #include <cstring> #include <limits> #include <memory> #include "grpc/support/alloc.h" #include "grpcpp/grpcpp.h" #include "grpcpp/security/credentials.h" #include "grpcpp/server_builder.h" #include "tensorflow/core/common_runtime/device_factory.h" #include "tensorflow/core/common_runtime/device_mgr.h" #include "tensorflow/core/common_runtime/process_util.h" #include "tensorflow/core/distributed_runtime/collective_param_resolver_distributed.h" #include "tensorflow/core/distributed_runtime/device_resolver_distributed.h" #include "tensorflow/core/distributed_runtime/graph_mgr.h" #include "tensorflow/core/distributed_runtime/local_master.h" #include "tensorflow/core/distributed_runtime/master.h" #include "tensorflow/core/distributed_runtime/master_env.h" #include "tensorflow/core/distributed_runtime/master_session.h" #include "tensorflow/core/distributed_runtime/rpc/async_service_interface.h" #include "tensorflow/core/distributed_runtime/rpc/eager/grpc_eager_service_impl.h" #include "tensorflow/core/distributed_runtime/rpc/grpc_channel.h" #include "tensorflow/core/distributed_runtime/rpc/grpc_master_service.h" #include "tensorflow/core/distributed_runtime/rpc/grpc_worker_cache.h" #include "tensorflow/core/distributed_runtime/rpc/grpc_worker_service.h" #include "tensorflow/core/distributed_runtime/rpc/rpc_rendezvous_mgr.h" #include "tensorflow/core/distributed_runtime/rpc_collective_executor_mgr.h" #include "tensorflow/core/distributed_runtime/server_lib.h" #include "tensorflow/core/distributed_runtime/worker_cache_wrapper.h" #include "tensorflow/core/distributed_runtime/worker_env.h" #include "tensorflow/core/framework/op.h" #include "tensorflow/core/lib/strings/strcat.h" #include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/mem.h" #include "tensorflow/core/public/session_options.h" namespace tensorflow { namespace { // Define an option subclass in order to disable SO_REUSEPORT for the // server socket. class NoReusePortOption : public ::grpc::ServerBuilderOption { public: void UpdateArguments(::grpc::ChannelArguments* args) override { args->SetInt(GRPC_ARG_ALLOW_REUSEPORT, 0); } void UpdatePlugins(std::vector<std::unique_ptr<::grpc::ServerBuilderPlugin>>* plugins) override {} }; // static utility function RendezvousMgrInterface* NewRpcRendezvousMgr(const WorkerEnv* env) { return new RpcRendezvousMgr(env); } } // namespace GrpcServer::GrpcServer(const ServerDef& server_def, Env* env) : server_def_(server_def), env_(env), state_(NEW) {} GrpcServer::~GrpcServer() { TF_CHECK_OK(Stop()); TF_CHECK_OK(Join()); delete master_service_; delete worker_service_; delete eager_service_; // TODO(mrry): Refactor the *Env classes so that it is less fiddly // to destroy them. // Shut down all outstanding rendezvous. delete worker_env_.rendezvous_mgr; // We must delete graph_mgr before device_mgr, due to shared // ownership of OpKernels in the executors. (The graph_mgr will // free all stateless OpKernels, and pass over borrowed stateful // OpKernels, which are also held in their respective devices' // OpSegments.) if (worker_env_.session_mgr != nullptr) { delete worker_env_.session_mgr; // Deletes graph_mgr's. } else { // Note: session_mgr's legacy_session_ deletes device_mgr now. delete worker_env_.device_mgr; } // Do not delete (as these are not owned by the server): // - master_env_.env // - worker_env_.env // - worker_env_.compute_pool } Status GrpcServer::Init( ServiceInitFunction service_func, const RendezvousMgrCreationFunction& rendezvous_mgr_func, const CollectiveMgrCreationFunction& collective_mgr_func, const WorkerCreationFunction& worker_func, const StatsPublisherFactory& stats_factory) { mutex_lock l(mu_); CHECK_EQ(state_, NEW); master_env_.env = env_; worker_env_.env = env_; SessionOptions sess_opts; ConfigProto config = server_def_.default_session_config(); sess_opts.config = config; // Configure shared devices between master and worker. string name_prefix = strings::StrCat("/job:", server_def_.job_name(), "/replica:0", "/task:", server_def_.task_index()); TF_RETURN_IF_ERROR(DeviceFactory::AddDevices(sess_opts, name_prefix, &master_env_.local_devices)); worker_env_.local_devices = master_env_.local_devices; worker_env_.device_mgr = new DeviceMgr(worker_env_.local_devices); worker_env_.rendezvous_mgr = rendezvous_mgr_func == nullptr ? new RpcRendezvousMgr(&worker_env_) : rendezvous_mgr_func(&worker_env_); string unused; string default_worker_name; if (!DeviceNameUtils::SplitDeviceName(master_env_.local_devices[0]->name(), &default_worker_name, &unused)) { return errors::Internal("Could not parse worker name."); } // Look up the port that has been requested for this task in `server_def_`. int requested_port = -1; for (const auto& job : server_def_.cluster().job()) { if (job.name() == server_def_.job_name()) { auto iter = job.tasks().find(server_def_.task_index()); if (iter == job.tasks().end()) { return errors::InvalidArgument("Task ", server_def_.task_index(), " was not defined in job \"", server_def_.job_name(), "\""); } const std::vector<string> hostname_port = str_util::Split(iter->second, ':'); if (hostname_port.size() != 2 || !strings::safe_strto32(hostname_port[1], &requested_port)) { return errors::InvalidArgument( "Could not parse port for local server from \"", iter->second, "\""); } else { break; } } } if (requested_port == -1) { return errors::Internal("Job \"", server_def_.job_name(), "\" was not defined in cluster"); } // N.B. The order of initialization here is intricate, because we // wish to allow `requested_port == 0` (for choosing any port, // mostly for testing). Therefore, the construction of the channel // and worker caches depends on `bound_port_`, which is not set // until we call `builder.BuildAndStart()`. We must create the // service objects before calling `builder.BuildAndStart()`, but // `master_env_` and `worker_env_` are only partially // configured. However, this is not dangerous, because we do not // start serving requests until `this->Start()` is called, which // happens after this method returns. // // TODO(mrry): Provide a general mechanism for dynamically setting // the identities of tasks in the worker pool after the service is // running. ::grpc::ServerBuilder builder; builder.AddListeningPort(strings::StrCat("0.0.0.0:", requested_port), GetServerCredentials(server_def_), &bound_port_); builder.SetMaxMessageSize(std::numeric_limits<int32>::max()); builder.SetOption( std::unique_ptr<::grpc::ServerBuilderOption>(new NoReusePortOption)); master_impl_ = CreateMaster(&master_env_); master_service_ = NewGrpcMasterService(master_impl_.get(), config, &builder); worker_impl_ = worker_func ? worker_func(&worker_env_) : NewGrpcWorker(&worker_env_); worker_service_ = NewGrpcWorkerService(worker_impl_.get(), &builder).release(); eager_service_ = new eager::GrpcEagerServiceImpl(&worker_env_, &builder); // extra service: if (service_func != nullptr) { service_func(&worker_env_, &builder); } server_ = builder.BuildAndStart(); if (!server_) { return errors::Unknown("Could not start gRPC server"); } WorkerCacheInterface* worker_cache; WorkerCacheFactoryOptions worker_cache_factory_options(server_def_); TF_RETURN_IF_ERROR( WorkerCacheFactory(worker_cache_factory_options, &worker_cache)); CHECK_NE(nullptr, worker_cache); if (collective_mgr_func) { worker_env_.collective_executor_mgr = collective_mgr_func(config, &worker_env_, worker_cache); if (!worker_env_.collective_executor_mgr) { return errors::Internal( "collective_mgr_func did not return CollectiveExecutorMgr"); } } else { std::unique_ptr<DeviceResolverDistributed> dev_resolver( new DeviceResolverDistributed(worker_env_.device_mgr, worker_cache, default_worker_name)); std::unique_ptr<CollectiveParamResolverDistributed> param_resolver( new CollectiveParamResolverDistributed(config, worker_env_.device_mgr, dev_resolver.get(), worker_cache, default_worker_name)); worker_env_.collective_executor_mgr = new RpcCollectiveExecutorMgr( config, worker_env_.device_mgr, std::move(dev_resolver), std::move(param_resolver), worker_cache, default_worker_name); } // Set up worker environment. worker_env_.session_mgr = new SessionMgr( &worker_env_, SessionMgr::WorkerNameFromServerDef(server_def_), std::unique_ptr<WorkerCacheInterface>(worker_cache), [this](const ServerDef& server_def, WorkerCacheInterface** worker_cache) { WorkerCacheFactoryOptions options(server_def); return WorkerCacheFactory(options, worker_cache); }); worker_env_.compute_pool = ComputePool(sess_opts); // Finish setting up master environment. master_env_.ops = OpRegistry::Global(); master_env_.worker_cache = worker_cache; master_env_.master_session_factory = [config, stats_factory]( SessionOptions options, const MasterEnv* env, std::unique_ptr<std::vector<std::unique_ptr<Device>>> remote_devs, std::unique_ptr<WorkerCacheInterface> worker_cache, std::unique_ptr<DeviceSet> device_set, std::vector<string> filtered_worker_list) { options.config.MergeFrom(config); return new MasterSession(options, env, std::move(remote_devs), std::move(worker_cache), std::move(device_set), std::move(filtered_worker_list), stats_factory); }; master_env_.worker_cache_factory = [this](const WorkerCacheFactoryOptions& options, WorkerCacheInterface** worker_cache) { return WorkerCacheFactory(options, worker_cache); }; // Provide direct access to the master from in-process clients. LocalMaster::Register(target(), master_impl_.get(), config.operation_timeout_in_ms()); return Status::OK(); } Status GrpcServer::Init( ServiceInitFunction service_func, const RendezvousMgrCreationFunction& rendezvous_mgr_func, const CollectiveMgrCreationFunction& collective_mgr_func, const WorkerCreationFunction& worker_func) { return Init(std::move(service_func), rendezvous_mgr_func, collective_mgr_func, worker_func, CreateNoOpStatsPublisher); } Status GrpcServer::Init( ServiceInitFunction service_func, const RendezvousMgrCreationFunction& rendezvous_mgr_func, const CollectiveMgrCreationFunction& collective_mgr_func) { return Init(std::move(service_func), rendezvous_mgr_func, collective_mgr_func, nullptr); } Status GrpcServer::Init( ServiceInitFunction service_func, const RendezvousMgrCreationFunction& rendezvous_mgr_func) { return Init(std::move(service_func), rendezvous_mgr_func, nullptr, nullptr); } Status GrpcServer::Init() { return Init(nullptr, nullptr, nullptr, nullptr); } Status GrpcServer::ParseChannelSpec(const WorkerCacheFactoryOptions& options, GrpcChannelSpec* channel_spec) { for (const auto& job : options.cluster_def->job()) { std::map<int, string> host_ports; for (const auto& task : job.tasks()) { string& host_port = host_ports[task.first]; if (!host_port.empty()) { return errors::InvalidArgument("JobDef for job \"", job.name(), "\" specified two addresses for task \"", task.first, "\": ", host_port, " and ", task.second); } if (job.name() == *options.job_name && task.first == options.task_index) { host_port = strings::StrCat("localhost:", bound_port_); } else { host_port = task.second; } } TF_RETURN_IF_ERROR(channel_spec->AddHostPortsJob(job.name(), host_ports)); } return Status::OK(); } Status GrpcServer::WorkerCacheFactory(const WorkerCacheFactoryOptions& options, WorkerCacheInterface** worker_cache) { if (options.job_name == nullptr || options.job_name->empty()) { Status s = errors::InvalidArgument( "The master (current machine) is not included in the provided " "cluster_def. ", options.cluster_def->DebugString()); LOG(WARNING) << s; return s; } GrpcChannelSpec channel_spec; TF_RETURN_IF_ERROR(ParseChannelSpec(options, &channel_spec)); channel_cache_.reset( NewGrpcChannelCache(channel_spec, GetChannelCreationFunction())); string name_prefix = strings::StrCat("/job:", *options.job_name, "/replica:0", "/task:", options.task_index); const string host_port = channel_cache_->TranslateTask(name_prefix); int requested_port; if (!strings::safe_strto32(str_util::Split(host_port, ':')[1], &requested_port)) { return errors::Internal("Could not parse port for local server from \"", channel_cache_->TranslateTask(name_prefix), "\"."); } if (requested_port != bound_port_) { return errors::InvalidArgument("Requested port ", requested_port, " differs from expected port ", bound_port_); } *worker_cache = NewGrpcWorkerCacheWithLocalWorker( channel_cache_, worker_impl_.get(), name_prefix); return Status::OK(); } Status GrpcServer::Start() { mutex_lock l(mu_); switch (state_) { case NEW: { master_thread_.reset( env_->StartThread(ThreadOptions(), "TF_master_service", [this] { master_service_->HandleRPCsLoop(); })); worker_thread_.reset( env_->StartThread(ThreadOptions(), "TF_worker_service", [this] { worker_service_->HandleRPCsLoop(); })); eager_thread_.reset( env_->StartThread(ThreadOptions(), "TF_eager_service", [this] { eager_service_->HandleRPCsLoop(); })); state_ = STARTED; LOG(INFO) << "Started server with target: " << target(); return Status::OK(); } case STARTED: LOG(INFO) << "Server already started (target: " << target() << ")"; return Status::OK(); case STOPPED: return errors::FailedPrecondition("Server has stopped."); default: LOG(FATAL); } } Status GrpcServer::Stop() { mutex_lock l(mu_); switch (state_) { case NEW: state_ = STOPPED; return Status::OK(); case STARTED: return errors::Unimplemented( "Clean shutdown is not currently implemented"); case STOPPED: LOG(INFO) << "Server already stopped (target: " << target() << ")"; return Status::OK(); default: LOG(FATAL); } } Status GrpcServer::Join() { mutex_lock l(mu_); switch (state_) { case NEW: // Prevent the server from being started subsequently. state_ = STOPPED; return Status::OK(); case STARTED: case STOPPED: master_thread_.reset(); worker_thread_.reset(); eager_thread_.reset(); return Status::OK(); default: LOG(FATAL); } } const string GrpcServer::target() const { return strings::StrCat("grpc://localhost:", bound_port_); } std::shared_ptr<::grpc::ServerCredentials> GrpcServer::GetServerCredentials( const ServerDef& server_def) const { return ::grpc::InsecureServerCredentials(); } ChannelCreationFunction GrpcServer::GetChannelCreationFunction() const { // We can do this because SparseGrpcChannelCache is robust to nullptr being // returned by the channel creation function return ConvertToChannelCreationFunction(NewHostPortGrpcChannel); } std::unique_ptr<Master> GrpcServer::CreateMaster(MasterEnv* master_env) { return std::unique_ptr<Master>(new Master(master_env, 0.0)); } /* static */ Status GrpcServer::Create(const ServerDef& server_def, Env* env, std::unique_ptr<ServerInterface>* out_server) { std::unique_ptr<GrpcServer> ret( new GrpcServer(server_def, env == nullptr ? Env::Default() : env)); ServiceInitFunction service_func = nullptr; TF_RETURN_IF_ERROR(ret->Init(service_func, NewRpcRendezvousMgr, nullptr)); *out_server = std::move(ret); return Status::OK(); } /* static */ Status GrpcServer::Create(const ServerDef& server_def, Env* env, std::unique_ptr<GrpcServer>* out_server) { std::unique_ptr<GrpcServer> ret( new GrpcServer(server_def, env == nullptr ? Env::Default() : env)); ServiceInitFunction service_func = nullptr; TF_RETURN_IF_ERROR(ret->Init(service_func, NewRpcRendezvousMgr, nullptr)); *out_server = std::move(ret); return Status::OK(); } namespace { class GrpcServerFactory : public ServerFactory { public: bool AcceptsOptions(const ServerDef& server_def) override { return server_def.protocol() == "grpc"; } Status NewServer(const ServerDef& server_def, std::unique_ptr<ServerInterface>* out_server) override { return GrpcServer::Create(server_def, Env::Default(), out_server); } }; // Registers a `ServerFactory` for `GrpcServer` instances. class GrpcServerRegistrar { public: GrpcServerRegistrar() { gpr_allocation_functions alloc_fns; memset(&alloc_fns, 0, sizeof(alloc_fns)); alloc_fns.malloc_fn = port::Malloc; alloc_fns.realloc_fn = port::Realloc; alloc_fns.free_fn = port::Free; gpr_set_allocation_functions(alloc_fns); ServerFactory::Register("GRPC_SERVER", new GrpcServerFactory()); } }; static GrpcServerRegistrar registrar; } // namespace } // namespace tensorflow
/* 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/compiler/xla/service/llvm_ir/llvm_util.h" #include <algorithm> #include <memory> #include <vector> #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/GlobalValue.h" #include "llvm/IR/MDBuilder.h" #include "llvm/IR/Operator.h" #include "llvm/Target/TargetOptions.h" #include "llvm/Transforms/Utils/Cloning.h" #include "tensorflow/compiler/xla/layout_util.h" #include "tensorflow/compiler/xla/literal_util.h" #include "tensorflow/compiler/xla/service/name_uniquer.h" #include "tensorflow/compiler/xla/shape_util.h" #include "tensorflow/compiler/xla/types.h" #include "tensorflow/compiler/xla/util.h" #include "tensorflow/core/lib/core/casts.h" #include "tensorflow/core/lib/core/errors.h" #include "tensorflow/core/lib/io/path.h" #include "tensorflow/core/lib/strings/str_util.h" #include "tensorflow/core/lib/strings/strcat.h" #include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/logging.h" #include "tensorflow/core/platform/types.h" namespace xla { namespace llvm_ir { namespace { // Note, this function is only useful in an insertion context; in a global // (e.g. constants) context it will CHECK fail. llvm::Module* ModuleFromIRBuilder(llvm::IRBuilder<>* ir_builder) { auto block = CHECK_NOTNULL(ir_builder->GetInsertBlock()); auto fn = CHECK_NOTNULL(block->getParent()); auto module = CHECK_NOTNULL(fn->getParent()); return module; } } // namespace string AsString(const std::string& str) { return string(str.data(), str.length()); } llvm::StringRef AsStringRef(tensorflow::StringPiece str) { return llvm::StringRef(str.data(), str.size()); } std::unique_ptr<llvm::Module> DropConstantInitializers( const llvm::Module& module) { std::unique_ptr<llvm::Module> cloned_module = CloneModule(module); for (llvm::GlobalVariable& global_var : cloned_module->globals()) { global_var.setInitializer(nullptr); global_var.setLinkage(llvm::GlobalValue::LinkageTypes::ExternalLinkage); } return cloned_module; } string DumpModuleToString(const llvm::Module& module) { std::string buffer_string; llvm::raw_string_ostream ostream(buffer_string); module.print(ostream, nullptr); ostream.flush(); return AsString(buffer_string); } llvm::Value* EmitCallToIntrinsic( llvm::Intrinsic::ID intrinsic_id, tensorflow::gtl::ArraySlice<llvm::Value*> operands, tensorflow::gtl::ArraySlice<llvm::Type*> overloaded_types, llvm::IRBuilder<>* ir_builder) { llvm::Module* module = ModuleFromIRBuilder(ir_builder); llvm::Function* intrinsic = llvm::Intrinsic::getDeclaration( module, intrinsic_id, AsArrayRef(overloaded_types)); return ir_builder->CreateCall(intrinsic, AsArrayRef(operands)); } llvm::Value* EmitFloatMax(llvm::Value* lhs_value, llvm::Value* rhs_value, llvm::IRBuilder<>* ir_builder) { if (ir_builder->getFastMathFlags().noNaNs()) { auto cmp = ir_builder->CreateFCmpUGE(lhs_value, rhs_value); return ir_builder->CreateSelect(cmp, lhs_value, rhs_value); } else { auto cmp_ge = ir_builder->CreateFCmpOGE(lhs_value, rhs_value); auto lhs_is_nan = ir_builder->CreateFCmpUNE(lhs_value, lhs_value); auto sel_lhs = ir_builder->CreateOr(cmp_ge, lhs_is_nan); return ir_builder->CreateSelect(sel_lhs, lhs_value, rhs_value); } } llvm::Value* EmitFloatMin(llvm::Value* lhs_value, llvm::Value* rhs_value, llvm::IRBuilder<>* ir_builder) { if (ir_builder->getFastMathFlags().noNaNs()) { auto cmp = ir_builder->CreateFCmpULE(lhs_value, rhs_value); return ir_builder->CreateSelect(cmp, lhs_value, rhs_value); } else { auto cmp_le = ir_builder->CreateFCmpOLE(lhs_value, rhs_value); auto lhs_is_nan = ir_builder->CreateFCmpUNE(lhs_value, lhs_value); auto sel_lhs = ir_builder->CreateOr(cmp_le, lhs_is_nan); return ir_builder->CreateSelect(sel_lhs, lhs_value, rhs_value); } } llvm::Value* EmitBufferIndexingGEP(llvm::Value* array, llvm::Value* index, llvm::IRBuilder<>* ir_builder) { llvm::Type* array_type = array->getType(); CHECK(array_type->isPointerTy()); llvm::PointerType* array_type_as_pointer = llvm::cast<llvm::PointerType>(array_type); VLOG(2) << "EmitBufferIndexingGEP with type=" << llvm_ir::DumpToString(*array_type) << " array=" << llvm_ir::DumpToString(*array) << " index=" << llvm_ir::DumpToString(*index); return ir_builder->CreateInBoundsGEP( array_type_as_pointer->getElementType(), array, llvm::isa<llvm::GlobalVariable>(array) ? llvm::ArrayRef<llvm::Value*>({ir_builder->getInt64(0), index}) : index); } llvm::Value* EmitBufferIndexingGEP(llvm::Value* array, int64 index, llvm::IRBuilder<>* ir_builder) { return EmitBufferIndexingGEP(array, ir_builder->getInt64(index), ir_builder); } llvm::Type* PrimitiveTypeToIrType(PrimitiveType element_type, llvm::Module* module) { switch (element_type) { case PRED: case S8: case U8: return llvm::Type::getInt8Ty(module->getContext()); case S16: case U16: case BF16: // For BF16 we just need some type that is 16 bits wide so that it will // take up the right amount of space in memory. LLVM does not have a BF16 // type (the LLVM half type is IEEE 16 bit floating point, not bfloat), so // we can't map it directly to an LLVM type. We will not map a BF16 // addition to an addition on this type (int16) - this is just the type // used for storage. return llvm::Type::getInt16Ty(module->getContext()); case F16: return llvm::Type::getHalfTy(module->getContext()); case S32: case U32: return llvm::Type::getInt32Ty(module->getContext()); case S64: case U64: return llvm::Type::getInt64Ty(module->getContext()); case F32: return llvm::Type::getFloatTy(module->getContext()); case F64: return llvm::Type::getDoubleTy(module->getContext()); case C64: { auto cplx_t = module->getTypeByName("complex64"); if (cplx_t == nullptr) { // C++ standard dictates the memory layout of std::complex is contiguous // real followed by imaginary. C++11 section 26.4 [complex.numbers]: // If z is an lvalue expression of type cv std::complex<T> then the // expression reinterpret_cast<cv T(&)[2]>(z) shall be well-formed, // reinterpret_cast<cv T(&)[2]>(z)[0] shall designate the real part of // z, and reinterpret_cast<cv T(&)[2]>(z)[1] shall designate the // imaginary part of z. return llvm::StructType::create( {llvm::Type::getFloatTy(module->getContext()), llvm::Type::getFloatTy(module->getContext())}, "complex64", /*isPacked=*/true); } return cplx_t; } // A Tuple contains an array of pointers. Use i8*. case TUPLE: // An Opaque is like a void*, use i8*. case OPAQUE: return llvm::Type::getInt8PtrTy(module->getContext()); default: LOG(FATAL) << "unsupported type " << element_type; } } int GetSizeInBits(llvm::Type* type) { const llvm::StructType* struct_ty = llvm::dyn_cast<llvm::StructType>(type); if (struct_ty) { CHECK(struct_ty->isPacked()); int bits = 0; for (auto element_type : struct_ty->elements()) { bits += GetSizeInBits(element_type); } return bits; } int bits = type->getPrimitiveSizeInBits(); CHECK_GT(bits, 0) << "type is not sized"; return bits; } llvm::Type* ShapeToIrType(const Shape& shape, llvm::Module* module) { llvm::Type* result_type = PrimitiveTypeToIrType(shape.element_type(), module); if (ShapeUtil::IsTuple(shape)) { // A tuple buffer is an array of pointers. result_type = llvm::ArrayType::get(result_type, shape.tuple_shapes_size()); } else if (ShapeUtil::IsArray(shape)) { for (int64 dimension : LayoutUtil::MinorToMajor(shape)) { result_type = llvm::ArrayType::get(result_type, shape.dimensions(dimension)); } } return result_type; } StatusOr<llvm::Value*> EncodeSelfDescribingShapeConstant( const Shape& shape, int32* shape_size, llvm::IRBuilder<>* ir_builder) { string encoded_shape = shape.SerializeAsString(); if (encoded_shape.size() > std::numeric_limits<int32>::max()) { return InternalError("Encoded shape size exceeded int32 size limit."); } *shape_size = static_cast<int32>(encoded_shape.size()); return ir_builder->CreateGlobalStringPtr(llvm_ir::AsStringRef(encoded_shape)); } StatusOr<Shape> DecodeSelfDescribingShapeConstant(const void* shape_ptr, int32 size_bytes) { Shape shape; TF_RET_CHECK(shape.ParseFromArray(shape_ptr, size_bytes)); TF_RETURN_IF_ERROR(ShapeUtil::ValidateShape(shape)); return shape; } namespace { // Recursively construct a multidimensional LLVM constant which represents the // given literal. The minor-to-major dimension ordering in the constant matches // that of the literal. For example, given a [2 x 3 x 4] Literal (dimension 0 // has size 4, dimension 1 has size 3, etc) of primitive type F32 with a // minor_to_major value of [2, 1, 0] (column major), a LLVM constant of type // [4 x [3 x [2 x float]] will be returned. // // multi_index is a multidimensional index into the array. dimension_index is an // index into the minor_to_major field in the literal shape. This determines // which dimension is iterated over in this level of the recursion. Dimensions // are iterated from most major down to most minor (highest dimension_index // value down to zero). llvm::Constant* LiteralToConstant(const Literal& literal, int64 dimension_index, std::vector<int64>* multi_index, llvm::Module* module) { const Shape& shape = literal.shape(); llvm::Type* ir_element_type = llvm_ir::PrimitiveTypeToIrType(shape.element_type(), module); if (dimension_index == -1) { // Base case of the recursion. Index into the data field of the protobuf // with the multi index. llvm::Constant* value; switch (shape.element_type()) { case PRED: value = llvm::ConstantInt::get(ir_element_type, literal.Get<bool>(*multi_index)); break; case U8: value = llvm::ConstantInt::get(ir_element_type, literal.Get<uint8>(*multi_index)); break; case S32: value = llvm::ConstantInt::get(ir_element_type, literal.Get<int32>(*multi_index)); break; case U32: value = llvm::ConstantInt::get(ir_element_type, literal.Get<uint32>(*multi_index)); break; case S64: value = llvm::ConstantInt::get(ir_element_type, literal.Get<int64>(*multi_index)); break; case U64: value = llvm::ConstantInt::get(ir_element_type, literal.Get<uint64>(*multi_index)); break; case F32: value = llvm::ConstantFP::get(ir_element_type, literal.Get<float>(*multi_index)); break; case BF16: value = llvm::ConstantInt::get( ir_element_type, tensorflow::bit_cast<uint16>(literal.Get<bfloat16>(*multi_index))); break; case F16: value = llvm::ConstantFP::get( ir_element_type, static_cast<float>(literal.Get<half>(*multi_index))); break; case F64: value = llvm::ConstantFP::get(ir_element_type, literal.Get<double>(*multi_index)); break; case C64: { complex64 x = literal.Get<complex64>(*multi_index); value = llvm::ConstantStruct::get( static_cast<llvm::StructType*>(ir_element_type), llvm::ConstantFP::get(llvm_ir::PrimitiveTypeToIrType(F32, module), x.real()), llvm::ConstantFP::get(llvm_ir::PrimitiveTypeToIrType(F32, module), x.imag())); break; } default: LOG(FATAL) << "unsupported type " << shape.element_type(); } return value; } // The dimension index starts at the one less than the rank of the array and // decrements with each recursive call. We want to iterate through the // dimensions in major-to-minor order as we recurse so just index into // minor_to_major to get the dimension number for this level of the recursion. int64 dimension = LayoutUtil::Minor(shape.layout(), dimension_index); // Recursively call LiteralToConstant to construct subarrays for the // more-minor dimensions. Gather the subarrays into a vector for bundling into // a new (higher-dimensional) ConstantArray. std::vector<llvm::Constant*> elements; for (int64 i = 0; i < shape.dimensions(dimension); ++i) { (*multi_index)[dimension] = i; elements.push_back( LiteralToConstant(literal, dimension_index - 1, multi_index, module)); } llvm::Type* element_type; if (elements.empty()) { element_type = ir_element_type; for (int i = 0; i < dimension_index; ++i) { int64 index = LayoutUtil::Minor(shape.layout(), i); element_type = llvm::ArrayType::get(element_type, shape.dimensions(index)); } } else { element_type = elements[0]->getType(); } llvm::ArrayType* aggregate_type = llvm::ArrayType::get(element_type, shape.dimensions(dimension)); return llvm::ConstantArray::get(aggregate_type, elements); } template <typename T> llvm::Constant* GetConstantDataArray(const Literal& literal, llvm::Module* module) { const T* data = static_cast<const T*>(literal.untyped_data()); int64 num_elements = literal.size_bytes() / sizeof(T); return llvm::ConstantDataArray::get(module->getContext(), llvm::makeArrayRef(data, num_elements)); } } // namespace llvm::Constant* ConvertLiteralToIrConstant(const Literal& literal, llvm::Module* module) { const Shape& shape = literal.shape(); // TODO(b/29904935): We can get rid of this switch by exposing a // ConstantDataArray factory method that takes a llvm::Type and a StringRef. switch (shape.element_type()) { case U64: return GetConstantDataArray<uint64>(literal, module); case U32: return GetConstantDataArray<uint32>(literal, module); case U8: return GetConstantDataArray<uint8>(literal, module); case S64: return GetConstantDataArray<int64>(literal, module); case S32: return GetConstantDataArray<int32>(literal, module); case F64: return GetConstantDataArray<double>(literal, module); case F32: return GetConstantDataArray<float>(literal, module); case BF16: case F16: return GetConstantDataArray<uint16>(literal, module); case PRED: return GetConstantDataArray<bool>(literal, module); // TODO(b/29904935): Also use ConstantDataArray for complex numbers. case C64: { int64 dimensions = ShapeUtil::Rank(shape); std::vector<int64> multi_index(dimensions, 0); return LiteralToConstant(literal, /*dimension_index=*/dimensions - 1, &multi_index, module); } default: LOG(FATAL) << "unsupported type " << shape.element_type(); } } llvm::AllocaInst* EmitAllocaAtFunctionEntry(llvm::Type* type, tensorflow::StringPiece name, llvm::IRBuilder<>* ir_builder, int alignment) { return EmitAllocaAtFunctionEntryWithCount(type, nullptr, name, ir_builder, alignment); } llvm::AllocaInst* EmitAllocaAtFunctionEntryWithCount( llvm::Type* type, llvm::Value* element_count, tensorflow::StringPiece name, llvm::IRBuilder<>* ir_builder, int alignment) { llvm::IRBuilder<>::InsertPoint insert_point = ir_builder->saveIP(); llvm::Function* function = ir_builder->GetInsertBlock()->getParent(); ir_builder->SetInsertPoint(&function->getEntryBlock(), function->getEntryBlock().getFirstInsertionPt()); llvm::AllocaInst* alloca = ir_builder->CreateAlloca(type, element_count, AsStringRef(name)); if (alignment != 0) { alloca->setAlignment(alignment); } ir_builder->restoreIP(insert_point); return alloca; } llvm::BasicBlock* CreateBasicBlock(llvm::BasicBlock* insert_before, tensorflow::StringPiece name, llvm::IRBuilder<>* ir_builder) { return llvm::BasicBlock::Create( /*Context=*/ir_builder->getContext(), /*Name=*/AsStringRef(name), /*Parent=*/ir_builder->GetInsertBlock()->getParent(), /*InsertBefore*/ insert_before); } LlvmIfData EmitIfThenElse(llvm::Value* condition, tensorflow::StringPiece name, llvm::IRBuilder<>* ir_builder, bool emit_else) { llvm_ir::LlvmIfData if_data; if_data.if_block = ir_builder->GetInsertBlock(); if_data.true_block = CreateBasicBlock( nullptr, tensorflow::strings::StrCat(name, "-true"), ir_builder); if_data.false_block = emit_else ? CreateBasicBlock(nullptr, tensorflow::strings::StrCat(name, "-false"), ir_builder) : nullptr; // Add a terminator to the if block, if necessary. if (if_data.if_block->getTerminator() == nullptr) { ir_builder->SetInsertPoint(if_data.if_block); if_data.after_block = CreateBasicBlock( nullptr, tensorflow::strings::StrCat(name, "-after"), ir_builder); ir_builder->CreateBr(if_data.after_block); } else { if_data.after_block = if_data.if_block->splitBasicBlock( ir_builder->GetInsertPoint(), AsStringRef(tensorflow::strings::StrCat(name, "-after"))); } // Our basic block should now end with an unconditional branch. Remove it; // we're going to replace it with a conditional branch. if_data.if_block->getTerminator()->eraseFromParent(); ir_builder->SetInsertPoint(if_data.if_block); ir_builder->CreateCondBr( condition, if_data.true_block, emit_else ? if_data.false_block : if_data.after_block); ir_builder->SetInsertPoint(if_data.true_block); ir_builder->CreateBr(if_data.after_block); if (emit_else) { ir_builder->SetInsertPoint(if_data.false_block); ir_builder->CreateBr(if_data.after_block); } ir_builder->SetInsertPoint(if_data.after_block, if_data.after_block->getFirstInsertionPt()); return if_data; } llvm::Value* EmitComparison(llvm::CmpInst::Predicate predicate, llvm::Value* lhs_value, llvm::Value* rhs_value, llvm::IRBuilder<>* ir_builder) { llvm::Value* comparison_result; if (lhs_value->getType()->isIntegerTy()) { comparison_result = ir_builder->CreateICmp(predicate, lhs_value, rhs_value); } else { comparison_result = ir_builder->CreateFCmp(predicate, lhs_value, rhs_value); } // comparison_result is i1, but the NVPTX codegen incorrectly lowers i1 // arrays. So we extend it to i8 so that it's addressable. return ir_builder->CreateZExt( comparison_result, llvm_ir::PrimitiveTypeToIrType(PRED, ModuleFromIRBuilder(ir_builder))); } // Internal helper that is called from emitted code to log an int64 value with a // tag. static void LogS64(const char* tag, int64 value) { LOG(INFO) << tag << " (int64): " << value; } void EmitLogging(const char* tag, llvm::Value* value, llvm::IRBuilder<>* ir_builder) { llvm::FunctionType* log_function_type = llvm::FunctionType::get( ir_builder->getVoidTy(), {ir_builder->getInt64Ty(), ir_builder->getInt64Ty()}, /*isVarArg=*/false); ir_builder->CreateCall( log_function_type, ir_builder->CreateIntToPtr( ir_builder->getInt64(tensorflow::bit_cast<int64>(&LogS64)), log_function_type->getPointerTo()), {ir_builder->getInt64(tensorflow::bit_cast<int64>(tag)), value}); } void SetAlignmentMetadataForLoad(llvm::LoadInst* load, uint64_t alignment) { llvm::LLVMContext& context = load->getContext(); llvm::Type* int64_ty = llvm::Type::getInt64Ty(context); llvm::Constant* alignment_constant = llvm::ConstantInt::get(int64_ty, alignment); llvm::MDBuilder metadata_builder(context); auto* alignment_metadata = metadata_builder.createConstant(alignment_constant); load->setMetadata(llvm::LLVMContext::MD_align, llvm::MDNode::get(context, alignment_metadata)); } void SetDereferenceableMetadataForLoad(llvm::LoadInst* load, uint64_t dereferenceable_bytes) { llvm::LLVMContext& context = load->getContext(); llvm::Type* int64_ty = llvm::Type::getInt64Ty(context); llvm::Constant* dereferenceable_bytes_constant = llvm::ConstantInt::get(int64_ty, dereferenceable_bytes); llvm::MDBuilder metadata_builder(context); auto* dereferenceable_bytes_metadata = metadata_builder.createConstant(dereferenceable_bytes_constant); load->setMetadata(llvm::LLVMContext::MD_dereferenceable, llvm::MDNode::get(context, dereferenceable_bytes_metadata)); } llvm::Instruction* AddRangeMetadata(int64 lower, int64 upper, llvm::Instruction* inst) { llvm::LLVMContext& context = inst->getParent()->getContext(); llvm::IntegerType* i32 = llvm::Type::getInt32Ty(context); inst->setMetadata( llvm::LLVMContext::MD_range, llvm::MDNode::get( context, {llvm::ConstantAsMetadata::get(llvm::ConstantInt::get(i32, lower)), llvm::ConstantAsMetadata::get(llvm::ConstantInt::get(i32, upper))})); return inst; } string IrName(string a) { a.erase(std::remove(a.begin(), a.end(), '%'), a.end()); return a; } string IrName(tensorflow::StringPiece a, tensorflow::StringPiece b) { if (!a.empty() && !b.empty()) { return IrName(tensorflow::strings::StrCat(a, ".", b)); } return IrName(tensorflow::strings::StrCat(a, b)); } string IrName(const HloInstruction* a, tensorflow::StringPiece b) { return IrName(a->name(), b); } string SanitizeFunctionName(string function_name) { // The backend with the strictest requirements on function names is NVPTX, so // we sanitize to its requirements. // // A slightly stricter version of the NVPTX requirements is that names match // /[a-zA-Z_$][a-zA-Z0-9_$]*/, with the exception that the names "_" and "$" // are illegal. // Sanitize chars in function_name. std::transform(function_name.begin(), function_name.end(), function_name.begin(), [](char c) { if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '$') { return c; } return '_'; }); // Ensure the name isn't empty. if (function_name.empty()) { function_name = "__unnamed"; } // Ensure the name doesn't start with a number. if (!function_name.empty() && function_name[0] >= '0' && function_name[0] <= '9') { function_name.insert(function_name.begin(), '_'); } // Ensure the name isn't "_" or "$". if (function_name == "_" || function_name == "$") { function_name += '_'; } return function_name; } void SetToFirstInsertPoint(llvm::BasicBlock* blk, llvm::IRBuilder<>* builder) { builder->SetInsertPoint(blk, blk->getFirstInsertionPt()); } void SetToLastInsertPoint(llvm::BasicBlock* blk, llvm::IRBuilder<>* builder) { if (llvm::Instruction* terminator = blk->getTerminator()) { builder->SetInsertPoint(terminator); } else { builder->SetInsertPoint(blk); } } llvm::Value* CreateRor(llvm::Value* rotand, llvm::Value* rotor, llvm::IRBuilder<>* builder) { auto size = rotand->getType()->getPrimitiveSizeInBits(); auto size_value = builder->getIntN(size, size); auto mod = [=](llvm::Value* x) { return builder->CreateURem(x, size_value); }; return builder->CreateOr( builder->CreateShl(rotand, mod(builder->CreateSub(size_value, rotor))), builder->CreateLShr(rotand, mod(rotor))); } int64 ByteSizeOf(const Shape& shape, const llvm::DataLayout& data_layout) { unsigned pointer_size = data_layout.getPointerSize(); return ShapeUtil::ByteSizeOf(shape, pointer_size); } llvm::FastMathFlags GetFastMathFlags(bool fast_math_enabled) { llvm::FastMathFlags flags; if (fast_math_enabled) { // Fast implies AllowReassoc, NoInfs, NoNaNs, NoSignedZeros, // AllowReciprocal, AllowContract, and ApproxFunc. flags.setFast(); } return flags; } void SetTargetOptions(bool fast_math_enabled, llvm::TargetOptions* target_options) { // In LLVM backend flags, UnsafeFPMath does not explicitly imply // NoInfs, etc. target_options->UnsafeFPMath = fast_math_enabled; target_options->NoInfsFPMath = fast_math_enabled; target_options->NoNaNsFPMath = fast_math_enabled; target_options->NoSignedZerosFPMath = fast_math_enabled; } std::map<int, llvm::MDNode*> MergeMetadata( llvm::LLVMContext* context, const std::map<int, llvm::MDNode*>& a, const std::map<int, llvm::MDNode*>& b) { // We should extend this as needed to deal with other kinds of metadata like // !dereferenceable and !range. std::map<int, llvm::MDNode*> result; for (auto kind_md_pair : a) { if (kind_md_pair.first == llvm::LLVMContext::MD_alias_scope) { llvm::SmallVector<llvm::Metadata*, 8> union_of_scopes; llvm::SmallPtrSet<llvm::Metadata*, 8> scope_set; for (const auto& scope_a : kind_md_pair.second->operands()) { scope_set.insert(llvm::cast<llvm::MDNode>(scope_a.get())); union_of_scopes.push_back(llvm::cast<llvm::MDNode>(scope_a.get())); } auto it = b.find(kind_md_pair.first); if (it != b.end()) { for (const auto& scope_b : it->second->operands()) { if (!scope_set.count(llvm::cast<llvm::MDNode>(scope_b.get()))) { union_of_scopes.push_back(llvm::cast<llvm::MDNode>(scope_b.get())); } } } result[llvm::LLVMContext::MD_alias_scope] = llvm::MDNode::get(*context, union_of_scopes); } else if (kind_md_pair.first == llvm::LLVMContext::MD_noalias) { llvm::SmallVector<llvm::Metadata*, 8> intersection_of_scopes; llvm::SmallPtrSet<llvm::Metadata*, 8> scope_set; for (const auto& scope_a : kind_md_pair.second->operands()) { scope_set.insert(llvm::cast<llvm::MDNode>(scope_a.get())); } auto it = b.find(kind_md_pair.first); if (it != b.end()) { for (const auto& scope_b : it->second->operands()) { if (scope_set.count(llvm::cast<llvm::MDNode>(scope_b))) { intersection_of_scopes.push_back(llvm::cast<llvm::MDNode>(scope_b)); } } } if (!intersection_of_scopes.empty()) { result[llvm::LLVMContext::MD_noalias] = llvm::MDNode::get(*context, intersection_of_scopes); } } } return result; } static string GetProcessUniqueIrFileName(tensorflow::StringPiece prefix) { static tensorflow::mutex mu(tensorflow::LINKER_INITIALIZED); static NameUniquer* uniquer = new NameUniquer(/*separator=*/"-"); tensorflow::mutex_lock lock(mu); return uniquer->GetUniqueName(prefix); } static Status CreateAndWriteStringToFile(const string& directory_name, const string& file_name, const string& text) { std::unique_ptr<tensorflow::WritableFile> f; TF_RETURN_IF_ERROR( tensorflow::Env::Default()->RecursivelyCreateDir(directory_name)); TF_RETURN_IF_ERROR( tensorflow::Env::Default()->NewWritableFile(file_name, &f)); TF_RETURN_IF_ERROR(f->Append(text)); TF_RETURN_IF_ERROR(f->Close()); return Status::OK(); } Status DumpIRToDirectory(const string& directory_name, const string& hlo_module_name, const llvm::Module& llvm_module, bool optimized) { // We can end up compiling different modules with the same name when using // XlaJitCompiledCpuFunction::Compile. Avoid overwriting IR files previously // dumped from the same process in such cases. string unique_and_safe_file_name = GetProcessUniqueIrFileName( tensorflow::strings::StrCat("ir-", SanitizeFileName(hlo_module_name), "-", optimized ? "with" : "no", "-opt")); string ir_file_name = tensorflow::io::JoinPath( directory_name, tensorflow::strings::StrCat(unique_and_safe_file_name, ".ll")); // For some models the embedded constants can be huge, so also dump the module // with the constants stripped to get IR that is easier to manipulate. string ir_no_constant_initializers_file_name = tensorflow::io::JoinPath( directory_name, tensorflow::strings::StrCat(unique_and_safe_file_name, "-noconst.ll")); TF_RETURN_IF_ERROR(CreateAndWriteStringToFile( directory_name, ir_file_name, DumpModuleToString(llvm_module))); return CreateAndWriteStringToFile( directory_name, ir_no_constant_initializers_file_name, DumpModuleToString(*DropConstantInitializers(llvm_module))); } llvm::Function* CreateFunction(llvm::FunctionType* function_type, llvm::GlobalValue::LinkageTypes linkage, bool enable_fast_math, bool optimize_for_size, tensorflow::StringPiece name, llvm::Module* module) { llvm::Function* function = llvm::Function::Create(function_type, linkage, AsStringRef(name), module); function->setCallingConv(llvm::CallingConv::C); function->addFnAttr("no-frame-pointer-elim", "false"); if (enable_fast_math) { function->addFnAttr("unsafe-fp-math", "true"); function->addFnAttr("no-infs-fp-math", "true"); function->addFnAttr("no-nans-fp-math", "true"); function->addFnAttr("no-signed-zeros-fp-math", "true"); } // Add the optize attribute to the function if optimizing for size. This // controls internal behavior of some optimization passes (e.g. loop // unrolling). if (optimize_for_size) { function->addFnAttr(llvm::Attribute::OptimizeForSize); } return function; } void InitializeLLVMCommandLineOptions(const HloModuleConfig& config) { auto options = config.debug_options().xla_backend_extra_options(); if (!options.empty()) { std::vector<string> fake_argv_storage; fake_argv_storage.push_back(""); for (const auto& it : options) { // Skip options the XLA backend itself consumes. if (!tensorflow::str_util::StartsWith(it.first, "xla_")) { if (it.second.empty()) { fake_argv_storage.push_back(it.first); } else { fake_argv_storage.push_back(it.first + "=" + it.second); } } } VLOG(2) << "Passing argv to LLVM:"; std::vector<const char*> fake_argv; for (const auto& s : fake_argv_storage) { fake_argv.push_back(s.c_str()); VLOG(2) << s; } llvm::cl::ParseCommandLineOptions(fake_argv.size(), &fake_argv[0]); } } } // namespace llvm_ir } // namespace xla
/* * Copyright 1999-2002,2004 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. */ /* * $Id: IBMVAOS2Defs.hpp 176026 2004-09-08 13:57:07Z peiyongz $ */ #if !defined(IBMVAOS2DEFS_HPP) #define IBMVAOS2DEFS_HPP // --------------------------------------------------------------------------- // Include some runtime files that will be needed product wide // --------------------------------------------------------------------------- #include <sys/types.h> // for size_t and ssize_t #include <limits.h> // for MAX of size_t and ssize_t // --------------------------------------------------------------------------- // A define in the build for each project is also used to control whether // the export keyword is from the project's viewpoint or the client's. // These defines provide the platform specific keywords that they need // to do this. // --------------------------------------------------------------------------- #define PLATFORM_EXPORT _Export #define PLATFORM_IMPORT // --------------------------------------------------------------------------- // Indicate that we do not support native bools // If the compiler can handle boolean itself, do not define it // --------------------------------------------------------------------------- // #define NO_NATIVE_BOOL // --------------------------------------------------------------------------- // Each compiler might support L"" prefixed constants. There are places // where it is advantageous to use the L"" where it supported, to avoid // unnecessary transcoding. // If your compiler does not support it, don't define this. // --------------------------------------------------------------------------- #define XML_LSTRSUPPORT // --------------------------------------------------------------------------- // Indicate that we support C++ namespace // Do not define it if the compile cannot handle C++ namespace // --------------------------------------------------------------------------- // #define XERCES_HAS_CPP_NAMESPACE // --------------------------------------------------------------------------- // Define our version of the XML character // --------------------------------------------------------------------------- typedef unsigned short XMLCh; // --------------------------------------------------------------------------- // Define unsigned 16 and 32 bits integers // --------------------------------------------------------------------------- typedef unsigned short XMLUInt16; typedef unsigned int XMLUInt32; // --------------------------------------------------------------------------- // Define signed 32 bits integers // --------------------------------------------------------------------------- typedef int XMLInt32; // --------------------------------------------------------------------------- // XMLSize_t is the unsigned integral type. // --------------------------------------------------------------------------- #if defined(_SIZE_T) && defined(SIZE_MAX) && defined(_SSIZE_T) && defined(SSIZE_MAX) typedef size_t XMLSize_t; #define XML_SIZE_MAX SIZE_MAX typedef ssize_t XMLSSize_t; #define XML_SSIZE_MAX SSIZE_MAX #else typedef unsigned long XMLSize_t; #define XML_SIZE_MAX ULONG_MAX typedef long XMLSSize_t; #define XML_SSIZE_MAX LONG_MAX #endif // --------------------------------------------------------------------------- // Force on the Xerces debug token if it was on in the build environment // --------------------------------------------------------------------------- #ifdef _DEBUG #define XERCES_DEBUG #endif // --------------------------------------------------------------------------- // The name of the DLL that is built by the Visual Age C++ version of the // system. OS/2 supports only 8.3 names for DLLs. // --------------------------------------------------------------------------- const char* const Xerces_DLLName = "xerces-c"; #endif //IBMVAOS2DEFS_HPP
//%LICENSE//////////////////////////////////////////////////////////////// // // Licensed to The Open Group (TOG) under one or more contributor license // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with // this work for additional information regarding copyright ownership. // Each contributor licenses this file to you under the OpenPegasus Open // Source License; you may not use this file except in compliance with the // License. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // ////////////////////////////////////////////////////////////////////////// // //%///////////////////////////////////////////////////////////////////////// #include <Pegasus/Common/Config.h> #include <Pegasus/Common/String.h> #include <Pegasus/Common/PegasusVersion.h> PEGASUS_USING_PEGASUS; PEGASUS_USING_STD; #include "UNIX_UnimodemProvider.h" extern "C" PEGASUS_EXPORT CIMProvider* PegasusCreateProvider(const String& providerName) { if (String::equalNoCase(providerName, CIMHelper::EmptyString)) return NULL; else if (String::equalNoCase(providerName, "UNIX_UnimodemProvider")) return new UNIX_UnimodemProvider(); return NULL; }
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy of the License at // // https://opensource.org/licenses/BSD-3-Clause // // 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 "mat.h" #if __ARM_NEON #include <arm_neon.h> #endif // __ARM_NEON #include <math.h> #include "cpu.h" #include "layer_type.h" #include "layer.h" #if NCNN_VULKAN #if __ANDROID_API__ >= 26 #include <android/hardware_buffer.h> #endif // __ANDROID_API__ >= 26 #endif // NCNN_VULKAN namespace ncnn { void Mat::substract_mean_normalize(const float* mean_vals, const float* norm_vals) { Layer* op; if (mean_vals && !norm_vals) { // substract mean only op = create_layer(LayerType::Bias); ParamDict pd; pd.set(0, c); op->load_param(pd); Mat weights[1]; weights[0] = Mat(c); for (int q=0; q<c; q++) { weights[0][q] = -mean_vals[q]; } op->load_model(ModelBinFromMatArray(weights)); } else if (!mean_vals && norm_vals) { // normalize only op = create_layer(LayerType::Scale); ParamDict pd; pd.set(0, c); op->load_param(pd); Mat weights[1]; weights[0] = Mat(c); for (int q=0; q<c; q++) { weights[0][q] = norm_vals[q]; } op->load_model(ModelBinFromMatArray(weights)); } else if (mean_vals && norm_vals) { // substract mean and normalize op = create_layer(LayerType::Scale); ParamDict pd; pd.set(0, c); pd.set(1, 1); op->load_param(pd); Mat weights[2]; weights[0] = Mat(c); weights[1] = Mat(c); for (int q=0; q<c; q++) { weights[0][q] = norm_vals[q]; weights[1][q] = - mean_vals[q] * norm_vals[q]; } op->load_model(ModelBinFromMatArray(weights)); } else // if (!mean_vals && !norm_vals) { return; } Option opt; opt.num_threads = 1;// TODO op->create_pipeline(opt); op->forward_inplace(*this, opt); op->destroy_pipeline(opt); delete op; } Mat Mat::from_float16(const unsigned short* data, int size) { Mat m(size); if (m.empty()) return m; float* ptr = m;//.data; #if __ARM_NEON && (__ARM_FP & 2) int nn = cpu_support_arm_vfpv4() ? size >> 2 : 0; int remain = size - (nn << 2); #else int remain = size; #endif // __ARM_NEON #if __ARM_NEON && (__ARM_FP & 2) #if __aarch64__ if (nn > 0) { asm volatile( "0: \n" "ld1 {v0.4h}, [%1], #8 \n" "fcvtl v1.4s, v0.4h \n" "subs %w0, %w0, #1 \n" "st1 {v1.4s}, [%2], #16 \n" "bne 0b \n" : "=r"(nn), // %0 "=r"(data), // %1 "=r"(ptr) // %2 : "0"(nn), "1"(data), "2"(ptr) : "cc", "memory", "v0", "v1" ); } #else if (nn > 0) { asm volatile( "0: \n" "pld [%1, #64] \n" "vld1.s16 {d0}, [%1 :64]! \n" "vcvt.f32.f16 q1, d0 \n" "subs %0, #1 \n" "vst1.f32 {d2-d3}, [%2 :128]! \n" "bne 0b \n" : "=r"(nn), // %0 "=r"(data), // %1 "=r"(ptr) // %2 : "0"(nn), "1"(data), "2"(ptr) : "cc", "memory", "q0", "q1" ); } #endif // __aarch64__ #endif // __ARM_NEON for (; remain>0; remain--) { *ptr = float16_to_float32(*data); data++; ptr++; } return m; } #if NCNN_VULKAN #if __ANDROID_API__ >= 26 VkImageMat VkImageMat::from_android_hardware_buffer(AHardwareBuffer* hb, VkAndroidHardwareBufferImageAllocator* allocator) { AHardwareBuffer_Desc bufferDesc; AHardwareBuffer_describe(hb, &bufferDesc); VkImageMat m; m.allocator = allocator; m.width = bufferDesc.width; m.height = bufferDesc.height; m.format = VK_FORMAT_UNDEFINED; m.data = allocator->fastMalloc(hb); m.refcount = (int*)((unsigned char*)m.data + offsetof(VkImageMemory, refcount)); *m.refcount = 1; return m; } #endif // __ANDROID_API__ >= 26 #endif // NCNN_VULKAN unsigned short float32_to_float16(float value) { // 1 : 8 : 23 union { unsigned int u; float f; } tmp; tmp.f = value; // 1 : 8 : 23 unsigned short sign = (tmp.u & 0x80000000) >> 31; unsigned short exponent = (tmp.u & 0x7F800000) >> 23; unsigned int significand = tmp.u & 0x7FFFFF; // fprintf(stderr, "%d %d %d\n", sign, exponent, significand); // 1 : 5 : 10 unsigned short fp16; if (exponent == 0) { // zero or denormal, always underflow fp16 = (sign << 15) | (0x00 << 10) | 0x00; } else if (exponent == 0xFF) { // infinity or NaN fp16 = (sign << 15) | (0x1F << 10) | (significand ? 0x200 : 0x00); } else { // normalized short newexp = exponent + (- 127 + 15); if (newexp >= 31) { // overflow, return infinity fp16 = (sign << 15) | (0x1F << 10) | 0x00; } else if (newexp <= 0) { // underflow if (newexp >= -10) { // denormal half-precision unsigned short sig = (significand | 0x800000) >> (14 - newexp); fp16 = (sign << 15) | (0x00 << 10) | sig; } else { // underflow fp16 = (sign << 15) | (0x00 << 10) | 0x00; } } else { fp16 = (sign << 15) | (newexp << 10) | (significand >> 13); } } return fp16; } float float16_to_float32(unsigned short value) { // 1 : 5 : 10 unsigned short sign = (value & 0x8000) >> 15; unsigned short exponent = (value & 0x7c00) >> 10; unsigned short significand = value & 0x03FF; // fprintf(stderr, "%d %d %d\n", sign, exponent, significand); // 1 : 8 : 23 union { unsigned int u; float f; } tmp; if (exponent == 0) { if (significand == 0) { // zero tmp.u = (sign << 31); } else { // denormal exponent = 0; // find non-zero bit while ((significand & 0x200) == 0) { significand <<= 1; exponent++; } significand <<= 1; significand &= 0x3FF; tmp.u = (sign << 31) | ((-exponent + (-15 + 127)) << 23) | (significand << 13); } } else if (exponent == 0x1F) { // infinity or NaN tmp.u = (sign << 31) | (0xFF << 23) | (significand << 13); } else { // normalized tmp.u = (sign << 31) | ((exponent + (-15 + 127)) << 23) | (significand << 13); } return tmp.f; } void copy_make_border(const Mat& src, Mat& dst, int top, int bottom, int left, int right, int type, float v, const Option& opt) { Layer* padding = create_layer(LayerType::Padding); ParamDict pd; pd.set(0, top); pd.set(1, bottom); pd.set(2, left); pd.set(3, right); pd.set(4, type); pd.set(5, v); padding->load_param(pd); padding->create_pipeline(opt); padding->forward(src, dst, opt); padding->destroy_pipeline(opt); delete padding; } void copy_cut_border(const Mat& src, Mat& dst, int top, int bottom, int left, int right, const Option& opt) { Layer* crop = create_layer(LayerType::Crop); ParamDict pd; pd.set(0, left); pd.set(1, top); pd.set(2, 0); pd.set(3, src.w - left - right); pd.set(4, src.h - top - bottom); pd.set(5, -233); crop->load_param(pd); crop->create_pipeline(opt); crop->forward(src, dst, opt); crop->destroy_pipeline(opt); delete crop; } void resize_bilinear(const Mat& src, Mat& dst, int w, int h, const Option& opt) { Layer* interp = create_layer(LayerType::Interp); ParamDict pd; pd.set(0, 2); pd.set(3, h); pd.set(4, w); interp->load_param(pd); interp->create_pipeline(opt); interp->forward(src, dst, opt); interp->destroy_pipeline(opt); delete interp; } void resize_bicubic(const Mat& src, Mat& dst, int w, int h, const Option& opt) { Layer* interp = create_layer(LayerType::Interp); ParamDict pd; pd.set(0, 3); pd.set(3, h); pd.set(4, w); interp->load_param(pd); interp->create_pipeline(opt); interp->forward(src, dst, opt); interp->destroy_pipeline(opt); delete interp; } void convert_packing(const Mat& src, Mat& dst, int _elempack, const Option& opt) { Layer* packing = create_layer(LayerType::Packing); ParamDict pd; pd.set(0, _elempack); packing->load_param(pd); packing->create_pipeline(opt); packing->forward(src, dst, opt); packing->destroy_pipeline(opt); delete packing; } void cast_float32_to_float16(const Mat& src, Mat& dst, const Option& opt) { Layer* cast = create_layer(LayerType::Cast); ParamDict pd; pd.set(0, 1); pd.set(1, 2); cast->load_param(pd); cast->create_pipeline(opt); cast->forward(src, dst, opt); cast->destroy_pipeline(opt); delete cast; } void cast_float16_to_float32(const Mat& src, Mat& dst, const Option& opt) { Layer* cast = create_layer(LayerType::Cast); ParamDict pd; pd.set(0, 2); pd.set(1, 1); cast->load_param(pd); cast->create_pipeline(opt); cast->forward(src, dst, opt); cast->destroy_pipeline(opt); delete cast; } void cast_int8_to_float32(const Mat& src, Mat& dst, const Option& opt) { Layer* cast = create_layer(LayerType::Cast); ParamDict pd; pd.set(0, 3); pd.set(1, 1); cast->load_param(pd); cast->create_pipeline(opt); cast->forward(src, dst, opt); cast->destroy_pipeline(opt); delete cast; } void cast_float32_to_bfloat16(const Mat& src, Mat& dst, const Option& opt) { Layer* cast = create_layer(LayerType::Cast); ParamDict pd; pd.set(0, 1); pd.set(1, 4); cast->load_param(pd); cast->create_pipeline(opt); cast->forward(src, dst, opt); cast->destroy_pipeline(opt); delete cast; } void cast_bfloat16_to_float32(const Mat& src, Mat& dst, const Option& opt) { Layer* cast = create_layer(LayerType::Cast); ParamDict pd; pd.set(0, 4); pd.set(1, 1); cast->load_param(pd); cast->create_pipeline(opt); cast->forward(src, dst, opt); cast->destroy_pipeline(opt); delete cast; } void quantize_float32_to_int8(const Mat& src, Mat& dst, float scale, const Option& opt) { Layer* quantize = create_layer(LayerType::Quantize); ParamDict pd; pd.set(0, scale); quantize->load_param(pd); quantize->create_pipeline(opt); quantize->forward(src, dst, opt); quantize->destroy_pipeline(opt); delete quantize; } void dequantize_int32_to_float32(Mat& m, float scale, const float* bias, int bias_data_size, const Option& opt) { Layer* dequantize = create_layer(LayerType::Dequantize); ParamDict pd; pd.set(0, scale); pd.set(1, bias ? 1 : 0); pd.set(2, bias_data_size); dequantize->load_param(pd); Mat weights[1]; weights[0] = Mat(bias_data_size, (void*)bias); dequantize->load_model(ModelBinFromMatArray(weights)); dequantize->create_pipeline(opt); dequantize->forward_inplace(m, opt); dequantize->destroy_pipeline(opt); delete dequantize; } void requantize_int8_to_int8(const Mat& src, Mat& dst, float scale_in, float scale_out, const float* bias, int bias_data_size, int fusion_relu, const Option& opt) { Layer* requantize = create_layer(LayerType::Requantize); ParamDict pd; pd.set(0, scale_in); pd.set(1, scale_out); pd.set(2, bias ? 1 : 0); pd.set(3, bias_data_size); pd.set(4, fusion_relu); requantize->load_param(pd); Mat weights[1]; weights[0] = Mat(bias_data_size, (void*)bias); requantize->load_model(ModelBinFromMatArray(weights)); requantize->create_pipeline(opt); requantize->forward(src, dst, opt); requantize->destroy_pipeline(opt); delete requantize; } } // namespace ncnn
#include <ncurses.h> #include <pybind11/pybind11.h> void game() { initscr(); // start ncurses mode printw("Hello, snek!"); // print hello world refresh(); // print it on the real screen getch(); // wait for user input endwin(); // end ncurses mode } PYBIND11_MODULE(_onix, m) { m.doc() = "Actually a snek!"; m.def("game", &game, "The game function"); }
/* Copyright 2018 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/compiler/xla/service/gpu/gpu_conv_runner.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "tensorflow/compiler/xla/layout_util.h" #include "tensorflow/compiler/xla/service/gpu/backend_configs.pb.h" #include "tensorflow/compiler/xla/service/gpu/stream_executor_util.h" #include "tensorflow/compiler/xla/shape_util.h" #include "tensorflow/compiler/xla/status_macros.h" #include "tensorflow/compiler/xla/util.h" namespace xla { namespace gpu { se::dnn::BatchDescriptor GetBiasDescriptor(const GpuConvConfig& config) { se::dnn::BatchDescriptor result(config.output_descriptor.ndims()); result.set_count(1) .set_height(1) .set_width(1) .set_feature_map_count(config.output_descriptor.feature_map_count()) .set_layout([&] { // Normalize NCHW_VECT_C to NCHW for layout of `bias`, even though it's // actually the same (because `bias` only has one dimension): cudnn // does not accept NCHW_VECT_C for `bias`. se::dnn::DataLayout layout = config.output_descriptor.layout(); switch (layout) { case se::dnn::DataLayout::kBatchDepthYX4: case se::dnn::DataLayout::kBatchDepthYX32: return se::dnn::DataLayout::kBatchDepthYX; default: return layout; } }()); if (result.ndims() == 3) { result.set_spatial_dim(se::dnn::DimIndex::Z, 1); } return result; } namespace { using se::DeviceMemory; using se::DeviceMemoryBase; using se::Stream; using se::dnn::AlgorithmConfig; using se::dnn::BatchDescriptor; using se::dnn::ConvolutionDescriptor; using se::dnn::DataLayout; using se::dnn::DimIndex; using se::dnn::FilterDescriptor; using se::dnn::FilterLayout; using se::dnn::ProfileResult; // A StreamExecutor ScratchAllocator that wraps a single XLA allocation, // returning it (in its entirety) the first time Allocate() is called. class ScratchBufAllocator : public se::ScratchAllocator { public: explicit ScratchBufAllocator(se::DeviceMemoryBase scratch) : scratch_(scratch) {} ~ScratchBufAllocator() override = default; int64_t GetMemoryLimitInBytes() override { return scratch_.size(); } se::port::StatusOr<DeviceMemory<uint8_t>> AllocateBytes( int64_t byte_size) override { if (allocated_) { return se::port::InternalError( "Can't allocate twice from a ScratchBufAllocator."); } if (byte_size > scratch_.size()) { return se::port::InternalError(absl::StrCat( "Can't allocate ", byte_size, " bytes from a ScratchBufAllocator of size ", scratch_.size())); } allocated_ = true; return se::DeviceMemory<uint8_t>(scratch_); } private: se::DeviceMemoryBase scratch_; bool allocated_ = false; }; template <typename ElementType, typename OutputType> Status RunGpuConvUnfused(GpuConvParams params, se::Stream* stream, RunConvOptions options, DeviceMemory<ElementType> input_buf, DeviceMemory<ElementType> filter_buf, DeviceMemory<OutputType> output_buf, DeviceMemoryBase scratch_memory) { if (params.config->conv_result_scale != 1) { return InternalError( "StreamExecutor doesn't support scaled convolution: %lf.", params.config->conv_result_scale); } TF_ASSIGN_OR_RETURN(se::dnn::ConvolutionKind kind, GetDNNConvKindFromCudnnConvKind(params.config->kind)); TF_ASSIGN_OR_RETURN( se::dnn::DataType input_type, GetDNNDataTypeFromPrimitiveType(params.config->input_type)); TF_ASSIGN_OR_RETURN( se::dnn::DataType output_type, GetDNNDataTypeFromPrimitiveType(params.config->output_type)); se::dnn::LazyOpRunner<se::dnn::ConvOp>* lazy_runner = options.runner_cache->AsConvRunner(); absl::optional<se::dnn::LazyOpRunner<se::dnn::ConvOp>> local_runner; if (!lazy_runner) { local_runner.emplace(params.config->algorithm); lazy_runner = &*local_runner; } se::dnn::ConvOp::Config config{kind, input_type, output_type, params.config->input_descriptor, params.config->filter_descriptor, params.config->output_descriptor, params.config->conv_desc}; TF_ASSIGN_OR_RETURN(auto* runner, lazy_runner->GetOrCreateRunner(config, stream)); return (*runner)(stream, options.profile_result, scratch_memory, input_buf, filter_buf, output_buf); } template <typename ElementType, typename BiasType, typename OutputType> Status RunGpuConvForwardActivation(const GpuConvParams& params, se::Stream* stream, RunConvOptions options, DeviceMemory<ElementType> input_buf, DeviceMemory<ElementType> filter_buf, DeviceMemory<OutputType> output_buf, DeviceMemoryBase scratch_memory) { BatchDescriptor bias_desc = GetBiasDescriptor(*params.config); se::DeviceMemory<OutputType> side_input(params.fusion->side_input_buf); // If there is no side input, use output as the side input. if (side_input.is_null()) { if (params.config->fusion->side_input_scale != 0) { return InternalError( "Side input scale is not 0, yet no side input buffer is " "provided"); } // Since side-input scale is 0, the values in the side input don't // matter. The simplest thing to do would be to pass in a null buffer // for the side input, but cudnn doesn't allow this. cudnn does promise // that if side-input-scale is 0 the side input won't be read, so we // just pass in the output buffer, since it's handy and has the correct // size. side_input = output_buf; } se::dnn::LazyOpRunner<se::dnn::FusedConvOp>* lazy_runner = options.runner_cache->AsFusedConvRunner(); absl::optional<se::dnn::LazyOpRunner<se::dnn::FusedConvOp>> local_runner; if (!lazy_runner) { local_runner.emplace(params.config->algorithm); lazy_runner = &*local_runner; } TF_ASSIGN_OR_RETURN( se::dnn::DataType input_type, GetDNNDataTypeFromPrimitiveType(params.config->input_type)); TF_ASSIGN_OR_RETURN( se::dnn::DataType output_type, GetDNNDataTypeFromPrimitiveType(params.config->output_type)); se::dnn::FusedConvOp::Config config{se::dnn::ConvolutionKind::FORWARD, input_type, BiasTypeForInputType(input_type), output_type, params.config->conv_result_scale, params.config->fusion->side_input_scale, params.config->input_descriptor, params.config->filter_descriptor, bias_desc, params.config->output_descriptor, params.config->conv_desc, params.config->fusion->mode}; TF_ASSIGN_OR_RETURN(auto* runner, lazy_runner->GetOrCreateRunner(config, stream)); return (*runner)(stream, options.profile_result, scratch_memory, input_buf, filter_buf, side_input, params.fusion->bias_buf, output_buf); } // StreamExecutor supports various data types via overloading, and the support // is maintained on-demand. To avoid calling into non-exist overloads, we have // to carefully not call into them by using enable_if. // TODO(timshen): Ideally, to avoid such complication in the runner, we can turn // StreamExecutor overloadings to template functions, and for unsupported data // types return runtime errors. // This is the specialization for double, float, and half types. All kinds of // convolutions are supported here. template <typename ElementType, typename BiasType, typename OutputType, typename std::enable_if< !std::is_integral<ElementType>::value>::type* = nullptr> Status RunGpuConvInternalImpl(const GpuConvParams& params, se::Stream* stream, RunConvOptions options, DeviceMemory<ElementType> input_buf, DeviceMemory<ElementType> filter_buf, DeviceMemory<OutputType> output_buf, DeviceMemoryBase scratch_memory) { switch (params.config->kind) { case CudnnConvKind::kForward: case CudnnConvKind::kBackwardInput: case CudnnConvKind::kBackwardFilter: return RunGpuConvUnfused(params, stream, options, input_buf, filter_buf, output_buf, scratch_memory); case CudnnConvKind::kForwardActivation: { return RunGpuConvForwardActivation<ElementType, BiasType, OutputType>( params, stream, options, input_buf, filter_buf, output_buf, scratch_memory); } } return Status::OK(); } // Specialization for integer types. Only two forward convolutions are allowed. template <typename ElementType, typename BiasType, typename OutputType, typename std::enable_if<std::is_integral<ElementType>::value>::type* = nullptr> Status RunGpuConvInternalImpl(const GpuConvParams& params, se::Stream* stream, RunConvOptions options, DeviceMemory<ElementType> input_buf, DeviceMemory<ElementType> filter_buf, DeviceMemory<OutputType> output_buf, DeviceMemoryBase scratch_memory) { switch (params.config->kind) { case CudnnConvKind::kForward: return RunGpuConvUnfused(params, stream, options, input_buf, filter_buf, output_buf, scratch_memory); case CudnnConvKind::kForwardActivation: return RunGpuConvForwardActivation<ElementType, BiasType, OutputType>( params, stream, options, input_buf, filter_buf, output_buf, scratch_memory); default: return InternalError( "Only convolution kinds kForward and kForwardActivation are " "supported for integer types"); } return Status::OK(); } template <typename ElementType, typename BiasType, typename OutputType> Status RunGpuConvImpl(const GpuConvParams& params, se::Stream* stream, se::DeviceMemoryBase scratch_memory, RunConvOptions options) { auto input_buf = se::DeviceMemory<ElementType>(params.input_buf); auto filter_buf = se::DeviceMemory<ElementType>(params.filter_buf); auto output_buf = se::DeviceMemory<OutputType>(params.output_buf); se::dnn::AlgorithmDesc algorithm = params.config->algorithm; if (options.runner_cache) { algorithm = options.runner_cache->ToAlgorithmDesc(); } Status run_status = RunGpuConvInternalImpl<ElementType, BiasType, OutputType>( params, stream, options, input_buf, filter_buf, output_buf, scratch_memory); if (run_status != Status::OK()) { return run_status; } if (!stream->ok()) { return InternalError( "Unable to launch convolution with type %s and algorithm %s", CudnnConvKindToString(params.config->kind), algorithm.ToString()); } return Status::OK(); } int64_t GetVectCSize(DataLayout layout) { switch (layout) { case DataLayout::kBatchDepthYX4: return 4; case DataLayout::kBatchDepthYX32: return 32; default: return 1; } } int64_t GetVectCSize(FilterLayout layout) { switch (layout) { case FilterLayout::kOutputInputYX4: return 4; case FilterLayout::kOutputInputYX32: return 32; default: return 1; } } } // anonymous namespace StatusOr<GpuConvConfig> GetGpuConvConfig( const GpuConvDescriptor& desc, const absl::string_view inst_as_string) { GpuConvConfig config; const Shape& operand0_shape = desc.operand0_shape; const Shape& operand1_shape = desc.operand1_shape; const Shape& result_shape = desc.result_shape; const CudnnConvBackendConfig& backend_config = desc.backend_config; config.input_type = operand0_shape.element_type(); config.output_type = result_shape.element_type(); config.kind = desc.kind; config.algorithm = se::dnn::AlgorithmDesc(backend_config.algorithm()); config.conv_result_scale = backend_config.conv_result_scale(); switch (config.kind) { case CudnnConvKind::kForward: case CudnnConvKind::kForwardActivation: config.input_shape = operand0_shape; config.filter_shape = operand1_shape; config.output_shape = result_shape; break; case CudnnConvKind::kBackwardInput: config.input_shape = result_shape; config.filter_shape = operand1_shape; config.output_shape = operand0_shape; break; case CudnnConvKind::kBackwardFilter: config.input_shape = operand0_shape; config.filter_shape = result_shape; config.output_shape = operand1_shape; break; default: return InternalError("Unknown convolution kind"); } if (config.kind == CudnnConvKind::kForwardActivation) { config.fusion.emplace(); GpuConvConfig::FusionConfig& fusion = *config.fusion; if (!se::dnn::ActivationMode_IsValid(backend_config.activation_mode())) { return InternalError("Bad activation mode: %s", backend_config.ShortDebugString()); } fusion.mode = static_cast<se::dnn::ActivationMode>(backend_config.activation_mode()); fusion.side_input_scale = backend_config.side_input_scale(); } const Window& window = desc.window; const ConvolutionDimensionNumbers& dnums = desc.dnums; VLOG(3) << "Convolution Algorithm: " << config.algorithm.ToString(); VLOG(3) << "Convolution kind: " << CudnnConvKindToString(config.kind); VLOG(3) << "input shape: " << ShapeUtil::HumanStringWithLayout(config.input_shape); VLOG(3) << "filter shape: " << ShapeUtil::HumanStringWithLayout(config.filter_shape); VLOG(3) << "Output shape: " << ShapeUtil::HumanStringWithLayout(config.output_shape); VLOG(3) << "Window: { " << window.ShortDebugString() << " }"; VLOG(3) << "Dim nums: { " << dnums.ShortDebugString() << " }"; const int num_dimensions = window.dimensions_size(); CHECK_LE(num_dimensions, 3) << inst_as_string; // cuDNN does not support 1D convolutions. We therefore express 1D // convolutions as 2D convolutions where the first spatial dimension is 1. // This matches the behavior of TF (see definition of conv1d in // tensorflow/python/ops/nn_ops.py). const int effective_num_dimensions = std::max(2, num_dimensions); // If one dimension is reversed, we need to have all dimensions reversed (so // we're doing convolution not cross correlation). const bool dims_reversed = window.dimensions_size() > 0 && window.dimensions()[0].window_reversal(); CHECK_EQ(num_dimensions, dnums.input_spatial_dimensions_size()) << inst_as_string; CHECK_EQ(num_dimensions, dnums.kernel_spatial_dimensions_size()) << inst_as_string; CHECK_EQ(num_dimensions, dnums.output_spatial_dimensions_size()) << inst_as_string; for (const WindowDimension& dim : window.dimensions()) { CHECK_EQ(dims_reversed, dim.window_reversal()) << inst_as_string; CHECK_EQ(dim.padding_low(), dim.padding_high()) << inst_as_string; CHECK_EQ(dim.base_dilation(), 1) << "cudnn does not support base dilation; it " "must be made explicit with a kPad: " << inst_as_string; } // cuDNN's convolution APIs support the BDYX layout for activations/output and // the OIYX layout for weights. DataLayout input_dl; FilterLayout filter_dl; DataLayout output_dl; const Shape& input_shape = config.input_shape; const Shape& filter_shape = config.filter_shape; const Shape& output_shape = config.output_shape; TF_ASSIGN_OR_RETURN(std::tie(input_dl, filter_dl, output_dl), XlaConvShapesToStreamExecutorLayouts( dnums, input_shape, filter_shape, output_shape)); BatchDescriptor& input_descriptor = config.input_descriptor; input_descriptor = BatchDescriptor(effective_num_dimensions); input_descriptor.set_layout(input_dl) .set_feature_map_count( GetVectCSize(input_dl) * input_shape.dimensions(dnums.input_feature_dimension())) .set_count(input_shape.dimensions(dnums.input_batch_dimension())); for (int dim = 0; dim < num_dimensions; ++dim) { // Note that the dimensions are reversed. The same holds below. input_descriptor.set_spatial_dim( static_cast<DimIndex>(effective_num_dimensions - dim - 1), input_shape.dimensions(dnums.input_spatial_dimensions(dim))); } FilterDescriptor& filter_descriptor = config.filter_descriptor; filter_descriptor = FilterDescriptor(effective_num_dimensions); filter_descriptor.set_layout(filter_dl) .set_input_feature_map_count( GetVectCSize(filter_dl) * filter_shape.dimensions(dnums.kernel_input_feature_dimension())) .set_output_feature_map_count( filter_shape.dimensions(dnums.kernel_output_feature_dimension())); for (int dim = 0; dim < num_dimensions; ++dim) { filter_descriptor.set_spatial_dim( static_cast<DimIndex>(effective_num_dimensions - dim - 1), filter_shape.dimensions(dnums.kernel_spatial_dimensions(dim))); } config.conv_desc = ConvolutionDescriptor(effective_num_dimensions); config.conv_desc.set_group_count(desc.feature_group_count); config.conv_desc.set_convolution_not_crosscorr(dims_reversed); for (int dim = 0; dim < num_dimensions; ++dim) { config.conv_desc .set_zero_padding( static_cast<DimIndex>(effective_num_dimensions - dim - 1), window.dimensions(dim).padding_low()) .set_filter_stride( static_cast<DimIndex>(effective_num_dimensions - dim - 1), window.dimensions(dim).stride()) .set_dilation_rate( static_cast<DimIndex>(effective_num_dimensions - dim - 1), window.dimensions(dim).window_dilation()); } BatchDescriptor& output_descriptor = config.output_descriptor; output_descriptor = BatchDescriptor(effective_num_dimensions); output_descriptor.set_layout(output_dl) .set_feature_map_count( GetVectCSize(output_dl) * output_shape.dimensions(dnums.output_feature_dimension())) .set_count(output_shape.dimensions(dnums.output_batch_dimension())); for (int dim = 0; dim < num_dimensions; ++dim) { output_descriptor.set_spatial_dim( static_cast<DimIndex>(effective_num_dimensions - dim - 1), output_shape.dimensions(dnums.output_spatial_dimensions(dim))); } // Add a singleton dimension in the 1D convolution case. for (int dim = 0; dim < effective_num_dimensions - num_dimensions; dim++) { input_descriptor.set_spatial_dim(static_cast<DimIndex>(dim), 1); output_descriptor.set_spatial_dim(static_cast<DimIndex>(dim), 1); filter_descriptor.set_spatial_dim(static_cast<DimIndex>(dim), 1); config.conv_desc.set_zero_padding(static_cast<DimIndex>(dim), 0) .set_filter_stride(static_cast<DimIndex>(dim), 1); } return config; } StatusOr<GpuConvConfig> GetGpuConvConfig( const HloCustomCallInstruction* cudnn_call) { GpuConvDescriptor descriptor; TF_ASSIGN_OR_RETURN(descriptor.kind, GetCudnnConvKind(cudnn_call)); TF_ASSIGN_OR_RETURN(descriptor.backend_config, cudnn_call->backend_config<CudnnConvBackendConfig>()); descriptor.operand0_shape = cudnn_call->operand(0)->shape(); descriptor.operand1_shape = cudnn_call->operand(1)->shape(); descriptor.result_shape = cudnn_call->shape().tuple_shapes(0); descriptor.scratch_size = cudnn_call->shape().tuple_shapes(1).dimensions(0); descriptor.window = cudnn_call->window(); descriptor.dnums = cudnn_call->convolution_dimension_numbers(); descriptor.feature_group_count = cudnn_call->feature_group_count(); return GetGpuConvConfig(descriptor, cudnn_call->ToString()); } StatusOr<GpuConvParams> GetGpuConvParams( const GpuConvConfig& config, absl::Span<const se::DeviceMemoryBase> operand_buffers, se::DeviceMemoryBase result_buffer) { GpuConvParams params; params.config = &config; switch (config.kind) { case CudnnConvKind::kForward: case CudnnConvKind::kForwardActivation: params.input_buf = operand_buffers[0]; params.filter_buf = operand_buffers[1]; params.output_buf = result_buffer; break; case CudnnConvKind::kBackwardInput: params.input_buf = result_buffer; params.filter_buf = operand_buffers[1]; params.output_buf = operand_buffers[0]; break; case CudnnConvKind::kBackwardFilter: params.input_buf = operand_buffers[0]; params.filter_buf = result_buffer; params.output_buf = operand_buffers[1]; break; } if (config.kind == CudnnConvKind::kForwardActivation) { params.fusion.emplace(); GpuConvParams::FusionParams& fusion = *params.fusion; fusion.bias_buf = operand_buffers[2]; if (operand_buffers.size() >= 4) { fusion.side_input_buf = operand_buffers[3]; } } return params; } Status RunGpuConv(const gpu::GpuConvConfig& config, absl::Span<const se::DeviceMemoryBase> operand_buffers, se::DeviceMemoryBase result_buffer, se::DeviceMemoryBase scratch_memory, se::Stream* stream, RunConvOptions options) { TF_ASSIGN_OR_RETURN(GpuConvParams params, GetGpuConvParams(config, operand_buffers, result_buffer)); PrimitiveType input_primitive_type = config.input_type; switch (input_primitive_type) { case F16: return RunGpuConvImpl<Eigen::half, Eigen::half, Eigen::half>( params, stream, scratch_memory, options); case BF16: return RunGpuConvImpl<Eigen::bfloat16, Eigen::bfloat16, Eigen::bfloat16>( params, stream, scratch_memory, options); case F32: return RunGpuConvImpl<float, float, float>(params, stream, scratch_memory, options); case F64: return RunGpuConvImpl<double, double, double>(params, stream, scratch_memory, options); case S8: { PrimitiveType output_primitive_type = config.output_type; switch (output_primitive_type) { case F32: return RunGpuConvImpl<int8_t, float, float>(params, stream, scratch_memory, options); case S8: return RunGpuConvImpl<int8_t, float, int8_t>(params, stream, scratch_memory, options); default: return Unimplemented("Unimplemented convolution"); } } default: return Unimplemented("Unimplemented convolution"); } } } // namespace gpu } // namespace xla
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include <memory> #include <string> #include <vector> #include <algorithm> #include <utility> #include <format_reader_ptr.h> #include <samples/slog.hpp> #include "inputs_filling.hpp" using namespace InferenceEngine; #ifdef USE_OPENCV static const std::vector<std::string> supported_image_extensions = { "bmp", "dib", "jpeg", "jpg", "jpe", "jp2", "png", "pbm", "pgm", "ppm", "sr", "ras", "tiff", "tif" }; #else static const std::vector<std::string> supported_image_extensions = { "bmp" }; #endif static const std::vector<std::string> supported_binary_extensions = { "bin" }; std::vector<std::string> filterFilesByExtensions(const std::vector<std::string>& filePaths, const std::vector<std::string>& extensions) { std::vector<std::string> filtered; auto getExtension = [](const std::string &name) { auto extensionPosition = name.rfind('.', name.size()); return extensionPosition == std::string::npos ? "" : name.substr(extensionPosition + 1, name.size() - 1); }; for (auto& filePath : filePaths) { auto extension = getExtension(filePath); std::transform(extension.begin(), extension.end(), extension.begin(), ::tolower); if (std::find(extensions.begin(), extensions.end(), extension) != extensions.end()) { filtered.push_back(filePath); } } return filtered; } void fillBlobImage(Blob::Ptr& inputBlob, const std::vector<std::string>& filePaths, const size_t& batchSize, const benchmark_app::InputInfo& app_info, const size_t& requestId, const size_t& inputId, const size_t& inputSize) { MemoryBlob::Ptr minput = as<MemoryBlob>(inputBlob); if (!minput) { THROW_IE_EXCEPTION << "We expect inputBlob to be inherited from MemoryBlob in fillBlobImage, " << "but by fact we were not able to cast inputBlob to MemoryBlob"; } // locked memory holder should be alive all time while access to its buffer happens auto minputHolder = minput->wmap(); auto inputBlobData = minputHolder.as<uint8_t *>(); /** Collect images data ptrs **/ std::vector<std::shared_ptr<uint8_t>> vreader; vreader.reserve(batchSize); for (size_t i = 0ULL, inputIndex = requestId*batchSize*inputSize + inputId; i < batchSize; i++, inputIndex += inputSize) { inputIndex %= filePaths.size(); slog::info << "Prepare image " << filePaths[inputIndex] << slog::endl; FormatReader::ReaderPtr reader(filePaths[inputIndex].c_str()); if (reader.get() == nullptr) { slog::warn << "Image " << filePaths[inputIndex] << " cannot be read!" << slog::endl << slog::endl; continue; } /** Getting image data **/ std::shared_ptr<uint8_t> imageData(reader->getData(app_info.width(), app_info.height())); if (imageData) { vreader.push_back(imageData); } } /** Fill input tensor with images. First b channel, then g and r channels **/ const size_t numChannels = app_info.channels(); const size_t width = app_info.width(); const size_t height = app_info.height(); /** Iterate over all input images **/ for (size_t imageId = 0; imageId < vreader.size(); ++imageId) { /** Iterate over all width **/ for (size_t w = 0; w < app_info.width(); ++w) { /** Iterate over all height **/ for (size_t h = 0; h < app_info.height(); ++h) { /** Iterate over all channels **/ for (size_t ch = 0; ch < numChannels; ++ch) { /** [images stride + channels stride + pixel id ] all in bytes **/ size_t offset = imageId * numChannels * width * height + (((app_info.layout == "NCHW") || (app_info.layout == "CHW")) ? (ch * width * height + h * width + w) : (h * width * numChannels + w * numChannels + ch)); inputBlobData[offset] = vreader.at(imageId).get()[h * width * numChannels + w * numChannels + ch]; } } } } } template<typename T> void fillBlobBinary(Blob::Ptr& inputBlob, const std::vector<std::string>& filePaths, const size_t& batchSize, const size_t& requestId, const size_t& inputId, const size_t& inputSize) { MemoryBlob::Ptr minput = as<MemoryBlob>(inputBlob); if (!minput) { THROW_IE_EXCEPTION << "We expect inputBlob to be inherited from MemoryBlob in fillBlobBinary, " << "but by fact we were not able to cast inputBlob to MemoryBlob"; } // locked memory holder should be alive all time while access to its buffer happens auto minputHolder = minput->wmap(); auto inputBlobData = minputHolder.as<char *>(); for (size_t i = 0ULL, inputIndex = requestId*batchSize*inputSize + inputId; i < batchSize; i++, inputIndex += inputSize) { inputIndex %= filePaths.size(); slog::info << "Prepare binary file " << filePaths[inputIndex] << slog::endl; std::ifstream binaryFile(filePaths[inputIndex], std::ios_base::binary | std::ios_base::ate); if (!binaryFile) { THROW_IE_EXCEPTION << "Cannot open " << filePaths[inputIndex]; } auto fileSize = static_cast<std::size_t>(binaryFile.tellg()); binaryFile.seekg(0, std::ios_base::beg); if (!binaryFile.good()) { THROW_IE_EXCEPTION << "Can not read " << filePaths[inputIndex]; } auto inputSize = inputBlob->size()*sizeof(T)/batchSize; if (fileSize != inputSize) { THROW_IE_EXCEPTION << "File " << filePaths[inputIndex] << " contains " << std::to_string(fileSize) << " bytes " "but the network expects " << std::to_string(inputSize); } binaryFile.read(&inputBlobData[i*inputSize], inputSize); } } template<typename T> using uniformDistribution = typename std::conditional< std::is_floating_point<T>::value, std::uniform_real_distribution<T>, typename std::conditional< std::is_integral<T>::value, std::uniform_int_distribution<T>, void>::type >::type; template<typename T, typename T2> void fillBlobRandom(Blob::Ptr& inputBlob, T rand_min = std::numeric_limits<T>::min(), T rand_max = std::numeric_limits<T>::max()) { MemoryBlob::Ptr minput = as<MemoryBlob>(inputBlob); if (!minput) { THROW_IE_EXCEPTION << "We expect inputBlob to be inherited from MemoryBlob in fillBlobRandom, " << "but by fact we were not able to cast inputBlob to MemoryBlob"; } // locked memory holder should be alive all time while access to its buffer happens auto minputHolder = minput->wmap(); auto inputBlobData = minputHolder.as<T *>(); std::mt19937 gen(0); uniformDistribution<T2> distribution(rand_min, rand_max); for (size_t i = 0; i < inputBlob->size(); i++) { inputBlobData[i] = static_cast<T>(distribution(gen)); } } template<typename T> void fillBlobImInfo(Blob::Ptr& inputBlob, const size_t& batchSize, std::pair<size_t, size_t> image_size) { MemoryBlob::Ptr minput = as<MemoryBlob>(inputBlob); if (!minput) { THROW_IE_EXCEPTION << "We expect inputBlob to be inherited from MemoryBlob in fillBlobImInfo, " << "but by fact we were not able to cast inputBlob to MemoryBlob"; } // locked memory holder should be alive all time while access to its buffer happens auto minputHolder = minput->wmap(); auto inputBlobData = minputHolder.as<T *>(); for (size_t b = 0; b < batchSize; b++) { size_t iminfoSize = inputBlob->size()/batchSize; for (size_t i = 0; i < iminfoSize; i++) { size_t index = b*iminfoSize + i; if (0 == i) inputBlobData[index] = static_cast<T>(image_size.first); else if (1 == i) inputBlobData[index] = static_cast<T>(image_size.second); else inputBlobData[index] = 1; } } } void fillBlobs(const std::vector<std::string>& inputFiles, const size_t& batchSize, benchmark_app::InputsInfo& app_inputs_info, std::vector<InferReqWrap::Ptr> requests) { std::vector<std::pair<size_t, size_t>> input_image_sizes; for (auto& item : app_inputs_info) { if (item.second.isImage()) { input_image_sizes.push_back(std::make_pair(item.second.width(), item.second.height())); } slog::info << "Network input '" << item.first << "' precision " << item.second.precision << ", dimensions (" << item.second.layout << "): "; for (const auto& i : item.second.shape) { slog::info << i << " "; } slog::info << slog::endl; } size_t imageInputCount = input_image_sizes.size(); size_t binaryInputCount = app_inputs_info.size() - imageInputCount; std::vector<std::string> binaryFiles; std::vector<std::string> imageFiles; if (inputFiles.empty()) { slog::warn << "No input files were given: all inputs will be filled with random values!" << slog::endl; } else { binaryFiles = filterFilesByExtensions(inputFiles, supported_binary_extensions); std::sort(std::begin(binaryFiles), std::end(binaryFiles)); auto binaryToBeUsed = binaryInputCount*batchSize*requests.size(); if (binaryToBeUsed > 0 && binaryFiles.empty()) { std::stringstream ss; for (auto& ext : supported_binary_extensions) { if (!ss.str().empty()) { ss << ", "; } ss << ext; } slog::warn << "No supported binary inputs found! Please check your file extensions: " << ss.str() << slog::endl; } else if (binaryToBeUsed > binaryFiles.size()) { slog::warn << "Some binary input files will be duplicated: " << binaryToBeUsed << " files are required but only " << binaryFiles.size() << " are provided" << slog::endl; } else if (binaryToBeUsed < binaryFiles.size()) { slog::warn << "Some binary input files will be ignored: only " << binaryToBeUsed << " are required from " << binaryFiles.size() << slog::endl; } imageFiles = filterFilesByExtensions(inputFiles, supported_image_extensions); std::sort(std::begin(imageFiles), std::end(imageFiles)); auto imagesToBeUsed = imageInputCount*batchSize*requests.size(); if (imagesToBeUsed > 0 && imageFiles.empty()) { std::stringstream ss; for (auto& ext : supported_image_extensions) { if (!ss.str().empty()) { ss << ", "; } ss << ext; } slog::warn << "No supported image inputs found! Please check your file extensions: " << ss.str() << slog::endl; } else if (imagesToBeUsed > imageFiles.size()) { slog::warn << "Some image input files will be duplicated: " << imagesToBeUsed << " files are required but only " << imageFiles.size() << " are provided" << slog::endl; } else if (imagesToBeUsed < imageFiles.size()) { slog::warn << "Some image input files will be ignored: only " << imagesToBeUsed << " are required from " << imageFiles.size() << slog::endl; } } for (size_t requestId = 0; requestId < requests.size(); requestId++) { slog::info << "Infer Request " << requestId << " filling" << slog::endl; size_t imageInputId = 0; size_t binaryInputId = 0; for (auto& item : app_inputs_info) { Blob::Ptr inputBlob = requests.at(requestId)->getBlob(item.first); auto app_info = app_inputs_info.at(item.first); auto precision = app_info.precision; if (app_info.isImage()) { if (!imageFiles.empty()) { // Fill with Images fillBlobImage(inputBlob, imageFiles, batchSize, app_info, requestId, imageInputId++, imageInputCount); continue; } } else { if (!binaryFiles.empty()) { // Fill with binary files if (precision == InferenceEngine::Precision::FP32) { fillBlobBinary<float>(inputBlob, binaryFiles, batchSize, requestId, binaryInputId++, binaryInputCount); } else if (precision == InferenceEngine::Precision::FP16) { fillBlobBinary<short>(inputBlob, binaryFiles, batchSize, requestId, binaryInputId++, binaryInputCount); } else if (precision == InferenceEngine::Precision::I32) { fillBlobBinary<int32_t>(inputBlob, binaryFiles, batchSize, requestId, binaryInputId++, binaryInputCount); } else if (precision == InferenceEngine::Precision::I64) { fillBlobBinary<int64_t>(inputBlob, binaryFiles, batchSize, requestId, binaryInputId++, binaryInputCount); } else if ((precision == InferenceEngine::Precision::U8) || (precision == InferenceEngine::Precision::BOOL)) { fillBlobBinary<uint8_t>(inputBlob, binaryFiles, batchSize, requestId, binaryInputId++, binaryInputCount); } else { THROW_IE_EXCEPTION << "Input precision is not supported for " << item.first; } continue; } if (app_info.isImageInfo() && (input_image_sizes.size() == 1)) { // Most likely it is image info: fill with image information auto image_size = input_image_sizes.at(0); slog::info << "Fill input '" << item.first << "' with image size " << image_size.first << "x" << image_size.second << slog::endl; if (precision == InferenceEngine::Precision::FP32) { fillBlobImInfo<float>(inputBlob, batchSize, image_size); } else if (precision == InferenceEngine::Precision::FP16) { fillBlobImInfo<short>(inputBlob, batchSize, image_size); } else if (precision == InferenceEngine::Precision::I32) { fillBlobImInfo<int32_t>(inputBlob, batchSize, image_size); } else if (precision == InferenceEngine::Precision::I64) { fillBlobImInfo<int64_t>(inputBlob, batchSize, image_size); } else { THROW_IE_EXCEPTION << "Input precision is not supported for image info!"; } continue; } } // Fill random slog::info << "Fill input '" << item.first << "' with random values (" << std::string((app_info.isImage() ? "image" : "some binary data")) << " is expected)" << slog::endl; if (precision == InferenceEngine::Precision::FP32) { fillBlobRandom<float, float>(inputBlob); } else if (precision == InferenceEngine::Precision::FP16) { fillBlobRandom<short, short>(inputBlob); } else if (precision == InferenceEngine::Precision::I32) { fillBlobRandom<int32_t, int32_t>(inputBlob); } else if (precision == InferenceEngine::Precision::I64) { fillBlobRandom<int64_t, int64_t>(inputBlob); } else if (precision == InferenceEngine::Precision::U8) { // uniform_int_distribution<uint8_t> is not allowed in the C++17 standard and vs2017/19 fillBlobRandom<uint8_t, uint32_t>(inputBlob); } else if (precision == InferenceEngine::Precision::I8) { // uniform_int_distribution<int8_t> is not allowed in the C++17 standard and vs2017/19 fillBlobRandom<int8_t, int32_t>(inputBlob); } else if (precision == InferenceEngine::Precision::U16) { fillBlobRandom<uint16_t, uint16_t>(inputBlob); } else if (precision == InferenceEngine::Precision::I16) { fillBlobRandom<int16_t, int16_t>(inputBlob); } else if (precision == InferenceEngine::Precision::BOOL) { fillBlobRandom<uint8_t, uint32_t>(inputBlob, 0, 1); } else { THROW_IE_EXCEPTION << "Input precision is not supported for " << item.first; } } } }
#include <captain_interface/UDPInterface/UDPInterface.h> #include <iostream> #include <boost/asio.hpp> #include <stdio.h> #include <boost/thread.hpp> #include <boost/array.hpp> //boost::asio::ip::tcp::socket* tcpSocket; boost::thread* readThread; boost::array<char, 256> rbuf; //receive buffer // Constructor UDPInterface::UDPInterface() { // }; void UDPInterface::setup(boost::asio::ip::udp::socket* socket, boost::asio::ip::udp::endpoint* endpoint) { udpSocket = socket; lolo_endpoint = endpoint; //start thread for reading readThread = new boost::thread(boost::bind(&UDPInterface::readData, this)); }; void UDPInterface::loop(){ /*DO something?*/ }; void UDPInterface::readData() { printf("Reading started\n"); bool ok = true; while(ok && !stopped) { try { udp::endpoint sender_endpoint; size_t len = udpSocket->receive_from(boost::asio::buffer(rbuf,256), sender_endpoint); //printf("Received %d bytes\n", (int) len); for(uint16_t i =0;i<len;i++) { parse_data(rbuf[i]); } } catch (std::exception& e) { std::cerr << e.what() << std::endl; } } printf("Reading done!\n"); } bool UDPInterface::send_data(char* buf, uint8_t len) { //printf("Sending data\n"); udpSocket->send_to(boost::asio::buffer(buf,len), *lolo_endpoint); return true; }
/* * SPDX-License-Identifier: Apache-2.0 * Copyright(c) 2020 Liu, Changcheng <changcheng.liu@aliyun.com> */ #include "mempool/mempool.h" #include "buffer/buffer_raw_malloc.h" #include "buffer/buffer_raw_posix_aligned.h" #include "buffer/buffer_raw_char.h" #include "buffer/buffer_raw_claimed_char.h" #include "buffer/buffer_raw_static.h" using namespace spec; MEMPOOL_DEFINE_OBJECT_FACTORY(buffer::raw_malloc, buffer_raw_malloc, buffer_meta); MEMPOOL_DEFINE_OBJECT_FACTORY(buffer::raw_posix_aligned, buffer_raw_posix_aligned, buffer_meta); MEMPOOL_DEFINE_OBJECT_FACTORY(buffer::raw_char, buffer_raw_char, buffer_meta); MEMPOOL_DEFINE_OBJECT_FACTORY(buffer::raw_claimed_char, buffer_raw_claimed_char, buffer_meta); MEMPOOL_DEFINE_OBJECT_FACTORY(buffer::raw_static, buffer_raw_static, buffer_meta);
#include <vtkVersion.h> #include <vtkSmartPointer.h> #include <vtkPointData.h> #include <vtkIdTypeArray.h> #include <vtkInformation.h> #include <vtkPointSource.h> #include <vtkExtractSelection.h> #include <vtkSelection.h> #include <vtkSelectionNode.h> #include <vtkPolyData.h> #include <vtkUnstructuredGrid.h> #include <vtkIdTypeArray.h> #include <vtkDataSetMapper.h> #include <vtkProperty.h> #include <vtkRenderWindow.h> #include <vtkRenderWindowInteractor.h> #include <vtkRenderer.h> #include <vtkSphereSource.h> #include <vtkVertexGlyphFilter.h> int main(int, char *[]) { vtkSmartPointer<vtkPointSource> pointSource = vtkSmartPointer<vtkPointSource>::New(); pointSource->SetNumberOfPoints(50); pointSource->Update(); std::cout << "There are " << pointSource->GetOutput()->GetNumberOfPoints() << " input points." << std::endl; vtkSmartPointer<vtkIdTypeArray> ids = vtkSmartPointer<vtkIdTypeArray>::New(); ids->SetNumberOfComponents(1); //set values for(unsigned int i = 10; i < 20; i++) { ids->InsertNextValue(i); } vtkSmartPointer<vtkSelectionNode> selectionNode = vtkSmartPointer<vtkSelectionNode>::New(); selectionNode->SetFieldType(vtkSelectionNode::POINT); selectionNode->SetContentType(vtkSelectionNode::INDICES); selectionNode->SetSelectionList(ids); vtkSmartPointer<vtkSelection> selection = vtkSmartPointer<vtkSelection>::New(); selection->AddNode(selectionNode); vtkSmartPointer<vtkExtractSelection> extractSelection = vtkSmartPointer<vtkExtractSelection>::New(); extractSelection->SetInputConnection(0, pointSource->GetOutputPort()); #if VTK_MAJOR_VERSION <= 5 extractSelection->SetInput(1, selection); #else extractSelection->SetInputData(1, selection); #endif extractSelection->Update(); //in selection vtkSmartPointer<vtkUnstructuredGrid> selected = vtkSmartPointer<vtkUnstructuredGrid>::New(); selected->ShallowCopy(extractSelection->GetOutput()); std::cout << "There are " << selected->GetNumberOfPoints() << " points in the selection." << std::endl; selected->Print(std::cout); vtkIdTypeArray* originalIds = vtkIdTypeArray::SafeDownCast(selected->GetPointData()->GetArray("vtkOriginalPointIds")); for(vtkIdType i = 0; i < originalIds->GetNumberOfTuples(); i++) { std::cout << "Point " << i << " was originally point " << originalIds->GetValue(i) << std::endl; } for(vtkIdType i = 0; i < originalIds->GetNumberOfTuples(); i++) { vtkIdType query = originalIds->GetValue(i); for(vtkIdType j = 0; j < originalIds->GetNumberOfTuples(); j++) { if(originalIds->GetValue(j) == query) { std::cout << "Original point " << query << " is now " << j << std::endl; } } } vtkSmartPointer<vtkDataSetMapper> inputMapper = vtkSmartPointer<vtkDataSetMapper>::New(); inputMapper->SetInputConnection(pointSource->GetOutputPort()); vtkSmartPointer<vtkActor> inputActor = vtkSmartPointer<vtkActor>::New(); inputActor->SetMapper(inputMapper); vtkSmartPointer<vtkDataSetMapper> selectedMapper = vtkSmartPointer<vtkDataSetMapper>::New(); #if VTK_MAJOR_VERSION <= 5 selectedMapper->SetInputConnection(selected->GetProducerPort()); #else selectedMapper->SetInputData(selected); #endif vtkSmartPointer<vtkActor> selectedActor = vtkSmartPointer<vtkActor>::New(); selectedActor->SetMapper(selectedMapper); // There will be one render window vtkSmartPointer<vtkRenderWindow> renderWindow = vtkSmartPointer<vtkRenderWindow>::New(); renderWindow->SetSize(900, 300); // And one interactor vtkSmartPointer<vtkRenderWindowInteractor> interactor = vtkSmartPointer<vtkRenderWindowInteractor>::New(); interactor->SetRenderWindow(renderWindow); // Define viewport ranges // (xmin, ymin, xmax, ymax) double leftViewport[4] = {0.0, 0.0, 0.5, 1.0}; double rightViewport[4] = {0.5, 0.0, 1.0, 1.0}; // Setup the renderers vtkSmartPointer<vtkRenderer> leftRenderer = vtkSmartPointer<vtkRenderer>::New(); renderWindow->AddRenderer(leftRenderer); leftRenderer->SetViewport(leftViewport); leftRenderer->SetBackground(.6, .5, .4); vtkSmartPointer<vtkRenderer> rightRenderer = vtkSmartPointer<vtkRenderer>::New(); renderWindow->AddRenderer(rightRenderer); rightRenderer->SetViewport(rightViewport); rightRenderer->SetBackground(.4, .5, .6); leftRenderer->AddActor(inputActor); rightRenderer->AddActor(selectedActor); leftRenderer->ResetCamera(); rightRenderer->ResetCamera(); renderWindow->Render(); interactor->Start(); return EXIT_SUCCESS; }
// Copyright (c) 2014-2018, The Monero Project // // 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. #include <boost/range/adaptor/reversed.hpp> #include "string_tools.h" #include "blockchain_db.h" #include "cryptonote_basic/cryptonote_format_utils.h" #include "profile_tools.h" #include "ringct/rctOps.h" #include "lmdb/db_lmdb.h" #ifdef BERKELEY_DB #include "berkeleydb/db_bdb.h" #endif static const char *db_types[] = { "lmdb", #ifdef BERKELEY_DB "berkeley", #endif NULL }; #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "blockchain.db" using epee::string_tools::pod_to_hex; namespace cryptonote { bool blockchain_valid_db_type(const std::string& db_type) { int i; for (i=0; db_types[i]; i++) { if (db_types[i] == db_type) return true; } return false; } std::string blockchain_db_types(const std::string& sep) { int i; std::string ret = ""; for (i=0; db_types[i]; i++) { if (i) ret += sep; ret += db_types[i]; } return ret; } std::string arg_db_type_description = "Specify database type, available: " + cryptonote::blockchain_db_types(", "); const command_line::arg_descriptor<std::string> arg_db_type = { "db-type" , arg_db_type_description.c_str() , DEFAULT_DB_TYPE }; const command_line::arg_descriptor<std::string> arg_db_sync_mode = { "db-sync-mode" , "Specify sync option, using format [safe|fast|fastest]:[sync|async]:[<nblocks_per_sync>[blocks]|<nbytes_per_sync>[bytes]]." , "fast:async:250000000bytes" }; const command_line::arg_descriptor<bool> arg_db_salvage = { "db-salvage" , "Try to salvage a blockchain database if it seems corrupted" , false }; BlockchainDB *new_db(const std::string& db_type) { if (db_type == "lmdb") return new BlockchainLMDB(); #if defined(BERKELEY_DB) if (db_type == "berkeley") return new BlockchainBDB(); #endif return NULL; } void BlockchainDB::init_options(boost::program_options::options_description& desc) { command_line::add_arg(desc, arg_db_type); command_line::add_arg(desc, arg_db_sync_mode); command_line::add_arg(desc, arg_db_salvage); } void BlockchainDB::pop_block() { block blk; std::vector<transaction> txs; pop_block(blk, txs); } void BlockchainDB::add_transaction(const crypto::hash& blk_hash, const std::pair<transaction, blobdata>& txp, const crypto::hash* tx_hash_ptr, const crypto::hash* tx_prunable_hash_ptr) { const transaction &tx = txp.first; bool miner_tx = false; crypto::hash tx_hash, tx_prunable_hash; if (!tx_hash_ptr) { // should only need to compute hash for miner transactions tx_hash = get_transaction_hash(tx); LOG_PRINT_L3("null tx_hash_ptr - needed to compute: " << tx_hash); } else { tx_hash = *tx_hash_ptr; } if (tx.version >= 2) { if (!tx_prunable_hash_ptr) tx_prunable_hash = get_transaction_prunable_hash(tx, &txp.second); else tx_prunable_hash = *tx_prunable_hash_ptr; } for (const txin_v& tx_input : tx.vin) { if (tx_input.type() == typeid(txin_to_key)) { add_spent_key(boost::get<txin_to_key>(tx_input).k_image); } else if (tx_input.type() == typeid(txin_gen)) { /* nothing to do here */ miner_tx = true; } else { LOG_PRINT_L1("Unsupported input type, removing key images and aborting transaction addition"); for (const txin_v& tx_input : tx.vin) { if (tx_input.type() == typeid(txin_to_key)) { remove_spent_key(boost::get<txin_to_key>(tx_input).k_image); } } return; } } uint64_t tx_id = add_transaction_data(blk_hash, txp, tx_hash, tx_prunable_hash); std::vector<uint64_t> amount_output_indices(tx.vout.size()); // iterate tx.vout using indices instead of C++11 foreach syntax because // we need the index for (uint64_t i = 0; i < tx.vout.size(); ++i) { // miner v2 txes have their coinbase output in one single out to save space, // and we store them as rct outputs with an identity mask if (miner_tx && tx.version == 2) { cryptonote::tx_out vout = tx.vout[i]; rct::key commitment = rct::zeroCommit(vout.amount); vout.amount = 0; amount_output_indices[i] = add_output(tx_hash, vout, i, tx.unlock_time, &commitment); } else { amount_output_indices[i] = add_output(tx_hash, tx.vout[i], i, tx.unlock_time, tx.version > 1 ? &tx.rct_signatures.outPk[i].mask : NULL); } } add_tx_amount_output_indices(tx_id, amount_output_indices); } uint64_t BlockchainDB::add_block( const std::pair<block, blobdata>& blck , size_t block_weight , uint64_t long_term_block_weight , const difficulty_type& cumulative_difficulty , const uint64_t& coins_generated , const std::vector<std::pair<transaction, blobdata>>& txs ) { const block &blk = blck.first; // sanity if (blk.tx_hashes.size() != txs.size()) throw std::runtime_error("Inconsistent tx/hashes sizes"); block_txn_start(false); TIME_MEASURE_START(time1); crypto::hash blk_hash = get_block_hash(blk); TIME_MEASURE_FINISH(time1); time_blk_hash += time1; uint64_t prev_height = height(); // call out to add the transactions time1 = epee::misc_utils::get_tick_count(); uint64_t num_rct_outs = 0; add_transaction(blk_hash, std::make_pair(blk.miner_tx, tx_to_blob(blk.miner_tx))); if (blk.miner_tx.version == 2) num_rct_outs += blk.miner_tx.vout.size(); int tx_i = 0; crypto::hash tx_hash = crypto::null_hash; for (const std::pair<transaction, blobdata>& tx : txs) { tx_hash = blk.tx_hashes[tx_i]; add_transaction(blk_hash, tx, &tx_hash); for (const auto &vout: tx.first.vout) { if (vout.amount == 0) ++num_rct_outs; } ++tx_i; } TIME_MEASURE_FINISH(time1); time_add_transaction += time1; // call out to subclass implementation to add the block & metadata time1 = epee::misc_utils::get_tick_count(); add_block(blk, block_weight, long_term_block_weight, cumulative_difficulty, coins_generated, num_rct_outs, blk_hash); TIME_MEASURE_FINISH(time1); time_add_block1 += time1; m_hardfork->add(blk, prev_height); block_txn_stop(); ++num_calls; return prev_height; } void BlockchainDB::set_hard_fork(HardFork* hf) { m_hardfork = hf; } void BlockchainDB::pop_block(block& blk, std::vector<transaction>& txs) { blk = get_top_block(); remove_block(); for (const auto& h : boost::adaptors::reverse(blk.tx_hashes)) { cryptonote::transaction tx; if (!get_tx(h, tx) && !get_pruned_tx(h, tx)) throw DB_ERROR("Failed to get pruned or unpruned transaction from the db"); txs.push_back(std::move(tx)); remove_transaction(h); } remove_transaction(get_transaction_hash(blk.miner_tx)); } bool BlockchainDB::is_open() const { return m_open; } void BlockchainDB::remove_transaction(const crypto::hash& tx_hash) { transaction tx = get_pruned_tx(tx_hash); for (const txin_v& tx_input : tx.vin) { if (tx_input.type() == typeid(txin_to_key)) { remove_spent_key(boost::get<txin_to_key>(tx_input).k_image); } } // need tx as tx.vout has the tx outputs, and the output amounts are needed remove_transaction_data(tx_hash, tx); } block BlockchainDB::get_block_from_height(const uint64_t& height) const { blobdata bd = get_block_blob_from_height(height); block b; if (!parse_and_validate_block_from_blob(bd, b)) throw DB_ERROR("Failed to parse block from blob retrieved from the db"); return b; } block BlockchainDB::get_block(const crypto::hash& h) const { blobdata bd = get_block_blob(h); block b; if (!parse_and_validate_block_from_blob(bd, b)) throw DB_ERROR("Failed to parse block from blob retrieved from the db"); return b; } bool BlockchainDB::get_tx(const crypto::hash& h, cryptonote::transaction &tx) const { blobdata bd; if (!get_tx_blob(h, bd)) return false; if (!parse_and_validate_tx_from_blob(bd, tx)) throw DB_ERROR("Failed to parse transaction from blob retrieved from the db"); return true; } bool BlockchainDB::get_pruned_tx(const crypto::hash& h, cryptonote::transaction &tx) const { blobdata bd; if (!get_pruned_tx_blob(h, bd)) return false; if (!parse_and_validate_tx_base_from_blob(bd, tx)) throw DB_ERROR("Failed to parse transaction base from blob retrieved from the db"); return true; } transaction BlockchainDB::get_tx(const crypto::hash& h) const { transaction tx; if (!get_tx(h, tx)) throw TX_DNE(std::string("tx with hash ").append(epee::string_tools::pod_to_hex(h)).append(" not found in db").c_str()); return tx; } transaction BlockchainDB::get_pruned_tx(const crypto::hash& h) const { transaction tx; if (!get_pruned_tx(h, tx)) throw TX_DNE(std::string("pruned tx with hash ").append(epee::string_tools::pod_to_hex(h)).append(" not found in db").c_str()); return tx; } void BlockchainDB::reset_stats() { num_calls = 0; time_blk_hash = 0; time_tx_exists = 0; time_add_block1 = 0; time_add_transaction = 0; time_commit1 = 0; } void BlockchainDB::show_stats() { LOG_PRINT_L1(ENDL << "*********************************" << ENDL << "num_calls: " << num_calls << ENDL << "time_blk_hash: " << time_blk_hash << "ms" << ENDL << "time_tx_exists: " << time_tx_exists << "ms" << ENDL << "time_add_block1: " << time_add_block1 << "ms" << ENDL << "time_add_transaction: " << time_add_transaction << "ms" << ENDL << "time_commit1: " << time_commit1 << "ms" << ENDL << "*********************************" << ENDL ); } void BlockchainDB::fixup() { if (is_read_only()) { LOG_PRINT_L1("Database is opened read only - skipping fixup check"); return; } // There was a bug that would cause key images for transactions without // any outputs to not be added to the spent key image set. There are two // instances of such transactions, in blocks 202612 and 685498. // The key images below are those from the inputs in those transactions. // On testnet, there are no such transactions // See commit 533acc30eda7792c802ea8b6417917fa99b8bc2b for the fix static const char * const mainnet_genesis_hex = "6910b12d20c71911b9a2528488c5b0e4f6c2b6560d749555f096a8fe5b3505cf"; crypto::hash mainnet_genesis_hash; epee::string_tools::hex_to_pod(mainnet_genesis_hex, mainnet_genesis_hash ); set_batch_transactions(true); batch_start(); if (get_block_hash_from_height(0) == mainnet_genesis_hash) { // block 202612 (511 key images in 511 transactions) static const char * const key_images_202612[] = { "51fc647fb27439fbb3672197d2068e4110391edf80d822f58607bd5757cba7f3", "d8cf1c1bd41f13c4553186e130e6e2c1cd80135ddb418f350088926997a95ca9", "95d2556c8acd1457dce7bfd9c83b1d82b821a55a9c9588b04b7b5cf562a65949", "4b5d987fee1bb563a162d23e41741ad73560c003e26a09b6655f09496538daac", "1d25ea86323d1578579d3894a54b99ea1c3e2dca547c6726c44aef67db958b02", "92e46fb70be5d9df39ca83c4fc6ae26c594118314bb75502a9c9752a781d0b33", "924d0cb9060d429be7e59d164a0f80a4dabc3607d44401b26fb93e7182ab435d", "f63e4a23fec860fd4c3734623891330ac1ff5af251e83a0e6247287818b8a72f", "5b14c5ef13738d015619b61dacefc2ade3660d25b35ef96330a8f4e2afc26526", "d5016b012a2fb6ca23fd56ece544d847962264b4aee15efe1465805fd824a8fb", "0a7f3da1d9dd341cd96829e484b07163099763ac7bd60603b7ee14f7dbcb278d", "d716c03d7447d2b693f6f61b6ad36bd57344033fc1a11feaf60d569f40014530", "23154a812e99ce226f6a87087e0812f419aed51289f1c0c359b0b61303b53a36", "03940341e1a99d5b0c68eacfdf5a20df90d7d0a3d6089d39709cdd964490755c", "ef09648814cfe071f5d8e9cfde57247ad09409265c4b6c84697bbb046809bd7e", "8843ec52b0496ca4e895813cfe00bb18ea777d3618e9bd2e200287e888e2f5c7", "8558bf39baf3df62b5d33cdf97163a365e6c44f4d6deef920730b4982b66449f", "504d9380ce581de0af97d5800d5ca9e61d78df368907151ab1e567eb6445332a", "673797763593c23b3ee07b43bd8760365e2c251a8a60a275528ff34a477110cc", "25178c95e4d402c58d79c160d2c52dd3c45db2c78e6aaa8d24d35c64f19d4957", "407c3a05dcc8bdcb0446b5d562cf05b4536fc7337344765215130d5f1e7ee906", "4e7fa771a5455d8ee8295f01181a360cdc6467cc185c2834c7daf9fbf85b6f1d", "6beb64cb024f9c5c988f942177fc9c1ec5ecfa85b7db0f13a17f9f98e8e46fe7", "6406bfc4e486e64c889ea15577d66e5835c65c6a39ec081af8ac5acdc153b4b5", "1b1da638709f9f85898af70ffaa5b88d5a4c9f2663ca92113c400ab25caf553c", "da49407a9e1ed27abd28076a647177157c42517e2542e9b6a4921fdadf4e8742", "3c3fdba2a792fddaeb033605163991a09933e8f05c6c934d718e50a613b64d69", "82c60429171173739fa67c4807cab359620299e6ed2a9da80139b5b1e23c5456", "0a19e5767e1381ac16f57cfa5aabd8463551d19f069f7f3465c11a8583253f3e", "d0fae6ffdd4818399eae6224978f170f696150eaf699f2f218abc00c68530f96", "0937889aeb3af5c64608d9a9f88229a068e53417448f00f9aa5e28c570cca8f8", "d6072d269753020912524961ce8c6930cf35abe5c4b2bdc7fd678338d20a68fb", "0e8bc9b06fcc842bdaa7df029bfd1f252d5defc014d58a006c10ab678ecf543f", "9d42f90520f02c9258be53b123d69ddbce5f33f92a903d3fb4cf3358ff0e07b5", "1cc05416b12cbe719617158773c3e6173435fc64e1ee44310dc696baecaeaa95", "266b15222913c11ef6403ee15dc42c8c0e16bc5fa2f49110447802236e045797", "791b123af3b71ac9497a010610f72207ff8ec642969b5cf0d2891b21e7eee562", "946d4d7b084dc32495f22b35fc30394144c8e0ba04f3ad6e2c2bfb0173a2266d", "2c015cb990c1583228d08b2d5de9227b950c3f57364fc1033bca5c0fbfd08c58", "13fdc41862fd85507f579c69accb9cc6a40f5971bfa41e3caff598a3dcffd2fc", "64b06d9874a83917c583c9439d1c736083377d67fda2961b623f7124663134c3", "2fa49cd19e0aa02989991a4c3760f44be800fe8fb4d58b23aca382e10dc0d2d6", "377628f265f799772e9fb6065be8b6eee200c329f729fe36c25ee179e4d20df9", "ba94fa79134ce383b6a98b04dc6ad3d1b950e410d50a292bc770f9685e59fe91", "875c924329f0733e31fe8d8aed70dc1906335b8a9984932b6368ea24edb39765", "f31f4abb3f5ee42a5aae86d70b3bd9a9c1934933641893864dd333f89719d608", "2bcd629e125514a780f568d3c2e8b12a2e7fbbee06e652bbeed3e7825508e31c", "918b43581163ca1963de21bb9ac401756e75c3f00ac8dcfafc139f1ad5d7d998", "5730dd57fa52749a0d6502b11c9d802ac495875542431310c674a65655b7c2a3", "03f84b990683e569e2f6143bb963a2a8de411e7c4b7923117b94c7afcb4b43ea", "b298c8510d35bd2be0ff0753ad7d98d480f4c6490bb67fb93cd4632ea726e8a7", "0a771afbf9be104c01b89eaeb57073297d35ac8fbbcc0816820fdb9a29d26625", "713d90d6ca1be1a4e05a5f8441dc528c699caa09eda49c09072f5f8291354c2e", "988827f45c19330d9404309f63d536a447803cca7cb182ef005b074def09ab7d", "9dcaa105b4def895f3faee704c250bdc924316f153cb972f3fb565beec0b7942", "1c06c30afe65b59e9e22d6bb454e4209a03efe53cdbf27b3945d5d75b1b90427", "49e08c13d1da209ec1aea7b7fbe0daa648e30febeb2aa5ffbaaabdd71a278ac2", "e1c2e49ab7b829854c46a64772ded35459908e0f563edbcf5c612913b7767046", "e08bb7d133490ca85a6325d46807170cd07618b6a5f6e1d069e44890cc366fab", "5c73ca0691cde2f35b7933d6db33f0b642ec70d0bd3f2b0ebbd97754ca67e248", "6404399151872a521dae767311712225dba65d810ba2feba209204221b5d772d", "4a0c3aa6cef36f44edf08ad8fb1533d7e1186e317da8a3afb3d81af072043233", "104b3e1af37cf10b663a7ec8452ea882082018c4d5be4cd49e7f532e2fea64e5", "e723a46bf9684b4476c3005eb5c26511c58b7eb3c708ddf7470ee30a40834b32", "18e6f0fa3aa779a73ceefabea27bff3202003fd2c558ec5f5d07920528947d57", "c97e73eb593ff39e63307220796cc64974c0c8adac860a2559ab47c49bc0c860", "13c363a962955b00db6d5a68b8307cd900ae9202d9b2deb357b8d433545244ac", "76a488865151fab977d3639bac6cba4ba9b52aa17d28ac3580775ed0bff393e4", "a14de587c9f4cd50bb470ecffd10026de97b9b5e327168a0a8906891d39d4319", "b1d38ee1c4ca8ae2754a719706e6f71865e8c512310061b8d26438fedf78707e", "772bb8a3f74be96fa84be5fa8f9a8ef355e2df54869c2e8ae6ad2bf54ed5057e", "3083a7011da36be63e3f7cacd70ab52e364dd58783302f1cb07535a66b5735f5", "2b1d892e3002aa3201deb4ffe28c0c43b75b8f30c96b5d43f6d5829049ecbd94", "cb738aabe44c6fb17ade284bf27db0169e309bf8cf9c91c4e4e62856619a4c64", "1707e04b792f4953f460f217b9bb94c84cef60736a749fb01277cfe0eaaa48c7", "ab8b6bac9b8a4f00b78acb4bd50ed2758e0fa100964b6f298d2a943eb2af2b30", "dd317193fef72490f3be01293b29e9c2f94eda10824a76ca74bf39dd7cb40ab2", "4fb3d995b087af7517fcb79e71f43bac0c4fbda64d89417a40ca4a708f2e8bc1", "549ba38c31bf926b2cb7e8f7f15d15df6388dce477a3aff0245caa44606849fc", "7585c14ab9abbffb89d0fa9f00c78ecae9f7c9062e5d4f1fae8453b3951fc60b", "953f855323f72461b7167e3df0f4fd746a06f5a7f98aa42acdce2eef822a0b2f", "0931932d57dde94dcfb017179a5a0954b7d671422149738260a365ca44f50eb8", "a3d179d16a4a275a3bb0f260cee9284db243abad637a9dbe92d02940f1c7ee8c", "959843f1e76ff0785dafe312c2ea66380fdc32b9d6180920f05f874c74599a80", "fbc36b3e1718fe6c338968b04caa01a7adb315d206abc63e56768d69e008a65d", "f054de7eac5e2ea48072e7fb4db93594c5f5d2dfa0afe8266042b6adc80dfdca", "39dfc68dc6ba8c457b2995562c867cef2f2cf994e8d6776a6b20869e25053f70", "19ad7ca7629758c22ac83643605c8a32a6665bae8e35dbc9b4ad90343756ebb3", "e89e80ea5c64cf7840f614f26e35a12c9c3091fa873e63b298835d9eda31a9ea", "572c1b9a83c947f62331b83009cc2ec9e62eab7260b49929388e6500c45cd917", "df0b21f679e6c0bf97f7b874e9f07c93c3467b092f3d9e1484e5646fda6eca5f", "8f3b7c0f4b403af62fe83d3cfac3f1e2572af8afa4cea3f3e2e04291efe84cf6", "aae8b8db243009d021d8c9897d52ee8125a17212f0a8b85f681ad8950ae45f0e", "3d45a4957d27447dea83d9ae2ef392a3a86619bfcf8dda2db405a7b304997797", "a5b0a619a8e3030b691bdba1ed951cd54e4bc2063602eae26d9791fb18e60301", "14650df217dd64a2905cd058114e761502dff37d40e80789200bc53af29b265f", "fd6a245ab5e4e6e18d7ba9b37478ce38248f0ab864e5511d2208ae3d25017e5f", "fbe0be6dd42a11feb5db5ae56fcbbac41041ab04a35f1df075580e960c8eeab0", "72f3f1213d9bec92ba9705b447d99cd0a6a446e37a3c1c50bb8ece1090bfe56e", "20df836554e1534f62b2a6df9ce58e11c1b9b4746ce8ee3c462300a8c01f5e76", "5c3d2a81b7331c86420ad32b6e9a212b73b1c3413724a0f91bf073eba18e2f1f", "63264ddfb29cd36fc18f3ee6614c4101ba7229bc5ac375f912590d3f0df982f4", "5ec4eb637761c1c9dbc6aa6649d4410508ef8d25d61ad6caa40c6ee3236d5515", "270c70940536017915e1cdbc003de7279ec1c94cba1ef6130f4236f7e306e4f0", "c1d1d57a7c03f6ddeeab5230a4910db8355e2143f473dea6e1d57c2f8d882b76", "218c030a7fdc9917e9f87e2921e258d34d7740a68b5bee48a392b8a2acf1f347", "ac47861c01c89ea64abee14cf6e1f317859ed56b69ae66377dc63e6575b7b1eb", "23bf549c8a03f9870983c8098e974308ec362354b0dcf636c242a88f24fc2718", "a3ce8b817e5212c851c6b95e693849a396c79b0d04b2a554de9b78933fbea2b7", "7310120c1cc1961b0d3fce13743c8a7075ae426fe6cccaf83600f24cee106236", "8fa0630f193777dcc4f5eccd1ad9ceacf80acdf65e52e4e01bf3a2b2fdd0dac6", "4a5f5c87f67d573d0673f01abaebc26eaa62e6d04627588549cc9e6c142dc994", "78971cccacc645116f9d380c167f955d54b386a22af112233f7de004fc0c8316", "badc67216868e1de1bbe044bf0e6070e6ee0353d05c13fa0c43b1897db5219a2", "c45b2a168bc51cbb615a79f97432cc4bb6b104da9cdc1fc640c930657452f71b", "c17eda13541d14554c5db542155b08b6bf9cb403d425745b662ebc2b2b9b3a3b", "313210cd9d2efc1603f07859bae7bd5fb5914f4a631b943f2f6ff5927a4e681a", "6ee94ec8af4e6828f9b46c590ea55da640ef50e810a247d3e8cdf4b91c42d2c2", "505b7a4d9f1ba6577aa2a941843f86c205b23b1ea21035925e587022e2f0aeed", "98e6a7cd687e8192e300a8202999ec31ad57bc34f656f2ae90d148607ff6d29f", "1be5db002c0a446cc2c1da363e5d08ae045cd8f5e76c8cccd65d5166393c0bdf", "17c02ac6d390c5c735e1e873c40294220e89071fca08a5da396a131fa1ba8670", "2540507c39ae6fdcd90de826077f0ca390da126166a25c15c048a60606a27367", "5ab9328e525c7a017ef4f591d995ad4595d74cbf8ff4112af33b08c70661a304", "9c105587a96c51d81422f64e46016564d22329760648c95dcac7218f3733f915", "525afb1b94a75f1edc2b55c700071e14a2166acda003370047c30dba8ea80278", "745d4a5d9f95ca4efa6261b6bcd4ecacd504b5b901a2ce1353c522a5c0c15dcc", "5a5a568cd87ba34252ba254e6a320e1a7f52f13e7451bb887efb34ff881785f2", "1ec50a80198cd830b51f4f7a0222015a268d9b40f04e7f838c7b8dc7abf63b01", "68836b662d79349cb42f5cef54e6a066157d398cc87d3b13f29fc04e5cf364a5", "658db317f355a9cbd86f673775cac0c308fe14967428fd283a36e300a6a53b2f", "677d79a8c467dd9db38f0ef45c2787dd368f701a6b47bf7a5f06112c38da643e", "2baa455d4066f5d628f9ecd315cb57deca71069db5d0d112ae0aa18a84b6f0d7", "5e7b0889f351560081360ac2b1429b48b2f7d886227f144e3b198e2f1fa56ed9", "c3d317fbf26e15add8b4f8f93df9de9b22297b8e4945ebab9ee249d4f72f4e45", "3c0b705a5c1e31abc7e46d8ff3c148a033f6875454cfb67f8d2a2b9a57a5ba7e", "a0ab74663561af2adc2d38be3569fbe7aa2454346416ac96e5eb26b1e01b1e2f", "53526cffdb74327670566c1dacacffb7d30a43a7f1862ff8bab87737bfa5edb6", "24c5d36ab98d88f87b2c71afb4ea8562e05c7aa0b50f3bc0f9ed50a4cd52989b", "c3ce4de5f94dff65d11e33a865855a4404259cf45263914c884f79db4f35169d", "f1009b6dcf30030cff872d636fb96ed233eb6ecb8ffed003c7da64e4f5a02f4c", "e3729f58614d3b42450d1599d863983ab7e3e5c29fb57aad7958c8923a2627c4", "31cf4792f7b5ce01b217ec80184edd2a7c49c0b21701f5494ee2c9bac67c28ca", "b42a5c9c92a656c5bb2b759ce160fdfd245243aeb1786338faea63b62e9a60ce", "a1efc8d5d0855933d5ac8fe5960c7acacb92fcb09bfbc929e5002f168251e648", "c4322c7f3682ec94b0dcb42f13b498c36cf575d505aacc8ec8bf67a6a2abf4c9", "684ee5aa3c98357aeaddcc30c6620939b52aeef729e24b4a46ccafc44f24d831", "36180f2ae11d105e0efbfbddb94e6b45b08609a383e4e1a8fa3b06d7a8051de9", "96c2d183eacc87581a0b17b8d07878bc10d436728510715109a7565d9972f8b5", "3068c9d04d561c7e29e3f621280b61a61885de0e9ec35a66a3116ca7a9e09627", "2eb94b9673ad6f8f88288fddfceae4baaeccb37bed88a35611d826ba06a5363b", "fc8cd5fae8b81121001f7767dcd5f185c0fdcc88cce1fbb184ddbcfad697ba54", "51521da1ecedea6d588d774eb155d936b32a14913c2f11d989bcc5116e65bf41", "3d23542e597a83dd6307700d79058b920f281c65f832333734d8a0adec510495", "11d2e01913ff0d4bd21970d709d88e63289492c0bbad7bff99c0d36858a841ca", "de674f1eee3068d2bc8c2f2897d8556e5deb872869652f7d3a4e5dbc6f1063c8", "e722d7f728526110c0921791b417afde4af1e87ae48ccc01911786197843104b", "aaba3a4e2a7d20ab76edfbcccefc27acfd509db3638582c28230e73ffd71d340", "1385a7209dafb9622dd4274179832e40c7fae19445383c34ef79adb0e4de0c98", "108408531fca288d74de4a2c596eab8569e355d9ab2f8380f4d24073a6b3fa95", "294476a86fcd39351ae452cdb8af9584067ec4501ec6182d0062bb154559fed3", "e64b175e0284c5cb69c8db46344ed43b5ced8abfe3cbf0c197103cfd116944cd", "cdd73a0f1fa7c14ed2177ae2163035333718847e49dd5cca6775bd20fc7553ad", "d423d2a374bc66a4587a5e3affa327ca75b8116051320759a3b88a868a7b80d4", "f13ad1e5b1315557d5497b58516eb3b0759d909725ddd0eb8a0dee439c6c0a48", "3a600b547a6061186a54e491344fd50cc7d4f0566a386a40aba6545254773728", "37a6f3f221fe17cc04a65aa544d5135e8297ecaf0853ba784dffacb74feb481b", "0ca42d67d0f84b28861d63e919e6ce5ad527447fdc53a03d8497a0241bee9376", "c7dbda42459e6fadb92c416eaef3e04674fc57915a93f3be4e656634c9654075", "0e34d728ae4fe347a5afecdf886fbd4d48a65c5d0dfab807da6ae95b6b2d7a3a", "f1bc69257ed510db5b2ed370010b037f452a29c49e36337264b3011ce2516216", "33f98f6b8a8e202463955998fba3b790199daa893e5471554826cfd9daa5c02f", "f8a0a37a2c9ebd7022d7cded1ee0318fd363020070b4cdaea800e44dcc1300d2", "6862714daedb908a4d86a3a3f1e65ec2c29ae61501b4ddcaf184243dd095d71b", "555cd19a6d21941c1174129b8bbcc70edcf0d6874262ce9e1e542351990d523d", "2cd6b44326828f23a2aa33699754bfa072c4883f39d53616f6a6b74149b664b6", "127f45d2eacb565c21c1030fe8054fd0a3a75705bc368924712aa145d414fa47", "19225e2dae6e1166f21cdab1290194470ded09df9b66f3faad3c1cc9ebcf340f", "b7b3f53f0539b2b4837b8bb9dae0ccbd200c8d36126d9f50199d68a4293a46d3", "6b6323be01f27d6d759d9670825e8ebb9c4cd8016351702328df91cef36cfec8", "020c31cfdfc5b22b10235745b89b311d271cf82f2ba16d03fdf7a8bc8538694b", "62573218530182b79e40d0113b7d281dace6da33bfcd0f9318558de5e5c76f08", "37d928416b15982f5bb8be40c5b62fae0b664e412c25891f8860c4242927e610", "b07ad11134a5c0542d2b418ef3863e8ea8477de68d9310681818ddd40825fdb0", "4af77cb76bab845b56470c95ce7b8cd84ce49a095984c1f3eed67b0ee344316e", "e3fdd4668d8726ba6adc401ac662c0cf6b5c1872082c488ed7da966d425fb1c0", "3dec71c81c7e78e879abc8da8b30e2446edbe98eeb8df9dafe9201ebb4c6a834", "7105467d9c5e855f1362fbddf820ed5e757997862efc9000317d3830a2f60ef3", "2821df94b021d3e77e8d9c0f3972340210f5ea2c0935cbf125cfc578d4d6722f", "114e5807accc337a22598bded30ebf3e0cfd75877e239f10cb043f829c315ab5", "d658a1c0354628cd7312593ab25d5b9083de8f0def6e8425f188101d256cd136", "4818d3be9b2a38fcc8c85d6c46f69b502943f79cf2462dfb0b6499e761bcc836", "92b8c943cb017b5f2d39264640c069f1ecced1d3ce9b3fd755d6df2fddb99458", "6edbd0fdf064fcbccd4a9e7a8ea520b87cb7faf867f7fe8a5f53625beb575119", "bf3b49c477dafb06af65bf09851c0fbef9dbc3152a7268d31b55a8e7a9a95860", "0e234dbadfda1393be2f068182615dbb83736f84f87710b5c7965bdce9f4a26a", "df5ceae34429e47b92bbd5505ba27666552e0eb619997f359c55699c3252b1ff", "08c1c7d940d699a91a83249bd578772e8958ffe23179e6150f07b96f1b47ce1e", "6f919a429270da0022d70062537bdc1b21c43a8abc552d8e366647e5b719d310", "63c66e5fd5d27f6fda87912ce46fa91a5e5b3634ed147fa2986330fc2696d3fa", "bde070b75296bca3aa494e7f549cd2bd1ff003776712bc98a3164b139b2054ab", "66694196dac5b60cf5e0ae05db8f3894fe04d65910686806551f471a0a0472e9", "0d2e97524b7ce4cf30b54e61b2689df036d099c53d42e2977b1671834bac39e7", "e081af76e923455f408127862be5c9baf7de6b19b952aa2a1da997d4dfe594c0", "121bf6ae1596983b703d62fecf60ea7dd3c3909acf1e0911652e7dadb420ed12", "a25e7b17464df71cd84ad08b17c5268520923bc33fe78c21b756f17353ea39a0", "e985f078fb44dbfdf3f4f34388f0f233a4e413e02297ee9a7dcc3fcceacd44f9", "b9184cf45e6e6b112cd863b1719de1bcab2137eb957e8028edca3a204a9ebb96", "157d177d5e4bcce0040eb4bddb681eacf9e2942e1c542a57ce851b4742a9cc4f", "0823e06635c9a1a69fd8833d1e48df98d711c1c47c06f27bb384932db1bbe9ee", "8beeec1fd1bcdecba235b449cc49abca69b6486ed1c0861a2bfb6a43c970b86f", "349f61a1cfc9112e537522858a0edae732a2f8434cf4780d3d2ec1e96f581cca", "587cdf72b5914d364f7e214a70481cf1131ee4a09e6b43e52428d2e56b000c13", "a6aa0c179316534c7b9ffb5f42a2af98d1d3a166bfb413199579f259c7b5e6df", "f9f3bb1ba8da5899b79186008ecfbd416b49f3b86d94045b91e34a40e41d5cff", "0cdda65a60b7b4d94e794c9397e01f69fb29309ce4fac83e7392dbba6bc497f9", "8fa5fce5ad09d43af7218ea5724cff2c4849a59ff73caf3bbca466e3c8538ba8", "8874ef46008753fcc0b77eb7a4a8560e35966bf5a12bcad4203ad2b4c1f8bfbe", "a8ee9a3aa2d0c08a951439ffb0e6d10315fc4776997b275de1ec19663e88c2c2", "9c184cbbff464ab4d5f6bfa78c39bf0880fb93b1574139306a97acb940d415c9", "5493a38c255c91ca49b958ed417f6c57e5bc444779d8f536f290596a31bc63d3", "3e1e82b96cc599d9fc55ae74330692ccbfb538a4cc923975fd8876efe4b81552", "16aaaf820c24c2726e349b0e49bbab72ca6eef7b3a2835de88d0cececa4da684", "7fa52ba349f7203c3dbc2249f9881101a3318d21869dd59f17abf953d234db65", "713d8018bb9ba3ab55c3a110120b9d7593514111075ef05f0fdb233ff2ceddc8", "56063afb495759a0942f1c33f28a4fb8320c6d376cb3c9513249453e45f24a04", "f9a6bacd9e055749b45174ecf3c3db18b78f3474761948a68adf601f54e59660", "7ddd7c6d41572f93fe07c0300c34e455b6d1f4372204933bf45035241c8b060c", "f81021b893a36b201de71330a2ea050b59dbf7560c62fa9cbea9261ab47a0ba2", "a01fbe4114c18fd534ae1621404d25c08e3b6775a2631ff40279bafd8c9304f4", "350fad8ebc938c6eb508a1483f385f577794a002bc1229db70a1b0131d174b9d", "570cb8bce87f532c5051d8c4c864012408e672a7d492669e660251fb1e066bec", "8cb6efbb129c84eba26d894c4293b476a6e9a1fe969c6ad18b554d2a57885f36", "f384a98467bf7f084ca31bea121a4ec76e530f523d3225c21ed25a18544a9916", "da127ab58ce557c2c95c20d6a291c2e5d880fff09dc28927b7bdfec97b995d72", "a4d95b4f74366ec920d0a0c5d81265688cc18733ffc444cac9b01ae2431568aa", "5ae2a71470570733422468bb733d53c85b1c8a6e7e6df5c05941556bcf342d1a", "65a2d161ff0e095d3afe37584dbbe649f1e9cd440755b5a3c5b2a252d5c0b8bc", "25ef70a8e41bb422ed7996a41160294e33238d6af17a532232f0a50b123431a2", "f1f0f76ee901664a65b97104296babb9c7422370e99bb677ae07c2ee420e7f40", "c3c66dda180b0330e75c8139b9f315a8c6b937f55d87d7be42e172bbac60d71e", "5881786695a9e58e19d79f790c7d9243a847c0269c5770bdd01f5149c2a62a88", "f2f816d3c8ebc7df06ab68d39223181aacc7be04364d1d4e69a56c33949bb983", "80a1c3b6b2778d4846ad9fe0bb2dd5afd99aa897f8231bfaac45fde43d602d9f", "72ad67cb043aa5df0c3dcc2464953a66893259d81c9cc7778c12bca3447fbd58", "ad72420a7963b8d4536d8eba00b4b989992247cd8c01660e242a8e71edaf0e19", "999d603d1cf6068e3bb6abe1bca976fa0ab84c4660b29ea8973de8b5cf5fd283", "e137a5910f02a764c3a3d8f1579ac0c7e3cc34e58933216868efe010332c1e6e", "10e0fa2362f59317626ae989bd1f962c583339d8d74d76c3e585243d152b91e8", "1951c652704962f5c6e33a4d4aadfee5d53ce2253644d1ed542da3e278524a07", "c938bccb7ba6c0217d8ba35ed91502aee051c8ae5bff05e88aab3b322aec936f", "4d6386c689785edd5beb55911a3a9fc8914838c8192184199589beef8b6ddf9f", "26f6f45a6468bc4b1f085fd28d63c264ee17564f9e247fc03ee179a0b579dcda", "235b7bb82b72c61acd5979ca5f2ca740aee805a780ba22e11aae5cd34f6ec760", "c027ffb585a1e4844b4907490b621b08c7e40a5e6f93e97bd4bb1b615bba9908", "aa77fc8053d139b998577319de29457b78b1cc8b35a5f3526c0621eaa42ce6e8", "afd0af9a11c5ae2a7c4a4571ce39ad57d8df70ef146ed83ad8eaff97b2387fb8", "a1f8fee9f1da9a2b306489d00edf754187b55e97f4fe6f249432fe6c7f44d6be", "4f12e8a123465a862060efb656299e6bef732e5954b02194308817b243e84d32", "6a1ca62f7d6952ad2eba1c64035260319baf03deabf856ca860744fc886b3d3a", "c72dd1fe890d6e4c1f7325a4f224e85aef6cdca8bf9441d228efaf126e02ba63", "2f6ddcea18d891ef4252e657989de68adcc43c2175d49c0c059c5e49b9dd5aed", "24efac0f240ed183c30398ee40307623f52113598f66c5864c90fc62643a2aec", "6ba3ebc935e7cf7fbb446e7f5c12b19c4455e6894412b0eedee4fc945e429e9a", "3519d6e5bc9649f97d07a07ef5471a553ffce35c7619f4f63e91a2ba38cbb729", "65e073df352fa9917e5c2475167e6c523b68c1406e1b6e81109e2d4cc87c740d", "d73bf816c3648a7d53d34be938c454e515efb0c974d5a225f33635540b2db90d", "bce167790fc86a273db011757d09e2d1148521ce242c2ded58f26cc49993aacb", "2d4286ed4039916f29602e86f47ea4c5b05998c0198509ca7799fcadfb337e8d", "9837c495b1af4f76b09177514a0f3e1dceb509c52b91712f3c7d29dc1b91d09b", "5c848b8291f39759903ce77f151acf40f3ab5afa2d4a45af62b320371c29a697", "b92df5016ee947ce6a21365d3361977f7f2f6c14025a983c44e13d3e8cc72152", "71d2f57222a39b1a7ed2df5e6fb23a964439b5a8e7d49b49d87e5cd5354baa75", "88b44d0198fb15b0c20a97f87e021c744606bfd35eae2874f35c447aa4ac3cd4", "29bb4c2557714119cd684da2867e689e37e3ca9c912db83ab84746816f6092ab", "b1836d98a288752675b133b9018fa1edf174f311921d01926c1e1a5900c21029", "a00645e090c7d96f3155ffbcfc41e526a763b0f53a98151ac4a7d4a5b14066b6", "78aab09919d17773b0d62799b37bd2e2970f72f5d1eb6472489c367b6135374f", "eb6123aeb28608f1c97b2bf62ef69f977cd0658a0ab491deebb1e972caa938c5", "8dd7ef1650b1b30cdf7814ae4d61a237eb0acc3ec3ce0f72b1c25780329c2d7d", "b1998419be3172858b990eea84fe10bb24b76c219cde277cb4305955fc7e0b65", "1b10560016c4bc506eef9056dedc2943a17179081e6eaf85b48d37dc20eac3cc", "1fb1d9d4d408a6734234910f554d272739a0d6fa401918d79b57be62c3f23ba2", "dec878f54ce36788289b61d32de0d9539032aba22cd15522752f729659c7cc5c", "fdbfd0773f5a66637b093dabf812197940d1134619a7e60a931b19915b7dab0a", "21bd2c9aae052a1c187947d2964f2be4afa7b30248409c41a75522e88a4e7977", "59326adab03416ec1d36699c18e5e4fa13ca1f2212d48c23bfdecb0be7263616", "bcf263d39457c0aef8ef42fd98f8131198ec4fb203155dd5bcd759e499a9ca5c", "f1ad083bcd8c7630eef93336d8a971ae8ae37166a6a00ac39684420c5f9afef8", "d82ee2ac41b36e3c1787a01835bf054070486dc20f6565efedbbc37cd3bf5fa5", "eba91a0dcbd3986299b0a3e66c116f77bd3421829291fd769522f01da26f107b", "11016558b7e8c6386c6a3e862691dcba47e33e257f0e7df38901ea7c0eba894c", "04f02795e34a0030e5186c8e700da8a46b1aa6bc0abed6b35c9c1cd6a73776b9", "2628dc8ad7fb731d59456b2755a99c6701467125fa69816c21bfccabc31edf6b", "9b7ca249ee5b45cd264492f30df09f708a7d9caed7beb9a5c6292f22e4c31f85", "5c42e7caedf382092faaf392174792b3cf5f2fe29cb586387ee55611af0617c9", "373f2fd5940a01feb79659c8b9099477f6d3e7b570ebb749c2ac336ea4be583d", "fea22887147adc3a659a14902080b03e86b4b8b16985fdf0bbacaed00d812422", "6a3e51a1443cff62af9fa12fafc8ea78ae74dac7792c9ae0f436f570ab33eb71", "796be21e213d6d0cd6fbe2de1555fb73d1cf9edc041a9f1ff1ad583c4ca92460", "03fcbcb31d3fd17f0eedb45ac5a51678c7c8b2b8498225d05f74e2892f017f72", "d28da07c6c22daf9ae987b3033c33d3140e5a56fa1ffd7dc5c7853d55a45bcc7", "fbb0ce02f50018741a12fc08eea80a18067d7bb0fcd96153d40bb8c808473aae", "2bf7c05a0209b4ea31314f04bd754cd01c58102d7cde8c496c655b6494924354", "1968a9e6e14ae86a1e02e6078fc4631851fce5dbac6aa34f860defd1ccfd0ded", "d886181329c9e06462a1407f547d77b38ff2c868b86d8976aa478e1cbb3d66d4", "0d465e02ff2f8eb0b5fb2fa9a38579c5d66337d4a16b58f8ed28d2d89fc02392", "3196419015289807880ef24b6781734822d654dc260c0560d00bac65eacd5219", "fa08390ddc333a2a12248d5ec3e51fff9b782227069fe5a0afbd8eba967ae8d1", "49ae36a791cb84516688d59a1ed3e5112851d65f265078aa2d433b45fa984c8a", "35daa428e12c59da6730760979aca3444d8b31149c6febd99fbfefa4b2372082", "5ef1d697beba612ff31d1dc139817c313a4e2ad3977775943b635c141ef0f2a1", "674256037ec00edb66b9355fb1d33a30a47a5d1f4bce2dd5475d89f1ea6502db", "7b6f017bc550933af91eec32a79464f540c5e0c208703e175843ee4e9ffc0a50", "bf0eb91da1d18dbb18fd9ff36c837387887ba142961176a44889718b2becb9dc", "3e5ac43a05164b074a2ff6353e9882917c5a3dbe168c2695de895f7decf1a56c", "35e8f004965347c2b18a000a83dd3a8084b8a4bf00522061ed1179aa1107c413", "fccb0fff3a24e555ec96f702ec11d420338910d148fc7b039d67568ad3a0e032", "5cab231048032dbf921b4fafa1951dd2da93bc3740667f31d5a1d5665b141261", "ffedb24be73441fbcd069f7785ebb865870e0f3ed228190732e4ffd5962bb82d", "a4fcfec18adf92f4ed822f64d2da9f5ae630885a1bfa626530f641db99aa7a30", "f98bcee41b0e3deafa1efaa1863750dbfd9bd7430b82529b670867d852230b5d", "8ab8d5fca047a52364a737c1af57bf656c9ad5049f08ef4c5aa252e61aa72123", "91318b39ad94c1d58143586b6d90dd6092a9d7487e321f4976967b6ac445ff43", "fabfbd4569ab018e12d5ffa9b1a40ca8eb2ca60a685817351d90eaa770d5eccb", "bbc5ef34428d980e2401942ceecfe07cdf21bfb1acae0596ea1d43fccf504f69", "26943e4201ea407a5667103fe07ca6e08ef76940f274349b0e2e776bcfb0acb6", "e3b305ffe33e72841f8e2a8688cc5cc27d42aee7624b33b7b6399b42db392437", "17c5a763dd57e6bcc7c4cf2db0eb5cf3e97116b67fe0dd519c97e4a4d55d5a62", "bbd260216879ce86af8318ffcf73c9e063ca76dd8bc35d3b6be45b2b4184888b", "41285591d0595bc42ab663051b410d51af39fe1720592e27acb1a8af72360a76", "f29acd6068ce494d0c0fe294cad91bb8968e3fff3f595a113227ab545c3ca3e6", "ec9013c6394528e7dd788ce7cc085ca79fcdfbb37565999d5b4b5a4e39452ecc", "27829bd7f1a8fcddcad0cc34a3b3fc67d62a2f3e09f8e75d35035c2281e83afd", "666bea9db4e15087204d076294d221d4cf5864f5d94de38f29132b1934a17ace", "a3a30924cad3dbda3446e5a6324e0a1390c70f795d5ecfe17ee5c70b14f7d87d", "19567fe5fdb10711d60aa4d9843e1c49c2a6d2fd1b5cf662e2105606bb7815d3", "b139f1c3a2f15596b9320334e37e4184d5d584c4a81e72d821a7edcad3aa62d5", "08f1531e0e3e8f8bae313b2c60a72d5601bf8b60d7a4d2f60e8481650340d250", "c5895669e1ff182bf1dd6c00dc955265e08ded0952b8ca62a1c63ba11c99f4ca", "84d1c28153f66c1a4eb5fa0df695e936d83294df31a08d8d8e2d4798d19d8ce0", "b8699f6af853fdbe897848feb46a05d733363f304eac4c8c1932e6ea4bc062cb", "10eb3f6c1d0661468d9ed83593e5e9c0b43c6feec6a5405a498194905ea6ed48", "509e215a600d9cadcbf5d62632ba321d7314764218db00ce8c907e425fccc445", "e62119b7be84c8eaad41ba7f4a35da403f4ed96b967a3134e89ee8b78f8792c2", "f790754a95d59ea5ffe6b9b5cc386c600a9e19e8bec997c192764365f1d05376", "990121b5aa4d6badfb7154db4cdbb4512124bc2f442bebac71ea90b5cc86f203", "b6983dedaa891eb14c964d84461e5cd37ed27b61771c64978ba83e3ecea194fa", "00fba1ceaa6aa1e378cd5b22a771d6070250ac37f4e17d7bf1a70b3139e9a860", "429854e7738abf2ecf46909454039e2fc5a080eb9a3c0c5ea13b07426dac3ad9", "ceb3e017944b0dd787be219d8629930b3f2e20e22b12dc88fd838488ebb896f3", "eb9e5d14424c63e675fe771b73ca865f7d38cf334d65e2426e12a0b88c1a2236", "556ee713449e6e59ac4b8b2e8310180c8f6280484e9db23456526cceb9216168", "bc89c3aa889e0144ac526a1f861227430dde7e439cc6a7e9b25c9a049c3ca7b3", "56d070c62ea99be66fff741a8e45fafda5f9ff783e84d5395b251f356ce4e16f", "ace15859c399e5ecd13b1420d3c3703c6a88dfb4a084f7225e7ba40a4b444fc8", "f03f1261ab6eb879fe9c5b0028cd400b3ffdfac4344e4c75f6cde3c05ded1f26", "955b2fda8d0068226f89270028b316b5adac871f1c1c85435479aba14a381b0f", "422509a98d7461a6b8ec87cbb173b2486577b59ea9b269e01c20567b38b3b3b2", "007d4de62ad89a4f5985f0cd9b76a7293acf383b4e9e734e813b9df1d57f986f", "13a04e32948225b7e22aa0137341ebbb811e0743032fac16be9d691a652db2eb", "8244b11d880a52f9f9e1830a822e6eeeaf0b12fc759f8261bc2f490cb0794f3b", "27d3415f8f8fd3048a1ee0d9487256dd1b0f9e31be663778efa5b3add63868ec", "0053f888db916a8905320e253fe2f0666355e6fb6de36f897231920a3edfe39f", "0bc5c0a2ea47fa3bb8be107e3b9d6b7226b1c8bd16ca1bab8f51b8e1de08aa8b", "4ca13aaa161c79025b5cd6c9a8ac33554f5ceb479fe293d9a342c865cd9c9948", "333afbe82e2a3df38bd1ef998f39c5feef2554697aa21b5410c0e95ef9156249", "587c4fcabd18ff890064171fce3d5be0c4aa1bba46893fb6a827a85ab54d20f3", "964328e4d51d67c4e2f1fd102a66b861d98199f81d18d660b1b4b52504cd772a", "196aad5594651efd679d30b9feb0f0d172cf977b4f89aa670ec741a8bf21e669", "9137bfd66bbf47bfa0bfcbb9f6e71b6eb3fd9776530e9fd30d3dab19e182f35d", "8217392c4ed2313188f295d94148a027a7f43824a5f5fba33a0b8c1045d509b4", "be9e12761519a4836e73015544163254877e1c4912fcea67a10e7026421dde75", "7b5220421a520b876cc6cdba0d3895104d7fac914dca5b93f9fe8b226566b71e", "5c83fccfeb4bf0eb8a94d43ebc84a81639a32f26c7ef77d0a2b626b7de7befdb", "132fd6c92cf176f975efdb5ded53470b462a48a2815c6f54a93ce4f935784cc7", "46a3dba364022d11aa616a2bc20e3be5c4390f38b9446edfa464d90d9af5d48f", "34b3f3fd8a83905a37762060f51d0b116377b4820b031b8e668e16f46c5b0285", "f0e397e033dabec859a4b9a9043c5f1fb0dba504764d6bcf2fe9bf2ffd318474", "85ecf59c7dd3b24ad17f591bc4737f32f1384c370a7a6f2add06a811dc824b6c", "4d03cdb1e6ad8e066a83654626d8c221433e8d4fd901c671300af37e000177f2", "61cb9c651893e6401b25f2bdf79c9f3ddc9ffe69cf6c791c420462bd73e347e1", "85f2686a42158cd5ad327781ecccd1bdcd346941dd4b4edc45f717de6a011800", "92de2ab82cac528e6d4ccd61e5b7c79591dcad9909c8ad3c8276ece6d48c0f08", "23a878a06bb94bff33083349149f3c860f2b00bc3fb28f04cbaf717c08af19a3", "1b1cce18ff0323566b192885d7ced30f9a9531a2580240f2c593a7d5b8580974", "08fcdec7ea1376d84f3b13a47a4b73c7781c9c7890bb28f712b58af4fd3f24fe", "03cc08fc4ece807c6495272c412be23b045622cc6b786ed8d5c94156ae678a0e", "c4d8a61dc3f5dcf4b83f27a90cbc37e816cf4754e12309626ec5679c99087c46", "b29d00681e29001cdd63c4bc50e5e25715faef692aeebb678c8050e1c095e888", "ac154617e93f2bb1afa232675f2135437a9cc9700c14c51c40084946596ba11a", "ce9549de8e68ae89f424dd9e1cde8a4eea2069da667cfcfbe837691d37366668", "426c45a98e2af35cc9708149f6c086ff5a3972e77d62c627d5e20de5d731cad8", "7e21bfe240a3d9b77a129c734a1d428dbc890379fbaf862853f48b2f7470b2b0", "fa090a71f77223a7210de6db18d9aa809e89fb15253aea28131df6c5a7639140", "7094ad044c5ab025e088b43aa0b947601fabe58ed700a412fd96e4b917ced0c8", "936d5cdc4f081b6fe36c356af4378d472cd7990303f2ea44da645afd7d5d7f9c", "05342037d3b69349dce7b95529d4b2a63ceb9d9393217a68f7cc8c958a96c3ea", "ff9e1c414ef27b1178b1de296526f50520b7ddb06286bf9c47792bfb449e40b6", "2f2b7bedb34d2854b17ccb702cddd8bc0157e39721d58be0b2ad54ee291fc9f1", "0d8db1f34140bbf7eb809137018a74af08cb3345b8a3e368cdda8521dab45791", "b109e4bfabcfe4a1c38be1156d9ca851c75e6aa2e57c0869e40cd9056f571e07", "5cb363547ca077c806fc69bc8c2006831ab89e72fd778ac1a48fa810934e350e", "85ee928bb110fd64eae54a91fc8548883e7fc4c60a3c61b505c31cea2d295c86", "1ec3df7d10ee6fd5f0532ad4fe771e6befc28b0bed0250bf523695d6d49a8246", "de9db2fc07c866bd7b885fb41522b63d550d0ce2e8ac5e14464a41733c2319e6", "9a27136422a8f56768db29ba172a7ba26c3c7aa910324e78e5ab3a3268ac3674", "60213c315119bf9005cb533d1a5b403b4a13c59982fe7773d30fdd8f519f4205", "40eb61ef1812eb8a4d389599bf449fc86653b2c4986061b952f46fc049de53f4", "658ef0d8140162b5f04591be13b47456245f531208bbca3260b857ca09b803c5", "02270fa66255048d724894e2206b4e773cc6a7b6d17ca090cdc25f317d5f53b9", "2ec6a0147f419161f7198d05be5f93152d9ccc10672db0ea47ff1687c0f0dd15", "4be1d8ceb96eb80ef7ce30079ded31163272aeccff5c18fe3aaa32ea2f5bed9d", "04ecaf48f44de87243b17b4c71ebff00020738639336010fa57435a54b623798", "e313a9feb7cfd1d56ec87b1f1062ff9a80da498f7b761af4bef0cecd1b4c385b", "ede3748f971f22341f7f5844dc60fc03cdb30c7cc720ebe13ae588c17a78aa94", "d90c0faa70e39b7c0a8c55457ed6e6478a4e4bf3707b08104326a1ee8377c3ab", "c79ffd0bbc8d004cc542e212990df6498abddd3deb50fd00ed00a2ff690974d6", "35c37d88cf73a89c4124b0ee537347c37fdb47156c8b0ecc509efc58236ed3f0", "a99182f343ccf05e557ffa6df71f03688b2afcf314c59daa774fe78db6f47add", "01115397a78af8a4ae2727ca7a01843235b626bd3db80888d3dfd0020d4135e2", "4a55aced578470d2f7280096d7fe8095f294095fba4778d1977d6db9270472f0", "4624adf8a5633f65b213b8ca46b55cb0ee36c41495f39b1ae70cbd545779b1a0", "d72bcd5b57a9c47e7bd5e9a1103657d10beb7b6c6d41f2b2985bc3bd3cc74860", "48baadb9a46293c92f29e7617846171356a42c3b5d18d49a05a7e173993785f7", "3da927737af8cb0e1c77097e35c54158d18aabfb3051c45bcc7ddfe00b157b1f", "b4a24bfdb2cb802c8d48a3a18fbfe18622a767fe7eddfca57d4555550ccd1643", "c58f82ac7c49dcba1721a88358f07636c9df60d3fd383e5789b808dc57a1dc9d", "5e1f756eff5155df073d30f4452bdafc4adaf4f35960771bf2c1e30137fd7a79", "be4a332f289338d67bd4834eae3128c488a61d255e972da484b6252b67a46b89", "d496e4a36238d03a83d8b45cf33d9388aa7568a279b034d1cdd87b457356cc5b", "a1c5212730ccda34de393210e276bbd44720dda777bcfd602315a3eee582f7dc", "08914ec63f6ef7fe1d678937dc0f6178883440b26b4aca29fce79068947e8397", "49e2cd2bd9b974074d9814f93eed371620bd4ea5fbf97a625065704e8fb382d7", "047c194111818b48ce93a4b006e4a09b9a2650757a87357111796e11e847bf23", "5955b0baa8265341f35a6f24fdc79066ba3ca9c5354c69b6b37a9ef3a26be556", "d7c962f3ea1938c5267cca4072548acf3afcce4d438ed62027caa211a5f98e8b", "c8cfba67cb4ce7e291b35154a50476d9a5c6bbb5d6cbaaa5d2408547fea7b02b", "de8a940d8a69a64ce264d2ab7320662aef2e391c587cb2aae22a86718d5dffbb", "94176f1310b26e54d4de48f87b74aa0b60532f184a2268508dece86dd7f85d36", "9ce6ee3fca56c9256a69df404782301300a6e5e7f5a25a1f6d68c0e9e42584c9", "7c423c4a220c6ff43ab6432f92b166323c58ee77f8c096ba0b00d52d7bd507e8", "0b62b9c1ae4d4988720e8d41d980b334458189de0a3dd01699338d7b07c3894e", "64f45f6f75110624506c53716f2fc1d5fe5f88f82a5bc6a7459ce70eae56dbb3", "12ffbeb8e52fed161af4d8a015d1a5c45dcb8240e5c8933ce3a88ba2c58f97e8", "2ee6b7b96043c8ded9fb52f87cdd0d0580ca6f8cef183c8a656394a11c0aa393", "aaef26b1f5726258bf9ce305a3e54bca65cf68779f90f9d24287245c27362e27", "ef59588dce57c35d010bea4d209f44c62f0b7c7e65bc0226c0e4971934da9435", "0e606c2f6f8dcd579faf4739312bd7327ac7796fa44a81780fe0d66fc7761fb9", "2f307198afdbde5f95989a17e06ce1bb9ff36c441cf3b2248431534fe13bb9fe", "51418e6df23d450aaacc74ef2df53a6b1693727b70bda9ebc43acfc23d8fb5ea", "6e9e3ac46705ed80520695b924435b00d2b3079598bf7faca7fd1524be777e5e", "1e96241e2876aad29ce64f5d7e7fbb8db7265449df816c0d30a96633778c5cb6", "81788f00eb72696d811f946e65d2c96528c45590874a1defdd46651e9b79a3a1", "d9aa5a9f1df50e933d7105a5d72b5fe96bfbb9fd4b5b0eaa5e80af12e72d497a", "e1b6976a732d27fc5d6a96b6d3d0d1d5eaa6ec46bae4665f17e7a43aefc75280", "9151c75edcec1cc90aa2d2c240ff657b0eef3f5f1ec37418c8854b2493114f1d", "3e7c12d0132421f08ea0a390cfa325e422a6b35120fb2eb650f108a165237934", "1ee0e85c7d8a91089c03f37318cdc9127026bf789e3ce4b75046eaa3eebd3458", "4ae64a3ef66cad847409ce175bd5365c9097fd21647a05730ac6b45841add3c8", "f0ea0f334cf1d64678a6dab08c07e2f94f339e8389bd17ebc882b5c8b736cbf2", "da904db96060546ff69e28993ce8183766da9402ac10fae9fc1f1d67ebd83c90", "db11820615f7b5e47778c45d2e083e77f49b608b587dc09ec26f077aba07a242", "ff5c726a83bd785484de75bb03b421f9e8e382bf2740120a2fcf72326aa01c75", "f8643a7efd6304980db323303ab73a6fd4f4ee1047520d39d571580395b97f21", "8facf9737d07838aedf6030593bfb247d8c29fe8d9b18b2913408627a4424d7e", "f0672964aa6e4c7dd4768e18827023787386927f4db89fd661444979afb43c18", "6fd3649c8401f2704ed2be18518b870eb6bf2b9a6689d1b336f05bd8b49017f6", "ed172dac7de827493e0c0fdd8d3299333acb678e72ed499e0224b389cc1e0fba", "7f9a8a8cc8e34add11934a1a5882be5978a6d28405cb0a053ec5699a502b1cef", "6ca829ebd2a0a40994f68c1db7978ec274b45c46e9b351df869a2bfe0630bbd4", "0bbb017c437573a55db88258a9d9a01188bdd23bb6b26903b137814871661f47", "9a6358d2541f46b6d05b80fe25a2cb025fbe9e4b227a6275908d5ee31c948569", "a75d26c6d4ce944024f10e6d23e8b5b888d680120e15dc0e4fee8d8833ee0c6a", "1d43d33556699b42c124b46e41243abf48727fe488428056fdd174a3861c1e3c", "7b5bd3fecbaa093f005c4f806ea67846c0df6b04df7729925cb14724f6a8b582", "6bdf2b54f2f5ab90191261d33dee80fede75896994016422b28db8ba62327d82", "1a16181b250085a91ccecc118473fa2ab98515e894a7b63b347c24b5be560c7a", "22d24891755910b48ad632358c26245bdcc375abc41f7e2c9fb3c7773dbf4e22", "5b70c5d4a373d541619c944fcc3b61259550b0e9fba3eca16f0879e5845b43b9", "b78f9098c9d76987b7409e63426a8d49972bb4e75289576c680cf96513d44b6d", "916b53b8e85eb7e0a2a76d6fc8d2163430e7183ccb103d6705f54af4bb070907", "dc3d78f43110d2aa9df83c5485ec33663ad5452b8cdeb1aeeac9d6b1487fb781", "3975539ed5402cb9f5ab503584524dd141cc4296b666ec66d807f94f62b1c026", "bd1f97fd89183643423073f22733880616456ca41960699f18e868cb9ac35508", "90b468ff0f83460c3dd8cfe778c39d32c6bb1eeff9ac5de7804a4050d3b8073e", "0e886d49d88b82c9f8dbdd2f38a535992f35ab16629724d746394db3898235fa", "76c22e965242d1ca5614e829d9028dcad9c4b09393bcbdd318b0365557335fb9", "59b168488ec8629f820a1efd8fc5a0c2adec4253e61d6a2945a68a9a43be9035", "ff172b42854eaf2865caa985d2fb6283c5ab19574126623ffd615a761a5bce72", "cb46ac9ccc024ee74c96e3cf1c13a6949a432e855dfa881b6a307c0e6daac59e", "9971574924c0f413bf4c0f96bb9c2fbdfea8f475e33a8fb6f15fa40903b63444", "1a95567deb0f45a8941e2248f33286485984a5e9d86d16c37d42169ad864dc36", "205fc7f7ec7a83f0bc22d5269c91762cd00adc7428456d799be5a0cd76f08b0f", "849dd41ef59a722901b7a0deb2c1fd3c110a91a726120a0a119cb7a15cf98438", "a32880917c714612101af95e5c8d8eb5fb046fdcc68bae76c05b829b3fa73c2e", "70b38d6d510d13b359dffa910329952c620a4bce4ee7a8552b9bb3a14572394d", "ef257ab2f4226faa6ba288a6793f026609068effb866c18496a847e8b60b102d", "e5196ab42ff53c8352288bde6b6b7312cd6f39f7d21b556b0db178d8470d5790", "ca98f128bf085f2b718f2b3c12da7c4d98887cc94251a2b1705b637611bd83bb", "79508f0b93a49ec19c5cb05906ca1ba3d3db8ed4f9c6884873d0d7e3e985ea51", "9088be3f47f9debc63e928739f7163182b49eab044518b151f0b89f6b6aefdd0", "46b2782fd669b6288a4d7348cf6671360277ba4864cc69bce3497369ac2ec31e", "0fa5131557db67b430d516530be939ff25882adf68a076602f3dfad8c77c963a", "3404302cc097d5457244453a4c9990804201ee8161188df811bcb32404998c71", "856939710dbb90a8eeda875a31f9a52af759bd932b88e7b08df35414c54d4721", "72569573b9b41d0ac5ce17764a139c6b8b36ef3ca6d92cec625dbcdae758ba22", "9746da344e435a008d6acb4847211bb676376ecc76c825b5d44a28b89ceeb40e", "3eafded1595516f032e33ec975f4c9c3a1055d13aa5575cf8a801d6103fdbeb4", "e88a6d2daa863c0787cc523a2cab45c546fad788951b10d75e2b0954db24cca7", "38f531e67f88f66de44d3357c8e8f2db456160ca31dd2024c9562f6afd260278", }; // block 685498 (13 key images in one transaction) static const char * const key_images_685498[] = { "749b7277aa21c70c417f255fb181c3a30b44277edf657eaaebf28a2709dd2a90", "5a9b3e1a87332d735cedaa2b5623a6a5e99d99f5a2887c8fc84293577e8bf25c", "bea438768445eb3650cf619bf6758e94035abfe0ccda91d4a58c582df143d835", "376e237ff4da5e5cbd6e1bba4b01412fa751f2959c0c57006589f382413df429", "14ac2f2e044f8635a3a42ecb46c575424073c1f6e5ed5e905f516d57f63184b5", "2d1d2ecb77b69a2901de00897d0509c1b7855a3b2f8eb1afe419008fc03cd15a", "ea01658f0972b77ae9112d525ec073e3ec5c3b98d5ad912d95ab2636354b70b6", "d3934864a46101d8c242415282e7fc9ee73ad16cd40355535d226ab45ecdb61a", "ee379b05c5d02432330ebd4ea9c4f1c87d14c388568d526a0f8a22649a14e453", "aeb7b842b410b13ca4af7a5ffd5ae6caddc8bfec653df1b945e478839a2e0057", "451806929d9f5c3a7f365472703871abadc25b2a5a2d75472a45e86cd76c610b", "272d9b9fcc9e253c08da9caf8233471150019582eaefef461c1f9ceff7e2c337", "633cdedeb3b96ec4f234c670254c6f721e0b368d00b48c6b26759db7d62cf52d", }; if (height() > 202612) { for (const auto &kis: key_images_202612) { crypto::key_image ki; epee::string_tools::hex_to_pod(kis, ki); if (!has_key_image(ki)) { LOG_PRINT_L1("Fixup: adding missing spent key " << ki); add_spent_key(ki); } } } if (height() > 685498) { for (const auto &kis: key_images_685498) { crypto::key_image ki; epee::string_tools::hex_to_pod(kis, ki); if (!has_key_image(ki)) { LOG_PRINT_L1("Fixup: adding missing spent key " << ki); add_spent_key(ki); } } } } batch_stop(); } } // namespace cryptonote
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h" #include <assert.h> #include <string.h> #include "webrtc/base/checks.h" #include "webrtc/modules/rtp_rtcp/interface/rtp_cvo.h" #include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h" #include "webrtc/modules/rtp_rtcp/source/rtp_format.h" #include "webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.h" #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" #include "webrtc/system_wrappers/interface/critical_section_wrapper.h" #include "webrtc/system_wrappers/interface/logging.h" #include "webrtc/system_wrappers/interface/trace_event.h" namespace webrtc { RTPReceiverStrategy* RTPReceiverStrategy::CreateVideoStrategy( RtpData* data_callback) { return new RTPReceiverVideo(data_callback); } RTPReceiverVideo::RTPReceiverVideo(RtpData* data_callback) : RTPReceiverStrategy(data_callback) { } RTPReceiverVideo::~RTPReceiverVideo() { } bool RTPReceiverVideo::ShouldReportCsrcChanges(uint8_t payload_type) const { // Always do this for video packets. return true; } int32_t RTPReceiverVideo::OnNewPayloadTypeCreated( const char payload_name[RTP_PAYLOAD_NAME_SIZE], int8_t payload_type, uint32_t frequency) { return 0; } int32_t RTPReceiverVideo::ParseRtpPacket(WebRtcRTPHeader* rtp_header, const PayloadUnion& specific_payload, bool is_red, const uint8_t* payload, size_t payload_length, int64_t timestamp_ms, bool is_first_packet) { TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), "Video::ParseRtp", "seqnum", rtp_header->header.sequenceNumber, "timestamp", rtp_header->header.timestamp); rtp_header->type.Video.codec = specific_payload.Video.videoCodecType; DCHECK_GE(payload_length, rtp_header->header.paddingLength); const size_t payload_data_length = payload_length - rtp_header->header.paddingLength; if (payload == NULL || payload_data_length == 0) { return data_callback_->OnReceivedPayloadData(NULL, 0, rtp_header) == 0 ? 0 : -1; } // We are not allowed to hold a critical section when calling below functions. rtc::scoped_ptr<RtpDepacketizer> depacketizer( RtpDepacketizer::Create(rtp_header->type.Video.codec)); if (depacketizer.get() == NULL) { LOG(LS_ERROR) << "Failed to create depacketizer."; return -1; } rtp_header->type.Video.isFirstPacket = is_first_packet; RtpDepacketizer::ParsedPayload parsed_payload; if (!depacketizer->Parse(&parsed_payload, payload, payload_data_length)) return -1; rtp_header->frameType = parsed_payload.frame_type; rtp_header->type = parsed_payload.type; rtp_header->type.Video.rotation = kVideoRotation_0; // Retrieve the video rotation information. if (rtp_header->header.extension.hasVideoRotation) { rtp_header->type.Video.rotation = ConvertCVOByteToVideoRotation( rtp_header->header.extension.videoRotation); } return data_callback_->OnReceivedPayloadData(parsed_payload.payload, parsed_payload.payload_length, rtp_header) == 0 ? 0 : -1; } int RTPReceiverVideo::GetPayloadTypeFrequency() const { return kVideoPayloadTypeFrequency; } RTPAliveType RTPReceiverVideo::ProcessDeadOrAlive( uint16_t last_payload_length) const { return kRtpDead; } int32_t RTPReceiverVideo::InvokeOnInitializeDecoder( RtpFeedback* callback, int32_t id, int8_t payload_type, const char payload_name[RTP_PAYLOAD_NAME_SIZE], const PayloadUnion& specific_payload) const { // For video we just go with default values. if (-1 == callback->OnInitializeDecoder( id, payload_type, payload_name, kVideoPayloadTypeFrequency, 1, 0)) { LOG(LS_ERROR) << "Failed to created decoder for payload type: " << static_cast<int>(payload_type); return -1; } return 0; } } // namespace webrtc
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy of the License at // // https://opensource.org/licenses/BSD-3-Clause // // 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 "softmax.h" #include <float.h> #include <math.h> #include <algorithm> namespace ncnn { DEFINE_LAYER_CREATOR(Softmax) Softmax::Softmax() { one_blob_only = true; support_inplace = true; } int Softmax::forward(const Mat& bottom_blob, Mat& top_blob) const { // value = exp( value - global max value ) // sum all value // value = value / sum int w = bottom_blob.w; int h = bottom_blob.h; int channels = bottom_blob.c; int size = w * h; top_blob.create(w, h, channels); if (top_blob.empty()) return -100; Mat max; max.create(w, h); if (max.empty()) return -100; max.fill(-FLT_MAX); for (int q=0; q<channels; q++) { const float* ptr = bottom_blob.channel(q); float* maxptr = max; for (int i=0; i<size; i++) { maxptr[i] = std::max(maxptr[i], ptr[i]); } } #pragma omp parallel for for (int q=0; q<channels; q++) { const float* ptr = bottom_blob.channel(q); float* outptr = top_blob.channel(q); float* maxptr = max; for (int i=0; i<size; i++) { outptr[i] = exp(ptr[i] - maxptr[i]); } } Mat sum; sum.create(w, h); if (sum.empty()) return -100; sum.fill(0.f); for (int q=0; q<channels; q++) { const float* outptr = top_blob.channel(q); float* sumptr = sum; for (int i=0; i<size; i++) { sumptr[i] += outptr[i]; } } #pragma omp parallel for for (int q=0; q<channels; q++) { float* outptr = top_blob.channel(q); float* sumptr = sum; for (int i=0; i<size; i++) { outptr[i] /= sumptr[i]; } } return 0; } int Softmax::forward_inplace(Mat& bottom_top_blob) const { // value = exp( value - global max value ) // sum all value // value = value / sum int w = bottom_top_blob.w; int h = bottom_top_blob.h; int channels = bottom_top_blob.c; int size = w * h; Mat max; max.create(w, h); if (max.empty()) return -100; max.fill(-FLT_MAX); for (int q=0; q<channels; q++) { float* ptr = bottom_top_blob.channel(q); float* maxptr = max; for (int i=0; i<size; i++) { maxptr[i] = std::max(maxptr[i], ptr[i]); } } #pragma omp parallel for for (int q=0; q<channels; q++) { float* ptr = bottom_top_blob.channel(q); float* maxptr = max; for (int i=0; i<size; i++) { ptr[i] = exp(ptr[i] - maxptr[i]); } } Mat sum; sum.create(w, h); if (sum.empty()) return -100; sum.fill(0.f); for (int q=0; q<channels; q++) { const float* ptr = bottom_top_blob.channel(q); float* sumptr = sum; for (int i=0; i<size; i++) { sumptr[i] += ptr[i]; } } #pragma omp parallel for for (int q=0; q<channels; q++) { float* ptr = bottom_top_blob.channel(q); float* sumptr = sum; for (int i=0; i<size; i++) { ptr[i] /= sumptr[i]; } } return 0; } } // namespace ncnn
namespace Gecode { namespace String { namespace Branch { forceinline LenBlockMin_LLLM::LenBlockMin_LLLM(Home home, ViewArray<String::StringView>& x0) : StringBrancher(home, x0) {}; forceinline LenBlockMin_LLLM::LenBlockMin_LLLM(Home home, LenBlockMin_LLLM& b) : StringBrancher(home, b, b.start) { x.update(home, b.x); } forceinline Actor* LenBlockMin_LLLM::copy(Space& home) { return new (home) LenBlockMin_LLLM(home, *this); } forceinline void LenBlockMin_LLLM::post(Home home, ViewArray<String::StringView>& x) { (void) new (home) LenBlockMin_LLLM(home, x); } forceinline Choice* LenBlockMin_LLLM::choice(Space& home) { // std::cerr << "\nVar. choice\n"; DashedString* p = x[start].pdomain(); const DSBlock& b = p->at(p->first_na_block()); double s = b.logdim(); int d = DashedString::_MAX_STR_LENGTH; int l = b.u - b.l; int m = p->min_length(); int pos = start; // std::cerr<<x[start]<<" (pos. "<<start<<", dim. "<<s<<")\n"; if (_FIRST) DashedString::_MUST_CHARS.include(x[start].must_chars()); for (int i = start + 1; i < x.size(); ++i) { if (_FIRST) DashedString::_MUST_CHARS.include(x[i].must_chars()); if (!x[i].assigned()) { int di = x[i].degree(); if (di == 0) { // std::cerr << "Warning: " << x[i] << " has degree 0!\n"; x[i].pdomain()->update(home, ""); continue; } p = x[i].pdomain(); const DSBlock& bi = p->at(p->first_na_block()); double si = bi.logdim(); int li = b.u - bi.l; int mi = p->min_length(); di = p->max_length() - p->min_length(); if (di > 0) { if (di < d) { d = di; s = si; l = li; m = mi; pos = i; } continue; } // std::cerr<<x[i]<<" (pos. "<<i<<", deg. "<<di<<", dim. "<<si<<")\n"; if (si < s || (si == s && li < l) || (si == s && li == l && mi < m)) { s = si; l = li; m = mi; pos = i; } } } // if (_FIRST) std::cerr<<"Must chars: "<<DashedString::_MUST_CHARS<<"\n"; // std::cerr << "Chosen var. " << x[pos] << " (pos. " << pos << ")\n"; // abort(); _FIRST = false; return val_lllm(pos, x[pos].pdomain()); } forceinline ExecStatus LenBlockMin_LLLM::commit(Space& home, const Choice& c, unsigned a) { const PosLevVal& p = static_cast<const PosLevVal&>(c); // this->print(home, c, a, std::cerr); std::cerr << '\n'; x[p.pos].commit(home, p.lev, p.val, Block::FIRST, a); return ES_OK; } }}}
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, install, // copy or use the software. // // // Intel License Agreement // For Open Source Computer Vision Library // // Copyright (C) 2000, Intel Corporation, all rights reserved. // Third party copyrights are property of their respective owners. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // * Redistribution's of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // * Redistribution's 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. // // * The name of Intel Corporation may not 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 Intel Corporation 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. // //M*/ #ifndef __OPENCV_VIDEOSURVEILLANCE_H__ #define __OPENCV_VIDEOSURVEILLANCE_H__ /* Turn off the functionality until cvaux/src/Makefile.am gets updated: */ //#if _MSC_VER >= 1200 #include "opencv2/core/core_c.h" #include <stdio.h> #if (defined _MSC_VER && _MSC_VER >= 1200) || defined __BORLANDC__ #define cv_stricmp stricmp #define cv_strnicmp strnicmp #if defined WINCE #define strdup _strdup #define stricmp _stricmp #endif #elif defined __GNUC__ || defined __sun #define cv_stricmp strcasecmp #define cv_strnicmp strncasecmp #else #error Do not know how to make case-insensitive string comparison on this platform #endif //struct DefParam; struct CvDefParam { struct CvDefParam* next; char* pName; char* pComment; double* pDouble; double Double; float* pFloat; float Float; int* pInt; int Int; char** pStr; char* Str; }; class CV_EXPORTS CvVSModule { private: /* Internal data: */ CvDefParam* m_pParamList; char* m_pModuleTypeName; char* m_pModuleName; char* m_pNickName; protected: int m_Wnd; public: /* Constructor and destructor: */ CvVSModule(); virtual ~CvVSModule(); private: /* Internal functions: */ void FreeParam(CvDefParam** pp); CvDefParam* NewParam(const char* name); CvDefParam* GetParamPtr(int index); CvDefParam* GetParamPtr(const char* name); protected: /* INTERNAL INTERFACE */ int IsParam(const char* name); void AddParam(const char* name, double* pAddr); void AddParam(const char* name, float* pAddr); void AddParam(const char* name, int* pAddr); void AddParam(const char* name, const char** pAddr); void AddParam(const char* name); void CommentParam(const char* name, const char* pComment); void SetTypeName(const char* name); void SetModuleName(const char* name); void DelParam(const char* name); public: /* EXTERNAL INTERFACE */ const char* GetParamName(int index); const char* GetParamComment(const char* name); double GetParam(const char* name); const char* GetParamStr(const char* name); void SetParam(const char* name, double val); void SetParamStr(const char* name, const char* str); void TransferParamsFromChild(CvVSModule* pM, const char* prefix = NULL); void TransferParamsToChild(CvVSModule* pM, char* prefix = NULL); virtual void ParamUpdate(); const char* GetTypeName(); int IsModuleTypeName(const char* name); char* GetModuleName(); int IsModuleName(const char* name); void SetNickName(const char* pStr); const char* GetNickName(); virtual void SaveState(CvFileStorage*); virtual void LoadState(CvFileStorage*, CvFileNode*); virtual void Release() = 0; };/* CvVMModule */ CV_EXPORTS void cvWriteStruct(CvFileStorage* fs, const char* name, void* addr, const char* desc, int num=1); CV_EXPORTS void cvReadStructByName(CvFileStorage* fs, CvFileNode* node, const char* name, void* addr, const char* desc); /* FOREGROUND DETECTOR INTERFACE */ class CV_EXPORTS CvFGDetector : public CvVSModule { public: CvFGDetector(); virtual IplImage* GetMask() = 0; /* Process current image: */ virtual void Process(IplImage* pImg) = 0; /* Release foreground detector: */ virtual void Release() = 0; }; CV_EXPORTS void cvReleaseFGDetector(CvFGDetector** ppT ); CV_EXPORTS CvFGDetector* cvCreateFGDetectorBase(int type, void *param); /* BLOB STRUCTURE*/ struct CvBlob { float x,y; /* blob position */ float w,h; /* blob sizes */ int ID; /* blob ID */ }; inline CvBlob cvBlob(float x,float y, float w, float h) { CvBlob B = {x,y,w,h,0}; return B; } #define CV_BLOB_MINW 5 #define CV_BLOB_MINH 5 #define CV_BLOB_ID(pB) (((CvBlob*)(pB))->ID) #define CV_BLOB_CENTER(pB) cvPoint2D32f(((CvBlob*)(pB))->x,((CvBlob*)(pB))->y) #define CV_BLOB_X(pB) (((CvBlob*)(pB))->x) #define CV_BLOB_Y(pB) (((CvBlob*)(pB))->y) #define CV_BLOB_WX(pB) (((CvBlob*)(pB))->w) #define CV_BLOB_WY(pB) (((CvBlob*)(pB))->h) #define CV_BLOB_RX(pB) (0.5f*CV_BLOB_WX(pB)) #define CV_BLOB_RY(pB) (0.5f*CV_BLOB_WY(pB)) #define CV_BLOB_RECT(pB) cvRect(cvRound(((CvBlob*)(pB))->x-CV_BLOB_RX(pB)),cvRound(((CvBlob*)(pB))->y-CV_BLOB_RY(pB)),cvRound(CV_BLOB_WX(pB)),cvRound(CV_BLOB_WY(pB))) /* END BLOB STRUCTURE*/ /* simple BLOBLIST */ class CV_EXPORTS CvBlobSeq { public: CvBlobSeq(int BlobSize = sizeof(CvBlob)) { m_pMem = cvCreateMemStorage(); m_pSeq = cvCreateSeq(0,sizeof(CvSeq),BlobSize,m_pMem); strcpy(m_pElemFormat,"ffffi"); } virtual ~CvBlobSeq() { cvReleaseMemStorage(&m_pMem); }; virtual CvBlob* GetBlob(int BlobIndex) { return (CvBlob*)cvGetSeqElem(m_pSeq,BlobIndex); }; virtual CvBlob* GetBlobByID(int BlobID) { int i; for(i=0; i<m_pSeq->total; ++i) if(BlobID == CV_BLOB_ID(GetBlob(i))) return GetBlob(i); return NULL; }; virtual void DelBlob(int BlobIndex) { cvSeqRemove(m_pSeq,BlobIndex); }; virtual void DelBlobByID(int BlobID) { int i; for(i=0; i<m_pSeq->total; ++i) { if(BlobID == CV_BLOB_ID(GetBlob(i))) { DelBlob(i); return; } } }; virtual void Clear() { cvClearSeq(m_pSeq); }; virtual void AddBlob(CvBlob* pB) { cvSeqPush(m_pSeq,pB); }; virtual int GetBlobNum() { return m_pSeq->total; }; virtual void Write(CvFileStorage* fs, const char* name) { const char* attr[] = {"dt",m_pElemFormat,NULL}; if(fs) { cvWrite(fs,name,m_pSeq,cvAttrList(attr,NULL)); } } virtual void Load(CvFileStorage* fs, CvFileNode* node) { if(fs==NULL) return; CvSeq* pSeq = (CvSeq*)cvRead(fs, node); if(pSeq) { int i; cvClearSeq(m_pSeq); for(i=0;i<pSeq->total;++i) { void* pB = cvGetSeqElem( pSeq, i ); cvSeqPush( m_pSeq, pB ); } } } void AddFormat(const char* str){strcat(m_pElemFormat,str);} protected: CvMemStorage* m_pMem; CvSeq* m_pSeq; char m_pElemFormat[1024]; }; /* simple BLOBLIST */ /* simple TRACKLIST */ struct CvBlobTrack { int TrackID; int StartFrame; CvBlobSeq* pBlobSeq; }; class CV_EXPORTS CvBlobTrackSeq { public: CvBlobTrackSeq(int TrackSize = sizeof(CvBlobTrack)); virtual ~CvBlobTrackSeq(); virtual CvBlobTrack* GetBlobTrack(int TrackIndex); virtual CvBlobTrack* GetBlobTrackByID(int TrackID); virtual void DelBlobTrack(int TrackIndex); virtual void DelBlobTrackByID(int TrackID); virtual void Clear(); virtual void AddBlobTrack(int TrackID, int StartFrame = 0); virtual int GetBlobTrackNum(); protected: CvMemStorage* m_pMem; CvSeq* m_pSeq; }; /* simple TRACKLIST */ /* BLOB DETECTOR INTERFACE */ class CV_EXPORTS CvBlobDetector: public CvVSModule { public: CvBlobDetector(){SetTypeName("BlobDetector");}; /* Try to detect new blob entrance based on foreground mask. */ /* pFGMask - image of foreground mask */ /* pNewBlob - pointer to CvBlob structure which will be filled if new blob entrance detected */ /* pOldBlobList - pointer to blob list which already exist on image */ virtual int DetectNewBlob(IplImage* pImg, IplImage* pImgFG, CvBlobSeq* pNewBlobList, CvBlobSeq* pOldBlobList) = 0; /* release blob detector */ virtual void Release()=0; }; /* Release any blob detector: */ CV_EXPORTS void cvReleaseBlobDetector(CvBlobDetector** ppBD); /* Declarations of constructors of implemented modules: */ CV_EXPORTS CvBlobDetector* cvCreateBlobDetectorSimple(); CV_EXPORTS CvBlobDetector* cvCreateBlobDetectorCC(); struct CV_EXPORTS CvDetectedBlob : public CvBlob { float response; }; CV_INLINE CvDetectedBlob cvDetectedBlob( float x, float y, float w, float h, int ID = 0, float response = 0.0F ) { CvDetectedBlob b; b.x = x; b.y = y; b.w = w; b.h = h; b.ID = ID; b.response = response; return b; } class CV_EXPORTS CvObjectDetector { public: CvObjectDetector( const char* /*detector_file_name*/ = 0 ); ~CvObjectDetector(); /* * Release the current detector and load new detector from file * (if detector_file_name is not 0) * Return true on success: */ bool Load( const char* /*detector_file_name*/ = 0 ); /* Return min detector window size: */ CvSize GetMinWindowSize() const; /* Return max border: */ int GetMaxBorderSize() const; /* * Detect the object on the image and push the detected * blobs into <detected_blob_seq> which must be the sequence of <CvDetectedBlob>s */ void Detect( const CvArr* /*img*/, /* out */ CvBlobSeq* /*detected_blob_seq*/ = 0 ); protected: class CvObjectDetectorImpl* impl; }; CV_INLINE CvRect cvRectIntersection( const CvRect r1, const CvRect r2 ) { CvRect r = cvRect( MAX(r1.x, r2.x), MAX(r1.y, r2.y), 0, 0 ); r.width = MIN(r1.x + r1.width, r2.x + r2.width) - r.x; r.height = MIN(r1.y + r1.height, r2.y + r2.height) - r.y; return r; } /* * CvImageDrawer * * Draw on an image the specified ROIs from the source image and * given blobs as ellipses or rectangles: */ struct CvDrawShape { enum {RECT, ELLIPSE} shape; CvScalar color; }; /*extern const CvDrawShape icv_shape[] = { { CvDrawShape::ELLIPSE, CV_RGB(255,0,0) }, { CvDrawShape::ELLIPSE, CV_RGB(0,255,0) }, { CvDrawShape::ELLIPSE, CV_RGB(0,0,255) }, { CvDrawShape::ELLIPSE, CV_RGB(255,255,0) }, { CvDrawShape::ELLIPSE, CV_RGB(0,255,255) }, { CvDrawShape::ELLIPSE, CV_RGB(255,0,255) } };*/ class CV_EXPORTS CvImageDrawer { public: CvImageDrawer() : m_image(0) {} ~CvImageDrawer() { cvReleaseImage( &m_image ); } void SetShapes( const CvDrawShape* shapes, int num ); /* <blob_seq> must be the sequence of <CvDetectedBlob>s */ IplImage* Draw( const CvArr* src, CvBlobSeq* blob_seq = 0, const CvSeq* roi_seq = 0 ); IplImage* GetImage() { return m_image; } protected: //static const int MAX_SHAPES = sizeof(icv_shape) / sizeof(icv_shape[0]);; IplImage* m_image; CvDrawShape m_shape[16]; }; /* Trajectory generation module: */ class CV_EXPORTS CvBlobTrackGen: public CvVSModule { public: CvBlobTrackGen(){SetTypeName("BlobTrackGen");}; virtual void SetFileName(char* pFileName) = 0; virtual void AddBlob(CvBlob* pBlob) = 0; virtual void Process(IplImage* pImg = NULL, IplImage* pFG = NULL) = 0; virtual void Release() = 0; }; inline void cvReleaseBlobTrackGen(CvBlobTrackGen** pBTGen) { if(*pBTGen)(*pBTGen)->Release(); *pBTGen = 0; } /* Declarations of constructors of implemented modules: */ CV_EXPORTS CvBlobTrackGen* cvCreateModuleBlobTrackGen1(); CV_EXPORTS CvBlobTrackGen* cvCreateModuleBlobTrackGenYML(); /* BLOB TRACKER INTERFACE */ class CV_EXPORTS CvBlobTracker: public CvVSModule { public: CvBlobTracker(); /* Add new blob to track it and assign to this blob personal ID */ /* pBlob - pointer to structure with blob parameters (ID is ignored)*/ /* pImg - current image */ /* pImgFG - current foreground mask */ /* Return pointer to new added blob: */ virtual CvBlob* AddBlob(CvBlob* pBlob, IplImage* pImg, IplImage* pImgFG = NULL ) = 0; /* Return number of currently tracked blobs: */ virtual int GetBlobNum() = 0; /* Return pointer to specified by index blob: */ virtual CvBlob* GetBlob(int BlobIndex) = 0; /* Delete blob by its index: */ virtual void DelBlob(int BlobIndex) = 0; /* Process current image and track all existed blobs: */ virtual void Process(IplImage* pImg, IplImage* pImgFG = NULL) = 0; /* Release blob tracker: */ virtual void Release() = 0; /* Process one blob (for multi hypothesis tracing): */ virtual void ProcessBlob(int BlobIndex, CvBlob* pBlob, IplImage* /*pImg*/, IplImage* /*pImgFG*/ = NULL); /* Get confidence/wieght/probability (0-1) for blob: */ virtual double GetConfidence(int /*BlobIndex*/, CvBlob* /*pBlob*/, IplImage* /*pImg*/, IplImage* /*pImgFG*/ = NULL); virtual double GetConfidenceList(CvBlobSeq* pBlobList, IplImage* pImg, IplImage* pImgFG = NULL); virtual void UpdateBlob(int /*BlobIndex*/, CvBlob* /*pBlob*/, IplImage* /*pImg*/, IplImage* /*pImgFG*/ = NULL); /* Update all blob models: */ virtual void Update(IplImage* pImg, IplImage* pImgFG = NULL); /* Return pointer to blob by its unique ID: */ virtual int GetBlobIndexByID(int BlobID); /* Return pointer to blob by its unique ID: */ virtual CvBlob* GetBlobByID(int BlobID); /* Delete blob by its ID: */ virtual void DelBlobByID(int BlobID); /* Set new parameters for specified (by index) blob: */ virtual void SetBlob(int /*BlobIndex*/, CvBlob* /*pBlob*/); /* Set new parameters for specified (by ID) blob: */ virtual void SetBlobByID(int BlobID, CvBlob* pBlob); /* =============== MULTI HYPOTHESIS INTERFACE ================== */ /* Return number of position hyposetis of currently tracked blob: */ virtual int GetBlobHypNum(int /*BlobIdx*/); /* Return pointer to specified blob hypothesis by index blob: */ virtual CvBlob* GetBlobHyp(int BlobIndex, int /*hypothesis*/); /* Set new parameters for specified (by index) blob hyp * (can be called several times for each hyp ): */ virtual void SetBlobHyp(int /*BlobIndex*/, CvBlob* /*pBlob*/); }; CV_EXPORTS void cvReleaseBlobTracker(CvBlobTracker**ppT ); /* BLOB TRACKER INTERFACE */ /*BLOB TRACKER ONE INTERFACE */ class CV_EXPORTS CvBlobTrackerOne : public CvVSModule { public: virtual void Init(CvBlob* pBlobInit, IplImage* pImg, IplImage* pImgFG = NULL) = 0; virtual CvBlob* Process(CvBlob* pBlobPrev, IplImage* pImg, IplImage* pImgFG = NULL) = 0; virtual void Release() = 0; /* Non-required methods: */ virtual void SkipProcess(CvBlob* /*pBlobPrev*/, IplImage* /*pImg*/, IplImage* /*pImgFG*/ = NULL){}; virtual void Update(CvBlob* /*pBlob*/, IplImage* /*pImg*/, IplImage* /*pImgFG*/ = NULL){}; virtual void SetCollision(int /*CollisionFlag*/){}; /* call in case of blob collision situation*/ virtual double GetConfidence(CvBlob* /*pBlob*/, IplImage* /*pImg*/, IplImage* /*pImgFG*/ = NULL, IplImage* /*pImgUnusedReg*/ = NULL) { return 1; }; }; inline void cvReleaseBlobTrackerOne(CvBlobTrackerOne **ppT ) { ppT[0]->Release(); ppT[0] = 0; } CV_EXPORTS CvBlobTracker* cvCreateBlobTrackerList(CvBlobTrackerOne* (*create)()); /*BLOB TRACKER ONE INTERFACE */ /* Declarations of constructors of implemented modules: */ /* Some declarations for specific MeanShift tracker: */ #define PROFILE_EPANECHNIKOV 0 #define PROFILE_DOG 1 struct CvBlobTrackerParamMS { int noOfSigBits; int appearance_profile; int meanshift_profile; float sigma; }; CV_EXPORTS CvBlobTracker* cvCreateBlobTrackerMS1(CvBlobTrackerParamMS* param); CV_EXPORTS CvBlobTracker* cvCreateBlobTrackerMS2(CvBlobTrackerParamMS* param); CV_EXPORTS CvBlobTracker* cvCreateBlobTrackerMS1ByList(); /* Some declarations for specific Likelihood tracker: */ struct CvBlobTrackerParamLH { int HistType; /* see Prob.h */ int ScaleAfter; }; /* Without scale optimization: */ CV_EXPORTS CvBlobTracker* cvCreateBlobTrackerLHR(CvBlobTrackerParamLH* /*param*/ = NULL); /* With scale optimization: */ CV_EXPORTS CvBlobTracker* cvCreateBlobTrackerLHRS(CvBlobTrackerParamLH* /*param*/ = NULL); /* Simple blob tracker based on connected component tracking: */ CV_EXPORTS CvBlobTracker* cvCreateBlobTrackerCC(); /* Connected component tracking and mean-shift particle filter collion-resolver: */ CV_EXPORTS CvBlobTracker* cvCreateBlobTrackerCCMSPF(); /* Blob tracker that integrates meanshift and connected components: */ CV_EXPORTS CvBlobTracker* cvCreateBlobTrackerMSFG(); CV_EXPORTS CvBlobTracker* cvCreateBlobTrackerMSFGS(); /* Meanshift without connected-components */ CV_EXPORTS CvBlobTracker* cvCreateBlobTrackerMS(); /* Particle filtering via Bhattacharya coefficient, which */ /* is roughly the dot-product of two probability densities. */ /* See: Real-Time Tracking of Non-Rigid Objects using Mean Shift */ /* Comanicius, Ramesh, Meer, 2000, 8p */ /* http://citeseer.ist.psu.edu/321441.html */ CV_EXPORTS CvBlobTracker* cvCreateBlobTrackerMSPF(); /* =========== tracker integrators trackers =============*/ /* Integrator based on Particle Filtering method: */ //CV_EXPORTS CvBlobTracker* cvCreateBlobTrackerIPF(); /* Rule based integrator: */ //CV_EXPORTS CvBlobTracker* cvCreateBlobTrackerIRB(); /* Integrator based on data fusion using particle filtering: */ //CV_EXPORTS CvBlobTracker* cvCreateBlobTrackerIPFDF(); /* Trajectory postprocessing module: */ class CV_EXPORTS CvBlobTrackPostProc: public CvVSModule { public: CvBlobTrackPostProc(){SetTypeName("BlobTrackPostProc");}; virtual void AddBlob(CvBlob* pBlob) = 0; virtual void Process() = 0; virtual int GetBlobNum() = 0; virtual CvBlob* GetBlob(int index) = 0; virtual void Release() = 0; /* Additional functionality: */ virtual CvBlob* GetBlobByID(int BlobID) { int i; for(i=GetBlobNum();i>0;i--) { CvBlob* pB=GetBlob(i-1); if(pB->ID==BlobID) return pB; } return NULL; }; }; inline void cvReleaseBlobTrackPostProc(CvBlobTrackPostProc** pBTPP) { if(pBTPP == NULL) return; if(*pBTPP)(*pBTPP)->Release(); *pBTPP = 0; } /* Trajectory generation module: */ class CV_EXPORTS CvBlobTrackPostProcOne: public CvVSModule { public: CvBlobTrackPostProcOne(){SetTypeName("BlobTrackPostOne");}; virtual CvBlob* Process(CvBlob* pBlob) = 0; virtual void Release() = 0; }; /* Create blob tracking post processing module based on simle module: */ CV_EXPORTS CvBlobTrackPostProc* cvCreateBlobTrackPostProcList(CvBlobTrackPostProcOne* (*create)()); /* Declarations of constructors of implemented modules: */ CV_EXPORTS CvBlobTrackPostProc* cvCreateModuleBlobTrackPostProcKalman(); CV_EXPORTS CvBlobTrackPostProc* cvCreateModuleBlobTrackPostProcTimeAverRect(); CV_EXPORTS CvBlobTrackPostProc* cvCreateModuleBlobTrackPostProcTimeAverExp(); /* PREDICTORS */ /* blob PREDICTOR */ class CvBlobTrackPredictor: public CvVSModule { public: CvBlobTrackPredictor(){SetTypeName("BlobTrackPredictor");}; virtual CvBlob* Predict() = 0; virtual void Update(CvBlob* pBlob) = 0; virtual void Release() = 0; }; CV_EXPORTS CvBlobTrackPredictor* cvCreateModuleBlobTrackPredictKalman(); /* Trajectory analyser module: */ class CV_EXPORTS CvBlobTrackAnalysis: public CvVSModule { public: CvBlobTrackAnalysis(){SetTypeName("BlobTrackAnalysis");}; virtual void AddBlob(CvBlob* pBlob) = 0; virtual void Process(IplImage* pImg, IplImage* pFG) = 0; virtual float GetState(int BlobID) = 0; /* return 0 if trajectory is normal return >0 if trajectory abnormal */ virtual const char* GetStateDesc(int /*BlobID*/){return NULL;}; virtual void SetFileName(char* /*DataBaseName*/){}; virtual void Release() = 0; }; inline void cvReleaseBlobTrackAnalysis(CvBlobTrackAnalysis** pBTPP) { if(pBTPP == NULL) return; if(*pBTPP)(*pBTPP)->Release(); *pBTPP = 0; } /* Feature-vector generation module: */ class CV_EXPORTS CvBlobTrackFVGen : public CvVSModule { public: CvBlobTrackFVGen(){SetTypeName("BlobTrackFVGen");}; virtual void AddBlob(CvBlob* pBlob) = 0; virtual void Process(IplImage* pImg, IplImage* pFG) = 0; virtual void Release() = 0; virtual int GetFVSize() = 0; virtual int GetFVNum() = 0; virtual float* GetFV(int index, int* pFVID) = 0; /* Returns pointer to FV, if return 0 then FV not created */ virtual float* GetFVVar(){return NULL;}; /* Returns pointer to array of variation of values of FV, if returns 0 then FVVar does not exist. */ virtual float* GetFVMin() = 0; /* Returns pointer to array of minimal values of FV, if returns 0 then FVrange does not exist */ virtual float* GetFVMax() = 0; /* Returns pointer to array of maximal values of FV, if returns 0 then FVrange does not exist */ }; /* Trajectory Analyser module: */ class CV_EXPORTS CvBlobTrackAnalysisOne { public: virtual ~CvBlobTrackAnalysisOne() {}; virtual int Process(CvBlob* pBlob, IplImage* pImg, IplImage* pFG) = 0; /* return 0 if trajectory is normal return >0 if trajectory abnormal */ virtual void Release() = 0; }; /* Create blob tracking post processing module based on simle module: */ CV_EXPORTS CvBlobTrackAnalysis* cvCreateBlobTrackAnalysisList(CvBlobTrackAnalysisOne* (*create)()); /* Declarations of constructors of implemented modules: */ /* Based on histogram analysis of 2D FV (x,y): */ CV_EXPORTS CvBlobTrackAnalysis* cvCreateModuleBlobTrackAnalysisHistP(); /* Based on histogram analysis of 4D FV (x,y,vx,vy): */ CV_EXPORTS CvBlobTrackAnalysis* cvCreateModuleBlobTrackAnalysisHistPV(); /* Based on histogram analysis of 5D FV (x,y,vx,vy,state): */ CV_EXPORTS CvBlobTrackAnalysis* cvCreateModuleBlobTrackAnalysisHistPVS(); /* Based on histogram analysis of 4D FV (startpos,stoppos): */ CV_EXPORTS CvBlobTrackAnalysis* cvCreateModuleBlobTrackAnalysisHistSS(); /* Based on SVM classifier analysis of 2D FV (x,y): */ //CV_EXPORTS CvBlobTrackAnalysis* cvCreateModuleBlobTrackAnalysisSVMP(); /* Based on SVM classifier analysis of 4D FV (x,y,vx,vy): */ //CV_EXPORTS CvBlobTrackAnalysis* cvCreateModuleBlobTrackAnalysisSVMPV(); /* Based on SVM classifier analysis of 5D FV (x,y,vx,vy,state): */ //CV_EXPORTS CvBlobTrackAnalysis* cvCreateModuleBlobTrackAnalysisSVMPVS(); /* Based on SVM classifier analysis of 4D FV (startpos,stoppos): */ //CV_EXPORTS CvBlobTrackAnalysis* cvCreateModuleBlobTrackAnalysisSVMSS(); /* Track analysis based on distance between tracks: */ CV_EXPORTS CvBlobTrackAnalysis* cvCreateModuleBlobTrackAnalysisTrackDist(); /* Analyzer based on reation Road and height map: */ //CV_EXPORTS CvBlobTrackAnalysis* cvCreateModuleBlobTrackAnalysis3DRoadMap(); /* Analyzer that makes OR decision using set of analyzers: */ CV_EXPORTS CvBlobTrackAnalysis* cvCreateModuleBlobTrackAnalysisIOR(); /* Estimator of human height: */ class CV_EXPORTS CvBlobTrackAnalysisHeight: public CvBlobTrackAnalysis { public: virtual double GetHeight(CvBlob* pB) = 0; }; //CV_EXPORTS CvBlobTrackAnalysisHeight* cvCreateModuleBlobTrackAnalysisHeightScale(); /* AUTO BLOB TRACKER INTERFACE -- pipeline of 3 modules: */ class CV_EXPORTS CvBlobTrackerAuto: public CvVSModule { public: CvBlobTrackerAuto(){SetTypeName("BlobTrackerAuto");}; virtual void Process(IplImage* pImg, IplImage* pMask = NULL) = 0; virtual CvBlob* GetBlob(int index) = 0; virtual CvBlob* GetBlobByID(int ID) = 0; virtual int GetBlobNum() = 0; virtual IplImage* GetFGMask(){return NULL;}; virtual float GetState(int BlobID) = 0; virtual const char* GetStateDesc(int BlobID) = 0; /* return 0 if trajectory is normal; * return >0 if trajectory abnormal. */ virtual void Release() = 0; }; inline void cvReleaseBlobTrackerAuto(CvBlobTrackerAuto** ppT) { ppT[0]->Release(); ppT[0] = 0; } /* END AUTO BLOB TRACKER INTERFACE */ /* Constructor functions and data for specific BlobTRackerAuto modules: */ /* Parameters of blobtracker auto ver1: */ struct CvBlobTrackerAutoParam1 { int FGTrainFrames; /* Number of frames needed for FG (foreground) detector to train. */ CvFGDetector* pFG; /* FGDetector module. If this field is NULL the Process FG mask is used. */ CvBlobDetector* pBD; /* Selected blob detector module. */ /* If this field is NULL default blobdetector module will be created. */ CvBlobTracker* pBT; /* Selected blob tracking module. */ /* If this field is NULL default blobtracker module will be created. */ CvBlobTrackGen* pBTGen; /* Selected blob trajectory generator. */ /* If this field is NULL no generator is used. */ CvBlobTrackPostProc* pBTPP; /* Selected blob trajectory postprocessing module. */ /* If this field is NULL no postprocessing is done. */ int UsePPData; CvBlobTrackAnalysis* pBTA; /* Selected blob trajectory analysis module. */ /* If this field is NULL no track analysis is done. */ }; /* Create blob tracker auto ver1: */ CV_EXPORTS CvBlobTrackerAuto* cvCreateBlobTrackerAuto1(CvBlobTrackerAutoParam1* param = NULL); /* Simple loader for many auto trackers by its type : */ inline CvBlobTrackerAuto* cvCreateBlobTrackerAuto(int type, void* param) { if(type == 0) return cvCreateBlobTrackerAuto1((CvBlobTrackerAutoParam1*)param); return 0; } struct CvTracksTimePos { int len1,len2; int beg1,beg2; int end1,end2; int comLen; //common length for two tracks int shift1,shift2; }; /*CV_EXPORTS int cvCompareTracks( CvBlobTrackSeq *groundTruth, CvBlobTrackSeq *result, FILE *file);*/ /* Constructor functions: */ CV_EXPORTS void cvCreateTracks_One(CvBlobTrackSeq *TS); CV_EXPORTS void cvCreateTracks_Same(CvBlobTrackSeq *TS1, CvBlobTrackSeq *TS2); CV_EXPORTS void cvCreateTracks_AreaErr(CvBlobTrackSeq *TS1, CvBlobTrackSeq *TS2, int addW, int addH); /* HIST API */ class CV_EXPORTS CvProb { public: virtual ~CvProb() {}; /* Calculate probability value: */ virtual double Value(int* /*comp*/, int /*x*/ = 0, int /*y*/ = 0){return -1;}; /* Update histograpp Pnew = (1-W)*Pold + W*Padd*/ /* W weight of new added prob */ /* comps - matrix of new fetature vectors used to update prob */ virtual void AddFeature(float W, int* comps, int x =0, int y = 0) = 0; virtual void Scale(float factor = 0, int x = -1, int y = -1) = 0; virtual void Release() = 0; }; inline void cvReleaseProb(CvProb** ppProb){ppProb[0]->Release();ppProb[0]=NULL;} /* HIST API */ /* Some Prob: */ CV_EXPORTS CvProb* cvCreateProbS(int dim, CvSize size, int sample_num); CV_EXPORTS CvProb* cvCreateProbMG(int dim, CvSize size, int sample_num); CV_EXPORTS CvProb* cvCreateProbMG2(int dim, CvSize size, int sample_num); CV_EXPORTS CvProb* cvCreateProbHist(int dim, CvSize size); #define CV_BT_HIST_TYPE_S 0 #define CV_BT_HIST_TYPE_MG 1 #define CV_BT_HIST_TYPE_MG2 2 #define CV_BT_HIST_TYPE_H 3 inline CvProb* cvCreateProb(int type, int dim, CvSize size = cvSize(1,1), void* /*param*/ = NULL) { if(type == CV_BT_HIST_TYPE_S) return cvCreateProbS(dim, size, -1); if(type == CV_BT_HIST_TYPE_MG) return cvCreateProbMG(dim, size, -1); if(type == CV_BT_HIST_TYPE_MG2) return cvCreateProbMG2(dim, size, -1); if(type == CV_BT_HIST_TYPE_H) return cvCreateProbHist(dim, size); return NULL; } /* Noise type definitions: */ #define CV_NOISE_NONE 0 #define CV_NOISE_GAUSSIAN 1 #define CV_NOISE_UNIFORM 2 #define CV_NOISE_SPECKLE 3 #define CV_NOISE_SALT_AND_PEPPER 4 /* Add some noise to image: */ /* pImg - (input) image without noise */ /* pImg - (output) image with noise */ /* noise_type - type of added noise */ /* CV_NOISE_GAUSSIAN - pImg += n , n - is gaussian noise with Ampl standart deviation */ /* CV_NOISE_UNIFORM - pImg += n , n - is uniform noise with Ampl standart deviation */ /* CV_NOISE_SPECKLE - pImg += n*pImg , n - is gaussian noise with Ampl standart deviation */ /* CV_NOISE_SALT_AND_PAPPER - pImg = pImg with blacked and whited pixels, Ampl is density of brocken pixels (0-there are not broken pixels, 1 - all pixels are broken)*/ /* Ampl - "amplitude" of noise */ //CV_EXPORTS void cvAddNoise(IplImage* pImg, int noise_type, double Ampl, CvRNG* rnd_state = NULL); /*================== GENERATOR OF TEST VIDEO SEQUENCE ===================== */ typedef void CvTestSeq; /* pConfigfile - Name of file (yml or xml) with description of test sequence */ /* videos - array of names of test videos described in "pConfigfile" file */ /* numvideos - size of "videos" array */ CV_EXPORTS CvTestSeq* cvCreateTestSeq(char* pConfigfile, char** videos, int numvideo, float Scale = 1, int noise_type = CV_NOISE_NONE, double noise_ampl = 0); CV_EXPORTS void cvReleaseTestSeq(CvTestSeq** ppTestSeq); /* Generate next frame from test video seq and return pointer to it: */ CV_EXPORTS IplImage* cvTestSeqQueryFrame(CvTestSeq* pTestSeq); /* Return pointer to current foreground mask: */ CV_EXPORTS IplImage* cvTestSeqGetFGMask(CvTestSeq* pTestSeq); /* Return pointer to current image: */ CV_EXPORTS IplImage* cvTestSeqGetImage(CvTestSeq* pTestSeq); /* Return frame size of result test video: */ CV_EXPORTS CvSize cvTestSeqGetImageSize(CvTestSeq* pTestSeq); /* Return number of frames result test video: */ CV_EXPORTS int cvTestSeqFrameNum(CvTestSeq* pTestSeq); /* Return number of existing objects. * This is general number of any objects. * For example number of trajectories may be equal or less than returned value: */ CV_EXPORTS int cvTestSeqGetObjectNum(CvTestSeq* pTestSeq); /* Return 0 if there is not position for current defined on current frame */ /* Return 1 if there is object position and pPos was filled */ CV_EXPORTS int cvTestSeqGetObjectPos(CvTestSeq* pTestSeq, int ObjIndex, CvPoint2D32f* pPos); CV_EXPORTS int cvTestSeqGetObjectSize(CvTestSeq* pTestSeq, int ObjIndex, CvPoint2D32f* pSize); /* Add noise to final image: */ CV_EXPORTS void cvTestSeqAddNoise(CvTestSeq* pTestSeq, int noise_type = CV_NOISE_NONE, double noise_ampl = 0); /* Add Intensity variation: */ CV_EXPORTS void cvTestSeqAddIntensityVariation(CvTestSeq* pTestSeq, float DI_per_frame, float MinI, float MaxI); CV_EXPORTS void cvTestSeqSetFrame(CvTestSeq* pTestSeq, int n); #endif /* End of file. */
/* g, i | @g, %1 (ID: 0, 4) | mem2reg */ int *g; void foo() { *g = 99; } int main() { int i = 42; g = &i; foo(); return 0; }
#include "Menu.hpp" #include "Common.hpp" #include "Level.hpp" namespace menu { enum class Screen { Main, LevelSelect, Options }; Screen currentScreen = Screen::Main; const Rectangle titleTexArea(193, 9, 312, 150); const Rectangle levelSelectTexArea(204, 166, 282, 50); const Rectangle uiPlayTexArea(0, 0, 68, 32); const Rectangle uiOptionsTexArea(0, 33, 120, 34); const Rectangle uiExitTexArea(0, 69, 64, 28); const Rectangle uiLevelTexArea(0, 102, 93, 29); const Rectangle starTexArea(87, 73, 16, 17); const Rectangle starNoneTexArea(112, 73, 16, 17); void UpdateAndDraw() { ClearColor(glm::vec4(0, 120 / 255.0f, 190 / 255.0f, 1)); Texture2D& uiTex = GetAsset<Texture2D>("Tex/UI.png"); auto FlipUISrcRect = [&] (const Rectangle& r) { return Rectangle(r.x, uiTex.Height() - r.y, r.w, -r.h); }; gfx2d->Begin(); const float midX = CurrentRTWidth() * 0.5f; constexpr float BTN_STEP_Y = 20; bool clicked = IsButtonDown(Button::MouseLeft) && !WasButtonDown(Button::MouseLeft); glm::vec2 cursorPos(CursorX(), CurrentRTHeight() - CursorY()); glm::vec2 oldCursorPos(PrevCursorX(), CurrentRTHeight() - PrevCursorY()); SoundEffectParams selectSFXParams; selectSFXParams.volume = 0.5f; SoundEffectParams hoverSFXParams; hoverSFXParams.volume = 0.2f; auto MaybePlaySounds = [&] (const Rectangle& r) { if (r.Contains(cursorPos)) { if (clicked) PlaySoundEffect(GetAsset<AudioClip>("Audio/Select.ogg"), glm::vec2(), selectSFXParams); else if (!r.Contains(oldCursorPos)) PlaySoundEffect(GetAsset<AudioClip>("Audio/Hover.ogg"), glm::vec2(), hoverSFXParams); } }; float yPos; auto Button = [&](const Rectangle& r) { auto drawRect = Rectangle::CreateCentered(midX, yPos, r.w, r.h); bool hover = drawRect.Contains(cursorPos); if (hover) drawRect.x += 2; MaybePlaySounds(drawRect); gfx2d->Sprite(uiTex, drawRect, glm::vec4(1, 1, 1, hover ? 0.5f : 1.0f), FlipUISrcRect(r)); yPos -= drawRect.h + BTN_STEP_Y; return hover && clicked; }; if (currentScreen == Screen::Main) { yPos = CurrentRTHeight() * 0.5f + 130; auto titleRect = Rectangle::CreateCentered(midX, yPos, titleTexArea.w, titleTexArea.h); gfx2d->Sprite(uiTex, titleRect, glm::vec4(1), FlipUISrcRect(titleTexArea)); yPos -= titleRect.h + 20; if (Button(uiPlayTexArea)) currentScreen = Screen::LevelSelect; Button(uiOptionsTexArea); if (Button(uiExitTexArea)) QuitGame(); } else if (currentScreen == Screen::LevelSelect) { yPos = CurrentRTHeight() * 0.5f + 130; auto titleRect = Rectangle::CreateCentered(midX, yPos, levelSelectTexArea.w, levelSelectTexArea.h); gfx2d->Sprite(uiTex, titleRect, glm::vec4(1), FlipUISrcRect(levelSelectTexArea)); yPos -= titleRect.h + 20; for (int i = 1; i <= level::numLevels; i++) { auto drawRect = Rectangle::CreateCentered(midX, yPos, uiLevelTexArea.w + 20, uiLevelTexArea.h); bool hover = drawRect.Contains(CursorX(), CurrentRTHeight() - CursorY()); glm::vec4 color(1); if (i > level::numCompleted + 1) { color = glm::vec4(0.7f, 0.7f, 0.7f, 1); hover = false; } else if (hover) { color.a = 0.5f; } MaybePlaySounds(drawRect); if (hover) drawRect.x += 2; gfx2d->Sprite(uiTex, { drawRect.x, drawRect.y, uiLevelTexArea.w, uiLevelTexArea.h }, color, FlipUISrcRect(uiLevelTexArea)); std::string numStr = std::to_string(i); glm::vec2 endPos = DrawUIText(numStr, glm::vec2(drawRect.x + uiLevelTexArea.w, drawRect.y), color, false); if (level::HasStar(i)) { gfx2d->Sprite(uiTex, Rectangle::CreateCentered(endPos.x + 20, drawRect.CenterY(), starTexArea.w, starTexArea.h), color, FlipUISrcRect(starTexArea)); } yPos -= drawRect.h + BTN_STEP_Y; if (hover && clicked) { inGame = true; level::SetCurrent(i); } } } gfx2d->End(); } void SetScreenMainMenu() { currentScreen = Screen::Main; } }
// license:BSD-3-Clause // copyright-holders:Phil Bennett /*************************************************************************** Sega Super Derby II hardware preliminary driver by Phil Bennett Games supported: * Super Derby II TODO: Add PCB layouts PCBs: 834-5526? - Main PCB? (Has yet to be found) 834-5527 - Tilemaps and video output? 834-5528 - Sprites? 834-5529 - Satellite PCB (see sg1000a.cpp) Customs: 315-5011 315-5012 315-5025 315-5050 The video CPUs are waiting for commands from another source. It is assumed that there is at least one other PCB (834-5526?) which drives the video PCBs and perhaps generates sound. ***************************************************************************/ #include "emu.h" #include "cpu/z80/z80.h" #include "sound/sn76496.h" #include "speaker.h" #include "screen.h" #include "video/resnet.h" class sderby2_state : public driver_device { public: sderby2_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_subcpu(*this, "subcpu"), m_gfxdecode(*this, "gfxdecode"), m_proms(*this, "proms"), m_palette(*this, "palette") { } virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; DECLARE_DRIVER_INIT(sderby2); DECLARE_PALETTE_INIT(sderby2); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE8_MEMBER(palette_w); DECLARE_READ8_MEMBER(host_r); DECLARE_WRITE8_MEMBER(main_nmi); DECLARE_WRITE8_MEMBER(sub_nmi); DECLARE_READ8_MEMBER(sub_r); DECLARE_WRITE8_MEMBER(host_io_40_w); DECLARE_READ8_MEMBER(sub_io_0_r); DECLARE_READ8_MEMBER(sub_unk_r); DECLARE_WRITE8_MEMBER(sub_unk_w); required_device<z80_device> m_maincpu; required_device<z80_device> m_subcpu; required_device<gfxdecode_device> m_gfxdecode; required_region_ptr<uint8_t> m_proms; required_device<palette_device> m_palette; uint8_t sub_data; uint8_t main_data; uint8_t host_io_40; void sderby2(machine_config &config); void main_io_map(address_map &map); void main_program_map(address_map &map); void sub_io_map(address_map &map); void sub_program_map(address_map &map); }; /************************************* * * Video emulation * *************************************/ PALETTE_INIT_MEMBER(sderby2_state,sderby2) { } WRITE8_MEMBER(sderby2_state::palette_w) { const rgb_t color = m_palette->pen_color(data & 0xff); m_palette->set_pen_color(0x100 + offset, color); } void sderby2_state::video_start() { } uint32_t sderby2_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { return 0; } /************************************* * * CPU memory handlers * *************************************/ READ8_MEMBER(sderby2_state::host_r) { return main_data; } WRITE8_MEMBER(sderby2_state::main_nmi) { m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); main_data = data; } WRITE8_MEMBER(sderby2_state::host_io_40_w) { host_io_40 = data; } READ8_MEMBER(sderby2_state::sub_r) { return sub_data; } WRITE8_MEMBER(sderby2_state::sub_nmi) { m_subcpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); m_subcpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); sub_data = data; } READ8_MEMBER(sderby2_state::sub_unk_r) { return machine().rand(); } WRITE8_MEMBER(sderby2_state::sub_unk_w) { } READ8_MEMBER(sderby2_state::sub_io_0_r) { return host_io_40; } /************************************* * * CPU memory handlers * *************************************/ /* 1 x D4168 (8kx8) - Work RAM (banked?) 2 x TC5565 (8kx8) 2 x TC5533 (4kx8) 2 x TC5533 (4kx8) 12 x 2148 (1024x4) (near palette ROMs?) - 4 for each screen 2KB of palette per screen? (0x7FF) */ void sderby2_state::main_program_map(address_map &map) { map(0x0000, 0x7fff).rom(); map(0x8000, 0x9fff).ram(); map(0xa000, 0xbfff).ram(); map(0xc000, 0xcfff).ram(); map(0xe000, 0xe3ff).ram(); map(0xe400, 0xe7ff).ram(); map(0xe800, 0xebff).ram(); map(0xec00, 0xefff).ram(); map(0xf000, 0xffff).ram(); // Is this banked? } void sderby2_state::main_io_map(address_map &map) { map.global_mask(0xff); map(0x10, 0x10).r(this, FUNC(sderby2_state::host_r)); map(0x20, 0x20).w(this, FUNC(sderby2_state::sub_nmi)); map(0x30, 0x30).nopw(); // Written with 0x12 byte sequence at start map(0x40, 0x40).w(this, FUNC(sderby2_state::host_io_40_w)); // Occasionally written } /* 1 x D4168 (8kx8) Near Z80 6 x 2148 (1024x4) Near Z80 18 x 2148 (1024x4) Middle 18 x 2148 (1024x4) Side 4 x 2148 (1024x4) Near 316-5012 and 316-5011 */ void sderby2_state::sub_program_map(address_map &map) { map(0x0000, 0x7fff).rom(); map(0xc000, 0xcfff).ram(); // Tested at FFF, 1016, 102D map(0xd000, 0xd3ff).ram(); // 2KB Tested map(0xd400, 0xd7ff).ram(); // 2KB Tested at 105B map(0xd800, 0xdbff).ram(); // 2KB Tested at 105B map(0xdc00, 0xdfff).ram(); // 2KB Tested at 10B7 map(0xe000, 0xffff).ram(); // Tested at FE8 } void sderby2_state::sub_io_map(address_map &map) { map.global_mask(0xff); map(0x00, 0x00).r(this, FUNC(sderby2_state::sub_io_0_r)); map(0x20, 0x20).r(this, FUNC(sderby2_state::sub_r)); map(0x40, 0x40).w(this, FUNC(sderby2_state::main_nmi)); map(0x60, 0x60).nopw(); // Written with 0x12 byte sequence at start } /************************************* * * Port definitions * *************************************/ static INPUT_PORTS_START( sderby2 ) PORT_START("P1") PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_START2 ) INPUT_PORTS_END /************************************* * * Graphics decoding * *************************************/ static const gfx_layout charlayout = { 8,8, 1024, 4, { 0, 1024*8*8, 2*1024*8*8, 3*1024*8*8 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, 8*8 }; static GFXDECODE_START( sderby2 ) GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 1024 ) GFXDECODE_ENTRY( "gfx2", 0, charlayout, 0, 1024 ) GFXDECODE_END /************************************* * * Machine drivers * *************************************/ void sderby2_state::machine_start() { } void sderby2_state::machine_reset() { } MACHINE_CONFIG_START(sderby2_state::sderby2) MCFG_CPU_ADD("maincpu", Z80, XTAL(3'579'545)) MCFG_CPU_PROGRAM_MAP(main_program_map) MCFG_CPU_IO_MAP(main_io_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", sderby2_state, irq0_line_hold) MCFG_CPU_ADD("subcpu", Z80, XTAL(3'579'545)) MCFG_CPU_PROGRAM_MAP(sub_program_map) MCFG_CPU_IO_MAP(sub_io_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", sderby2_state, irq0_line_hold) // video hardware MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(256, 256) MCFG_SCREEN_VISIBLE_AREA(0, 256 - 1, 0, 256 - 1) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE) MCFG_SCREEN_UPDATE_DRIVER(sderby2_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD("palette", 256+256*3) MCFG_PALETTE_INIT_OWNER(sderby2_state,sderby2) MCFG_GFXDECODE_ADD("gfxdecode", "palette", sderby2) // sound hardware MACHINE_CONFIG_END /************************************* * * ROM definitions * *************************************/ ROM_START( sderby2 ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "epr-6205.3s", 0x00000, 0x4000, CRC(c341de53) SHA1(9c273a2c1bd9739b1ea28438d578ab5eb3abfc4a) ) ROM_LOAD( "epr-6206.3t", 0x04000, 0x4000, CRC(e700b601) SHA1(e0418e00bfb2ccb59ede9f081e12795d5d94287e) ) ROM_REGION( 0x18000, "gfx1", 0 ) // Character tiles ROM_LOAD( "epr-6213.12h", 0x00000, 0x4000, CRC(d07fe96b) SHA1(cfd5ddaa843bc40c73966fa74a9b2c3f909f15bd) ) ROM_LOAD( "epr-6214.12i", 0x04000, 0x4000, CRC(44fa1e2b) SHA1(88778b24b0f6f678bfb78c93cfa480195a4295bb) ) ROM_LOAD( "epr-6215.12k", 0x08000, 0x4000, CRC(ab54d286) SHA1(897256b6709e1a4da9daba92b6bde39ccfccd8c1) ) ROM_REGION( 0x18000, "gfx2", 0 ) // Character tiles? ROM_LOAD( "epr-6216.13h", 0x00000, 0x4000, CRC(c1f84ee6) SHA1(a16bc96c82725993d50db958827e474b7988415f) ) ROM_LOAD( "epr-6217.13i", 0x04000, 0x4000, CRC(e0e7c85a) SHA1(31ac590290466ca76fc31d29c392195947922caa) ) ROM_LOAD( "epr-6218.13k", 0x08000, 0x4000, CRC(6470b00b) SHA1(c32b11f840096428e18e1283e0622a315470f497) ) ROM_REGION( 0x18000, "gfx3", 0 ) // Sprites? ROM_LOAD( "epr-6207.8v", 0x00000, 0x4000, CRC(7fbbaceb) SHA1(67905982db35fab7d62f1907af1e0df0c9af265c) ) ROM_LOAD( "epr-6208.8w", 0x04000, 0x4000, CRC(dde795de) SHA1(7e7f63c14af42c0f1f52f670f6b4fa3d305fce07) ) ROM_LOAD( "epr-6209.8x", 0x08000, 0x4000, CRC(bd97a8d5) SHA1(df71b6bbc2a5f4e7ad713253eebe3c7b5364cff6) ) ROM_LOAD( "epr-6210.9v", 0x0c000, 0x4000, CRC(18b6cd90) SHA1(10619a4ff6c73cfa9ef7c4ce21f41ea61f2bb420) ) ROM_LOAD( "epr-6211.9w", 0x10000, 0x4000, CRC(7dafbbdf) SHA1(6ac019e7b2d7523779ebc683ac2190e08f3183c0) ) ROM_LOAD( "epr-6212.9x", 0x14000, 0x4000, CRC(1d2459e6) SHA1(201185fb8a5292acff4dec1f6d4c4b4dccf3c0a7) ) ROM_REGION( 0x08000, "saku", 0 ) // 'SAKU ROM DATA' - Track positions? ROM_LOAD( "epr-6221.12r", 0x00000, 0x4000, CRC(c023ff18) SHA1(39691040a2222ca356f4cddfe1e3c97925c73837) ) // 0x2cb5: C1h (Phil) vs 81h (Hammy) ROM_LOAD( "epr-6222.12s", 0x04000, 0x4000, CRC(62a687ea) SHA1(3a571d652a98785da0d87d561a322e8a21d939c8) ) // 834-5528 ROM_REGION( 0x10000, "subcpu", 0 ) ROM_LOAD( "epr-6240.1l", 0x00000, 0x4000, CRC(cd53736b) SHA1(eb865df8dd3f9a5b572cfae5cb79b4bb650b6739) ) ROM_LOAD( "epr-6241.1m", 0x04000, 0x4000, CRC(527b2c0d) SHA1(ca979eff0a3435f428e1771e07743ea5372e75b0) ) ROM_REGION( 0x20000, "gfx4", 0) ROM_LOAD( "epr-6242.7t", 0x00000, 0x8000, CRC(ef72ab7c) SHA1(67b19080fc639866582b14739aa32138f2debf6e) ) ROM_LOAD( "epr-6243.11t", 0x08000, 0x8000, CRC(3741fd86) SHA1(52aafb5168b25b78a82eafd8f507fd7afd352be2) ) ROM_LOAD( "epr-6246.12m", 0x10000, 0x8000, CRC(bc2a3af4) SHA1(3f1ad33b53327f2714c3a1ca4eeb5296f769ceb3) ) ROM_LOAD( "epr-6247.12r", 0x18000, 0x8000, CRC(cedfa342) SHA1(3d780779e55237b0396ed0d7183ac7b00de871cb) ) ROM_REGION( 0x1800, "proms", 0) // Color PROMs ROM_LOAD( "pr-6226.1b", 0x00000, 0x0100, CRC(f04684fb) SHA1(bbb757faaf7d98096b85266e9d43ce305a456285) ) // All 82S129 ROM_LOAD( "pr-6225.2b", 0x00100, 0x0100, CRC(c903e226) SHA1(787ce629e4a352ba9f2d7241fe78444700f23983) ) ROM_LOAD( "pr-6224.3b", 0x00200, 0x0100, CRC(8862c6e6) SHA1(bc327f985cd147606f83b682cce0a93913ed6aaa) ) ROM_LOAD( "pr-6223.2c", 0x00300, 0x0100, CRC(12354f92) SHA1(5fe3f92c174d68930536a6f59f8d75386b7fdefe) ) ROM_LOAD( "pr-6226.4b", 0x00400, 0x0100, CRC(f04684fb) SHA1(bbb757faaf7d98096b85266e9d43ce305a456285) ) ROM_LOAD( "pr-6225.5b", 0x00500, 0x0100, CRC(c903e226) SHA1(787ce629e4a352ba9f2d7241fe78444700f23983) ) ROM_LOAD( "pr-6224.6b", 0x00600, 0x0100, CRC(8862c6e6) SHA1(bc327f985cd147606f83b682cce0a93913ed6aaa) ) ROM_LOAD( "pr-6223.5c", 0x00700, 0x0100, CRC(12354f92) SHA1(5fe3f92c174d68930536a6f59f8d75386b7fdefe) ) ROM_LOAD( "pr-6226.7b", 0x00800, 0x0100, CRC(f04684fb) SHA1(bbb757faaf7d98096b85266e9d43ce305a456285) ) ROM_LOAD( "pr-6225.8b", 0x00900, 0x0100, CRC(c903e226) SHA1(787ce629e4a352ba9f2d7241fe78444700f23983) ) ROM_LOAD( "pr-6224.9b", 0x00a00, 0x0100, CRC(8862c6e6) SHA1(bc327f985cd147606f83b682cce0a93913ed6aaa) ) ROM_LOAD( "pr-6223.9c", 0x00b00, 0x0100, CRC(12354f92) SHA1(5fe3f92c174d68930536a6f59f8d75386b7fdefe) ) ROM_REGION( 0x0800, "proms_misc", 0) ROM_LOAD( "pr-6235.7p", 0x0000, 0x0020, CRC(981ea339) SHA1(4483ead7fe8bc4188b71775c09c5b5927f0028b1) ) // 82S123 ROM_LOAD( "pr-6236.7r", 0x0040, 0x0020, CRC(5ebe0b9d) SHA1(e3ecf25eff5f04a785ee88248cad58cc4d8d5122) ) // 82S123 ROM_LOAD( "pr-6237.12x", 0x0100, 0x0100, CRC(5514cde3) SHA1(967af563258c5324bf4b1ca8dcece929d1a69880) ) // TBP28L22N ROM_LOAD( "pr-6237.12w", 0x0200, 0x0100, CRC(5514cde3) SHA1(967af563258c5324bf4b1ca8dcece929d1a69880) ) // TBP28L22N ROM_LOAD( "pr-6237.13w", 0x0300, 0x0100, CRC(5514cde3) SHA1(967af563258c5324bf4b1ca8dcece929d1a69880) ) // TBP28L22N ROM_LOAD( "82s141.8n", 0x0400, 0x0200, CRC(2b35954a) SHA1(ceef7aed9b8a3603d56e79a7953c15a7db96aded) ) // TODO: Document PALs // 315-5080 = PAL14H4 (PROTECTED) ROM_END /************************************* * * Driver initialization * *************************************/ DRIVER_INIT_MEMBER(sderby2_state, sderby2) { } /************************************* * * Game drivers * *************************************/ GAME( 1985, sderby2, 0, sderby2, sderby2, sderby2_state, sderby2, ROT0, "Sega", "Super Derby II", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
/* * Copyright 2018 LE GARREC Vincent * * 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 <2lgc/math/compare_decimal.h> #include <google/protobuf/stubs/common.h> #include <cassert> int main(int /* argc */, char * /* argv */ []) // NS { assert( llgc::math::Compare::AlmostEqualUlpsAndAbsF(0.5f, 1.f / 2.f, 1.e-10f, 4)); assert(!llgc::math::Compare::AlmostEqualUlpsAndAbsF(0.5f, -0.5f, 1.e-10f, 4)); assert(!llgc::math::Compare::AlmostEqualUlpsAndAbsF(-0.5f, 0.5f, 1.e-10f, 4)); // Ulp: 2 assert(llgc::math::Compare::AlmostEqualUlpsAndAbsF(0.5f, 0.5000001f, 0.f, 4)); assert(llgc::math::Compare::AlmostEqualUlpsAndAbsD(0.5, 1. / 2., 1.e-15, 4)); assert(!llgc::math::Compare::AlmostEqualUlpsAndAbsD(0.5, -0.5, 1.e-15, 4)); assert(!llgc::math::Compare::AlmostEqualUlpsAndAbsD(-0.5, 0.5, 1.e-15, 4)); // Ulp: 1 assert(llgc::math::Compare::AlmostEqualUlpsAndAbsD(0.5, 0.5000000000000001, 0., 5)); assert(llgc::math::Compare::AlmostEqualRelativeAndAbsF(0.5f, 1.f / 2.f, 1.e-10f, 1.e-10f)); assert(!llgc::math::Compare::AlmostEqualRelativeAndAbsF(0.5f, -0.5f, 1.e-10f, 1.e-10f)); assert(!llgc::math::Compare::AlmostEqualRelativeAndAbsF(-0.5f, 0.5f, 1.e-10f, 1.e-10f)); assert(llgc::math::Compare::AlmostEqualRelativeAndAbsF(0.5f, 0.5000001f, 1e-9f, 1.e-5f)); assert(llgc::math::Compare::AlmostEqualRelativeAndAbsD(0.5, 1. / 2., 1.e-15, 1.e-15)); assert(!llgc::math::Compare::AlmostEqualRelativeAndAbsD(0.5, -0.5, 1.e-15, 1.e-15)); assert(!llgc::math::Compare::AlmostEqualRelativeAndAbsD(-0.5, 0.5, 1.e-15, 1.e-15)); assert(llgc::math::Compare::AlmostEqualRelativeAndAbsD(0.5, 0.5000001, 1e-9, 1.e-5)); google::protobuf::ShutdownProtobufLibrary(); return 0; } /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
/* * Copyright (C) Valentin V. Bartenev */ #include "ctpp2_process.h" #include <ctpp2/CTPP2Util.hpp> #include <ctpp2/CTPP2JSONParser.hpp> #include <ctpp2/CTPP2OutputCollector.hpp> #include <ctpp2/CTPP2Logger.hpp> #include <ctpp2/CTPP2VMDebugInfo.hpp> #include <ctpp2/CTPP2VMStackException.hpp> #include <ctpp2/CTPP2VMExecutable.hpp> #include <ctpp2/CTPP2VMMemoryCore.hpp> #include "CTPP2NginxVMEnvironment.hpp" using namespace CTPP; using namespace CTPPNginx; static NginxVMEnvironment *oNginxVMEnvironment = NULL; class NginxOutputCollector : public OutputCollector { public: NginxOutputCollector(ngx_pool_t *pool, ngx_chain_t *out) throw() : nginxPool(pool), nginxOutput(out), total(0) { ;; } ~NginxOutputCollector() throw() { nginxOutput->next = NULL; } size_t getSize() const throw() { return total; } private: ngx_pool_t *nginxPool; ngx_chain_t *nginxOutput; size_t total; INT_32 Collect(const void *vData, UINT_32 iDataLength) /*throw(ngx_int_t)*/; }; class NginxLogger : public Logger { public: NginxLogger(ngx_log_t *log) throw() : Log(log) { SetPriority(revTrans(log->log_level)); } ~NginxLogger() throw() { ;; } INT_32 WriteLog(const UINT_32 iPriority, CCHAR_P szString, const UINT_32 iStringLen) throw() { ngx_log_error(Trans(iPriority), Log, 0, "ctpp2 log message: \"%s\" received", szString); return 0; } private: ngx_log_t *Log; static ngx_uint_t Trans(const UINT_32 iPriority) throw() { switch(iPriority) { case CTPP2_LOG_EMERG : return NGX_LOG_EMERG; case CTPP2_LOG_ALERT : return NGX_LOG_ALERT; case CTPP2_LOG_CRIT : return NGX_LOG_CRIT; case CTPP2_LOG_ERR : return NGX_LOG_ERR; case CTPP2_LOG_WARN : return NGX_LOG_WARN; case CTPP2_LOG_NOTICE : return NGX_LOG_NOTICE; case CTPP2_LOG_INFO : return NGX_LOG_INFO; case CTPP2_LOG_DEBUG : return NGX_LOG_DEBUG; } return NGX_LOG_DEBUG; } static UINT_32 revTrans(const ngx_uint_t level) throw() { switch(level) { case NGX_LOG_EMERG : return CTPP2_LOG_EMERG; case NGX_LOG_ALERT : return CTPP2_LOG_ALERT; case NGX_LOG_CRIT : return CTPP2_LOG_CRIT; case NGX_LOG_ERR : return CTPP2_LOG_ERR; case NGX_LOG_WARN : return CTPP2_LOG_WARN; case NGX_LOG_NOTICE : return CTPP2_LOG_NOTICE; case NGX_LOG_INFO : return CTPP2_LOG_INFO; case NGX_LOG_DEBUG : return CTPP2_LOG_DEBUG; } return CTPP2_LOG_DEBUG; } }; ngx_int_t ctpp2_init(ngx_uint_t args, ngx_uint_t code, ngx_uint_t funcs, ngx_uint_t steps) { if (oNginxVMEnvironment == NULL) { try { oNginxVMEnvironment = new NginxVMEnvironment(steps, funcs, args, code); } catch(...) { return NGX_ERROR; } } return NGX_OK; } ngx_int_t ctpp2_tmpltest(ngx_buf_t *tmpl, ngx_flag_t check, ngx_log_t *log) { VMExecutable *oCore = (VMExecutable *) tmpl->pos; if (oCore->magic[0] == 'C' && oCore->magic[1] == 'T' && oCore->magic[2] == 'P' && oCore->magic[3] == 'P') { if (oCore->version[0] >= 1) { if (oCore->platform == 0x4142434445464748ull) { if (check) { UINT_32 Size = tmpl->last - tmpl->pos; UINT_32 iCRC = oCore->crc; oCore->crc = 0; if (iCRC != crc32((UCCHAR_P) oCore, Size)) { ngx_log_error(NGX_LOG_ERR, log, 0, "CTPP2 template test: CRC checksum invalid"); return NGX_ERROR; } } } else { ngx_log_error(NGX_LOG_ERR, log, 0, "CTPP2 template test: wrong byte-order; template has been compiled on a different platform"); return NGX_ERROR; } if (oCore->ieee754double != 15839800103804824402926068484019465486336.0) { ngx_log_error(NGX_LOG_ERR, log, 0, "CTPP2 template test: IEEE 754 format is broken"); return NGX_ERROR; } } ngx_log_debug0(NGX_LOG_DEBUG_HTTP, log, 0, "ctpp2 template test - OK"); return NGX_OK; } ngx_log_error(NGX_LOG_ERR, log, 0, "CTPP2 template test: it doesn't look like compiled template"); return NGX_ERROR; } ngx_int_t ctpp2_process( ngx_buf_t *tmpl, ngx_buf_t *data, ngx_pool_t *pool, ngx_chain_t **out, size_t *out_size, ngx_log_t *log ) { try { CDT oHash(CDT::HASH_VAL); CTPP2JSONParser oJSONParser(oHash); ngx_log_debug0(NGX_LOG_DEBUG_HTTP, log, 0, "ctpp2 template processing (1/3): some inits - DONE"); oJSONParser.Parse((char *) data->pos, (char *) data->last); ngx_log_debug0(NGX_LOG_DEBUG_HTTP, log, 0, "ctpp2 template processing (2/3): parsing json data - DONE"); const VMMemoryCore pVMMemoryCore((VMExecutable *) tmpl->pos); ngx_chain_t *chain = ngx_alloc_chain_link(pool); if (chain == NULL) throw NGX_ERROR; data->last = data->start; chain->buf = data; NginxOutputCollector oOutputCollector(pool, chain); NginxLogger oLogger(log); oNginxVMEnvironment->Process(pVMMemoryCore, oHash, oOutputCollector, oLogger); ngx_log_debug0(NGX_LOG_DEBUG_HTTP, log, 0, "ctpp2 template processing (3/3): VM executing - DONE"); if (data->last - data->start) { *out = chain; *out_size = oOutputCollector.getSize(); } else { *out = NULL; *out_size = 0; chain->buf = NULL; ngx_free_chain(pool, chain); ngx_pfree(pool, data->start); } return NGX_DONE; } // CDT catch(CDTTypeCastException & e) { ngx_log_error(NGX_LOG_ERR, log, 0, "CDT error: Type Cast %s", e.what()); } catch(CDTAccessException & e) { ngx_log_error(NGX_LOG_ERR, log, 0, "CDT error: Array index out of bounds: %s", e.what()); } // Virtual machine catch(IllegalOpcode & e) { ngx_log_error(NGX_LOG_ERR, log, 0, "VM error: Illegal opcode 0x%08XD at 0x%08XD", e.GetOpcode(), e.GetIP()); } catch(InvalidSyscall & e) { if (e.GetIP() != 0) { VMDebugInfo oVMDebugInfo(e.GetDebugInfo()); ngx_log_error( NGX_LOG_ERR, log, 0, "VM error: %s at 0x%08XD (Template file \"%s\", Line %D, Pos %D)", e.what(), e.GetIP(), e.GetSourceName(), oVMDebugInfo.GetLine(), oVMDebugInfo.GetLinePos() ); } else { ngx_log_error(NGX_LOG_ERR, log, 0, "VM error: Unsupported syscall \"%s\"", e.what()); } } catch(InvalidCall & e) { VMDebugInfo oVMDebugInfo(e.GetDebugInfo()); ngx_log_error( NGX_LOG_ERR, log, 0, "VM error at 0x%08X: Invalid block name \"%s\" in file \"%s\", Line %D, Pos %D", e.GetIP(), e.what(), e.GetSourceName(), oVMDebugInfo.GetLine(), oVMDebugInfo.GetLinePos() ); } catch(CodeSegmentOverrun & e) { ngx_log_error(NGX_LOG_ERR, log, 0, "VM error: %s at 0x%08XD", e.what(), e.GetIP()); } catch(StackOverflow & e) { ngx_log_error(NGX_LOG_ERR, log, 0, "VM error: Stack overflow at 0x%08XD", e.GetIP()); } catch(StackUnderflow & e) { ngx_log_error(NGX_LOG_ERR, log, 0, "VM error: Stack underflow at 0x%08XD", e.GetIP()); } catch(ExecutionLimitReached & e) { ngx_log_error(NGX_LOG_ERR, log, 0, "VM error: Execution limit of steps reached at 0x%08XD", e.GetIP()); } catch(VMException & e) { ngx_log_error(NGX_LOG_ERR, log, 0, "VM generic exception: %s at 0x%08XD", e.what(), e.GetIP()); } // CTPP catch(CTPPLogicError & e) { ngx_log_error(NGX_LOG_ERR, log, 0, "CTPP error: %s", e.what()); } catch(CTPPUnixException & e) { ngx_log_error(NGX_LOG_ERR, log, 0, "CTPP I/O error in %s: %s", e.what(), strerror(e.ErrNo())); } catch(CTPPException & e) { ngx_log_error(NGX_LOG_ERR, log, 0, "CTPP generic exception: %s", e.what()); } // Nginx catch(ngx_int_t & rc) { return rc; } catch(...) { ngx_log_error(NGX_LOG_ERR, log, 0, "NginxCTPP module error: Unknown exception catched"); } return NGX_ERROR; } INT_32 NginxOutputCollector::Collect(const void *vData, UINT_32 iDataLength) /*throw(ngx_int_t)*/ { ngx_buf_t *buffer; size_t freeSpace; UINT_32 size; u_char *charData; ngx_chain_t *chain; charData = (u_char *) vData; total += iDataLength; buffer = nginxOutput->buf; freeSpace = buffer->end - buffer->last; do { size = (freeSpace > iDataLength) ? iDataLength : freeSpace; buffer->last = ngx_cpymem(buffer->last, charData, size); iDataLength -= size; if (!iDataLength) return 0; charData += size; freeSpace = ngx_pagesize; buffer = ngx_create_temp_buf(nginxPool, freeSpace); if (buffer == NULL) throw NGX_ERROR; chain = ngx_alloc_chain_link(nginxPool); if (chain == NULL) throw NGX_ERROR; chain->buf = buffer; nginxOutput->next = chain; nginxOutput = chain; } while (true); }
//%2005//////////////////////////////////////////////////////////////////////// // // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; // IBM Corp.; EMC Corporation, The Open Group. // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; // EMC Corporation; VERITAS Software Corporation; The Open Group. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or // sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // //============================================================================== // // Author: Mike Brasher (mbrasher@bmc.com) // // Modified By: Karl Schopmeyer (k.schopmeyer@opengroup.org) // Mike Day (mdday@us.ibm.com) // Jenny Yu (jenny_yu@hp.com) // Bapu Patil ( bapu_patil@hp.com ) // Warren Otsuka (warren_otsuka@hp.com) // Nag Boranna(nagaraja_boranna@hp.com) // Carol Ann Krug Graves, Hewlett-Packard Company // (carolann_graves@hp.com) // Amit K Arora, IBM (amita@in.ibm.com) for PEP#101 // Aruran, IBM (ashanmug@in.ibm.com) for Bug# 2628 // //%///////////////////////////////////////////////////////////////////////////// #include <Pegasus/Common/Thread.h> #include <Pegasus/Common/IPC.h> #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Constants.h> #include <Pegasus/Common/PegasusVersion.h> #include <cassert> #include <Pegasus/Common/TLS.h> #include <Pegasus/Client/CIMClient.h> #include <Pegasus/Common/CIMName.h> #include <Pegasus/Common/OptionManager.h> #include <Pegasus/Common/FileSystem.h> #include <Pegasus/Common/Stopwatch.h> #include <Pegasus/Common/Exception.h> #include <Pegasus/Common/XmlWriter.h> #include <Pegasus/Common/AutoPtr.h> #if !defined(PEGASUS_OS_ZOS) && ! defined(PEGASUS_OS_HPUX) && !defined(PEGASUS_OS_LINUX) && !defined(PEGASUS_OS_AIX) // Rempve SLP #include <slp/slp.h> #endif PEGASUS_USING_PEGASUS; PEGASUS_USING_STD; CIMNamespaceName globalNamespace = CIMNamespaceName ("root/cimv2"); static const CIMNamespaceName __NAMESPACE_NAMESPACE = CIMNamespaceName ("root"); static const char* programVersion = "2.0"; /** Thread Parameters Class */ class T_Parms{ public: AutoPtr<CIMClient> client; //PEP101 int verboseTest; int activeTest; int testCount; int uniqueID; }; /** ErrorExit - Print out the error message as an and get out. @param - Text for error message @return - None, Terminates the program @execption - This function terminates the program ATTN: Should write to stderr */ void ErrorExit(const String& message) { cout << message << endl; exit(1); } /* Status display of the various steps. Shows message of function and time to execute. Grow this to a class so we have start and stop and time display with success/failure for each function. */ static void testStart(const String& message) { cout << "++++ " << message << " ++++" << endl; } static void testEnd(const double elapsedTime) { cout << "In " << elapsedTime << " Seconds\n\n"; } /***************************************************************** // Testing Namespace operations ******************************************************************/ static void TestNameSpaceOperations(CIMClient* client, Boolean activeTest, Boolean verboseTest, String uniqueID) { // Get all namespaces for display using the __Namespaces function. CIMName className = "__NameSpace"; Array<CIMNamespaceName> namespaceNames; // Build the namespaces incrementally starting at the root // ATTN: 20030319 KS today we start with the "root" directory but this is wrong. We should be // starting with null (no directory) but today we get an xml error return in Pegasus // returned for this call. Note that the specification requires that the root namespace be used // when __namespace is defined but does not require that it be the root for allnamespaces. That // is a hole is the spec, not in our code. namespaceNames.append("root"); Uint32 start = 0; Uint32 end = namespaceNames.size(); do { // for all new elements in the output array for (Uint32 range = start; range < end; range ++) { // Get the next increment in naming for all a name element in the array Array<CIMInstance> instances = client->enumerateInstances(namespaceNames[range], className); for (Uint32 i = 0 ; i < instances.size(); i++) { Uint32 pos; // if we find the property and it is a string, use it. if ((pos = instances[i].findProperty("name")) != PEG_NOT_FOUND) { CIMValue value; String namespaceComponent; value = instances[i].getProperty(pos).getValue(); if (value.getType() == CIMTYPE_STRING) { value.get(namespaceComponent); String ns = namespaceNames[range].getString(); ns.append("/"); ns.append(namespaceComponent); namespaceNames.append(ns); } } } start = end; end = namespaceNames.size(); } } while (start != end); // Validate that all of the returned entities are really namespaces. It is legal for us to // have an name component that is really not a namespace (ex. root/fred/john is a namespace // but root/fred is not. // There is no clearly defined test for this so we will simply try to get something, in this // case a wellknown assoication Array<CIMNamespaceName> returnNamespaces; for (Uint32 i = 0 ; i < namespaceNames.size() ; i++) { try { CIMQualifierDecl cimQualifierDecl; cimQualifierDecl = client->getQualifier(namespaceNames[i], "Association"); returnNamespaces.append(namespaceNames[i]); } catch(CIMException& e) { if (e.getCode() != CIM_ERR_INVALID_NAMESPACE) returnNamespaces.append(namespaceNames[i]); } } cout << returnNamespaces.size() << " namespaces " << " returned." << endl; for( Uint32 cnt = 0 ; cnt < returnNamespaces.size(); cnt++ ) { cout << returnNamespaces[cnt] << endl;; } // ATTN: The following code is probably no good. KS April 2003 // If conducting active test, try to create and delete a namespace. if(activeTest) { String testNamespace = uniqueID.append("_Namespace"); if(verboseTest) cout << "Conducting Create / Delete namespace test " << endl; // Build the instance name for __namespace CIMNamespaceName testNamespaceName = CIMNamespaceName (testNamespace); String instanceName = className.getString(); instanceName.append( ".Name=\""); instanceName.append(testNamespaceName.getString()); instanceName.append("\""); if(verboseTest) { cout << "Creating " << instanceName << endl; } //if(testNamespace) Add the test for existance code here ATTN //{ // instanceNames //} // Create the new instance CIMObjectPath newInstanceName; try { // Build the new instance CIMName name = "__NameSpace"; //CIMInstance newInstance(instanceName); CIMInstance newInstance(name); newInstance.addProperty(CIMProperty(CIMName ("name"), testNamespaceName.getString())); newInstanceName = client->createInstance(__NAMESPACE_NAMESPACE, newInstance); } catch(CIMException& e) { if (e.getCode() == CIM_ERR_ALREADY_EXISTS) { newInstanceName = CIMObjectPath(instanceName); } else { PEGASUS_STD(cerr) << "CIMException NameSpace Creation: " << e.getMessage() << " Creating " << instanceName << PEGASUS_STD(endl); return; } } catch(Exception& e) { PEGASUS_STD(cerr) << "Exception NameSpace Creation: " << e.getMessage() << PEGASUS_STD(endl); return; } // Now try getting the instance. try { client->getInstance(__NAMESPACE_NAMESPACE, newInstanceName); } catch(Exception& e) { PEGASUS_STD(cerr) << "Exception NameSpace getInstance: " << e.getMessage() << " Retrieving " << instanceName << PEGASUS_STD(endl); return; } // Now delete the namespace try { CIMObjectPath myReference(instanceName); if(verboseTest) cout << "Deleting namespace = " << instanceName << endl; client->deleteInstance(__NAMESPACE_NAMESPACE, myReference); } catch(Exception& e) { PEGASUS_STD(cerr) << "Exception NameSpace Deletion: " << e.getMessage() << " Deleting " << instanceName << PEGASUS_STD(endl); return; } } } static void TestEnumerateClassNames (CIMClient* client, Boolean activeTest, Boolean verboseTest, String uniqueID) { try { Boolean deepInheritance = true; CIMName className; Array<CIMName> classNames = client->enumerateClassNames( globalNamespace, className, deepInheritance); if (verboseTest) { for (Uint32 i = 0, n = classNames.size(); i < n; i++) cout << classNames[i] << endl; } cout << classNames.size() << " ClassNames" << endl; } catch(Exception& e) { cout << "Error NameSpace Enumeration:" << endl; cout << e.getMessage() << endl; } } static void TestGetClass(CIMClient* client, Boolean activeTest, Boolean verboseTest, String uniqueID) { CIMClass c = client->getClass( globalNamespace, CIMName ("CIM_ComputerSystem"), false, false, true); XmlWriter::printClassElement(c); } /* This is both an active and passive class test and so uses the activetest variable */ static void TestClassOperations(CIMClient* client, Boolean ActiveTest, Boolean verboseTest, String uniqueID) { // Name of Class to use in create/delete test String cimName = uniqueID.append("_").append("PEG_TestSubClass"); CIMName testClass(cimName); // NOte that this creates a subclass of ManagedElement so will fail if // if managedelement not intalled. //Test for class already existing Array<CIMName> classNames = client->enumerateClassNames( globalNamespace, CIMName ("CIM_ManagedElement"), false); if (ActiveTest) { if (verboseTest) { cout << "Test to create, modify and delete test class " << testClass << endl; } for (Uint32 i = 0; i < classNames.size(); i++) { if (classNames[i].equal(testClass)) try { client->deleteClass(globalNamespace, testClass); } catch (CIMException& e) { cout << "TestClass " << testClass << " delete failed " << e.getMessage() << endl; } } // CreateClass: CIMClass c1(testClass, CIMName ("CIM_ManagedElement")); c1.addProperty(CIMProperty(CIMName ("count"), Uint32(99))); c1.addProperty(CIMProperty(CIMName ("ratio"), Real64(66.66))); c1.addProperty(CIMProperty(CIMName ("message"), String("Hello World"))); try { client->createClass(globalNamespace, c1); } catch (CIMException& e) { CIMStatusCode code = e.getCode(); if (code == CIM_ERR_ALREADY_EXISTS) cout << "TestClass " << testClass << " already exists during create " << endl; else { cout << "TestClass " << testClass << " create failed " << e.getMessage() << endl; return; } } // GetClass: CIMClass c2 = client->getClass(globalNamespace, testClass, true); if (!c1.identical(c2)) { cout << "Class SubClass Returned not equal to created" << endl; } // ATTN: This test should be uncommented when the repository implements // the localOnly flag. //assert(c1.identical(c2)); // Modify the class: c2.removeProperty(c2.findProperty(CIMName ("message"))); try { client->modifyClass(globalNamespace, c2); } catch (CIMException& e) { cout << "Testclass Modification failed " << e.getMessage() << endl; } // GetClass: CIMClass c3 = client->getClass(globalNamespace, testClass, true); if (!c3.identical(c2)) { cout << "Test Failed. Rtned class c3 not equal to c2" << endl; } //assert(c3.identical(c2)); // Determine if the new Class exists in Enumerate classNames = client->enumerateClassNames( globalNamespace, CIMName ("CIM_ManagedElement"), false); Boolean found = false; for (Uint32 i = 0; i < classNames.size(); i++) { if (classNames[i].equal(testClass)) found = true; } if (!found) { cout << "Test Class " << testClass << " Not found in enumeration " << endl; return; } //assert(found); // DeleteClass: try { client->deleteClass(globalNamespace, testClass); } catch (CIMException& e) { cout << "Testclass delete failed " << e.getMessage() << endl; return; } } // Get all the classes and compare enum names with enum classes from before classNames = client->enumerateClassNames(globalNamespace, CIMName(), false); Array<CIMClass> classDecls = client->enumerateClasses( globalNamespace, CIMName(), false, false, true, true); //assert(classDecls.size() == classNames.size()); if (classDecls.size() == classNames.size()) { cout << "Class total count before and after test. Before = " << classNames.size() << " after = " << classDecls.size() << endl; return; } for (Uint32 i = 0; i < classNames.size(); i++) { CIMClass tmp = client->getClass( globalNamespace, classNames[i], false, true, true); assert(classNames[i].equal(classDecls[i].getClassName())); assert(tmp.identical(classDecls[i])); } } static void TestQualifierOperations(CIMClient* client, Boolean activeTest, Boolean verboseTest, String uniqueID) { Array<CIMQualifierDecl> qualifierDecls = client->enumerateQualifiers(globalNamespace); if (verboseTest) { for (Uint32 i = 0; i < qualifierDecls.size(); i++) { cout << qualifierDecls[i].getName() << endl; } } cout << qualifierDecls.size() << " Qualifiers" <<endl; if (activeTest) { // create unique qualifiers String prefix = uniqueID; CIMName qd1_name = prefix.append("_Q1"); CIMName qd2_name = prefix.append("_Q2"); // Create two qualifier declarations: CIMQualifierDecl qd1(qd1_name, false, CIMScope::CLASS, CIMFlavor::TOSUBCLASS); client->setQualifier(globalNamespace, qd1); CIMQualifierDecl qd2(qd2_name, String("Hello"), CIMScope::PROPERTY + CIMScope::CLASS, CIMFlavor::OVERRIDABLE); client->setQualifier(globalNamespace, qd2); // Get them and compare: CIMQualifierDecl tmp1 = client->getQualifier(globalNamespace, qd1_name); assert(tmp1.identical(qd1)); CIMQualifierDecl tmp2 = client->getQualifier(globalNamespace, qd2_name); assert(tmp2.identical(qd2)); // Enumerate the qualifiers: Array<CIMQualifierDecl> qualifierDecls = client->enumerateQualifiers(globalNamespace); for (Uint32 i = 0; i < qualifierDecls.size(); i++) { CIMQualifierDecl tmp = qualifierDecls[i]; if (tmp.getName().equal(qd1_name)) assert(tmp1.identical(tmp)); if (tmp.getName().equal(qd2_name)) assert(tmp2.identical(tmp)); } // Delete the qualifiers: client->deleteQualifier(globalNamespace, qd1_name); client->deleteQualifier(globalNamespace, qd2_name); } } static void TestInstanceGetOperations(CIMClient* client, Boolean activeTest, Boolean verboseTest, String uniqueID) { // Get all instances // Get all classes //Array<CIMName> classNames = client.enumerateClassNames( // globalNamespace, "CIM_ManagedElement", false); Array<CIMName> classNames = client->enumerateClassNames( globalNamespace, CIMName(), true); cout << classNames.size() << " Classes found " << endl; Array<CIMObjectPath> instanceNames; Uint16 numberOfNotSupportedClassesFound = 0; for (Uint32 i = 0; i < classNames.size(); i++) { //if (classNames[i] == "PG_ShutdownService") //{ // // Skip the PG_ObjectManager class. It currently has no // // instance provider and no instances. //} //else //{ try { instanceNames = client->enumerateInstanceNames(globalNamespace,classNames[i]); if (instanceNames.size() > 0) cout << "Class " << classNames[i] << " " << instanceNames.size() << " Instances" << endl; } catch(CIMException& e) { if (e.getCode() == CIM_ERR_NOT_SUPPORTED) { numberOfNotSupportedClassesFound++; } else { cerr << "CIMException : " << classNames[i] << endl; cerr << e.getMessage() << endl; } } catch(Exception& e) { PEGASUS_STD(cerr) << "Error: " << e.getMessage() << PEGASUS_STD(endl); exit(1); } //} } if (numberOfNotSupportedClassesFound > 0) { cout << "Number of Not Supported Classes Found = " << numberOfNotSupportedClassesFound << endl; } /* virtual Array<CIMObjectPath> enumerateInstanceNames( const CIMNamespaceName& nameSpace, const CIMName& className) = 0; virtual Array<CIMInstance> enumerateInstances( const CIMNamespaceName& nameSpace, const CIMName& className, Boolean deepInheritance = true, Boolean localOnly = true, Boolean includeQualifiers = false, Boolean includeClassOrigin = false, */ } static void TestInstanceModifyOperations(CIMClient* client, Boolean activeTest, Boolean verboseTest, String uniqueID) { if (!activeTest) { cout << "InstanceModify bypassed because it modifies repository. Set active to execute." << endl; return; } // name of class to play with String classname = uniqueID.append("_").append("PEG_TEST_LocalCLASS"); CIMName className(classname); // Delete the class if it already exists: try { client->deleteClass(globalNamespace, className); } catch (Exception&) { // Ignore delete class! } // Create a new class: CIMClass cimClass(className); cimClass .addProperty(CIMProperty(CIMName ("last"), String()) .addQualifier(CIMQualifier(CIMName ("key"), true))) .addProperty(CIMProperty(CIMName ("first"), String()) .addQualifier(CIMQualifier(CIMName ("key"), true))) .addProperty(CIMProperty(CIMName ("age"), Uint32(0)) .addQualifier(CIMQualifier(CIMName ("key"), true))) .addProperty(CIMProperty(CIMName ("nick"), String()) .addQualifier(CIMQualifier(CIMName ("key"), false))); client->createClass(globalNamespace, cimClass); // Create an instance of that class: cout << "Create one Instance of class " << className << endl; CIMInstance cimInstance(className); cimInstance.addProperty(CIMProperty(CIMName ("last"), String("Smith"))); cimInstance.addProperty(CIMProperty(CIMName ("first"), String("John"))); cimInstance.addProperty(CIMProperty(CIMName ("age"), Uint32(1010))); cimInstance.addProperty(CIMProperty(CIMName ("nick"), String("Duke"))); CIMObjectPath instanceName = cimInstance.buildPath(cimClass); client->createInstance(globalNamespace, cimInstance); // Get the instance and compare with created one: //CIMObjectPath ref; //CIMObjectPath::instanceNameToReference(instanceName, ref); CIMInstance tmp = client->getInstance(globalNamespace, instanceName); // XmlWriter::printInstanceElement(cimInstance); // XmlWriter::printInstanceElement(tmp); // assert(cimInstance.identical(tmp)); // Test timeout methods const Uint32 TEST_TIMEOUT = 10000; Uint32 origTimeout = client->getTimeout(); client->setTimeout( TEST_TIMEOUT ); Uint32 newTimeout = client->getTimeout(); assert( newTimeout == TEST_TIMEOUT ); client->setTimeout( origTimeout ); // Test get/set property methods const String TESTPROPVAL = "JR"; const String TESTPROPVALNAME = "nick"; cout << "Set property " << endl; const CIMValue testPropVal = CIMValue( TESTPROPVAL ); client->setProperty( globalNamespace, instanceName, TESTPROPVALNAME, testPropVal ); cout << "Get property " << endl; CIMValue returnedPropVal = client->getProperty( globalNamespace, instanceName, TESTPROPVALNAME ); assert( returnedPropVal == testPropVal ); // Test modify instance client method // Change the "nick" property and compare. CIMInstance testInstance = client->getInstance(globalNamespace, instanceName); Uint32 propertyPos = testInstance.findProperty( TESTPROPVALNAME ); testInstance.removeProperty( propertyPos ); CIMProperty nickProperty = CIMProperty( TESTPROPVALNAME, String("Duke") ); nickProperty.setClassOrigin( className ); testInstance.addProperty( nickProperty ); testInstance.setPath (instanceName); client->modifyInstance( globalNamespace, testInstance ); CIMInstance currentInstance = client->getInstance( globalNamespace, instanceName ); currentInstance.setPath( instanceName ); //assert( currentInstance.identical( testInstance ) ); client->deleteInstance(globalNamespace, instanceName); // Repeat to create multiple instances Uint32 repeatCount = 30; Array<CIMObjectPath> instanceNames; cout << "Create " << repeatCount << " Instances" << endl; for (Uint32 i = 0; i < repeatCount; i++) { CIMInstance cimInstance(className); cimInstance.addProperty(CIMProperty(CIMName ("last"), String("Smith"))); cimInstance.addProperty(CIMProperty(CIMName ("first"), String("John"))); cimInstance.addProperty(CIMProperty(CIMName ("age"), Uint32(i))); instanceNames.append( cimInstance.buildPath(cimClass) ); client->createInstance(globalNamespace, cimInstance); } cout << "Delete the Instances " << endl; for (Uint32 i = 0; i < repeatCount; i++) { client->deleteInstance(globalNamespace,instanceNames[i]); } cout << "Delete the Class " << endl; client->deleteClass(globalNamespace,className); } /* testRefandAssoc - issues a set of reference and association calls for the input parameters. It does not capture exceptions */ static void testRefandAssoc(CIMClient* client, CIMNamespaceName& nameSpace, Boolean verboseTest, CIMObjectPath& objectName, CIMName assocClass, CIMName resultClass, String role = String::EMPTY, String resultRole = String::EMPTY) { Array<CIMObjectPath> result = client->referenceNames( nameSpace, objectName, resultClass, role); Array<CIMObject> resultObjects = client->references( nameSpace, objectName, resultClass, role); if (verboseTest) { cout << "Test references results for class: " << objectName.getClassName() << " returned " << result.size() << "reference names" << endl; } if (result.size() != resultObjects.size()) { cout << "ERROR, Reference and reference Name count difference" << endl; } for (Uint32 i = 0; i < resultObjects.size(); i++) { Uint32 matched=0; for (Uint32 j = 0; j < result.size(); j++) { if (resultObjects[i].getPath().toString() == result[j].toString()) { matched=1; result.remove(j); j--; break; } } if(matched) { resultObjects.remove(i); i--; } } for(Uint32 i=0;i<result.size(); i++) { cout << "ReferencesName response Error: " << resultObjects[i].getPath().toString() << " != " << result[i].toString() << endl; } Array<CIMObjectPath> assocResult = client->associatorNames( nameSpace, objectName, assocClass, resultClass, role, resultRole); Array<CIMObject> assocResultObjects = client->associators( nameSpace, objectName, assocClass, resultClass, role, resultRole); if (verboseTest) { cout << "Test associations results for class: " << objectName.getClassName() << " returned " << result.size() << "associator names" << endl; } if (assocResult.size() != assocResultObjects.size()) { cout << "ERROR, Associator and AssociatorName count returned different counts " << assocResult.size() << " associator name responses and " << assocResultObjects.size() << " associator objects " << endl; //#define LOCAL_MAX (a , b) (a > b) ? a : b ) // Uint32 maxCount = LOCAL_MAX(assocResult.size() ,assocResultObjects.size()); Uint32 maxCount = (assocResult.size() ,assocResultObjects.size() ) ? assocResult.size() : assocResultObjects.size(); cout << "Max " << maxCount << endl; for (Uint32 i = 0 ; i < maxCount ; i ++) { cout << i << " " << ((i < assocResult.size())? assocResult[i].toString() : "") << endl; cout << i << " " << ((i < assocResultObjects.size())? assocResultObjects[i].getPath().toString() : "") << endl; } return; } for (Uint32 i = 0; i < assocResultObjects.size(); i++) { Uint32 matched=0; for (Uint32 j = 0; j < assocResult.size(); j++) { if (assocResultObjects[i].getPath().toString() == assocResult[j].toString()) { matched=1; assocResult.remove(j); j--; break; } } if(matched) { assocResultObjects.remove(i); i--; } } for (Uint32 i = 0; i <assocResult.size(); i++) { cout << "Association Name response Error" << assocResultObjects[i].getPath().toString() << " != " << assocResult[i].toString() << endl; } } static void TestAssociationOperations(CIMClient* client, Boolean activeTest, Boolean verboseTest, String uniqueID) { CIMNamespaceName nameSpace = "test/TestProvider"; // If the sample provider class is loaded, this function tests the // association functions against the FamilyProvider Boolean runTest = true; // First test against known name in cim namespace. { CIMObjectPath o1("CIM_ManagedElement"); CIMObjectPath o2("CIM_ManagedElement.name=\"karl\""); testRefandAssoc(client, globalNamespace, verboseTest, o1, CIMName(), CIMName()); testRefandAssoc(client, globalNamespace, verboseTest, o2, CIMName(), CIMName()); } // Now Test to see if the namespace and class exist before // continueing the test. { CIMName className = "TST_Person"; try { client->getClass(nameSpace, className); } catch(CIMException& e) { if (e.getCode() == CIM_ERR_INVALID_NAMESPACE || e.getCode() == CIM_ERR_INVALID_CLASS) { runTest = false; } else { cerr << "CIMException : " << className << endl; cerr << e.getMessage() << endl; } } } if (runTest) { CIMObjectPath TST_PersonClass= CIMObjectPath("TST_Person"); CIMObjectPath TST_PersonInstance = CIMObjectPath( "TST_Person.name=\"Mike\""); CIMObjectPath TST_PersonDynamicClass = CIMObjectPath("TST_PersonDynamic"); CIMObjectPath TST_PersonDynamicInstance = CIMObjectPath( "TST_PersonDynamic.name=\"Father\""); testRefandAssoc(client, nameSpace, verboseTest, TST_PersonClass , CIMName(), CIMName()); testRefandAssoc(client, nameSpace, verboseTest, TST_PersonInstance , CIMName(), CIMName()); testRefandAssoc(client, nameSpace, verboseTest, TST_PersonDynamicClass , CIMName(), CIMName()); testRefandAssoc(client, nameSpace, verboseTest, TST_PersonDynamicInstance , CIMName(), CIMName()); } return; } /* Creates an instance with a method, executes the method and then deletes the instance Warning: This test works only as long as there is a provider, in this case, it goes to the repository and gets dropped on the floor. */ static void TestMethodOperations( CIMClient* client, Boolean activeTest, Boolean verboseTest, String uniqueID) { // Since the test modifies the repository, don't do it unless active set. if (!activeTest) return; String name = uniqueID.append("_").append("TestSoftwarePkg"); CIMName cimName(name); //Indication to be created CIMClass cimClass = client->getClass(globalNamespace, cimName, false); CIMInstance cimInstance(cimName); cimInstance.addProperty(CIMProperty(CIMName ("PkgName"), String("WBEM"))); cimInstance.addProperty(CIMProperty(CIMName ("PkgIndex"), Uint32(101))); cimInstance.addProperty(CIMProperty(CIMName ("trapOid"), String("1.3.6.1.4.1.11.2.3.1.7.0.4"))); cimInstance.addProperty(CIMProperty(CIMName ("computerName"), String("NU744781"))); CIMObjectPath instanceName = cimInstance.buildPath(cimClass); instanceName.setNameSpace(globalNamespace); client->createInstance(globalNamespace, cimInstance); try { Array<CIMParamValue> inParams; Array<CIMParamValue> outParams; inParams.append(CIMParamValue("param1", CIMValue(String("Hewlett-Packard")))); inParams.append(CIMParamValue("param2", CIMValue(String("California")))); Uint32 testRepeat = 100; for (Uint32 i = 0; i < testRepeat; i++) // repeat the test x time { CIMValue retValue = client->invokeMethod( globalNamespace, instanceName, CIMName ("ChangeName"), inParams, outParams); if (verboseTest) { cout << "Output : " << retValue.toString() << endl; for (Uint8 i = 0; i < outParams.size(); i++) cout << outParams[i].getParameterName() << " : " << outParams[i].getValue().toString() << endl; } } cout << "Executed " << testRepeat << " methods" << endl; } catch(Exception& e) { PEGASUS_STD(cerr) << "Error: " << e.getMessage() << PEGASUS_STD(endl); exit(1); } client->deleteInstance(globalNamespace, instanceName); } /* Tests the invoke method request via the sample method provider. */ static void TestInvokeMethod( CIMClient * client, Boolean activeTest, Boolean verboseTest, const String& uniqueID) { const CIMNamespaceName NAMESPACE = CIMNamespaceName("root/SampleProvider"); const CIMName classname = CIMName("Sample_MethodProviderClass"); const CIMName methodName = CIMName("SayHello"); const CIMObjectPath instanceName = CIMObjectPath( "Sample_MethodProviderClass.Identifier=1"); try { for (Uint32 testCases = 0; testCases < 3; testCases++) { Array<CIMParamValue> inParams; Array<CIMParamValue> outParams; CIMParamValue inParam; String goodReply; String goodOutParam; if (testCases == 0) { // Test case for a parameter with a non-empty value inParams.append( CIMParamValue("Name", CIMValue(String("Yoda")))); goodReply = "Hello, Yoda!"; goodOutParam = "From Neverland"; } else if (testCases == 1) { // Test case for a parameter with an empty value inParams.append(CIMParamValue("Name", CIMValue(String("")))); goodReply = "Hello"; goodOutParam = "From Neverland"; } else { // Test case for a parameter with a null value inParams.append( CIMParamValue("Name", CIMValue(CIMTYPE_STRING, false, 0))); goodReply = "Hello"; goodOutParam = "From Neverland"; } Uint32 testRepeat = 10; for (Uint32 i = 0; i < testRepeat; i++) // repeat the test x time { CIMValue retValue = client->invokeMethod( NAMESPACE, instanceName, methodName, inParams, outParams); if (verboseTest) { cout << "Output: " << retValue.toString() << endl; for (Uint32 i = 0; i < outParams.size(); i++) { cout << outParams[i].getParameterName() << ": " << outParams[i].getValue().toString() << endl; } } assert(retValue.toString() == goodReply); assert(outParams.size() == 1); String outParam = String::EMPTY; outParams[0].getValue().get(outParam); assert(outParam == goodOutParam); } cout << "Executed " << testRepeat << " methods" << endl; } } catch(Exception& e) { PEGASUS_STD(cerr) << "Error: " << e.getMessage() << PEGASUS_STD(endl); exit(1); } } /* Tests the enumerate instances from the sample instance provider. */ static void TestEnumerateInstances( CIMClient * client, Boolean activeTest, Boolean verboseTest, String uniqueID ) { const CIMNamespaceName NAMESPACE("root/SampleProvider"); const CIMName CLASSNAME("Sample_InstanceProviderClass"); const CIMObjectPath INSTANCE0("Sample_InstanceProviderClass.Identifier=1"); const CIMObjectPath INSTANCE1("Sample_InstanceProviderClass.Identifier=2"); const CIMObjectPath INSTANCE2("Sample_InstanceProviderClass.Identifier=3"); try { const CIMName className = CLASSNAME; Boolean deepInheritance = true; Boolean localOnly = true; Boolean includeQualifiers = false; Boolean includeClassOrigin = false; Uint32 testRepeat = 10; Uint32 numberInstances; for (Uint32 i = 0; i < testRepeat; i++) // repeat the test x time { Array<CIMInstance> cimNInstances = client->enumerateInstances(NAMESPACE, className, deepInheritance, localOnly, includeQualifiers, includeClassOrigin ); cout << "Found " << cimNInstances.size() << " Instances of " << className << endl; //ASSERTTEMP(cimNInstances.size() == 3); numberInstances = cimNInstances.size(); for (Uint32 i = 0; i < cimNInstances.size(); i++) { CIMObjectPath instanceRef = cimNInstances[i].getPath(); if((instanceRef != INSTANCE0) && (instanceRef != INSTANCE1) && (instanceRef != INSTANCE2)) { PEGASUS_STD(cerr) << "Error: EnumInstances failed. Instance Name Error" << " Expected instance name = " << INSTANCE0.toString() << " or " << INSTANCE1.toString() << " or " << INSTANCE2.toString() << "received = " << instanceRef.toString() << PEGASUS_STD(endl); return; } } } cout << "Enumerate " << numberInstances << " instances " << testRepeat << " times" << endl; } catch(Exception& e) { PEGASUS_STD(cerr) << "Error: " << e.getMessage() << PEGASUS_STD(endl); return; } } static Boolean verifyCertificate(SSLCertificateInfo &certInfo) { //ATTN-NB-03-05132002: Add code to handle server certificate verification. return true; } /////////////////////////////////////////////////////////////// // OPTION MANAGEMENT /////////////////////////////////////////////////////////////// /** GetOptions function - This function defines the Options Table and sets up the options from that table using the option manager. const char* optionName; const char* defaultValue; int required; Option::Type type; char** domain; Uint32 domainSize; const char* commandLineOptionName; const char* optionHelpMessage; */ void GetOptions( OptionManager& om, int& argc, char** argv, const String& pegasusHome) { static struct OptionRow optionsTable[] = // optionname defaultvalue rqd type domain domainsize clname hlpmsg { {"active", "false", false, Option::BOOLEAN, 0, 0, "a", "If set allows test that modify the repository" }, {"repeat", "1", false, Option::WHOLE_NUMBER, 0, 0, "r", "Specifies a Repeat Count Entire test repeated this many times" }, {"namespace", "root/cimv2", false, Option::STRING, 0, 0, "-n", "specifies namespace to use for test" }, {"version", "false", false, Option::BOOLEAN, 0, 0, "version", "Displays TestClient Version "}, {"verbose", "false", false, Option::BOOLEAN, 0, 0, "verbose", "If set, outputs extra information "}, {"help", "false", false, Option::BOOLEAN, 0, 0, "h", "Prints help message with command line options "}, {"debug", "false", false, Option::BOOLEAN, 0, 0, "d", "Not Used "}, // remove slp {"slp", "false", false, Option::BOOLEAN, 0, 0, "slp", // "use SLP to find cim servers to test"}, {"ssl", "false", false, Option::BOOLEAN, 0, 0, "ssl", "use SSL"}, {"local", "false", false, Option::BOOLEAN, 0, 0, "local", "Use local connection mechanism"}, {"user", "", false, Option::STRING, 0, 0, "user", "Specifies user name" }, {"password", "", false, Option::STRING, 0, 0, "password", "Specifies password" }, {"simultaneous", "1", false, Option::WHOLE_NUMBER, 0, 0, "t", "Number of simultaneous client threads" }, {"timeout","30000", false, Option::WHOLE_NUMBER, 0, 0, "to", "Client connection timeout value" } }; const Uint32 NUM_OPTIONS = sizeof(optionsTable) / sizeof(optionsTable[0]); om.registerOptions(optionsTable, NUM_OPTIONS); String configFile = pegasusHome + "/cimserver.conf"; cout << "Config file from " << configFile << endl; if (FileSystem::exists(configFile)) om.mergeFile(configFile); om.mergeCommandLine(argc, argv); om.checkRequiredOptions(); } PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL executeTests(void *parm){ Thread *my_thread = (Thread *)parm; T_Parms *parms = (T_Parms *)my_thread->get_parm(); CIMClient *client = parms->client.get(); Uint32 testCount = parms->testCount; Boolean verboseTest = parms->verboseTest == 0 ? false : true; Boolean activeTest = parms->activeTest == 0 ? false : true; int id = parms->uniqueID; char id_[4]; memset(id_,0x00,sizeof(id_)); sprintf(id_,"%i",id); String uniqueID = "_"; uniqueID.append(id_); for(Uint32 i=0; i<testCount; i++){ try{ Stopwatch elapsedTime; testStart("Test NameSpace Operations"); elapsedTime.reset(); elapsedTime.start(); TestNameSpaceOperations(client, activeTest, verboseTest, uniqueID); elapsedTime.stop(); testEnd(elapsedTime.getElapsed()); testStart("Test Qualifier Operations"); elapsedTime.reset(); elapsedTime.start(); TestQualifierOperations(client,activeTest,verboseTest, uniqueID); elapsedTime.stop(); testEnd(elapsedTime.getElapsed()); testStart("Test EnumerateClassNames"); elapsedTime.reset(); elapsedTime.start(); TestEnumerateClassNames(client,activeTest,verboseTest, uniqueID); elapsedTime.stop(); testEnd(elapsedTime.getElapsed()); testStart("Test Class Operations"); elapsedTime.reset(); elapsedTime.start(); TestClassOperations(client,activeTest,verboseTest, uniqueID); elapsedTime.stop(); testEnd(elapsedTime.getElapsed()); testStart("Test Instance Get Operations"); elapsedTime.reset(); elapsedTime.start(); TestInstanceGetOperations(client,activeTest,verboseTest, uniqueID); elapsedTime.stop(); testEnd(elapsedTime.getElapsed()); testStart("Test Instance Modification Operations"); elapsedTime.reset(); elapsedTime.start(); TestInstanceModifyOperations(client, activeTest, verboseTest, uniqueID); elapsedTime.stop(); testEnd(elapsedTime.getElapsed()); testStart("Test Associations"); elapsedTime.reset(); elapsedTime.start(); TestAssociationOperations(client, activeTest, verboseTest, uniqueID); elapsedTime.stop(); testEnd(elapsedTime.getElapsed()); /* Turn this one off until we get valid method to execute testStart("Test Method Execution"); elapsedTime.reset(); elapsedTime.start(); TestMethodOperations(client, activeTest, verboseTest, uniqueID); elapsedTime.stop(); testEnd(elapsedTime.getElapsed()); */ testStart("Test Invoke Method Execution"); elapsedTime.reset(); elapsedTime.start(); TestInvokeMethod(client, activeTest, verboseTest, uniqueID); elapsedTime.stop(); testEnd(elapsedTime.getElapsed()); testStart("Test Enumerate Instances Execution"); elapsedTime.reset(); elapsedTime.start(); TestEnumerateInstances(client, activeTest, verboseTest, uniqueID); elapsedTime.stop(); testEnd(elapsedTime.getElapsed()); }catch(Exception e){ cout << e.getMessage() << endl; } } my_thread->exit_self((PEGASUS_THREAD_RETURN)5); return(0); } Thread * runTests(CIMClient *client, Uint32 testCount, Boolean activeTest, Boolean verboseTest, int uniqueID){ // package parameters, create thread and run... AutoPtr<T_Parms> parms(new T_Parms()); parms->client.reset(client); parms->testCount = testCount; parms->activeTest = (activeTest) ? 1 : 0; parms->verboseTest = (verboseTest) ? 1 : 0; parms->uniqueID = uniqueID; AutoPtr<Thread> t(new Thread(executeTests, (void*)parms.release(), false)); // zzzzz... (1 second) zzzzz... pegasus_sleep(1000); t->run(); return t.release(); } void connectClient( CIMClient *client, String host, Uint32 portNumber, String userName, String password, Boolean useSSL, Boolean localConnection, Uint32 timeout) { try { client->setTimeout(timeout); if (useSSL) { if (localConnection) { cout << "Using local connection mechanism " << endl; client->connectLocal(); } else { // // Get environment variables: // const char* pegasusHome = getenv("PEGASUS_HOME"); String trustpath = FileSystem::getAbsolutePath( pegasusHome, PEGASUS_SSLCLIENT_CERTIFICATEFILE); String randFile = String::EMPTY; #ifdef PEGASUS_SSL_RANDOMFILE randFile = FileSystem::getAbsolutePath( pegasusHome, PEGASUS_SSLCLIENT_RANDOMFILE); #endif SSLContext sslcontext( trustpath, verifyCertificate, randFile); cout << "connecting to " << host << ":" << portNumber << " using SSL" << endl; client->connect (host, portNumber, sslcontext, userName, password); } } // useSSL else { if (localConnection) { cout << "Using local connection mechanism " << endl; client->connectLocal(); } else { cout << "Connecting to " << host << ":" << portNumber << endl; client->connect (host, portNumber, userName, password); } } cout << "Client Connected" << endl; } catch(Exception& e) { PEGASUS_STD(cerr) << "Error: " << e.getMessage() << PEGASUS_STD(endl); exit(1); } } /////////////////////////////////////////////////////////////// // MAIN /////////////////////////////////////////////////////////////// int main(int argc, char** argv) { // char connection[50] = "localhost:5988"; char *address_string = NULL; Uint32 repetitions = 1; // Get environment variables: String pegasusHome; pegasusHome = "/"; // GetEnvironmentVariables(argv[0], pegasusHome); // Get options (from command line and from configuration file); this // removes corresponding options and their arguments fromt he command // line. // Get options (from command line and from configuration file); this // removes corresponding options and their arguments fromt he command // line. OptionManager om; try { GetOptions(om, argc, argv, pegasusHome); } catch (Exception& e) { cerr << argv[0] << ": " << e.getMessage() << endl; exit(1); } // Check to see if user asked for help (-h otpion): if (om.valueEquals("help", "true")) { String header = "Usage "; header.append(argv[0]); header.append(" -parameters host [host]"); String trailer = "Assumes localhost:5988 if host not specified"; trailer.append("\nHost may be of the form name or name:port"); trailer.append("\nPort 5988 assumed if port number missing."); om.printOptionsHelpTxt(header, trailer); exit(0); } if (om.valueEquals("version","true")) { cout << argv[0] << " version " <<programVersion << endl; //cout << argv[0] << endl; exit(0); } String tmp; om.lookupValue("namespace", tmp); CIMNamespaceName localNameSpace = CIMNamespaceName (tmp); globalNamespace = localNameSpace; cout << "Namespace = " << localNameSpace << endl; Boolean verboseTest = om.isTrue("verbose"); // Set up number of test repetitions. Will repeat entire test this number of times // Default is zero // String repeats; Uint32 repeatTestCount = 0; /* ATTN: KS P0 Test and fix function added to Option Manager */ if (!om.lookupIntegerValue("repeat", repeatTestCount)) repeatTestCount = 1; if(verboseTest) cout << "Test repeat count " << repeatTestCount << endl; // Setup the active test flag. Determines if we change repository. Boolean activeTest = false; if (om.valueEquals("active", "true")) activeTest = true; String userName; om.lookupValue("user", userName); if (userName != String::EMPTY) { cout << "Username = " << userName << endl; } String password; om.lookupValue("password", password); if (password != String::EMPTY) { cout << "password = " << password << endl; } Boolean useSLP = false; Boolean localConnection = (om.valueEquals("local", "true"))? true: false; Boolean useSSL = om.isTrue("ssl"); Array<String> connectionList; if (argc > 1 && !localConnection) for (Sint32 i = 1; i < argc; i++) connectionList.append(argv[i]); // setup default connection definitions if needed if (useSSL) connectionList.append("localhost:5989"); else if(useSLP == false && argc < 2) connectionList.append("localhost:5988"); // timeout Uint32 timeout = 30000; om.lookupIntegerValue("timeout",timeout); // create clients Uint32 clients = 1; om.lookupIntegerValue("simultaneous",clients); String host; Uint32 portNumber; for (Uint32 i = 0; i < connectionList.size(); i++) { // ---------------------------------------- // * Get host and port number from hostport // ---------------------------------------- Uint32 index = connectionList[i].find (':'); host = connectionList[i].subString (0, index); portNumber = 0; if (index != PEG_NOT_FOUND) { String portStr = connectionList[i].subString(index + 1, connectionList[i].size ()); sscanf (portStr.getCString (), "%u", &portNumber); } Array<CIMClient*> clientConnections; CIMClient* client; for(Uint32 i = 0; i < clients; i++) { client = new CIMClient(); clientConnections.append(client); } // connect the clients for(Uint32 i=0; i<clients; i++) { connectClient(clientConnections[i], host, portNumber, userName, password, useSSL, localConnection, timeout); } // run tests Array<Thread *> clientThreads; Stopwatch elapsedTime; testStart("Begin tests..."); elapsedTime.reset(); elapsedTime.start(); for(Uint32 i=0; i< clientConnections.size(); i++) { clientThreads.append(runTests(clientConnections[i], repeatTestCount, activeTest, verboseTest, i)); } elapsedTime.stop(); testEnd(elapsedTime.getElapsed()); for(Uint32 i=0; i< clientThreads.size(); i++) { clientThreads[i]->join(); } // clean up for(Uint32 i=0; i< clientConnections.size(); i++){ if(clientConnections[i]) delete clientConnections[i]; } for(Uint32 i=0; i < clientThreads.size(); i++){ if(clientThreads[i]) delete clientThreads[i]; } } PEGASUS_STD(cout) << "+++++ "<< argv[0] << " Terminated Normally" << PEGASUS_STD(endl); exit(0); //return 0; this line cause segmentation fault on linux } /* TODO: 3. Make test loop tool 5. Make test multiple systems. 6. Get rid of diagnostics and clean display 7. Add correct successful at end 8. Make OO 9. Add associations test 10. Add cim references test. 11. Add test all namespaces test. */
// // CI Hello World // // Copyright (C) 2017 Assured Information Security, Inc. // Author: Rian Quinn <quinnr@ainfosec.com> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #define CATCH_CONFIG_MAIN #include <catch/catch.hpp>
// Copyright 2018 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <errno.h> #include <fcntl.h> #include <fuchsia/logger/llcpp/fidl.h> #include <lib/syslog/global.h> #include <lib/zx/socket.h> #include <poll.h> #include <stdlib.h> #include <unistd.h> #include <fbl/string_printf.h> #include <zxtest/zxtest.h> #include "zircon/system/ulib/syslog/helpers.h" namespace { const char* kFileName = syslog::internal::StripPath(__FILE__); const char* kFilePath = syslog::internal::StripDots(__FILE__); constexpr std::array<const char*, FX_LOG_MAX_TAGS + 1> kTooManyTags = {"1", "2", "3", "4", "5"}; bool ends_with(const char* str, const fbl::String& suffix) { size_t str_len = strlen(str); size_t suffix_len = suffix.size(); if (str_len < suffix_len) { return false; } str += str_len - suffix_len; return strcmp(str, suffix.c_str()) == 0; } static void smallest_unused_fd(int* fd) { char name[] = "/tmp/syslog_test.XXXXXX"; *fd = mkstemp(name); ASSERT_GT(*fd, -1); close(*fd); int status = remove(name); ASSERT_EQ(0, status); } } // namespace TEST(SyslogTests, test_log_init_with_socket) { zx::socket socket0, socket1; EXPECT_EQ(ZX_OK, zx::socket::create(0, &socket0, &socket1)); fx_logger_config_t config = {.min_severity = FX_LOG_INFO, .console_fd = -1, .log_sink_socket = socket1.release(), .tags = nullptr, .num_tags = 0}; EXPECT_EQ(ZX_OK, fx_log_reconfigure(&config), ""); } TEST(SyslogTests, test_log_enabled_macro) { zx::socket socket0, socket1; EXPECT_EQ(ZX_OK, zx::socket::create(0, &socket0, &socket1)); fx_logger_config_t config = {.min_severity = FX_LOG_INFO, .console_fd = -1, .log_sink_socket = socket1.release(), .tags = nullptr, .num_tags = 0}; EXPECT_EQ(ZX_OK, fx_log_reconfigure(&config), ""); if (FX_VLOG_IS_ENABLED(4)) { EXPECT_TRUE(false, "control should not reach this line"); } if (!FX_LOG_IS_ENABLED(INFO)) { EXPECT_TRUE(false, "control should not reach this line"); } if (!FX_LOG_IS_ENABLED(ERROR)) { EXPECT_TRUE(false, "control should not reach this line"); } } static inline zx_status_t init_helper(int fd, const char** tags, size_t ntags) { fx_logger_config_t config = {.min_severity = FX_LOG_INFO, .console_fd = fd, .log_sink_socket = ZX_HANDLE_INVALID, .tags = tags, .num_tags = ntags}; return fx_log_reconfigure(&config); } TEST(SyslogTests, test_log_simple_write) { int pipefd[2]; EXPECT_NE(pipe2(pipefd, O_NONBLOCK), -1, ""); EXPECT_EQ(ZX_OK, init_helper(pipefd[0], NULL, 0), ""); FX_LOG(INFO, NULL, "test message"); char buf[256]; size_t n = read(pipefd[1], buf, sizeof(buf)); EXPECT_GT(n, 0u, ""); buf[n] = 0; EXPECT_TRUE(ends_with(buf, "test message\n"), "%s", buf); close(pipefd[1]); } TEST(SyslogTests, test_log_write) { int pipefd[2]; EXPECT_NE(pipe2(pipefd, O_NONBLOCK), -1, ""); EXPECT_EQ(ZX_OK, init_helper(pipefd[0], NULL, 0), ""); int line = __LINE__ + 1; FX_LOGF(INFO, NULL, "%d, %s", 10, "just some number"); char buf[256]; size_t n = read(pipefd[1], buf, sizeof(buf)); EXPECT_GT(n, 0u, ""); buf[n] = 0; EXPECT_TRUE( ends_with(buf, fbl::StringPrintf("INFO: [%s(%d)] 10, just some number\n", kFileName, line)), "%s", buf); close(pipefd[1]); } TEST(SyslogTests, test_log_preprocessed_message) { int pipefd[2]; EXPECT_NE(pipe2(pipefd, O_NONBLOCK), -1, ""); EXPECT_EQ(ZX_OK, init_helper(pipefd[0], NULL, 0), ""); int line = __LINE__ + 1; FX_LOG(INFO, NULL, "%d, %s"); char buf[256]; size_t n = read(pipefd[1], buf, sizeof(buf)); EXPECT_GT(n, 0u, ""); buf[n] = 0; EXPECT_TRUE(ends_with(buf, fbl::StringPrintf("INFO: [%s(%d)] %%d, %%s\n", kFileName, line)), "%s", buf); close(pipefd[1]); } TEST(SyslogTests, test_log_severity) { struct pollfd fd; int pipefd[2]; EXPECT_NE(pipe2(pipefd, O_NONBLOCK), -1, ""); EXPECT_EQ(ZX_OK, init_helper(pipefd[0], NULL, 0), ""); FX_LOG_SET_SEVERITY(WARNING); FX_LOGF(INFO, NULL, "%d, %s", 10, "just some number"); fd.fd = pipefd[1]; fd.events = POLLIN; EXPECT_EQ(poll(&fd, 1, 1), 0, ""); close(pipefd[1]); } TEST(SyslogTests, test_log_severity_invalid) { int pipefd[2]; EXPECT_NE(pipe2(pipefd, O_NONBLOCK), -1, ""); EXPECT_EQ(ZX_OK, init_helper(pipefd[0], NULL, 0), ""); fx_logger_t* logger = fx_log_get_logger(); EXPECT_EQ(FX_LOG_INFO, fx_logger_get_min_severity(logger)); EXPECT_EQ(ZX_ERR_INVALID_ARGS, fx_logger_set_min_severity(logger, FX_LOG_FATAL + 1)); EXPECT_EQ(FX_LOG_INFO, fx_logger_get_min_severity(logger)); } TEST(SyslogTests, test_log_write_with_tag) { int pipefd[2]; EXPECT_NE(pipe2(pipefd, O_NONBLOCK), -1, ""); EXPECT_EQ(ZX_OK, init_helper(pipefd[0], NULL, 0), ""); int line = __LINE__ + 1; FX_LOGF(INFO, "tag", "%d, %s", 10, "just some string"); char buf[256]; size_t n = read(pipefd[1], buf, sizeof(buf)); EXPECT_GT(n, 0u, ""); buf[n] = 0; EXPECT_TRUE(ends_with(buf, fbl::StringPrintf("[tag] INFO: [%s(%d)] 10, just some string\n", kFileName, line)), "%s", buf); close(pipefd[1]); } TEST(SyslogTests, test_log_write_with_global_tag) { int pipefd[2]; EXPECT_NE(pipe2(pipefd, O_NONBLOCK), -1, ""); const char* tags[] = {"gtag"}; EXPECT_EQ(ZX_OK, init_helper(pipefd[0], tags, 1), ""); int line = __LINE__ + 1; FX_LOGF(INFO, "tag", "%d, %s", 10, "just some string"); char buf[256]; size_t n = read(pipefd[1], buf, sizeof(buf)); EXPECT_GT(n, 0u, ""); buf[n] = 0; EXPECT_TRUE(ends_with(buf, fbl::StringPrintf("[gtag, tag] INFO: [%s(%d)] 10, just some string\n", kFileName, line)), "%s", buf); close(pipefd[1]); } TEST(SyslogTests, test_log_write_with_multi_global_tag) { int pipefd[2]; EXPECT_NE(pipe2(pipefd, O_NONBLOCK), -1, ""); const char* tags[] = {"gtag", "gtag2"}; EXPECT_EQ(ZX_OK, init_helper(pipefd[0], tags, 2), ""); int line = __LINE__ + 1; FX_LOGF(INFO, "tag", "%d, %s", 10, "just some string"); char buf[256]; size_t n = read(pipefd[1], buf, sizeof(buf)); EXPECT_GT(n, 0u, ""); buf[n] = 0; EXPECT_TRUE( ends_with(buf, fbl::StringPrintf("[gtag, gtag2, tag] INFO: [%s(%d)] 10, just some string\n", kFileName, line)), "%s", buf); close(pipefd[1]); } TEST(SyslogTestsEdgeCases, test_global_tag_limit) { EXPECT_NE(ZX_OK, init_helper(-1, NULL, FX_LOG_MAX_TAGS + 1), ""); } TEST(SyslogTestsEdgeCases, test_msg_length_limit) { constexpr size_t kMessageSize = llcpp::fuchsia::logger::MAX_DATAGRAM_LEN_BYTES + 5; int pipefd[2]; EXPECT_NE(pipe2(pipefd, O_NONBLOCK), -1, ""); EXPECT_EQ(ZX_OK, init_helper(pipefd[0], NULL, 0), ""); char msg[kMessageSize] = {0}; char buf[kMessageSize] = {0}; memset(msg, 'a', sizeof(msg) - 1); FX_LOGF(INFO, NULL, "%s", msg); size_t n = read(pipefd[1], buf, sizeof(buf)); EXPECT_GT(n, 0u, ""); msg[n] = 0; EXPECT_TRUE(ends_with(buf, "a...\n"), "%s", buf); msg[0] = '%'; msg[1] = 's'; FX_LOG(INFO, NULL, msg); n = read(pipefd[1], buf, sizeof(buf)); EXPECT_GT(n, 0u, ""); msg[n] = 0; EXPECT_TRUE(ends_with(buf, "a...\n"), "%s", buf); close(pipefd[1]); } TEST(SyslogTests, test_vlog_simple_write) { int pipefd[2]; EXPECT_NE(pipe2(pipefd, O_NONBLOCK), -1, ""); EXPECT_EQ(ZX_OK, init_helper(pipefd[0], NULL, 0), ""); FX_LOG_SET_VERBOSITY(5); // INFO - 5 int line = __LINE__ + 1; FX_VLOG(5, NULL, "test message"); char buf[256]; size_t n = read(pipefd[1], buf, sizeof(buf)); EXPECT_GT(n, 0u, ""); buf[n] = 0; EXPECT_TRUE( ends_with(buf, fbl::StringPrintf("VLOG(5): [%s(%d)] test message\n", kFileName, line)), "%s", buf); close(pipefd[1]); } TEST(SyslogTests, test_vlog_write) { int pipefd[2]; EXPECT_NE(pipe2(pipefd, O_NONBLOCK), -1, ""); EXPECT_EQ(ZX_OK, init_helper(pipefd[0], NULL, 0), ""); FX_LOG_SET_VERBOSITY(1); // INFO - 1 int line = __LINE__ + 1; FX_VLOGF(1, NULL, "%d, %s", 10, "just some number"); char buf[256]; size_t n = read(pipefd[1], buf, sizeof(buf)); EXPECT_GT(n, 0u, ""); buf[n] = 0; EXPECT_TRUE(ends_with(buf, fbl::StringPrintf("VLOG(1): [%s(%d)] 10, just some number\n", kFileName, line)), "%s", buf); close(pipefd[1]); } TEST(SyslogTests, test_log_reconfiguration) { // Initialize with no tags. int pipefd[2]; EXPECT_NE(pipe2(pipefd, O_NONBLOCK), -1, ""); EXPECT_EQ(ZX_OK, init_helper(pipefd[0], NULL, 0), ""); int line = __LINE__ + 1; FX_LOG(INFO, NULL, "Hi"); char buf[256]; size_t n = read(pipefd[1], buf, sizeof(buf)); EXPECT_GT(n, 0u, ""); buf[n] = 0; EXPECT_TRUE(ends_with(buf, fbl::StringPrintf("INFO: [%s(%d)] Hi\n", kFileName, line)), "%s", buf); // Now reconfigure the logger and add tags. const char* tags[] = {"tag1", "tag2"}; EXPECT_EQ(ZX_OK, init_helper(-1, tags, 2), ""); line = __LINE__ + 1; FX_LOG(INFO, NULL, "Hi"); n = read(pipefd[1], buf, sizeof(buf)); EXPECT_GT(n, 0u, ""); buf[n] = 0; EXPECT_TRUE( ends_with(buf, fbl::StringPrintf("[tag1, tag2] INFO: [%s(%d)] Hi\n", kFileName, line)), "%s", buf); close(pipefd[1]); } TEST(SyslogTests, test_log_dont_dup) { // Remember the current lowest ununsed fd. int fd_before; ASSERT_NO_FATAL_FAILURES(smallest_unused_fd(&fd_before)); // Create a logger fx_logger_t* logger; zx_status_t status; fx_logger_config_t config = {.min_severity = FX_LOG_INFO, .console_fd = -1, .log_sink_socket = ZX_HANDLE_INVALID, .tags = nullptr, .num_tags = 0}; status = fx_logger_create(&config, &logger); ASSERT_EQ(ZX_OK, status); // No fd must be taken by the logger. int fd_after; ASSERT_NO_FATAL_FAILURES(smallest_unused_fd(&fd_after)); EXPECT_EQ(fd_before, fd_after); // Cleanup fx_logger_destroy(logger); } TEST(SyslogTests, test_fx_logger_create_with_null_config) { fx_logger_t* logger; EXPECT_EQ(ZX_ERR_INVALID_ARGS, fx_logger_create(nullptr, &logger)); } TEST(SyslogTests, test_fx_logger_create_with_null_output_pointer) { fx_logger_config_t config = {.min_severity = FX_LOG_INFO, .console_fd = -1, .log_sink_socket = ZX_HANDLE_INVALID, .tags = nullptr, .num_tags = 0}; EXPECT_EQ(ZX_ERR_INVALID_ARGS, fx_logger_create(&config, nullptr)); } TEST(SyslogTests, test_fx_logger_reconfigure_with_null_config) { // Create a logger fx_logger_t* logger; fx_logger_config_t config = {.min_severity = FX_LOG_INFO, .console_fd = -1, .log_sink_socket = ZX_HANDLE_INVALID, .tags = nullptr, .num_tags = 0}; ASSERT_EQ(ZX_OK, fx_logger_create(&config, &logger)); EXPECT_EQ(ZX_ERR_INVALID_ARGS, fx_logger_reconfigure(logger, nullptr)); fx_logger_destroy(logger); } TEST(SyslogTests, test_log_sink_channel_closed_on_create_fail) { EXPECT_LT(FX_LOG_MAX_TAGS, kTooManyTags.size()); zx::socket local, remote; EXPECT_EQ(ZX_OK, zx::socket::create(ZX_SOCKET_DATAGRAM, &local, &remote)); const zx_handle_t passed_handle = remote.release(); fx_logger_config_t config = {.min_severity = FX_LOG_INFO, .console_fd = -1, .log_sink_channel = passed_handle, .log_sink_socket = ZX_HANDLE_INVALID, .tags = kTooManyTags.data(), .num_tags = kTooManyTags.size()}; // This should fail because there are too many tags, and closing the // handle should fail because it is already closed. fx_logger_t* logger; EXPECT_EQ(ZX_ERR_INVALID_ARGS, fx_logger_create(&config, &logger)); EXPECT_NE(ZX_HANDLE_INVALID, passed_handle); EXPECT_EQ(ZX_ERR_BAD_HANDLE, zx_handle_close(passed_handle)); } TEST(SyslogTests, test_log_sink_socket_closed_on_create_fail) { EXPECT_LT(FX_LOG_MAX_TAGS, kTooManyTags.size()); zx::socket local, remote; EXPECT_EQ(ZX_OK, zx::socket::create(ZX_SOCKET_DATAGRAM, &local, &remote)); const zx_handle_t passed_handle = remote.release(); fx_logger_config_t config = {.min_severity = FX_LOG_INFO, .console_fd = -1, .log_sink_channel = ZX_HANDLE_INVALID, .log_sink_socket = passed_handle, .tags = kTooManyTags.data(), .num_tags = kTooManyTags.size()}; // This should fail because there are too many tags, and closing the // handle should fail because it is already closed. fx_logger_t* logger; EXPECT_EQ(ZX_ERR_INVALID_ARGS, fx_logger_create(&config, &logger)); EXPECT_NE(ZX_HANDLE_INVALID, passed_handle); EXPECT_EQ(ZX_ERR_BAD_HANDLE, zx_handle_close(passed_handle)); } TEST(SyslogTests, test_both_handles_specified_fails_create_and_handles_closed) { zx::socket local, remote; EXPECT_EQ(ZX_OK, zx::socket::create(ZX_SOCKET_DATAGRAM, &local, &remote)); const zx_handle_t passed_log_sink_channel = local.release(); const zx_handle_t passed_log_sink_socket = remote.release(); fx_logger_config_t config = {.min_severity = FX_LOG_INFO, .console_fd = -1, .log_sink_channel = passed_log_sink_channel, .log_sink_socket = passed_log_sink_socket, .tags = nullptr, .num_tags = 0}; // This should fail because both handles were specified, and closing the // handle should fail because it is already closed. fx_logger_t* logger; EXPECT_EQ(ZX_ERR_INVALID_ARGS, fx_logger_create(&config, &logger)); EXPECT_NE(ZX_HANDLE_INVALID, passed_log_sink_channel); EXPECT_EQ(ZX_ERR_BAD_HANDLE, zx_handle_close(passed_log_sink_channel)); EXPECT_NE(ZX_HANDLE_INVALID, passed_log_sink_socket); EXPECT_EQ(ZX_ERR_BAD_HANDLE, zx_handle_close(passed_log_sink_socket)); } TEST(SyslogTests, test_log_sink_channel_closed_on_reconfigure_fail) { EXPECT_LT(FX_LOG_MAX_TAGS, kTooManyTags.size()); zx::socket local, remote; EXPECT_EQ(ZX_OK, zx::socket::create(ZX_SOCKET_DATAGRAM, &local, &remote)); const zx_handle_t passed_handle = remote.release(); fx_logger_config_t config = {.min_severity = FX_LOG_INFO, .console_fd = -1, .log_sink_channel = passed_handle, .log_sink_socket = ZX_HANDLE_INVALID, .tags = kTooManyTags.data(), .num_tags = kTooManyTags.size()}; // This should fail because there are too many tags, and closing the // handle should fail because it is already closed. EXPECT_EQ(ZX_ERR_INVALID_ARGS, fx_log_reconfigure(&config)); EXPECT_NE(ZX_HANDLE_INVALID, passed_handle); EXPECT_EQ(ZX_ERR_BAD_HANDLE, zx_handle_close(passed_handle)); } TEST(SyslogTests, test_log_sink_socket_closed_on_reconfigure_fail) { EXPECT_LT(FX_LOG_MAX_TAGS, kTooManyTags.size()); zx::socket local, remote; EXPECT_EQ(ZX_OK, zx::socket::create(ZX_SOCKET_DATAGRAM, &local, &remote)); const zx_handle_t passed_handle = remote.release(); fx_logger_config_t config = {.min_severity = FX_LOG_INFO, .console_fd = -1, .log_sink_channel = ZX_HANDLE_INVALID, .log_sink_socket = passed_handle, .tags = kTooManyTags.data(), .num_tags = kTooManyTags.size()}; // This should fail because there are too many tags, and closing the // handle should fail because it is already closed. EXPECT_EQ(ZX_ERR_INVALID_ARGS, fx_log_reconfigure(&config)); EXPECT_NE(ZX_HANDLE_INVALID, passed_handle); EXPECT_EQ(ZX_ERR_BAD_HANDLE, zx_handle_close(passed_handle)); } TEST(SyslogTests, test_both_handles_specified_fails_reconfigure_and_handles_closed) { zx::socket local, remote; EXPECT_EQ(ZX_OK, zx::socket::create(ZX_SOCKET_DATAGRAM, &local, &remote)); const zx_handle_t passed_log_sink_channel = local.release(); const zx_handle_t passed_log_sink_socket = remote.release(); fx_logger_config_t config = {.min_severity = FX_LOG_INFO, .console_fd = -1, .log_sink_channel = passed_log_sink_channel, .log_sink_socket = passed_log_sink_socket, .tags = nullptr, .num_tags = 0}; // This should fail because both handles were specified, and closing the // handle should fail because it is already closed. EXPECT_EQ(ZX_ERR_INVALID_ARGS, fx_log_reconfigure(&config)); EXPECT_NE(ZX_HANDLE_INVALID, passed_log_sink_channel); EXPECT_EQ(ZX_ERR_BAD_HANDLE, zx_handle_close(passed_log_sink_channel)); EXPECT_NE(ZX_HANDLE_INVALID, passed_log_sink_socket); EXPECT_EQ(ZX_ERR_BAD_HANDLE, zx_handle_close(passed_log_sink_socket)); } #ifdef SYSLOG_STATIC TEST(SyslogTests, test_create_with_log_sink_channel_not_supported) { zx::socket local, remote; EXPECT_EQ(ZX_OK, zx::socket::create(ZX_SOCKET_DATAGRAM, &local, &remote)); const zx_handle_t passed_handle = remote.release(); fx_logger_config_t config = {.min_severity = FX_LOG_INFO, .console_fd = -1, .log_sink_channel = passed_handle, .log_sink_socket = ZX_HANDLE_INVALID, .tags = nullptr, .num_tags = 0}; // This should fail because log_sink_channel is not supported, and closing the // handle should fail because it is already closed. fx_logger_t* logger; EXPECT_EQ(ZX_ERR_INVALID_ARGS, fx_logger_create(&config, &logger)); EXPECT_NE(ZX_HANDLE_INVALID, passed_handle); EXPECT_EQ(ZX_ERR_BAD_HANDLE, zx_handle_close(passed_handle)); } TEST(SyslogTests, test_reconfigure_with_log_sink_channel_not_supported) { zx::socket local, remote; EXPECT_EQ(ZX_OK, zx::socket::create(ZX_SOCKET_DATAGRAM, &local, &remote)); const zx_handle_t passed_handle = remote.release(); fx_logger_config_t config = {.min_severity = FX_LOG_INFO, .console_fd = -1, .log_sink_channel = passed_handle, .log_sink_socket = ZX_HANDLE_INVALID, .tags = nullptr, .num_tags = 0}; // This should fail because log_sink_channel is not supported, and closing the // handle should fail because it is already closed. EXPECT_EQ(ZX_ERR_INVALID_ARGS, fx_log_reconfigure(&config)); EXPECT_NE(ZX_HANDLE_INVALID, passed_handle); EXPECT_EQ(ZX_ERR_BAD_HANDLE, zx_handle_close(passed_handle)); } #endif
/* * Copyright 2009-2017 Alibaba Cloud 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 <alibabacloud/rtc/model/DescribeRecordTasksRequest.h> using AlibabaCloud::Rtc::Model::DescribeRecordTasksRequest; DescribeRecordTasksRequest::DescribeRecordTasksRequest() : RpcServiceRequest("rtc", "2018-01-11", "DescribeRecordTasks") { setMethod(HttpRequest::Method::Post); } DescribeRecordTasksRequest::~DescribeRecordTasksRequest() {} std::string DescribeRecordTasksRequest::getStartTime()const { return startTime_; } void DescribeRecordTasksRequest::setStartTime(const std::string& startTime) { startTime_ = startTime; setParameter("StartTime", startTime); } std::vector<std::string> DescribeRecordTasksRequest::getTaskIds()const { return taskIds_; } void DescribeRecordTasksRequest::setTaskIds(const std::vector<std::string>& taskIds) { taskIds_ = taskIds; for(int dep1 = 0; dep1!= taskIds.size(); dep1++) { setParameter("TaskIds."+ std::to_string(dep1), taskIds.at(dep1)); } } int DescribeRecordTasksRequest::getPageNum()const { return pageNum_; } void DescribeRecordTasksRequest::setPageNum(int pageNum) { pageNum_ = pageNum; setParameter("PageNum", std::to_string(pageNum)); } int DescribeRecordTasksRequest::getPageSize()const { return pageSize_; } void DescribeRecordTasksRequest::setPageSize(int pageSize) { pageSize_ = pageSize; setParameter("PageSize", std::to_string(pageSize)); } std::string DescribeRecordTasksRequest::getShowLog()const { return showLog_; } void DescribeRecordTasksRequest::setShowLog(const std::string& showLog) { showLog_ = showLog; setParameter("ShowLog", showLog); } std::string DescribeRecordTasksRequest::getEndTime()const { return endTime_; } void DescribeRecordTasksRequest::setEndTime(const std::string& endTime) { endTime_ = endTime; setParameter("EndTime", endTime); } long DescribeRecordTasksRequest::getOwnerId()const { return ownerId_; } void DescribeRecordTasksRequest::setOwnerId(long ownerId) { ownerId_ = ownerId; setParameter("OwnerId", std::to_string(ownerId)); } std::string DescribeRecordTasksRequest::getAppId()const { return appId_; } void DescribeRecordTasksRequest::setAppId(const std::string& appId) { appId_ = appId; setParameter("AppId", appId); } std::string DescribeRecordTasksRequest::getChannelId()const { return channelId_; } void DescribeRecordTasksRequest::setChannelId(const std::string& channelId) { channelId_ = channelId; setParameter("ChannelId", channelId); } std::string DescribeRecordTasksRequest::getStatus()const { return status_; } void DescribeRecordTasksRequest::setStatus(const std::string& status) { status_ = status; setParameter("Status", status); }
// Copyright (c) 2020 Julian Bernhard, Klemens Esterle, Patrick Hart and // Tobias Kessler // // This work is licensed under the terms of the MIT license. // For a copy, see <https://opensource.org/licenses/MIT>. #ifndef MODULES_WORLD_ROADGRAPH_HPP_ #define MODULES_WORLD_ROADGRAPH_HPP_ #include <boost/graph/adjacency_list.hpp> #include <boost/graph/dijkstra_shortest_paths.hpp> #include <boost/graph/filtered_graph.hpp> #include <boost/graph/graphviz.hpp> #include <boost/graph/topological_sort.hpp> #include <ostream> #include <string> #include <utility> #include <vector> #include "modules/geometry/polygon.hpp" #include "modules/world/opendrive/opendrive.hpp" namespace modules { namespace world { namespace map { using namespace modules::world::opendrive; using namespace boost; typedef std::shared_ptr<modules::geometry::Polygon> PolygonPtr; struct XodrLaneVertex { XodrRoadId road_id; XodrLaneId global_lane_id; XodrLaneId GetGlobalLineId() { return global_lane_id; } XodrLanePtr GetLane() { return lane; } XodrLanePtr lane; PolygonPtr polygon; XodrLaneVertex() : road_id(0), global_lane_id(0), lane(NULL), polygon(NULL) {} XodrLaneVertex(int road_id_in, int global_lane_id_in, XodrLanePtr lane_in) : road_id(road_id_in), global_lane_id(global_lane_id_in), lane(lane_in), polygon(NULL) {} }; enum XodrLaneEdgeType { LANE_SUCCESSOR_EDGE = 0, INNER_NEIGHBOR_EDGE = 1, OUTER_NEIGHBOR_EDGE = 2, ROAD_SUCCESSOR_EDGE = 3 }; struct XodrLaneEdge { XodrLaneEdgeType edge_type; float weight; //! @todo tobias: for shortest path calculation: a very basic //! implementation! XodrLaneEdgeType GetEdgeType() const { return edge_type; } XodrLaneEdge() : edge_type(LANE_SUCCESSOR_EDGE), weight(1) {} XodrLaneEdge(XodrLaneEdgeType edge_type_in) : edge_type(edge_type_in), weight(edge_type_in == LANE_SUCCESSOR_EDGE ? 1 : 10) {} }; typedef boost::adjacency_list<vecS, vecS, bidirectionalS, XodrLaneVertex, XodrLaneEdge> XodrLaneGraph; typedef boost::graph_traits<XodrLaneGraph>::vertex_descriptor vertex_t; typedef boost::graph_traits<XodrLaneGraph>::edge_descriptor edge_t; struct TypeDrivingAndEdgeTypeLaneSuccessor { // both edge and vertex bool operator()(XodrLaneGraph::edge_descriptor ed) const { bool filtered_s = (*g)[boost::source(ed, *g)].lane->GetLaneType() == XodrLaneType::DRIVING; bool filtered_t = (*g)[boost::target(ed, *g)].lane->GetLaneType() == XodrLaneType::DRIVING; bool filtered_e = (*g)[ed].edge_type == XodrLaneEdgeType::LANE_SUCCESSOR_EDGE; bool filtered = filtered_s && filtered_t && filtered_e; return filtered; } bool operator()(XodrLaneGraph::vertex_descriptor vd) const { bool filtered = (*g)[vd].lane->GetLaneType() == XodrLaneType::DRIVING; return filtered; } XodrLaneGraph* g; }; struct TypeDriving { // both edge and vertex bool operator()(XodrLaneGraph::edge_descriptor ed) const { bool filtered_s = (*g)[boost::source(ed, *g)].lane->GetLaneType() == XodrLaneType::DRIVING; bool filtered_t = (*g)[boost::target(ed, *g)].lane->GetLaneType() == XodrLaneType::DRIVING; bool filtered = filtered_s && filtered_t; return filtered; } bool operator()(XodrLaneGraph::vertex_descriptor vd) const { bool filtered = (*g)[vd].lane->GetLaneType() == XodrLaneType::DRIVING; return filtered; } XodrLaneGraph* g; }; struct EdgeTypeRoadSuccessor { // both edge and vertex bool operator()(XodrLaneGraph::edge_descriptor ed) const { bool filtered_e = (*g)[ed].edge_type == XodrLaneEdgeType::ROAD_SUCCESSOR_EDGE; bool filtered = filtered_e; return filtered; } bool operator()(XodrLaneGraph::vertex_descriptor vd) const { return true; } XodrLaneGraph* g; }; template <typename Predicate> using FilteredXodrLaneGraph_t = boost::filtered_graph<XodrLaneGraph, Predicate, Predicate>; typedef FilteredXodrLaneGraph_t<TypeDrivingAndEdgeTypeLaneSuccessor> FilteredXodrLaneGraph; class Roadgraph { public: Roadgraph() {} XodrLaneId AddLane(const XodrRoadId& road_id, const XodrLanePtr& laneptr); bool AddInnerNeighbor(const XodrLaneId& inner_id, const XodrLaneId& outer_id); bool AddOuterNeighbor(const XodrLaneId& inner_id, const XodrLaneId& outer_id); bool AddLaneSuccessor(const XodrLaneId& prev, const XodrLaneId& succ); bool AddRoadSuccessor(const XodrLaneId& prev, const XodrLaneId& succ); std::vector<XodrLaneId> GetSuccessorLanes(const XodrLaneId& lane_id) const; std::vector<XodrLaneId> GetPredecessorLanes( const XodrLaneId& lane_id) const; template <class Predicate> bool CheckIdInFilteredGraph(const FilteredXodrLaneGraph_t<Predicate>& fg, const XodrLaneId& lane_id) const; template <class Predicate> std::vector<XodrLaneId> FindPath(const XodrLaneId& startid, const XodrLaneId& goalid); std::vector<XodrRoadId> FindRoadPath(const XodrRoadId& startid, const XodrRoadId& goalid); std::vector<XodrLaneId> FindDrivableLanePath(const XodrLaneId& startid, const XodrLaneId& goalid); std::vector<std::vector<XodrLaneId>> FindAllPathsInSubgraph( const std::vector<XodrLaneEdgeType>& edge_type_subset, const std::vector<XodrLaneId>& lane_id_subset); XodrLanePtr GetLanePtr(const XodrLaneId& id) const; std::vector<XodrLaneId> GetAllLaneids() const; std::pair<XodrLaneId, bool> GetPlanViewForRoadId(const XodrRoadId& id) const; std::pair<std::vector<XodrDrivingDirection>, bool> GetDrivingDirectionsForRoadId(const XodrRoadId &id) const; //! outer_lane_id can be some outer_lane_id (position 1,2,3) std::pair<XodrLaneId, bool> GetPlanViewForLaneId( const XodrLaneId& outer_lane_id) const; // TODO: Move to XodrLaneGraph, but XodrLaneGraph is not wrapped to python PolygonPtr GetLanePolygonForLaneId(const XodrLaneId& lane_id); XodrRoadId GetRoadForLaneId(const XodrLaneId& lane_id); //! XodrLaneId of the neighboring lane and a flag if it exists or not std::pair<XodrLaneId, bool> GetInnerNeighbor( const XodrLaneId& lane_id) const; //! XodrLaneId of the neighboring lane and a flag if it exists or not //! @note make sure to not call this function on the planview lane! std::pair<XodrLaneId, bool> GetOuterNeighbor( const XodrLaneId& lane_id) const; //! XodrLaneIds of all neighboring lanes in the same driving direction. //! Includes neighbors of neighbors //! @note cannot be called with the planview lane! std::vector<XodrLaneId> GetAllNeighbors(const XodrLaneId& lane_id) const; bool HasLane(const XodrLaneId& lane_id) const; void PrintGraph(const char* filename); void PrintGraph(std::ofstream& dotfile); XodrLaneGraph GetLaneGraph() const { return g_; } XodrLaneVertex GetVertex(vertex_t v_des) const { return g_[v_des]; } std::vector<vertex_t> GetVertices() const; XodrLaneEdge GetEdge(edge_t e_des) const { return g_[e_des]; } std::vector<vertex_t> GetNextVertices(vertex_t current_vertex) const; std::vector<edge_t> GetOutEdges(vertex_t current_vertex) const; std::vector<edge_t> GetEdges() const; edge_t GetEdgeDescr(vertex_t from, vertex_t to) const; std::pair<vertex_t, bool> GetVertexByLaneId( const XodrLaneId& lane_id) const; void GenerateVertices(OpenDriveMapPtr map); void GeneratePreAndSuccessors(OpenDriveMapPtr map); void GenerateNeighbours(OpenDriveMapPtr map); void GenerateFromJunctions(OpenDriveMapPtr map); void GeneratePolygonsForVertices(); void Generate(OpenDriveMapPtr map); std::pair<XodrLanePtr, XodrLanePtr> ComputeXodrLaneBoundaries( const XodrLaneId& lane_id) const; std::pair<std::vector<XodrLanePtr>, std::vector<XodrLanePtr>> ComputeRouteBoundaries(const std::vector<XodrLaneId>& horizon) const; std::pair<PolygonPtr, bool> ComputeXodrLanePolygon( const XodrLaneId& lane_id) const; std::vector<std::pair<XodrLaneId, bool>> GetOuterNeighborsPlanview( const XodrLaneId &lane_id) const; //! Roadgraph extension std::pair<XodrLaneId, bool> GetLeftLane(const XodrLaneId& lane_id, const XodrDrivingDirection& driving_direction); std::pair<XodrLaneId, bool> GetRightLane(const XodrLaneId& lane_id, const XodrDrivingDirection& driving_direction); std::pair<XodrLaneId, bool> GetNextLane( const std::vector<XodrRoadId>& road_ids, const XodrLaneId& lane_id); std::pair<XodrLaneId, bool> GetLeftBoundary(const XodrLaneId& lane_id, const XodrDrivingDirection& driving_direction); std::pair<XodrLaneId, bool> GetRightBoundary(const XodrLaneId& lane_id, const XodrDrivingDirection& driving_direction); private: XodrLaneGraph g_; bool AddEdgeOfType(const XodrLaneId& source_id, const XodrLaneId& tarGetId, const XodrLaneEdgeType& edgetype); std::vector<std::pair<XodrLaneId, bool>> GetNeighborFromEdgetype( const XodrLaneId& lane_id, const XodrLaneEdgeType edge_type) const; template <class XodrRoadIdMap, class XodrLaneIdMap, class XodrLaneMap> class my_vertex_writer_graph { public: my_vertex_writer_graph(XodrRoadIdMap r, XodrLaneIdMap l, XodrLaneMap lanemap) : rm(r), lm(l), lanemap_(lanemap) {} template <class XodrLaneVertex> void operator()(std::ostream& out, const XodrLaneVertex& s) const { out << "[" << "label=\"" << "road_id=" << rm[s] << " lane_id=" << lm[s] << " lane_pos=" << lanemap_[s]->GetLanePosition() << "\"]"; } private: XodrRoadIdMap rm; XodrLaneIdMap lm; XodrLaneMap lanemap_; }; template <class XodrRoadIdMap, class XodrLaneIdMap, class XodrLaneMap> inline my_vertex_writer_graph<XodrRoadIdMap, XodrLaneIdMap, XodrLaneMap> make_vertex_label_writer_graph(XodrRoadIdMap r, XodrLaneIdMap l, XodrLaneMap lm) { return my_vertex_writer_graph<XodrRoadIdMap, XodrLaneIdMap, XodrLaneMap>( r, l, lm); } template <class TypeMap> class my_edge_writer_text { public: my_edge_writer_text(TypeMap t) : tm(t) {} template <class XodrLaneEdge> void operator()(std::ostream& out, const XodrLaneEdge& e) const { const char* color; if (tm[e] == 0) { color = "red"; } else if (tm[e] == 3) { color = "green"; } else { color = "blue"; } // const char* color = tm[e]==0?"red":"blue"; out << "[label=\"" << tm[e] << "\"" << "color=\"" << color << "\"" << "]"; } private: TypeMap tm; }; template <class TypeMap> inline my_edge_writer_text<TypeMap> make_edge_label_writer_text(TypeMap t) { return my_edge_writer_text<TypeMap>(t); } }; typedef std::shared_ptr<Roadgraph> RoadgraphPtr; } // namespace map } // namespace world } // namespace modules #include "roadgraph_impl.hpp" #endif // MODULES_WORLD_ROADGRAPH_HPP_
/**************************************************************************** ** ** Copyright (C) 2014 Kurt Pattyn <pattyn.kurt@gmail.com>. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtWebSockets module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see http://www.qt.io/terms-conditions. For further ** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 or version 3 as published by the Free ** Software Foundation and appearing in the file LICENSE.LGPLv21 and ** LICENSE.LGPLv3 included in the packaging of this file. Please review the ** following information to ensure the GNU Lesser General Public License ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** As a special exception, The Qt Company gives you certain additional ** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ ** ****************************************************************************/ /*! \class QWebSocketServer \inmodule QtWebSockets \since 5.3 \brief Implements a WebSocket-based server. It is modeled after QTcpServer, and behaves the same. So, if you know how to use QTcpServer, you know how to use QWebSocketServer. This class makes it possible to accept incoming WebSocket connections. You can specify the port or have QWebSocketServer pick one automatically. You can listen on a specific address or on all the machine's addresses. Call listen() to have the server listen for incoming connections. The newConnection() signal is then emitted each time a client connects to the server. Call nextPendingConnection() to accept the pending connection as a connected QWebSocket. The function returns a pointer to a QWebSocket in QAbstractSocket::ConnectedState that you can use for communicating with the client. If an error occurs, serverError() returns the type of error, and errorString() can be called to get a human readable description of what happened. When listening for connections, the address and port on which the server is listening are available as serverAddress() and serverPort(). Calling close() makes QWebSocketServer stop listening for incoming connections. QWebSocketServer currently does not support \l {WebSocket Extensions} and \l {WebSocket Subprotocols}. \note When working with self-signed certificates, \l{Firefox bug 594502} prevents \l{Firefox} to connect to a secure WebSocket server. To work around this problem, first browse to the secure WebSocket server using HTTPS. FireFox will indicate that the certificate is invalid. From here on, the certificate can be added to the exceptions. After this, the secure WebSockets connection should work. QWebSocketServer only supports version 13 of the WebSocket protocol, as outlined in \l{RFC 6455}. \sa {WebSocket Server Example}, QWebSocket */ /*! \page echoserver.html example \title WebSocket server example \brief A sample WebSocket server echoing back messages sent to it. \section1 Description The echoserver example implements a WebSocket server that echoes back everything that is sent to it. \section1 Code We start by creating a QWebSocketServer (`new QWebSocketServer()`). After the creation, we listen on all local network interfaces (`QHostAddress::Any`) on the specified \a port. \snippet echoserver/echoserver.cpp constructor If listening is successful, we connect the `newConnection()` signal to the slot `onNewConnection()`. The `newConnection()` signal will be thrown whenever a new WebSocket client is connected to our server. \snippet echoserver/echoserver.cpp onNewConnection When a new connection is received, the client QWebSocket is retrieved (`nextPendingConnection()`), and the signals we are interested in are connected to our slots (`textMessageReceived()`, `binaryMessageReceived()` and `disconnected()`). The client socket is remembered in a list, in case we would like to use it later (in this example, nothing is done with it). \snippet echoserver/echoserver.cpp processTextMessage Whenever `processTextMessage()` is triggered, we retrieve the sender, and if valid, send back the original message (`sendTextMessage()`). The same is done with binary messages. \snippet echoserver/echoserver.cpp processBinaryMessage The only difference is that the message now is a QByteArray instead of a QString. \snippet echoserver/echoserver.cpp socketDisconnected Whenever a socket is disconnected, we remove it from the clients list and delete the socket. Note: it is best to use `deleteLater()` to delete the socket. */ /*! \fn void QWebSocketServer::acceptError(QAbstractSocket::SocketError socketError) This signal is emitted when the acceptance of a new connection results in an error. The \a socketError parameter describes the type of error that occurred. \sa pauseAccepting(), resumeAccepting() */ /*! \fn void QWebSocketServer::serverError(QWebSocketProtocol::CloseCode closeCode) This signal is emitted when an error occurs during the setup of a WebSocket connection. The \a closeCode parameter describes the type of error that occurred \sa errorString() */ /*! \fn void QWebSocketServer::newConnection() This signal is emitted every time a new connection is available. \sa hasPendingConnections(), nextPendingConnection() */ /*! \fn void QWebSocketServer::closed() This signal is emitted when the server closed its connection. \sa close() */ /*! \fn void QWebSocketServer::originAuthenticationRequired(QWebSocketCorsAuthenticator *authenticator) This signal is emitted when a new connection is requested. The slot connected to this signal should indicate whether the origin (which can be determined by the origin() call) is allowed in the \a authenticator object (by issuing \l{QWebSocketCorsAuthenticator::}{setAllowed()}). If no slot is connected to this signal, all origins will be accepted by default. \note It is not possible to use a QueuedConnection to connect to this signal, as the connection will always succeed. */ /*! \fn void QWebSocketServer::peerVerifyError(const QSslError &error) QWebSocketServer can emit this signal several times during the SSL handshake, before encryption has been established, to indicate that an error has occurred while establishing the identity of the peer. The \a error is usually an indication that QWebSocketServer is unable to securely identify the peer. This signal provides you with an early indication when something is wrong. By connecting to this signal, you can manually choose to tear down the connection from inside the connected slot before the handshake has completed. If no action is taken, QWebSocketServer will proceed to emitting QWebSocketServer::sslErrors(). \sa sslErrors() */ /*! \fn void QWebSocketServer::sslErrors(const QList<QSslError> &errors) QWebSocketServer emits this signal after the SSL handshake to indicate that one or more errors have occurred while establishing the identity of the peer. The errors are usually an indication that QWebSocketServer is unable to securely identify the peer. Unless any action is taken, the connection will be dropped after this signal has been emitted. \a errors contains one or more errors that prevent QSslSocket from verifying the identity of the peer. \sa peerVerifyError() */ /*! \enum QWebSocketServer::SslMode Indicates whether the server operates over wss (SecureMode) or ws (NonSecureMode) \value SecureMode The server operates in secure mode (over wss) \value NonSecureMode The server operates in non-secure mode (over ws) */ #include "qwebsocketprotocol.h" #include "qwebsocket.h" #include "qwebsocketserver.h" #include "qwebsocketserver_p.h" #include <QtNetwork/QTcpServer> #include <QtNetwork/QTcpSocket> #include <QtNetwork/QNetworkProxy> #ifndef QT_NO_SSL #include <QtNetwork/QSslConfiguration> #endif QT_BEGIN_NAMESPACE /*! Constructs a new QWebSocketServer with the given \a serverName. The \a serverName will be used in the HTTP handshake phase to identify the server. It can be empty, in which case an empty server name will be sent to the client. The \a secureMode parameter indicates whether the server operates over wss (\l{SecureMode}) or over ws (\l{NonSecureMode}). \a parent is passed to the QObject constructor. */ QWebSocketServer::QWebSocketServer(const QString &serverName, SslMode secureMode, QObject *parent) : QObject(*(new QWebSocketServerPrivate(serverName, #ifndef QT_NO_SSL (secureMode == SecureMode) ? QWebSocketServerPrivate::SecureMode : QWebSocketServerPrivate::NonSecureMode, #else QWebSocketServerPrivate::NonSecureMode, #endif this)), parent) { #ifdef QT_NO_SSL Q_UNUSED(secureMode) #endif Q_D(QWebSocketServer); d->init(); } /*! Destroys the QWebSocketServer object. If the server is listening for connections, the socket is automatically closed. Any client \l{QWebSocket}s that are still queued are closed and deleted. \sa close() */ QWebSocketServer::~QWebSocketServer() { Q_D(QWebSocketServer); d->close(true); } /*! Closes the server. The server will no longer listen for incoming connections. */ void QWebSocketServer::close() { Q_D(QWebSocketServer); d->close(); } /*! Returns a human readable description of the last error that occurred. If no error occurred, an empty string is returned. \sa serverError() */ QString QWebSocketServer::errorString() const { Q_D(const QWebSocketServer); return d->errorString(); } /*! Returns true if the server has pending connections; otherwise returns false. \sa nextPendingConnection(), setMaxPendingConnections() */ bool QWebSocketServer::hasPendingConnections() const { Q_D(const QWebSocketServer); return d->hasPendingConnections(); } /*! Returns true if the server is currently listening for incoming connections; otherwise returns false. If listening fails, error() will return the reason. \sa listen(), error() */ bool QWebSocketServer::isListening() const { Q_D(const QWebSocketServer); return d->isListening(); } /*! Tells the server to listen for incoming connections on address \a address and port \a port. If \a port is 0, a port is chosen automatically. If \a address is QHostAddress::Any, the server will listen on all network interfaces. Returns true on success; otherwise returns false. \sa isListening() */ bool QWebSocketServer::listen(const QHostAddress &address, quint16 port) { Q_D(QWebSocketServer); return d->listen(address, port); } /*! Returns the maximum number of pending accepted connections. The default is 30. \sa setMaxPendingConnections(), hasPendingConnections() */ int QWebSocketServer::maxPendingConnections() const { Q_D(const QWebSocketServer); return d->maxPendingConnections(); } /*! Returns the next pending connection as a connected QWebSocket object. QWebSocketServer does not take ownership of the returned QWebSocket object. It is up to the caller to delete the object explicitly when it will no longer be used, otherwise a memory leak will occur. Q_NULLPTR is returned if this function is called when there are no pending connections. Note: The returned QWebSocket object cannot be used from another thread. \sa hasPendingConnections() */ QWebSocket *QWebSocketServer::nextPendingConnection() { Q_D(QWebSocketServer); return d->nextPendingConnection(); } /*! Pauses incoming new connections. Queued connections will remain in queue. \sa resumeAccepting() */ void QWebSocketServer::pauseAccepting() { Q_D(QWebSocketServer); d->pauseAccepting(); } #ifndef QT_NO_NETWORKPROXY /*! Returns the network proxy for this server. By default QNetworkProxy::DefaultProxy is used. \sa setProxy() */ QNetworkProxy QWebSocketServer::proxy() const { Q_D(const QWebSocketServer); return d->proxy(); } /*! Sets the explicit network proxy for this server to \a networkProxy. To disable the use of a proxy, use the QNetworkProxy::NoProxy proxy type: \code server->setProxy(QNetworkProxy::NoProxy); \endcode \sa proxy() */ void QWebSocketServer::setProxy(const QNetworkProxy &networkProxy) { Q_D(QWebSocketServer); d->setProxy(networkProxy); } #endif #ifndef QT_NO_SSL /*! Sets the SSL configuration for the QWebSocketServer to \a sslConfiguration. This method has no effect if QWebSocketServer runs in non-secure mode (QWebSocketServer::NonSecureMode). \sa sslConfiguration(), SslMode */ void QWebSocketServer::setSslConfiguration(const QSslConfiguration &sslConfiguration) { Q_D(QWebSocketServer); d->setSslConfiguration(sslConfiguration); } /*! Returns the SSL configuration used by the QWebSocketServer. If the server is not running in secure mode (QWebSocketServer::SecureMode), this method returns QSslConfiguration::defaultConfiguration(). \sa setSslConfiguration(), SslMode, QSslConfiguration::defaultConfiguration() */ QSslConfiguration QWebSocketServer::sslConfiguration() const { Q_D(const QWebSocketServer); return d->sslConfiguration(); } #endif /*! Resumes accepting new connections. \sa pauseAccepting() */ void QWebSocketServer::resumeAccepting() { Q_D(QWebSocketServer); d->resumeAccepting(); } /*! Sets the server name that will be used during the HTTP handshake phase to the given \a serverName. The \a serverName can be empty, in which case an empty server name will be sent to the client. Existing connected clients will not be notified of this change, only newly connecting clients will see this new name. */ void QWebSocketServer::setServerName(const QString &serverName) { Q_D(QWebSocketServer); d->setServerName(serverName); } /*! Returns the server name that is used during the http handshake phase. */ QString QWebSocketServer::serverName() const { Q_D(const QWebSocketServer); return d->serverName(); } /*! Returns the server's address if the server is listening for connections; otherwise returns QHostAddress::Null. \sa serverPort(), listen() */ QHostAddress QWebSocketServer::serverAddress() const { Q_D(const QWebSocketServer); return d->serverAddress(); } /*! Returns the secure mode the server is running in. \sa QWebSocketServer(), SslMode */ QWebSocketServer::SslMode QWebSocketServer::secureMode() const { #ifndef QT_NO_SSL Q_D(const QWebSocketServer); return (d->secureMode() == QWebSocketServerPrivate::SecureMode) ? QWebSocketServer::SecureMode : QWebSocketServer::NonSecureMode; #else return QWebSocketServer::NonSecureMode; #endif } /*! Returns an error code for the last error that occurred. If no error occurred, QWebSocketProtocol::CloseCodeNormal is returned. \sa errorString() */ QWebSocketProtocol::CloseCode QWebSocketServer::error() const { Q_D(const QWebSocketServer); return d->serverError(); } /*! Returns the server's port if the server is listening for connections; otherwise returns 0. \sa serverAddress(), listen() */ quint16 QWebSocketServer::serverPort() const { Q_D(const QWebSocketServer); return d->serverPort(); } /*! Returns a URL clients can use to connect to this server if the server is listening for connections. Otherwise an invalid URL is returned. \sa serverPort(), serverAddress(), listen() */ QUrl QWebSocketServer::serverUrl() const { QUrl url; if (!isListening()) { return url; } switch (secureMode()) { case NonSecureMode: url.setScheme(QStringLiteral("ws")); break; #ifndef QT_NO_SSL case SecureMode: url.setScheme(QStringLiteral("wss")); break; #endif } url.setPort(serverPort()); if (serverAddress() == QHostAddress(QHostAddress::Any)) { // NOTE: On Windows at least, clients cannot connect to QHostAddress::Any // so in that case we always return LocalHost instead. url.setHost(QHostAddress(QHostAddress::LocalHost).toString()); } else { url.setHost(serverAddress().toString()); } return url; } /*! Sets the maximum number of pending accepted connections to \a numConnections. WebSocketServer will accept no more than \a numConnections incoming connections before nextPendingConnection() is called. By default, the limit is 30 pending connections. QWebSocketServer will emit the error() signal with the QWebSocketProtocol::CloseCodeAbnormalDisconnection close code when the maximum of connections has been reached. The WebSocket handshake will fail and the socket will be closed. \sa maxPendingConnections(), hasPendingConnections() */ void QWebSocketServer::setMaxPendingConnections(int numConnections) { Q_D(QWebSocketServer); d->setMaxPendingConnections(numConnections); } /*! Sets the socket descriptor this server should use when listening for incoming connections to \a socketDescriptor. Returns true if the socket is set successfully; otherwise returns false. The socket is assumed to be in listening state. \sa socketDescriptor(), isListening() */ bool QWebSocketServer::setSocketDescriptor(int socketDescriptor) { Q_D(QWebSocketServer); return d->setSocketDescriptor(socketDescriptor); } /*! Returns the native socket descriptor the server uses to listen for incoming instructions, or -1 if the server is not listening. If the server is using QNetworkProxy, the returned descriptor may not be usable with native socket functions. \sa setSocketDescriptor(), isListening() */ int QWebSocketServer::socketDescriptor() const { Q_D(const QWebSocketServer); return d->socketDescriptor(); } /*! Returns a list of WebSocket versions that this server is supporting. */ QList<QWebSocketProtocol::Version> QWebSocketServer::supportedVersions() const { Q_D(const QWebSocketServer); return d->supportedVersions(); } QT_END_NAMESPACE
#include <iostream> // std::cout #include <fstream> // std::ifstream, std::ofstream #include <filesystem> // std::filesystem #include <string> // std::string #include <chrono> // std::chrono // For External Library #include <torch/torch.h> // torch #include <boost/program_options.hpp> // boost::program_options // For Original Header #include "loss.hpp" // Loss #include "networks.hpp" // MC_AlexNet #include "transforms.hpp" // transforms_Compose #include "datasets.hpp" // datasets::ImageFolderClassesWithPaths #include "dataloader.hpp" // DataLoader::ImageFolderClassesWithPaths // Define Namespace namespace fs = std::filesystem; namespace po = boost::program_options; // --------------- // Test Function // --------------- void test(po::variables_map &vm, torch::Device &device, MC_AlexNet &model, std::vector<transforms_Compose> &transform, const std::vector<std::string> class_names){ // (0) Initialization and Declaration size_t class_num; size_t match, counter; long int response, answer; char judge; float accuracy; float ave_loss; double seconds, ave_time; std::string path, result_dir; std::string dataroot; std::ofstream ofs, ofs2; std::chrono::system_clock::time_point start, end; std::tuple<torch::Tensor, torch::Tensor, std::vector<std::string>> data; torch::Tensor image, label, output; torch::Tensor loss; datasets::ImageFolderClassesWithPaths dataset; DataLoader::ImageFolderClassesWithPaths dataloader; // (1) Get Test Dataset dataroot = "datasets/" + vm["dataset"].as<std::string>() + '/' + vm["test_dir"].as<std::string>(); dataset = datasets::ImageFolderClassesWithPaths(dataroot, transform, class_names); dataloader = DataLoader::ImageFolderClassesWithPaths(dataset, /*batch_size_=*/1, /*shuffle_=*/false, /*num_workers_=*/0); std::cout << "total test images : " << dataset.size() << std::endl << std::endl; // (2) Get Model path = "checkpoints/" + vm["dataset"].as<std::string>() + "/models/epoch_" + vm["test_load_epoch"].as<std::string>() + ".pth"; torch::load(model, path); // (3) Set Loss Function auto criterion = Loss(); // (4) Initialization of Value ave_loss = 0.0; ave_time = 0.0; match = 0; counter = 0; class_num = class_names.size(); // (5) File Pre-processing result_dir = vm["test_result_dir"].as<std::string>(); fs::create_directories(result_dir); ofs.open(result_dir + "/loss.txt", std::ios::out); ofs2.open(result_dir + "/likelihood.csv", std::ios::out); ofs2 << "file name," << std::flush; ofs2 << "judge," << std::flush; for (size_t i = 0; i < class_num; i++){ ofs2 << i << "(" << class_names.at(i) << ")," << std::flush; } ofs2 << std::endl; // (6) Tensor Forward model->eval(); while (dataloader(data)){ image = std::get<0>(data).to(device); label = std::get<1>(data).to(device); start = std::chrono::system_clock::now(); output = model->forward(image); end = std::chrono::system_clock::now(); seconds = (double)std::chrono::duration_cast<std::chrono::microseconds>(end - start).count() * 0.001 * 0.001; loss = criterion(output, label); ave_loss += loss.item<float>(); ave_time += seconds; output = output.exp(); response = output.argmax(/*dim=*/1).item<long int>(); answer = label[0].item<long int>(); counter += 1; judge = 'F'; if (response == answer){ match += 1; judge = 'T'; } std::cout << '<' << std::get<2>(data).at(0) << "> cross-entropy:" << loss.item<float>() << " judge:" << judge << " response:" << response << '(' << class_names.at(response) << ") answer:" << answer << '(' << class_names.at(answer) << ')' << std::endl; ofs << '<' << std::get<2>(data).at(0) << "> cross-entropy:" << loss.item<float>() << " judge:" << judge << " response:" << response << '(' << class_names.at(response) << ") answer:" << answer << '(' << class_names.at(answer) << ')' << std::endl; ofs2 << std::get<2>(data).at(0) << ',' << std::flush; ofs2 << judge << ',' << std::flush; output = output[0]; // {1, CN} ===> {CN} for (size_t i = 0; i < class_num; i++){ ofs2 << output[i].item<float>() << ',' << std::flush; } ofs2 << std::endl; } // (7.1) Calculate Average ave_loss = ave_loss / (float)dataset.size(); ave_time = ave_time / (double)dataset.size(); // (7.2) Calculate Accuracy accuracy = (float)match / float(counter); // (8) Average Output std::cout << "<All> cross-entropy:" << ave_loss << " accuracy:" << accuracy << " (time:" << ave_time << ')' << std::endl; ofs << "<All> cross-entropy:" << ave_loss << " accuracy:" << accuracy << " (time:" << ave_time << ')' << std::endl; // Post Processing ofs.close(); ofs2.close(); // End Processing return; }
//////////////////////////////////////////////////////////////////////////////// // ConcreteTaskManager.cpp (Leggiero/Modules - Task) // // Real Task Manager Implementation //////////////////////////////////////////////////////////////////////////////// // My Header #include "_Internal/_ConcreteTaskManager.h" // Standard Library #include <algorithm> // Leggiero.Utility #include <Utility/Math/BitMath.h> #include <Utility/Sugar/Finally.h> #include <Utility/Threading/ThreadSleep.h> // Leggiero.Engine #include <Engine/Application/GameProcessAnchor.h> // Leggiero.Application #include <Application/ApplicationComponent.h> #include <Application/SystemEventObserver.h> #include <Application/SystemEventDispatcher.h> // Leggiero.Task #include "_Internal/_TaskExecutionEntry.h" #include "TaskSubSystemInterface.h" #include "Processor/ITaskProcessor.h" #include "Tasks/ITask.h" namespace Leggiero { namespace Task { namespace _Internal { //////////////////////////////////////////////////////////////////////////////// ConcreteTaskManager //------------------------------------------------------------------------------ ConcreteTaskManager::ConcreteTaskManager() : m_isRealtimeScheduling(false), m_conditionWaitingQueueProcessing(false) , m_conditionCheckShortTermIndex(-1), m_conditionCheckLongTermIndex(-1) , m_generalTaskCapability(TaskCapabilities::kGeneral) { } //------------------------------------------------------------------------------ ConcreteTaskManager::~ConcreteTaskManager() { _FinalizeSchedulingQueues(); _FinalizeProcessors(); TaskExecutionEntry *deletingExecutionEntry; while (m_executionEntryPool.try_dequeue(deletingExecutionEntry)) { delete deletingExecutionEntry; } } //------------------------------------------------------------------------------ // Initialize the Component void ConcreteTaskManager::InitializeComponent(Engine::GameProcessAnchor *gameAnchor) { m_isRealtimeScheduling.store(false); m_conditionWaitingQueueProcessing.store(false); for (std::shared_ptr<ITaskSubSystem> &subSystem : m_subSystems) { subSystem->InitializeSubSystem(this, m_appComponentCopy, gameAnchor); } _InitializeProcessors(); _InitializeSchedulingQueues(); m_appComponentCopy->SystemEventCenter().RegisterApplicationEventObserver(this); m_gameAnchor = gameAnchor; gameAnchor->RegisterOnAfterFrame(this); } //------------------------------------------------------------------------------ // Safely Shutdown Component void ConcreteTaskManager::ShutdownComponent() { m_gameAnchor->UnRegisterOnAfterFrame(this); m_appComponentCopy->SystemEventCenter().UnRegisterApplicationEventObserver(this); _FinalizeSchedulingQueues(); _FinalizeProcessors(); for (std::shared_ptr<ITaskSubSystem> &subSystem : m_subSystems) { subSystem->ShutdownSubSystem(); } } //------------------------------------------------------------------------------ // Get type Id list of dependent modules needed by this component const std::vector<EngineModuleIdType> &ConcreteTaskManager::GetDependentModules() const { std::set<EngineModuleIdType> dependentModules; for (const std::shared_ptr<ITaskSubSystem> &subSystem : m_subSystems) { subSystem->CollectModuleDependency(dependentModules); } static std::vector<EngineModuleIdType> collectedIdList; collectedIdList.clear(); collectedIdList.insert(collectedIdList.end(), dependentModules.begin(), dependentModules.end()); return collectedIdList; } //------------------------------------------------------------------------------ // Get type Id list of dependent components needed by this component const std::vector<EngineComponentIdType> &ConcreteTaskManager::GetDependentComponents() const { static std::vector<EngineComponentIdType> dependentComponentList{ EngineComponentIdType::kApplication }; std::set<EngineComponentIdType> dependentComponents; dependentComponents.insert(dependentComponentList.begin(), dependentComponentList.end()); for (const std::shared_ptr<ITaskSubSystem> &subSystem : m_subSystems) { subSystem->CollectComponentDependency(dependentComponents); } static std::vector<EngineComponentIdType> collectedIdList; collectedIdList.clear(); collectedIdList.insert(collectedIdList.end(), dependentComponents.begin(), dependentComponents.end()); return collectedIdList; } //------------------------------------------------------------------------------ // Inject Dependency to the Component. // All dependency injections will be done before the initialization. void ConcreteTaskManager::InjectDependency(EngineComponentIdType componentId, EngineComponent *dependentComponent) { switch (componentId) { case EngineComponentIdType::kApplication: { m_appComponentCopy = dynamic_cast<Application::ApplicationComponent *>(dependentComponent); } break; } for (std::shared_ptr<ITaskSubSystem> &subSystem : m_subSystems) { subSystem->InjectComponentDependency(componentId, dependentComponent); } } //------------------------------------------------------------------------------ void ConcreteTaskManager::AttachSubSystem(std::shared_ptr<ITaskSubSystem> subSystem) { if (!subSystem) { return; } m_subSystems.push_back(subSystem); } //------------------------------------------------------------------------------ void ConcreteTaskManager::AddGeneralWorkerCapability(TaskCapabilityType capabilities) { m_generalTaskCapability |= capabilities; } //------------------------------------------------------------------------------ void ConcreteTaskManager::RequestExecution(TaskExecutionEntry *execution) { if (!execution->task->IsTaskReady()) { // Should wait ready switch (execution->task->GetTaskPriority()) { case TaskPriorityClass::kBackground: m_conditionWaitingQueueLongTerm.enqueue(execution); break; case TaskPriorityClass::kHighPriority: m_conditionWaitingQueueRealtime.enqueue(execution); break; default: m_conditionWaitingQueueShortTerm.enqueue(execution); break; } return; } _DispatchExecution(execution); } //------------------------------------------------------------------------------ void ConcreteTaskManager::RequestDelayedExecution(TaskExecutionEntry *execution, SchedulingClock::duration delay) { if (delay <= SchedulingClock::duration::zero()) { // No Delay RequestExecution(execution); return; } execution->lastStep = execution->lastStep + delay; _EnqueueWaitingExecution(execution); } //------------------------------------------------------------------------------ void ConcreteTaskManager::ReleaseExecution(TaskExecutionEntry *execution) { if (execution == nullptr) { return; } execution->Clear(); if (!m_executionEntryPool.enqueue(execution)) { delete execution; } } //------------------------------------------------------------------------------ bool ConcreteTaskManager::ExecuteTask(std::shared_ptr<ITask> task) { if (!task) { return false; } if (_GetTaskProcessor(task->GetRequiredCapabilties()) == nullptr) { // Cannot process return false; } TaskExecutionEntry *execution = _RetainExecution(); if (execution == nullptr) { return false; } execution->task = task; RequestExecution(execution); _HintRealtimeSchedule(); return true; } //------------------------------------------------------------------------------ void ConcreteTaskManager::OnGoToBackground() { m_schedulerPause.store(true); } //------------------------------------------------------------------------------ void ConcreteTaskManager::OnReturnFromBackground() { m_schedulerPause.store(false); pthread_cond_broadcast(&m_queuesPauseCond.GetConditionVariable()); } //------------------------------------------------------------------------------ void ConcreteTaskManager::GameProcess_OnAfterFrame(GameFrameNumberType frameNumber) { _HintRealtimeSchedule(); _ProcessConditionWaitingQueue(m_conditionWaitingQueueShortTerm); if (frameNumber % 8 == 0) { // Long-term condition check every 8 frames _ProcessConditionWaitingQueue(m_conditionWaitingQueueLongTerm); } } //------------------------------------------------------------------------------ TaskExecutionEntry *ConcreteTaskManager::_RetainExecution() { TaskExecutionEntry *pooledExecutionEntry; if (m_executionEntryPool.try_dequeue(pooledExecutionEntry)) { return pooledExecutionEntry; } return new TaskExecutionEntry(); } //------------------------------------------------------------------------------ void ConcreteTaskManager::_DispatchExecution(TaskExecutionEntry *execution) { ITaskProcessor *taskProcessor = _GetTaskProcessor(execution->task->GetRequiredCapabilties()); if (taskProcessor == nullptr) { // ??? execution->task->SetErrorFlag(); execution->task->State().store(TaskState::kError); ReleaseExecution(execution); return; } taskProcessor->GiveJob(execution); } //------------------------------------------------------------------------------ void ConcreteTaskManager::_InitializeProcessors() { _RegisterProcessor(_CreateGeneralProcessor()); for (std::shared_ptr<ITaskSubSystem> &subSystem : m_subSystems) { subSystem->CreateProcessors([this](std::shared_ptr<ITaskProcessor> processor) { _RegisterProcessor(processor); }); } } //------------------------------------------------------------------------------ void ConcreteTaskManager::_FinalizeProcessors() { m_capabilityProcessorMap.clear(); m_capabilityOnlyList.clear(); for (std::shared_ptr<ITaskProcessor> &currentProcessor : m_taskProcessorHolder) { currentProcessor->PrepareProcessorShutdown(); } // Just delete processor by clear shared_ptr holder m_taskProcessorHolder.clear(); } //------------------------------------------------------------------------------ // Should not called in race-condition with _GetTaskProcessor (only for _InitializeProcessors step) void ConcreteTaskManager::_RegisterProcessor(std::shared_ptr<ITaskProcessor> processor) { if (!processor) { return; } m_taskProcessorHolder.push_back(processor); TaskCapabilityType processorCapability = processor->GetProcessorTaskCapability(); m_capabilityOnlyList.push_back(processorCapability); std::unordered_map<TaskCapabilityType, ITaskProcessor *>::iterator findIt = m_capabilityProcessorMap.find(processorCapability); if (findIt == m_capabilityProcessorMap.end()) { m_capabilityProcessorMap.insert(std::make_pair(processorCapability, processor.get())); } } //------------------------------------------------------------------------------ ITaskProcessor *ConcreteTaskManager::_GetTaskProcessor(TaskCapabilityType capability) { // Calculate every time to avoid locking std::unordered_map<TaskCapabilityType, ITaskProcessor *>::iterator findIt = m_capabilityProcessorMap.find(capability); if (findIt != m_capabilityProcessorMap.end()) { return findIt->second; } const int processorCount = static_cast<int>(m_capabilityOnlyList.size()); int matchIndex = -1; int matchMinDiffBits = 1000; // may not run in 1024-bit word machine? lol for (int i = 0; i < processorCount; ++i) { // Check Requirements bool isMatch = (capability & (~(m_capabilityOnlyList[i] | m_generalTaskCapability))) == 0; if (!isMatch) { continue; } // Check different bits TaskCapabilityType diffMap = (capability ^ m_capabilityOnlyList[i]); int diffBits = static_cast<int>(Utility::Math::PopCount(diffMap)); if (diffBits < matchMinDiffBits) { matchIndex = i; matchMinDiffBits = diffBits; if (matchMinDiffBits <= 1) { break; } } } if (matchIndex >= 0) { return m_taskProcessorHolder[matchIndex].get(); } return nullptr; } //------------------------------------------------------------------------------ void ConcreteTaskManager::_HintRealtimeSchedule() { if (m_isRealtimeScheduling.load()) { return; } bool notScheduling = false; if (m_isRealtimeScheduling.compare_exchange_strong(notScheduling, true)) { _RealtimeSchedule(); _ProcessConditionWaitingQueue(m_conditionWaitingQueueRealtime); m_isRealtimeScheduling.store(false); } } //------------------------------------------------------------------------------ void ConcreteTaskManager::_RealtimeSchedule() { TaskExecutionEntry *dequeuedExecution; size_t executionBatchCount = 0; while (m_realtimeWaitingQueue.try_dequeue(dequeuedExecution)) { m_realtimeSchedulingBuffer[executionBatchCount] = dequeuedExecution; ++executionBatchCount; if (executionBatchCount >= kRealtimeScheduleMaxBatchCount) { break; } } for (size_t i = 0; i < executionBatchCount; ++i) { TaskExecutionEntry *currentExecution = m_realtimeSchedulingBuffer[i]; if (currentExecution->lastStep <= SchedulingClock::now()) { RequestExecution(currentExecution); m_realtimeSchedulingBuffer[i] = nullptr; } } for (size_t i = 0; i < executionBatchCount; ++i) { if (m_realtimeSchedulingBuffer[i] != nullptr) { m_realtimeWaitingQueue.enqueue(m_realtimeSchedulingBuffer[i]); } } } //------------------------------------------------------------------------------ void ConcreteTaskManager::_ProcessConditionWaitingQueue(moodycamel::ConcurrentQueue<TaskExecutionEntry *> &queue) { if (m_conditionWaitingQueueProcessing.load()) { return; } bool notProcessing = false; if (m_conditionWaitingQueueProcessing.compare_exchange_strong(notProcessing, true)) { std::atomic_bool *lockCopy = &m_conditionWaitingQueueProcessing; auto releaseLockFunc = [lockCopy]() mutable { lockCopy->store(false); }; FINALLY_OF_BLOCK(_RELEASE_LOCK, releaseLockFunc); m_conditionWaitingProcessBuffer.reserve(queue.size_approx() + 4); TaskExecutionEntry *dequeuedExecution; while (queue.try_dequeue(dequeuedExecution)) { m_conditionWaitingProcessBuffer.push_back(dequeuedExecution); } for (TaskExecutionEntry *currentExecution : m_conditionWaitingProcessBuffer) { if (currentExecution->task->IsTaskReady()) { _DispatchExecution(currentExecution); } else { queue.enqueue(currentExecution); } } m_conditionWaitingProcessBuffer.clear(); } } //------------------------------------------------------------------------------ void ConcreteTaskManager::_InitializeSchedulingQueues() { // Queue Definitions static std::vector<SchedulingClock::duration> queueWaitingTimes{ std::chrono::milliseconds(2), std::chrono::milliseconds(8), std::chrono::milliseconds(32), std::chrono::milliseconds(128), std::chrono::milliseconds(1024), }; std::sort(queueWaitingTimes.begin(), queueWaitingTimes.end()); m_schedulerRunning.store(true); m_schedulerPause.store(false); m_schedulingQueues.reserve(queueWaitingTimes.size()); for (int i = 0; i < queueWaitingTimes.size(); ++i) { SchedulingQueueEntry *currentQueueEntry = new SchedulingQueueEntry(); currentQueueEntry->minimumWaiting = queueWaitingTimes[i]; currentQueueEntry->owner = this; currentQueueEntry->queueIndex = i; m_schedulingQueues.push_back(currentQueueEntry); } for (SchedulingQueueEntry *currentQueueEntry : m_schedulingQueues) { if (pthread_create(&currentQueueEntry->schedulingThread, NULL, ConcreteTaskManager::_SchedulingQueueThreadStartHelper, (void *)currentQueueEntry) != 0) { // Thread Creation Failed } } m_schedulingQueuesCount = static_cast<int>(m_schedulingQueues.size()); m_conditionCheckShortTermIndex = 1; m_conditionCheckLongTermIndex = 3; } //------------------------------------------------------------------------------ void ConcreteTaskManager::_FinalizeSchedulingQueues() { m_schedulerPause.store(false); m_schedulerRunning.store(false); pthread_cond_broadcast(&m_queuesPauseCond.GetConditionVariable()); if (m_schedulingQueues.empty()) { return; } for (SchedulingQueueEntry *currentQueueEntry : m_schedulingQueues) { pthread_join(currentQueueEntry->schedulingThread, NULL); delete currentQueueEntry; } m_schedulingQueues.clear(); } //------------------------------------------------------------------------------ void ConcreteTaskManager::_SchedulingQueueThreadFunction(ConcreteTaskManager::SchedulingQueueEntry &queueEntry) { std::chrono::duration<int, std::micro> microsecMinimumWaiting(std::chrono::duration_cast<std::chrono::duration<int, std::micro> >(queueEntry.minimumWaiting)); int waitingMicroseconds = microsecMinimumWaiting.count() / 2; if (waitingMicroseconds <= 0) { waitingMicroseconds = 1; } std::chrono::nanoseconds startNs; std::chrono::nanoseconds finishNs; while (m_schedulerRunning.load()) { startNs = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock::now().time_since_epoch()); // Process Pause if (m_schedulerPause.load()) { int pauseCondLockResult = pthread_mutex_lock(&(m_queuesPauseMutex.GetLock())); if (pauseCondLockResult == 0) { pthread_mutex_t *lockCopy = &(m_queuesPauseMutex.GetLock()); auto releaseLockFunc = [lockCopy]() mutable { pthread_mutex_unlock(lockCopy); }; FINALLY_OF_BLOCK(_RELEASE_LOCK, releaseLockFunc); if (m_schedulerPause.load()) { pthread_cond_wait(&(m_queuesPauseCond.GetConditionVariable()), &(m_queuesPauseMutex.GetLock())); } } // Yield and re-check sched_yield(); continue; } _DoWaitingQueueScheduling(queueEntry.queueIndex, queueEntry); if (queueEntry.queueIndex == m_conditionCheckShortTermIndex) { _ProcessConditionWaitingQueue(m_conditionWaitingQueueShortTerm); } else if (queueEntry.queueIndex == m_conditionCheckLongTermIndex) { _ProcessConditionWaitingQueue(m_conditionWaitingQueueLongTerm); } _HintRealtimeSchedule(); finishNs = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock::now().time_since_epoch()); auto elapsedNs = (finishNs - startNs).count(); if (elapsedNs < 0) { elapsedNs = 0; } int shouldWaiting = waitingMicroseconds - static_cast<int>(elapsedNs / 1000); if (shouldWaiting > 0) { Utility::Threading::PthreadSleepuS(shouldWaiting); } else { sched_yield(); } } } //------------------------------------------------------------------------------ void ConcreteTaskManager::_DoWaitingQueueScheduling(int queueIndex, ConcreteTaskManager::SchedulingQueueEntry &queueEntry) { TaskExecutionEntry *dequeuedExecution; while (queueEntry.queue.try_dequeue(dequeuedExecution)) { queueEntry.queueProcessingBuffer.push_back(dequeuedExecution); } for (TaskExecutionEntry *currentExecution : queueEntry.queueProcessingBuffer) { if (currentExecution->lastStep <= SchedulingClock::now()) { queueEntry.queueProcessingNowBuffer.push_back(currentExecution); } else { // Re-dispatch to waiting queue _EnqueueWaitingExecution(currentExecution); } } queueEntry.queueProcessingBuffer.clear(); for (TaskExecutionEntry *currentExecution : queueEntry.queueProcessingNowBuffer) { RequestExecution(currentExecution); } queueEntry.queueProcessingNowBuffer.clear(); } //------------------------------------------------------------------------------ void *ConcreteTaskManager::_SchedulingQueueThreadStartHelper(void *threadEntry) { SchedulingQueueEntry *queueEntry = (SchedulingQueueEntry *)threadEntry; queueEntry->owner->_SchedulingQueueThreadFunction(*queueEntry); return nullptr; } //------------------------------------------------------------------------------ void ConcreteTaskManager::_EnqueueWaitingExecution(TaskExecutionEntry *execution) { SchedulingClock::duration waitingTime = execution->lastStep - SchedulingClock::now(); if (m_schedulingQueues.empty() || (waitingTime <= m_schedulingQueues.front()->minimumWaiting)) { // Realtime scheduling m_realtimeWaitingQueue.enqueue(execution); return; } // Linear search because queues are not too many int targetQueueIndex = 0; for (int i = 1; i < m_schedulingQueuesCount; ++i) { if (waitingTime > m_schedulingQueues[i]->minimumWaiting) { targetQueueIndex = i; } else { break; } } m_schedulingQueues[targetQueueIndex]->queue.enqueue(execution); } } //////////////////////////////////////////////////////////////////////////////// TaskManagerComponent - Factory //------------------------------------------------------------------------------ // Create function to create concrete object TaskManagerComponent *TaskManagerComponent::CreateComponentObject() { return new _Internal::ConcreteTaskManager(); } } }
// Copyright (c) 2017-2018 Parsa Amini // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #if !defined(PHYLANX_PRIMITIVES_POWER_OPERATION) #define PHYLANX_PRIMITIVES_POWER_OPERATION #include <phylanx/config.hpp> #include <phylanx/execution_tree/primitives/base_primitive.hpp> #include <phylanx/execution_tree/primitives/primitive_component_base.hpp> #include <phylanx/ir/node_data.hpp> #include <hpx/lcos/future.hpp> #include <memory> #include <string> #include <utility> #include <vector> namespace phylanx { namespace execution_tree { namespace primitives { class power_operation : public primitive_component_base , public std::enable_shared_from_this<power_operation> { protected: using operand_type = ir::node_data<double>; using operands_type = std::vector<operand_type>; public: static match_pattern_type const match_data; power_operation() = default; power_operation(std::vector<primitive_argument_type>&& operands, std::string const& name, std::string const& codename); hpx::future<primitive_argument_type> eval( std::vector<primitive_argument_type> const& args) const override; private: primitive_argument_type power0d( operand_type&& lhs, operand_type&& rhs) const; primitive_argument_type power1d( operand_type&& lhs, operand_type&& rhs) const; primitive_argument_type power2d( operand_type&& lhs, operand_type&& rhs) const; hpx::future<primitive_argument_type> eval( std::vector<primitive_argument_type> const& operands, std::vector<primitive_argument_type> const& args) const; }; inline primitive create_power_operation(hpx::id_type const& locality, std::vector<primitive_argument_type>&& operands, std::string const& name = "", std::string const& codename = "") { return create_primitive_component( locality, "power", std::move(operands), name, codename); } }}} #endif
/* MIT License * * Copyright (c) 2019 - 2022 Andreas Merkle <web@blue-andi.de> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /******************************************************************************* DESCRIPTION *******************************************************************************/ /** * @brief HTTP response * @author Andreas Merkle <web@blue-andi.de> */ /****************************************************************************** * Includes *****************************************************************************/ #include "HttpResponse.h" #include <new> /****************************************************************************** * Compiler Switches *****************************************************************************/ /****************************************************************************** * Macros *****************************************************************************/ /****************************************************************************** * Types and classes *****************************************************************************/ /****************************************************************************** * Prototypes *****************************************************************************/ /****************************************************************************** * Local Variables *****************************************************************************/ /****************************************************************************** * Public Methods *****************************************************************************/ HttpResponse& HttpResponse::operator=(const HttpResponse& rsp) { if (this != &rsp) { DLinkedListConstIterator<HttpHeader*> it(rsp.m_headers); m_httpVersion = rsp.m_httpVersion; m_statusCode = rsp.m_statusCode; m_reasonPhrase = rsp.m_reasonPhrase; if (nullptr != m_payload) { delete[] m_payload; } if (nullptr != rsp.m_payload) { m_payload = new(std::nothrow) uint8_t[rsp.m_size]; if (nullptr == m_payload) { m_size = 0U; m_wrIndex = 0U; } else { memcpy(m_payload, rsp.m_payload, rsp.m_size); m_size = rsp.m_size; m_wrIndex = rsp.m_wrIndex; } } if (true == it.first()) { do { HttpHeader* header = new(std::nothrow) HttpHeader; if (nullptr != header) { *header = **it.current(); (void)m_headers.append(header); } } while(true == it.next()); } } return *this; } void HttpResponse::clear() { clearHeaders(); clearPayload(); m_wrIndex = 0U; } void HttpResponse::addStatusLine(const String& line) { const char* SP = " "; int idx = 0; int begin = 0; String statusCode; /* Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF */ /* HTTP-Version */ idx = line.indexOf(SP); m_httpVersion = line.substring(begin, idx); /* Overstep all spaces */ while(('\0' != line[idx]) && (' ' == line[idx])) { ++idx; } begin = idx; /* Status-Code */ idx = line.indexOf(SP, begin); statusCode = line.substring(begin, idx); m_statusCode = statusCode.toInt(); /* Overstep all spaces */ while(('\0' != line[idx]) && (' ' == line[idx])) { ++idx; } begin = idx; /* Reason-Phrase */ m_reasonPhrase = line.substring(begin); } void HttpResponse::addHeader(const String& line) { HttpHeader* header = new(std::nothrow) HttpHeader(line); if (nullptr != header) { m_headers.append(header); } } void HttpResponse::extendPayload(size_t size) { uint8_t* tmp = m_payload; m_payload = new(std::nothrow) uint8_t[m_size + size]; if (nullptr != m_payload) { m_size += size; } if ((nullptr != m_payload) && (nullptr != tmp)) { memcpy(m_payload, tmp, m_wrIndex); } if (nullptr != tmp) { delete[] tmp; } } void HttpResponse::addPayload(const uint8_t* payload, size_t size) { if ((nullptr == m_payload) || ((m_size - m_wrIndex) < size)) { extendPayload(size); } if ((nullptr != m_payload) && ((m_size - m_wrIndex) >= size)) { memcpy(&m_payload[m_wrIndex], payload, size); m_wrIndex += size; } } String HttpResponse::getHttpVersion() const { return m_httpVersion; } uint16_t HttpResponse::getStatusCode() const { return m_statusCode; } String HttpResponse::getReasonPhrase() const { return m_reasonPhrase; } String HttpResponse::getHeader(const String& name) { String value; DLinkedListIterator<HttpHeader*> it(m_headers); if (true == it.first()) { HttpHeader* hdr = nullptr; bool isFound = false; do { hdr = *it.current(); if ((nullptr != hdr) && (0U != hdr->getName().equalsIgnoreCase(name))) { value = hdr->getValue(); isFound = true; } } while((false == isFound) && (true == it.next())); } return value; } const uint8_t* HttpResponse::getPayload(size_t& size) const { size = m_size; return m_payload; } /****************************************************************************** * Protected Methods *****************************************************************************/ /****************************************************************************** * Private Methods *****************************************************************************/ void HttpResponse::clearHeaders() { DLinkedListIterator<HttpHeader*> it(m_headers); while(true == it.first()) { HttpHeader* header = *it.current(); it.remove(); delete header; } } void HttpResponse::clearPayload() { if (nullptr != m_payload) { delete[] m_payload; m_payload = nullptr; } m_size = 0U; } /****************************************************************************** * External Functions *****************************************************************************/ /****************************************************************************** * Local Functions *****************************************************************************/
#include "ocLog.h"
/* Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org Copyright (C) 2006, 2007 Sony Computer Entertainment Inc. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ #include "btGeneric6DofSpringConstraint.h" #include "btRigidBody.h" #include "btTransformUtil.h" btGeneric6DofSpringConstraint::btGeneric6DofSpringConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA) : btGeneric6DofConstraint(rbA, rbB, frameInA, frameInB, useLinearReferenceFrameA) { init(); } btGeneric6DofSpringConstraint::btGeneric6DofSpringConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameB) : btGeneric6DofConstraint(rbB, frameInB, useLinearReferenceFrameB) { init(); } void btGeneric6DofSpringConstraint::init() { m_objectType = D6_SPRING_CONSTRAINT_TYPE; for(int i = 0; i < 6; i++) { m_springEnabled[i] = false; m_equilibriumPoint[i] = btScalar(0.f); m_springStiffness[i] = btScalar(0.f); m_springDamping[i] = btScalar(1.f); } } void btGeneric6DofSpringConstraint::enableSpring(int index, bool onOff) { btAssert((index >= 0) && (index < 6)); m_springEnabled[index] = onOff; if(index < 3) { m_linearLimits.m_enableMotor[index] = onOff; } else { m_angularLimits[index - 3].m_enableMotor = onOff; } } void btGeneric6DofSpringConstraint::setStiffness(int index, btScalar stiffness) { btAssert((index >= 0) && (index < 6)); m_springStiffness[index] = stiffness; } void btGeneric6DofSpringConstraint::setDamping(int index, btScalar damping) { btAssert((index >= 0) && (index < 6)); m_springDamping[index] = damping; } void btGeneric6DofSpringConstraint::setEquilibriumPoint() { calculateTransforms(); int i; for( i = 0; i < 3; i++) { m_equilibriumPoint[i] = m_calculatedLinearDiff[i]; } for(i = 0; i < 3; i++) { m_equilibriumPoint[i + 3] = m_calculatedAxisAngleDiff[i]; } } void btGeneric6DofSpringConstraint::setEquilibriumPoint(int index) { btAssert((index >= 0) && (index < 6)); calculateTransforms(); if(index < 3) { m_equilibriumPoint[index] = m_calculatedLinearDiff[index]; } else { m_equilibriumPoint[index] = m_calculatedAxisAngleDiff[index - 3]; } } void btGeneric6DofSpringConstraint::setEquilibriumPoint(int index, btScalar val) { btAssert((index >= 0) && (index < 6)); m_equilibriumPoint[index] = val; } void btGeneric6DofSpringConstraint::internalUpdateSprings(btConstraintInfo2* info) { // it is assumed that calculateTransforms() have been called before this call int i; btVector3 relVel = m_rbB.getLinearVelocity() - m_rbA.getLinearVelocity(); for(i = 0; i < 3; i++) { if(m_springEnabled[i]) { // get current position of constraint btScalar currPos = m_calculatedLinearDiff[i]; // calculate difference btScalar delta = currPos - m_equilibriumPoint[i]; // spring force is (delta * m_stiffness) according to Hooke's Law btScalar force = delta * m_springStiffness[i]; btScalar velFactor = info->fps * m_springDamping[i] / btScalar(info->m_numIterations); m_linearLimits.m_targetVelocity[i] = velFactor * force; m_linearLimits.m_maxMotorForce[i] = btFabs(force) / info->fps; } } for(i = 0; i < 3; i++) { if(m_springEnabled[i + 3]) { // get current position of constraint btScalar currPos = m_calculatedAxisAngleDiff[i]; // calculate difference btScalar delta = currPos - m_equilibriumPoint[i+3]; // spring force is (-delta * m_stiffness) according to Hooke's Law btScalar force = -delta * m_springStiffness[i+3]; btScalar velFactor = info->fps * m_springDamping[i+3] / btScalar(info->m_numIterations); m_angularLimits[i].m_targetVelocity = velFactor * force; m_angularLimits[i].m_maxMotorForce = btFabs(force) / info->fps; } } } void btGeneric6DofSpringConstraint::getInfo2(btConstraintInfo2* info) { // this will be called by constraint solver at the constraint setup stage // set current motor parameters internalUpdateSprings(info); // do the rest of job for constraint setup btGeneric6DofConstraint::getInfo2(info); } void btGeneric6DofSpringConstraint::setAxis(const btVector3& axis1,const btVector3& axis2) { btVector3 zAxis = axis1.normalized(); btVector3 yAxis = axis2.normalized(); btVector3 xAxis = yAxis.cross(zAxis); // we want right coordinate system btTransform frameInW; frameInW.setIdentity(); frameInW.getBasis().setValue( xAxis[0], yAxis[0], zAxis[0], xAxis[1], yAxis[1], zAxis[1], xAxis[2], yAxis[2], zAxis[2]); // now get constraint frame in local coordinate systems m_frameInA = m_rbA.getCenterOfMassTransform().inverse() * frameInW; m_frameInB = m_rbB.getCenterOfMassTransform().inverse() * frameInW; calculateTransforms(); }
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "extern/beatsaber-hook/shared/utils/typedefs.h" #include "extern/beatsaber-hook/shared/utils/byref.hpp" // Including type: Org.BouncyCastle.Asn1.Asn1Encodable #include "Org/BouncyCastle/Asn1/Asn1Encodable.hpp" // Including type: Org.BouncyCastle.Asn1.IAsn1Choice #include "Org/BouncyCastle/Asn1/IAsn1Choice.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 // Begin forward declares // Forward declaring namespace: Org::BouncyCastle::Asn1 namespace Org::BouncyCastle::Asn1 { // Forward declaring type: Asn1Object class Asn1Object; } // Completed forward declares // Type namespace: Org.BouncyCastle.Asn1.X509 namespace Org::BouncyCastle::Asn1::X509 { // Size: 0x1C #pragma pack(push, 1) // Autogenerated type: Org.BouncyCastle.Asn1.X509.GeneralName // [TokenAttribute] Offset: FFFFFFFF class GeneralName : public Org::BouncyCastle::Asn1::Asn1Encodable/*, public Org::BouncyCastle::Asn1::IAsn1Choice*/ { public: // readonly Org.BouncyCastle.Asn1.Asn1Encodable obj // Size: 0x8 // Offset: 0x10 Org::BouncyCastle::Asn1::Asn1Encodable* obj; // Field size check static_assert(sizeof(Org::BouncyCastle::Asn1::Asn1Encodable*) == 0x8); // readonly System.Int32 tag // Size: 0x4 // Offset: 0x18 int tag; // Field size check static_assert(sizeof(int) == 0x4); // Creating value type constructor for type: GeneralName GeneralName(Org::BouncyCastle::Asn1::Asn1Encodable* obj_ = {}, int tag_ = {}) noexcept : obj{obj_}, tag{tag_} {} // Creating interface conversion operator: operator Org::BouncyCastle::Asn1::IAsn1Choice operator Org::BouncyCastle::Asn1::IAsn1Choice() noexcept { return *reinterpret_cast<Org::BouncyCastle::Asn1::IAsn1Choice*>(this); } // Get instance field reference: readonly Org.BouncyCastle.Asn1.Asn1Encodable obj Org::BouncyCastle::Asn1::Asn1Encodable*& dyn_obj(); // Get instance field reference: readonly System.Int32 tag int& dyn_tag(); // public System.Int32 get_TagNo() // Offset: 0x19FF214 int get_TagNo(); // public Org.BouncyCastle.Asn1.Asn1Encodable get_Name() // Offset: 0x19FF21C Org::BouncyCastle::Asn1::Asn1Encodable* get_Name(); // public System.Void .ctor(System.Int32 tag, Org.BouncyCastle.Asn1.Asn1Encodable name) // Offset: 0x19FED68 template<::il2cpp_utils::CreationType creationType = ::il2cpp_utils::CreationType::Temporary> static GeneralName* New_ctor(int tag, Org::BouncyCastle::Asn1::Asn1Encodable* name) { static auto ___internal__logger = ::Logger::get().WithContext("Org::BouncyCastle::Asn1::X509::GeneralName::.ctor"); return THROW_UNLESS((::il2cpp_utils::New<GeneralName*, creationType>(tag, name))); } // static public Org.BouncyCastle.Asn1.X509.GeneralName GetInstance(System.Object obj) // Offset: 0x19FEDA4 static Org::BouncyCastle::Asn1::X509::GeneralName* GetInstance(::Il2CppObject* obj); // public override System.String ToString() // Offset: 0x19FF224 // Implemented from: System.Object // Base method: System.String Object::ToString() ::Il2CppString* ToString(); // public override Org.BouncyCastle.Asn1.Asn1Object ToAsn1Object() // Offset: 0x19FF3EC // Implemented from: Org.BouncyCastle.Asn1.Asn1Encodable // Base method: Org.BouncyCastle.Asn1.Asn1Object Asn1Encodable::ToAsn1Object() Org::BouncyCastle::Asn1::Asn1Object* ToAsn1Object(); }; // Org.BouncyCastle.Asn1.X509.GeneralName #pragma pack(pop) static check_size<sizeof(GeneralName), 24 + sizeof(int)> __Org_BouncyCastle_Asn1_X509_GeneralNameSizeCheck; static_assert(sizeof(GeneralName) == 0x1C); } DEFINE_IL2CPP_ARG_TYPE(Org::BouncyCastle::Asn1::X509::GeneralName*, "Org.BouncyCastle.Asn1.X509", "GeneralName"); #include "extern/beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp" // Writing MetadataGetter for method: Org::BouncyCastle::Asn1::X509::GeneralName::get_TagNo // Il2CppName: get_TagNo template<> struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<int (Org::BouncyCastle::Asn1::X509::GeneralName::*)()>(&Org::BouncyCastle::Asn1::X509::GeneralName::get_TagNo)> { static const MethodInfo* get() { return ::il2cpp_utils::FindMethod(classof(Org::BouncyCastle::Asn1::X509::GeneralName*), "get_TagNo", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{}); } }; // Writing MetadataGetter for method: Org::BouncyCastle::Asn1::X509::GeneralName::get_Name // Il2CppName: get_Name template<> struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<Org::BouncyCastle::Asn1::Asn1Encodable* (Org::BouncyCastle::Asn1::X509::GeneralName::*)()>(&Org::BouncyCastle::Asn1::X509::GeneralName::get_Name)> { static const MethodInfo* get() { return ::il2cpp_utils::FindMethod(classof(Org::BouncyCastle::Asn1::X509::GeneralName*), "get_Name", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{}); } }; // Writing MetadataGetter for method: Org::BouncyCastle::Asn1::X509::GeneralName::New_ctor // Il2CppName: .ctor // Cannot get method pointer of value based method overload from template for constructor! // Try using FindMethod instead! // Writing MetadataGetter for method: Org::BouncyCastle::Asn1::X509::GeneralName::GetInstance // Il2CppName: GetInstance template<> struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<Org::BouncyCastle::Asn1::X509::GeneralName* (*)(::Il2CppObject*)>(&Org::BouncyCastle::Asn1::X509::GeneralName::GetInstance)> { static const MethodInfo* get() { static auto* obj = &::il2cpp_utils::GetClassFromName("System", "Object")->byval_arg; return ::il2cpp_utils::FindMethod(classof(Org::BouncyCastle::Asn1::X509::GeneralName*), "GetInstance", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{obj}); } }; // Writing MetadataGetter for method: Org::BouncyCastle::Asn1::X509::GeneralName::ToString // Il2CppName: ToString template<> struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<::Il2CppString* (Org::BouncyCastle::Asn1::X509::GeneralName::*)()>(&Org::BouncyCastle::Asn1::X509::GeneralName::ToString)> { static const MethodInfo* get() { return ::il2cpp_utils::FindMethod(classof(Org::BouncyCastle::Asn1::X509::GeneralName*), "ToString", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{}); } }; // Writing MetadataGetter for method: Org::BouncyCastle::Asn1::X509::GeneralName::ToAsn1Object // Il2CppName: ToAsn1Object template<> struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<Org::BouncyCastle::Asn1::Asn1Object* (Org::BouncyCastle::Asn1::X509::GeneralName::*)()>(&Org::BouncyCastle::Asn1::X509::GeneralName::ToAsn1Object)> { static const MethodInfo* get() { return ::il2cpp_utils::FindMethod(classof(Org::BouncyCastle::Asn1::X509::GeneralName*), "ToAsn1Object", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{}); } };
/* * TestBase.cpp * * Created on: 31 Oct 2017 * Author: julianporter */ #include "TestBase.hpp" #include <iostream> namespace test { int ConversionTestBase::push(double error,double threshold) { errors.push_back(error); return (error>threshold) ? 1 : 0; } void ConversionTestBase::testAction() { for(auto i=0;i<nTests;i++) { try { good+=action(); count++; } catch(std::exception &e) { std::cerr << "Exception on test " << i << " : " << e.what() << std::endl; crashes++; } } if(errors.empty()) { std::cout << nTests << " tests : count = " << count << " good = " << good << " crashes = " << crashes << std::endl; } else { auto e=std::min_element(errors.begin(),errors.end()); std::cout << nTests << " tests : count = " << count << " good = " << good << " minimum log10 error = " << *e << " crashes = " << crashes << std::endl; } CPPUNIT_ASSERT( good == count ); } } /* namespace test */
// Copyright (c) 2011-2018 The Pocketcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <interfaces/node.h> #include <qt/trafficgraphwidget.h> #include <qt/clientmodel.h> #include <QPainter> #include <QColor> #include <QTimer> #include <cmath> #define DESIRED_SAMPLES 800 #define XMARGIN 10 #define YMARGIN 10 TrafficGraphWidget::TrafficGraphWidget(QWidget *parent) : QWidget(parent), timer(0), fMax(0.0f), nMins(0), vSamplesIn(), vSamplesOut(), nLastBytesIn(0), nLastBytesOut(0), clientModel(0) { timer = new QTimer(this); connect(timer, &QTimer::timeout, this, &TrafficGraphWidget::updateRates); } void TrafficGraphWidget::setClientModel(ClientModel *model) { clientModel = model; if(model) { nLastBytesIn = model->node().getTotalBytesRecv(); nLastBytesOut = model->node().getTotalBytesSent(); } } int TrafficGraphWidget::getGraphRangeMins() const { return nMins; } void TrafficGraphWidget::paintPath(QPainterPath &path, QQueue<float> &samples) { int sampleCount = samples.size(); if(sampleCount > 0) { int h = height() - YMARGIN * 2, w = width() - XMARGIN * 2; int x = XMARGIN + w; path.moveTo(x, YMARGIN + h); for(int i = 0; i < sampleCount; ++i) { x = XMARGIN + w - w * i / DESIRED_SAMPLES; int y = YMARGIN + h - (int)(h * samples.at(i) / fMax); path.lineTo(x, y); } path.lineTo(x, YMARGIN + h); } } void TrafficGraphWidget::paintEvent(QPaintEvent *) { QPainter painter(this); painter.fillRect(rect(), Qt::black); if(fMax <= 0.0f) return; QColor axisCol(Qt::gray); int h = height() - YMARGIN * 2; painter.setPen(axisCol); painter.drawLine(XMARGIN, YMARGIN + h, width() - XMARGIN, YMARGIN + h); // decide what order of magnitude we are int base = floor(log10(fMax)); float val = pow(10.0f, base); const QString units = tr("KB/s"); const float yMarginText = 2.0; // draw lines painter.setPen(axisCol); painter.drawText(XMARGIN, YMARGIN + h - h * val / fMax-yMarginText, QString("%1 %2").arg(val).arg(units)); for(float y = val; y < fMax; y += val) { int yy = YMARGIN + h - h * y / fMax; painter.drawLine(XMARGIN, yy, width() - XMARGIN, yy); } // if we drew 3 or fewer lines, break them up at the next lower order of magnitude if(fMax / val <= 3.0f) { axisCol = axisCol.darker(); val = pow(10.0f, base - 1); painter.setPen(axisCol); painter.drawText(XMARGIN, YMARGIN + h - h * val / fMax-yMarginText, QString("%1 %2").arg(val).arg(units)); int count = 1; for(float y = val; y < fMax; y += val, count++) { // don't overwrite lines drawn above if(count % 10 == 0) continue; int yy = YMARGIN + h - h * y / fMax; painter.drawLine(XMARGIN, yy, width() - XMARGIN, yy); } } if(!vSamplesIn.empty()) { QPainterPath p; paintPath(p, vSamplesIn); painter.fillPath(p, QColor(0, 255, 0, 128)); painter.setPen(Qt::green); painter.drawPath(p); } if(!vSamplesOut.empty()) { QPainterPath p; paintPath(p, vSamplesOut); painter.fillPath(p, QColor(255, 0, 0, 128)); painter.setPen(Qt::red); painter.drawPath(p); } } void TrafficGraphWidget::updateRates() { if(!clientModel) return; quint64 bytesIn = clientModel->node().getTotalBytesRecv(), bytesOut = clientModel->node().getTotalBytesSent(); float inRate = (bytesIn - nLastBytesIn) / 1024.0f * 1000 / timer->interval(); float outRate = (bytesOut - nLastBytesOut) / 1024.0f * 1000 / timer->interval(); vSamplesIn.push_front(inRate); vSamplesOut.push_front(outRate); nLastBytesIn = bytesIn; nLastBytesOut = bytesOut; while(vSamplesIn.size() > DESIRED_SAMPLES) { vSamplesIn.pop_back(); } while(vSamplesOut.size() > DESIRED_SAMPLES) { vSamplesOut.pop_back(); } float tmax = 0.0f; for (const float f : vSamplesIn) { if(f > tmax) tmax = f; } for (const float f : vSamplesOut) { if(f > tmax) tmax = f; } fMax = tmax; update(); } void TrafficGraphWidget::setGraphRangeMins(int mins) { nMins = mins; int msecsPerSample = nMins * 60 * 1000 / DESIRED_SAMPLES; timer->stop(); timer->setInterval(msecsPerSample); clear(); } void TrafficGraphWidget::clear() { timer->stop(); vSamplesOut.clear(); vSamplesIn.clear(); fMax = 0.0f; if(clientModel) { nLastBytesIn = clientModel->node().getTotalBytesRecv(); nLastBytesOut = clientModel->node().getTotalBytesSent(); } timer->start(); }
/* Copyright 2018 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/data/shuffle_and_repeat_fusion.h" #include "absl/container/flat_hash_set.h" #include "tensorflow/core/framework/attr_value.pb.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/mutable_graph_view.h" #include "tensorflow/core/grappler/op_types.h" #include "tensorflow/core/grappler/optimizers/custom_graph_optimizer_registry.h" #include "tensorflow/core/grappler/optimizers/data/graph_utils.h" #include "tensorflow/core/grappler/utils.h" #include "tensorflow/core/platform/protobuf.h" namespace tensorflow { namespace grappler { namespace { constexpr char kFusedOpName[] = "ShuffleAndRepeatDataset"; } // namespace Status ShuffleAndRepeatFusion::OptimizeAndCollectStats( Cluster* cluster, const GrapplerItem& item, GraphDef* output, OptimizationStats* stats) { *output = item.graph; MutableGraphView graph(output); absl::flat_hash_set<string> nodes_to_delete; auto make_shuffle_and_repeat_node = [&output](const NodeDef& shuffle_node, const NodeDef& repeat_node) { NodeDef new_node; new_node.set_op(kFusedOpName); graph_utils::SetUniqueGraphNodeName(kFusedOpName, output, &new_node); // Set the `input` input argument. new_node.add_input(shuffle_node.input(0)); // Set the `buffer_size` input argument. new_node.add_input(shuffle_node.input(1)); // Set the `seed` input argument. new_node.add_input(shuffle_node.input(2)); // Set the `seed2` input argument. new_node.add_input(shuffle_node.input(3)); // Set the `count` input argument. new_node.add_input(repeat_node.input(1)); // Set `output_types` and `output_shapes` attributes. for (auto key : {"output_shapes", "output_types"}) { graph_utils::CopyAttribute(key, repeat_node, &new_node); } return new_node; }; for (const NodeDef& node : item.graph.node()) { if (node.op() != "RepeatDataset") { continue; } // Use a more descriptive variable name now that we know the node type. const NodeDef& repeat_node = node; NodeDef* node2 = graph_utils::GetInputNode(repeat_node, graph); if (node2->op() != "ShuffleDataset") { continue; } // Use a more descriptive variable name now that we know the node type. const NodeDef& shuffle_node = *node2; NodeDef* shuffle_and_repeat_node = graph.AddNode(make_shuffle_and_repeat_node(shuffle_node, repeat_node)); TF_RETURN_IF_ERROR(graph.UpdateFanouts(repeat_node.name(), shuffle_and_repeat_node->name())); // Mark the `Shuffle` and `Repeat` nodes for removal. nodes_to_delete.insert(shuffle_node.name()); nodes_to_delete.insert(repeat_node.name()); stats->num_changes++; } TF_RETURN_IF_ERROR(graph.DeleteNodes(nodes_to_delete)); return Status::OK(); } void ShuffleAndRepeatFusion::Feedback(Cluster* cluster, const GrapplerItem& item, const GraphDef& optimize_output, double result) { // no-op } REGISTER_GRAPH_OPTIMIZER_AS(ShuffleAndRepeatFusion, "shuffle_and_repeat_fusion"); } // namespace grappler } // namespace tensorflow
//*********************************************************************** // program to merge Landsat image image over a period // //*********************************************************************** #include "stdafx.h" #include <iostream> #include "MedianImage.h" using namespace std; using namespace WBSF; //*********************************************************************** // // Main // //*********************************************************************** int _tmain(int argc, _TCHAR* argv[]) { CTimer timer(true); //Create a medianImages object CMedianImage medianImage; ERMsg msg = medianImage.m_options.ParseOption(argc, argv); if( !msg || !medianImage.m_options.m_bQuiet ) cout << medianImage.GetDescription() << endl; if( msg ) msg = medianImage.Execute(); if( !msg) { PrintMessage(msg); return -1; } timer.Stop(); if( !medianImage.m_options.m_bQuiet ) cout << endl << "Total time = " << SecondToDHMS(timer.Elapsed()) << endl; int nRetCode = 0; }
/** \class RecHitFilter ** simple filter of EcalRecHits ** ** \author Shahram Rahatlou, University of Rome & INFN, May 2006 ** ***/ #include "DataFormats/Common/interface/Handle.h" #include "DataFormats/EcalDetId/interface/EBDetId.h" #include "DataFormats/EcalRecHit/interface/EcalRecHit.h" #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/Framework/interface/global/EDProducer.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include <iostream> #include <memory> #include <vector> class RecHitFilter : public edm::global::EDProducer<> { public: RecHitFilter(const edm::ParameterSet& ps); ~RecHitFilter() override; void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; private: const double noiseEnergyThreshold_; const double noiseChi2Threshold_; const std::string reducedHitCollection_; const edm::EDGetTokenT<EcalRecHitCollection> hitCollection_; }; #include "FWCore/Framework/interface/MakerMacros.h" DEFINE_FWK_MODULE(RecHitFilter); RecHitFilter::RecHitFilter(const edm::ParameterSet& ps) : noiseEnergyThreshold_(ps.getParameter<double>("noiseEnergyThreshold")), noiseChi2Threshold_(ps.getParameter<double>("noiseChi2Threshold")), reducedHitCollection_(ps.getParameter<std::string>("reducedHitCollection")), hitCollection_(consumes<EcalRecHitCollection>(ps.getParameter<edm::InputTag>("hitCollection"))) { produces<EcalRecHitCollection>(reducedHitCollection_); } RecHitFilter::~RecHitFilter() {} void RecHitFilter::produce(edm::StreamID, edm::Event& evt, const edm::EventSetup& es) const { // get the hit collection from the event: edm::Handle<EcalRecHitCollection> rhcHandle; evt.getByToken(hitCollection_, rhcHandle); const EcalRecHitCollection* hit_collection = rhcHandle.product(); int nTot = hit_collection->size(); int nRed = 0; // create a unique_ptr to a BasicClusterCollection, copy the clusters into it and put in the Event: auto redCollection = std::make_unique<EcalRecHitCollection>(); for (EcalRecHitCollection::const_iterator it = hit_collection->begin(); it != hit_collection->end(); ++it) { //std::cout << *it << std::endl; if (it->energy() > noiseEnergyThreshold_ && it->chi2() < noiseChi2Threshold_) { nRed++; redCollection->push_back(EcalRecHit(*it)); } } edm::LogInfo("") << "total # hits: " << nTot << " #hits with E > " << noiseEnergyThreshold_ << " GeV and chi2 < " << noiseChi2Threshold_ << " : " << nRed << std::endl; evt.put(std::move(redCollection), reducedHitCollection_); }
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. #include "db/log_reader.h" #include <stdio.h> #include "unikv/env.h" #include "util/coding.h" #include "util/crc32c.h" namespace unikv { namespace log { Reader::Reporter::~Reporter() { } Reader::Reader(SequentialFile* file, Reporter* reporter, bool checksum, uint64_t initial_offset) : file_(file), reporter_(reporter), checksum_(checksum), backing_store_(new char[kBlockSize]), buffer_(), eof_(false), last_record_offset_(0), end_of_buffer_offset_(0), initial_offset_(initial_offset) { } Reader::~Reader() { delete[] backing_store_; } bool Reader::SkipToInitialBlock() { size_t offset_in_block = initial_offset_ % kBlockSize; uint64_t block_start_location = initial_offset_ - offset_in_block; // Don't search a block if we'd be in the trailer if (offset_in_block > kBlockSize - 6) { offset_in_block = 0; block_start_location += kBlockSize; } end_of_buffer_offset_ = block_start_location; // Skip to start of first block that can contain the initial record if (block_start_location > 0) { Status skip_status = file_->Skip(block_start_location); if (!skip_status.ok()) { ReportDrop(block_start_location, skip_status); return false; } } return true; } bool Reader::ReadRecord(Slice* record, std::string* scratch) { if (last_record_offset_ < initial_offset_) { if (!SkipToInitialBlock()) { return false; } } scratch->clear(); record->clear(); bool in_fragmented_record = false; // Record offset of the logical record that we're reading // 0 is a dummy value to make compilers happy uint64_t prospective_record_offset = 0; Slice fragment; while (true) { uint64_t physical_record_offset = end_of_buffer_offset_ - buffer_.size(); const unsigned int record_type = ReadPhysicalRecord(&fragment); switch (record_type) { case kFullType: if (in_fragmented_record) { // Handle bug in earlier versions of log::Writer where // it could emit an empty kFirstType record at the tail end // of a block followed by a kFullType or kFirstType record // at the beginning of the next block. if (scratch->empty()) { in_fragmented_record = false; } else { ReportCorruption(scratch->size(), "partial record without end(1)"); } } prospective_record_offset = physical_record_offset; scratch->clear(); *record = fragment; last_record_offset_ = prospective_record_offset; return true; case kFirstType: if (in_fragmented_record) { // Handle bug in earlier versions of log::Writer where // it could emit an empty kFirstType record at the tail end // of a block followed by a kFullType or kFirstType record // at the beginning of the next block. if (scratch->empty()) { in_fragmented_record = false; } else { ReportCorruption(scratch->size(), "partial record without end(2)"); } } prospective_record_offset = physical_record_offset; scratch->assign(fragment.data(), fragment.size()); in_fragmented_record = true; break; case kMiddleType: if (!in_fragmented_record) { ReportCorruption(fragment.size(), "missing start of fragmented record(1)"); } else { scratch->append(fragment.data(), fragment.size()); } break; case kLastType: if (!in_fragmented_record) { ReportCorruption(fragment.size(), "missing start of fragmented record(2)"); } else { scratch->append(fragment.data(), fragment.size()); *record = Slice(*scratch); last_record_offset_ = prospective_record_offset; return true; } break; case kEof: if (in_fragmented_record) { // This can be caused by the writer dying immediately after // writing a physical record but before completing the next; don't // treat it as a corruption, just ignore the entire logical record. scratch->clear(); } return false; case kBadRecord: if (in_fragmented_record) { ReportCorruption(scratch->size(), "error in middle of record"); in_fragmented_record = false; scratch->clear(); } break; default: { char buf[40]; snprintf(buf, sizeof(buf), "unknown record type %u", record_type); ReportCorruption( (fragment.size() + (in_fragmented_record ? scratch->size() : 0)), buf); in_fragmented_record = false; scratch->clear(); break; } } } return false; } uint64_t Reader::LastRecordOffset() { return last_record_offset_; } void Reader::ReportCorruption(size_t bytes, const char* reason) { ReportDrop(bytes, Status::Corruption(reason)); } void Reader::ReportDrop(size_t bytes, const Status& reason) { if (reporter_ != NULL && end_of_buffer_offset_ - buffer_.size() - bytes >= initial_offset_) { reporter_->Corruption(bytes, reason); } } unsigned int Reader::ReadPhysicalRecord(Slice* result) { while (true) { if (buffer_.size() < kHeaderSize) { if (!eof_) { // Last read was a full read, so this is a trailer to skip buffer_.clear(); Status status = file_->Read(kBlockSize, &buffer_, backing_store_); end_of_buffer_offset_ += buffer_.size(); if (!status.ok()) { buffer_.clear(); ReportDrop(kBlockSize, status); eof_ = true; return kEof; } else if (buffer_.size() < kBlockSize) { eof_ = true; } continue; } else { // Note that if buffer_ is non-empty, we have a truncated header at the // end of the file, which can be caused by the writer crashing in the // middle of writing the header. Instead of considering this an error, // just report EOF. buffer_.clear(); return kEof; } } // Parse the header const char* header = buffer_.data(); const uint32_t a = static_cast<uint32_t>(header[4]) & 0xff; const uint32_t b = static_cast<uint32_t>(header[5]) & 0xff; const unsigned int type = header[6]; const uint32_t length = a | (b << 8); if (kHeaderSize + length > buffer_.size()) { size_t drop_size = buffer_.size(); buffer_.clear(); if (!eof_) { ReportCorruption(drop_size, "bad record length"); return kBadRecord; } // If the end of the file has been reached without reading |length| bytes // of payload, assume the writer died in the middle of writing the record. // Don't report a corruption. return kEof; } if (type == kZeroType && length == 0) { // Skip zero length record without reporting any drops since // such records are produced by the mmap based writing code in // env_posix.cc that preallocates file regions. buffer_.clear(); return kBadRecord; } // Check crc if (checksum_) { uint32_t expected_crc = crc32c::Unmask(DecodeFixed32(header)); uint32_t actual_crc = crc32c::Value(header + 6, 1 + length); if (actual_crc != expected_crc) { // Drop the rest of the buffer since "length" itself may have // been corrupted and if we trust it, we could find some // fragment of a real log record that just happens to look // like a valid log record. size_t drop_size = buffer_.size(); buffer_.clear(); ReportCorruption(drop_size, "checksum mismatch"); return kBadRecord; } } buffer_.remove_prefix(kHeaderSize + length); // Skip physical record that started before initial_offset_ if (end_of_buffer_offset_ - buffer_.size() - kHeaderSize - length < initial_offset_) { result->clear(); return kBadRecord; } *result = Slice(header + kHeaderSize, length); return type; } } } // namespace log } // namespace unikv
/* * 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. */ /*! * \file np_elemwise_binary_op_sub.cc * \brief CPU Implementation of basic functions for elementwise numpy binary subtract. */ #include "./np_elemwise_broadcast_op.h" namespace mxnet { namespace op { MXNET_OPERATOR_REGISTER_NP_BINARY_MIXED_PRECISION(_npi_subtract) .set_attr<FCompute>( "FCompute<cpu>", NumpyBinaryBroadcastCompute<cpu, op::mshadow_op::minus, op::mshadow_op::mixed_minus, op::mshadow_op::mixed_rminus>) .set_attr<nnvm::FGradient>("FGradient", ElemwiseGradUseIn{"_backward_npi_broadcast_sub"}); NNVM_REGISTER_OP(_backward_npi_broadcast_sub) .set_num_inputs(3) .set_num_outputs(2) .set_attr<nnvm::TIsBackward>("TIsBackward", true) .set_attr<nnvm::FInplaceOption>("FInplaceOption", [](const NodeAttrs& attrs){ return std::vector<std::pair<int, int> >{{0, 0}, {0, 1}}; }) .set_attr<FResourceRequest>("FResourceRequest", [](const NodeAttrs& attrs) { return std::vector<ResourceRequest>{ResourceRequest::kTempSpace}; }) .set_attr<FCompute>("FCompute<cpu>", NumpyBinaryBackwardUseIn<cpu, mshadow_op::posone, mshadow_op::negone>); } // namespace op } // namespace mxnet
/* ----------------------------------------------------------------------------- * This file is a part of the UNIVIO project: https://github.com/nvitya/univio * Copyright (c) 2022 Viktor Nagy, nvitya * * This software is provided 'as-is', without any express or implied warranty. * In no event will the authors be held liable for any damages arising from * the use of this software. Permission is granted to anyone to use this * software for any purpose, including commercial applications, and to alter * it and redistribute it freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software in * a product, an acknowledgment in the product documentation would be * appreciated but is not required. * * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * * 3. This notice may not be removed or altered from any source distribution. * --------------------------------------------------------------------------- */ /* * file: usb_cdc_echo.cpp * brief: CDC Echo USB Device definition * version: 1.00 * date: 2020-06-19 * authors: nvitya */ #include "string.h" #include <usb_univio.h> #include "traces.h" #include "hwpins.h" #include "usbdevice.h" #include "hwusbctrl.h" #include "uio_device.h" TUsbDevUio usbdev; TUsbFuncUio usb_func_uio; void usb_device_init() { TRACE("Initializing UnivIO USB Device\r\n"); if (!usbdev.Init()) // calls InitDevice first which sets up the device { TRACE("Error initializing USB device!\r\n"); return; } //TRACE("IF input endpoint: %02X\r\n", uio_cdc_data.ep_input.index); //TRACE("IF output endpoint: %02X\r\n", uio_cdc_data.ep_output.index); } void usb_device_run() { usbdev.HandleIrq(); usbdev.Run(); } //---------------------------------------------------- bool TUifCdcControl::InitInterface() { intfdesc.interface_class = 2; // CDC intfdesc.interface_subclass = 2; // Abstract Control Model intfdesc.interface_protocol = 0; // 0 = no class specitic control interface_name = "UnivIO Control"; desc_cdc_callmgmt.data_interface = index + 1; // the following interface must be the data interface desc_cdc_union.master_interface = index; desc_cdc_union.slave_interface = index + 1; // some other descriptors are required AddConfigDesc((void *)&cdc_desc_header_func[0], true); AddConfigDesc((void *)&desc_cdc_callmgmt, true); AddConfigDesc((void *)&cdc_desc_call_acm_func[0], true); AddConfigDesc((void *)&desc_cdc_union, true); // endpoints ep_manage.Init(HWUSB_EP_TYPE_INTERRUPT, false, 8); ep_manage.interval = 10; // polling interval AddEndpoint(&ep_manage); return true; } void TUifCdcControl::OnConfigured() { //TRACE("SPEC Device Configured.\r\n"); //ep_manage.EnableRecv(); } bool TUifCdcControl::HandleTransferEvent(TUsbEndpoint * aep, bool htod) { return false; } bool TUifCdcControl::HandleSetupRequest(TUsbSetupRequest * psrq) { if (0x20 == psrq->request) // set line coding, data stage follows ! { //TRACE("UIO Ctrl Set line coding (SETUP)\r\n"); device->StartSetupData(); // start receiving the data part, which will be handled at the HandleSetupData() return true; } else if (0x21 == psrq->request) // Get line coding { //TRACE("VCP Get line coding\r\n"); device->StartSendControlData(&linecoding, sizeof(linecoding)); return true; } else if (0x22 == psrq->request) // Set Control Line State { //TRACE("VCP Set Control Line State: %04X\r\n", psrq->value); device->SendControlStatus(true); return true; } return false; } // the setup request's data part comes in a separate phase and so it has a separate callback: bool TUifCdcControl::HandleSetupData(TUsbSetupRequest * psrq, void * adata, unsigned adatalen) { if (0x20 == psrq->request) // set line coding { memcpy(&linecoding, adata, sizeof(linecoding)); //TRACE("%u ", CLOCKCNT / (SystemCoreClock / 1000)); //TRACE("UIO Ctrl Line Coding data:\r\n baud=%i, format=%i, parity=%i, bits=%i\r\n", // linecoding.baudrate, linecoding.charformat, linecoding.paritytype, linecoding.databits //); device->SendControlStatus(true); return true; } return false; } //------------------------------------------------ bool TUsbFuncUio::InitFunction() { funcdesc.function_class = 2; funcdesc.function_sub_class = 2; funcdesc.function_protocol = 1; func_name = "UnivIO Control"; AddInterface(&uif_control); AddInterface(&uif_data); return true; } void TUsbFuncUio::Run() { uif_data.Run(); } //------------------------------------------------ bool TUsbDevUio::InitDevice() { devdesc.vendor_id = g_uiodev.basecfg.usb_vendor_id; if (0 == devdesc.vendor_id) { devdesc.vendor_id = UIO_DEFAULT_VENDOR_ID; } devdesc.product_id = g_uiodev.basecfg.usb_product_id; if (0 == devdesc.product_id) { devdesc.product_id = UIO_DEFAULT_PRODUCT_ID; } devdesc.device_class = 0x02; // Communications and CDC Control manufacturer_name = &g_uiodev.basecfg.manufacturer[0]; device_name = &g_uiodev.basecfg.device_id[0]; device_serial_number = &g_uiodev.basecfg.serial_number[0]; if (strlen(manufacturer_name) == 0) { manufacturer_name = "UnivIO"; } if (strlen(device_name) == 0) { device_name = UIO_FW_ID; } if (strlen(device_serial_number) == 0) { device_serial_number = "1"; } AddFunction(&usb_func_uio); return true; } //------------------------------------------------ bool TUioCdcData::InitInterface() { intfdesc.interface_class = 0x0A; // CDC Data intfdesc.interface_subclass = 0; intfdesc.interface_protocol = 0; // no specific protocol interface_name = "UnivIO Data"; // endpoints ep_input.Init(HWUSB_EP_TYPE_BULK, true, 64); AddEndpoint(&ep_input); ep_output.Init(HWUSB_EP_TYPE_BULK, false, 64); AddEndpoint(&ep_output); Reset(); return true; } void TUioCdcData::OnConfigured() { TRACE("UnivIO Data Interface ready.\r\n"); Reset(); ep_input.EnableRecv(); } bool TUioCdcData::HandleTransferEvent(TUsbEndpoint * aep, bool htod) { int r; if (htod) { // data chunk arrived rxenabled = false; r = ep_input.ReadRecvData(&usb_rxbuf[0], sizeof(usb_rxbuf)); //TRACE("%i byte VCP data arrived\r\n", r); if (r > 0) { usb_rxlen = r; usb_rpos = 0; lastrecvtime = CLOCKCNT; #if 0 TRACE("USB RxDATA: "); for (r = 0; r < usb_rxlen; ++r) TRACE(" %02X", usb_rxbuf[r]); TRACE("\r\n"); #endif HandleRx(); } else { rxenabled = true; ep_input.EnableRecv(); } } else { usb_ready_to_send = true; HandleTx(); } return true; } void TUioCdcData::Reset() { usb_txlen = 0; rxenabled = true; tx_remaining = 0; txstate = 0; } void TUioCdcData::Run() { HandleTx(); HandleRx(); } void TUioCdcData::HandleRx() { while ((rxstate != 50) && (usb_rpos < usb_rxlen)) { uint8_t b = usb_rxbuf[usb_rpos]; //TRACE("< %02X, rxstate=%u\r\n", b, rxstate); if ((rxstate > 0) && (rxstate < 10)) { rxcrc = univio_calc_crc(rxcrc, b); } if (0 == rxstate) // waiting for the sync byte { if (0x55 == b) { rxcrc = univio_calc_crc(0, b); // start the CRC from zero rxstate = 1; } } else if (1 == rxstate) // command and length { if (b & 1) // bit0: 0 = read, 1 = write { rq.iswrite = 1; } else { rq.iswrite = 0; } // calculate the metadata length rq.metalen = ((0x8420 >> (b & 0xC)) & 0xF); rq.length = (b >> 4); rxcnt = 0; if (15 == rq.length) { rxstate = 2; // extended length follows } else { rxstate = 3; // address follows } } else if (2 == rxstate) // extended length { if (0 == rxcnt) { rq.length = b; // low byte rxcnt = 1; } else { rq.length |= (b << 8); // high byte rxcnt = 0; rxstate = 3; // address follows } } else if (3 == rxstate) // address { if (0 == rxcnt) { rq.address = b; // address low rxcnt = 1; } else { rq.address |= (b << 8); // address high rxcnt = 0; if (rq.metalen) { rxstate = 4; // meta follows } else { if (rq.iswrite) { rxstate = 5; // data follows when write } else { rxstate = 10; // then crc check } } } } else if (4 == rxstate) // metadata { rq.metadata[rxcnt] = b; ++rxcnt; if (rxcnt >= rq.metalen) { if (rq.iswrite) { rxcnt = 0; rxstate = 5; // write data follows } else { rxstate = 10; // crc check } } } else if (5 == rxstate) // write data { rq.data[rxcnt] = b; ++rxcnt; if (rxcnt >= rq.length) { rxstate = 10; } } else if (10 == rxstate) // crc check { if (b != rxcrc) { TRACE("CRC error: expected: %02X\r\n", rxcrc); // crc error, no answer ++error_count_crc; rxstate = 0; // go to the next request } else { // execute the request, prepares the answer g_uiodev.HandleRequest(&rq); // the answer is prepared in the rq, send it txstate = 1; // start the answering rxstate = 50; // wait until the response is sent, the HandleTX() might change this HandleTx(); } } ++usb_rpos; } if (0 == txstate) // if answering is finished { if (50 == rxstate) { rxstate = 0; // start the receiving } if (!rxenabled) { rxenabled = true; ep_input.EnableRecv(); } } } void TUioCdcData::HandleTx() { if (0 == txstate) { return; } uint8_t b; if (1 == txstate) // prepare the head { usb_txlen = 0; rq.metalen = 0; // no metadata by anwers yet txcrc = 0; b = 0x55; // sync AddTx(b); b = (rq.iswrite ? 1 : 0); if (rq.result) { // error response b |= (1 << 1) | (2 << 4); // error flag with fix 2 byte data AddTx(b); AddTx(rq.address & 0xFF); // echo the address back AddTx((rq.address >> 8) & 0xFF); AddTx(rq.result & 0xFF); // send the result AddTx((rq.result >> 8) & 0xFF); // send the result txstate = 10; // crc } else { // normal response if (rq.iswrite) { rq.length = 0; } if (rq.length > 14) { b |= 0xF0; AddTx(b); // send the command / length AddTx(rq.length & 0xFF); // add the extended length AddTx((rq.length >> 8) & 0xFF); } else { b |= (rq.length << 4); AddTx(b); // send the command / length } AddTx(rq.address & 0xFF); // echo the address back AddTx((rq.address >> 8) & 0xFF); // no metadata if (rq.length) { tx_dataidx = 0; txstate = 5; // send data body } else { txstate = 10; // crc } } } if (5 == txstate) // sending data body, might be chunked { while (true) { if (tx_dataidx < rq.length) { if (!AddTx(rq.data[tx_dataidx])) // returns false when no more space in the buffer { break; } ++tx_dataidx; } else { txstate = 10; // CRC break; } } } if (10 == txstate) // sending crc { if (AddTx(txcrc)) { txstate = 50; } } // sending buffered data if ((usb_txlen > 0) && usb_ready_to_send) { #if 0 TRACE("USB Tx: "); for (unsigned n = 0; n < usb_txlen; ++n) TRACE(" %02X", usb_txbuf[n]); TRACE("\r\n"); #endif ep_output.StartSendData(&usb_txbuf[0], usb_txlen); usb_ready_to_send = false; usb_txlen = 0; } if (50 == txstate) // wait for last chunk send { if (0 == usb_txlen) { txstate = 0; // go back to idle } } } bool TUioCdcData::AddTx(uint8_t b) { if (usb_txlen >= sizeof(usb_txbuf)) { return false; } usb_txbuf[usb_txlen] = b; txcrc = univio_calc_crc(txcrc, b); ++usb_txlen; return true; }
// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/taskbar/taskbar_decorator_win.h" #include <objbase.h> #include <shobjidl.h> #include <wrl/client.h> #include <memory> #include <utility> #include "base/bind.h" #include "base/location.h" #include "base/metrics/histogram_macros.h" #include "base/strings/utf_string_conversions.h" #include "base/task/post_task.h" #include "base/task/thread_pool.h" #include "base/win/scoped_gdi_object.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/profiles/avatar_menu.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_attributes_storage.h" #include "chrome/browser/profiles/profile_avatar_icon_util.h" #include "chrome/browser/profiles/profile_manager.h" #include "skia/ext/image_operations.h" #include "skia/ext/legacy_display_globals.h" #include "skia/ext/platform_canvas.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkFont.h" #include "third_party/skia/include/core/SkImageEncoder.h" #include "third_party/skia/include/core/SkImageInfo.h" #include "third_party/skia/include/core/SkRRect.h" #include "third_party/skia/include/core/SkStream.h" #include "ui/gfx/icon_util.h" #include "ui/gfx/image/image.h" #include "ui/views/win/hwnd_util.h" namespace taskbar { namespace { constexpr int kOverlayIconSize = 16; // Responsible for invoking TaskbarList::SetOverlayIcon(). The call to // TaskbarList::SetOverlayIcon() runs a nested run loop that proves // problematic when called on the UI thread. Additionally it seems the call may // take a while to complete. For this reason we call it on a worker thread. // // Docs for TaskbarList::SetOverlayIcon() say it does nothing if the HWND is not // valid. void SetOverlayIcon(HWND hwnd, std::unique_ptr<SkBitmap> bitmap, const std::string& alt_text) { Microsoft::WRL::ComPtr<ITaskbarList3> taskbar; HRESULT result = ::CoCreateInstance( CLSID_TaskbarList, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&taskbar)); if (FAILED(result) || FAILED(taskbar->HrInit())) return; base::win::ScopedGDIObject<HICON> icon; if (bitmap) { DCHECK_GE(bitmap.get()->width(), bitmap.get()->height()); // Maintain aspect ratio on resize, but prefer more square. // (We used to round down here, but rounding up produces nicer results.) const int resized_height = std::ceilf( kOverlayIconSize * (static_cast<float>(bitmap.get()->height()) / bitmap.get()->width())); DCHECK_GE(kOverlayIconSize, resized_height); // Since the target size is so small, we use our best resizer. SkBitmap sk_icon = skia::ImageOperations::Resize( *bitmap.get(), skia::ImageOperations::RESIZE_LANCZOS3, kOverlayIconSize, resized_height); // Paint the resized icon onto a 16x16 canvas otherwise Windows will badly // hammer it to 16x16. We'll use a circular clip to be consistent with the // way profile icons are rendered in the profile switcher. SkBitmap offscreen_bitmap; offscreen_bitmap.allocN32Pixels(kOverlayIconSize, kOverlayIconSize); SkCanvas offscreen_canvas(offscreen_bitmap, SkSurfaceProps{}); offscreen_canvas.clear(SK_ColorTRANSPARENT); static const SkRRect overlay_icon_clip = SkRRect::MakeOval(SkRect::MakeWH(kOverlayIconSize, kOverlayIconSize)); offscreen_canvas.clipRRect(overlay_icon_clip, true); // Note: the original code used kOverlayIconSize - resized_height, but in // order to center the icon in the circle clip area, we're going to center // it in the paintable region instead, rounding up to the closest pixel to // avoid smearing. const int y_offset = std::ceilf((kOverlayIconSize - resized_height) / 2.0f); offscreen_canvas.drawImage(sk_icon.asImage(), 0, y_offset); icon = IconUtil::CreateHICONFromSkBitmap(offscreen_bitmap); if (!icon.is_valid()) return; } taskbar->SetOverlayIcon(hwnd, icon.get(), base::UTF8ToWide(alt_text).c_str()); } void PostSetOverlayIcon(HWND hwnd, std::unique_ptr<SkBitmap> bitmap, const std::string& alt_text) { base::ThreadPool::CreateCOMSTATaskRunner( {base::MayBlock(), base::TaskPriority::USER_VISIBLE}) ->PostTask(FROM_HERE, base::BindOnce(&SetOverlayIcon, hwnd, std::move(bitmap), alt_text)); } } // namespace void DrawTaskbarDecorationString(gfx::NativeWindow window, const std::string& content, const std::string& alt_text) { HWND hwnd = views::HWNDForNativeWindow(window); // This is the color used by the Windows 10 Badge API, for platform // consistency. constexpr int kBackgroundColor = SkColorSetRGB(0x26, 0x25, 0x2D); constexpr int kForegroundColor = SK_ColorWHITE; constexpr int kRadius = kOverlayIconSize / 2; // The minimum gap to have between our content and the edge of the badge. constexpr int kMinMargin = 3; // The amount of space we have to render the icon. constexpr int kMaxBounds = kOverlayIconSize - 2 * kMinMargin; constexpr int kMaxTextSize = 24; // Max size for our text. constexpr int kMinTextSize = 7; // Min size for our text. auto badge = std::make_unique<SkBitmap>(); badge->allocN32Pixels(kOverlayIconSize, kOverlayIconSize); SkCanvas canvas(*badge.get(), skia::LegacyDisplayGlobals::GetSkSurfaceProps()); SkPaint paint; paint.setAntiAlias(true); paint.setColor(kBackgroundColor); canvas.clear(SK_ColorTRANSPARENT); canvas.drawCircle(kRadius, kRadius, kRadius, paint); paint.reset(); paint.setColor(kForegroundColor); SkFont font; SkRect bounds; int text_size = kMaxTextSize; // Find the largest |text_size| larger than |kMinTextSize| in which // |content| fits into our 16x16px icon, with margins. do { font.setSize(text_size--); font.measureText(content.c_str(), content.size(), SkTextEncoding::kUTF8, &bounds); } while (text_size >= kMinTextSize && (bounds.width() > kMaxBounds || bounds.height() > kMaxBounds)); canvas.drawSimpleText(content.c_str(), content.size(), SkTextEncoding::kUTF8, kRadius - bounds.width() / 2 - bounds.x(), kRadius - bounds.height() / 2 - bounds.y(), font, paint); PostSetOverlayIcon(hwnd, std::move(badge), alt_text); } void DrawTaskbarDecoration(gfx::NativeWindow window, const gfx::Image* image) { HWND hwnd = views::HWNDForNativeWindow(window); // SetOverlayIcon() does nothing if the window is not visible so testing here // avoids all the wasted effort of the image resizing. if (!::IsWindowVisible(hwnd)) return; // Copy the image since we're going to use it on a separate thread and // gfx::Image isn't thread safe. std::unique_ptr<SkBitmap> bitmap; if (image) { // If `image` is an old avatar, then it's guaranteed to by 2x by code in // ProfileAttributesEntry::GetAvatarIcon(). bitmap = std::make_unique<SkBitmap>( profiles::GetWin2xAvatarIconAsSquare(*image->ToSkBitmap())); } PostSetOverlayIcon(hwnd, std::move(bitmap), ""); } void UpdateTaskbarDecoration(Profile* profile, gfx::NativeWindow window) { if (profile->IsGuestSession() || profile->IsEphemeralGuestProfile() || // Browser process and profile manager may be null in tests. (g_browser_process && g_browser_process->profile_manager() && g_browser_process->profile_manager() ->GetProfileAttributesStorage() .GetNumberOfProfiles() <= 1)) { taskbar::DrawTaskbarDecoration(window, nullptr); return; } // We need to draw the taskbar decoration. Even though we have an icon on the // window's relaunch details, we draw over it because the user may have // pinned the badge-less Chrome shortcut which will cause Windows to ignore // the relaunch details. // TODO(calamity): ideally this should not be necessary but due to issues // with the default shortcut being pinned, we add the runtime badge for // safety. See crbug.com/313800. gfx::Image decoration; AvatarMenu::ImageLoadStatus status = AvatarMenu::GetImageForMenuButton( profile->GetPath(), &decoration, kOverlayIconSize); // If the user is using a Gaia picture and the picture is still being loaded, // wait until the load finishes. This taskbar decoration will be triggered // again upon the finish of the picture load. if (status == AvatarMenu::ImageLoadStatus::LOADING || status == AvatarMenu::ImageLoadStatus::PROFILE_DELETED || status == AvatarMenu::ImageLoadStatus::BROWSER_SHUTTING_DOWN) { return; } taskbar::DrawTaskbarDecoration(window, &decoration); } } // namespace taskbar
#include "ZFImpl_sys_Qt_ZFCore_impl.h" #include "ZFCore/protocol/ZFProtocolZFImplOutput.h" #include "ZFCore/ZFString.h" #if ZF_ENV_sys_Qt #include <QDebug> #include <QMutex> ZF_NAMESPACE_GLOBAL_BEGIN ZFPROTOCOL_IMPLEMENTATION_BEGIN(ZFImplOutputImpl_sys_Qt, ZFImplOutput, ZFProtocolLevel::e_SystemHigh) ZFPROTOCOL_IMPLEMENTATION_PLATFORM_HINT("Qt:qDebug") public: zfoverride virtual void protocolOnDealloc(void) { QMutexLocker _logMutexLocker(&_logMutex); if(this->savedString.length() > 0) { qDebug() << this->savedString.cString(); } zfsuper::protocolOnDealloc(); } public: virtual void outputCoreLog(ZF_IN const zfchar *s) { zfstring tmp = s; this->checkOutput(tmp); } virtual void outputLog(ZF_IN const zfchar *s, ZF_IN_OPT zfindex count = zfindexMax()) { QMutexLocker _logMutexLocker(&_logMutex); if(count == zfindexMax()) { this->savedString += s; } else { this->savedString += zfstring(s, count); } this->checkOutput(this->savedString); } private: zfstring savedString; void checkOutput(ZF_IN_OUT zfstring &s) { if(s.length() > 0) { if(s[s.length() - 1] == '\n') { s.remove(s.length() - 1); qDebug() << s.cString(); s.removeAll(); } else { zfindex index = zfstringFindReversely(s, '\n'); if(index != zfindexMax()) { s[index] = '\0'; qDebug() << s.cString(); s.remove(0, index + 1); } } } } private: QMutex _logMutex; ZFPROTOCOL_IMPLEMENTATION_END(ZFImplOutputImpl_sys_Qt) ZFPROTOCOL_IMPLEMENTATION_REGISTER(ZFImplOutputImpl_sys_Qt) ZF_NAMESPACE_GLOBAL_END #endif
/*************************************************************************** * copyright : (C) 2008 by Serkan Kalyoncu copyright : (C) 2008 by Scott Wheeler email : wheeler@kde.org ***************************************************************************/ /*************************************************************************** * This library is free software; you can redistribute it and/or modify * * it under the terms of the GNU Lesser General Public License version * * 2.1 as published by the Free Software Foundation. * * * * This library is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * * 02110-1301 USA * * * * Alternatively, this file is available under the Mozilla Public * * License Version 1.1. You may obtain a copy of the License at * * http://www.mozilla.org/MPL/ * ***************************************************************************/ #include <tbytevectorlist.h> #include <id3v2tag.h> #include <tdebug.h> #include "privateframe.h" using namespace TagLib; using namespace ID3v2; class PrivateFrame::PrivateFramePrivate { public: ByteVector data; String owner; }; //////////////////////////////////////////////////////////////////////////////// // public members //////////////////////////////////////////////////////////////////////////////// PrivateFrame::PrivateFrame() : Frame("PRIV") { d = new PrivateFramePrivate; } PrivateFrame::PrivateFrame(const ByteVector &data) : Frame(data) { d = new PrivateFramePrivate; setData(data); } PrivateFrame::~PrivateFrame() { delete d; } String PrivateFrame::toString() const { return d->owner; } String PrivateFrame::owner() const { return d->owner; } ByteVector PrivateFrame::data() const { return d->data; } void PrivateFrame::setOwner(const String &s) { d->owner = s; } void PrivateFrame::setData(const ByteVector &data) { d->data = data; } //////////////////////////////////////////////////////////////////////////////// // protected members //////////////////////////////////////////////////////////////////////////////// void PrivateFrame::parseFields(const ByteVector &data) { if (data.size() < 2) { debug("A private frame must contain at least 2 bytes."); return; } // Owner identifier is assumed to be Latin1 const int byteAlign = 1; const int endOfOwner = data.find(textDelimiter(String::Latin1), 0, byteAlign); d->owner = String(data.mid(0, endOfOwner)); d->data = data.mid(endOfOwner + 1); } ByteVector PrivateFrame::renderFields() const { ByteVector v; v.append(d->owner.data(String::Latin1)); v.append(textDelimiter(String::Latin1)); v.append(d->data); return v; } //////////////////////////////////////////////////////////////////////////////// // private members //////////////////////////////////////////////////////////////////////////////// PrivateFrame::PrivateFrame(const ByteVector &data, Header *h) : Frame(h) { d = new PrivateFramePrivate(); parseFields(fieldData(data)); }
/* * Copyright 2019 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <sstream> #include <string> #include <vector> #define XF_SECURITY_DECRYPT_DEBUG 1 #include <openssl/sha.h> // number of times to perform the test in different message and length #define NUM_TESTS 2 // 200 // the result hash value in byte //#define HASH_SIZE 16 // the size of each message word in byte #define MSG_SIZE 8 // the size of the digest in byte #define HASH_SIZE 48 // the max size of the message in byte #define MAX_MSG 256 #define AP_INT_MAX_W 2048 #include <ap_int.h> #include <hls_stream.h> #include "xf_security/hmac.hpp" #include "xf_security/sha512_t.hpp" #define LENW 128 #define KEYW (8 * MSG_SIZE) #define MSGW (8 * MSG_SIZE) #define HSHW (8 * HASH_SIZE) #define BLOCK_SIZE 128 typedef ap_uint<128> u128; template <int msgW, int lW, int hshW> struct sha384_wrapper { // lW=128 bits, BLOCK_SIZE=128 bytes, hshW = 384 bits static void hash(hls::stream<ap_uint<msgW> >& msgStrm, hls::stream<u128>& lenStrm, hls::stream<bool>& eLenStrm, hls::stream<ap_uint<384> >& hshStrm, hls::stream<bool>& eHshStrm) { xf::security::sha384<msgW>(msgStrm, lenStrm, eLenStrm, hshStrm, eHshStrm); } }; void test_hmac_sha384(hls::stream<ap_uint<KEYW> >& keyStrm, hls::stream<u128>& lenKeyStrm, hls::stream<ap_uint<MSGW> >& msgStrm, hls::stream<u128>& lenStrm, hls::stream<bool>& eLenStrm, hls::stream<ap_uint<HSHW> >& hshStrm, hls::stream<bool>& eHshStrm) { xf::security::hmac<KEYW, MSGW, LENW, HSHW, BLOCK_SIZE, sha384_wrapper>(keyStrm, lenKeyStrm, msgStrm, lenStrm, eLenStrm, hshStrm, eHshStrm); } struct Test { std::string key; std::string msg; unsigned char hash[HASH_SIZE]; Test(const char* k, const char* m, const void* h) : key(k), msg(m) { memcpy(hash, h, HASH_SIZE); } }; // print hash value std::string hash2str(unsigned char* h, int len) { std::ostringstream oss; std::string retstr; // check output oss.str(""); oss << std::hex; for (int i = 0; i < len; i++) { oss << std::setw(2) << std::setfill('0') << (unsigned)h[i]; } retstr = oss.str(); return retstr; } template <int W> unsigned int string2Strm(std::string data, std::string title, hls::stream<ap_uint<W> >& strm) { ap_uint<W> oneWord; unsigned int n = 0; unsigned int cnt = 0; // write msg stream word by word std::cout << title << " = " << data << " len=" << data.length() << std::endl; for (std::string::size_type i = 0; i < data.length(); i++) { if (n == 0) { oneWord = 0; } oneWord.range(7 + 8 * n, 8 * n) = (unsigned)(data[i]); n++; if (n == W / 8) { strm.write(oneWord); std::cout << std::hex << oneWord; ++cnt; n = 0; } } // deal with the condition that we didn't hit a boundary of the last word if (n != 0) { strm.write(oneWord); std::cout << std::hex << oneWord; ++cnt; } std::cout << std::endl; return cnt; } // compute golden hmac void hmacSHA384(const unsigned char* key, unsigned int keyLen, const unsigned char* message, unsigned int msgLen, unsigned char* h) { // hmac(key,msg) = hash( // kopad^k1 || hash( // (kipad^k1) || msg) // ) // ) // // k1 = len(key) < blocksize ? {key,0} ? { hash(key),0 }; // The width of k1 is blocksize bits. unsigned char kone[BLOCK_SIZE + 8] = {0}; unsigned char kipad[BLOCK_SIZE + 8] = {0}; unsigned char kopad[BLOCK_SIZE + 8] = {0}; unsigned char kmsg[BLOCK_SIZE + MAX_MSG + 8] = {0}; unsigned char khsh[BLOCK_SIZE + HASH_SIZE + 8] = {0}; unsigned char h1[HASH_SIZE + 8] = {0}; unsigned char h2[HASH_SIZE + 8] = {0}; if (keyLen > BLOCK_SIZE) { SHA384((const unsigned char*)key, keyLen, (unsigned char*)h1); memcpy(kone, h1, HASH_SIZE); } else memcpy(kone, key, keyLen); for (int i = 0; i < BLOCK_SIZE; ++i) { kipad[i] = (unsigned int)(kone[i]) ^ 0x36; kopad[i] = (unsigned int)(kone[i]) ^ 0x5c; } std::cout << "main kipad:" << std::endl; hash2str(kipad, BLOCK_SIZE); std::cout << "main kopad:" << std::endl; hash2str(kopad, BLOCK_SIZE); memcpy(kmsg, kipad, BLOCK_SIZE); memcpy(kmsg + BLOCK_SIZE, message, msgLen); SHA384((const unsigned char*)kmsg, BLOCK_SIZE + msgLen, (unsigned char*)h2); std::cout << "main kmsg:" << std::endl; hash2str(kmsg, BLOCK_SIZE + msgLen); memcpy(khsh, kopad, BLOCK_SIZE); memcpy(khsh + BLOCK_SIZE, h2, HASH_SIZE); SHA384((const unsigned char*)khsh, BLOCK_SIZE + HASH_SIZE, (unsigned char*)h); } int main() { std::cout << "********************************" << std::endl; std::cout << " Testing hmac+SHA384 on HLS project " << std::endl; std::cout << "********************************" << std::endl; // the original message to be digested const char message[] = "The quick brown fox jumps over the lazy dog. Its hmac is 80070713463e7749b90c2dc24911e275"; // const char message[] = "The quick brown fox jumps over the lazy dog"; // Its hmac is // 80070713463e7749b90c2dc24911e275"; const char message[] = "ABCDEFGH"; const char key[] = "key"; std::vector<Test> tests; // generate golden for (unsigned int i = 0; i < NUM_TESTS; i++) { unsigned int len = i % 128; char k[128] = {0}; char m[128] = {0}; if (len != 0) { memcpy(k, key, len); memcpy(m, message, len); } k[len] = 0; m[len] = 0; unsigned char h[HASH_SIZE] = ""; Test t(k, m, h); hmacSHA384((const unsigned char*)k, t.key.length(), (const unsigned char*)m, t.msg.length(), (unsigned char*)h); tests.push_back(Test(k, m, h)); } unsigned int nerror = 0; unsigned int ncorrect = 0; hls::stream<ap_uint<KEYW> > keyStrm("keyStrm"); #pragma HLS stream variable = key_strm depth = 128 hls::stream<ap_uint<LENW> > lenKeyStrm("lenKeyStrm"); #pragma HLS stream variable = lenKeyStrm depth = 128 hls::stream<ap_uint<MSGW> > msgStrm("msgStrm"); #pragma HLS stream variable = msgStrm depth = 128 hls::stream<ap_uint<LENW> > lenMsgStrm("lenMsgStrm"); #pragma HLS stream variable = lenMsgStrm depth = 128 hls::stream<bool> endLenStrm("endLenStrm"); #pragma HLS stream variable = endLenStrm depth = 128 hls::stream<ap_uint<HSHW> > hshStrm("hshStrm"); #pragma HLS stream variable = hshStrm depth = 128 hls::stream<bool> endHshStrm("endHshStrm"); #pragma HLS stream variable = endHshStrm depth = 128 // generate input message words for (std::vector<Test>::const_iterator test = tests.begin(); test != tests.end(); test++) { string2Strm<KEYW>((test->key), "key", keyStrm); string2Strm<MSGW>((test->msg), "msg", msgStrm); // inform the prmitive how many bytes do we have in this message lenKeyStrm.write((unsigned long long)((*test).key.length())); lenMsgStrm.write((unsigned long long)((*test).msg.length())); endLenStrm.write(false); } endLenStrm.write(true); // call fpga module test_hmac_sha384(keyStrm, lenKeyStrm, msgStrm, lenMsgStrm, endLenStrm, hshStrm, endHshStrm); // check result for (std::vector<Test>::const_iterator test = tests.begin(); test != tests.end(); test++) { ap_uint<HSHW> digest = hshStrm.read(); bool x = endHshStrm.read(); std::cout << "output: " << std::endl; unsigned char hash[HSHW]; for (unsigned int i = 0; i < HASH_SIZE; i++) { hash[i] = (unsigned char)(digest.range(7 + 8 * i, 8 * i).to_int() & 0xff); std::cout << std::hex << std::setw(2) << std::setfill('0') << (int)(hash[i]); } if (memcmp((*test).hash, hash, HASH_SIZE)) { ++nerror; std::cout << "fpga : " << hash2str((unsigned char*)hash, HASH_SIZE) << std::endl; std::cout << "golden : " << hash2str((unsigned char*)(*test).hash, HASH_SIZE) << std::endl; } else { ++ncorrect; } std::cout << std::endl; } bool x = endHshStrm.read(); std::cout << std::endl; if (nerror) { std::cout << "FAIL: " << std::dec << nerror << " errors found." << std::endl; } else { std::cout << "PASS: " << std::dec << ncorrect << " inputs verified, no error found." << std::endl; } return nerror; }
// Copyright (c) 2011-2015 The Bitcoin developers // Copyright (c) 2016-2019 The PIVX developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "walletview.h" #include "addressbookpage.h" #include "bip38tooldialog.h" #include "bitcoingui.h" #include "blockexplorer.h" #include "clientmodel.h" #include "governancepage.h" #include "guiutil.h" #include "masternodeconfig.h" #include "multisenddialog.h" #include "multisigdialog.h" #include "optionsmodel.h" #include "overviewpage.h" #include "receivecoinsdialog.h" #include "privacydialog.h" #include "sendcoinsdialog.h" #include "signverifymessagedialog.h" #include "transactiontablemodel.h" #include "transactionview.h" #include "walletmodel.h" #include "guiinterface.h" #include <QAction> #include <QActionGroup> #include <QFileDialog> #include <QHBoxLayout> #include <QLabel> #include <QProgressDialog> #include <QPushButton> #include <QSettings> #include <QVBoxLayout> WalletView::WalletView(QWidget* parent) : QStackedWidget(parent), clientModel(0), walletModel(0) { // Create tabs overviewPage = new OverviewPage(); explorerWindow = new BlockExplorer(this); transactionsPage = new QWidget(this); // Create Header with the same names as the other forms to be CSS-Id compatible QFrame *frame_Header = new QFrame(transactionsPage); frame_Header->setObjectName(QStringLiteral("frame_Header")); QVBoxLayout* verticalLayout_8 = new QVBoxLayout(frame_Header); verticalLayout_8->setObjectName(QStringLiteral("verticalLayout_8")); verticalLayout_8->setContentsMargins(0, 0, 0, 0); QHBoxLayout* horizontalLayout_Header = new QHBoxLayout(); horizontalLayout_Header->setObjectName(QStringLiteral("horizontalLayout_Header")); QLabel* labelOverviewHeaderLeft = new QLabel(frame_Header); labelOverviewHeaderLeft->setObjectName(QStringLiteral("labelOverviewHeaderLeft")); labelOverviewHeaderLeft->setMinimumSize(QSize(464, 60)); labelOverviewHeaderLeft->setMaximumSize(QSize(16777215, 60)); labelOverviewHeaderLeft->setText(tr("HISTORY")); QFont fontHeaderLeft; fontHeaderLeft.setPointSize(20); fontHeaderLeft.setBold(true); fontHeaderLeft.setWeight(75); labelOverviewHeaderLeft->setFont(fontHeaderLeft); horizontalLayout_Header->addWidget(labelOverviewHeaderLeft); QSpacerItem* horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); horizontalLayout_Header->addItem(horizontalSpacer_3); QLabel* labelOverviewHeaderRight = new QLabel(frame_Header); labelOverviewHeaderRight->setObjectName(QStringLiteral("labelOverviewHeaderRight")); labelOverviewHeaderRight->setMinimumSize(QSize(464, 60)); labelOverviewHeaderRight->setMaximumSize(QSize(16777215, 60)); labelOverviewHeaderRight->setText(QString()); QFont fontHeaderRight; fontHeaderRight.setPointSize(14); labelOverviewHeaderRight->setFont(fontHeaderRight); labelOverviewHeaderRight->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); horizontalLayout_Header->addWidget(labelOverviewHeaderRight); horizontalLayout_Header->setStretch(0, 1); horizontalLayout_Header->setStretch(2, 1); verticalLayout_8->addLayout(horizontalLayout_Header); QVBoxLayout* vbox = new QVBoxLayout(); QHBoxLayout* hbox_buttons = new QHBoxLayout(); vbox->addWidget(frame_Header); transactionView = new TransactionView(this); vbox->addWidget(transactionView); QPushButton* exportButton = new QPushButton(tr("&Export"), this); exportButton->setToolTip(tr("Export the data in the current tab to a file")); #ifndef Q_OS_MAC // Icons on push buttons are very uncommon on Mac exportButton->setIcon(QIcon(":/icons/export")); #endif hbox_buttons->addStretch(); // Sum of selected transactions QLabel* transactionSumLabel = new QLabel(); // Label transactionSumLabel->setObjectName("transactionSumLabel"); // Label ID as CSS-reference transactionSumLabel->setText(tr("Selected amount:")); hbox_buttons->addWidget(transactionSumLabel); transactionSum = new QLabel(); // Amount transactionSum->setObjectName("transactionSum"); // Label ID as CSS-reference transactionSum->setMinimumSize(200, 8); transactionSum->setTextInteractionFlags(Qt::TextSelectableByMouse); hbox_buttons->addWidget(transactionSum); hbox_buttons->addWidget(exportButton); vbox->addLayout(hbox_buttons); transactionsPage->setLayout(vbox); //privacyPage = new PrivacyDialog(); //governancePage = new GovernancePage(); receiveCoinsPage = new ReceiveCoinsDialog(); sendCoinsPage = new SendCoinsDialog(); addWidget(overviewPage); addWidget(transactionsPage); //addWidget(privacyPage); //addWidget(governancePage); addWidget(receiveCoinsPage); addWidget(sendCoinsPage); addWidget(explorerWindow); QSettings settings; if (settings.value("fShowMasternodesTab").toBool()) { masternodeListPage = new MasternodeList(); addWidget(masternodeListPage); } // Clicking on a transaction on the overview pre-selects the transaction on the transaction history page connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), transactionView, SLOT(focusTransaction(QModelIndex))); // Double-clicking on a transaction on the transaction history page shows details connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails())); // Update wallet with sum of selected transactions connect(transactionView, SIGNAL(trxAmount(QString)), this, SLOT(trxAmount(QString))); // Clicking on "Export" allows to export the transaction list connect(exportButton, SIGNAL(clicked()), transactionView, SLOT(exportClicked())); // Pass through messages from sendCoinsPage connect(sendCoinsPage, SIGNAL(message(QString, QString, unsigned int)), this, SIGNAL(message(QString, QString, unsigned int))); // Pass through messages from transactionView connect(transactionView, SIGNAL(message(QString, QString, unsigned int)), this, SIGNAL(message(QString, QString, unsigned int))); } WalletView::~WalletView() { } void WalletView::setBitcoinGUI(BitcoinGUI* gui) { if (gui) { // Clicking on a transaction on the overview page simply sends you to transaction history page connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), gui, SLOT(gotoHistoryPage())); // Receive and report messages connect(this, SIGNAL(message(QString, QString, unsigned int)), gui, SLOT(message(QString, QString, unsigned int))); // Pass through encryption status changed signals connect(this, SIGNAL(encryptionStatusChanged(int)), gui, SLOT(setEncryptionStatus(int))); // Pass through transaction notifications connect(this, SIGNAL(incomingTransaction(QString, int, CAmount, QString, QString)), gui, SLOT(incomingTransaction(QString, int, CAmount, QString, QString))); } } void WalletView::setClientModel(ClientModel* clientModel) { this->clientModel = clientModel; overviewPage->setClientModel(clientModel); sendCoinsPage->setClientModel(clientModel); QSettings settings; if (settings.value("fShowMasternodesTab").toBool()) { masternodeListPage->setClientModel(clientModel); } //governancePage->setClientModel(clientModel); } void WalletView::setWalletModel(WalletModel* walletModel) { this->walletModel = walletModel; // Put transaction list in tabs transactionView->setModel(walletModel); overviewPage->setWalletModel(walletModel); QSettings settings; if (settings.value("fShowMasternodesTab").toBool()) { masternodeListPage->setWalletModel(walletModel); } //privacyPage->setModel(walletModel); receiveCoinsPage->setModel(walletModel); sendCoinsPage->setModel(walletModel); //governancePage->setWalletModel(walletModel); if (walletModel) { // Receive and pass through messages from wallet model connect(walletModel, SIGNAL(message(QString, QString, unsigned int)), this, SIGNAL(message(QString, QString, unsigned int))); // Handle changes in encryption status connect(walletModel, SIGNAL(encryptionStatusChanged(int)), this, SIGNAL(encryptionStatusChanged(int))); updateEncryptionStatus(); // Balloon pop-up for new transaction connect(walletModel->getTransactionTableModel(), SIGNAL(rowsInserted(QModelIndex, int, int)), this, SLOT(processNewTransaction(QModelIndex, int, int))); // Ask for passphrase if needed connect(walletModel, SIGNAL(requireUnlock(AskPassphraseDialog::Context)), this, SLOT(unlockWallet(AskPassphraseDialog::Context))); // Show progress dialog connect(walletModel, SIGNAL(showProgress(QString, int)), this, SLOT(showProgress(QString, int))); } } void WalletView::processNewTransaction(const QModelIndex& parent, int start, int /*end*/) { // Prevent balloon-spam when initial block download is in progress if (!walletModel || !clientModel || clientModel->inInitialBlockDownload()) return; TransactionTableModel* ttm = walletModel->getTransactionTableModel(); if (!ttm || ttm->processingQueuedTransactions()) return; QString date = ttm->index(start, TransactionTableModel::Date, parent).data().toString(); qint64 amount = ttm->index(start, TransactionTableModel::Amount, parent).data(Qt::EditRole).toULongLong(); QString type = ttm->index(start, TransactionTableModel::Type, parent).data().toString(); QString address = ttm->index(start, TransactionTableModel::ToAddress, parent).data().toString(); emit incomingTransaction(date, walletModel->getOptionsModel()->getDisplayUnit(), amount, type, address); } void WalletView::gotoOverviewPage() { setCurrentWidget(overviewPage); // Refresh UI-elements in case coins were locked/unlocked in CoinControl walletModel->emitBalanceChanged(); } void WalletView::gotoHistoryPage() { setCurrentWidget(transactionsPage); } //void WalletView::gotoGovernancePage() //{ // setCurrentWidget(governancePage); //} void WalletView::gotoBlockExplorerPage() { setCurrentWidget(explorerWindow); } void WalletView::gotoMasternodePage() { QSettings settings; if (settings.value("fShowMasternodesTab").toBool()) { setCurrentWidget(masternodeListPage); } } void WalletView::gotoReceiveCoinsPage() { setCurrentWidget(receiveCoinsPage); } //void WalletView::gotoPrivacyPage() //{ // setCurrentWidget(privacyPage); // // Refresh UI-elements in case coins were locked/unlocked in CoinControl // walletModel->emitBalanceChanged(); //} void WalletView::gotoSendCoinsPage(QString addr) { setCurrentWidget(sendCoinsPage); if (!addr.isEmpty()) sendCoinsPage->setAddress(addr); } void WalletView::gotoSignMessageTab(QString addr) { // calls show() in showTab_SM() SignVerifyMessageDialog* signVerifyMessageDialog = new SignVerifyMessageDialog(this); signVerifyMessageDialog->setAttribute(Qt::WA_DeleteOnClose); signVerifyMessageDialog->setModel(walletModel); signVerifyMessageDialog->showTab_SM(true); if (!addr.isEmpty()) signVerifyMessageDialog->setAddress_SM(addr); } void WalletView::gotoVerifyMessageTab(QString addr) { // calls show() in showTab_VM() SignVerifyMessageDialog* signVerifyMessageDialog = new SignVerifyMessageDialog(this); signVerifyMessageDialog->setAttribute(Qt::WA_DeleteOnClose); signVerifyMessageDialog->setModel(walletModel); signVerifyMessageDialog->showTab_VM(true); if (!addr.isEmpty()) signVerifyMessageDialog->setAddress_VM(addr); } void WalletView::gotoBip38Tool() { Bip38ToolDialog* bip38ToolDialog = new Bip38ToolDialog(this); //bip38ToolDialog->setAttribute(Qt::WA_DeleteOnClose); bip38ToolDialog->setModel(walletModel); bip38ToolDialog->showTab_ENC(true); } void WalletView::gotoMultiSendDialog() { MultiSendDialog* multiSendDialog = new MultiSendDialog(this); multiSendDialog->setModel(walletModel); multiSendDialog->show(); } void WalletView::gotoMultisigDialog(int index) { MultisigDialog* multisig = new MultisigDialog(this); multisig->setModel(walletModel); multisig->showTab(index); } bool WalletView::handlePaymentRequest(const SendCoinsRecipient& recipient) { return sendCoinsPage->handlePaymentRequest(recipient); } void WalletView::showOutOfSyncWarning(bool fShow) { overviewPage->showOutOfSyncWarning(fShow); //privacyPage->showOutOfSyncWarning(fShow); } void WalletView::updateEncryptionStatus() { emit encryptionStatusChanged(walletModel->getEncryptionStatus()); } void WalletView::encryptWallet(bool status) { if (!walletModel) return; AskPassphraseDialog dlg(status ? AskPassphraseDialog::Mode::Encrypt : AskPassphraseDialog::Mode::Decrypt, this, walletModel, AskPassphraseDialog::Context::Encrypt); dlg.exec(); updateEncryptionStatus(); } void WalletView::backupWallet() { QString filename = GUIUtil::getSaveFileName(this, tr("Backup Wallet"), QString(), tr("Wallet Data (*.dat)"), NULL); if (filename.isEmpty()) return; walletModel->backupWallet(filename); } void WalletView::changePassphrase() { AskPassphraseDialog dlg(AskPassphraseDialog::Mode::ChangePass, this, walletModel, AskPassphraseDialog::Context::ChangePass); dlg.exec(); } void WalletView::unlockWallet(AskPassphraseDialog::Context context) { if (!walletModel) return; // Unlock wallet when requested by wallet model if (walletModel->getEncryptionStatus() == WalletModel::Locked || walletModel->getEncryptionStatus() == WalletModel::UnlockedForAnonymizationOnly) { AskPassphraseDialog dlg(AskPassphraseDialog::Mode::UnlockAnonymize, this, walletModel, context); dlg.exec(); } } void WalletView::lockWallet() { if (!walletModel) return; walletModel->setWalletLocked(true); } void WalletView::toggleLockWallet() { if (!walletModel) return; WalletModel::EncryptionStatus encStatus = walletModel->getEncryptionStatus(); // Unlock the wallet when requested if (encStatus == walletModel->Locked) { AskPassphraseDialog dlg(AskPassphraseDialog::Mode::UnlockAnonymize, this, walletModel, AskPassphraseDialog::Context::ToggleLock); dlg.exec(); } else if (encStatus == walletModel->Unlocked || encStatus == walletModel->UnlockedForAnonymizationOnly) { walletModel->setWalletLocked(true); } } void WalletView::usedSendingAddresses() { if (!walletModel) return; AddressBookPage* dlg = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab, this); dlg->setAttribute(Qt::WA_DeleteOnClose); dlg->setModel(walletModel->getAddressTableModel()); dlg->show(); } void WalletView::usedReceivingAddresses() { if (!walletModel) return; AddressBookPage* dlg = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab, this); dlg->setAttribute(Qt::WA_DeleteOnClose); dlg->setModel(walletModel->getAddressTableModel()); dlg->show(); } void WalletView::showProgress(const QString& title, int nProgress) { if (nProgress == 0) { progressDialog = new QProgressDialog(title, "", 0, 100); progressDialog->setWindowModality(Qt::ApplicationModal); progressDialog->setMinimumDuration(0); progressDialog->setCancelButton(0); progressDialog->setAutoClose(false); progressDialog->setValue(0); } else if (nProgress == 100) { if (progressDialog) { progressDialog->close(); progressDialog->deleteLater(); } } else if (progressDialog) progressDialog->setValue(nProgress); } /** Update wallet with the sum of the selected transactions */ void WalletView::trxAmount(QString amount) { transactionSum->setText(amount); }
#include "image_processing.h" #include <numeric> #include <cfloat> #include <iostream> #include <Eigen/LU> #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "stb_image_write.h" namespace ImageProcessing { template <typename Scalar> Scalar crop(Scalar x, Scalar min_x, Scalar max_x) { return std::max(std::min(x, max_x), min_x); } void Image::force_unity() { const double sum = std::accumulate(pixels.begin(), pixels.end(), 0.0); assert(sum > 1e-16); for (int x = 0; x < width(); ++ x) for (int y = 0; y < height(); ++ y) { set_pixel(x, y, get_pixel(x, y) / sum); } } void Image::scale_to_unit() { double max_value = - DBL_MAX; double min_value = + DBL_MAX; for (int x = 0; x < width(); ++ x) for (int y = 0; y < height(); ++ y) { const double value = get_pixel(x, y); max_value = std::max(max_value, value); min_value = std::min(min_value, value); } assert(max_value - min_value > 0.0); for (int x = 0; x < width(); ++ x) for (int y = 0; y < height(); ++ y) { set_pixel(x, y, (get_pixel(x, y) - min_value) / (max_value - min_value)); } } void AbstractImage::save(const std::string &file_path) const { unsigned char *image_data = new unsigned char [width() * height() * 4]; for (int x = 0; x < width(); ++ x) for (int y = 0; y < height(); ++ y) { unsigned char *pixelOffset = image_data + (y * width() + x) * 4; const IntColor color = get_color(x, y); pixelOffset[0] = color(0); pixelOffset[1] = color(1); pixelOffset[2] = color(2); pixelOffset[3] = color(3); } stbi_write_png(file_path.c_str(), width(), height(), 4, image_data, width() * 4); delete [] image_data; } AbstractImage::IntColor Image::get_color(int x, int y) const { const double value = crop(get_pixel(x, y), 0.0, 1.0); return IntColor(value * 255, value * 255, value * 255, 255); } AbstractImage::IntColor ColorImage::get_color(int x, int y) const { Eigen::Vector4d color = get_rgba(x, y); for (int i : { 0, 1, 2, 3 }) color(i) = crop(color(i), 0.0, 1.0); return IntColor(color(0) * 255, color(1) * 255, color(2) * 255, color(3) * 255); } ColorImage::ColorImage(const std::string &file_path) { int n; unsigned char *image_data = stbi_load(file_path.c_str(), &width_, &height_, &n, 4); assert(width() > 0 && height() > 0); rgba_ = std::vector<Image>(4, Image(width(), height())); for (int x = 0; x < width(); ++ x) for (int y = 0; y < height(); ++ y) { unsigned char *pixelOffset = image_data + (y * width() + x) * 4; rgba_[0].set_pixel(x, y, (double)pixelOffset[0] / 255.0); rgba_[1].set_pixel(x, y, (double)pixelOffset[1] / 255.0); rgba_[2].set_pixel(x, y, (double)pixelOffset[2] / 255.0); rgba_[3].set_pixel(x, y, (double)pixelOffset[3] / 255.0); } stbi_image_free(image_data); } Image ColorImage::get_luminance() const { Image new_image(width(), height()); for (int x = 0; x < width(); ++ x) for (int y = 0; y < height(); ++ y) { const double r = rgba_[0].get_pixel(x, y); const double g = rgba_[1].get_pixel(x, y); const double b = rgba_[2].get_pixel(x, y); // https://en.wikipedia.org/wiki/Relative_luminance const double luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b; new_image.set_pixel(x, y, luminance); } return new_image; } /////////////////////////////////////////////////////////////////////////////////////// Image apply_convolution(const Image& image, const Eigen::MatrixXd &kernel) { const int w = image.width(); const int h = image.height(); const int kernel_size = kernel.rows(); assert(kernel_size % 2 == 1); assert(kernel_size == kernel.cols()); Image new_image(w, h); for (int x = 0; x < w; ++ x) for (int y = 0; y < h; ++ y) { double value = 0.0; for (int kernel_x = 0; kernel_x < kernel_size; ++ kernel_x) { for (int kernel_y = 0; kernel_y < kernel_size; ++ kernel_y) { const int original_image_x = crop(x + kernel_x - ((kernel_size - 1) / 2), 0, w - 1); const int original_image_y = crop(y + kernel_y - ((kernel_size - 1) / 2), 0, h - 1); value += kernel(kernel_x, kernel_y) * image.get_pixel(original_image_x, original_image_y); } } new_image.set_pixel(x, y, value); } return new_image; } Image calculate_guided_filter_kernel(const Image& image, int center_x, int center_y, int radius, double epsilon, bool force_positive) { const int width = image.width(); const int height = image.height(); const Image mean_I = ImageProcessing::apply_box_filter(image, radius); const Image corr_I = ImageProcessing::apply_box_filter(ImageProcessing::square(image), radius); const Image var_I = ImageProcessing::subtract(corr_I, ImageProcessing::square(mean_I)); const double I_seed = image.get_pixel(center_x, center_y); Image weight_map(width, height, 0.0); for (int x = center_x - radius; x <= center_x + radius; ++ x) { for (int y = center_y - radius; y <= center_y + radius; ++ y) { if (x < 0 || x >= width || y < 0 || y >= height) continue; const double I_j = image.get_pixel(x, y); double weight = 0.0; for (int k_x = 0; k_x < width; ++ k_x) { for (int k_y = 0; k_y < height; ++ k_y) { bool range_j = (k_x >= x - radius && k_x <= x + radius) && (k_y >= y - radius && k_y <= y + radius); bool range_seed = (k_x >= center_x - radius && k_x <= center_x + radius) && (k_y >= center_y - radius && k_y <= center_y + radius); if (!range_j || !range_seed) continue; const double mu_k = mean_I.get_pixel(k_x, k_y); const double var_k = var_I.get_pixel(k_x, k_y); weight += 1.0 + ((I_seed - mu_k) * (I_j - mu_k)) / (epsilon + var_k); } } if (force_positive) weight = std::max(0.0, weight); weight_map.set_pixel(x, y, weight); } } weight_map.force_unity(); return weight_map; } Image calculate_gradient_magnitude(const Image& image) { const int width = image.width(); const int height = image.height(); const Image sobel_x = ImageProcessing::apply_sobel_filter_x(image); const Image sobel_y = ImageProcessing::apply_sobel_filter_y(image); Image gradient_magnitude = Image(width, height); for (int x = 0; x < width; ++ x) { for (int y = 0; y < height; ++ y) { const double g_x = sobel_x.get_pixel(x, y); const double g_y = sobel_y.get_pixel(x, y); const double value = std::sqrt(g_x * g_x + g_y * g_y); gradient_magnitude.set_pixel(x, y, value); } } return gradient_magnitude; } Image apply_guided_filter(const Image& input_image, const ColorImage& guidance_image, int radius, double epsilon) { const int width = input_image.width(); const int height = input_image.height(); assert(width == guidance_image.width()); assert(height == guidance_image.height()); const Image I_r = guidance_image.get_r(); const Image I_g = guidance_image.get_g(); const Image I_b = guidance_image.get_b(); const Image mean_I_r = apply_box_filter(I_r, radius); const Image mean_I_g = apply_box_filter(I_g, radius); const Image mean_I_b = apply_box_filter(I_b, radius); const Image mean_p = apply_box_filter(input_image, radius); const Image mean_Ip_r = apply_box_filter(multiply(I_r, input_image), radius); const Image mean_Ip_g = apply_box_filter(multiply(I_g, input_image), radius); const Image mean_Ip_b = apply_box_filter(multiply(I_b, input_image), radius); const Image cov_Ip_r = subtract(mean_Ip_r, multiply(mean_I_r, mean_p)); const Image cov_Ip_g = subtract(mean_Ip_g, multiply(mean_I_g, mean_p)); const Image cov_Ip_b = subtract(mean_Ip_b, multiply(mean_I_b, mean_p)); const Image var_I_rr = subtract(apply_box_filter(multiply(I_r, I_r), radius), multiply(mean_I_r, mean_I_r)); const Image var_I_rg = subtract(apply_box_filter(multiply(I_r, I_g), radius), multiply(mean_I_r, mean_I_g)); const Image var_I_rb = subtract(apply_box_filter(multiply(I_r, I_b), radius), multiply(mean_I_r, mean_I_b)); const Image var_I_gg = subtract(apply_box_filter(multiply(I_g, I_g), radius), multiply(mean_I_g, mean_I_g)); const Image var_I_gb = subtract(apply_box_filter(multiply(I_g, I_b), radius), multiply(mean_I_g, mean_I_b)); const Image var_I_bb = subtract(apply_box_filter(multiply(I_b, I_b), radius), multiply(mean_I_b, mean_I_b)); Image a_r(width, height); Image a_g(width, height); Image a_b(width, height); for (int x = 0; x < width; ++ x) for (int y = 0; y < height; ++ y) { Eigen::Matrix3d sigma; sigma << var_I_rr.get_pixel(x, y), var_I_rg.get_pixel(x, y), var_I_rb.get_pixel(x, y), var_I_rg.get_pixel(x, y), var_I_gg.get_pixel(x, y), var_I_gb.get_pixel(x, y), var_I_rb.get_pixel(x, y), var_I_gb.get_pixel(x, y), var_I_bb.get_pixel(x, y); const Eigen::Vector3d cov_Ip = { cov_Ip_r.get_pixel(x, y), cov_Ip_g.get_pixel(x, y), cov_Ip_b.get_pixel(x, y) }; const Eigen::Vector3d a_xy = (sigma + epsilon * Eigen::Matrix3d::Identity()).inverse() * cov_Ip; a_r.set_pixel(x, y, a_xy(0)); a_g.set_pixel(x, y, a_xy(1)); a_b.set_pixel(x, y, a_xy(2)); } const Image b = subtract(subtract(subtract(mean_p, multiply(a_r, mean_I_r)), multiply(a_g, mean_I_g)), multiply(a_b, mean_I_b)); Image q = apply_box_filter(b, radius); q = add(q, multiply(apply_box_filter(a_r, radius), I_r)); q = add(q, multiply(apply_box_filter(a_g, radius), I_g)); q = add(q, multiply(apply_box_filter(a_b, radius), I_b)); return q; } }
#ifndef CAFFE_NET_HPP_ #define CAFFE_NET_HPP_ #include <map> #include <set> #include <string> #include <utility> #include <vector> #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/layer.hpp" #include "caffe/proto/caffe.pb.h" namespace caffe { /** * @brief Connects Layer%s together into a directed acyclic graph (DAG) * specified by a NetParameter. * * TODO(dox): more thorough description. */ template <typename Dtype> class Net { public: explicit Net(const NetParameter& param, bool quiet = false); explicit Net(const string& param_file); virtual ~Net() {} /// @brief Initialize a network with a NetParameter. void Init(const NetParameter& param, bool quiet = false); /** * @brief Run Forward with the input Blob%s already fed separately. * * You can get the input blobs using input_blobs(). */ const vector<Blob<Dtype>*>& ForwardPrefilled(Dtype* loss = NULL); /** * The From and To variants of Forward and Backward operate on the * (topological) ordering by which the net is specified. For general DAG * networks, note that (1) computing from one layer to another might entail * extra computation on unrelated branches, and (2) computation starting in * the middle may be incorrect if all of the layers of a fan-in are not * included. */ Dtype ForwardFromTo(int start, int end); Dtype ForwardFrom(int start); Dtype ForwardTo(int end); /// @brief Run forward using a set of bottom blobs, and return the result. const vector<Blob<Dtype>*>& Forward(const vector<Blob<Dtype>* > & bottom, Dtype* loss = NULL); /** * @brief Run forward using a serialized BlobProtoVector and return the * result as a serialized BlobProtoVector */ string Forward(const string& input_blob_protos, Dtype* loss = NULL); /** * The network backward should take no input and output, since it solely * computes the gradient w.r.t the parameters, and the data has already been * provided during the forward pass. */ void Backward(); void BackwardFromTo(int start, int end); void BackwardFrom(int start); void BackwardTo(int end); /** * @brief Reshape all layers from bottom to top. * * This is useful to propagate changes to layer sizes without running * a forward pass, e.g. to compute output feature size. */ void Reshape(); Dtype ForwardBackward(const vector<Blob<Dtype>* > & bottom) { Dtype loss; Forward(bottom, &loss); Backward(); return loss; } /// @brief Updates the network weights based on the diff values computed. void Update(); // Each layer reports any usage/information they want void Report(); /** * @brief For an already initialized net, implicitly copies (i.e., using no * additional memory) the pre-trained layers from another Net. */ void ShareTrainedLayersWith(Net* other); // For an already initialized net, CopyTrainedLayersFrom() copies the already // trained layers from another net parameter instance. /** * @brief For an already initialized net, copies the pre-trained layers from * another Net. */ void CopyTrainedLayersFrom(const NetParameter& param); void CopyTrainedLayersFrom(const string trained_filename); /// @brief Writes the net to a proto. void ToProto(NetParameter* param, bool write_diff = false); /// @brief returns the network name. inline const string& name() { return name_; } /// @brief returns the layer names inline const vector<string>& layer_names() { return layer_names_; } /// @brief returns the blob names inline const vector<string>& blob_names() { return blob_names_; } /// @brief returns the blobs inline const vector<shared_ptr<Blob<Dtype> > >& blobs() { return blobs_; } /// @brief returns the layers inline const vector<shared_ptr<Layer<Dtype> > >& layers() { return layers_; } /** * @brief returns the bottom vecs for each layer -- usually you won't * need this unless you do per-layer checks such as gradients. */ inline vector<vector<Blob<Dtype>*> >& bottom_vecs() { return bottom_vecs_; } /** * @brief returns the top vecs for each layer -- usually you won't * need this unless you do per-layer checks such as gradients. */ inline vector<vector<Blob<Dtype>*> >& top_vecs() { return top_vecs_; } inline vector<vector<bool> >& bottom_need_backward() { return bottom_need_backward_; } inline vector<Dtype>& blob_loss_weights() { return blob_loss_weights_; } /// @brief returns the parameters inline vector<shared_ptr<Blob<Dtype> > >& params() { return params_; } /// @brief returns the parameter learning rate multipliers inline vector<float>& params_lr() { return params_lr_; } inline vector<float>& params_weight_decay() { return params_weight_decay_; } const map<string, int>& param_names_index() { return param_names_index_; } /// @brief Input and output blob numbers inline int num_inputs() { return net_input_blobs_.size(); } inline int num_outputs() { return net_output_blobs_.size(); } inline vector<Blob<Dtype>*>& input_blobs() { return net_input_blobs_; } inline vector<Blob<Dtype>*>& output_blobs() { return net_output_blobs_; } inline vector<int>& input_blob_indices() { return net_input_blob_indices_; } inline vector<int>& output_blob_indices() { return net_output_blob_indices_; } bool has_blob(const string& blob_name); const shared_ptr<Blob<Dtype> > blob_by_name(const string& blob_name); bool has_layer(const string& layer_name); const shared_ptr<Layer<Dtype> > layer_by_name(const string& layer_name); void set_debug_info(const bool value) { debug_info_ = value; } // Helpers for Init. /** * @brief Remove layers that the user specified should be excluded given the current * phase, level, and stage. */ static void FilterNet(const NetParameter& param, NetParameter* param_filtered); /// @brief return whether NetState state meets NetStateRule rule static bool StateMeetsRule(const NetState& state, const NetStateRule& rule, const string& layer_name); protected: // Helpers for Init. /// @brief Append a new input or top blob to the net. void AppendTop(const NetParameter& param, const int layer_id, const int top_id, set<string>* available_blobs, map<string, int>* blob_name_to_idx); /// @brief Append a new bottom blob to the net. int AppendBottom(const NetParameter& param, const int layer_id, const int bottom_id, set<string>* available_blobs, map<string, int>* blob_name_to_idx); /// @brief Append a new parameter blob to the net. void AppendParam(const NetParameter& param, const int layer_id, const int param_id); /// @brief Helper for displaying debug info in Forward. void ForwardDebugInfo(const int layer_id); /// @brief Helper for displaying debug info in Backward. void BackwardDebugInfo(const int layer_id); /// @brief Helper for displaying debug info in Update. void UpdateDebugInfo(const int param_id); /// @brief Get misc parameters, e.g. the LR multiplier and weight decay. void GetLearningRateAndWeightDecay(); /// @brief Individual layers in the net vector<shared_ptr<Layer<Dtype> > > layers_; vector<string> layer_names_; map<string, int> layer_names_index_; vector<bool> layer_need_backward_; // blobs stores the blobs that store intermediate results between the // layers. // AJ: name is slightly confusing, these are the neurons, actiations and error signals /// @brief the blobs storing intermediate results between the layer. vector<shared_ptr<Blob<Dtype> > > blobs_; vector<string> blob_names_; map<string, int> blob_names_index_; vector<bool> blob_need_backward_; // bottom_vecs stores the vectors containing the input for each layer. // They don't actually host the blobs (blobs_ does), so we simply store // pointers. // AJ: this is vector of vector, bc first vector corresponds to each layer. // The second vector is there bc some layers (like data) returns multiple tops & bottoms vector<vector<Blob<Dtype>*> > bottom_vecs_; vector<vector<int> > bottom_id_vecs_; vector<vector<bool> > bottom_need_backward_; /// top_vecs stores the vectors containing the output for each layer vector<vector<Blob<Dtype>*> > top_vecs_; vector<vector<int> > top_id_vecs_; /// Vector of weight in the loss (or objective) function of each net blob, /// indexed by blob_id. vector<Dtype> blob_loss_weights_; vector<int> param_owners_; vector<string> param_display_names_; vector<pair<int, int> > param_layer_indices_; map<string, int> param_names_index_; /// blob indices for the input and the output of the net vector<int> net_input_blob_indices_; vector<int> net_output_blob_indices_; vector<Blob<Dtype>*> net_input_blobs_; vector<Blob<Dtype>*> net_output_blobs_; string name_; /// The parameters in the network. vector<shared_ptr<Blob<Dtype> > > params_; /// the learning rate multipliers vector<float> params_lr_; /// the weight decay multipliers vector<float> params_weight_decay_; /// The bytes of memory used by this net size_t memory_used_; /// Whether to compute and display debug info for the net. bool debug_info_; DISABLE_COPY_AND_ASSIGN(Net); }; } // namespace caffe #endif // CAFFE_NET_HPP_
// Copyright (c) 2011-2016 The Uscoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "guiutil.h" #include "uscoinaddressvalidator.h" #include "uscoinunits.h" #include "qvalidatedlineedit.h" #include "walletmodel.h" #include "fs.h" #include "primitives/transaction.h" #include "init.h" #include "policy/policy.h" #include "protocol.h" #include "script/script.h" #include "script/standard.h" #include "util.h" #ifdef WIN32 #ifdef _WIN32_WINNT #undef _WIN32_WINNT #endif #define _WIN32_WINNT 0x0501 #ifdef _WIN32_IE #undef _WIN32_IE #endif #define _WIN32_IE 0x0501 #define WIN32_LEAN_AND_MEAN 1 #ifndef NOMINMAX #define NOMINMAX #endif #include "shellapi.h" #include "shlobj.h" #include "shlwapi.h" #endif #include <boost/scoped_array.hpp> #include <QAbstractItemView> #include <QApplication> #include <QClipboard> #include <QDateTime> #include <QDesktopServices> #include <QDesktopWidget> #include <QDoubleValidator> #include <QFileDialog> #include <QFont> #include <QLineEdit> #include <QSettings> #include <QTextDocument> // for Qt::mightBeRichText #include <QThread> #include <QMouseEvent> #if QT_VERSION < 0x050000 #include <QUrl> #else #include <QUrlQuery> #endif #if QT_VERSION >= 0x50200 #include <QFontDatabase> #endif static fs::detail::utf8_codecvt_facet utf8; #if defined(Q_OS_MAC) extern double NSAppKitVersionNumber; #if !defined(NSAppKitVersionNumber10_8) #define NSAppKitVersionNumber10_8 1187 #endif #if !defined(NSAppKitVersionNumber10_9) #define NSAppKitVersionNumber10_9 1265 #endif #endif namespace GUIUtil { QString dateTimeStr(const QDateTime &date) { return date.date().toString(Qt::SystemLocaleShortDate) + QString(" ") + date.toString("hh:mm"); } QString dateTimeStr(qint64 nTime) { return dateTimeStr(QDateTime::fromTime_t((qint32)nTime)); } QFont fixedPitchFont() { #if QT_VERSION >= 0x50200 return QFontDatabase::systemFont(QFontDatabase::FixedFont); #else QFont font("Monospace"); #if QT_VERSION >= 0x040800 font.setStyleHint(QFont::Monospace); #else font.setStyleHint(QFont::TypeWriter); #endif return font; #endif } // Just some dummy data to generate an convincing random-looking (but consistent) address static const uint8_t dummydata[] = {0xeb,0x15,0x23,0x1d,0xfc,0xeb,0x60,0x92,0x58,0x86,0xb6,0x7d,0x06,0x52,0x99,0x92,0x59,0x15,0xae,0xb1,0x72,0xc0,0x66,0x47}; // Generate a dummy address with invalid CRC, starting with the network prefix. static std::string DummyAddress(const CChainParams &params) { std::vector<unsigned char> sourcedata = params.Base58Prefix(CChainParams::PUBKEY_ADDRESS); sourcedata.insert(sourcedata.end(), dummydata, dummydata + sizeof(dummydata)); for(int i=0; i<256; ++i) { // Try every trailing byte std::string s = EncodeBase58(sourcedata.data(), sourcedata.data() + sourcedata.size()); if (!CUscoinAddress(s).IsValid()) return s; sourcedata[sourcedata.size()-1] += 1; } return ""; } void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent) { parent->setFocusProxy(widget); widget->setFont(fixedPitchFont()); #if QT_VERSION >= 0x040700 // We don't want translators to use own addresses in translations // and this is the only place, where this address is supplied. widget->setPlaceholderText(QObject::tr("Enter a Uscoin address (e.g. %1)").arg( QString::fromStdString(DummyAddress(Params())))); #endif widget->setValidator(new UscoinAddressEntryValidator(parent)); widget->setCheckValidator(new UscoinAddressCheckValidator(parent)); } void setupAmountWidget(QLineEdit *widget, QWidget *parent) { QDoubleValidator *amountValidator = new QDoubleValidator(parent); amountValidator->setDecimals(8); amountValidator->setBottom(0.0); widget->setValidator(amountValidator); widget->setAlignment(Qt::AlignRight|Qt::AlignVCenter); } bool parseUscoinURI(const QUrl &uri, SendCoinsRecipient *out) { // return if URI is not valid or is no uscoin: URI if(!uri.isValid() || uri.scheme() != QString("uscoin")) return false; SendCoinsRecipient rv; rv.address = uri.path(); // Trim any following forward slash which may have been added by the OS if (rv.address.endsWith("/")) { rv.address.truncate(rv.address.length() - 1); } rv.amount = 0; #if QT_VERSION < 0x050000 QList<QPair<QString, QString> > items = uri.queryItems(); #else QUrlQuery uriQuery(uri); QList<QPair<QString, QString> > items = uriQuery.queryItems(); #endif for (QList<QPair<QString, QString> >::iterator i = items.begin(); i != items.end(); i++) { bool fShouldReturnFalse = false; if (i->first.startsWith("req-")) { i->first.remove(0, 4); fShouldReturnFalse = true; } if (i->first == "label") { rv.label = i->second; fShouldReturnFalse = false; } if (i->first == "message") { rv.message = i->second; fShouldReturnFalse = false; } else if (i->first == "amount") { if(!i->second.isEmpty()) { if(!UscoinUnits::parse(UscoinUnits::UCS, i->second, &rv.amount)) { return false; } } fShouldReturnFalse = false; } if (fShouldReturnFalse) return false; } if(out) { *out = rv; } return true; } bool parseUscoinURI(QString uri, SendCoinsRecipient *out) { // Convert uscoin:// to uscoin: // // Cannot handle this later, because uscoin:// will cause Qt to see the part after // as host, // which will lower-case it (and thus invalidate the address). if(uri.startsWith("uscoin://", Qt::CaseInsensitive)) { uri.replace(0, 10, "uscoin:"); } QUrl uriInstance(uri); return parseUscoinURI(uriInstance, out); } QString formatUscoinURI(const SendCoinsRecipient &info) { QString ret = QString("uscoin:%1").arg(info.address); int paramCount = 0; if (info.amount) { ret += QString("?amount=%1").arg(UscoinUnits::format(UscoinUnits::UCS, info.amount, false, UscoinUnits::separatorNever)); paramCount++; } if (!info.label.isEmpty()) { QString lbl(QUrl::toPercentEncoding(info.label)); ret += QString("%1label=%2").arg(paramCount == 0 ? "?" : "&").arg(lbl); paramCount++; } if (!info.message.isEmpty()) { QString msg(QUrl::toPercentEncoding(info.message)); ret += QString("%1message=%2").arg(paramCount == 0 ? "?" : "&").arg(msg); paramCount++; } return ret; } bool isDust(const QString& address, const CAmount& amount) { CTxDestination dest = CUscoinAddress(address.toStdString()).Get(); CScript script = GetScriptForDestination(dest); CTxOut txOut(amount, script); return IsDust(txOut, ::dustRelayFee); } QString HtmlEscape(const QString& str, bool fMultiLine) { #if QT_VERSION < 0x050000 QString escaped = Qt::escape(str); #else QString escaped = str.toHtmlEscaped(); #endif if(fMultiLine) { escaped = escaped.replace("\n", "<br>\n"); } return escaped; } QString HtmlEscape(const std::string& str, bool fMultiLine) { return HtmlEscape(QString::fromStdString(str), fMultiLine); } void copyEntryData(QAbstractItemView *view, int column, int role) { if(!view || !view->selectionModel()) return; QModelIndexList selection = view->selectionModel()->selectedRows(column); if(!selection.isEmpty()) { // Copy first item setClipboard(selection.at(0).data(role).toString()); } } QList<QModelIndex> getEntryData(QAbstractItemView *view, int column) { if(!view || !view->selectionModel()) return QList<QModelIndex>(); return view->selectionModel()->selectedRows(column); } QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut) { QString selectedFilter; QString myDir; if(dir.isEmpty()) // Default to user documents location { #if QT_VERSION < 0x050000 myDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation); #else myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); #endif } else { myDir = dir; } /* Directly convert path to native OS path separators */ QString result = QDir::toNativeSeparators(QFileDialog::getSaveFileName(parent, caption, myDir, filter, &selectedFilter)); /* Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...) */ QRegExp filter_re(".* \\(\\*\\.(.*)[ \\)]"); QString selectedSuffix; if(filter_re.exactMatch(selectedFilter)) { selectedSuffix = filter_re.cap(1); } /* Add suffix if needed */ QFileInfo info(result); if(!result.isEmpty()) { if(info.suffix().isEmpty() && !selectedSuffix.isEmpty()) { /* No suffix specified, add selected suffix */ if(!result.endsWith(".")) result.append("."); result.append(selectedSuffix); } } /* Return selected suffix if asked to */ if(selectedSuffixOut) { *selectedSuffixOut = selectedSuffix; } return result; } QString getOpenFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut) { QString selectedFilter; QString myDir; if(dir.isEmpty()) // Default to user documents location { #if QT_VERSION < 0x050000 myDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation); #else myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); #endif } else { myDir = dir; } /* Directly convert path to native OS path separators */ QString result = QDir::toNativeSeparators(QFileDialog::getOpenFileName(parent, caption, myDir, filter, &selectedFilter)); if(selectedSuffixOut) { /* Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...) */ QRegExp filter_re(".* \\(\\*\\.(.*)[ \\)]"); QString selectedSuffix; if(filter_re.exactMatch(selectedFilter)) { selectedSuffix = filter_re.cap(1); } *selectedSuffixOut = selectedSuffix; } return result; } Qt::ConnectionType blockingGUIThreadConnection() { if(QThread::currentThread() != qApp->thread()) { return Qt::BlockingQueuedConnection; } else { return Qt::DirectConnection; } } bool checkPoint(const QPoint &p, const QWidget *w) { QWidget *atW = QApplication::widgetAt(w->mapToGlobal(p)); if (!atW) return false; return atW->topLevelWidget() == w; } bool isObscured(QWidget *w) { return !(checkPoint(QPoint(0, 0), w) && checkPoint(QPoint(w->width() - 1, 0), w) && checkPoint(QPoint(0, w->height() - 1), w) && checkPoint(QPoint(w->width() - 1, w->height() - 1), w) && checkPoint(QPoint(w->width() / 2, w->height() / 2), w)); } void openDebugLogfile() { fs::path pathDebug = GetDataDir() / "debug.log"; /* Open debug.log with the associated application */ if (fs::exists(pathDebug)) QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathDebug))); } bool openUscoinConf() { boost::filesystem::path pathConfig = GetConfigFile(USCOIN_CONF_FILENAME); /* Create the file */ boost::filesystem::ofstream configFile(pathConfig, std::ios_base::app); if (!configFile.good()) return false; configFile.close(); /* Open uscoin.conf with the associated application */ return QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathConfig))); } void SubstituteFonts(const QString& language) { #if defined(Q_OS_MAC) // Background: // OSX's default font changed in 10.9 and Qt is unable to find it with its // usual fallback methods when building against the 10.7 sdk or lower. // The 10.8 SDK added a function to let it find the correct fallback font. // If this fallback is not properly loaded, some characters may fail to // render correctly. // // The same thing happened with 10.10. .Helvetica Neue DeskInterface is now default. // // Solution: If building with the 10.7 SDK or lower and the user's platform // is 10.9 or higher at runtime, substitute the correct font. This needs to // happen before the QApplication is created. #if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_8) { if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_9) /* On a 10.9 - 10.9.x system */ QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande"); else { /* 10.10 or later system */ if (language == "zh_CN" || language == "zh_TW" || language == "zh_HK") // traditional or simplified Chinese QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Heiti SC"); else if (language == "ja") // Japanese QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Songti SC"); else QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Lucida Grande"); } } #endif #endif } ToolTipToRichTextFilter::ToolTipToRichTextFilter(int _size_threshold, QObject *parent) : QObject(parent), size_threshold(_size_threshold) { } bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt) { if(evt->type() == QEvent::ToolTipChange) { QWidget *widget = static_cast<QWidget*>(obj); QString tooltip = widget->toolTip(); if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt") && !Qt::mightBeRichText(tooltip)) { // Envelop with <qt></qt> to make sure Qt detects this as rich text // Escape the current message as HTML and replace \n by <br> tooltip = "<qt>" + HtmlEscape(tooltip, true) + "</qt>"; widget->setToolTip(tooltip); return true; } } return QObject::eventFilter(obj, evt); } void TableViewLastColumnResizingFixer::connectViewHeadersSignals() { connect(tableView->horizontalHeader(), SIGNAL(sectionResized(int,int,int)), this, SLOT(on_sectionResized(int,int,int))); connect(tableView->horizontalHeader(), SIGNAL(geometriesChanged()), this, SLOT(on_geometriesChanged())); } // We need to disconnect these while handling the resize events, otherwise we can enter infinite loops. void TableViewLastColumnResizingFixer::disconnectViewHeadersSignals() { disconnect(tableView->horizontalHeader(), SIGNAL(sectionResized(int,int,int)), this, SLOT(on_sectionResized(int,int,int))); disconnect(tableView->horizontalHeader(), SIGNAL(geometriesChanged()), this, SLOT(on_geometriesChanged())); } // Setup the resize mode, handles compatibility for Qt5 and below as the method signatures changed. // Refactored here for readability. void TableViewLastColumnResizingFixer::setViewHeaderResizeMode(int logicalIndex, QHeaderView::ResizeMode resizeMode) { #if QT_VERSION < 0x050000 tableView->horizontalHeader()->setResizeMode(logicalIndex, resizeMode); #else tableView->horizontalHeader()->setSectionResizeMode(logicalIndex, resizeMode); #endif } void TableViewLastColumnResizingFixer::resizeColumn(int nColumnIndex, int width) { tableView->setColumnWidth(nColumnIndex, width); tableView->horizontalHeader()->resizeSection(nColumnIndex, width); } int TableViewLastColumnResizingFixer::getColumnsWidth() { int nColumnsWidthSum = 0; for (int i = 0; i < columnCount; i++) { nColumnsWidthSum += tableView->horizontalHeader()->sectionSize(i); } return nColumnsWidthSum; } int TableViewLastColumnResizingFixer::getAvailableWidthForColumn(int column) { int nResult = lastColumnMinimumWidth; int nTableWidth = tableView->horizontalHeader()->width(); if (nTableWidth > 0) { int nOtherColsWidth = getColumnsWidth() - tableView->horizontalHeader()->sectionSize(column); nResult = std::max(nResult, nTableWidth - nOtherColsWidth); } return nResult; } // Make sure we don't make the columns wider than the table's viewport width. void TableViewLastColumnResizingFixer::adjustTableColumnsWidth() { disconnectViewHeadersSignals(); resizeColumn(lastColumnIndex, getAvailableWidthForColumn(lastColumnIndex)); connectViewHeadersSignals(); int nTableWidth = tableView->horizontalHeader()->width(); int nColsWidth = getColumnsWidth(); if (nColsWidth > nTableWidth) { resizeColumn(secondToLastColumnIndex,getAvailableWidthForColumn(secondToLastColumnIndex)); } } // Make column use all the space available, useful during window resizing. void TableViewLastColumnResizingFixer::stretchColumnWidth(int column) { disconnectViewHeadersSignals(); resizeColumn(column, getAvailableWidthForColumn(column)); connectViewHeadersSignals(); } // When a section is resized this is a slot-proxy for ajustAmountColumnWidth(). void TableViewLastColumnResizingFixer::on_sectionResized(int logicalIndex, int oldSize, int newSize) { adjustTableColumnsWidth(); int remainingWidth = getAvailableWidthForColumn(logicalIndex); if (newSize > remainingWidth) { resizeColumn(logicalIndex, remainingWidth); } } // When the table's geometry is ready, we manually perform the stretch of the "Message" column, // as the "Stretch" resize mode does not allow for interactive resizing. void TableViewLastColumnResizingFixer::on_geometriesChanged() { if ((getColumnsWidth() - this->tableView->horizontalHeader()->width()) != 0) { disconnectViewHeadersSignals(); resizeColumn(secondToLastColumnIndex, getAvailableWidthForColumn(secondToLastColumnIndex)); connectViewHeadersSignals(); } } /** * Initializes all internal variables and prepares the * the resize modes of the last 2 columns of the table and */ TableViewLastColumnResizingFixer::TableViewLastColumnResizingFixer(QTableView* table, int lastColMinimumWidth, int allColsMinimumWidth, QObject *parent) : QObject(parent), tableView(table), lastColumnMinimumWidth(lastColMinimumWidth), allColumnsMinimumWidth(allColsMinimumWidth) { columnCount = tableView->horizontalHeader()->count(); lastColumnIndex = columnCount - 1; secondToLastColumnIndex = columnCount - 2; tableView->horizontalHeader()->setMinimumSectionSize(allColumnsMinimumWidth); setViewHeaderResizeMode(secondToLastColumnIndex, QHeaderView::Interactive); setViewHeaderResizeMode(lastColumnIndex, QHeaderView::Interactive); } #ifdef WIN32 fs::path static StartupShortcutPath() { std::string chain = ChainNameFromCommandLine(); if (chain == CBaseChainParams::MAIN) return GetSpecialFolderPath(CSIDL_STARTUP) / "Uscoin.lnk"; if (chain == CBaseChainParams::TESTNET) // Remove this special case when CBaseChainParams::TESTNET = "testnet4" return GetSpecialFolderPath(CSIDL_STARTUP) / "Uscoin (testnet).lnk"; return GetSpecialFolderPath(CSIDL_STARTUP) / strprintf("Uscoin (%s).lnk", chain); } bool GetStartOnSystemStartup() { // check for Uscoin*.lnk return fs::exists(StartupShortcutPath()); } bool SetStartOnSystemStartup(bool fAutoStart) { // If the shortcut exists already, remove it for updating fs::remove(StartupShortcutPath()); if (fAutoStart) { CoInitialize(nullptr); // Get a pointer to the IShellLink interface. IShellLink* psl = nullptr; HRESULT hres = CoCreateInstance(CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_IShellLink, reinterpret_cast<void**>(&psl)); if (SUCCEEDED(hres)) { // Get the current executable path TCHAR pszExePath[MAX_PATH]; GetModuleFileName(nullptr, pszExePath, sizeof(pszExePath)); // Start client minimized QString strArgs = "-min"; // Set -testnet /-regtest options strArgs += QString::fromStdString(strprintf(" -testnet=%d -regtest=%d", gArgs.GetBoolArg("-testnet", false), gArgs.GetBoolArg("-regtest", false))); #ifdef UNICODE boost::scoped_array<TCHAR> args(new TCHAR[strArgs.length() + 1]); // Convert the QString to TCHAR* strArgs.toWCharArray(args.get()); // Add missing '\0'-termination to string args[strArgs.length()] = '\0'; #endif // Set the path to the shortcut target psl->SetPath(pszExePath); PathRemoveFileSpec(pszExePath); psl->SetWorkingDirectory(pszExePath); psl->SetShowCmd(SW_SHOWMINNOACTIVE); #ifndef UNICODE psl->SetArguments(strArgs.toStdString().c_str()); #else psl->SetArguments(args.get()); #endif // Query IShellLink for the IPersistFile interface for // saving the shortcut in persistent storage. IPersistFile* ppf = nullptr; hres = psl->QueryInterface(IID_IPersistFile, reinterpret_cast<void**>(&ppf)); if (SUCCEEDED(hres)) { WCHAR pwsz[MAX_PATH]; // Ensure that the string is ANSI. MultiByteToWideChar(CP_ACP, 0, StartupShortcutPath().string().c_str(), -1, pwsz, MAX_PATH); // Save the link by calling IPersistFile::Save. hres = ppf->Save(pwsz, TRUE); ppf->Release(); psl->Release(); CoUninitialize(); return true; } psl->Release(); } CoUninitialize(); return false; } return true; } #elif defined(Q_OS_LINUX) // Follow the Desktop Application Autostart Spec: // http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html fs::path static GetAutostartDir() { char* pszConfigHome = getenv("XDG_CONFIG_HOME"); if (pszConfigHome) return fs::path(pszConfigHome) / "autostart"; char* pszHome = getenv("HOME"); if (pszHome) return fs::path(pszHome) / ".config" / "autostart"; return fs::path(); } fs::path static GetAutostartFilePath() { std::string chain = ChainNameFromCommandLine(); if (chain == CBaseChainParams::MAIN) return GetAutostartDir() / "uscoin.desktop"; return GetAutostartDir() / strprintf("uscoin-%s.lnk", chain); } bool GetStartOnSystemStartup() { fs::ifstream optionFile(GetAutostartFilePath()); if (!optionFile.good()) return false; // Scan through file for "Hidden=true": std::string line; while (!optionFile.eof()) { getline(optionFile, line); if (line.find("Hidden") != std::string::npos && line.find("true") != std::string::npos) return false; } optionFile.close(); return true; } bool SetStartOnSystemStartup(bool fAutoStart) { if (!fAutoStart) fs::remove(GetAutostartFilePath()); else { char pszExePath[MAX_PATH+1]; memset(pszExePath, 0, sizeof(pszExePath)); if (readlink("/proc/self/exe", pszExePath, sizeof(pszExePath)-1) == -1) return false; fs::create_directories(GetAutostartDir()); fs::ofstream optionFile(GetAutostartFilePath(), std::ios_base::out|std::ios_base::trunc); if (!optionFile.good()) return false; std::string chain = ChainNameFromCommandLine(); // Write a uscoin.desktop file to the autostart directory: optionFile << "[Desktop Entry]\n"; optionFile << "Type=Application\n"; if (chain == CBaseChainParams::MAIN) optionFile << "Name=Uscoin\n"; else optionFile << strprintf("Name=Uscoin (%s)\n", chain); optionFile << "Exec=" << pszExePath << strprintf(" -min -testnet=%d -regtest=%d\n", gArgs.GetBoolArg("-testnet", false), gArgs.GetBoolArg("-regtest", false)); optionFile << "Terminal=false\n"; optionFile << "Hidden=false\n"; optionFile.close(); } return true; } #elif defined(Q_OS_MAC) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" // based on: https://github.com/Mozketo/LaunchAtLoginController/blob/master/LaunchAtLoginController.m #include <CoreFoundation/CoreFoundation.h> #include <CoreServices/CoreServices.h> LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef findUrl); LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef findUrl) { // loop through the list of startup items and try to find the uscoin app CFArrayRef listSnapshot = LSSharedFileListCopySnapshot(list, nullptr); for(int i = 0; i < CFArrayGetCount(listSnapshot); i++) { LSSharedFileListItemRef item = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(listSnapshot, i); UInt32 resolutionFlags = kLSSharedFileListNoUserInteraction | kLSSharedFileListDoNotMountVolumes; CFURLRef currentItemURL = nullptr; #if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= 10100 if(&LSSharedFileListItemCopyResolvedURL) currentItemURL = LSSharedFileListItemCopyResolvedURL(item, resolutionFlags, nullptr); #if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED < 10100 else LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, nullptr); #endif #else LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, nullptr); #endif if(currentItemURL && CFEqual(currentItemURL, findUrl)) { // found CFRelease(currentItemURL); return item; } if(currentItemURL) { CFRelease(currentItemURL); } } return nullptr; } bool GetStartOnSystemStartup() { CFURLRef uscoinAppUrl = CFBundleCopyBundleURL(CFBundleGetMainBundle()); LSSharedFileListRef loginItems = LSSharedFileListCreate(nullptr, kLSSharedFileListSessionLoginItems, nullptr); LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, uscoinAppUrl); return !!foundItem; // return boolified object } bool SetStartOnSystemStartup(bool fAutoStart) { CFURLRef uscoinAppUrl = CFBundleCopyBundleURL(CFBundleGetMainBundle()); LSSharedFileListRef loginItems = LSSharedFileListCreate(nullptr, kLSSharedFileListSessionLoginItems, nullptr); LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, uscoinAppUrl); if(fAutoStart && !foundItem) { // add uscoin app to startup item list LSSharedFileListInsertItemURL(loginItems, kLSSharedFileListItemBeforeFirst, nullptr, nullptr, uscoinAppUrl, nullptr, nullptr); } else if(!fAutoStart && foundItem) { // remove item LSSharedFileListItemRemove(loginItems, foundItem); } return true; } #pragma GCC diagnostic pop #else bool GetStartOnSystemStartup() { return false; } bool SetStartOnSystemStartup(bool fAutoStart) { return false; } #endif void setClipboard(const QString& str) { QApplication::clipboard()->setText(str, QClipboard::Clipboard); QApplication::clipboard()->setText(str, QClipboard::Selection); } fs::path qstringToBoostPath(const QString &path) { return fs::path(path.toStdString(), utf8); } QString boostPathToQString(const fs::path &path) { return QString::fromStdString(path.string(utf8)); } QString formatDurationStr(int secs) { QStringList strList; int days = secs / 86400; int hours = (secs % 86400) / 3600; int mins = (secs % 3600) / 60; int seconds = secs % 60; if (days) strList.append(QString(QObject::tr("%1 d")).arg(days)); if (hours) strList.append(QString(QObject::tr("%1 h")).arg(hours)); if (mins) strList.append(QString(QObject::tr("%1 m")).arg(mins)); if (seconds || (!days && !hours && !mins)) strList.append(QString(QObject::tr("%1 s")).arg(seconds)); return strList.join(" "); } QString formatServicesStr(quint64 mask) { QStringList strList; // Just scan the last 8 bits for now. for (int i = 0; i < 8; i++) { uint64_t check = 1 << i; if (mask & check) { switch (check) { case NODE_NETWORK: strList.append("NETWORK"); break; case NODE_GETUTXO: strList.append("GETUTXO"); break; case NODE_BLOOM: strList.append("BLOOM"); break; case NODE_WITNESS: strList.append("WITNESS"); break; case NODE_XTHIN: strList.append("XTHIN"); break; default: strList.append(QString("%1[%2]").arg("UNKNOWN").arg(check)); } } } if (strList.size()) return strList.join(" & "); else return QObject::tr("None"); } QString formatPingTime(double dPingTime) { return (dPingTime == std::numeric_limits<int64_t>::max()/1e6 || dPingTime == 0) ? QObject::tr("N/A") : QString(QObject::tr("%1 ms")).arg(QString::number((int)(dPingTime * 1000), 10)); } QString formatTimeOffset(int64_t nTimeOffset) { return QString(QObject::tr("%1 s")).arg(QString::number((int)nTimeOffset, 10)); } QString formatNiceTimeOffset(qint64 secs) { // Represent time from last generated block in human readable text QString timeBehindText; const int HOUR_IN_SECONDS = 60*60; const int DAY_IN_SECONDS = 24*60*60; const int WEEK_IN_SECONDS = 7*24*60*60; const int YEAR_IN_SECONDS = 31556952; // Average length of year in Gregorian calendar if(secs < 60) { timeBehindText = QObject::tr("%n second(s)","",secs); } else if(secs < 2*HOUR_IN_SECONDS) { timeBehindText = QObject::tr("%n minute(s)","",secs/60); } else if(secs < 2*DAY_IN_SECONDS) { timeBehindText = QObject::tr("%n hour(s)","",secs/HOUR_IN_SECONDS); } else if(secs < 2*WEEK_IN_SECONDS) { timeBehindText = QObject::tr("%n day(s)","",secs/DAY_IN_SECONDS); } else if(secs < YEAR_IN_SECONDS) { timeBehindText = QObject::tr("%n week(s)","",secs/WEEK_IN_SECONDS); } else { qint64 years = secs / YEAR_IN_SECONDS; qint64 remainder = secs % YEAR_IN_SECONDS; timeBehindText = QObject::tr("%1 and %2").arg(QObject::tr("%n year(s)", "", years)).arg(QObject::tr("%n week(s)","", remainder/WEEK_IN_SECONDS)); } return timeBehindText; } void ClickableLabel::mouseReleaseEvent(QMouseEvent *event) { Q_EMIT clicked(event->pos()); } void ClickableProgressBar::mouseReleaseEvent(QMouseEvent *event) { Q_EMIT clicked(event->pos()); } } // namespace GUIUtil
#include "ChangeHeaderWnd.h" #include "NoweGlobal.h" #include <QDesktopWidget> #include <QBuffer> #include <QXmppVCardManager.h> ChangeHeaderWnd::ChangeHeaderWnd(QWidget *parent) : QWidget(parent, Qt::FramelessWindowHint) { ui.setupUi(this); ui.horizontalSlider->setEnabled(false); QDesktopWidget *deskdop=QApplication::desktop(); move((deskdop->width()-this->width())/2, (deskdop->height()-this->height())/2); m_pDivWidget = new QWidget(ui.scrollArea); m_pDivWidget->setAttribute(Qt::WA_TranslucentBackground); m_pDivWidget->hide(); m_pDivWidget->installEventFilter(this); connect(ui.pushButton_close, &QPushButton::clicked, this, &QWidget::close); connect(ui.pushButton_upload, &QPushButton::clicked, this, &ChangeHeaderWnd::onUpload); connect(ui.horizontalSlider, &QSlider::valueChanged, this, &ChangeHeaderWnd::onScaledChanged); connect(ui.pushButton_anti, &QPushButton::clicked, std::bind(&ChangeHeaderWnd::RotateHeader, this, false)); connect(ui.pushButton_clock, &QPushButton::clicked, std::bind(&ChangeHeaderWnd::RotateHeader, this, true)); connect(ui.pushButton_ok, &QPushButton::clicked, this, &ChangeHeaderWnd::onOk); connect(ui.pushButton_cancel, &QPushButton::clicked, this, &ChangeHeaderWnd::onCancel); connect(this, &ChangeHeaderWnd::updateHeader, [](const QPixmap& avatar) { auto myVCard = Nowe::myVCard(); auto myVCardManager = Nowe::myClient()->findExtension<QXmppVCardManager>(); QBuffer avatarData; avatarData.open(QIODevice::WriteOnly); avatar.save(&avatarData, "PNG"); myVCard.setPhoto(avatarData.buffer()); myVCardManager->setClientVCard(myVCard); myVCardManager->requestClientVCard(); }); } ChangeHeaderWnd::~ChangeHeaderWnd() { } void ChangeHeaderWnd::RotateHeader(bool bClock) { QPixmap pixmap = *(ui.label_header->pixmap()); QMatrix matrix; matrix.rotate(bClock ? 90 : -90); pixmap = pixmap.transformed(matrix); ui.label_header->setPixmap(pixmap); } void ChangeHeaderWnd::LoadHeader(const QPixmap& pixmap) { m_sourceHeader = pixmap; int nSliderMinmum = 0; QPixmap scaledPixmap; if (m_sourceHeader.width() > m_sourceHeader.height()) { scaledPixmap = m_sourceHeader.scaledToHeight(ui.scrollArea->height()); nSliderMinmum = scaledPixmap.height() * ui.horizontalSlider->maximum() / m_sourceHeader.height(); } else { scaledPixmap = m_sourceHeader.scaledToWidth(ui.scrollArea->width()); nSliderMinmum = scaledPixmap.width() * ui.horizontalSlider->maximum() / m_sourceHeader.width(); } ui.scrollAreaWidgetContents->resize(m_sourceHeader.size()); ui.horizontalSlider->setEnabled(true); ui.horizontalSlider->setMinimum(nSliderMinmum); ui.horizontalSlider->setValue(nSliderMinmum); ui.label_header->setPixmap(scaledPixmap); m_pDivWidget->show(); } bool ChangeHeaderWnd::eventFilter(QObject* watched, QEvent* event) { //绘制遮罩层 if (m_pDivWidget == watched && QEvent::Paint == event->type()) { m_pDivWidget->resize(ui.scrollArea->size()); QPainterPath path; path.addRect(m_pDivWidget->geometry()); path.addEllipse(m_pDivWidget->geometry().adjusted(2, 2, -2, -2)); QPainter p(m_pDivWidget); p.setRenderHint(QPainter::Antialiasing); p.setBrush(QColor(100, 100, 100, 200)); p.setClipPath(path); p.drawRect(m_pDivWidget->geometry()); } return QWidget::eventFilter(watched, event); } void ChangeHeaderWnd::onUpload() { QString strFilePath = QFileDialog::getOpenFileName(this, QString::fromLocal8Bit("选择上传图片"), "./", tr("Image files(*.bmp *.jpg *.pbm *.pgm *.png *.ppm *.xbm *.xpm);;All files (*.*)")); if (strFilePath.isEmpty()) { return; } LoadHeader(QPixmap(strFilePath)); } void ChangeHeaderWnd::onScaledChanged(int nValue) { QPixmap pixmap = m_sourceHeader.scaled(m_sourceHeader.size() * ((double)nValue / ui.horizontalSlider->maximum())); ui.scrollAreaWidgetContents->resize(pixmap.size()); ui.label_header->setPixmap(pixmap); } void ChangeHeaderWnd::onOk() { if (const QPixmap* pHeader = ui.label_header->pixmap()) { emit updateHeader(*pHeader); ui.label_tip->setText(QString::fromLocal8Bit("修改头像成功")); } else { ui.label_tip->setText(QString::fromLocal8Bit("还未加载头像")); } } void ChangeHeaderWnd::onCancel() { ui.label_tip->setText(QString::fromLocal8Bit("取消修改头像")); m_pDivWidget->hide(); ui.label_header->clear(); this->hide(); } //Mouse Move void ChangeHeaderWnd::mousePressEvent(QMouseEvent *e) { /* last=e->globalPos();*/ } void ChangeHeaderWnd::mouseMoveEvent(QMouseEvent *e) { /* int dx = e->globalX() - last.x(); int dy = e->globalY() - last.y(); last = e->globalPos(); move(x()+dx, y()+dy);*/ } void ChangeHeaderWnd::mouseReleaseEvent(QMouseEvent *e) { /* int dx = e->globalX() - last.x(); int dy = e->globalY() - last.y(); move(x()+dx, y()+dy);*/ }
#include <chrono> #include <cstddef> #include <iomanip> #include <iostream> #include <limits> #include <memory> #include <mutex> #include <random> #include <string> #include <thread> #include <vector> #include <fstream> #include <iostream> #include <list> #include <vector> //#define poly_mod 2048 // #define poly_mod 4096 // #define plain_mod_batch 40961 // this one doesnt work properly #define poly_mod 8192 #define plain_mod_batch 114689 // #define poly_mod 16384 // #define plain_mod_batch 163841 #define EPSILON 1 #include "seal/seal.h" using namespace std; using namespace seal; /* This scheme will operate on INTS */ vector<uint64_t> one_hot(string seq) { vector<uint64_t> one_hot_encoded; std::map<char, vector<uint64_t>> one_hot_map; one_hot_map['A'] = vector<uint64_t>{0, 0, 0, 0, 1}; one_hot_map['G'] = vector<uint64_t>{0, 0, 0, 1, 0}; one_hot_map['C'] = vector<uint64_t>{0, 0, 1, 0, 0}; one_hot_map['T'] = vector<uint64_t>{0, 1, 0, 0, 0}; one_hot_map['-'] = vector<uint64_t>{1000, 0, 0, 0, 0}; if (!seq.empty()) { for (auto n : seq) { std::copy(one_hot_map[n].begin(), one_hot_map[n].end(), std::back_inserter(one_hot_encoded)); } return one_hot_encoded; } return {}; } int main() { // Set up encryption parameters // read in site_A parms // ifstream infile_parms_A; infile_parms_A.open("parms_A.txt"); EncryptionParameters parms(scheme_type::BFV); parms.load(infile_parms_A); /* We create the SEALContext as usual and print the parameters. */ //auto context = SEALContext::Create(parms); auto context = SEALContext::Create(parms); /* We can verify that batching is indeed enabled by looking at the encryption parameter qualifiers created by SEALContext. auto qualifiers = context->context_data()->qualifiers(); cout << "Batching enabled: " << boolalpha << qualifiers.using_batching << endl; */ auto qualifiers = context->first_context_data()->qualifiers(); ifstream pk_A; pk_A.open("pk_A.txt"); PublicKey pk; pk.load(context, pk_A); /* We also set up an Encryptor here. */ Encryptor encryptor(context, pk); /* Batching is done through an instance of the BatchEncoder class so need to construct one. */ BatchEncoder batch_encoder(context); /* The total number of batching `slots' is poly_modulus_degree. The matrices we encrypt are of size 2-by-(slot_count / 2). */ size_t slot_count = batch_encoder.slot_count(); size_t row_size = slot_count / 2; cout << "Plaintext matrix row size: " << row_size << endl; /* Remeber each vector has to be of type uint64_t */ // Read FASTA file ifstream ref; //ref.open("../examples/rsrc/ref_prrt_multiple.fa"); ref.open("../examples/rsrc/Site_2_aligned.fa"); cout << endl; cout << "READING FASTA" << endl; string header; string sequence; string line; vector<pair<string, string>> sequences2; while (getline(ref, line)) { // cout << "line in the file: " << line << endl; if (line.rfind(">", 0) == 0) { if (!sequence.empty()) { sequences2.push_back(make_pair(header, sequence)); } header = line; sequence.clear(); } else { sequence += line; } } if (!sequence.empty()) { sequences2.push_back(make_pair(header, sequence)); } ref.close(); cout << endl << "One Hot Encoding sequences from Site B" << endl; vector<vector<uint64_t>> siteB; for (auto const& i : sequences2) { // cout << i.first << endl << i.second << endl; auto sequence = one_hot(i.second); siteB.push_back(sequence); } // write a file for the lenth of siteB // this will be read in to compare the two sites ofstream number_of_seqs("Site_B_number_seqs.txt"); number_of_seqs << siteB.size(); number_of_seqs.close(); for (int i = 0; i < siteB.size(); i++) { auto siteB_vector = siteB[i]; Plaintext plain_matrix; batch_encoder.encode(siteB_vector, plain_matrix); // plaintext (input 1) becomes the `encrypted_matrix` Ciphertext encrypted_matrix; encryptor.encrypt(plain_matrix, encrypted_matrix); // saving the ciphertext here // string s = to_string(i); ofstream myfile; myfile.open("encrypted_B_" + s + ".txt"); encrypted_matrix.save(myfile); } }
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, install, // copy or use the software. // // // Intel License Agreement // // Copyright (C) 2000, Intel Corporation, all rights reserved. // Third party copyrights are property of their respective owners. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // * Redistribution's of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // * Redistribution's 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. // // * The name of Intel Corporation may not 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 Intel Corporation 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. // //M*/ #include "precomp.hpp" namespace cv { namespace ml { struct AnnParams { AnnParams() { termCrit = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 1000, 0.01 ); trainMethod = ANN_MLP::RPROP; bpDWScale = bpMomentScale = 0.1; rpDW0 = 0.1; rpDWPlus = 1.2; rpDWMinus = 0.5; rpDWMin = FLT_EPSILON; rpDWMax = 50.; } TermCriteria termCrit; int trainMethod; double bpDWScale; double bpMomentScale; double rpDW0; double rpDWPlus; double rpDWMinus; double rpDWMin; double rpDWMax; }; template <typename T> inline T inBounds(T val, T min_val, T max_val) { return std::min(std::max(val, min_val), max_val); } class ANN_MLPImpl : public ANN_MLP { public: ANN_MLPImpl() { clear(); setActivationFunction( SIGMOID_SYM, 0, 0 ); setLayerSizes(Mat()); setTrainMethod(ANN_MLP::RPROP, 0.1, FLT_EPSILON); } virtual ~ANN_MLPImpl() {} CV_IMPL_PROPERTY(TermCriteria, TermCriteria, params.termCrit) CV_IMPL_PROPERTY(double, BackpropWeightScale, params.bpDWScale) CV_IMPL_PROPERTY(double, BackpropMomentumScale, params.bpMomentScale) CV_IMPL_PROPERTY(double, RpropDW0, params.rpDW0) CV_IMPL_PROPERTY(double, RpropDWPlus, params.rpDWPlus) CV_IMPL_PROPERTY(double, RpropDWMinus, params.rpDWMinus) CV_IMPL_PROPERTY(double, RpropDWMin, params.rpDWMin) CV_IMPL_PROPERTY(double, RpropDWMax, params.rpDWMax) void clear() { min_val = max_val = min_val1 = max_val1 = 0.; rng = RNG((uint64)-1); weights.clear(); trained = false; max_buf_sz = 1 << 12; } int layer_count() const { return (int)layer_sizes.size(); } void setTrainMethod(int method, double param1, double param2) { if (method != ANN_MLP::RPROP && method != ANN_MLP::BACKPROP) method = ANN_MLP::RPROP; params.trainMethod = method; if(method == ANN_MLP::RPROP ) { if( param1 < FLT_EPSILON ) param1 = 1.; params.rpDW0 = param1; params.rpDWMin = std::max( param2, 0. ); } else if(method == ANN_MLP::BACKPROP ) { if( param1 <= 0 ) param1 = 0.1; params.bpDWScale = inBounds<double>(param1, 1e-3, 1.); if( param2 < 0 ) param2 = 0.1; params.bpMomentScale = std::min( param2, 1. ); } } int getTrainMethod() const { return params.trainMethod; } void setActivationFunction(int _activ_func, double _f_param1, double _f_param2 ) { if( _activ_func < 0 || _activ_func > GAUSSIAN ) CV_Error( CV_StsOutOfRange, "Unknown activation function" ); activ_func = _activ_func; switch( activ_func ) { case SIGMOID_SYM: max_val = 0.95; min_val = -max_val; max_val1 = 0.98; min_val1 = -max_val1; if( fabs(_f_param1) < FLT_EPSILON ) _f_param1 = 2./3; if( fabs(_f_param2) < FLT_EPSILON ) _f_param2 = 1.7159; break; case GAUSSIAN: max_val = 1.; min_val = 0.05; max_val1 = 1.; min_val1 = 0.02; if( fabs(_f_param1) < FLT_EPSILON ) _f_param1 = 1.; if( fabs(_f_param2) < FLT_EPSILON ) _f_param2 = 1.; break; default: min_val = max_val = min_val1 = max_val1 = 0.; _f_param1 = 1.; _f_param2 = 0.; } f_param1 = _f_param1; f_param2 = _f_param2; } void init_weights() { int i, j, k, l_count = layer_count(); for( i = 1; i < l_count; i++ ) { int n1 = layer_sizes[i-1]; int n2 = layer_sizes[i]; double val = 0, G = n2 > 2 ? 0.7*pow((double)n1,1./(n2-1)) : 1.; double* w = weights[i].ptr<double>(); // initialize weights using Nguyen-Widrow algorithm for( j = 0; j < n2; j++ ) { double s = 0; for( k = 0; k <= n1; k++ ) { val = rng.uniform(0., 1.)*2-1.; w[k*n2 + j] = val; s += fabs(val); } if( i < l_count - 1 ) { s = 1./(s - fabs(val)); for( k = 0; k <= n1; k++ ) w[k*n2 + j] *= s; w[n1*n2 + j] *= G*(-1+j*2./n2); } } } } Mat getLayerSizes() const { return Mat_<int>(layer_sizes, true); } void setLayerSizes( InputArray _layer_sizes ) { clear(); _layer_sizes.copyTo(layer_sizes); int l_count = layer_count(); weights.resize(l_count + 2); max_lsize = 0; if( l_count > 0 ) { for( int i = 0; i < l_count; i++ ) { int n = layer_sizes[i]; if( n < 1 + (0 < i && i < l_count-1)) CV_Error( CV_StsOutOfRange, "there should be at least one input and one output " "and every hidden layer must have more than 1 neuron" ); max_lsize = std::max( max_lsize, n ); if( i > 0 ) weights[i].create(layer_sizes[i-1]+1, n, CV_64F); } int ninputs = layer_sizes.front(); int noutputs = layer_sizes.back(); weights[0].create(1, ninputs*2, CV_64F); weights[l_count].create(1, noutputs*2, CV_64F); weights[l_count+1].create(1, noutputs*2, CV_64F); } } float predict( InputArray _inputs, OutputArray _outputs, int ) const { if( !trained ) CV_Error( CV_StsError, "The network has not been trained or loaded" ); Mat inputs = _inputs.getMat(); int type = inputs.type(), l_count = layer_count(); int n = inputs.rows, dn0 = n; CV_Assert( (type == CV_32F || type == CV_64F) && inputs.cols == layer_sizes[0] ); int noutputs = layer_sizes[l_count-1]; Mat outputs; int min_buf_sz = 2*max_lsize; int buf_sz = n*min_buf_sz; if( buf_sz > max_buf_sz ) { dn0 = max_buf_sz/min_buf_sz; dn0 = std::max( dn0, 1 ); buf_sz = dn0*min_buf_sz; } cv::AutoBuffer<double> _buf(buf_sz+noutputs); double* buf = _buf; if( !_outputs.needed() ) { CV_Assert( n == 1 ); outputs = Mat(n, noutputs, type, buf + buf_sz); } else { _outputs.create(n, noutputs, type); outputs = _outputs.getMat(); } int dn = 0; for( int i = 0; i < n; i += dn ) { dn = std::min( dn0, n - i ); Mat layer_in = inputs.rowRange(i, i + dn); Mat layer_out( dn, layer_in.cols, CV_64F, buf); scale_input( layer_in, layer_out ); layer_in = layer_out; for( int j = 1; j < l_count; j++ ) { double* data = buf + ((j&1) ? max_lsize*dn0 : 0); int cols = layer_sizes[j]; layer_out = Mat(dn, cols, CV_64F, data); Mat w = weights[j].rowRange(0, layer_in.cols); gemm(layer_in, w, 1, noArray(), 0, layer_out); calc_activ_func( layer_out, weights[j] ); layer_in = layer_out; } layer_out = outputs.rowRange(i, i + dn); scale_output( layer_in, layer_out ); } if( n == 1 ) { int maxIdx[] = {0, 0}; minMaxIdx(outputs, 0, 0, 0, maxIdx); return (float)(maxIdx[0] + maxIdx[1]); } return 0.f; } void scale_input( const Mat& _src, Mat& _dst ) const { int cols = _src.cols; const double* w = weights[0].ptr<double>(); if( _src.type() == CV_32F ) { for( int i = 0; i < _src.rows; i++ ) { const float* src = _src.ptr<float>(i); double* dst = _dst.ptr<double>(i); for( int j = 0; j < cols; j++ ) dst[j] = src[j]*w[j*2] + w[j*2+1]; } } else { for( int i = 0; i < _src.rows; i++ ) { const float* src = _src.ptr<float>(i); double* dst = _dst.ptr<double>(i); for( int j = 0; j < cols; j++ ) dst[j] = src[j]*w[j*2] + w[j*2+1]; } } } void scale_output( const Mat& _src, Mat& _dst ) const { int cols = _src.cols; const double* w = weights[layer_count()].ptr<double>(); if( _dst.type() == CV_32F ) { for( int i = 0; i < _src.rows; i++ ) { const double* src = _src.ptr<double>(i); float* dst = _dst.ptr<float>(i); for( int j = 0; j < cols; j++ ) dst[j] = (float)(src[j]*w[j*2] + w[j*2+1]); } } else { for( int i = 0; i < _src.rows; i++ ) { const double* src = _src.ptr<double>(i); double* dst = _dst.ptr<double>(i); for( int j = 0; j < cols; j++ ) dst[j] = src[j]*w[j*2] + w[j*2+1]; } } } void calc_activ_func( Mat& sums, const Mat& w ) const { const double* bias = w.ptr<double>(w.rows-1); int i, j, n = sums.rows, cols = sums.cols; double scale = 0, scale2 = f_param2; switch( activ_func ) { case IDENTITY: scale = 1.; break; case SIGMOID_SYM: scale = -f_param1; break; case GAUSSIAN: scale = -f_param1*f_param1; break; default: ; } CV_Assert( sums.isContinuous() ); if( activ_func != GAUSSIAN ) { for( i = 0; i < n; i++ ) { double* data = sums.ptr<double>(i); for( j = 0; j < cols; j++ ) data[j] = (data[j] + bias[j])*scale; } if( activ_func == IDENTITY ) return; } else { for( i = 0; i < n; i++ ) { double* data = sums.ptr<double>(i); for( j = 0; j < cols; j++ ) { double t = data[j] + bias[j]; data[j] = t*t*scale; } } } exp( sums, sums ); if( sums.isContinuous() ) { cols *= n; n = 1; } switch( activ_func ) { case SIGMOID_SYM: for( i = 0; i < n; i++ ) { double* data = sums.ptr<double>(i); for( j = 0; j < cols; j++ ) { double t = scale2*(1. - data[j])/(1. + data[j]); data[j] = t; } } break; case GAUSSIAN: for( i = 0; i < n; i++ ) { double* data = sums.ptr<double>(i); for( j = 0; j < cols; j++ ) data[j] = scale2*data[j]; } break; default: ; } } void calc_activ_func_deriv( Mat& _xf, Mat& _df, const Mat& w ) const { const double* bias = w.ptr<double>(w.rows-1); int i, j, n = _xf.rows, cols = _xf.cols; if( activ_func == IDENTITY ) { for( i = 0; i < n; i++ ) { double* xf = _xf.ptr<double>(i); double* df = _df.ptr<double>(i); for( j = 0; j < cols; j++ ) { xf[j] += bias[j]; df[j] = 1; } } } else if( activ_func == GAUSSIAN ) { double scale = -f_param1*f_param1; double scale2 = scale*f_param2; for( i = 0; i < n; i++ ) { double* xf = _xf.ptr<double>(i); double* df = _df.ptr<double>(i); for( j = 0; j < cols; j++ ) { double t = xf[j] + bias[j]; df[j] = t*2*scale2; xf[j] = t*t*scale; } } exp( _xf, _xf ); for( i = 0; i < n; i++ ) { double* xf = _xf.ptr<double>(i); double* df = _df.ptr<double>(i); for( j = 0; j < cols; j++ ) df[j] *= xf[j]; } } else { double scale = f_param1; double scale2 = f_param2; for( i = 0; i < n; i++ ) { double* xf = _xf.ptr<double>(i); double* df = _df.ptr<double>(i); for( j = 0; j < cols; j++ ) { xf[j] = (xf[j] + bias[j])*scale; df[j] = -fabs(xf[j]); } } exp( _df, _df ); // ((1+exp(-ax))^-1)'=a*((1+exp(-ax))^-2)*exp(-ax); // ((1-exp(-ax))/(1+exp(-ax)))'=(a*exp(-ax)*(1+exp(-ax)) + a*exp(-ax)*(1-exp(-ax)))/(1+exp(-ax))^2= // 2*a*exp(-ax)/(1+exp(-ax))^2 scale *= 2*f_param2; for( i = 0; i < n; i++ ) { double* xf = _xf.ptr<double>(i); double* df = _df.ptr<double>(i); for( j = 0; j < cols; j++ ) { int s0 = xf[j] > 0 ? 1 : -1; double t0 = 1./(1. + df[j]); double t1 = scale*df[j]*t0*t0; t0 *= scale2*(1. - df[j])*s0; df[j] = t1; xf[j] = t0; } } } } void calc_input_scale( const Mat& inputs, int flags ) { bool reset_weights = (flags & UPDATE_WEIGHTS) == 0; bool no_scale = (flags & NO_INPUT_SCALE) != 0; double* scale = weights[0].ptr<double>(); int count = inputs.rows; if( reset_weights ) { int i, j, vcount = layer_sizes[0]; int type = inputs.type(); double a = no_scale ? 1. : 0.; for( j = 0; j < vcount; j++ ) scale[2*j] = a, scale[j*2+1] = 0.; if( no_scale ) return; for( i = 0; i < count; i++ ) { const uchar* p = inputs.ptr(i); const float* f = (const float*)p; const double* d = (const double*)p; for( j = 0; j < vcount; j++ ) { double t = type == CV_32F ? (double)f[j] : d[j]; scale[j*2] += t; scale[j*2+1] += t*t; } } for( j = 0; j < vcount; j++ ) { double s = scale[j*2], s2 = scale[j*2+1]; double m = s/count, sigma2 = s2/count - m*m; scale[j*2] = sigma2 < DBL_EPSILON ? 1 : 1./sqrt(sigma2); scale[j*2+1] = -m*scale[j*2]; } } } void calc_output_scale( const Mat& outputs, int flags ) { int i, j, vcount = layer_sizes.back(); int type = outputs.type(); double m = min_val, M = max_val, m1 = min_val1, M1 = max_val1; bool reset_weights = (flags & UPDATE_WEIGHTS) == 0; bool no_scale = (flags & NO_OUTPUT_SCALE) != 0; int l_count = layer_count(); double* scale = weights[l_count].ptr<double>(); double* inv_scale = weights[l_count+1].ptr<double>(); int count = outputs.rows; if( reset_weights ) { double a0 = no_scale ? 1 : DBL_MAX, b0 = no_scale ? 0 : -DBL_MAX; for( j = 0; j < vcount; j++ ) { scale[2*j] = inv_scale[2*j] = a0; scale[j*2+1] = inv_scale[2*j+1] = b0; } if( no_scale ) return; } for( i = 0; i < count; i++ ) { const uchar* p = outputs.ptr(i); const float* f = (const float*)p; const double* d = (const double*)p; for( j = 0; j < vcount; j++ ) { double t = type == CV_32F ? (double)f[j] : d[j]; if( reset_weights ) { double mj = scale[j*2], Mj = scale[j*2+1]; if( mj > t ) mj = t; if( Mj < t ) Mj = t; scale[j*2] = mj; scale[j*2+1] = Mj; } else if( !no_scale ) { t = t*inv_scale[j*2] + inv_scale[2*j+1]; if( t < m1 || t > M1 ) CV_Error( CV_StsOutOfRange, "Some of new output training vector components run exceed the original range too much" ); } } } if( reset_weights ) for( j = 0; j < vcount; j++ ) { // map mj..Mj to m..M double mj = scale[j*2], Mj = scale[j*2+1]; double a, b; double delta = Mj - mj; if( delta < DBL_EPSILON ) a = 1, b = (M + m - Mj - mj)*0.5; else a = (M - m)/delta, b = m - mj*a; inv_scale[j*2] = a; inv_scale[j*2+1] = b; a = 1./a; b = -b*a; scale[j*2] = a; scale[j*2+1] = b; } } void prepare_to_train( const Mat& inputs, const Mat& outputs, Mat& sample_weights, int flags ) { if( layer_sizes.empty() ) CV_Error( CV_StsError, "The network has not been created. Use method create or the appropriate constructor" ); if( (inputs.type() != CV_32F && inputs.type() != CV_64F) || inputs.cols != layer_sizes[0] ) CV_Error( CV_StsBadArg, "input training data should be a floating-point matrix with " "the number of rows equal to the number of training samples and " "the number of columns equal to the size of 0-th (input) layer" ); if( (outputs.type() != CV_32F && outputs.type() != CV_64F) || outputs.cols != layer_sizes.back() ) CV_Error( CV_StsBadArg, "output training data should be a floating-point matrix with " "the number of rows equal to the number of training samples and " "the number of columns equal to the size of last (output) layer" ); if( inputs.rows != outputs.rows ) CV_Error( CV_StsUnmatchedSizes, "The numbers of input and output samples do not match" ); Mat temp; double s = sum(sample_weights)[0]; sample_weights.convertTo(temp, CV_64F, 1./s); sample_weights = temp; calc_input_scale( inputs, flags ); calc_output_scale( outputs, flags ); } bool train( const Ptr<TrainData>& trainData, int flags ) { const int MAX_ITER = 1000; const double DEFAULT_EPSILON = FLT_EPSILON; // initialize training data Mat inputs = trainData->getTrainSamples(); Mat outputs = trainData->getTrainResponses(); Mat sw = trainData->getTrainSampleWeights(); prepare_to_train( inputs, outputs, sw, flags ); // ... and link weights if( !(flags & UPDATE_WEIGHTS) ) init_weights(); TermCriteria termcrit; termcrit.type = TermCriteria::COUNT + TermCriteria::EPS; termcrit.maxCount = std::max((params.termCrit.type & CV_TERMCRIT_ITER ? params.termCrit.maxCount : MAX_ITER), 1); termcrit.epsilon = std::max((params.termCrit.type & CV_TERMCRIT_EPS ? params.termCrit.epsilon : DEFAULT_EPSILON), DBL_EPSILON); int iter = params.trainMethod == ANN_MLP::BACKPROP ? train_backprop( inputs, outputs, sw, termcrit ) : train_rprop( inputs, outputs, sw, termcrit ); trained = iter > 0; return trained; } int train_backprop( const Mat& inputs, const Mat& outputs, const Mat& _sw, TermCriteria termCrit ) { int i, j, k; double prev_E = DBL_MAX*0.5, E = 0; int itype = inputs.type(), otype = outputs.type(); int count = inputs.rows; int iter = -1, max_iter = termCrit.maxCount*count; double epsilon = termCrit.epsilon*count; int l_count = layer_count(); int ivcount = layer_sizes[0]; int ovcount = layer_sizes.back(); // allocate buffers vector<vector<double> > x(l_count); vector<vector<double> > df(l_count); vector<Mat> dw(l_count); for( i = 0; i < l_count; i++ ) { int n = layer_sizes[i]; x[i].resize(n+1); df[i].resize(n); dw[i] = Mat::zeros(weights[i].size(), CV_64F); } Mat _idx_m(1, count, CV_32S); int* _idx = _idx_m.ptr<int>(); for( i = 0; i < count; i++ ) _idx[i] = i; AutoBuffer<double> _buf(max_lsize*2); double* buf[] = { _buf, (double*)_buf + max_lsize }; const double* sw = _sw.empty() ? 0 : _sw.ptr<double>(); // run back-propagation loop /* y_i = w_i*x_{i-1} x_i = f(y_i) E = 1/2*||u - x_N||^2 grad_N = (x_N - u)*f'(y_i) dw_i(t) = momentum*dw_i(t-1) + dw_scale*x_{i-1}*grad_i w_i(t+1) = w_i(t) + dw_i(t) grad_{i-1} = w_i^t*grad_i */ for( iter = 0; iter < max_iter; iter++ ) { int idx = iter % count; double sweight = sw ? count*sw[idx] : 1.; if( idx == 0 ) { //printf("%d. E = %g\n", iter/count, E); if( fabs(prev_E - E) < epsilon ) break; prev_E = E; E = 0; // shuffle indices for( i = 0; i < count; i++ ) { j = rng.uniform(0, count); k = rng.uniform(0, count); std::swap(_idx[j], _idx[k]); } } idx = _idx[idx]; const uchar* x0data_p = inputs.ptr(idx); const float* x0data_f = (const float*)x0data_p; const double* x0data_d = (const double*)x0data_p; double* w = weights[0].ptr<double>(); for( j = 0; j < ivcount; j++ ) x[0][j] = (itype == CV_32F ? (double)x0data_f[j] : x0data_d[j])*w[j*2] + w[j*2 + 1]; Mat x1( 1, ivcount, CV_64F, &x[0][0] ); // forward pass, compute y[i]=w*x[i-1], x[i]=f(y[i]), df[i]=f'(y[i]) for( i = 1; i < l_count; i++ ) { int n = layer_sizes[i]; Mat x2(1, n, CV_64F, &x[i][0] ); Mat _w = weights[i].rowRange(0, x1.cols); gemm(x1, _w, 1, noArray(), 0, x2); Mat _df(1, n, CV_64F, &df[i][0] ); calc_activ_func_deriv( x2, _df, weights[i] ); x1 = x2; } Mat grad1( 1, ovcount, CV_64F, buf[l_count&1] ); w = weights[l_count+1].ptr<double>(); // calculate error const uchar* udata_p = outputs.ptr(idx); const float* udata_f = (const float*)udata_p; const double* udata_d = (const double*)udata_p; double* gdata = grad1.ptr<double>(); for( k = 0; k < ovcount; k++ ) { double t = (otype == CV_32F ? (double)udata_f[k] : udata_d[k])*w[k*2] + w[k*2+1] - x[l_count-1][k]; gdata[k] = t*sweight; E += t*t; } E *= sweight; // backward pass, update weights for( i = l_count-1; i > 0; i-- ) { int n1 = layer_sizes[i-1], n2 = layer_sizes[i]; Mat _df(1, n2, CV_64F, &df[i][0]); multiply( grad1, _df, grad1 ); Mat _x(n1+1, 1, CV_64F, &x[i-1][0]); x[i-1][n1] = 1.; gemm( _x, grad1, params.bpDWScale, dw[i], params.bpMomentScale, dw[i] ); add( weights[i], dw[i], weights[i] ); if( i > 1 ) { Mat grad2(1, n1, CV_64F, buf[i&1]); Mat _w = weights[i].rowRange(0, n1); gemm( grad1, _w, 1, noArray(), 0, grad2, GEMM_2_T ); grad1 = grad2; } } } iter /= count; return iter; } struct RPropLoop : public ParallelLoopBody { RPropLoop(ANN_MLPImpl* _ann, const Mat& _inputs, const Mat& _outputs, const Mat& _sw, int _dcount0, vector<Mat>& _dEdw, double* _E) { ann = _ann; inputs = _inputs; outputs = _outputs; sw = _sw.ptr<double>(); dcount0 = _dcount0; dEdw = &_dEdw; pE = _E; } ANN_MLPImpl* ann; vector<Mat>* dEdw; Mat inputs, outputs; const double* sw; int dcount0; double* pE; void operator()( const Range& range ) const { double inv_count = 1./inputs.rows; int ivcount = ann->layer_sizes.front(); int ovcount = ann->layer_sizes.back(); int itype = inputs.type(), otype = outputs.type(); int count = inputs.rows; int i, j, k, l_count = ann->layer_count(); vector<vector<double> > x(l_count); vector<vector<double> > df(l_count); vector<double> _buf(ann->max_lsize*dcount0*2); double* buf[] = { &_buf[0], &_buf[ann->max_lsize*dcount0] }; double E = 0; for( i = 0; i < l_count; i++ ) { x[i].resize(ann->layer_sizes[i]*dcount0); df[i].resize(ann->layer_sizes[i]*dcount0); } for( int si = range.start; si < range.end; si++ ) { int i0 = si*dcount0, i1 = std::min((si + 1)*dcount0, count); int dcount = i1 - i0; const double* w = ann->weights[0].ptr<double>(); // grab and preprocess input data for( i = 0; i < dcount; i++ ) { const uchar* x0data_p = inputs.ptr(i0 + i); const float* x0data_f = (const float*)x0data_p; const double* x0data_d = (const double*)x0data_p; double* xdata = &x[0][i*ivcount]; for( j = 0; j < ivcount; j++ ) xdata[j] = (itype == CV_32F ? (double)x0data_f[j] : x0data_d[j])*w[j*2] + w[j*2+1]; } Mat x1(dcount, ivcount, CV_64F, &x[0][0]); // forward pass, compute y[i]=w*x[i-1], x[i]=f(y[i]), df[i]=f'(y[i]) for( i = 1; i < l_count; i++ ) { Mat x2( dcount, ann->layer_sizes[i], CV_64F, &x[i][0] ); Mat _w = ann->weights[i].rowRange(0, x1.cols); gemm( x1, _w, 1, noArray(), 0, x2 ); Mat _df( x2.size(), CV_64F, &df[i][0] ); ann->calc_activ_func_deriv( x2, _df, ann->weights[i] ); x1 = x2; } Mat grad1(dcount, ovcount, CV_64F, buf[l_count & 1]); w = ann->weights[l_count+1].ptr<double>(); // calculate error for( i = 0; i < dcount; i++ ) { const uchar* udata_p = outputs.ptr(i0+i); const float* udata_f = (const float*)udata_p; const double* udata_d = (const double*)udata_p; const double* xdata = &x[l_count-1][i*ovcount]; double* gdata = grad1.ptr<double>(i); double sweight = sw ? sw[si+i] : inv_count, E1 = 0; for( j = 0; j < ovcount; j++ ) { double t = (otype == CV_32F ? (double)udata_f[j] : udata_d[j])*w[j*2] + w[j*2+1] - xdata[j]; gdata[j] = t*sweight; E1 += t*t; } E += sweight*E1; } for( i = l_count-1; i > 0; i-- ) { int n1 = ann->layer_sizes[i-1], n2 = ann->layer_sizes[i]; Mat _df(dcount, n2, CV_64F, &df[i][0]); multiply(grad1, _df, grad1); { AutoLock lock(ann->mtx); Mat _dEdw = dEdw->at(i).rowRange(0, n1); x1 = Mat(dcount, n1, CV_64F, &x[i-1][0]); gemm(x1, grad1, 1, _dEdw, 1, _dEdw, GEMM_1_T); // update bias part of dEdw double* dst = dEdw->at(i).ptr<double>(n1); for( k = 0; k < dcount; k++ ) { const double* src = grad1.ptr<double>(k); for( j = 0; j < n2; j++ ) dst[j] += src[j]; } } Mat grad2( dcount, n1, CV_64F, buf[i&1] ); if( i > 1 ) { Mat _w = ann->weights[i].rowRange(0, n1); gemm(grad1, _w, 1, noArray(), 0, grad2, GEMM_2_T); } grad1 = grad2; } } { AutoLock lock(ann->mtx); *pE += E; } } }; int train_rprop( const Mat& inputs, const Mat& outputs, const Mat& _sw, TermCriteria termCrit ) { const int max_buf_size = 1 << 16; int i, iter = -1, count = inputs.rows; double prev_E = DBL_MAX*0.5; int max_iter = termCrit.maxCount; double epsilon = termCrit.epsilon; double dw_plus = params.rpDWPlus; double dw_minus = params.rpDWMinus; double dw_min = params.rpDWMin; double dw_max = params.rpDWMax; int l_count = layer_count(); // allocate buffers vector<Mat> dw(l_count), dEdw(l_count), prev_dEdw_sign(l_count); int total = 0; for( i = 0; i < l_count; i++ ) { total += layer_sizes[i]; dw[i].create(weights[i].size(), CV_64F); dw[i].setTo(Scalar::all(params.rpDW0)); prev_dEdw_sign[i] = Mat::zeros(weights[i].size(), CV_8S); dEdw[i] = Mat::zeros(weights[i].size(), CV_64F); } int dcount0 = max_buf_size/(2*total); dcount0 = std::max( dcount0, 1 ); dcount0 = std::min( dcount0, count ); int chunk_count = (count + dcount0 - 1)/dcount0; // run rprop loop /* y_i(t) = w_i(t)*x_{i-1}(t) x_i(t) = f(y_i(t)) E = sum_over_all_samples(1/2*||u - x_N||^2) grad_N = (x_N - u)*f'(y_i) std::min(dw_i{jk}(t)*dw_plus, dw_max), if dE/dw_i{jk}(t)*dE/dw_i{jk}(t-1) > 0 dw_i{jk}(t) = std::max(dw_i{jk}(t)*dw_minus, dw_min), if dE/dw_i{jk}(t)*dE/dw_i{jk}(t-1) < 0 dw_i{jk}(t-1) else if (dE/dw_i{jk}(t)*dE/dw_i{jk}(t-1) < 0) dE/dw_i{jk}(t)<-0 else w_i{jk}(t+1) = w_i{jk}(t) + dw_i{jk}(t) grad_{i-1}(t) = w_i^t(t)*grad_i(t) */ for( iter = 0; iter < max_iter; iter++ ) { double E = 0; for( i = 0; i < l_count; i++ ) dEdw[i].setTo(Scalar::all(0)); // first, iterate through all the samples and compute dEdw RPropLoop invoker(this, inputs, outputs, _sw, dcount0, dEdw, &E); parallel_for_(Range(0, chunk_count), invoker); //invoker(Range(0, chunk_count)); // now update weights for( i = 1; i < l_count; i++ ) { int n1 = layer_sizes[i-1], n2 = layer_sizes[i]; for( int k = 0; k <= n1; k++ ) { CV_Assert(weights[i].size() == Size(n2, n1+1)); double* wk = weights[i].ptr<double>(k); double* dwk = dw[i].ptr<double>(k); double* dEdwk = dEdw[i].ptr<double>(k); schar* prevEk = prev_dEdw_sign[i].ptr<schar>(k); for( int j = 0; j < n2; j++ ) { double Eval = dEdwk[j]; double dval = dwk[j]; double wval = wk[j]; int s = CV_SIGN(Eval); int ss = prevEk[j]*s; if( ss > 0 ) { dval *= dw_plus; dval = std::min( dval, dw_max ); dwk[j] = dval; wk[j] = wval + dval*s; } else if( ss < 0 ) { dval *= dw_minus; dval = std::max( dval, dw_min ); prevEk[j] = 0; dwk[j] = dval; wk[j] = wval + dval*s; } else { prevEk[j] = (schar)s; wk[j] = wval + dval*s; } dEdwk[j] = 0.; } } } //printf("%d. E = %g\n", iter, E); if( fabs(prev_E - E) < epsilon ) break; prev_E = E; } return iter; } void write_params( FileStorage& fs ) const { const char* activ_func_name = activ_func == IDENTITY ? "IDENTITY" : activ_func == SIGMOID_SYM ? "SIGMOID_SYM" : activ_func == GAUSSIAN ? "GAUSSIAN" : 0; if( activ_func_name ) fs << "activation_function" << activ_func_name; else fs << "activation_function_id" << activ_func; if( activ_func != IDENTITY ) { fs << "f_param1" << f_param1; fs << "f_param2" << f_param2; } fs << "min_val" << min_val << "max_val" << max_val << "min_val1" << min_val1 << "max_val1" << max_val1; fs << "training_params" << "{"; if( params.trainMethod == ANN_MLP::BACKPROP ) { fs << "train_method" << "BACKPROP"; fs << "dw_scale" << params.bpDWScale; fs << "moment_scale" << params.bpMomentScale; } else if( params.trainMethod == ANN_MLP::RPROP ) { fs << "train_method" << "RPROP"; fs << "dw0" << params.rpDW0; fs << "dw_plus" << params.rpDWPlus; fs << "dw_minus" << params.rpDWMinus; fs << "dw_min" << params.rpDWMin; fs << "dw_max" << params.rpDWMax; } else CV_Error(CV_StsError, "Unknown training method"); fs << "term_criteria" << "{"; if( params.termCrit.type & TermCriteria::EPS ) fs << "epsilon" << params.termCrit.epsilon; if( params.termCrit.type & TermCriteria::COUNT ) fs << "iterations" << params.termCrit.maxCount; fs << "}" << "}"; } void write( FileStorage& fs ) const { if( layer_sizes.empty() ) return; int i, l_count = layer_count(); fs << "layer_sizes" << layer_sizes; write_params( fs ); size_t esz = weights[0].elemSize(); fs << "input_scale" << "["; fs.writeRaw("d", weights[0].ptr(), weights[0].total()*esz); fs << "]" << "output_scale" << "["; fs.writeRaw("d", weights[l_count].ptr(), weights[l_count].total()*esz); fs << "]" << "inv_output_scale" << "["; fs.writeRaw("d", weights[l_count+1].ptr(), weights[l_count+1].total()*esz); fs << "]" << "weights" << "["; for( i = 1; i < l_count; i++ ) { fs << "["; fs.writeRaw("d", weights[i].ptr(), weights[i].total()*esz); fs << "]"; } fs << "]"; } void read_params( const FileNode& fn ) { String activ_func_name = (String)fn["activation_function"]; if( !activ_func_name.empty() ) { activ_func = activ_func_name == "SIGMOID_SYM" ? SIGMOID_SYM : activ_func_name == "IDENTITY" ? IDENTITY : activ_func_name == "GAUSSIAN" ? GAUSSIAN : -1; CV_Assert( activ_func >= 0 ); } else activ_func = (int)fn["activation_function_id"]; f_param1 = (double)fn["f_param1"]; f_param2 = (double)fn["f_param2"]; setActivationFunction( activ_func, f_param1, f_param2 ); min_val = (double)fn["min_val"]; max_val = (double)fn["max_val"]; min_val1 = (double)fn["min_val1"]; max_val1 = (double)fn["max_val1"]; FileNode tpn = fn["training_params"]; params = AnnParams(); if( !tpn.empty() ) { String tmethod_name = (String)tpn["train_method"]; if( tmethod_name == "BACKPROP" ) { params.trainMethod = ANN_MLP::BACKPROP; params.bpDWScale = (double)tpn["dw_scale"]; params.bpMomentScale = (double)tpn["moment_scale"]; } else if( tmethod_name == "RPROP" ) { params.trainMethod = ANN_MLP::RPROP; params.rpDW0 = (double)tpn["dw0"]; params.rpDWPlus = (double)tpn["dw_plus"]; params.rpDWMinus = (double)tpn["dw_minus"]; params.rpDWMin = (double)tpn["dw_min"]; params.rpDWMax = (double)tpn["dw_max"]; } else CV_Error(CV_StsParseError, "Unknown training method (should be BACKPROP or RPROP)"); FileNode tcn = tpn["term_criteria"]; if( !tcn.empty() ) { FileNode tcn_e = tcn["epsilon"]; FileNode tcn_i = tcn["iterations"]; params.termCrit.type = 0; if( !tcn_e.empty() ) { params.termCrit.type |= TermCriteria::EPS; params.termCrit.epsilon = (double)tcn_e; } if( !tcn_i.empty() ) { params.termCrit.type |= TermCriteria::COUNT; params.termCrit.maxCount = (int)tcn_i; } } } } void read( const FileNode& fn ) { clear(); vector<int> _layer_sizes; readVectorOrMat(fn["layer_sizes"], _layer_sizes); setLayerSizes( _layer_sizes ); int i, l_count = layer_count(); read_params(fn); size_t esz = weights[0].elemSize(); FileNode w = fn["input_scale"]; w.readRaw("d", weights[0].ptr(), weights[0].total()*esz); w = fn["output_scale"]; w.readRaw("d", weights[l_count].ptr(), weights[l_count].total()*esz); w = fn["inv_output_scale"]; w.readRaw("d", weights[l_count+1].ptr(), weights[l_count+1].total()*esz); FileNodeIterator w_it = fn["weights"].begin(); for( i = 1; i < l_count; i++, ++w_it ) (*w_it).readRaw("d", weights[i].ptr(), weights[i].total()*esz); trained = true; } Mat getWeights(int layerIdx) const { CV_Assert( 0 <= layerIdx && layerIdx < (int)weights.size() ); return weights[layerIdx]; } bool isTrained() const { return trained; } bool isClassifier() const { return false; } int getVarCount() const { return layer_sizes.empty() ? 0 : layer_sizes[0]; } String getDefaultName() const { return "opencv_ml_ann_mlp"; } vector<int> layer_sizes; vector<Mat> weights; double f_param1, f_param2; double min_val, max_val, min_val1, max_val1; int activ_func; int max_lsize, max_buf_sz; AnnParams params; RNG rng; Mutex mtx; bool trained; }; Ptr<ANN_MLP> ANN_MLP::create() { return makePtr<ANN_MLPImpl>(); } }} /* End of file. */
/* module: cvrout.c purpose: cube and cover output routines */ #include <ostream> #include "espresso.h" void fprint_pla(std::ostream& fp, pPLA PLA, int output_type) { int num; pcube last, p; if ((output_type & CONSTRAINTS_type) != 0) { output_symbolic_constraints(fp, PLA, 0); output_type &= ~ CONSTRAINTS_type; if (output_type == 0) { return; } } if ((output_type & SYMBOLIC_CONSTRAINTS_type) != 0) { output_symbolic_constraints(fp, PLA, 1); output_type &= ~ SYMBOLIC_CONSTRAINTS_type; if (output_type == 0) { return; } } if (output_type == PLEASURE_type) { pls_output(PLA); } else if (output_type == EQNTOTT_type) { eqn_output(PLA); } else if (output_type == KISS_type) { kiss_output(fp, PLA); } else { fpr_header(fp, PLA, output_type); num = 0; if (output_type & F_type) num += (PLA->F)->count; if (output_type & D_type) num += (PLA->D)->count; if (output_type & R_type) num += (PLA->R)->count; fp << ".p " << num << "\n"; /* quick patch 01/17/85 to support TPLA ! */ if (output_type == F_type) { foreach_set(PLA->F, last, p) { print_cube(fp, p, "01"); } fp << ".p " << num << "\n"; fp << ".e\n"; } else { if (output_type & F_type) { foreach_set(PLA->F, last, p) { print_cube(fp, p, "~1"); } } if (output_type & D_type) { foreach_set(PLA->D, last, p) { print_cube(fp, p, "~2"); } } if (output_type & R_type) { foreach_set(PLA->R, last, p) { print_cube(fp, p, "~0"); } } fp << ".end\n"; } } } void fpr_header(std::ostream& fp, pPLA PLA, int output_type) { int i, var; int first, last; /* .type keyword gives logical type */ if (output_type != F_type) { fp << ".type "; if (output_type & F_type) fp.put('f'); if (output_type & D_type) fp.put('d'); if (output_type & R_type) fp.put('r'); fp.put('\n'); } /* Check for binary or multiple-valued labels */ if (cube.num_mv_vars <= 1) { fp << ".i " << cube.num_binary_vars << "\n"; if (cube.output != -1) fp << ".o " << cube.part_size[cube.output] << "\n"; } else { fp << ".mv " << cube.num_vars << " " << cube.num_binary_vars; for(var = cube.num_binary_vars; var < cube.num_vars; var++) fp << " " << cube.part_size[var]; fp << "\n"; } /* binary valued labels */ if (PLA->label != nullptr && PLA->label[1] != nullptr && cube.num_binary_vars > 0) { fp << ".ilb"; for(var = 0; var < cube.num_binary_vars; var++) fp << " " << INLABEL(var); fp.put('\n'); } /* output-part (last multiple-valued variable) labels */ if (PLA->label != nullptr && PLA->label[cube.first_part[cube.output]] != nullptr && cube.output != -1) { fp << ".ob"; for(i = 0; i < cube.part_size[cube.output]; i++) fp << " " << OUTLABEL(i); fp.put('\n'); } /* multiple-valued labels */ for(var = cube.num_binary_vars; var < cube.num_vars-1; var++) { first = cube.first_part[var]; last = cube.last_part[var]; if (PLA->label != NULL && PLA->label[first] != NULL) { fp << ".label var=" << var; for(i = first; i <= last; i++) { fp << " " << PLA->label[i]; } fp.put('\n'); } } if (PLA->phase != (pcube) NULL) { first = cube.first_part[cube.output]; last = cube.last_part[cube.output]; fp << "#.phase "; for(i = first; i <= last; i++) fp.put(is_in_set(PLA->phase,i) ? '1' : '0'); fp << "\n"; } } void pls_output(pPLA PLA) { pcube last, p; printf(".option unmerged\n"); makeup_labels(PLA); pls_label(PLA, std::cout); pls_group(PLA, std::cout); printf(".p %d\n", PLA->F->count); foreach_set(PLA->F, last, p) { print_expanded_cube(std::cout, p, PLA->phase); } printf(".end\n"); } void pls_group(pPLA PLA, std::ostream& fp) { int var, i; std::size_t col, len; fp << "\n.group"; col = 6; for(var = 0; var < cube.num_vars-1; var++) { fp << " (", col += 2; for(i = cube.first_part[var]; i <= cube.last_part[var]; i++) { len = strlen(PLA->label[i]); if (col + len > 75) fp << " \\\n", col = 0; else if (i != 0) fp.put(' '), col += 1; fp << PLA->label[i], col += len; } fp << ")", col += 1; } fp << "\n"; } void pls_label(pPLA PLA, std::ostream& fp) { int var, i; std::size_t col, len; fp << ".label"; col = 6; for(var = 0; var < cube.num_vars; var++) for(i = cube.first_part[var]; i <= cube.last_part[var]; i++) { len = strlen(PLA->label[i]); if (col + len > 75) fp << " \\\n", col = 0; else fp.put(' '), col += 1; fp << PLA->label[i], col += len; } } /* eqntott output mode -- output algebraic equations */ void eqn_output(pPLA PLA) { pcube p, last; int i, var; std::size_t col, len; int x; bool firstand, firstor; if (cube.output == -1) fatal("Cannot have no-output function for EQNTOTT output mode"); if (cube.num_mv_vars != 1) fatal("Must have binary-valued function for EQNTOTT output mode"); makeup_labels(PLA); /* Write a single equation for each output */ for(i = 0; i < cube.part_size[cube.output]; i++) { printf("%s = ", OUTLABEL(i)); col = strlen(OUTLABEL(i)) + 3; firstor = TRUE; /* Write product terms for each cube in this output */ foreach_set(PLA->F, last, p) if (is_in_set(p, i + cube.first_part[cube.output])) { if (firstor) printf("("), col += 1; else printf(" | ("), col += 4; firstor = FALSE; firstand = TRUE; /* print out a product term */ for(var = 0; var < cube.num_binary_vars; var++) if ((x=GETINPUT(p, var)) != DASH) { len = strlen(INLABEL(var)); if (col+len > 72) printf("\n "), col = 4; if (! firstand) printf("&"), col += 1; firstand = FALSE; if (x == ZERO) printf("!"), col += 1; printf("%s", INLABEL(var)), col += len; } printf(")"), col += 1; } printf(";\n\n"); } } char *fmt_cube(pcube c, const char * out_map, char * s) { int i, var, last, len = 0; for(var = 0; var < cube.num_binary_vars; var++) { s[len++] = "?01-" [GETINPUT(c, var)]; } for(var = cube.num_binary_vars; var < cube.num_vars - 1; var++) { s[len++] = ' '; for(i = cube.first_part[var]; i <= cube.last_part[var]; i++) { s[len++] = "01" [is_in_set(c, i) != 0]; } } if (cube.output != -1) { last = cube.last_part[cube.output]; s[len++] = ' '; for(i = cube.first_part[cube.output]; i <= last; i++) { s[len++] = out_map [is_in_set(c, i) != 0]; } } s[len] = '\0'; return s; } void print_cube(std::ostream& fp, const pcube& c, const char * out_map) { int i, var, ch; int last; for(var = 0; var < cube.num_binary_vars; var++) { ch = "?01-" [GETINPUT(c, var)]; fp.put(ch); } for(var = cube.num_binary_vars; var < cube.num_vars - 1; var++) { fp.put(' '); for(i = cube.first_part[var]; i <= cube.last_part[var]; i++) { ch = "01" [is_in_set(c, i) != 0]; fp.put(ch); } } if (cube.output != -1) { last = cube.last_part[cube.output]; fp.put(' '); for(i = cube.first_part[cube.output]; i <= last; i++) { ch = out_map [is_in_set(c, i) != 0]; fp.put(ch); } } fp.put('\n'); } void print_expanded_cube(std::ostream& fp, pcube c, pcube phase) { int i, var, ch; const char *out_map; for(var = 0; var < cube.num_binary_vars; var++) { for(i = cube.first_part[var]; i <= cube.last_part[var]; i++) { ch = "~1" [is_in_set(c, i) != 0]; fp.put(ch); } } for(var = cube.num_binary_vars; var < cube.num_vars - 1; var++) { for(i = cube.first_part[var]; i <= cube.last_part[var]; i++) { ch = "1~" [is_in_set(c, i) != 0]; fp.put(ch); } } if (cube.output != -1) { var = cube.num_vars - 1; fp.put(' '); for(i = cube.first_part[var]; i <= cube.last_part[var]; i++) { if (phase == (pcube) NULL || is_in_set(phase, i)) { out_map = "~1"; } else { out_map = "~0"; } ch = out_map[is_in_set(c, i) != 0]; fp.put(ch); } } fp.put('\n'); } char *pc1(pcube c) {static char s1[256];return fmt_cube(c, "01", s1);} char *pc2(pcube c) {static char s2[256];return fmt_cube(c, "01", s2);} void debug_print(pcube * T, const char * name, int level) { pcube *T1, p, temp; long cnt; cnt = CUBELISTSIZE(T); temp = new_cube(); if (verbose_debug && level == 0) printf("\n"); printf("%s[%d]: ord(T)=%ld\n", name, level, cnt); if (verbose_debug) { printf("cofactor=%s\n", pc1(T[0])); for(T1 = T+2, cnt = 1; (p = *T1++) != (pcube) NULL; cnt++) printf("%4ld. %s\n", cnt, pc1(set_or(temp, p, T[0]))); } free_cube(temp); } void debug1_print(pcover T, const char * name, int num) { int cnt = 1; pcube p, last; if (verbose_debug && num == 0) printf("\n"); printf("%s[%d]: ord(T)=%d\n", name, num, T->count); if (verbose_debug) foreach_set(T, last, p) printf("%4d. %s\n", cnt++, pc1(p)); } void cprint(pcover T) { pcube p, last; foreach_set(T, last, p) printf("%s\n", pc1(p)); } void makeup_labels(pPLA PLA) { int var, i, ind; if (PLA->label == (char **) NULL) PLA_labels(PLA); for(var = 0; var < cube.num_vars; var++) for(i = 0; i < cube.part_size[var]; i++) { ind = cube.first_part[var] + i; if (PLA->label[ind] == (char *) NULL) { PLA->label[ind] = new char[15]; if (var < cube.num_binary_vars) if ((i % 2) == 0) (void) sprintf(PLA->label[ind], "v%d.bar", var); else (void) sprintf(PLA->label[ind], "v%d", var); else (void) sprintf(PLA->label[ind], "v%d.%d", var, i); } } } void kiss_output(std::ostream& fp, pPLA PLA) { pset last, p; foreach_set(PLA->F, last, p) { kiss_print_cube(fp, PLA, p, "~1"); } foreach_set(PLA->D, last, p) { kiss_print_cube(fp, PLA, p, "~2"); } } void kiss_print_cube(std::ostream& fp, pPLA PLA, pcube p, const char* out_string) { int i, var; int part, x; for(var = 0; var < cube.num_binary_vars; var++) { x = "?01-" [GETINPUT(p, var)]; fp.put(x); } for(var = cube.num_binary_vars; var < cube.num_vars - 1; var++) { fp.put(' '); if (setp_implies(cube.var_mask[var], p)) { fp.put('-'); } else { part = -1; for(i = cube.first_part[var]; i <= cube.last_part[var]; i++) { if (is_in_set(p, i)) { if (part != -1) { fatal("more than 1 part in a symbolic variable\n"); } part = i; } } if (part == -1) { fp.put('~'); /* no parts, hope its an output ... */ } else { fp << PLA->label[part]; } } } if ((var = cube.output) != -1) { fp.put(' '); for(i = cube.first_part[var]; i <= cube.last_part[var]; i++) { x = out_string [is_in_set(p, i) != 0]; fp.put(x); } } fp.put('\n'); } void output_symbolic_constraints(std::ostream& fp, pPLA PLA, int output_symbolic) { pset_family A; int i, j; int size, var, npermute, *permute, *weight, noweight; if ((cube.num_vars - cube.num_binary_vars) <= 1) { return; } makeup_labels(PLA); for(var=cube.num_binary_vars; var < cube.num_vars-1; var++) { /* pull out the columns for variable "var" */ npermute = cube.part_size[var]; permute = new int[npermute]; for(i=0; i < npermute; i++) { permute[i] = cube.first_part[var] + i; } A = sf_permute(sf_save(PLA->F), permute, npermute); delete permute; /* Delete the singletons and the full sets */ noweight = 0; for(i = 0; i < A->count; i++) { size = set_ord(GETSET(A,i)); if (size == 1 || size == A->sf_size) { sf_delset(A, i--); noweight++; } } /* Count how many times each is duplicated */ weight = new int[A->count]; for(i = 0; i < A->count; i++) { RESET(GETSET(A, i), COVERED); } for(i = 0; i < A->count; i++) { weight[i] = 0; if (! TESTP(GETSET(A,i), COVERED)) { weight[i] = 1; for(j = i+1; j < A->count; j++) { if (setp_equal(GETSET(A,i), GETSET(A,j))) { weight[i]++; SET(GETSET(A,j), COVERED); } } } } /* Print out the contraints */ if (! output_symbolic) { fp << "# Symbolic constraints for variable " << var << "(Numeric form)\n"; fp << "# unconstrained weight = " << noweight << "\n"; fp << "num_codes=" << cube.part_size[var] << "\n"; for(i = 0; i < A->count; i++) { if (weight[i] > 0) { fp << "weight=" << weight[i] << ": "; for(j = 0; j < A->sf_size; j++) { if (is_in_set(GETSET(A,i), j)) { fp << " " << j; } } fp << "\n"; } } } else { fp << "# Symbolic constraints for variable " << var << " (Symbolic form)\n"; for(i = 0; i < A->count; i++) { if (weight[i] > 0) { fp << "# w=" << weight[i] << ": ("; for(j = 0; j < A->sf_size; j++) { if (is_in_set(GETSET(A,i), j)) { fp << " " << PLA->label[cube.first_part[var]+j]; } } fp << " )\n"; } } delete weight; } } }
// Copyright 2015 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/codegen/macro-assembler.h" #include "src/compiler/backend/instruction-scheduler.h" namespace v8 { namespace internal { namespace compiler { bool InstructionScheduler::SchedulerSupported() { return true; } int InstructionScheduler::GetTargetInstructionFlags( const Instruction* instr) const { switch (instr->arch_opcode()) { case kMips64AbsD: case kMips64AbsS: case kMips64Add: case kMips64AddD: case kMips64AddS: case kMips64And: case kMips64And32: case kMips64AssertEqual: case kMips64BitcastDL: case kMips64BitcastLD: case kMips64ByteSwap32: case kMips64ByteSwap64: case kMips64CeilWD: case kMips64CeilWS: case kMips64Clz: case kMips64Cmp: case kMips64CmpD: case kMips64CmpS: case kMips64Ctz: case kMips64CvtDL: case kMips64CvtDS: case kMips64CvtDUl: case kMips64CvtDUw: case kMips64CvtDW: case kMips64CvtSD: case kMips64CvtSL: case kMips64CvtSUl: case kMips64CvtSUw: case kMips64CvtSW: case kMips64DMulHigh: case kMips64MulHighU: case kMips64Dadd: case kMips64DaddOvf: case kMips64Dclz: case kMips64Dctz: case kMips64Ddiv: case kMips64DdivU: case kMips64Dext: case kMips64Dins: case kMips64Div: case kMips64DivD: case kMips64DivS: case kMips64DivU: case kMips64Dlsa: case kMips64Dmod: case kMips64DmodU: case kMips64Dmul: case kMips64Dpopcnt: case kMips64Dror: case kMips64Dsar: case kMips64Dshl: case kMips64Dshr: case kMips64Dsub: case kMips64DsubOvf: case kMips64Ext: case kMips64F64x2Abs: case kMips64F64x2Neg: case kMips64F64x2Sqrt: case kMips64F64x2Add: case kMips64F64x2Sub: case kMips64F64x2Mul: case kMips64F64x2Div: case kMips64F64x2Min: case kMips64F64x2Max: case kMips64F64x2Eq: case kMips64F64x2Ne: case kMips64F64x2Lt: case kMips64F64x2Le: case kMips64I64x2Add: case kMips64I64x2Sub: case kMips64I64x2Mul: case kMips64I64x2Neg: case kMips64I64x2Shl: case kMips64I64x2ShrS: case kMips64I64x2ShrU: case kMips64F32x4Abs: case kMips64F32x4Add: case kMips64F32x4AddHoriz: case kMips64F32x4Eq: case kMips64F32x4ExtractLane: case kMips64F32x4Lt: case kMips64F32x4Le: case kMips64F32x4Max: case kMips64F32x4Min: case kMips64F32x4Mul: case kMips64F32x4Div: case kMips64F32x4Ne: case kMips64F32x4Neg: case kMips64F32x4Sqrt: case kMips64F32x4RecipApprox: case kMips64F32x4RecipSqrtApprox: case kMips64F32x4ReplaceLane: case kMips64F32x4SConvertI32x4: case kMips64F32x4Splat: case kMips64F32x4Sub: case kMips64F32x4UConvertI32x4: case kMips64F64x2Splat: case kMips64F64x2ExtractLane: case kMips64F64x2ReplaceLane: case kMips64Float32Max: case kMips64Float32Min: case kMips64Float32RoundDown: case kMips64Float32RoundTiesEven: case kMips64Float32RoundTruncate: case kMips64Float32RoundUp: case kMips64Float64ExtractLowWord32: case kMips64Float64ExtractHighWord32: case kMips64Float64InsertLowWord32: case kMips64Float64InsertHighWord32: case kMips64Float64Max: case kMips64Float64Min: case kMips64Float64RoundDown: case kMips64Float64RoundTiesEven: case kMips64Float64RoundTruncate: case kMips64Float64RoundUp: case kMips64Float64SilenceNaN: case kMips64FloorWD: case kMips64FloorWS: case kMips64I16x8Add: case kMips64I16x8AddHoriz: case kMips64I16x8AddSaturateS: case kMips64I16x8AddSaturateU: case kMips64I16x8Eq: case kMips64I16x8ExtractLaneU: case kMips64I16x8ExtractLaneS: case kMips64I16x8GeS: case kMips64I16x8GeU: case kMips64I16x8GtS: case kMips64I16x8GtU: case kMips64I16x8MaxS: case kMips64I16x8MaxU: case kMips64I16x8MinS: case kMips64I16x8MinU: case kMips64I16x8Mul: case kMips64I16x8Ne: case kMips64I16x8Neg: case kMips64I16x8ReplaceLane: case kMips64I8x16SConvertI16x8: case kMips64I16x8SConvertI32x4: case kMips64I16x8SConvertI8x16High: case kMips64I16x8SConvertI8x16Low: case kMips64I16x8Shl: case kMips64I16x8ShrS: case kMips64I16x8ShrU: case kMips64I16x8Splat: case kMips64I16x8Sub: case kMips64I16x8SubSaturateS: case kMips64I16x8SubSaturateU: case kMips64I8x16UConvertI16x8: case kMips64I16x8UConvertI32x4: case kMips64I16x8UConvertI8x16High: case kMips64I16x8UConvertI8x16Low: case kMips64I16x8RoundingAverageU: case kMips64I32x4Add: case kMips64I32x4AddHoriz: case kMips64I32x4Eq: case kMips64I32x4ExtractLane: case kMips64I32x4GeS: case kMips64I32x4GeU: case kMips64I32x4GtS: case kMips64I32x4GtU: case kMips64I32x4MaxS: case kMips64I32x4MaxU: case kMips64I32x4MinS: case kMips64I32x4MinU: case kMips64I32x4Mul: case kMips64I32x4Ne: case kMips64I32x4Neg: case kMips64I32x4ReplaceLane: case kMips64I32x4SConvertF32x4: case kMips64I32x4SConvertI16x8High: case kMips64I32x4SConvertI16x8Low: case kMips64I32x4Shl: case kMips64I32x4ShrS: case kMips64I32x4ShrU: case kMips64I32x4Splat: case kMips64I32x4Sub: case kMips64I32x4UConvertF32x4: case kMips64I32x4UConvertI16x8High: case kMips64I32x4UConvertI16x8Low: case kMips64I8x16Add: case kMips64I8x16AddSaturateS: case kMips64I8x16AddSaturateU: case kMips64I8x16Eq: case kMips64I8x16ExtractLaneU: case kMips64I8x16ExtractLaneS: case kMips64I8x16GeS: case kMips64I8x16GeU: case kMips64I8x16GtS: case kMips64I8x16GtU: case kMips64I8x16MaxS: case kMips64I8x16MaxU: case kMips64I8x16MinS: case kMips64I8x16MinU: case kMips64I8x16Mul: case kMips64I8x16Ne: case kMips64I8x16Neg: case kMips64I8x16ReplaceLane: case kMips64I8x16Shl: case kMips64I8x16ShrS: case kMips64I8x16ShrU: case kMips64I8x16Splat: case kMips64I8x16Sub: case kMips64I8x16SubSaturateS: case kMips64I8x16SubSaturateU: case kMips64I8x16RoundingAverageU: case kMips64Ins: case kMips64Lsa: case kMips64MaxD: case kMips64MaxS: case kMips64MinD: case kMips64MinS: case kMips64Mod: case kMips64ModU: case kMips64Mov: case kMips64Mul: case kMips64MulD: case kMips64MulHigh: case kMips64MulOvf: case kMips64MulS: case kMips64NegD: case kMips64NegS: case kMips64Nor: case kMips64Nor32: case kMips64Or: case kMips64Or32: case kMips64Popcnt: case kMips64Ror: case kMips64RoundWD: case kMips64RoundWS: case kMips64S128And: case kMips64S128Or: case kMips64S128Not: case kMips64S128Select: case kMips64S128AndNot: case kMips64S128Xor: case kMips64S128Zero: case kMips64S16x8InterleaveEven: case kMips64S16x8InterleaveOdd: case kMips64S16x8InterleaveLeft: case kMips64S16x8InterleaveRight: case kMips64S16x8PackEven: case kMips64S16x8PackOdd: case kMips64S16x2Reverse: case kMips64S16x4Reverse: case kMips64S1x16AllTrue: case kMips64S1x16AnyTrue: case kMips64S1x4AllTrue: case kMips64S1x4AnyTrue: case kMips64S1x8AllTrue: case kMips64S1x8AnyTrue: case kMips64S32x4InterleaveEven: case kMips64S32x4InterleaveOdd: case kMips64S32x4InterleaveLeft: case kMips64S32x4InterleaveRight: case kMips64S32x4PackEven: case kMips64S32x4PackOdd: case kMips64S32x4Shuffle: case kMips64S8x16Concat: case kMips64S8x16InterleaveEven: case kMips64S8x16InterleaveOdd: case kMips64S8x16InterleaveLeft: case kMips64S8x16InterleaveRight: case kMips64S8x16PackEven: case kMips64S8x16PackOdd: case kMips64S8x2Reverse: case kMips64S8x4Reverse: case kMips64S8x8Reverse: case kMips64S8x16Shuffle: case kMips64S8x16Swizzle: case kMips64Sar: case kMips64Seb: case kMips64Seh: case kMips64Shl: case kMips64Shr: case kMips64SqrtD: case kMips64SqrtS: case kMips64Sub: case kMips64SubD: case kMips64SubS: case kMips64TruncLD: case kMips64TruncLS: case kMips64TruncUlD: case kMips64TruncUlS: case kMips64TruncUwD: case kMips64TruncUwS: case kMips64TruncWD: case kMips64TruncWS: case kMips64Tst: case kMips64Xor: case kMips64Xor32: return kNoOpcodeFlags; case kMips64Lb: case kMips64Lbu: case kMips64Ld: case kMips64Ldc1: case kMips64Lh: case kMips64Lhu: case kMips64Lw: case kMips64Lwc1: case kMips64Lwu: case kMips64MsaLd: case kMips64Peek: case kMips64Uld: case kMips64Uldc1: case kMips64Ulh: case kMips64Ulhu: case kMips64Ulw: case kMips64Ulwu: case kMips64Ulwc1: case kMips64S8x16LoadSplat: case kMips64S16x8LoadSplat: case kMips64S32x4LoadSplat: case kMips64S64x2LoadSplat: case kMips64I16x8Load8x8S: case kMips64I16x8Load8x8U: case kMips64I32x4Load16x4S: case kMips64I32x4Load16x4U: case kMips64I64x2Load32x2S: case kMips64I64x2Load32x2U: case kMips64Word64AtomicLoadUint8: case kMips64Word64AtomicLoadUint16: case kMips64Word64AtomicLoadUint32: case kMips64Word64AtomicLoadUint64: return kIsLoadOperation; case kMips64ModD: case kMips64ModS: case kMips64MsaSt: case kMips64Push: case kMips64Sb: case kMips64Sd: case kMips64Sdc1: case kMips64Sh: case kMips64StackClaim: case kMips64StoreToStackSlot: case kMips64Sw: case kMips64Swc1: case kMips64Usd: case kMips64Usdc1: case kMips64Ush: case kMips64Usw: case kMips64Uswc1: case kMips64Sync: case kMips64Word64AtomicStoreWord8: case kMips64Word64AtomicStoreWord16: case kMips64Word64AtomicStoreWord32: case kMips64Word64AtomicStoreWord64: case kMips64Word64AtomicAddUint8: case kMips64Word64AtomicAddUint16: case kMips64Word64AtomicAddUint32: case kMips64Word64AtomicAddUint64: case kMips64Word64AtomicSubUint8: case kMips64Word64AtomicSubUint16: case kMips64Word64AtomicSubUint32: case kMips64Word64AtomicSubUint64: case kMips64Word64AtomicAndUint8: case kMips64Word64AtomicAndUint16: case kMips64Word64AtomicAndUint32: case kMips64Word64AtomicAndUint64: case kMips64Word64AtomicOrUint8: case kMips64Word64AtomicOrUint16: case kMips64Word64AtomicOrUint32: case kMips64Word64AtomicOrUint64: case kMips64Word64AtomicXorUint8: case kMips64Word64AtomicXorUint16: case kMips64Word64AtomicXorUint32: case kMips64Word64AtomicXorUint64: case kMips64Word64AtomicExchangeUint8: case kMips64Word64AtomicExchangeUint16: case kMips64Word64AtomicExchangeUint32: case kMips64Word64AtomicExchangeUint64: case kMips64Word64AtomicCompareExchangeUint8: case kMips64Word64AtomicCompareExchangeUint16: case kMips64Word64AtomicCompareExchangeUint32: case kMips64Word64AtomicCompareExchangeUint64: return kHasSideEffect; #define CASE(Name) case k##Name: COMMON_ARCH_OPCODE_LIST(CASE) #undef CASE // Already covered in architecture independent code. UNREACHABLE(); } UNREACHABLE(); } enum Latency { BRANCH = 4, // Estimated max. RINT_S = 4, // Estimated. RINT_D = 4, // Estimated. MULT = 4, MULTU = 4, DMULT = 4, DMULTU = 4, MUL = 7, DMUL = 7, MUH = 7, MUHU = 7, DMUH = 7, DMUHU = 7, DIV = 50, // Min:11 Max:50 DDIV = 50, DIVU = 50, DDIVU = 50, ABS_S = 4, ABS_D = 4, NEG_S = 4, NEG_D = 4, ADD_S = 4, ADD_D = 4, SUB_S = 4, SUB_D = 4, MAX_S = 4, // Estimated. MIN_S = 4, MAX_D = 4, // Estimated. MIN_D = 4, C_cond_S = 4, C_cond_D = 4, MUL_S = 4, MADD_S = 4, MSUB_S = 4, NMADD_S = 4, NMSUB_S = 4, CABS_cond_S = 4, CABS_cond_D = 4, CVT_D_S = 4, CVT_PS_PW = 4, CVT_S_W = 4, CVT_S_L = 4, CVT_D_W = 4, CVT_D_L = 4, CVT_S_D = 4, CVT_W_S = 4, CVT_W_D = 4, CVT_L_S = 4, CVT_L_D = 4, CEIL_W_S = 4, CEIL_W_D = 4, CEIL_L_S = 4, CEIL_L_D = 4, FLOOR_W_S = 4, FLOOR_W_D = 4, FLOOR_L_S = 4, FLOOR_L_D = 4, ROUND_W_S = 4, ROUND_W_D = 4, ROUND_L_S = 4, ROUND_L_D = 4, TRUNC_W_S = 4, TRUNC_W_D = 4, TRUNC_L_S = 4, TRUNC_L_D = 4, MOV_S = 4, MOV_D = 4, MOVF_S = 4, MOVF_D = 4, MOVN_S = 4, MOVN_D = 4, MOVT_S = 4, MOVT_D = 4, MOVZ_S = 4, MOVZ_D = 4, MUL_D = 5, MADD_D = 5, MSUB_D = 5, NMADD_D = 5, NMSUB_D = 5, RECIP_S = 13, RECIP_D = 26, RSQRT_S = 17, RSQRT_D = 36, DIV_S = 17, SQRT_S = 17, DIV_D = 32, SQRT_D = 32, MTC1 = 4, MTHC1 = 4, DMTC1 = 4, LWC1 = 4, LDC1 = 4, MFC1 = 1, MFHC1 = 1, DMFC1 = 1, MFHI = 1, MFLO = 1, SWC1 = 1, SDC1 = 1, }; int DadduLatency(bool is_operand_register = true) { if (is_operand_register) { return 1; } else { return 2; // Estimated max. } } int DsubuLatency(bool is_operand_register = true) { return DadduLatency(is_operand_register); } int AndLatency(bool is_operand_register = true) { return DadduLatency(is_operand_register); } int OrLatency(bool is_operand_register = true) { return DadduLatency(is_operand_register); } int NorLatency(bool is_operand_register = true) { if (is_operand_register) { return 1; } else { return 2; // Estimated max. } } int XorLatency(bool is_operand_register = true) { return DadduLatency(is_operand_register); } int MulLatency(bool is_operand_register = true) { if (is_operand_register) { return Latency::MUL; } else { return Latency::MUL + 1; } } int DmulLatency(bool is_operand_register = true) { int latency = 0; if (kArchVariant >= kMips64r6) { latency = Latency::DMUL; } else { latency = Latency::DMULT + Latency::MFLO; } if (!is_operand_register) { latency += 1; } return latency; } int MulhLatency(bool is_operand_register = true) { int latency = 0; if (kArchVariant >= kMips64r6) { latency = Latency::MUH; } else { latency = Latency::MULT + Latency::MFHI; } if (!is_operand_register) { latency += 1; } return latency; } int MulhuLatency(bool is_operand_register = true) { int latency = 0; if (kArchVariant >= kMips64r6) { latency = Latency::MUH; } else { latency = Latency::MULTU + Latency::MFHI; } if (!is_operand_register) { latency += 1; } return latency; } int DMulhLatency(bool is_operand_register = true) { int latency = 0; if (kArchVariant >= kMips64r6) { latency = Latency::DMUH; } else { latency = Latency::DMULT + Latency::MFHI; } if (!is_operand_register) { latency += 1; } return latency; } int DivLatency(bool is_operand_register = true) { if (is_operand_register) { return Latency::DIV; } else { return Latency::DIV + 1; } } int DivuLatency(bool is_operand_register = true) { if (is_operand_register) { return Latency::DIVU; } else { return Latency::DIVU + 1; } } int DdivLatency(bool is_operand_register = true) { int latency = 0; if (kArchVariant >= kMips64r6) { latency = Latency::DDIV; } else { latency = Latency::DDIV + Latency::MFLO; } if (!is_operand_register) { latency += 1; } return latency; } int DdivuLatency(bool is_operand_register = true) { int latency = 0; if (kArchVariant >= kMips64r6) { latency = Latency::DDIVU; } else { latency = Latency::DDIVU + Latency::MFLO; } if (!is_operand_register) { latency += 1; } return latency; } int ModLatency(bool is_operand_register = true) { int latency = 0; if (kArchVariant >= kMips64r6) { latency = 1; } else { latency = Latency::DIV + Latency::MFHI; } if (!is_operand_register) { latency += 1; } return latency; } int ModuLatency(bool is_operand_register = true) { int latency = 0; if (kArchVariant >= kMips64r6) { latency = 1; } else { latency = Latency::DIVU + Latency::MFHI; } if (!is_operand_register) { latency += 1; } return latency; } int DmodLatency(bool is_operand_register = true) { int latency = 0; if (kArchVariant >= kMips64r6) { latency = 1; } else { latency = Latency::DDIV + Latency::MFHI; } if (!is_operand_register) { latency += 1; } return latency; } int DmoduLatency(bool is_operand_register = true) { int latency = 0; if (kArchVariant >= kMips64r6) { latency = 1; } else { latency = Latency::DDIV + Latency::MFHI; } if (!is_operand_register) { latency += 1; } return latency; } int MovzLatency() { if (kArchVariant >= kMips64r6) { return Latency::BRANCH + 1; } else { return 1; } } int MovnLatency() { if (kArchVariant >= kMips64r6) { return Latency::BRANCH + 1; } else { return 1; } } int DlsaLatency() { // Estimated max. return DadduLatency() + 1; } int CallLatency() { // Estimated. return DadduLatency(false) + Latency::BRANCH + 5; } int JumpLatency() { // Estimated max. return 1 + DadduLatency() + Latency::BRANCH + 2; } int SmiUntagLatency() { return 1; } int PrepareForTailCallLatency() { // Estimated max. return 2 * (DlsaLatency() + DadduLatency(false)) + 2 + Latency::BRANCH + Latency::BRANCH + 2 * DsubuLatency(false) + 2 + Latency::BRANCH + 1; } int AssemblePopArgumentsAdoptFrameLatency() { return 1 + Latency::BRANCH + 1 + SmiUntagLatency() + PrepareForTailCallLatency(); } int AssertLatency() { return 1; } int PrepareCallCFunctionLatency() { int frame_alignment = TurboAssembler::ActivationFrameAlignment(); if (frame_alignment > kSystemPointerSize) { return 1 + DsubuLatency(false) + AndLatency(false) + 1; } else { return DsubuLatency(false); } } int AdjustBaseAndOffsetLatency() { return 3; // Estimated max. } int AlignedMemoryLatency() { return AdjustBaseAndOffsetLatency() + 1; } int UlhuLatency() { if (kArchVariant >= kMips64r6) { return AlignedMemoryLatency(); } else { return AdjustBaseAndOffsetLatency() + 2 * AlignedMemoryLatency() + 2; } } int UlwLatency() { if (kArchVariant >= kMips64r6) { return AlignedMemoryLatency(); } else { // Estimated max. return AdjustBaseAndOffsetLatency() + 3; } } int UlwuLatency() { if (kArchVariant >= kMips64r6) { return AlignedMemoryLatency(); } else { return UlwLatency() + 1; } } int UldLatency() { if (kArchVariant >= kMips64r6) { return AlignedMemoryLatency(); } else { // Estimated max. return AdjustBaseAndOffsetLatency() + 3; } } int Ulwc1Latency() { if (kArchVariant >= kMips64r6) { return AlignedMemoryLatency(); } else { return UlwLatency() + Latency::MTC1; } } int Uldc1Latency() { if (kArchVariant >= kMips64r6) { return AlignedMemoryLatency(); } else { return UldLatency() + Latency::DMTC1; } } int UshLatency() { if (kArchVariant >= kMips64r6) { return AlignedMemoryLatency(); } else { // Estimated max. return AdjustBaseAndOffsetLatency() + 2 + 2 * AlignedMemoryLatency(); } } int UswLatency() { if (kArchVariant >= kMips64r6) { return AlignedMemoryLatency(); } else { return AdjustBaseAndOffsetLatency() + 2; } } int UsdLatency() { if (kArchVariant >= kMips64r6) { return AlignedMemoryLatency(); } else { return AdjustBaseAndOffsetLatency() + 2; } } int Uswc1Latency() { if (kArchVariant >= kMips64r6) { return AlignedMemoryLatency(); } else { return Latency::MFC1 + UswLatency(); } } int Usdc1Latency() { if (kArchVariant >= kMips64r6) { return AlignedMemoryLatency(); } else { return Latency::DMFC1 + UsdLatency(); } } int Lwc1Latency() { return AdjustBaseAndOffsetLatency() + Latency::LWC1; } int Swc1Latency() { return AdjustBaseAndOffsetLatency() + Latency::SWC1; } int Sdc1Latency() { return AdjustBaseAndOffsetLatency() + Latency::SDC1; } int Ldc1Latency() { return AdjustBaseAndOffsetLatency() + Latency::LDC1; } int MultiPushLatency() { int latency = DsubuLatency(false); for (int16_t i = kNumRegisters - 1; i >= 0; i--) { latency++; } return latency; } int MultiPushFPULatency() { int latency = DsubuLatency(false); for (int16_t i = kNumRegisters - 1; i >= 0; i--) { latency += Sdc1Latency(); } return latency; } int PushCallerSavedLatency(SaveFPRegsMode fp_mode) { int latency = MultiPushLatency(); if (fp_mode == kSaveFPRegs) { latency += MultiPushFPULatency(); } return latency; } int MultiPopLatency() { int latency = DadduLatency(false); for (int16_t i = 0; i < kNumRegisters; i++) { latency++; } return latency; } int MultiPopFPULatency() { int latency = DadduLatency(false); for (int16_t i = 0; i < kNumRegisters; i++) { latency += Ldc1Latency(); } return latency; } int PopCallerSavedLatency(SaveFPRegsMode fp_mode) { int latency = MultiPopLatency(); if (fp_mode == kSaveFPRegs) { latency += MultiPopFPULatency(); } return latency; } int CallCFunctionHelperLatency() { // Estimated. int latency = AndLatency(false) + Latency::BRANCH + 2 + CallLatency(); if (base::OS::ActivationFrameAlignment() > kSystemPointerSize) { latency++; } else { latency += DadduLatency(false); } return latency; } int CallCFunctionLatency() { return 1 + CallCFunctionHelperLatency(); } int AssembleArchJumpLatency() { // Estimated max. return Latency::BRANCH; } int AssembleArchLookupSwitchLatency(const Instruction* instr) { int latency = 0; for (size_t index = 2; index < instr->InputCount(); index += 2) { latency += 1 + Latency::BRANCH; } return latency + AssembleArchJumpLatency(); } int GenerateSwitchTableLatency() { int latency = 0; if (kArchVariant >= kMips64r6) { latency = DlsaLatency() + 2; } else { latency = 6; } latency += 2; return latency; } int AssembleArchTableSwitchLatency() { return Latency::BRANCH + GenerateSwitchTableLatency(); } int DropAndRetLatency() { // Estimated max. return DadduLatency(false) + JumpLatency(); } int AssemblerReturnLatency() { // Estimated max. return DadduLatency(false) + MultiPopLatency() + MultiPopFPULatency() + Latency::BRANCH + DadduLatency() + 1 + DropAndRetLatency(); } int TryInlineTruncateDoubleToILatency() { return 2 + Latency::TRUNC_W_D + Latency::MFC1 + 2 + AndLatency(false) + Latency::BRANCH; } int CallStubDelayedLatency() { return 1 + CallLatency(); } int TruncateDoubleToIDelayedLatency() { // TODO(mips): This no longer reflects how TruncateDoubleToI is called. return TryInlineTruncateDoubleToILatency() + 1 + DsubuLatency(false) + Sdc1Latency() + CallStubDelayedLatency() + DadduLatency(false) + 1; } int CheckPageFlagLatency() { return AndLatency(false) + AlignedMemoryLatency() + AndLatency(false) + Latency::BRANCH; } int SltuLatency(bool is_operand_register = true) { if (is_operand_register) { return 1; } else { return 2; // Estimated max. } } int BranchShortHelperR6Latency() { return 2; // Estimated max. } int BranchShortHelperLatency() { return SltuLatency() + 2; // Estimated max. } int BranchShortLatency(BranchDelaySlot bdslot = PROTECT) { if (kArchVariant >= kMips64r6 && bdslot == PROTECT) { return BranchShortHelperR6Latency(); } else { return BranchShortHelperLatency(); } } int MoveLatency() { return 1; } int MovToFloatParametersLatency() { return 2 * MoveLatency(); } int MovFromFloatResultLatency() { return MoveLatency(); } int DaddOverflowLatency() { // Estimated max. return 6; } int DsubOverflowLatency() { // Estimated max. return 6; } int MulOverflowLatency() { // Estimated max. return MulLatency() + MulhLatency() + 2; } int DclzLatency() { return 1; } int CtzLatency() { if (kArchVariant >= kMips64r6) { return 3 + DclzLatency(); } else { return DadduLatency(false) + XorLatency() + AndLatency() + DclzLatency() + 1 + DsubuLatency(); } } int DctzLatency() { if (kArchVariant >= kMips64r6) { return 4; } else { return DadduLatency(false) + XorLatency() + AndLatency() + 1 + DsubuLatency(); } } int PopcntLatency() { return 2 + AndLatency() + DsubuLatency() + 1 + AndLatency() + 1 + AndLatency() + DadduLatency() + 1 + DadduLatency() + 1 + AndLatency() + 1 + MulLatency() + 1; } int DpopcntLatency() { return 2 + AndLatency() + DsubuLatency() + 1 + AndLatency() + 1 + AndLatency() + DadduLatency() + 1 + DadduLatency() + 1 + AndLatency() + 1 + DmulLatency() + 1; } int CompareFLatency() { return Latency::C_cond_S; } int CompareF32Latency() { return CompareFLatency(); } int CompareF64Latency() { return CompareFLatency(); } int CompareIsNanFLatency() { return CompareFLatency(); } int CompareIsNanF32Latency() { return CompareIsNanFLatency(); } int CompareIsNanF64Latency() { return CompareIsNanFLatency(); } int NegsLatency() { if (kArchVariant >= kMips64r6) { return Latency::NEG_S; } else { // Estimated. return CompareIsNanF32Latency() + 2 * Latency::BRANCH + Latency::NEG_S + Latency::MFC1 + 1 + XorLatency() + Latency::MTC1; } } int NegdLatency() { if (kArchVariant >= kMips64r6) { return Latency::NEG_D; } else { // Estimated. return CompareIsNanF64Latency() + 2 * Latency::BRANCH + Latency::NEG_D + Latency::DMFC1 + 1 + XorLatency() + Latency::DMTC1; } } int Float64RoundLatency() { if (kArchVariant >= kMips64r6) { return Latency::RINT_D + 4; } else { // For ceil_l_d, floor_l_d, round_l_d, trunc_l_d latency is 4. return Latency::DMFC1 + 1 + Latency::BRANCH + Latency::MOV_D + 4 + Latency::DMFC1 + Latency::BRANCH + Latency::CVT_D_L + 2 + Latency::MTHC1; } } int Float32RoundLatency() { if (kArchVariant >= kMips64r6) { return Latency::RINT_S + 4; } else { // For ceil_w_s, floor_w_s, round_w_s, trunc_w_s latency is 4. return Latency::MFC1 + 1 + Latency::BRANCH + Latency::MOV_S + 4 + Latency::MFC1 + Latency::BRANCH + Latency::CVT_S_W + 2 + Latency::MTC1; } } int Float32MaxLatency() { // Estimated max. int latency = CompareIsNanF32Latency() + Latency::BRANCH; if (kArchVariant >= kMips64r6) { return latency + Latency::MAX_S; } else { return latency + 5 * Latency::BRANCH + 2 * CompareF32Latency() + Latency::MFC1 + 1 + Latency::MOV_S; } } int Float64MaxLatency() { // Estimated max. int latency = CompareIsNanF64Latency() + Latency::BRANCH; if (kArchVariant >= kMips64r6) { return latency + Latency::MAX_D; } else { return latency + 5 * Latency::BRANCH + 2 * CompareF64Latency() + Latency::DMFC1 + Latency::MOV_D; } } int Float32MinLatency() { // Estimated max. int latency = CompareIsNanF32Latency() + Latency::BRANCH; if (kArchVariant >= kMips64r6) { return latency + Latency::MIN_S; } else { return latency + 5 * Latency::BRANCH + 2 * CompareF32Latency() + Latency::MFC1 + 1 + Latency::MOV_S; } } int Float64MinLatency() { // Estimated max. int latency = CompareIsNanF64Latency() + Latency::BRANCH; if (kArchVariant >= kMips64r6) { return latency + Latency::MIN_D; } else { return latency + 5 * Latency::BRANCH + 2 * CompareF32Latency() + Latency::DMFC1 + Latency::MOV_D; } } int TruncLSLatency(bool load_status) { int latency = Latency::TRUNC_L_S + Latency::DMFC1; if (load_status) { latency += SltuLatency() + 7; } return latency; } int TruncLDLatency(bool load_status) { int latency = Latency::TRUNC_L_D + Latency::DMFC1; if (load_status) { latency += SltuLatency() + 7; } return latency; } int TruncUlSLatency() { // Estimated max. return 2 * CompareF32Latency() + CompareIsNanF32Latency() + 4 * Latency::BRANCH + Latency::SUB_S + 2 * Latency::TRUNC_L_S + 3 * Latency::DMFC1 + OrLatency() + Latency::MTC1 + Latency::MOV_S + SltuLatency() + 4; } int TruncUlDLatency() { // Estimated max. return 2 * CompareF64Latency() + CompareIsNanF64Latency() + 4 * Latency::BRANCH + Latency::SUB_D + 2 * Latency::TRUNC_L_D + 3 * Latency::DMFC1 + OrLatency() + Latency::DMTC1 + Latency::MOV_D + SltuLatency() + 4; } int PushLatency() { return DadduLatency() + AlignedMemoryLatency(); } int ByteSwapSignedLatency() { return 2; } int LlLatency(int offset) { bool is_one_instruction = (kArchVariant == kMips64r6) ? is_int9(offset) : is_int16(offset); if (is_one_instruction) { return 1; } else { return 3; } } int ExtractBitsLatency(bool sign_extend, int size) { int latency = 2; if (sign_extend) { switch (size) { case 8: case 16: case 32: latency += 1; break; default: UNREACHABLE(); } } return latency; } int InsertBitsLatency() { return 2 + DsubuLatency(false) + 2; } int ScLatency(int offset) { bool is_one_instruction = (kArchVariant == kMips64r6) ? is_int9(offset) : is_int16(offset); if (is_one_instruction) { return 1; } else { return 3; } } int Word32AtomicExchangeLatency(bool sign_extend, int size) { return DadduLatency(false) + 1 + DsubuLatency() + 2 + LlLatency(0) + ExtractBitsLatency(sign_extend, size) + InsertBitsLatency() + ScLatency(0) + BranchShortLatency() + 1; } int Word32AtomicCompareExchangeLatency(bool sign_extend, int size) { return 2 + DsubuLatency() + 2 + LlLatency(0) + ExtractBitsLatency(sign_extend, size) + InsertBitsLatency() + ScLatency(0) + BranchShortLatency() + 1; } int InstructionScheduler::GetInstructionLatency(const Instruction* instr) { // Basic latency modeling for MIPS64 instructions. They have been determined // in empirical way. switch (instr->arch_opcode()) { case kArchCallCodeObject: case kArchCallWasmFunction: return CallLatency(); case kArchTailCallCodeObjectFromJSFunction: case kArchTailCallCodeObject: { int latency = 0; if (instr->arch_opcode() == kArchTailCallCodeObjectFromJSFunction) { latency = AssemblePopArgumentsAdoptFrameLatency(); } return latency + JumpLatency(); } case kArchTailCallWasm: case kArchTailCallAddress: return JumpLatency(); case kArchCallJSFunction: { int latency = 0; if (FLAG_debug_code) { latency = 1 + AssertLatency(); } return latency + 1 + DadduLatency(false) + CallLatency(); } case kArchPrepareCallCFunction: return PrepareCallCFunctionLatency(); case kArchSaveCallerRegisters: { auto fp_mode = static_cast<SaveFPRegsMode>(MiscField::decode(instr->opcode())); return PushCallerSavedLatency(fp_mode); } case kArchRestoreCallerRegisters: { auto fp_mode = static_cast<SaveFPRegsMode>(MiscField::decode(instr->opcode())); return PopCallerSavedLatency(fp_mode); } case kArchPrepareTailCall: return 2; case kArchCallCFunction: return CallCFunctionLatency(); case kArchJmp: return AssembleArchJumpLatency(); case kArchLookupSwitch: return AssembleArchLookupSwitchLatency(instr); case kArchTableSwitch: return AssembleArchTableSwitchLatency(); case kArchAbortCSAAssert: return CallLatency() + 1; case kArchDebugBreak: return 1; case kArchComment: case kArchNop: case kArchThrowTerminator: case kArchDeoptimize: return 0; case kArchRet: return AssemblerReturnLatency(); case kArchFramePointer: return 1; case kArchParentFramePointer: // Estimated max. return AlignedMemoryLatency(); case kArchTruncateDoubleToI: return TruncateDoubleToIDelayedLatency(); case kArchStoreWithWriteBarrier: return DadduLatency() + 1 + CheckPageFlagLatency(); case kArchStackSlot: // Estimated max. return DadduLatency(false) + AndLatency(false) + AssertLatency() + DadduLatency(false) + AndLatency(false) + BranchShortLatency() + 1 + DsubuLatency() + DadduLatency(); case kArchWordPoisonOnSpeculation: return AndLatency(); case kIeee754Float64Acos: case kIeee754Float64Acosh: case kIeee754Float64Asin: case kIeee754Float64Asinh: case kIeee754Float64Atan: case kIeee754Float64Atanh: case kIeee754Float64Atan2: case kIeee754Float64Cos: case kIeee754Float64Cosh: case kIeee754Float64Cbrt: case kIeee754Float64Exp: case kIeee754Float64Expm1: case kIeee754Float64Log: case kIeee754Float64Log1p: case kIeee754Float64Log10: case kIeee754Float64Log2: case kIeee754Float64Pow: case kIeee754Float64Sin: case kIeee754Float64Sinh: case kIeee754Float64Tan: case kIeee754Float64Tanh: return PrepareCallCFunctionLatency() + MovToFloatParametersLatency() + CallCFunctionLatency() + MovFromFloatResultLatency(); case kMips64Add: case kMips64Dadd: return DadduLatency(instr->InputAt(1)->IsRegister()); case kMips64DaddOvf: return DaddOverflowLatency(); case kMips64Sub: case kMips64Dsub: return DsubuLatency(instr->InputAt(1)->IsRegister()); case kMips64DsubOvf: return DsubOverflowLatency(); case kMips64Mul: return MulLatency(); case kMips64MulOvf: return MulOverflowLatency(); case kMips64MulHigh: return MulhLatency(); case kMips64MulHighU: return MulhuLatency(); case kMips64DMulHigh: return DMulhLatency(); case kMips64Div: { int latency = DivLatency(instr->InputAt(1)->IsRegister()); if (kArchVariant >= kMips64r6) { return latency++; } else { return latency + MovzLatency(); } } case kMips64DivU: { int latency = DivuLatency(instr->InputAt(1)->IsRegister()); if (kArchVariant >= kMips64r6) { return latency++; } else { return latency + MovzLatency(); } } case kMips64Mod: return ModLatency(); case kMips64ModU: return ModuLatency(); case kMips64Dmul: return DmulLatency(); case kMips64Ddiv: { int latency = DdivLatency(); if (kArchVariant >= kMips64r6) { return latency++; } else { return latency + MovzLatency(); } } case kMips64DdivU: { int latency = DdivuLatency(); if (kArchVariant >= kMips64r6) { return latency++; } else { return latency + MovzLatency(); } } case kMips64Dmod: return DmodLatency(); case kMips64DmodU: return DmoduLatency(); case kMips64Dlsa: case kMips64Lsa: return DlsaLatency(); case kMips64And: return AndLatency(instr->InputAt(1)->IsRegister()); case kMips64And32: { bool is_operand_register = instr->InputAt(1)->IsRegister(); int latency = AndLatency(is_operand_register); if (is_operand_register) { return latency + 2; } else { return latency + 1; } } case kMips64Or: return OrLatency(instr->InputAt(1)->IsRegister()); case kMips64Or32: { bool is_operand_register = instr->InputAt(1)->IsRegister(); int latency = OrLatency(is_operand_register); if (is_operand_register) { return latency + 2; } else { return latency + 1; } } case kMips64Nor: return NorLatency(instr->InputAt(1)->IsRegister()); case kMips64Nor32: { bool is_operand_register = instr->InputAt(1)->IsRegister(); int latency = NorLatency(is_operand_register); if (is_operand_register) { return latency + 2; } else { return latency + 1; } } case kMips64Xor: return XorLatency(instr->InputAt(1)->IsRegister()); case kMips64Xor32: { bool is_operand_register = instr->InputAt(1)->IsRegister(); int latency = XorLatency(is_operand_register); if (is_operand_register) { return latency + 2; } else { return latency + 1; } } case kMips64Clz: case kMips64Dclz: return DclzLatency(); case kMips64Ctz: return CtzLatency(); case kMips64Dctz: return DctzLatency(); case kMips64Popcnt: return PopcntLatency(); case kMips64Dpopcnt: return DpopcntLatency(); case kMips64Shl: return 1; case kMips64Shr: case kMips64Sar: return 2; case kMips64Ext: case kMips64Ins: case kMips64Dext: case kMips64Dins: case kMips64Dshl: case kMips64Dshr: case kMips64Dsar: case kMips64Ror: case kMips64Dror: return 1; case kMips64Tst: return AndLatency(instr->InputAt(1)->IsRegister()); case kMips64Mov: return 1; case kMips64CmpS: return MoveLatency() + CompareF32Latency(); case kMips64AddS: return Latency::ADD_S; case kMips64SubS: return Latency::SUB_S; case kMips64MulS: return Latency::MUL_S; case kMips64DivS: return Latency::DIV_S; case kMips64ModS: return PrepareCallCFunctionLatency() + MovToFloatParametersLatency() + CallCFunctionLatency() + MovFromFloatResultLatency(); case kMips64AbsS: return Latency::ABS_S; case kMips64NegS: return NegdLatency(); case kMips64SqrtS: return Latency::SQRT_S; case kMips64MaxS: return Latency::MAX_S; case kMips64MinS: return Latency::MIN_S; case kMips64CmpD: return MoveLatency() + CompareF64Latency(); case kMips64AddD: return Latency::ADD_D; case kMips64SubD: return Latency::SUB_D; case kMips64MulD: return Latency::MUL_D; case kMips64DivD: return Latency::DIV_D; case kMips64ModD: return PrepareCallCFunctionLatency() + MovToFloatParametersLatency() + CallCFunctionLatency() + MovFromFloatResultLatency(); case kMips64AbsD: return Latency::ABS_D; case kMips64NegD: return NegdLatency(); case kMips64SqrtD: return Latency::SQRT_D; case kMips64MaxD: return Latency::MAX_D; case kMips64MinD: return Latency::MIN_D; case kMips64Float64RoundDown: case kMips64Float64RoundTruncate: case kMips64Float64RoundUp: case kMips64Float64RoundTiesEven: return Float64RoundLatency(); case kMips64Float32RoundDown: case kMips64Float32RoundTruncate: case kMips64Float32RoundUp: case kMips64Float32RoundTiesEven: return Float32RoundLatency(); case kMips64Float32Max: return Float32MaxLatency(); case kMips64Float64Max: return Float64MaxLatency(); case kMips64Float32Min: return Float32MinLatency(); case kMips64Float64Min: return Float64MinLatency(); case kMips64Float64SilenceNaN: return Latency::SUB_D; case kMips64CvtSD: return Latency::CVT_S_D; case kMips64CvtDS: return Latency::CVT_D_S; case kMips64CvtDW: return Latency::MTC1 + Latency::CVT_D_W; case kMips64CvtSW: return Latency::MTC1 + Latency::CVT_S_W; case kMips64CvtSUw: return 1 + Latency::DMTC1 + Latency::CVT_S_L; case kMips64CvtSL: return Latency::DMTC1 + Latency::CVT_S_L; case kMips64CvtDL: return Latency::DMTC1 + Latency::CVT_D_L; case kMips64CvtDUw: return 1 + Latency::DMTC1 + Latency::CVT_D_L; case kMips64CvtDUl: return 2 * Latency::BRANCH + 3 + 2 * Latency::DMTC1 + 2 * Latency::CVT_D_L + Latency::ADD_D; case kMips64CvtSUl: return 2 * Latency::BRANCH + 3 + 2 * Latency::DMTC1 + 2 * Latency::CVT_S_L + Latency::ADD_S; case kMips64FloorWD: return Latency::FLOOR_W_D + Latency::MFC1; case kMips64CeilWD: return Latency::CEIL_W_D + Latency::MFC1; case kMips64RoundWD: return Latency::ROUND_W_D + Latency::MFC1; case kMips64TruncWD: return Latency::TRUNC_W_D + Latency::MFC1; case kMips64FloorWS: return Latency::FLOOR_W_S + Latency::MFC1; case kMips64CeilWS: return Latency::CEIL_W_S + Latency::MFC1; case kMips64RoundWS: return Latency::ROUND_W_S + Latency::MFC1; case kMips64TruncWS: return Latency::TRUNC_W_S + Latency::MFC1 + 2 + MovnLatency(); case kMips64TruncLS: return TruncLSLatency(instr->OutputCount() > 1); case kMips64TruncLD: return TruncLDLatency(instr->OutputCount() > 1); case kMips64TruncUwD: // Estimated max. return CompareF64Latency() + 2 * Latency::BRANCH + 2 * Latency::TRUNC_W_D + Latency::SUB_D + OrLatency() + Latency::MTC1 + Latency::MFC1 + Latency::MTHC1 + 1; case kMips64TruncUwS: // Estimated max. return CompareF32Latency() + 2 * Latency::BRANCH + 2 * Latency::TRUNC_W_S + Latency::SUB_S + OrLatency() + Latency::MTC1 + 2 * Latency::MFC1 + 2 + MovzLatency(); case kMips64TruncUlS: return TruncUlSLatency(); case kMips64TruncUlD: return TruncUlDLatency(); case kMips64BitcastDL: return Latency::DMFC1; case kMips64BitcastLD: return Latency::DMTC1; case kMips64Float64ExtractLowWord32: return Latency::MFC1; case kMips64Float64InsertLowWord32: return Latency::MFHC1 + Latency::MTC1 + Latency::MTHC1; case kMips64Float64ExtractHighWord32: return Latency::MFHC1; case kMips64Float64InsertHighWord32: return Latency::MTHC1; case kMips64Seb: case kMips64Seh: return 1; case kMips64Lbu: case kMips64Lb: case kMips64Lhu: case kMips64Lh: case kMips64Lwu: case kMips64Lw: case kMips64Ld: case kMips64Sb: case kMips64Sh: case kMips64Sw: case kMips64Sd: return AlignedMemoryLatency(); case kMips64Lwc1: return Lwc1Latency(); case kMips64Ldc1: return Ldc1Latency(); case kMips64Swc1: return Swc1Latency(); case kMips64Sdc1: return Sdc1Latency(); case kMips64Ulhu: case kMips64Ulh: return UlhuLatency(); case kMips64Ulwu: return UlwuLatency(); case kMips64Ulw: return UlwLatency(); case kMips64Uld: return UldLatency(); case kMips64Ulwc1: return Ulwc1Latency(); case kMips64Uldc1: return Uldc1Latency(); case kMips64Ush: return UshLatency(); case kMips64Usw: return UswLatency(); case kMips64Usd: return UsdLatency(); case kMips64Uswc1: return Uswc1Latency(); case kMips64Usdc1: return Usdc1Latency(); case kMips64Push: { int latency = 0; if (instr->InputAt(0)->IsFPRegister()) { latency = Sdc1Latency() + DsubuLatency(false); } else { latency = PushLatency(); } return latency; } case kMips64Peek: { int latency = 0; if (instr->OutputAt(0)->IsFPRegister()) { auto op = LocationOperand::cast(instr->OutputAt(0)); switch (op->representation()) { case MachineRepresentation::kFloat64: latency = Ldc1Latency(); break; case MachineRepresentation::kFloat32: latency = Latency::LWC1; break; default: UNREACHABLE(); } } else { latency = AlignedMemoryLatency(); } return latency; } case kMips64StackClaim: return DsubuLatency(false); case kMips64StoreToStackSlot: { int latency = 0; if (instr->InputAt(0)->IsFPRegister()) { if (instr->InputAt(0)->IsSimd128Register()) { latency = 1; // Estimated value. } else { latency = Sdc1Latency(); } } else { latency = AlignedMemoryLatency(); } return latency; } case kMips64ByteSwap64: return ByteSwapSignedLatency(); case kMips64ByteSwap32: return ByteSwapSignedLatency(); case kWord32AtomicLoadInt8: case kWord32AtomicLoadUint8: case kWord32AtomicLoadInt16: case kWord32AtomicLoadUint16: case kWord32AtomicLoadWord32: return 2; case kWord32AtomicStoreWord8: case kWord32AtomicStoreWord16: case kWord32AtomicStoreWord32: return 3; case kWord32AtomicExchangeInt8: return Word32AtomicExchangeLatency(true, 8); case kWord32AtomicExchangeUint8: return Word32AtomicExchangeLatency(false, 8); case kWord32AtomicExchangeInt16: return Word32AtomicExchangeLatency(true, 16); case kWord32AtomicExchangeUint16: return Word32AtomicExchangeLatency(false, 16); case kWord32AtomicExchangeWord32: return 2 + LlLatency(0) + 1 + ScLatency(0) + BranchShortLatency() + 1; case kWord32AtomicCompareExchangeInt8: return Word32AtomicCompareExchangeLatency(true, 8); case kWord32AtomicCompareExchangeUint8: return Word32AtomicCompareExchangeLatency(false, 8); case kWord32AtomicCompareExchangeInt16: return Word32AtomicCompareExchangeLatency(true, 16); case kWord32AtomicCompareExchangeUint16: return Word32AtomicCompareExchangeLatency(false, 16); case kWord32AtomicCompareExchangeWord32: return 3 + LlLatency(0) + BranchShortLatency() + 1 + ScLatency(0) + BranchShortLatency() + 1; case kMips64AssertEqual: return AssertLatency(); default: return 1; } } } // namespace compiler } // namespace internal } // namespace v8
#ifndef HMLIB_ITERATORS_INTEGERITERATOR_INC #define HMLIB_ITERATORS_INTEGERITERATOR_INC 100 # #include<utility> #include<iterator> namespace hmLib { template<typename T> struct integer_iterator { private: using this_type = integer_iterator<T>; public: using value_type = T; using difference_type = decltype(std::declval<value_type>() - std::declval<value_type>()); using pointer = void; using reference = value_type; using iterator_category = std::random_access_iterator_tag; private: value_type Pos; public: integer_iterator() :Pos(0) {} integer_iterator(const this_type&) = default; integer_iterator& operator=(const this_type&) = default; integer_iterator(this_type&&) = default; integer_iterator& operator=(this_type&&) = default; integer_iterator(value_type Pos_) : Pos(Pos_) {} public: value_type operator*()const { return Pos; } value_type operator[](difference_type Val)const { return Pos; } this_type& operator++() { ++Pos; return *this; } this_type operator++(int) { this_type Itr = *this; ++(*this); return Itr; } this_type& operator--() { --Pos; return *this; } this_type operator--(int) { this_type Itr = *this; --(*this); return Itr; } this_type& operator+=(difference_type Val) { Pos += Val; return *this; } this_type& operator-=(difference_type Val) { Pos -= Val; return *this; } friend this_type operator+(const this_type& Itr, difference_type Val) { this_type Ans(Itr); Ans += Val; return Ans; } friend this_type operator+(difference_type Val, const this_type& Itr) { return Itr + Val; } friend this_type operator-(const this_type& Itr, difference_type Val) { this_type Ans(Itr); Ans -= Val; return Ans; } friend difference_type operator-(const this_type& Itr1, const this_type& Itr2) { return Itr1.Pos - Itr2.Pos; } friend bool operator==(const this_type& Itr1, const this_type& Itr2) { return Itr1.Pos == Itr2.Pos; } friend bool operator!=(const this_type& Itr1, const this_type& Itr2) { return Itr1.Pos != Itr2.Pos; } friend bool operator<=(const this_type& Itr1, const this_type& Itr2) { return Itr1.Pos <= Itr2.Pos; } friend bool operator<(const this_type& Itr1, const this_type& Itr2) { return Itr1.Pos < Itr2.Pos; } friend bool operator>=(const this_type& Itr1, const this_type& Itr2) { return Itr1.Pos >= Itr2.Pos; } friend bool operator>(const this_type& Itr1, const this_type& Itr2) { return Itr1.Pos > Itr2.Pos; } public: value_type value()const { return Pos; } }; template<typename T> auto make_integer_iterator(T Val_) { return integer_iterator<T>(Val_); } template<typename T> struct integer_range { using iterator = integer_iterator<T>; using range_category = typename std::iterator_traits<iterator>::iterator_category; using value_type = typename std::iterator_traits<iterator>::value_type; using reference = typename std::iterator_traits<iterator>::reference; using pointer = typename std::iterator_traits<iterator>::pointer; using difference_type = typename std::iterator_traits<iterator>::difference_type; private: T Min; T Max; public: integer_range(T Min_, T Max_) :Min(Min_), Max(Max_) {} iterator begin()const { return iterator(Min); } iterator end()const { return iterator(Max + 1); } iterator cbegin()const { return begin(); } iterator cend()const { return end(); } }; template<typename T> auto make_integer_range(T Min_, T Max_) { return integer_range<T>(Min_, Max_); } using int_iterator = integer_iterator<int>; using signed_int_iterator = integer_iterator<signed int>; using unsigned_int_iterator = integer_iterator<unsigned int>; using int_range = integer_range<int>; using signed_int_range = integer_range<signed int>; using unsigned_int_range = integer_range<unsigned int>; } # #endif
/* * Copyright 2015 The Etc2Comp Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* EtcBlock4x4Encoding_RGB8A1.cpp contains: Block4x4Encoding_RGB8A1 Block4x4Encoding_RGB8A1_Opaque Block4x4Encoding_RGB8A1_Transparent These encoders are used when targetting file format RGB8A1. Block4x4Encoding_RGB8A1_Opaque is used when all pixels in the 4x4 block are opaque Block4x4Encoding_RGB8A1_Transparent is used when all pixels in the 4x4 block are transparent Block4x4Encoding_RGB8A1 is used when there is a mixture of alphas in the 4x4 block */ #include "EtcConfig.h" #include "EtcBlock4x4Encoding_RGB8A1.h" #include "EtcBlock4x4.h" #include "EtcBlock4x4EncodingBits.h" #include "EtcBlock4x4Encoding_RGB8.h" #include <cstdio> #include <cstring> #include <cassert> namespace Etc { // #################################################################################################### // Block4x4Encoding_RGB8A1 // #################################################################################################### float Block4x4Encoding_RGB8A1::s_aafCwOpaqueUnsetTable[CW_RANGES][SELECTORS] = { { 0.0f / 255.0f, 8.0f / 255.0f, 0.0f / 255.0f, -8.0f / 255.0f }, { 0.0f / 255.0f, 17.0f / 255.0f, 0.0f / 255.0f, -17.0f / 255.0f }, { 0.0f / 255.0f, 29.0f / 255.0f, 0.0f / 255.0f, -29.0f / 255.0f }, { 0.0f / 255.0f, 42.0f / 255.0f, 0.0f / 255.0f, -42.0f / 255.0f }, { 0.0f / 255.0f, 60.0f / 255.0f, 0.0f / 255.0f, -60.0f / 255.0f }, { 0.0f / 255.0f, 80.0f / 255.0f, 0.0f / 255.0f, -80.0f / 255.0f }, { 0.0f / 255.0f, 106.0f / 255.0f, 0.0f / 255.0f, -106.0f / 255.0f }, { 0.0f / 255.0f, 183.0f / 255.0f, 0.0f / 255.0f, -183.0f / 255.0f } }; // ---------------------------------------------------------------------------------------------------- // Block4x4Encoding_RGB8A1::Block4x4Encoding_RGB8A1(void) { m_pencodingbitsRGB8 = nullptr; m_boolOpaque = false; m_boolTransparent = false; m_boolPunchThroughPixels = true; } Block4x4Encoding_RGB8A1::~Block4x4Encoding_RGB8A1(void) {} // ---------------------------------------------------------------------------------------------------- // initialization prior to encoding // a_pblockParent points to the block associated with this encoding // a_errormetric is used to choose the best encoding // a_pafrgbaSource points to a 4x4 block subset of the source image // a_paucEncodingBits points to the final encoding bits // void Block4x4Encoding_RGB8A1::InitFromSource(Block4x4 *a_pblockParent, ColorFloatRGBA *a_pafrgbaSource, Image::Format const a_encoding, unsigned char *a_paucEncodingBits, ErrorMetric a_errormetric) { Block4x4Encoding_RGB8::InitFromSource(a_pblockParent, a_pafrgbaSource, a_encoding, a_paucEncodingBits, a_errormetric); m_boolOpaque = a_pblockParent->GetSourceAlphaMix() == Block4x4::SourceAlphaMix::OPAQUE; m_boolTransparent = a_pblockParent->GetSourceAlphaMix() == Block4x4::SourceAlphaMix::TRANSPARENT; m_boolPunchThroughPixels = a_pblockParent->HasPunchThroughPixels(); for (unsigned int uiPixel = 0; uiPixel < PIXELS; uiPixel++) { if (m_pafrgbaSource[uiPixel].fA >= 0.5f) { m_afDecodedAlphas[uiPixel] = 1.0f; } else { m_afDecodedAlphas[uiPixel] = 0.0f; } } } // ---------------------------------------------------------------------------------------------------- // initialization from the encoding bits of a previous encoding // a_pblockParent points to the block associated with this encoding // a_errormetric is used to choose the best encoding // a_pafrgbaSource points to a 4x4 block subset of the source image // a_paucEncodingBits points to the final encoding bits of a previous encoding // void Block4x4Encoding_RGB8A1::InitFromEncodingBits(Block4x4 *a_pblockParent, Image::Format, unsigned char *a_paucEncodingBits, ColorFloatRGBA *a_pafrgbaSource, ErrorMetric a_errormetric) { InitFromEncodingBits_ETC1(a_pblockParent, a_paucEncodingBits, a_pafrgbaSource, a_errormetric); m_pencodingbitsRGB8 = (Block4x4EncodingBits_RGB8 *)a_paucEncodingBits; // detect if there is a T, H or Planar mode present int iRed1 = m_pencodingbitsRGB8->differential.red1; int iDRed2 = m_pencodingbitsRGB8->differential.dred2; int iRed2 = iRed1 + iDRed2; int iGreen1 = m_pencodingbitsRGB8->differential.green1; int iDGreen2 = m_pencodingbitsRGB8->differential.dgreen2; int iGreen2 = iGreen1 + iDGreen2; int iBlue1 = m_pencodingbitsRGB8->differential.blue1; int iDBlue2 = m_pencodingbitsRGB8->differential.dblue2; int iBlue2 = iBlue1 + iDBlue2; if (iRed2 < 0 || iRed2 > 31) { InitFromEncodingBits_T(); } else if (iGreen2 < 0 || iGreen2 > 31) { InitFromEncodingBits_H(); } else if (iBlue2 < 0 || iBlue2 > 31) { Block4x4Encoding_RGB8::InitFromEncodingBits_Planar(); } } // ---------------------------------------------------------------------------------------------------- // initialization from the encoding bits of a previous encoding assuming the encoding is an ETC1 mode. // if it isn't an ETC1 mode, this will be overwritten later // void Block4x4Encoding_RGB8A1::InitFromEncodingBits_ETC1(Block4x4 *a_pblockParent, unsigned char *a_paucEncodingBits, ColorFloatRGBA *a_pafrgbaSource, ErrorMetric a_errormetric) { Block4x4Encoding::Init(a_pblockParent, a_pafrgbaSource, a_errormetric); m_pencodingbitsRGB8 = (Block4x4EncodingBits_RGB8 *)a_paucEncodingBits; m_mode = MODE_ETC1; m_boolDiff = true; m_boolFlip = m_pencodingbitsRGB8->differential.flip; m_boolOpaque = m_pencodingbitsRGB8->differential.diff; int iR2 = m_pencodingbitsRGB8->differential.red1 + m_pencodingbitsRGB8->differential.dred2; if (iR2 < 0) { iR2 = 0; } else if (iR2 > 31) { iR2 = 31; } int iG2 = m_pencodingbitsRGB8->differential.green1 + m_pencodingbitsRGB8->differential.dgreen2; if (iG2 < 0) { iG2 = 0; } else if (iG2 > 31) { iG2 = 31; } int iB2 = m_pencodingbitsRGB8->differential.blue1 + m_pencodingbitsRGB8->differential.dblue2; if (iB2 < 0) { iB2 = 0; } else if (iB2 > 31) { iB2 = 31; } m_frgbaColor1 = ColorFloatRGBA::ConvertFromRGB5(m_pencodingbitsRGB8->differential.red1, m_pencodingbitsRGB8->differential.green1, m_pencodingbitsRGB8->differential.blue1); m_frgbaColor2 = ColorFloatRGBA::ConvertFromRGB5((unsigned char)iR2, (unsigned char)iG2, (unsigned char)iB2); m_uiCW1 = m_pencodingbitsRGB8->differential.cw1; m_uiCW2 = m_pencodingbitsRGB8->differential.cw2; Block4x4Encoding_ETC1::InitFromEncodingBits_Selectors(); Decode_ETC1(); CalcBlockError(); } // ---------------------------------------------------------------------------------------------------- // initialization from the encoding bits of a previous encoding if T mode is detected // void Block4x4Encoding_RGB8A1::InitFromEncodingBits_T(void) { m_mode = MODE_T; unsigned char ucRed1 = (unsigned char)((m_pencodingbitsRGB8->t.red1a << 2) + m_pencodingbitsRGB8->t.red1b); unsigned char ucGreen1 = m_pencodingbitsRGB8->t.green1; unsigned char ucBlue1 = m_pencodingbitsRGB8->t.blue1; unsigned char ucRed2 = m_pencodingbitsRGB8->t.red2; unsigned char ucGreen2 = m_pencodingbitsRGB8->t.green2; unsigned char ucBlue2 = m_pencodingbitsRGB8->t.blue2; m_frgbaColor1 = ColorFloatRGBA::ConvertFromRGB4(ucRed1, ucGreen1, ucBlue1); m_frgbaColor2 = ColorFloatRGBA::ConvertFromRGB4(ucRed2, ucGreen2, ucBlue2); m_uiCW1 = (m_pencodingbitsRGB8->t.da << 1) + m_pencodingbitsRGB8->t.db; Block4x4Encoding_ETC1::InitFromEncodingBits_Selectors(); DecodePixels_T(); CalcBlockError(); } // ---------------------------------------------------------------------------------------------------- // initialization from the encoding bits of a previous encoding if H mode is detected // void Block4x4Encoding_RGB8A1::InitFromEncodingBits_H(void) { m_mode = MODE_H; unsigned char ucRed1 = m_pencodingbitsRGB8->h.red1; unsigned char ucGreen1 = (unsigned char)((m_pencodingbitsRGB8->h.green1a << 1) + m_pencodingbitsRGB8->h.green1b); unsigned char ucBlue1 = (unsigned char)((m_pencodingbitsRGB8->h.blue1a << 3) + (m_pencodingbitsRGB8->h.blue1b << 1) + m_pencodingbitsRGB8->h.blue1c); unsigned char ucRed2 = m_pencodingbitsRGB8->h.red2; unsigned char ucGreen2 = (unsigned char)((m_pencodingbitsRGB8->h.green2a << 1) + m_pencodingbitsRGB8->h.green2b); unsigned char ucBlue2 = m_pencodingbitsRGB8->h.blue2; m_frgbaColor1 = ColorFloatRGBA::ConvertFromRGB4(ucRed1, ucGreen1, ucBlue1); m_frgbaColor2 = ColorFloatRGBA::ConvertFromRGB4(ucRed2, ucGreen2, ucBlue2); // used to determine the LSB of the CW unsigned int uiRGB1 = (unsigned int)(((int)ucRed1 << 16) + ((int)ucGreen1 << 8) + (int)ucBlue1); unsigned int uiRGB2 = (unsigned int)(((int)ucRed2 << 16) + ((int)ucGreen2 << 8) + (int)ucBlue2); m_uiCW1 = (m_pencodingbitsRGB8->h.da << 2) + (m_pencodingbitsRGB8->h.db << 1); if (uiRGB1 >= uiRGB2) { m_uiCW1++; } Block4x4Encoding_ETC1::InitFromEncodingBits_Selectors(); DecodePixels_H(); CalcBlockError(); } // ---------------------------------------------------------------------------------------------------- // for ETC1 modes, set the decoded colors and decoded alpha based on the encoding state // void Block4x4Encoding_RGB8A1::Decode_ETC1(void) { const unsigned int *pauiPixelOrder = m_boolFlip ? s_auiPixelOrderFlip1 : s_auiPixelOrderFlip0; for (unsigned int uiPixelOrder = 0; uiPixelOrder < PIXELS; uiPixelOrder++) { ColorFloatRGBA *pfrgbaCenter = uiPixelOrder < 8 ? &m_frgbaColor1 : &m_frgbaColor2; unsigned int uiCW = uiPixelOrder < 8 ? m_uiCW1 : m_uiCW2; unsigned int uiPixel = pauiPixelOrder[uiPixelOrder]; float fDelta; if (m_boolOpaque) fDelta = Block4x4Encoding_ETC1::s_aafCwTable[uiCW][m_auiSelectors[uiPixel]]; else fDelta = s_aafCwOpaqueUnsetTable[uiCW][m_auiSelectors[uiPixel]]; if (m_boolOpaque == false && m_auiSelectors[uiPixel] == TRANSPARENT_SELECTOR) { m_afrgbaDecodedColors[uiPixel] = ColorFloatRGBA(); m_afDecodedAlphas[uiPixel] = 0.0f; } else { m_afrgbaDecodedColors[uiPixel] = (*pfrgbaCenter + fDelta).ClampRGB(); m_afDecodedAlphas[uiPixel] = 1.0f; } } } // ---------------------------------------------------------------------------------------------------- // for T mode, set the decoded colors and decoded alpha based on the encoding state // void Block4x4Encoding_RGB8A1::DecodePixels_T(void) { float fDistance = s_afTHDistanceTable[m_uiCW1]; ColorFloatRGBA frgbaDistance(fDistance, fDistance, fDistance, 0.0f); for (unsigned int uiPixel = 0; uiPixel < PIXELS; uiPixel++) { switch (m_auiSelectors[uiPixel]) { case 0: m_afrgbaDecodedColors[uiPixel] = m_frgbaColor1; m_afDecodedAlphas[uiPixel] = 1.0f; break; case 1: m_afrgbaDecodedColors[uiPixel] = (m_frgbaColor2 + frgbaDistance).ClampRGB(); m_afDecodedAlphas[uiPixel] = 1.0f; break; case 2: if (m_boolOpaque == false) { m_afrgbaDecodedColors[uiPixel] = ColorFloatRGBA(); m_afDecodedAlphas[uiPixel] = 0.0f; } else { m_afrgbaDecodedColors[uiPixel] = m_frgbaColor2; m_afDecodedAlphas[uiPixel] = 1.0f; } break; case 3: m_afrgbaDecodedColors[uiPixel] = (m_frgbaColor2 - frgbaDistance).ClampRGB(); m_afDecodedAlphas[uiPixel] = 1.0f; break; } } } // ---------------------------------------------------------------------------------------------------- // for H mode, set the decoded colors and decoded alpha based on the encoding state // void Block4x4Encoding_RGB8A1::DecodePixels_H(void) { float fDistance = s_afTHDistanceTable[m_uiCW1]; ColorFloatRGBA frgbaDistance(fDistance, fDistance, fDistance, 0.0f); for (unsigned int uiPixel = 0; uiPixel < PIXELS; uiPixel++) { switch (m_auiSelectors[uiPixel]) { case 0: m_afrgbaDecodedColors[uiPixel] = (m_frgbaColor1 + frgbaDistance).ClampRGB(); m_afDecodedAlphas[uiPixel] = 1.0f; break; case 1: m_afrgbaDecodedColors[uiPixel] = (m_frgbaColor1 - frgbaDistance).ClampRGB(); m_afDecodedAlphas[uiPixel] = 1.0f; break; case 2: if (m_boolOpaque == false) { m_afrgbaDecodedColors[uiPixel] = ColorFloatRGBA(); m_afDecodedAlphas[uiPixel] = 0.0f; } else { m_afrgbaDecodedColors[uiPixel] = (m_frgbaColor2 + frgbaDistance).ClampRGB(); m_afDecodedAlphas[uiPixel] = 1.0f; } break; case 3: m_afrgbaDecodedColors[uiPixel] = (m_frgbaColor2 - frgbaDistance).ClampRGB(); m_afDecodedAlphas[uiPixel] = 1.0f; break; } } } // ---------------------------------------------------------------------------------------------------- // perform a single encoding iteration // replace the encoding if a better encoding was found // subsequent iterations generally take longer for each iteration // set m_boolDone if encoding is perfect or encoding is finished based on a_fEffort // // RGB8A1 can't use individual mode // RGB8A1 with transparent pixels can't use planar mode // void Block4x4Encoding_RGB8A1::PerformIteration(Image::Format a_encoding, ErrorMetric const a_errormetric, float a_fEffort) { assert(!m_boolOpaque); assert(!m_boolTransparent); assert(!m_boolDone); switch (m_uiEncodingIterations) { case 0: PerformFirstIteration(a_errormetric); break; case 1: TryDifferential(m_boolMostLikelyFlip, 1, 0, 0); break; case 2: TryDifferential(!m_boolMostLikelyFlip, 1, 0, 0); if (a_fEffort <= 39.5f) { m_boolDone = true; } break; case 3: Block4x4Encoding_RGB8::CalculateBaseColorsForTAndH(a_errormetric); TryT(1); TryH(1); if (a_fEffort <= 49.5f) { m_boolDone = true; } break; case 4: TryDegenerates1(); if (a_fEffort <= 59.5f) { m_boolDone = true; } break; case 5: TryDegenerates2(); if (a_fEffort <= 69.5f) { m_boolDone = true; } break; case 6: TryDegenerates3(); if (a_fEffort <= 79.5f) { m_boolDone = true; } break; case 7: TryDegenerates4(); m_boolDone = true; break; default: assert(0); break; } m_uiEncodingIterations++; SetDoneIfPerfect(); } // ---------------------------------------------------------------------------------------------------- // find best initial encoding to ensure block has a valid encoding // void Block4x4Encoding_RGB8A1::PerformFirstIteration(ErrorMetric const a_errormetric) { Block4x4Encoding_ETC1::CalculateMostLikelyFlip(a_errormetric); m_fError = FLT_MAX; TryDifferential(m_boolMostLikelyFlip, 0, 0, 0); SetDoneIfPerfect(); if (m_boolDone) { return; } TryDifferential(!m_boolMostLikelyFlip, 0, 0, 0); SetDoneIfPerfect(); } // ---------------------------------------------------------------------------------------------------- // mostly copied from ETC1 // differences: // Block4x4Encoding_RGB8A1 encodingTry = *this; // void Block4x4Encoding_RGB8A1::TryDifferential(bool a_boolFlip, unsigned int a_uiRadius, int a_iGrayOffset1, int a_iGrayOffset2) { ColorFloatRGBA frgbaColor1; ColorFloatRGBA frgbaColor2; const unsigned int *pauiPixelMapping1; const unsigned int *pauiPixelMapping2; if (a_boolFlip) { frgbaColor1 = m_frgbaSourceAverageTop; frgbaColor2 = m_frgbaSourceAverageBottom; pauiPixelMapping1 = s_auiTopPixelMapping; pauiPixelMapping2 = s_auiBottomPixelMapping; } else { frgbaColor1 = m_frgbaSourceAverageLeft; frgbaColor2 = m_frgbaSourceAverageRight; pauiPixelMapping1 = s_auiLeftPixelMapping; pauiPixelMapping2 = s_auiRightPixelMapping; } DifferentialTrys trys(frgbaColor1, frgbaColor2, pauiPixelMapping1, pauiPixelMapping2, a_uiRadius, a_iGrayOffset1, a_iGrayOffset2); Block4x4Encoding_RGB8A1 encodingTry = *this; encodingTry.m_boolFlip = a_boolFlip; encodingTry.TryDifferentialHalf(&trys.m_half1); encodingTry.TryDifferentialHalf(&trys.m_half2); // find best halves that are within differential range DifferentialTrys::Try *ptryBest1 = nullptr; DifferentialTrys::Try *ptryBest2 = nullptr; encodingTry.m_fError = FLT_MAX; // see if the best of each half are in differential range int iDRed = trys.m_half2.m_ptryBest->m_iRed - trys.m_half1.m_ptryBest->m_iRed; int iDGreen = trys.m_half2.m_ptryBest->m_iGreen - trys.m_half1.m_ptryBest->m_iGreen; int iDBlue = trys.m_half2.m_ptryBest->m_iBlue - trys.m_half1.m_ptryBest->m_iBlue; if (iDRed >= -4 && iDRed <= 3 && iDGreen >= -4 && iDGreen <= 3 && iDBlue >= -4 && iDBlue <= 3) { ptryBest1 = trys.m_half1.m_ptryBest; ptryBest2 = trys.m_half2.m_ptryBest; encodingTry.m_fError = trys.m_half1.m_ptryBest->m_fError + trys.m_half2.m_ptryBest->m_fError; } else { // else, find the next best halves that are in differential range for (DifferentialTrys::Try *ptry1 = &trys.m_half1.m_atry[0]; ptry1 < &trys.m_half1.m_atry[trys.m_half1.m_uiTrys]; ptry1++) { for (DifferentialTrys::Try *ptry2 = &trys.m_half2.m_atry[0]; ptry2 < &trys.m_half2.m_atry[trys.m_half2.m_uiTrys]; ptry2++) { iDRed = ptry2->m_iRed - ptry1->m_iRed; bool boolValidRedDelta = iDRed <= 3 && iDRed >= -4; iDGreen = ptry2->m_iGreen - ptry1->m_iGreen; bool boolValidGreenDelta = iDGreen <= 3 && iDGreen >= -4; iDBlue = ptry2->m_iBlue - ptry1->m_iBlue; bool boolValidBlueDelta = iDBlue <= 3 && iDBlue >= -4; if (boolValidRedDelta && boolValidGreenDelta && boolValidBlueDelta) { float fError = ptry1->m_fError + ptry2->m_fError; if (fError < encodingTry.m_fError) { encodingTry.m_fError = fError; ptryBest1 = ptry1; ptryBest2 = ptry2; } } } } assert(encodingTry.m_fError < FLT_MAX); assert(ptryBest1 != nullptr); assert(ptryBest2 != nullptr); } if (encodingTry.m_fError < m_fError) { m_mode = MODE_ETC1; m_boolDiff = true; m_boolFlip = encodingTry.m_boolFlip; m_frgbaColor1 = ColorFloatRGBA::ConvertFromRGB5((unsigned char)ptryBest1->m_iRed, (unsigned char)ptryBest1->m_iGreen, (unsigned char)ptryBest1->m_iBlue); m_frgbaColor2 = ColorFloatRGBA::ConvertFromRGB5((unsigned char)ptryBest2->m_iRed, (unsigned char)ptryBest2->m_iGreen, (unsigned char)ptryBest2->m_iBlue); m_uiCW1 = ptryBest1->m_uiCW; m_uiCW2 = ptryBest2->m_uiCW; m_fError = 0.0f; for (unsigned int uiPixelOrder = 0; uiPixelOrder < PIXELS / 2; uiPixelOrder++) { unsigned int uiPixel1 = pauiPixelMapping1[uiPixelOrder]; unsigned int uiPixel2 = pauiPixelMapping2[uiPixelOrder]; unsigned int uiSelector1 = ptryBest1->m_auiSelectors[uiPixelOrder]; unsigned int uiSelector2 = ptryBest2->m_auiSelectors[uiPixelOrder]; m_auiSelectors[uiPixel1] = uiSelector1; m_auiSelectors[uiPixel2] = ptryBest2->m_auiSelectors[uiPixelOrder]; if (uiSelector1 == TRANSPARENT_SELECTOR) { m_afrgbaDecodedColors[uiPixel1] = ColorFloatRGBA(); m_afDecodedAlphas[uiPixel1] = 0.0f; } else { float fDeltaRGB1 = s_aafCwOpaqueUnsetTable[m_uiCW1][uiSelector1]; m_afrgbaDecodedColors[uiPixel1] = (m_frgbaColor1 + fDeltaRGB1).ClampRGB(); m_afDecodedAlphas[uiPixel1] = 1.0f; } if (uiSelector2 == TRANSPARENT_SELECTOR) { m_afrgbaDecodedColors[uiPixel2] = ColorFloatRGBA(); m_afDecodedAlphas[uiPixel2] = 0.0f; } else { float fDeltaRGB2 = s_aafCwOpaqueUnsetTable[m_uiCW2][uiSelector2]; m_afrgbaDecodedColors[uiPixel2] = (m_frgbaColor2 + fDeltaRGB2).ClampRGB(); m_afDecodedAlphas[uiPixel2] = 1.0f; } float fDeltaA1 = m_afDecodedAlphas[uiPixel1] - m_pafrgbaSource[uiPixel1].fA; m_fError += fDeltaA1 * fDeltaA1; float fDeltaA2 = m_afDecodedAlphas[uiPixel2] - m_pafrgbaSource[uiPixel2].fA; m_fError += fDeltaA2 * fDeltaA2; } m_fError1 = ptryBest1->m_fError; m_fError2 = ptryBest2->m_fError; m_boolSeverelyBentDifferentialColors = trys.m_boolSeverelyBentColors; m_fError = m_fError1 + m_fError2; // sanity check { int iRed1 = m_frgbaColor1.IntRed(31.0f); int iGreen1 = m_frgbaColor1.IntGreen(31.0f); int iBlue1 = m_frgbaColor1.IntBlue(31.0f); int iRed2 = m_frgbaColor2.IntRed(31.0f); int iGreen2 = m_frgbaColor2.IntGreen(31.0f); int iBlue2 = m_frgbaColor2.IntBlue(31.0f); iDRed = iRed2 - iRed1; iDGreen = iGreen2 - iGreen1; iDBlue = iBlue2 - iBlue1; assert(iDRed >= -4 && iDRed < 4); assert(iDGreen >= -4 && iDGreen < 4); assert(iDBlue >= -4 && iDBlue < 4); } } } // ---------------------------------------------------------------------------------------------------- // mostly copied from ETC1 // differences: // uses s_aafCwOpaqueUnsetTable // color for selector set to 0,0,0,0 // void Block4x4Encoding_RGB8A1::TryDifferentialHalf(DifferentialTrys::Half *a_phalf) { a_phalf->m_ptryBest = nullptr; float fBestTryError = FLT_MAX; a_phalf->m_uiTrys = 0; for (int iRed = a_phalf->m_iRed - (int)a_phalf->m_uiRadius; iRed <= a_phalf->m_iRed + (int)a_phalf->m_uiRadius; iRed++) { assert(iRed >= 0 && iRed <= 31); for (int iGreen = a_phalf->m_iGreen - (int)a_phalf->m_uiRadius; iGreen <= a_phalf->m_iGreen + (int)a_phalf->m_uiRadius; iGreen++) { assert(iGreen >= 0 && iGreen <= 31); for (int iBlue = a_phalf->m_iBlue - (int)a_phalf->m_uiRadius; iBlue <= a_phalf->m_iBlue + (int)a_phalf->m_uiRadius; iBlue++) { assert(iBlue >= 0 && iBlue <= 31); DifferentialTrys::Try *ptry = &a_phalf->m_atry[a_phalf->m_uiTrys]; assert(ptry < &a_phalf->m_atry[DifferentialTrys::Half::MAX_TRYS]); ptry->m_iRed = iRed; ptry->m_iGreen = iGreen; ptry->m_iBlue = iBlue; ptry->m_fError = FLT_MAX; ColorFloatRGBA frgbaColor = ColorFloatRGBA::ConvertFromRGB5((unsigned char)iRed, (unsigned char)iGreen, (unsigned char)iBlue); // try each CW for (unsigned int uiCW = 0; uiCW < CW_RANGES; uiCW++) { unsigned int auiPixelSelectors[PIXELS / 2]; ColorFloatRGBA afrgbaDecodedColors[PIXELS / 2]; float afPixelErrors[PIXELS / 2] = { FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX }; // pre-compute decoded pixels for each selector ColorFloatRGBA afrgbaSelectors[SELECTORS]; static_assert(SELECTORS == 4, ""); afrgbaSelectors[0] = (frgbaColor + s_aafCwOpaqueUnsetTable[uiCW][0]).ClampRGB(); afrgbaSelectors[1] = (frgbaColor + s_aafCwOpaqueUnsetTable[uiCW][1]).ClampRGB(); afrgbaSelectors[2] = ColorFloatRGBA(); afrgbaSelectors[3] = (frgbaColor + s_aafCwOpaqueUnsetTable[uiCW][3]).ClampRGB(); for (unsigned int uiPixel = 0; uiPixel < 8; uiPixel++) { ColorFloatRGBA *pfrgbaSourcePixel = &m_pafrgbaSource[a_phalf->m_pauiPixelMapping[uiPixel]]; ColorFloatRGBA frgbaDecodedPixel; for (unsigned int uiSelector = 0; uiSelector < SELECTORS; uiSelector++) { if (pfrgbaSourcePixel->fA < 0.5f) { uiSelector = TRANSPARENT_SELECTOR; } else if (uiSelector == TRANSPARENT_SELECTOR) { continue; } frgbaDecodedPixel = afrgbaSelectors[uiSelector]; float fPixelError; fPixelError = CalcPixelError(frgbaDecodedPixel, m_afDecodedAlphas[a_phalf->m_pauiPixelMapping[uiPixel]], *pfrgbaSourcePixel); if (fPixelError < afPixelErrors[uiPixel]) { auiPixelSelectors[uiPixel] = uiSelector; afrgbaDecodedColors[uiPixel] = frgbaDecodedPixel; afPixelErrors[uiPixel] = fPixelError; } if (uiSelector == TRANSPARENT_SELECTOR) { break; } } } // add up all pixel errors float fCWError = 0.0f; for (unsigned int uiPixel = 0; uiPixel < 8; uiPixel++) { fCWError += afPixelErrors[uiPixel]; } // if best CW so far if (fCWError < ptry->m_fError) { ptry->m_uiCW = uiCW; for (unsigned int uiPixel = 0; uiPixel < 8; uiPixel++) { ptry->m_auiSelectors[uiPixel] = auiPixelSelectors[uiPixel]; } ptry->m_fError = fCWError; } } if (ptry->m_fError < fBestTryError) { a_phalf->m_ptryBest = ptry; fBestTryError = ptry->m_fError; } assert(ptry->m_fError < FLT_MAX); a_phalf->m_uiTrys++; } } } } // ---------------------------------------------------------------------------------------------------- // try encoding in T mode // save this encoding if it improves the error // // since pixels that use base color1 don't use the distance table, color1 and color2 can be twiddled independently // better encoding can be found if TWIDDLE_RADIUS is set to 2, but it will be much slower // void Block4x4Encoding_RGB8A1::TryT(unsigned int a_uiRadius) { Block4x4Encoding_RGB8A1 encodingTry = *this; // init "try" { encodingTry.m_mode = MODE_T; encodingTry.m_boolDiff = true; encodingTry.m_boolFlip = false; encodingTry.m_fError = FLT_MAX; } int iColor1Red = m_frgbaOriginalColor1_TAndH.IntRed(15.0f); int iColor1Green = m_frgbaOriginalColor1_TAndH.IntGreen(15.0f); int iColor1Blue = m_frgbaOriginalColor1_TAndH.IntBlue(15.0f); int iMinRed1 = iColor1Red - (int)a_uiRadius; if (iMinRed1 < 0) { iMinRed1 = 0; } int iMaxRed1 = iColor1Red + (int)a_uiRadius; if (iMaxRed1 > 15) { iMinRed1 = 15; } int iMinGreen1 = iColor1Green - (int)a_uiRadius; if (iMinGreen1 < 0) { iMinGreen1 = 0; } int iMaxGreen1 = iColor1Green + (int)a_uiRadius; if (iMaxGreen1 > 15) { iMinGreen1 = 15; } int iMinBlue1 = iColor1Blue - (int)a_uiRadius; if (iMinBlue1 < 0) { iMinBlue1 = 0; } int iMaxBlue1 = iColor1Blue + (int)a_uiRadius; if (iMaxBlue1 > 15) { iMinBlue1 = 15; } int iColor2Red = m_frgbaOriginalColor2_TAndH.IntRed(15.0f); int iColor2Green = m_frgbaOriginalColor2_TAndH.IntGreen(15.0f); int iColor2Blue = m_frgbaOriginalColor2_TAndH.IntBlue(15.0f); int iMinRed2 = iColor2Red - (int)a_uiRadius; if (iMinRed2 < 0) { iMinRed2 = 0; } int iMaxRed2 = iColor2Red + (int)a_uiRadius; if (iMaxRed2 > 15) { iMinRed2 = 15; } int iMinGreen2 = iColor2Green - (int)a_uiRadius; if (iMinGreen2 < 0) { iMinGreen2 = 0; } int iMaxGreen2 = iColor2Green + (int)a_uiRadius; if (iMaxGreen2 > 15) { iMinGreen2 = 15; } int iMinBlue2 = iColor2Blue - (int)a_uiRadius; if (iMinBlue2 < 0) { iMinBlue2 = 0; } int iMaxBlue2 = iColor2Blue + (int)a_uiRadius; if (iMaxBlue2 > 15) { iMinBlue2 = 15; } for (unsigned int uiDistance = 0; uiDistance < TH_DISTANCES; uiDistance++) { encodingTry.m_uiCW1 = uiDistance; // twiddle m_frgbaOriginalColor2_TAndH // twiddle color2 first, since it affects 3 selectors, while color1 only affects one selector // for (int iRed2 = iMinRed2; iRed2 <= iMaxRed2; iRed2++) { for (int iGreen2 = iMinGreen2; iGreen2 <= iMaxGreen2; iGreen2++) { for (int iBlue2 = iMinBlue2; iBlue2 <= iMaxBlue2; iBlue2++) { for (unsigned int uiBaseColorSwaps = 0; uiBaseColorSwaps < 2; uiBaseColorSwaps++) { if (uiBaseColorSwaps == 0) { encodingTry.m_frgbaColor1 = m_frgbaOriginalColor1_TAndH; encodingTry.m_frgbaColor2 = ColorFloatRGBA::ConvertFromRGB4((unsigned char)iRed2, (unsigned char)iGreen2, (unsigned char)iBlue2); } else { encodingTry.m_frgbaColor1 = ColorFloatRGBA::ConvertFromRGB4((unsigned char)iRed2, (unsigned char)iGreen2, (unsigned char)iBlue2); encodingTry.m_frgbaColor2 = m_frgbaOriginalColor1_TAndH; } encodingTry.TryT_BestSelectorCombination(); if (encodingTry.m_fError < m_fError) { m_mode = encodingTry.m_mode; m_boolDiff = encodingTry.m_boolDiff; m_boolFlip = encodingTry.m_boolFlip; m_frgbaColor1 = encodingTry.m_frgbaColor1; m_frgbaColor2 = encodingTry.m_frgbaColor2; m_uiCW1 = encodingTry.m_uiCW1; for (unsigned int uiPixel = 0; uiPixel < PIXELS; uiPixel++) { m_auiSelectors[uiPixel] = encodingTry.m_auiSelectors[uiPixel]; m_afrgbaDecodedColors[uiPixel] = encodingTry.m_afrgbaDecodedColors[uiPixel]; } m_fError = encodingTry.m_fError; } } } } } // twiddle m_frgbaOriginalColor1_TAndH for (int iRed1 = iMinRed1; iRed1 <= iMaxRed1; iRed1++) { for (int iGreen1 = iMinGreen1; iGreen1 <= iMaxGreen1; iGreen1++) { for (int iBlue1 = iMinBlue1; iBlue1 <= iMaxBlue1; iBlue1++) { for (unsigned int uiBaseColorSwaps = 0; uiBaseColorSwaps < 2; uiBaseColorSwaps++) { if (uiBaseColorSwaps == 0) { encodingTry.m_frgbaColor1 = ColorFloatRGBA::ConvertFromRGB4((unsigned char)iRed1, (unsigned char)iGreen1, (unsigned char)iBlue1); encodingTry.m_frgbaColor2 = m_frgbaOriginalColor2_TAndH; } else { encodingTry.m_frgbaColor1 = m_frgbaOriginalColor2_TAndH; encodingTry.m_frgbaColor2 = ColorFloatRGBA::ConvertFromRGB4((unsigned char)iRed1, (unsigned char)iGreen1, (unsigned char)iBlue1); } encodingTry.TryT_BestSelectorCombination(); if (encodingTry.m_fError < m_fError) { m_mode = encodingTry.m_mode; m_boolDiff = encodingTry.m_boolDiff; m_boolFlip = encodingTry.m_boolFlip; m_frgbaColor1 = encodingTry.m_frgbaColor1; m_frgbaColor2 = encodingTry.m_frgbaColor2; m_uiCW1 = encodingTry.m_uiCW1; for (unsigned int uiPixel = 0; uiPixel < PIXELS; uiPixel++) { m_auiSelectors[uiPixel] = encodingTry.m_auiSelectors[uiPixel]; m_afrgbaDecodedColors[uiPixel] = encodingTry.m_afrgbaDecodedColors[uiPixel]; } m_fError = encodingTry.m_fError; } } } } } } } // ---------------------------------------------------------------------------------------------------- // find best selector combination for TryT // called on an encodingTry // void Block4x4Encoding_RGB8A1::TryT_BestSelectorCombination(void) { float fDistance = s_afTHDistanceTable[m_uiCW1]; unsigned int auiBestPixelSelectors[PIXELS]; float afBestPixelErrors[PIXELS] = { FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX }; ColorFloatRGBA afrgbaBestDecodedPixels[PIXELS]; ColorFloatRGBA afrgbaDecodedPixel[SELECTORS]; static_assert(SELECTORS == 4, ""); afrgbaDecodedPixel[0] = m_frgbaColor1; afrgbaDecodedPixel[1] = (m_frgbaColor2 + fDistance).ClampRGB(); afrgbaDecodedPixel[2] = ColorFloatRGBA(); afrgbaDecodedPixel[3] = (m_frgbaColor2 - fDistance).ClampRGB(); // try each selector for (unsigned int uiPixel = 0; uiPixel < PIXELS; uiPixel++) { unsigned int uiMinSelector = 0; unsigned int uiMaxSelector = SELECTORS - 1; if (m_pafrgbaSource[uiPixel].fA < 0.5f) { uiMinSelector = 2; uiMaxSelector = 2; } for (unsigned int uiSelector = uiMinSelector; uiSelector <= uiMaxSelector; uiSelector++) { float fPixelError = CalcPixelError(afrgbaDecodedPixel[uiSelector], m_afDecodedAlphas[uiPixel], m_pafrgbaSource[uiPixel]); if (fPixelError < afBestPixelErrors[uiPixel]) { afBestPixelErrors[uiPixel] = fPixelError; auiBestPixelSelectors[uiPixel] = uiSelector; afrgbaBestDecodedPixels[uiPixel] = afrgbaDecodedPixel[uiSelector]; } } } // add up all of the pixel errors float fBlockError = 0.0f; for (unsigned int uiPixel = 0; uiPixel < PIXELS; uiPixel++) { fBlockError += afBestPixelErrors[uiPixel]; } if (fBlockError < m_fError) { m_fError = fBlockError; for (unsigned int uiPixel = 0; uiPixel < PIXELS; uiPixel++) { m_auiSelectors[uiPixel] = auiBestPixelSelectors[uiPixel]; m_afrgbaDecodedColors[uiPixel] = afrgbaBestDecodedPixels[uiPixel]; } } } // ---------------------------------------------------------------------------------------------------- // try encoding in H mode // save this encoding if it improves the error // // since all pixels use the distance table, color1 and color2 can NOT be twiddled independently // TWIDDLE_RADIUS of 2 is WAY too slow // void Block4x4Encoding_RGB8A1::TryH(unsigned int a_uiRadius) { Block4x4Encoding_RGB8A1 encodingTry = *this; // init "try" { encodingTry.m_mode = MODE_H; encodingTry.m_boolDiff = true; encodingTry.m_boolFlip = false; encodingTry.m_fError = FLT_MAX; } int iColor1Red = m_frgbaOriginalColor1_TAndH.IntRed(15.0f); int iColor1Green = m_frgbaOriginalColor1_TAndH.IntGreen(15.0f); int iColor1Blue = m_frgbaOriginalColor1_TAndH.IntBlue(15.0f); int iMinRed1 = iColor1Red - (int)a_uiRadius; if (iMinRed1 < 0) { iMinRed1 = 0; } int iMaxRed1 = iColor1Red + (int)a_uiRadius; if (iMaxRed1 > 15) { iMinRed1 = 15; } int iMinGreen1 = iColor1Green - (int)a_uiRadius; if (iMinGreen1 < 0) { iMinGreen1 = 0; } int iMaxGreen1 = iColor1Green + (int)a_uiRadius; if (iMaxGreen1 > 15) { iMinGreen1 = 15; } int iMinBlue1 = iColor1Blue - (int)a_uiRadius; if (iMinBlue1 < 0) { iMinBlue1 = 0; } int iMaxBlue1 = iColor1Blue + (int)a_uiRadius; if (iMaxBlue1 > 15) { iMinBlue1 = 15; } int iColor2Red = m_frgbaOriginalColor2_TAndH.IntRed(15.0f); int iColor2Green = m_frgbaOriginalColor2_TAndH.IntGreen(15.0f); int iColor2Blue = m_frgbaOriginalColor2_TAndH.IntBlue(15.0f); int iMinRed2 = iColor2Red - (int)a_uiRadius; if (iMinRed2 < 0) { iMinRed2 = 0; } int iMaxRed2 = iColor2Red + (int)a_uiRadius; if (iMaxRed2 > 15) { iMinRed2 = 15; } int iMinGreen2 = iColor2Green - (int)a_uiRadius; if (iMinGreen2 < 0) { iMinGreen2 = 0; } int iMaxGreen2 = iColor2Green + (int)a_uiRadius; if (iMaxGreen2 > 15) { iMinGreen2 = 15; } int iMinBlue2 = iColor2Blue - (int)a_uiRadius; if (iMinBlue2 < 0) { iMinBlue2 = 0; } int iMaxBlue2 = iColor2Blue + (int)a_uiRadius; if (iMaxBlue2 > 15) { iMinBlue2 = 15; } for (unsigned int uiDistance = 0; uiDistance < TH_DISTANCES; uiDistance++) { encodingTry.m_uiCW1 = uiDistance; // twiddle m_frgbaOriginalColor1_TAndH for (int iRed1 = iMinRed1; iRed1 <= iMaxRed1; iRed1++) { for (int iGreen1 = iMinGreen1; iGreen1 <= iMaxGreen1; iGreen1++) { for (int iBlue1 = iMinBlue1; iBlue1 <= iMaxBlue1; iBlue1++) { encodingTry.m_frgbaColor1 = ColorFloatRGBA::ConvertFromRGB4((unsigned char)iRed1, (unsigned char)iGreen1, (unsigned char)iBlue1); encodingTry.m_frgbaColor2 = m_frgbaOriginalColor2_TAndH; // if color1 == color2, H encoding issues can pop up, so abort if (iRed1 == iColor2Red && iGreen1 == iColor2Green && iBlue1 == iColor2Blue) { continue; } encodingTry.TryH_BestSelectorCombination(); if (encodingTry.m_fError < m_fError) { m_mode = encodingTry.m_mode; m_boolDiff = encodingTry.m_boolDiff; m_boolFlip = encodingTry.m_boolFlip; m_frgbaColor1 = encodingTry.m_frgbaColor1; m_frgbaColor2 = encodingTry.m_frgbaColor2; m_uiCW1 = encodingTry.m_uiCW1; for (unsigned int uiPixel = 0; uiPixel < PIXELS; uiPixel++) { m_auiSelectors[uiPixel] = encodingTry.m_auiSelectors[uiPixel]; m_afrgbaDecodedColors[uiPixel] = encodingTry.m_afrgbaDecodedColors[uiPixel]; } m_fError = encodingTry.m_fError; } } } } // twiddle m_frgbaOriginalColor2_TAndH for (int iRed2 = iMinRed2; iRed2 <= iMaxRed2; iRed2++) { for (int iGreen2 = iMinGreen2; iGreen2 <= iMaxGreen2; iGreen2++) { for (int iBlue2 = iMinBlue2; iBlue2 <= iMaxBlue2; iBlue2++) { encodingTry.m_frgbaColor1 = m_frgbaOriginalColor1_TAndH; encodingTry.m_frgbaColor2 = ColorFloatRGBA::ConvertFromRGB4((unsigned char)iRed2, (unsigned char)iGreen2, (unsigned char)iBlue2); // if color1 == color2, H encoding issues can pop up, so abort if (iRed2 == iColor1Red && iGreen2 == iColor1Green && iBlue2 == iColor1Blue) { continue; } encodingTry.TryH_BestSelectorCombination(); if (encodingTry.m_fError < m_fError) { m_mode = encodingTry.m_mode; m_boolDiff = encodingTry.m_boolDiff; m_boolFlip = encodingTry.m_boolFlip; m_frgbaColor1 = encodingTry.m_frgbaColor1; m_frgbaColor2 = encodingTry.m_frgbaColor2; m_uiCW1 = encodingTry.m_uiCW1; for (unsigned int uiPixel = 0; uiPixel < PIXELS; uiPixel++) { m_auiSelectors[uiPixel] = encodingTry.m_auiSelectors[uiPixel]; m_afrgbaDecodedColors[uiPixel] = encodingTry.m_afrgbaDecodedColors[uiPixel]; } m_fError = encodingTry.m_fError; } } } } } } // ---------------------------------------------------------------------------------------------------- // find best selector combination for TryH // called on an encodingTry // void Block4x4Encoding_RGB8A1::TryH_BestSelectorCombination(void) { // abort if colors and CW will pose an encoding problem { unsigned int uiRed1 = (unsigned int)m_frgbaColor1.IntRed(255.0f); unsigned int uiGreen1 = (unsigned int)m_frgbaColor1.IntGreen(255.0f); unsigned int uiBlue1 = (unsigned int)m_frgbaColor1.IntBlue(255.0f); unsigned int uiColorValue1 = (uiRed1 << 16) + (uiGreen1 << 8) + uiBlue1; unsigned int uiRed2 = (unsigned int)m_frgbaColor2.IntRed(255.0f); unsigned int uiGreen2 = (unsigned int)m_frgbaColor2.IntGreen(255.0f); unsigned int uiBlue2 = (unsigned int)m_frgbaColor2.IntBlue(255.0f); unsigned int uiColorValue2 = (uiRed2 << 16) + (uiGreen2 << 8) + uiBlue2; unsigned int uiCWLsb = m_uiCW1 & 1; if ((uiColorValue1 >= (uiColorValue2 & uiCWLsb)) == 0 || (uiColorValue1 < (uiColorValue2 & uiCWLsb)) == 1) { return; } } float fDistance = s_afTHDistanceTable[m_uiCW1]; unsigned int auiBestPixelSelectors[PIXELS]; float afBestPixelErrors[PIXELS] = { FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX }; ColorFloatRGBA afrgbaBestDecodedPixels[PIXELS]; ColorFloatRGBA afrgbaDecodedPixel[SELECTORS]; static_assert(SELECTORS == 4, ""); afrgbaDecodedPixel[0] = (m_frgbaColor1 + fDistance).ClampRGB(); afrgbaDecodedPixel[1] = (m_frgbaColor1 - fDistance).ClampRGB(); afrgbaDecodedPixel[2] = ColorFloatRGBA();; afrgbaDecodedPixel[3] = (m_frgbaColor2 - fDistance).ClampRGB(); // try each selector for (unsigned int uiPixel = 0; uiPixel < PIXELS; uiPixel++) { unsigned int uiMinSelector = 0; unsigned int uiMaxSelector = SELECTORS - 1; if (m_pafrgbaSource[uiPixel].fA < 0.5f) { uiMinSelector = 2; uiMaxSelector = 2; } for (unsigned int uiSelector = uiMinSelector; uiSelector <= uiMaxSelector; uiSelector++) { float fPixelError = CalcPixelError(afrgbaDecodedPixel[uiSelector], m_afDecodedAlphas[uiPixel], m_pafrgbaSource[uiPixel]); if (fPixelError < afBestPixelErrors[uiPixel]) { afBestPixelErrors[uiPixel] = fPixelError; auiBestPixelSelectors[uiPixel] = uiSelector; afrgbaBestDecodedPixels[uiPixel] = afrgbaDecodedPixel[uiSelector]; } } } // add up all of the pixel errors float fBlockError = 0.0f; for (unsigned int uiPixel = 0; uiPixel < PIXELS; uiPixel++) { fBlockError += afBestPixelErrors[uiPixel]; } if (fBlockError < m_fError) { m_fError = fBlockError; for (unsigned int uiPixel = 0; uiPixel < PIXELS; uiPixel++) { m_auiSelectors[uiPixel] = auiBestPixelSelectors[uiPixel]; m_afrgbaDecodedColors[uiPixel] = afrgbaBestDecodedPixels[uiPixel]; } } } // ---------------------------------------------------------------------------------------------------- // try version 1 of the degenerate search // degenerate encodings use basecolor movement and a subset of the selectors to find useful encodings // each subsequent version of the degenerate search uses more basecolor movement and is less likely to // be successfull // void Block4x4Encoding_RGB8A1::TryDegenerates1(void) { TryDifferential(m_boolMostLikelyFlip, 1, -2, 0); TryDifferential(m_boolMostLikelyFlip, 1, 2, 0); TryDifferential(m_boolMostLikelyFlip, 1, 0, 2); TryDifferential(m_boolMostLikelyFlip, 1, 0, -2); } // ---------------------------------------------------------------------------------------------------- // try version 2 of the degenerate search // degenerate encodings use basecolor movement and a subset of the selectors to find useful encodings // each subsequent version of the degenerate search uses more basecolor movement and is less likely to // be successfull // void Block4x4Encoding_RGB8A1::TryDegenerates2(void) { TryDifferential(!m_boolMostLikelyFlip, 1, -2, 0); TryDifferential(!m_boolMostLikelyFlip, 1, 2, 0); TryDifferential(!m_boolMostLikelyFlip, 1, 0, 2); TryDifferential(!m_boolMostLikelyFlip, 1, 0, -2); } // ---------------------------------------------------------------------------------------------------- // try version 3 of the degenerate search // degenerate encodings use basecolor movement and a subset of the selectors to find useful encodings // each subsequent version of the degenerate search uses more basecolor movement and is less likely to // be successfull // void Block4x4Encoding_RGB8A1::TryDegenerates3(void) { TryDifferential(m_boolMostLikelyFlip, 1, -2, -2); TryDifferential(m_boolMostLikelyFlip, 1, -2, 2); TryDifferential(m_boolMostLikelyFlip, 1, 2, -2); TryDifferential(m_boolMostLikelyFlip, 1, 2, 2); } // ---------------------------------------------------------------------------------------------------- // try version 4 of the degenerate search // degenerate encodings use basecolor movement and a subset of the selectors to find useful encodings // each subsequent version of the degenerate search uses more basecolor movement and is less likely to // be successfull // void Block4x4Encoding_RGB8A1::TryDegenerates4(void) { TryDifferential(m_boolMostLikelyFlip, 1, -4, 0); TryDifferential(m_boolMostLikelyFlip, 1, 4, 0); TryDifferential(m_boolMostLikelyFlip, 1, 0, 4); TryDifferential(m_boolMostLikelyFlip, 1, 0, -4); } // ---------------------------------------------------------------------------------------------------- // set the encoding bits based on encoding state // void Block4x4Encoding_RGB8A1::SetEncodingBits(Image::Format) { switch (m_mode) { case MODE_ETC1: SetEncodingBits_ETC1(); break; case MODE_T: SetEncodingBits_T(); break; case MODE_H: SetEncodingBits_H(); break; case MODE_PLANAR: Block4x4Encoding_RGB8::SetEncodingBits_Planar(); break; default: assert(false); } } // ---------------------------------------------------------------------------------------------------- // set the encoding bits based on encoding state if ETC1 mode // void Block4x4Encoding_RGB8A1::SetEncodingBits_ETC1(void) { // there is no individual mode in RGB8A1 assert(m_boolDiff); int iRed1 = m_frgbaColor1.IntRed(31.0f); int iGreen1 = m_frgbaColor1.IntGreen(31.0f); int iBlue1 = m_frgbaColor1.IntBlue(31.0f); int iRed2 = m_frgbaColor2.IntRed(31.0f); int iGreen2 = m_frgbaColor2.IntGreen(31.0f); int iBlue2 = m_frgbaColor2.IntBlue(31.0f); int iDRed2 = iRed2 - iRed1; int iDGreen2 = iGreen2 - iGreen1; int iDBlue2 = iBlue2 - iBlue1; assert(iDRed2 >= -4 && iDRed2 < 4); assert(iDGreen2 >= -4 && iDGreen2 < 4); assert(iDBlue2 >= -4 && iDBlue2 < 4); m_pencodingbitsRGB8->differential.red1 = iRed1; m_pencodingbitsRGB8->differential.green1 = iGreen1; m_pencodingbitsRGB8->differential.blue1 = iBlue1; m_pencodingbitsRGB8->differential.dred2 = iDRed2; m_pencodingbitsRGB8->differential.dgreen2 = iDGreen2; m_pencodingbitsRGB8->differential.dblue2 = iDBlue2; m_pencodingbitsRGB8->individual.cw1 = m_uiCW1; m_pencodingbitsRGB8->individual.cw2 = m_uiCW2; SetEncodingBits_Selectors(); // in RGB8A1 encoding bits, opaque replaces differential m_pencodingbitsRGB8->differential.diff = !m_boolPunchThroughPixels; m_pencodingbitsRGB8->individual.flip = m_boolFlip; } // ---------------------------------------------------------------------------------------------------- // set the encoding bits based on encoding state if T mode // void Block4x4Encoding_RGB8A1::SetEncodingBits_T(void) { static const bool SANITY_CHECK = true; assert(m_mode == MODE_T); assert(m_boolDiff == true); unsigned int uiRed1 = (unsigned int)m_frgbaColor1.IntRed(15.0f); unsigned int uiGreen1 = (unsigned int)m_frgbaColor1.IntGreen(15.0f); unsigned int uiBlue1 = (unsigned int)m_frgbaColor1.IntBlue(15.0f); unsigned int uiRed2 = (unsigned int)m_frgbaColor2.IntRed(15.0f); unsigned int uiGreen2 = (unsigned int)m_frgbaColor2.IntGreen(15.0f); unsigned int uiBlue2 = (unsigned int)m_frgbaColor2.IntBlue(15.0f); m_pencodingbitsRGB8->t.red1a = uiRed1 >> 2; m_pencodingbitsRGB8->t.red1b = uiRed1; m_pencodingbitsRGB8->t.green1 = uiGreen1; m_pencodingbitsRGB8->t.blue1 = uiBlue1; m_pencodingbitsRGB8->t.red2 = uiRed2; m_pencodingbitsRGB8->t.green2 = uiGreen2; m_pencodingbitsRGB8->t.blue2 = uiBlue2; m_pencodingbitsRGB8->t.da = m_uiCW1 >> 1; m_pencodingbitsRGB8->t.db = m_uiCW1; // in RGB8A1 encoding bits, opaque replaces differential m_pencodingbitsRGB8->differential.diff = !m_boolPunchThroughPixels; Block4x4Encoding_ETC1::SetEncodingBits_Selectors(); // create an invalid R differential to trigger T mode m_pencodingbitsRGB8->t.detect1 = 0; m_pencodingbitsRGB8->t.detect2 = 0; int iRed2 = (int)m_pencodingbitsRGB8->differential.red1 + (int)m_pencodingbitsRGB8->differential.dred2; if (iRed2 >= 4) { m_pencodingbitsRGB8->t.detect1 = 7; m_pencodingbitsRGB8->t.detect2 = 0; } else { m_pencodingbitsRGB8->t.detect1 = 0; m_pencodingbitsRGB8->t.detect2 = 1; } if (SANITY_CHECK) { iRed2 = (int)m_pencodingbitsRGB8->differential.red1 + (int)m_pencodingbitsRGB8->differential.dred2; // make sure red overflows assert(iRed2 < 0 || iRed2 > 31); } } // ---------------------------------------------------------------------------------------------------- // set the encoding bits based on encoding state if H mode // // colors and selectors may need to swap in order to generate lsb of distance index // void Block4x4Encoding_RGB8A1::SetEncodingBits_H(void) { static const bool SANITY_CHECK = true; assert(m_mode == MODE_H); assert(m_boolDiff == true); unsigned int uiRed1 = (unsigned int)m_frgbaColor1.IntRed(15.0f); unsigned int uiGreen1 = (unsigned int)m_frgbaColor1.IntGreen(15.0f); unsigned int uiBlue1 = (unsigned int)m_frgbaColor1.IntBlue(15.0f); unsigned int uiRed2 = (unsigned int)m_frgbaColor2.IntRed(15.0f); unsigned int uiGreen2 = (unsigned int)m_frgbaColor2.IntGreen(15.0f); unsigned int uiBlue2 = (unsigned int)m_frgbaColor2.IntBlue(15.0f); unsigned int uiColor1 = (uiRed1 << 16) + (uiGreen1 << 8) + uiBlue1; unsigned int uiColor2 = (uiRed2 << 16) + (uiGreen2 << 8) + uiBlue2; bool boolOddDistance = m_uiCW1 & 1; bool boolSwapColors = (uiColor1 < uiColor2) ^ !boolOddDistance; if (boolSwapColors) { m_pencodingbitsRGB8->h.red1 = uiRed2; m_pencodingbitsRGB8->h.green1a = uiGreen2 >> 1; m_pencodingbitsRGB8->h.green1b = uiGreen2; m_pencodingbitsRGB8->h.blue1a = uiBlue2 >> 3; m_pencodingbitsRGB8->h.blue1b = uiBlue2 >> 1; m_pencodingbitsRGB8->h.blue1c = uiBlue2; m_pencodingbitsRGB8->h.red2 = uiRed1; m_pencodingbitsRGB8->h.green2a = uiGreen1 >> 1; m_pencodingbitsRGB8->h.green2b = uiGreen1; m_pencodingbitsRGB8->h.blue2 = uiBlue1; m_pencodingbitsRGB8->h.da = m_uiCW1 >> 2; m_pencodingbitsRGB8->h.db = m_uiCW1 >> 1; } else { m_pencodingbitsRGB8->h.red1 = uiRed1; m_pencodingbitsRGB8->h.green1a = uiGreen1 >> 1; m_pencodingbitsRGB8->h.green1b = uiGreen1; m_pencodingbitsRGB8->h.blue1a = uiBlue1 >> 3; m_pencodingbitsRGB8->h.blue1b = uiBlue1 >> 1; m_pencodingbitsRGB8->h.blue1c = uiBlue1; m_pencodingbitsRGB8->h.red2 = uiRed2; m_pencodingbitsRGB8->h.green2a = uiGreen2 >> 1; m_pencodingbitsRGB8->h.green2b = uiGreen2; m_pencodingbitsRGB8->h.blue2 = uiBlue2; m_pencodingbitsRGB8->h.da = m_uiCW1 >> 2; m_pencodingbitsRGB8->h.db = m_uiCW1 >> 1; } // in RGB8A1 encoding bits, opaque replaces differential m_pencodingbitsRGB8->differential.diff = !m_boolPunchThroughPixels; Block4x4Encoding_ETC1::SetEncodingBits_Selectors(); if (boolSwapColors) { m_pencodingbitsRGB8->h.selectors ^= 0x0000FFFF; } // create an invalid R differential to trigger T mode m_pencodingbitsRGB8->h.detect1 = 0; m_pencodingbitsRGB8->h.detect2 = 0; m_pencodingbitsRGB8->h.detect3 = 0; int iRed2 = (int)m_pencodingbitsRGB8->differential.red1 + (int)m_pencodingbitsRGB8->differential.dred2; int iGreen2 = (int)m_pencodingbitsRGB8->differential.green1 + (int)m_pencodingbitsRGB8->differential.dgreen2; if (iRed2 < 0 || iRed2 > 31) { m_pencodingbitsRGB8->h.detect1 = 1; } if (iGreen2 >= 4) { m_pencodingbitsRGB8->h.detect2 = 7; m_pencodingbitsRGB8->h.detect3 = 0; } else { m_pencodingbitsRGB8->h.detect2 = 0; m_pencodingbitsRGB8->h.detect3 = 1; } if (SANITY_CHECK) { iRed2 = (int)m_pencodingbitsRGB8->differential.red1 + (int)m_pencodingbitsRGB8->differential.dred2; iGreen2 = (int)m_pencodingbitsRGB8->differential.green1 + (int)m_pencodingbitsRGB8->differential.dgreen2; // make sure red doesn't overflow and green does assert(iRed2 >= 0 && iRed2 <= 31); assert(iGreen2 < 0 || iGreen2 > 31); } } // #################################################################################################### // Block4x4Encoding_RGB8A1_Opaque // #################################################################################################### // ---------------------------------------------------------------------------------------------------- // perform a single encoding iteration // replace the encoding if a better encoding was found // subsequent iterations generally take longer for each iteration // set m_boolDone if encoding is perfect or encoding is finished based on a_fEffort // void Block4x4Encoding_RGB8A1_Opaque::PerformIteration(Image::Format const a_encoding, ErrorMetric const a_errormetric, float a_fEffort) { assert(!m_boolPunchThroughPixels); assert(!m_boolTransparent); assert(!m_boolDone); switch (m_uiEncodingIterations) { case 0: PerformFirstIteration(a_errormetric); break; case 1: Block4x4Encoding_ETC1::TryDifferential(m_boolMostLikelyFlip, 1, 0, 0); break; case 2: Block4x4Encoding_ETC1::TryDifferential(!m_boolMostLikelyFlip, 1, 0, 0); break; case 3: Block4x4Encoding_RGB8::TryPlanar(1); break; case 4: Block4x4Encoding_RGB8::TryTAndH(a_errormetric, 1); if (a_fEffort <= 49.5f) { m_boolDone = true; } break; case 5: Block4x4Encoding_ETC1::TryDegenerates1(); if (a_fEffort <= 59.5f) { m_boolDone = true; } break; case 6: Block4x4Encoding_ETC1::TryDegenerates2(); if (a_fEffort <= 69.5f) { m_boolDone = true; } break; case 7: Block4x4Encoding_ETC1::TryDegenerates3(); if (a_fEffort <= 79.5f) { m_boolDone = true; } break; case 8: Block4x4Encoding_ETC1::TryDegenerates4(); m_boolDone = true; break; default: assert(0); break; } m_uiEncodingIterations++; SetDoneIfPerfect(); } // ---------------------------------------------------------------------------------------------------- // find best initial encoding to ensure block has a valid encoding // void Block4x4Encoding_RGB8A1_Opaque::PerformFirstIteration(ErrorMetric const a_errormetric) { // set decoded alphas // calculate alpha error m_fError = 0.0f; for (unsigned int uiPixel = 0; uiPixel < PIXELS; uiPixel++) { m_afDecodedAlphas[uiPixel] = 1.0f; float fDeltaA = 1.0f - m_pafrgbaSource[uiPixel].fA; m_fError += fDeltaA * fDeltaA; } CalculateMostLikelyFlip(a_errormetric); m_fError = FLT_MAX; Block4x4Encoding_ETC1::TryDifferential(m_boolMostLikelyFlip, 0, 0, 0); SetDoneIfPerfect(); if (m_boolDone) { return; } Block4x4Encoding_ETC1::TryDifferential(!m_boolMostLikelyFlip, 0, 0, 0); SetDoneIfPerfect(); if (m_boolDone) { return; } Block4x4Encoding_RGB8::TryPlanar(0); SetDoneIfPerfect(); if (m_boolDone) { return; } Block4x4Encoding_RGB8::TryTAndH(a_errormetric, 0); SetDoneIfPerfect(); } // #################################################################################################### // Block4x4Encoding_RGB8A1_Transparent // #################################################################################################### // ---------------------------------------------------------------------------------------------------- // perform a single encoding iteration // replace the encoding if a better encoding was found // subsequent iterations generally take longer for each iteration // set m_boolDone if encoding is perfect or encoding is finished based on a_fEffort // void Block4x4Encoding_RGB8A1_Transparent::PerformIteration(Image::Format, ErrorMetric, float ) { assert(!m_boolOpaque); assert(m_boolTransparent); assert(!m_boolDone); assert(m_uiEncodingIterations == 0); m_mode = MODE_ETC1; m_boolDiff = true; m_boolFlip = false; m_uiCW1 = 0; m_uiCW2 = 0; m_frgbaColor1 = ColorFloatRGBA(); m_frgbaColor2 = ColorFloatRGBA(); for (unsigned int uiPixel = 0; uiPixel < PIXELS; uiPixel++) { m_auiSelectors[uiPixel] = TRANSPARENT_SELECTOR; m_afrgbaDecodedColors[uiPixel] = ColorFloatRGBA(); m_afDecodedAlphas[uiPixel] = 0.0f; } CalcBlockError(); m_boolDone = true; m_uiEncodingIterations++; } // ---------------------------------------------------------------------------------------------------- // }
/* This file is part of Magnum. Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Vladimír Vondruš <mosra@centrum.cz> Copyright © 2015 Jonathan Hale <squareys@googlemail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "PlayableGroup.h" #include "Magnum/Audio/Playable.h" #include "Magnum/Audio/Source.h" #include "Magnum/SceneGraph/AbstractObject.h" namespace Magnum { namespace Audio { namespace { template<UnsignedInt dimensions> std::vector<std::reference_wrapper<Source>> sources(PlayableGroup<dimensions>& group) { std::vector<std::reference_wrapper<Source>> srcs; srcs.reserve(group.size()); for(std::size_t i = 0; i != group.size(); ++i) srcs.push_back(group[i].source()); return srcs; } } template<UnsignedInt dimensions> PlayableGroup<dimensions>::PlayableGroup(): SceneGraph::FeatureGroup<dimensions, Playable<dimensions>, Float>(), _gain{1.0f} {} template<UnsignedInt dimensions> PlayableGroup<dimensions>::~PlayableGroup() = default; template<UnsignedInt dimensions> PlayableGroup<dimensions>& PlayableGroup<dimensions>::play() { Source::play(sources(*this)); return *this; } template<UnsignedInt dimensions> PlayableGroup<dimensions>& PlayableGroup<dimensions>::pause() { Source::pause(sources(*this)); return *this; } template<UnsignedInt dimensions> PlayableGroup<dimensions>& PlayableGroup<dimensions>::stop() { Source::stop(sources(*this)); return *this; } template<UnsignedInt dimensions> PlayableGroup<dimensions>& PlayableGroup<dimensions>::setGain(const Float gain) { _gain = gain; for(UnsignedInt i = 0; i < this->size(); ++i) (*this)[i].cleanGain(); return *this; } template<UnsignedInt dimensions> PlayableGroup<dimensions>& PlayableGroup<dimensions>::setSoundTransformation(const Matrix4& matrix) { _soundTransform = matrix; /* I cannot come up with a use case for which the sound transformation would be set frequently, so we are setting objects dirty whether the matrix changed or not. */ for(UnsignedInt i = 0; i < this->size(); ++i) (*this)[i].object().setDirty(); return *this; } #ifdef MAGNUM_BUILD_DEPRECATED template<UnsignedInt dimensions> void PlayableGroup<dimensions>::setClean() { std::vector<std::reference_wrapper<SceneGraph::AbstractObject<dimensions, Float>>> objects; objects.reserve(this->size()); for(UnsignedInt i = 0; i < this->size(); ++i) objects.push_back((*this)[i].object()); SceneGraph::AbstractObject<dimensions, Float>::setClean(objects); } #endif /* On non-MinGW Windows the instantiations are already marked with extern template. However Clang-CL doesn't propagate the export from the extern template, it seems. */ #if !defined(CORRADE_TARGET_WINDOWS) || defined(CORRADE_TARGET_MINGW) || defined(CORRADE_TARGET_CLANG_CL) #define MAGNUM_AUDIO_EXPORT_HPP MAGNUM_AUDIO_EXPORT #else #define MAGNUM_AUDIO_EXPORT_HPP #endif #ifndef DOXYGEN_GENERATING_OUTPUT template class MAGNUM_AUDIO_EXPORT_HPP PlayableGroup<2>; template class MAGNUM_AUDIO_EXPORT_HPP PlayableGroup<3>; #endif }}
#include <bits/stdc++.h> using namespace std; int arr[102],N,n,ind=1,cnt=0; unordered_map<string,int> mp; string str; int main(){ cin >> N; for(int i = 1; i <= N; i++){ cin >> str; if(mp[str]){ n = mp[str]; }else{ mp[str] = n = ind++; } if(arr[n] > (i-1)/2) cnt++; arr[n]++; } printf("%d\n",cnt); return 0; }
// 4.12.2 dither_algorithm=2 alpha_dither=yes layout_rotation=0 opaque_image_format=RGB565 non_opaque_image_format=ARGB8888 section=ExtFlashSection extra_section=ExtFlashSection generate_png=no 0x3449ba05 // Generated by imageconverter. Please, do not edit! #include <touchgfx/hal/Config.hpp> LOCATION_PRAGMA("ExtFlashSection") KEEP extern const unsigned char _msx[] LOCATION_ATTRIBUTE("ExtFlashSection") = // 200x83 ARGB8888 pixels. { 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x98, 0x94, 0x90, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xc0, 0xc0, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xc0, 0xc0, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xc0, 0xc0, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xc0, 0xc0, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0x68, 0x60, 0x60, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x98, 0x98, 0x98, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xc0, 0xc0, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xc0, 0xc0, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xc0, 0xc0, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xbc, 0xc0, 0xfb, 0xc0, 0xc0, 0xc0, 0xfb, 0x88, 0x80, 0x80, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x18, 0x08, 0x08, 0xf3, 0x40, 0x38, 0x38, 0xf3, 0x60, 0x5c, 0x58, 0xf7, 0x80, 0x78, 0x78, 0xf7, 0x88, 0x80, 0x80, 0xf7, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x90, 0xf7, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x88, 0xfb, 0x90, 0x8c, 0x90, 0xf7, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x88, 0xfb, 0x90, 0x8c, 0x90, 0xf7, 0x90, 0x8c, 0x88, 0xfb, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x90, 0xf7, 0x90, 0x8c, 0x88, 0xfb, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x90, 0xf7, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x88, 0xfb, 0x90, 0x8c, 0x90, 0xf7, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x90, 0xf7, 0x90, 0x8c, 0x88, 0xfb, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x90, 0xf7, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x90, 0xf7, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x88, 0xfb, 0x90, 0x8c, 0x90, 0xf7, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x88, 0xfb, 0x90, 0x8c, 0x90, 0xf7, 0x90, 0x8c, 0x88, 0xfb, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x90, 0xf7, 0x90, 0x8c, 0x88, 0xfb, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x90, 0xf7, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x88, 0xfb, 0x90, 0x8c, 0x90, 0xf7, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x88, 0xf7, 0x90, 0x8c, 0x90, 0xf7, 0x90, 0x8c, 0x88, 0xfb, 0x50, 0x48, 0x48, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x40, 0x3c, 0x38, 0xf3, 0xb8, 0xb4, 0xb8, 0xfb, 0xb0, 0xac, 0xb0, 0xfb, 0xb0, 0xac, 0xa8, 0xfb, 0xb0, 0xac, 0xb0, 0xfb, 0xb0, 0xac, 0xb0, 0xfb, 0xb0, 0xac, 0xa8, 0xfb, 0xb0, 0xac, 0xb0, 0xfb, 0xb0, 0xac, 0xb0, 0xfb, 0xb0, 0xac, 0xa8, 0xfb, 0xa0, 0xa0, 0xa0, 0xfb, 0xa0, 0x9c, 0xa0, 0xfb, 0xa0, 0x9c, 0xa0, 0xfb, 0xa0, 0x9c, 0x98, 0xfb, 0xa0, 0x9c, 0xa0, 0xfb, 0xa0, 0x9c, 0xa0, 0xfb, 0xa0, 0x9c, 0x98, 0xfb, 0xa0, 0x9c, 0xa0, 0xf7, 0xa0, 0x9c, 0xa0, 0xfb, 0x40, 0x34, 0x38, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x08, 0x08, 0xef, 0xf8, 0xf8, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xc0, 0xbc, 0xc0, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x18, 0x10, 0x10, 0xf3, 0xf8, 0xf8, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xe8, 0xe8, 0xe8, 0xff, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x30, 0x28, 0x28, 0xf3, 0x88, 0x80, 0x80, 0xf7, 0xd0, 0xcc, 0xc8, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0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, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x18, 0x0c, 0x10, 0xf3, 0xe0, 0xe0, 0xe0, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xd0, 0xd0, 0xd0, 0xfb, 0x18, 0x08, 0x08, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x48, 0x40, 0x40, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xf8, 0xf8, 0xff, 0x18, 0x0c, 0x08, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x60, 0x58, 0x58, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x40, 0x34, 0x30, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x58, 0x4c, 0x50, 0xf3, 0xc0, 0x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0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xf8, 0xf8, 0xff, 0x38, 0x28, 0x28, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x88, 0x80, 0x80, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x58, 0x50, 0x50, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xa8, 0xa0, 0xa0, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x80, 0x7c, 0x78, 0xf7, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 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, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x78, 0x6c, 0x68, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x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x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x28, 0x20, 0x20, 0xf3, 0xf0, 0xf0, 0xf0, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xb8, 0xb4, 0xb8, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x18, 0x08, 0x08, 0xf3, 0xf8, 0xf8, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xe0, 0xdc, 0xd8, 0xff, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x40,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xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xe8, 0xe8, 0xe8, 0xff, 0x28, 0x18, 0x18, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xc0, 0xc0, 0xc0, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xe8, 0xe8, 0xe8, 0xff, 0x20, 0x18, 0x18, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x50, 0x44, 0x48, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x30, 0x24, 0x20, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x88, 0x80, 0x80, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x60, 0x54, 0x50, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x18, 0x08, 0x08, 0xf3, 0xc0, 0xb8, 0xb8, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0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, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x58, 0x4c, 0x48, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x88, 0x88, 0x88, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff,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 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x98, 0x94, 0x90, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 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, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x18, 0x0c, 0x08, 0xf3, 0xd8, 0xd8, 0xd8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xd8, 0xd8, 0xd8, 0xfb, 0x18, 0x08, 0x08, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x18, 0x0c, 0x08, 0xf3, 0xf8, 0xf8, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xf4, 0xf0, 0xff, 0x10, 0x04, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 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00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x50, 0x48, 0x48, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8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0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x78, 0x74, 0x70, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 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x00, 0xef, 0x20, 0x18, 0x18, 0xf3, 0xe8, 0xe8, 0xe8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xc0, 0xbc, 0xb8, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0xc8, 0xc8, 0xc8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xd0, 0xd0, 0xd0, 0xff, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x48, 0x40, 0x40, 0xf3, 0xf8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x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x18, 0x0c, 0x10, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf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 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x58, 0x50, 0x50, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x58, 0x4c, 0x48, 0xf3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, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xa0, 0x9c, 0xa0, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x90, 0x8c, 0x90, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xb0, 0xa8, 0xa8, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x28, 0x1c, 0x18, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc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0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xd0, 0xcc, 0xd0, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x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 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xc8, 0xc0, 0xc0, 0xfb, 0x28, 0x1c, 0x18, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x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00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x20, 0x10, 0x10, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xf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, 0xf8, 0xff, 0x70, 0x6c, 0x68, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xb8, 0xb8, 0xb8, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xe8, 0xec, 0xf0, 0xff, 0x20, 0x10, 0x10, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x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0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x80, 0x7c, 0x78, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10,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, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x60, 0x54, 0x58, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xc8, 0xc0, 0xc0, 0xfb, 0x10, 0x04, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0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 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xa8, 0xa4, 0xa8, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf0, 0xf0, 0xf0, 0xff, 0x28, 0x20, 0x20, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0xd0, 0xd0, 0xd0, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf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0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xd0, 0xcc, 0xd0, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00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xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x20, 0x10, 0x10, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0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8, 0xa4, 0xa0, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x78, 0x70, 0x70, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00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xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x60, 0x54, 0x50, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0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30, 0x24, 0x28, 0xf3, 0x10, 0x04, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x98, 0x94, 0x98, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xe0, 0xe0, 0xe0, 0xfb, 0x18, 0x0c, 0x10, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x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f8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xf4, 0xf8, 0xff, 0xb8, 0xb4, 0xb8, 0xfb, 0x60, 0x5c, 0x58, 0xf7, 0x18, 0x0c, 0x08, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x18, 0x0c, 0x08, 0xf3, 0xe0, 0xdc, 0xe0, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x48, 0x3c, 0x40, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xd8, 0xd4, 0xd8, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 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0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x48, 0x3c, 0x38, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x88, 0x80, 0x80, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x20, 0x14, 0x18, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0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x58, 0x58, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x90, 0x88, 0x88, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xc8, 0xc8, 0xc8, 0xfb, 0x10, 0x04, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x60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 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf0, 0xf4, 0xf0, 0xff, 0x30, 0x24, 0x20, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0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x00, 0xef, 0x38, 0x30, 0x30, 0xf3, 0xf8, 0xf8, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x68, 0x60, 0x60, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xd8, 0xd8, 0xd8, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0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 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x80, 0x78, 0x78, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xb0, 0xac, 0xa8, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x28, 0x18, 0x18, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc,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 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x68, 0x60, 0x60, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x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, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf0, 0xf0, 0xf0, 0xff, 0x28, 0x20, 0x20, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xa0, 0x9c, 0xa0, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 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10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x40, 0x34, 0x30, 0xf3, 0xf8, 0xf8, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xc8, 0xc0, 0xc0, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xd8, 0xd8, 0xd8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0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, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x28, 0x1c, 0x18, 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xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xf8, 0xf8, 0xff, 0x38, 0x34, 0x38, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x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x10, 0x00, 0x00, 0xef, 0x50, 0x48, 0x48, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xd8, 0xd8, 0xd8, 0xff, 0x18, 0x08, 0x08, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xa0, 0xa0, 0xa0, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x30, 0x28, 0x28, 0xf3, 0xd8, 0xd0, 0xd0, 0xfb, 0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00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xe0, 0xe0, 0xe0, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0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xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x58, 0x50, 0x50, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 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0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xe8, 0xe8, 0xe8, 0xff, 0x28, 0x18, 0x18, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x68, 0x60, 0x60, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x70, 0x6c, 0x70, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x04, 0x08, 0xef, 0xf8, 0xf4, 0xf0, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0x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xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x58, 0x48, 0x48, 0xf3, 0xf8, 0xf8, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x98, 0x90, 0x90, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0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x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xa8, 0xa4, 0xa0, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xf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f8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xa0, 0xa0, 0xa0, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x98, 0x98, 0x98, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 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, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x70, 0x6c, 0x70, 0xf7, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xe0, 0xe0, 0xe0, 0xff, 0xf8, 0xfc, 0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ef, 0x38, 0x2c, 0x28, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xe8, 0xe4, 0xe0, 0xff, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0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 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xf8, 0xf8, 0xff, 0x38, 0x2c, 0x28, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10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, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xc8, 0xc8, 0xc8, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xe8, 0xe4, 0xe8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x38, 0x30, 0x30, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x58, 0x50, 0x50, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xc8, 0xc4, 0xc8, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x38, 0x30, 0x30, 0xf3, 0xf8, 0xf8, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0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, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x70, 0x68, 0x68, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x78, 0x70, 0x70, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xe0, 0xdc, 0xd8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc,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x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x88, 0x84, 0x80, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xb8, 0xb4, 0xb8, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0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 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xa8, 0xa4, 0xa8, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8,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xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xc0, 0xc0, 0xc0, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x30, 0x24, 0x20, 0xf3, 0xe8, 0xe8, 0xe8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 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xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x50, 0x44, 0x40, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xe8, 0xe4, 0xe8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc,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x78, 0x78, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xb8, 0xb8, 0xb8, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xe8, 0xe4, 0xe8, 0xff, 0x20, 0x10, 0x10, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10,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x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x70, 0x68, 0x68, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x78, 0x74, 0x78, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00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f8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x68, 0x60, 0x60, 0xf7, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xb0, 0xa8, 0xa8, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0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, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x98, 0x94, 0x90, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf0, 0xf4, 0xf0, 0xff, 0x30, 0x20, 0x20, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 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x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x38, 0x2c, 0x28, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xb8, 0xb8, 0xb8, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00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0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x88, 0x80, 0x80, 0xf7, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x70, 0x6c, 0x70, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0x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0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x70, 0x6c, 0x70, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x40, 0x3c, 0x38, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0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x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xe8, 0xec, 0xe8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xf4, 0xf8, 0xff, 0x10, 0x04, 0x08, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 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f8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xa0, 0xa0, 0xa0, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x38, 0x2c, 0x30, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xf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, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x50, 0x44, 0x48, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x60, 0x54, 0x50, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0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0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xa8, 0xa4, 0xa0, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x90, 0x8c, 0x90, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf0, 0xec, 0xf0, 0xff, 0x28, 0x1c, 0x20, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xb8, 0xb0, 0xb0, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x48, 0x40, 0x40, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x40, 0x3c, 0x38, 0xf3, 0xf8, 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0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xc0, 0xc0, 0xc0, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0xe8, 0xec, 0xf0, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xf4, 0xf8, 0xff, 0x18, 0x08, 0x08, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xf0, 0xec, 0xf0, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xc8, 0xc8, 0xc8, 0xfb, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xe8, 0xe4, 0xe8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0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xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x80, 0x78, 0x78, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0xa8, 0xa4, 0xa0, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x50, 0x44, 0x48, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x38, 0x28, 0x28, 0xf3, 0xf8, 0xf4, 0xf0, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x80, 0x78, 0x78, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x38, 0x30, 0x30, 0xf3, 0xf8, 0xfc, 0xf8,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 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x70, 0x68, 0x68, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xf8, 0xf8, 0xff, 0x38, 0x30, 0x30, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x78, 0x74, 0x70, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x88, 0x80, 0x80, 0xf7, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x68, 0x64, 0x60, 0xf7, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0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xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xe0, 0xdc, 0xd8, 0xff, 0x18, 0x0c, 0x08, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0xb0, 0xac, 0xb0, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xd8, 0xd4, 0xd8, 0xfb, 0x18, 0x08, 0x08, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0xb8, 0xb4, 0xb8, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x48, 0x44, 0x40, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x28, 0x1c, 0x18, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xf4, 0xf0, 0xff, 0x10, 0x04, 0x08, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x28, 0x1c, 0x20, 0xf3, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0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0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x48, 0x3c, 0x38, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x20, 0x14, 0x10, 0xf3, 0xe0, 0xe0, 0xe0, 0xfb, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0xf8, 0xfc, 0xf8, 0xff, 0x98, 0x94, 0x90, 0xf7, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x48, 0x3c, 0x40, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x58, 0x48, 0x48, 0xf3, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf3, 0x60, 0x58, 0x58, 0xf3, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x18, 0x08, 0x08, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x48, 0x40, 0x40, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x48, 0x38, 0x38, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x58, 0x50, 0x50, 0xf7, 0x60, 0x58, 0x58, 0xf3, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf3, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf3, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf3, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf3, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf3, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf3, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf3, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf3, 0x60, 0x58, 0x58, 0xf3, 0x60, 0x58, 0x58, 0xf7, 0x60, 0x58, 0x58, 0xf3, 0x60, 0x58, 0x58, 0xf3, 0x60, 0x54, 0x58, 0xf7, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x50, 0x48, 0x48, 0xf3, 0x40, 0x38, 0x38, 0xf3, 0x28, 0x20, 0x20, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x20, 0x18, 0x18, 0xf3, 0x70, 0x6c, 0x68, 0xf7, 0x70, 0x6c, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x6c, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x6c, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x6c, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x6c, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x6c, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x58, 0x4c, 0x50, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x38, 0x30, 0x30, 0xf3, 0x70, 0x6c, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x6c, 0x68, 0xf7, 0x70, 0x6c, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x6c, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x6c, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x6c, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x6c, 0x68, 0xf7, 0x70, 0x68, 0x68, 0xf7, 0x70, 0x6c, 0x68, 0xf7, 0x80, 0x78, 0x78, 0xf7, 0x80, 0x7c, 0x78, 0xf7, 0x80, 0x7c, 0x78, 0xf7, 0x80, 0x7c, 0x78, 0xf7, 0x18, 0x0c, 0x10, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef, 0x08, 0x00, 0x00, 0xef, 0x10, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xef };
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "modules/audio_device/audio_device_impl.h" #include "modules/audio_device/audio_device_config.h" #include "modules/audio_device/audio_device_generic.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" #include "rtc_base/refcount.h" #include "rtc_base/refcountedobject.h" #include "system_wrappers/include/metrics.h" #if defined(_WIN32) #if defined(WEBRTC_WINDOWS_CORE_AUDIO_BUILD) #include "audio_device_core_win.h" #endif #elif defined(WEBRTC_ANDROID) #include <stdlib.h> #include "modules/audio_device/android/audio_device_template.h" #include "modules/audio_device/android/audio_manager.h" #include "modules/audio_device/android/audio_record_jni.h" #include "modules/audio_device/android/audio_track_jni.h" #include "modules/audio_device/android/opensles_player.h" #include "modules/audio_device/android/opensles_recorder.h" #elif defined(WEBRTC_LINUX) #if defined(LINUX_ALSA) #include "audio_device_alsa_linux.h" #endif #if defined(LINUX_PULSE) #include "audio_device_pulse_linux.h" #endif #elif defined(WEBRTC_IOS) #include "audio_device_ios.h" #elif defined(WEBRTC_MAC) #include "audio_device_mac.h" #endif #if defined(WEBRTC_DUMMY_FILE_DEVICES) #include "modules/audio_device/dummy/file_audio_device_factory.h" #endif #include "modules/audio_device/dummy/audio_device_dummy.h" #include "modules/audio_device/dummy/file_audio_device.h" #define CHECKinitialized_() \ { \ if (!initialized_) { \ return -1; \ }; \ } #define CHECKinitialized__BOOL() \ { \ if (!initialized_) { \ return false; \ }; \ } namespace webrtc { // static rtc::scoped_refptr<AudioDeviceModule> AudioDeviceModule::Create( const AudioLayer audio_layer) { RTC_LOG(INFO) << __FUNCTION__; // Create the generic reference counted (platform independent) implementation. rtc::scoped_refptr<AudioDeviceModuleImpl> audioDevice( new rtc::RefCountedObject<AudioDeviceModuleImpl>(audio_layer)); // Ensure that the current platform is supported. if (audioDevice->CheckPlatform() == -1) { return nullptr; } // Create the platform-dependent implementation. if (audioDevice->CreatePlatformSpecificObjects() == -1) { return nullptr; } // Ensure that the generic audio buffer can communicate with the platform // specific parts. if (audioDevice->AttachAudioBuffer() == -1) { return nullptr; } return audioDevice; } // TODO(bugs.webrtc.org/7306): deprecated. rtc::scoped_refptr<AudioDeviceModule> AudioDeviceModule::Create( const int32_t id, const AudioLayer audio_layer) { RTC_LOG(INFO) << __FUNCTION__; return AudioDeviceModule::Create(audio_layer); } AudioDeviceModuleImpl::AudioDeviceModuleImpl(const AudioLayer audioLayer) : audio_layer_(audioLayer) { RTC_LOG(INFO) << __FUNCTION__; } int32_t AudioDeviceModuleImpl::CheckPlatform() { RTC_LOG(INFO) << __FUNCTION__; // Ensure that the current platform is supported PlatformType platform(kPlatformNotSupported); #if defined(_WIN32) platform = kPlatformWin32; RTC_LOG(INFO) << "current platform is Win32"; #elif defined(WEBRTC_ANDROID) platform = kPlatformAndroid; RTC_LOG(INFO) << "current platform is Android"; #elif defined(WEBRTC_LINUX) platform = kPlatformLinux; RTC_LOG(INFO) << "current platform is Linux"; #elif defined(WEBRTC_IOS) platform = kPlatformIOS; RTC_LOG(INFO) << "current platform is IOS"; #elif defined(WEBRTC_MAC) platform = kPlatformMac; RTC_LOG(INFO) << "current platform is Mac"; #endif if (platform == kPlatformNotSupported) { RTC_LOG(LERROR) << "current platform is not supported => this module will self " "destruct!"; return -1; } platform_type_ = platform; return 0; } int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() { RTC_LOG(INFO) << __FUNCTION__; // Dummy ADM implementations if build flags are set. #if defined(WEBRTC_DUMMY_AUDIO_BUILD) audio_device_.reset(new AudioDeviceDummy()); RTC_LOG(INFO) << "Dummy Audio APIs will be utilized"; #elif defined(WEBRTC_DUMMY_FILE_DEVICES) audio_device_.reset(FileAudioDeviceFactory::CreateFileAudioDevice()); if (audio_device_) { RTC_LOG(INFO) << "Will use file-playing dummy device."; } else { // Create a dummy device instead. audio_device_.reset(new AudioDeviceDummy()); RTC_LOG(INFO) << "Dummy Audio APIs will be utilized"; } // Real (non-dummy) ADM implementations. #else AudioLayer audio_layer(PlatformAudioLayer()); // Windows ADM implementation. #if defined(WEBRTC_WINDOWS_CORE_AUDIO_BUILD) if ((audio_layer == kWindowsCoreAudio) || (audio_layer == kPlatformDefaultAudio)) { RTC_LOG(INFO) << "Attempting to use the Windows Core Audio APIs..."; if (AudioDeviceWindowsCore::CoreAudioIsSupported()) { audio_device_.reset(new AudioDeviceWindowsCore()); RTC_LOG(INFO) << "Windows Core Audio APIs will be utilized"; } } #endif // defined(WEBRTC_WINDOWS_CORE_AUDIO_BUILD) #if defined(WEBRTC_ANDROID) // Create an Android audio manager. audio_manager_android_.reset(new AudioManager()); // Select best possible combination of audio layers. if (audio_layer == kPlatformDefaultAudio) { if (audio_manager_android_->IsLowLatencyPlayoutSupported() && audio_manager_android_->IsLowLatencyRecordSupported()) { // Use OpenSL ES for both playout and recording. audio_layer = kAndroidOpenSLESAudio; } else if (audio_manager_android_->IsLowLatencyPlayoutSupported() && !audio_manager_android_->IsLowLatencyRecordSupported()) { // Use OpenSL ES for output on devices that only supports the // low-latency output audio path. audio_layer = kAndroidJavaInputAndOpenSLESOutputAudio; } else { // Use Java-based audio in both directions when low-latency output is // not supported. audio_layer = kAndroidJavaAudio; } } AudioManager* audio_manager = audio_manager_android_.get(); if (audio_layer == kAndroidJavaAudio) { // Java audio for both input and output audio. audio_device_.reset(new AudioDeviceTemplate<AudioRecordJni, AudioTrackJni>( audio_layer, audio_manager)); } else if (audio_layer == kAndroidOpenSLESAudio) { // OpenSL ES based audio for both input and output audio. audio_device_.reset( new AudioDeviceTemplate<OpenSLESRecorder, OpenSLESPlayer>( audio_layer, audio_manager)); } else if (audio_layer == kAndroidJavaInputAndOpenSLESOutputAudio) { // Java audio for input and OpenSL ES for output audio (i.e. mixed APIs). // This combination provides low-latency output audio and at the same // time support for HW AEC using the AudioRecord Java API. audio_device_.reset(new AudioDeviceTemplate<AudioRecordJni, OpenSLESPlayer>( audio_layer, audio_manager)); } else { // Invalid audio layer. audio_device_.reset(nullptr); } // END #if defined(WEBRTC_ANDROID) // Linux ADM implementation. #elif defined(WEBRTC_LINUX) if ((audio_layer == kLinuxPulseAudio) || (audio_layer == kPlatformDefaultAudio)) { #if defined(LINUX_PULSE) RTC_LOG(INFO) << "Attempting to use Linux PulseAudio APIs..."; // Linux PulseAudio implementation. audio_device_.reset(new AudioDeviceLinuxPulse()); RTC_LOG(INFO) << "Linux PulseAudio APIs will be utilized"; #endif #if defined(LINUX_PULSE) #endif } else if (audio_layer == kLinuxAlsaAudio) { #if defined(LINUX_ALSA) // Linux ALSA implementation. audio_device_.reset(new AudioDeviceLinuxALSA()); RTC_LOG(INFO) << "Linux ALSA APIs will be utilized."; #endif } #endif // #if defined(WEBRTC_LINUX) // iOS ADM implementation. #if defined(WEBRTC_IOS) if (audio_layer == kPlatformDefaultAudio) { audio_device_.reset(new AudioDeviceIOS()); RTC_LOG(INFO) << "iPhone Audio APIs will be utilized."; } // END #if defined(WEBRTC_IOS) // Mac OS X ADM implementation. #elif defined(WEBRTC_MAC) if (audio_layer == kPlatformDefaultAudio) { audio_device_.reset(new AudioDeviceMac()); RTC_LOG(INFO) << "Mac OS X Audio APIs will be utilized."; } #endif // WEBRTC_MAC // Dummy ADM implementation. if (audio_layer == kDummyAudio) { audio_device_.reset(new AudioDeviceDummy()); RTC_LOG(INFO) << "Dummy Audio APIs will be utilized."; } #endif // if defined(WEBRTC_DUMMY_AUDIO_BUILD) if (!audio_device_) { RTC_LOG(LS_ERROR) << "Failed to create the platform specific ADM implementation."; return -1; } return 0; } int32_t AudioDeviceModuleImpl::AttachAudioBuffer() { RTC_LOG(INFO) << __FUNCTION__; audio_device_->AttachAudioBuffer(&audio_device_buffer_); return 0; } AudioDeviceModuleImpl::~AudioDeviceModuleImpl() { RTC_LOG(INFO) << __FUNCTION__; } int32_t AudioDeviceModuleImpl::ActiveAudioLayer(AudioLayer* audioLayer) const { RTC_LOG(INFO) << __FUNCTION__; AudioLayer activeAudio; if (audio_device_->ActiveAudioLayer(activeAudio) == -1) { return -1; } *audioLayer = activeAudio; return 0; } int32_t AudioDeviceModuleImpl::Init() { RTC_LOG(INFO) << __FUNCTION__; if (initialized_) return 0; RTC_CHECK(audio_device_); AudioDeviceGeneric::InitStatus status = audio_device_->Init(); RTC_HISTOGRAM_ENUMERATION( "WebRTC.Audio.InitializationResult", static_cast<int>(status), static_cast<int>(AudioDeviceGeneric::InitStatus::NUM_STATUSES)); if (status != AudioDeviceGeneric::InitStatus::OK) { RTC_LOG(LS_ERROR) << "Audio device initialization failed."; return -1; } initialized_ = true; return 0; } int32_t AudioDeviceModuleImpl::Terminate() { RTC_LOG(INFO) << __FUNCTION__; if (!initialized_) return 0; if (audio_device_->Terminate() == -1) { return -1; } initialized_ = false; return 0; } bool AudioDeviceModuleImpl::Initialized() const { RTC_LOG(INFO) << __FUNCTION__ << ": " << initialized_; return initialized_; } int32_t AudioDeviceModuleImpl::InitSpeaker() { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); return audio_device_->InitSpeaker(); } int32_t AudioDeviceModuleImpl::InitMicrophone() { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); return audio_device_->InitMicrophone(); } int32_t AudioDeviceModuleImpl::SpeakerVolumeIsAvailable(bool* available) { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); bool isAvailable = false; if (audio_device_->SpeakerVolumeIsAvailable(isAvailable) == -1) { return -1; } *available = isAvailable; RTC_LOG(INFO) << "output: " << isAvailable; return 0; } int32_t AudioDeviceModuleImpl::SetSpeakerVolume(uint32_t volume) { RTC_LOG(INFO) << __FUNCTION__ << "(" << volume << ")"; CHECKinitialized_(); return audio_device_->SetSpeakerVolume(volume); } int32_t AudioDeviceModuleImpl::SpeakerVolume(uint32_t* volume) const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); uint32_t level = 0; if (audio_device_->SpeakerVolume(level) == -1) { return -1; } *volume = level; RTC_LOG(INFO) << "output: " << *volume; return 0; } bool AudioDeviceModuleImpl::SpeakerIsInitialized() const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized__BOOL(); bool isInitialized = audio_device_->SpeakerIsInitialized(); RTC_LOG(INFO) << "output: " << isInitialized; return isInitialized; } bool AudioDeviceModuleImpl::MicrophoneIsInitialized() const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized__BOOL(); bool isInitialized = audio_device_->MicrophoneIsInitialized(); RTC_LOG(INFO) << "output: " << isInitialized; return isInitialized; } int32_t AudioDeviceModuleImpl::MaxSpeakerVolume(uint32_t* maxVolume) const { CHECKinitialized_(); uint32_t maxVol = 0; if (audio_device_->MaxSpeakerVolume(maxVol) == -1) { return -1; } *maxVolume = maxVol; return 0; } int32_t AudioDeviceModuleImpl::MinSpeakerVolume(uint32_t* minVolume) const { CHECKinitialized_(); uint32_t minVol = 0; if (audio_device_->MinSpeakerVolume(minVol) == -1) { return -1; } *minVolume = minVol; return 0; } int32_t AudioDeviceModuleImpl::SpeakerMuteIsAvailable(bool* available) { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); bool isAvailable = false; if (audio_device_->SpeakerMuteIsAvailable(isAvailable) == -1) { return -1; } *available = isAvailable; RTC_LOG(INFO) << "output: " << isAvailable; return 0; } int32_t AudioDeviceModuleImpl::SetSpeakerMute(bool enable) { RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")"; CHECKinitialized_(); return audio_device_->SetSpeakerMute(enable); } int32_t AudioDeviceModuleImpl::SpeakerMute(bool* enabled) const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); bool muted = false; if (audio_device_->SpeakerMute(muted) == -1) { return -1; } *enabled = muted; RTC_LOG(INFO) << "output: " << muted; return 0; } int32_t AudioDeviceModuleImpl::MicrophoneMuteIsAvailable(bool* available) { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); bool isAvailable = false; if (audio_device_->MicrophoneMuteIsAvailable(isAvailable) == -1) { return -1; } *available = isAvailable; RTC_LOG(INFO) << "output: " << isAvailable; return 0; } int32_t AudioDeviceModuleImpl::SetMicrophoneMute(bool enable) { RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")"; CHECKinitialized_(); return (audio_device_->SetMicrophoneMute(enable)); } int32_t AudioDeviceModuleImpl::MicrophoneMute(bool* enabled) const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); bool muted = false; if (audio_device_->MicrophoneMute(muted) == -1) { return -1; } *enabled = muted; RTC_LOG(INFO) << "output: " << muted; return 0; } int32_t AudioDeviceModuleImpl::MicrophoneVolumeIsAvailable(bool* available) { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); bool isAvailable = false; if (audio_device_->MicrophoneVolumeIsAvailable(isAvailable) == -1) { return -1; } *available = isAvailable; RTC_LOG(INFO) << "output: " << isAvailable; return 0; } int32_t AudioDeviceModuleImpl::SetMicrophoneVolume(uint32_t volume) { RTC_LOG(INFO) << __FUNCTION__ << "(" << volume << ")"; CHECKinitialized_(); return (audio_device_->SetMicrophoneVolume(volume)); } int32_t AudioDeviceModuleImpl::MicrophoneVolume(uint32_t* volume) const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); uint32_t level = 0; if (audio_device_->MicrophoneVolume(level) == -1) { return -1; } *volume = level; RTC_LOG(INFO) << "output: " << *volume; return 0; } int32_t AudioDeviceModuleImpl::StereoRecordingIsAvailable( bool* available) const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); bool isAvailable = false; if (audio_device_->StereoRecordingIsAvailable(isAvailable) == -1) { return -1; } *available = isAvailable; RTC_LOG(INFO) << "output: " << isAvailable; return 0; } int32_t AudioDeviceModuleImpl::SetStereoRecording(bool enable) { RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")"; CHECKinitialized_(); if (audio_device_->RecordingIsInitialized()) { RTC_LOG(WARNING) << "recording in stereo is not supported"; return -1; } if (audio_device_->SetStereoRecording(enable) == -1) { RTC_LOG(WARNING) << "failed to change stereo recording"; return -1; } int8_t nChannels(1); if (enable) { nChannels = 2; } audio_device_buffer_.SetRecordingChannels(nChannels); return 0; } int32_t AudioDeviceModuleImpl::StereoRecording(bool* enabled) const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); bool stereo = false; if (audio_device_->StereoRecording(stereo) == -1) { return -1; } *enabled = stereo; RTC_LOG(INFO) << "output: " << stereo; return 0; } int32_t AudioDeviceModuleImpl::StereoPlayoutIsAvailable(bool* available) const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); bool isAvailable = false; if (audio_device_->StereoPlayoutIsAvailable(isAvailable) == -1) { return -1; } *available = isAvailable; RTC_LOG(INFO) << "output: " << isAvailable; return 0; } int32_t AudioDeviceModuleImpl::SetStereoPlayout(bool enable) { RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")"; CHECKinitialized_(); if (audio_device_->PlayoutIsInitialized()) { RTC_LOG(LERROR) << "unable to set stereo mode while playing side is initialized"; return -1; } if (audio_device_->SetStereoPlayout(enable)) { RTC_LOG(WARNING) << "stereo playout is not supported"; return -1; } int8_t nChannels(1); if (enable) { nChannels = 2; } audio_device_buffer_.SetPlayoutChannels(nChannels); return 0; } int32_t AudioDeviceModuleImpl::StereoPlayout(bool* enabled) const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); bool stereo = false; if (audio_device_->StereoPlayout(stereo) == -1) { return -1; } *enabled = stereo; RTC_LOG(INFO) << "output: " << stereo; return 0; } int32_t AudioDeviceModuleImpl::PlayoutIsAvailable(bool* available) { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); bool isAvailable = false; if (audio_device_->PlayoutIsAvailable(isAvailable) == -1) { return -1; } *available = isAvailable; RTC_LOG(INFO) << "output: " << isAvailable; return 0; } int32_t AudioDeviceModuleImpl::RecordingIsAvailable(bool* available) { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); bool isAvailable = false; if (audio_device_->RecordingIsAvailable(isAvailable) == -1) { return -1; } *available = isAvailable; RTC_LOG(INFO) << "output: " << isAvailable; return 0; } int32_t AudioDeviceModuleImpl::MaxMicrophoneVolume(uint32_t* maxVolume) const { CHECKinitialized_(); uint32_t maxVol(0); if (audio_device_->MaxMicrophoneVolume(maxVol) == -1) { return -1; } *maxVolume = maxVol; return 0; } int32_t AudioDeviceModuleImpl::MinMicrophoneVolume(uint32_t* minVolume) const { CHECKinitialized_(); uint32_t minVol(0); if (audio_device_->MinMicrophoneVolume(minVol) == -1) { return -1; } *minVolume = minVol; return 0; } int16_t AudioDeviceModuleImpl::PlayoutDevices() { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); uint16_t nPlayoutDevices = audio_device_->PlayoutDevices(); RTC_LOG(INFO) << "output: " << nPlayoutDevices; return (int16_t)(nPlayoutDevices); } int32_t AudioDeviceModuleImpl::SetPlayoutDevice(uint16_t index) { RTC_LOG(INFO) << __FUNCTION__ << "(" << index << ")"; CHECKinitialized_(); return audio_device_->SetPlayoutDevice(index); } int32_t AudioDeviceModuleImpl::SetPlayoutDevice(WindowsDeviceType device) { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); return audio_device_->SetPlayoutDevice(device); } int32_t AudioDeviceModuleImpl::PlayoutDeviceName( uint16_t index, char name[kAdmMaxDeviceNameSize], char guid[kAdmMaxGuidSize]) { RTC_LOG(INFO) << __FUNCTION__ << "(" << index << ", ...)"; CHECKinitialized_(); if (name == NULL) { return -1; } if (audio_device_->PlayoutDeviceName(index, name, guid) == -1) { return -1; } if (name != NULL) { RTC_LOG(INFO) << "output: name = " << name; } if (guid != NULL) { RTC_LOG(INFO) << "output: guid = " << guid; } return 0; } int32_t AudioDeviceModuleImpl::RecordingDeviceName( uint16_t index, char name[kAdmMaxDeviceNameSize], char guid[kAdmMaxGuidSize]) { RTC_LOG(INFO) << __FUNCTION__ << "(" << index << ", ...)"; CHECKinitialized_(); if (name == NULL) { return -1; } if (audio_device_->RecordingDeviceName(index, name, guid) == -1) { return -1; } if (name != NULL) { RTC_LOG(INFO) << "output: name = " << name; } if (guid != NULL) { RTC_LOG(INFO) << "output: guid = " << guid; } return 0; } int16_t AudioDeviceModuleImpl::RecordingDevices() { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); uint16_t nRecordingDevices = audio_device_->RecordingDevices(); RTC_LOG(INFO) << "output: " << nRecordingDevices; return (int16_t)nRecordingDevices; } int32_t AudioDeviceModuleImpl::SetRecordingDevice(uint16_t index) { RTC_LOG(INFO) << __FUNCTION__ << "(" << index << ")"; CHECKinitialized_(); return audio_device_->SetRecordingDevice(index); } int32_t AudioDeviceModuleImpl::SetRecordingDevice(WindowsDeviceType device) { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); return audio_device_->SetRecordingDevice(device); } int32_t AudioDeviceModuleImpl::InitPlayout() { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); if (PlayoutIsInitialized()) { return 0; } int32_t result = audio_device_->InitPlayout(); RTC_LOG(INFO) << "output: " << result; RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.InitPlayoutSuccess", static_cast<int>(result == 0)); return result; } int32_t AudioDeviceModuleImpl::InitRecording() { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); if (RecordingIsInitialized()) { return 0; } int32_t result = audio_device_->InitRecording(); RTC_LOG(INFO) << "output: " << result; RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.InitRecordingSuccess", static_cast<int>(result == 0)); return result; } bool AudioDeviceModuleImpl::PlayoutIsInitialized() const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized__BOOL(); return audio_device_->PlayoutIsInitialized(); } bool AudioDeviceModuleImpl::RecordingIsInitialized() const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized__BOOL(); return audio_device_->RecordingIsInitialized(); } int32_t AudioDeviceModuleImpl::StartPlayout() { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); if (Playing()) { return 0; } audio_device_buffer_.StartPlayout(); int32_t result = audio_device_->StartPlayout(); RTC_LOG(INFO) << "output: " << result; RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StartPlayoutSuccess", static_cast<int>(result == 0)); return result; } int32_t AudioDeviceModuleImpl::StopPlayout() { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); int32_t result = audio_device_->StopPlayout(); audio_device_buffer_.StopPlayout(); RTC_LOG(INFO) << "output: " << result; RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StopPlayoutSuccess", static_cast<int>(result == 0)); return result; } bool AudioDeviceModuleImpl::Playing() const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized__BOOL(); return audio_device_->Playing(); } int32_t AudioDeviceModuleImpl::StartRecording() { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); if (Recording()) { return 0; } audio_device_buffer_.StartRecording(); int32_t result = audio_device_->StartRecording(); RTC_LOG(INFO) << "output: " << result; RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StartRecordingSuccess", static_cast<int>(result == 0)); return result; } int32_t AudioDeviceModuleImpl::StopRecording() { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized_(); int32_t result = audio_device_->StopRecording(); audio_device_buffer_.StopRecording(); RTC_LOG(INFO) << "output: " << result; RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.StopRecordingSuccess", static_cast<int>(result == 0)); return result; } bool AudioDeviceModuleImpl::Recording() const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized__BOOL(); return audio_device_->Recording(); } int32_t AudioDeviceModuleImpl::RegisterAudioCallback( AudioTransport* audioCallback) { RTC_LOG(INFO) << __FUNCTION__; return audio_device_buffer_.RegisterAudioCallback(audioCallback); } int32_t AudioDeviceModuleImpl::PlayoutDelay(uint16_t* delayMS) const { CHECKinitialized_(); uint16_t delay = 0; if (audio_device_->PlayoutDelay(delay) == -1) { RTC_LOG(LERROR) << "failed to retrieve the playout delay"; return -1; } *delayMS = delay; return 0; } bool AudioDeviceModuleImpl::BuiltInAECIsAvailable() const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized__BOOL(); bool isAvailable = audio_device_->BuiltInAECIsAvailable(); RTC_LOG(INFO) << "output: " << isAvailable; return isAvailable; } int32_t AudioDeviceModuleImpl::EnableBuiltInAEC(bool enable) { RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")"; CHECKinitialized_(); int32_t ok = audio_device_->EnableBuiltInAEC(enable); RTC_LOG(INFO) << "output: " << ok; return ok; } bool AudioDeviceModuleImpl::BuiltInAGCIsAvailable() const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized__BOOL(); bool isAvailable = audio_device_->BuiltInAGCIsAvailable(); RTC_LOG(INFO) << "output: " << isAvailable; return isAvailable; } int32_t AudioDeviceModuleImpl::EnableBuiltInAGC(bool enable) { RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")"; CHECKinitialized_(); int32_t ok = audio_device_->EnableBuiltInAGC(enable); RTC_LOG(INFO) << "output: " << ok; return ok; } bool AudioDeviceModuleImpl::BuiltInNSIsAvailable() const { RTC_LOG(INFO) << __FUNCTION__; CHECKinitialized__BOOL(); bool isAvailable = audio_device_->BuiltInNSIsAvailable(); RTC_LOG(INFO) << "output: " << isAvailable; return isAvailable; } int32_t AudioDeviceModuleImpl::EnableBuiltInNS(bool enable) { RTC_LOG(INFO) << __FUNCTION__ << "(" << enable << ")"; CHECKinitialized_(); int32_t ok = audio_device_->EnableBuiltInNS(enable); RTC_LOG(INFO) << "output: " << ok; return ok; } #if defined(WEBRTC_IOS) int AudioDeviceModuleImpl::GetPlayoutAudioParameters( AudioParameters* params) const { RTC_LOG(INFO) << __FUNCTION__; int r = audio_device_->GetPlayoutAudioParameters(params); RTC_LOG(INFO) << "output: " << r; return r; } int AudioDeviceModuleImpl::GetRecordAudioParameters( AudioParameters* params) const { RTC_LOG(INFO) << __FUNCTION__; int r = audio_device_->GetRecordAudioParameters(params); RTC_LOG(INFO) << "output: " << r; return r; } #endif // WEBRTC_IOS AudioDeviceModuleImpl::PlatformType AudioDeviceModuleImpl::Platform() const { RTC_LOG(INFO) << __FUNCTION__; return platform_type_; } AudioDeviceModule::AudioLayer AudioDeviceModuleImpl::PlatformAudioLayer() const { RTC_LOG(INFO) << __FUNCTION__; return audio_layer_; } } // namespace webrtc
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "Sample.h" #include "SkBlurMask.h" #include "SkCanvas.h" #include "SkGradientShader.h" #include "SkGraphics.h" #include "SkMaskFilter.h" #include "SkPath.h" #include "SkRandom.h" #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" #include "SkTypeface.h" #include "SkOSFile.h" #include "SkStream.h" class TextAlphaView : public Sample { public: TextAlphaView() { fByte = 0xFF; } protected: bool onQuery(Sample::Event* evt) override { if (Sample::TitleQ(*evt)) { Sample::TitleR(evt, "TextAlpha"); return true; } return this->INHERITED::onQuery(evt); } void onDrawContent(SkCanvas* canvas) override { const char* str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; SkPaint paint; SkScalar x = SkIntToScalar(10); SkScalar y = SkIntToScalar(20); paint.setFlags(0x105); paint.setARGB(fByte, 0xFF, 0xFF, 0xFF); paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, SkBlurMask::ConvertRadiusToSigma(3))); SkRandom rand; for (int ps = 6; ps <= 35; ps++) { paint.setColor(rand.nextU() | (0xFF << 24)); paint.setTextSize(SkIntToScalar(ps)); paint.setTextSize(SkIntToScalar(24)); canvas->drawString(str, x, y, paint); y += paint.getFontMetrics(nullptr); } } Sample::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) override { return new Click(this); } bool onClick(Click* click) override { int y = click->fICurr.fY; if (y < 0) { y = 0; } else if (y > 255) { y = 255; } fByte = y; return true; } private: int fByte; typedef Sample INHERITED; }; ////////////////////////////////////////////////////////////////////////////// DEF_SAMPLE( return new TextAlphaView(); )
/** * PANDA 3D SOFTWARE * Copyright (c) Carnegie Mellon University. All rights reserved. * * All use of this software is subject to the terms of the revised BSD * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * * @file doubleBitMask.cxx * @author drose * @date 2000-06-08 */ #include "doubleBitMask.h" template class DoubleBitMask<BitMaskNative>; template class DoubleBitMask<DoubleBitMaskNative>; #if !defined(CPPPARSER) && !defined(__APPLE__) #include <type_traits> static_assert(std::is_literal_type<DoubleBitMaskNative>::value, "DoubleBitMaskNative is not a literal type"); static_assert(std::is_literal_type<QuadBitMaskNative>::value, "QuadBitMaskNative is not a literal type"); #endif
/** * Demo program for mat exercise. * * Author: Tal Zichlinsky * Since : 2022-01 */ #include "mat.hpp" #include <iostream> #include <stdexcept> using namespace std; int main() { cout << ariel::mat(9, 7, '@', '-') << endl; /* Should print: @@@@@@@@@ @-------@ @-@@@@@-@ @-@---@-@ @-@@@@@-@ @-------@ @@@@@@@@@ */ cout << ariel::mat(13, 5, '@', '-') << endl; /* Should print: @@@@@@@@@@@@@ @-----------@ @-@@@@@@@@@-@ @-----------@ @@@@@@@@@@@@@ */ try { cout << ariel::mat(10, 5, '$', '%') << endl; // Exception - not a valid code } catch (exception& ex) { cout << " caught exception: " << ex.what() << endl; // should print "Mat size is always odd" } }
//----------------------------------------------------------------------------- // // ApplicationStatus.cpp // // Implementation of the Z-Wave COMMAND_CLASS_APPLICATION_STATUS // // Copyright (c) 2010 Mal Lansell <openzwave@lansell.org> // // SOFTWARE NOTICE AND LICENSE // // This file is part of OpenZWave. // // OpenZWave is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published // by the Free Software Foundation, either version 3 of the License, // or (at your option) any later version. // // OpenZWave is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with OpenZWave. If not, see <http://www.gnu.org/licenses/>. // //----------------------------------------------------------------------------- #include "command_classes/CommandClasses.h" #include "command_classes/ApplicationStatus.h" #include "Defs.h" #include "Msg.h" #include "Driver.h" #include "platform/Log.h" using namespace OpenZWave; enum ApplicationStatusCmd { ApplicationStatusCmd_Busy = 0x01, ApplicationStatusCmd_RejectedRequest = 0x02 }; //----------------------------------------------------------------------------- // <ApplicationStatus::HandleMsg> // Handle a message from the Z-Wave network //----------------------------------------------------------------------------- bool ApplicationStatus::HandleMsg ( uint8 const* _data, uint32 const _length, uint32 const _instance // = 1 ) { if( ApplicationStatusCmd_Busy == (ApplicationStatusCmd)_data[0] ) { char msg[64]; switch( _data[1] ) { case 0: { snprintf( msg, sizeof(msg), "Try again later" ); break; } case 1: { snprintf( msg, sizeof(msg), "Try again in %d seconds", _data[2] ); break; } case 2: { snprintf( msg, sizeof(msg), "Request queued, will be executed later" ); break; } default: { // Invalid status snprintf( msg, sizeof(msg), "Unknown status %d", _data[1] ); } } Log::Write( LogLevel_Info, GetNodeId(), "Received Application Status Busy: %s", msg ); return true; } if( ApplicationStatusCmd_RejectedRequest == (ApplicationStatusCmd)_data[0] ) { Log::Write( LogLevel_Info, "Received Application Rejected Request: Status=%d", _data[1] ); return true; } return false; }
#include <iostream> #include <type_traits> #include<memory> #include<string> #include<vector> struct MovableType { MovableType() { int i = 1; } MovableType(MovableType &&) { int i = 1; } MovableType& operator =(MovableType &&) { int i = 1; } }; struct CopyType { CopyType() { int i = 1; } CopyType(const CopyType &) { int i = 1; } CopyType& operator =(const CopyType &) { int i = 1; } int m_i{ 0 }; }; struct CopyMType { CopyMType() { int i = 1; } CopyMType(const CopyMType &) { int i = 1; } CopyMType& operator =(const CopyMType &) { int i = 1; } CopyMType(CopyMType &&) { int i = 1; } CopyMType& operator =(CopyMType &&) { int i = 1; } }; struct Widget { MovableType m_m; CopyType m_c; CopyMType m_cm; }; int main(int argc, char* argv[]) { Widget w1; Widget w2(std::move(w1)); // Will move MovableType and CopyMType. Will copy CopyType; //Widget w3(w2); // error cannot move CopyType return 0; }
//Added by Deriscope #ifndef quantlib_oiswapds_hpp #define quantlib_oiswapds_hpp #include <ql/instruments/swap.hpp> #include <ql/time/daycounter.hpp> #include <ql/time/businessdayconvention.hpp> #include <ql/time/calendar.hpp> #include <ql/time/schedule.hpp> #include <ql/indexes/oiswapindexds.hpp> namespace QuantLib { class Schedule; class OvernightIndex; //It broadens the original OvernightIndexedSwap. Not possible to inherit from OvernightIndexedSwap because the latter's contructor involves initialize(schedule) which sets the types of coupons //It represents a generic OIS where the overnight index is either compounded or averaged over each overnight leg period class OiSwapDS : public Swap { public: enum Type { Receiver = -1, Payer = 1 }; OiSwapDS( //both legs Type type, const std::vector<Real>& nominals, //fixed leg const Schedule& fxdSchedule, const std::vector<Real>& fxdRates, Natural fxdPmtLag, enum BusinessDayConvention fxdPmtAdj, const Calendar& fxdPmtCal, const DayCounter& fxdPmtDC, //on leg const Schedule& onSchedule, const ext::shared_ptr<OvernightIndex>& index, std::vector<Real> gearings, const std::vector<Spread>& spreads, Natural onPmtLag, enum BusinessDayConvention onPmtAdj, const Calendar& onPmtCal, const DayCounter& onPmtDC, //special on flags Natural rateCutoff, OiSwapIndexDS::TypeOI typeOI, OiSwapIndexDS::ApproxOI approxOI); OiSwapDS( //both legs Type type, Real nominal, const Schedule& schedule, //fixed leg Rate fxdRate, //on leg const ext::shared_ptr<OvernightIndex>& index, Spread spread, //both legs Natural pmtLag, enum BusinessDayConvention pmtAdj, const Calendar& pmtCal, const DayCounter& pmtDC, //special on flags Natural rateCutoff, OiSwapIndexDS::TypeOI typeOI, OiSwapIndexDS::ApproxOI approxOI); //name Inspectors //both legs Type const type() const { return type_; } std::vector<Real> const & nominals() const { return nominals_; } Real nominal() const { QL_REQUIRE(flat_nominals_, "no single nominal"); return nominals_[0]; } //fixed leg std::vector<Real> const & fxdRates() const { return fxdRates_; } Real const fxdRate() const { QL_REQUIRE(flat_fxdRates_, "no single fixed rate"); return fxdRates_[0]; } Schedule const & fxdSchedule() const { return fxdSchedule_; } Natural const fxdPmtLag() const { return fxdPmtLag_; } BusinessDayConvention const fxdPmtAdj() const { return fxdPmtAdj_; } Calendar const & fxdPmtCal() const { return fxdPmtCal_; } DayCounter const & fxdPmtDC() const { return fxdPmtDC_; } bool const hasFlatFxdRate() const { return flat_fxdRates_; } //on leg ext::shared_ptr<OvernightIndex> const & index() const { return index_; } std::vector<Real> const & gearings() const { return gearings_; } Real gearing() const { QL_REQUIRE(flat_gearings_, "no single gearing"); return gearings_[0]; } std::vector<Spread> const & spreads() const { return spreads_; } Spread spread() const { QL_REQUIRE(flat_spreads_, "no single spread"); return spreads_[0]; } Schedule const & onSchedule() const { return onSchedule_; } Natural const onPmtLag() const { return onPmtLag_; } BusinessDayConvention const onPmtAdj() const { return onPmtAdj_; } Calendar const & onPmtCal() const { return onPmtCal_; } DayCounter const & onPmtDC() const { return onPmtDC_; } //special on flags const Natural rateCutoff() const { return rateCutoff_; } OiSwapIndexDS::TypeOI typeOI() const { return typeOI_; } OiSwapIndexDS::ApproxOI approxOI() const { return approxOI_; } bool const hasFlatSpread() const { return flat_spreads_; } //legs const Leg& fixedLeg() const { return legs_[0]; } const Leg& overnightLeg() const { return legs_[1]; } //name Results Real fixedLegBPS() const; Real fixedLegNPV() const; Real fairRate() const;//throws if flat_fxdRates_ == false Real overnightLegBPS() const; Real overnightLegNPV() const; Spread fairSpread() const;//throws if flat_spreads_ == false private: void initialize(); //both legs Type type_; std::vector<Real> nominals_; bool flat_nominals_; //fixed leg std::vector<Real> fxdRates_; bool flat_fxdRates_; Schedule fxdSchedule_; Natural fxdPmtLag_; BusinessDayConvention fxdPmtAdj_; Calendar fxdPmtCal_; DayCounter fxdPmtDC_; //on leg ext::shared_ptr<OvernightIndex> index_; std::vector<Real> gearings_; bool flat_gearings_; std::vector<Spread> spreads_; bool flat_spreads_; Schedule onSchedule_; Natural onPmtLag_; BusinessDayConvention onPmtAdj_; Calendar onPmtCal_; DayCounter onPmtDC_; //special on flags Natural rateCutoff_; OiSwapIndexDS::TypeOI typeOI_; OiSwapIndexDS::ApproxOI approxOI_; }; } #endif
/*! * @copyright * Copyright (c) 2015-2019 Intel Corporation * * @copyright * 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 * * @copyright * http://www.apache.org/licenses/LICENSE-2.0 * * @copyright * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #pragma once #include "psme/rest/endpoints/endpoint_base.hpp" namespace psme { namespace rest { namespace endpoint { /*! * A class representing the rest api EthernetSwitchPort endpoint */ class EthernetSwitchPort : public EndpointBase { public: /*! * @brief The constructor for EthernetSwitchPort class */ explicit EthernetSwitchPort(const std::string& path); /*! * @brief EthernetSwitchPort class destructor */ virtual ~EthernetSwitchPort(); void get(const server::Request& request, server::Response& response) override; void del(const server::Request& request, server::Response& response) override; void patch(const server::Request& request, server::Response& response) override; }; } } }
// // Project Name: KratosPfemFluidApplication $ // Created by: $Author: AFranci $ // Last modified by: $Co-Author: $ // Date: $Date: September 2016 $ // Revision: $Revision: 0.0 $ // // #if !defined(KRATOS_MODEL_START_END_MESHING_WITH_CONDITIONS_FOR_FLUIDS_PROCESS_H_INCLUDED ) #define KRATOS_MODEL_START_END_MESHING_WITH_CONDITIONS_FOR_FLUIDS_PROCESS_H_INCLUDED // System includes // External includes // Project includes #include "custom_processes/settle_model_structure_process.hpp" ///VARIABLES used: //Data: //StepData: //Flags: (checked) // (set) // (modified) // (reset) namespace Kratos { ///@name Kratos Globals ///@{ ///@} ///@name Type Definitions ///@{ typedef ModelPart::ConditionType ConditionType; typedef ModelPart::NodesContainerType NodesContainerType; typedef ModelPart::ElementsContainerType ElementsContainerType; typedef ModelPart::ConditionsContainerType ConditionsContainerType; typedef ModelPart::MeshType::GeometryType::PointsArrayType PointsArrayType; typedef PointerVectorSet<ConditionType, IndexedObject> ConditionsContainerType; typedef ConditionsContainerType::iterator ConditionIterator; typedef ConditionsContainerType::const_iterator ConditionConstantIterator; ///@} ///@name Enum's ///@{ ///@} ///@name Functions ///@{ ///@} ///@name Kratos Classes ///@{ /// Short class definition. /** Detail class definition. */ class ModelStartEndMeshingWithConditionsForFluidsProcess : public SettleModelStructureProcess { public: ///@name Type Definitions ///@{ /// Pointer definition of ModelStartEndMeshingWithConditionsForFluidsProcess KRATOS_CLASS_POINTER_DEFINITION( ModelStartEndMeshingWithConditionsForFluidsProcess ); ///@} ///@name Life Cycle ///@{ /// Default constructor. ModelStartEndMeshingWithConditionsForFluidsProcess(ModelPart& rMainModelPart, Flags Options, int EchoLevel = 0) :SettleModelStructureProcess(rMainModelPart,Options,EchoLevel) { } /// Destructor. virtual ~ModelStartEndMeshingWithConditionsForFluidsProcess() { } void operator()() { Execute(); } ///@} ///@name Operations ///@{ void Execute() override { }; void ExecuteFinalize() override { KRATOS_TRY // Restore meshes coherency this->BuildModelPartStructure(); // Perform searches for next processes (i.e. contact search) this->PerformModelSearches(); KRATOS_CATCH(" ") } ///@} ///@name Operators ///@{ ///@} ///@name Access ///@{ ///@} ///@name Inquiry ///@{ ///@} ///@name Input and output ///@{ /// Turn back information as a string. std::string Info() const override { return "ModelStartEndMeshingWithConditionsForFluidsProcess"; } /// Print information about this object. void PrintInfo(std::ostream& rOStream) const override { rOStream << "ModelStartEndMeshingWithConditionsForFluidsProcess"; } protected: ///@name Protected static Member Variables ///@{ ///@} ///@name Protected member Variables ///@{ //******************************************************************************************* //******************************************************************************************* void BuildTotalModelPart(ModelPart& rModelPart, int EchoLevel) override { KRATOS_TRY //Mesh Id=0 if( EchoLevel > 1 ) std::cout<<" [ START MODEL PART ["<<rModelPart.Name()<<"] [Elems=:"<<rModelPart.NumberOfElements()<<"|Nodes="<<rModelPart.NumberOfNodes()<<"|Conds="<<rModelPart.NumberOfConditions()<<"] ] "<<std::endl; rModelPart.Nodes().clear(); rModelPart.Elements().clear(); //contact conditions are located on Mesh_0 ModelPart::ConditionsContainerType PreservedConditions; unsigned int nodeId=1; unsigned int elemId=1; unsigned int condId=1; for(ModelPart::SubModelPartIterator i_mp= rModelPart.SubModelPartsBegin() ; i_mp!=rModelPart.SubModelPartsEnd(); i_mp++) { // if( (i_mp->Is(SOLID) && i_mp->IsNot(ACTIVE)) || (i_mp->Is(BOUNDARY) && i_mp->Is(RIGID)) ){ //only the solid domains (no computing) and the rigid body domains (rigid) if( (i_mp->Is(SOLID) && i_mp->IsNot(ACTIVE)) || (i_mp->Is(FLUID) && i_mp->IsNot(ACTIVE)) || (i_mp->Is(BOUNDARY) && i_mp->Is(RIGID)) ){ //only the solid domains (no computing) and the rigid body domains (rigid) if( EchoLevel > 1 ) std::cout<<" [ SUBMODEL PART ["<<i_mp->Name()<<"] [Elems="<<i_mp->NumberOfElements()<<"|Nodes="<<i_mp->NumberOfNodes()<<"|Conds="<<i_mp->NumberOfConditions()<<"] ] "<<std::endl; //Clean Nodes when redefining the main model part: const array_1d<double,3> ZeroNormal(3,0.0); ModelPart::NodesContainerType temporal_nodes; temporal_nodes.reserve(i_mp->Nodes().size()); temporal_nodes.swap(i_mp->Nodes()); if( !i_mp->NumberOfElements() ){ for(ModelPart::NodesContainerType::iterator i_node = temporal_nodes.begin() ; i_node != temporal_nodes.end() ; i_node++) { if( i_node->IsNot(TO_ERASE) ){ (i_mp->Nodes()).push_back(*(i_node.base())); (rModelPart.Nodes()).push_back(*(i_node.base())); rModelPart.Nodes().back().SetId(nodeId); nodeId+=1; } } } else{ for(ModelPart::ElementsContainerType::iterator i_elem = i_mp->ElementsBegin() ; i_elem != i_mp->ElementsEnd() ; i_elem++) { if( i_elem->IsNot(TO_ERASE) ){ PointsArrayType& vertices=i_elem->GetGeometry().Points(); for(unsigned int i=0; i<vertices.size(); i++) { vertices[i].Set(BLOCKED); if(i_mp->Is(FLUID)) { vertices[i].Set(FLUID); } } (rModelPart.Elements()).push_back(*(i_elem.base())); rModelPart.Elements().back().SetId(elemId); elemId+=1; } } for(ModelPart::NodesContainerType::iterator i_node = temporal_nodes.begin() ; i_node != temporal_nodes.end() ; i_node++) { //i_node->PrintInfo(std::cout); //std::cout<<std::endl; if(i_node->Is(BLOCKED) || i_node->Is(RIGID)) { if( i_node->Is(RIGID) && i_node->IsNot(BLOCKED)) { // double pressureRigid=i_node->FastGetSolutionStepValue(PRESSURE); i_node->FastGetSolutionStepValue(PRESSURE) = 0; if(i_mp->Is(FLUID)) { i_node->Reset(FLUID); //reset isolated } // std::cout<<" fluid 1. SET PRESSURE 0 TO ISOLATED NODE ("<<nodeId<<") its pressure was "<<pressureRigid<<std::endl; } i_node->Reset(ISOLATED); //reset isolated i_node->Reset(NEW_ENTITY); //reset if was new i_node->Reset(TO_REFINE); //reset if was labeled to refine (to not duplicate boundary conditions) i_node->Reset(BLOCKED); if( i_node->IsNot(TO_ERASE) ){ (i_mp->Nodes()).push_back(*(i_node.base())); (rModelPart.Nodes()).push_back(*(i_node.base())); rModelPart.Nodes().back().SetId(nodeId); nodeId+=1; } } else{ i_node->Set(ISOLATED); i_node->Reset(BOUNDARY); i_node->Reset(NEW_ENTITY); //reset if was new i_node->Reset(TO_REFINE); //reset if was labeled to refine (to not duplicate boundary conditions) i_node->Reset(BLOCKED); if( mOptions.Is(MesherUtilities::KEEP_ISOLATED_NODES) && i_node->IsNot(TO_ERASE) ){ i_node->FastGetSolutionStepValue(PRESSURE) = 0; (i_mp->Nodes()).push_back(*(i_node.base())); (rModelPart.Nodes()).push_back(*(i_node.base())); rModelPart.Nodes().back().SetId(nodeId); nodeId+=1; } } if(i_node->IsNot(BOUNDARY)){ if( i_node->SolutionStepsDataHas(CONTACT_FORCE) ) noalias(i_node->GetSolutionStepValue(CONTACT_FORCE)) = ZeroNormal; } } } for(ModelPart::ConditionsContainerType::iterator i_cond = i_mp->ConditionsBegin() ; i_cond != i_mp->ConditionsEnd() ; i_cond++) { if( i_cond->IsNot(TO_ERASE) ){ i_cond->Reset(NEW_ENTITY); //reset here if the condition is inserted PreservedConditions.push_back(*(i_cond.base())); PreservedConditions.back().SetId(condId); condId+=1; Geometry< Node<3> >& rGeometry = i_cond->GetGeometry(); unsigned int NumNodes=rGeometry.size(); unsigned int freeSurfaceNodes=0; unsigned int rigidNodes=0; for (unsigned int n = 0; n < NumNodes; ++n) { if(rGeometry[n].Is(RIGID) || rGeometry[n].Is(SOLID)){ // std::cout<<"rigid node! "<<rGeometry[n].X()<<" "<<rGeometry[n].Y()<<std::endl; rigidNodes++; }else { freeSurfaceNodes++; } } if((freeSurfaceNodes>0 && rigidNodes>0) || rigidNodes==0){ for (unsigned int n = 0; n < NumNodes; ++n) { rGeometry[n].Set(FREE_SURFACE); } } } } } } this->BuildBoundaryModelParts(rModelPart,PreservedConditions, nodeId, elemId, condId); for(ModelPart::SubModelPartIterator i_mp= rModelPart.SubModelPartsBegin() ; i_mp!=rModelPart.SubModelPartsEnd(); i_mp++) { if( i_mp->Is(BOUNDARY) ){ //boundary model part for(ModelPart::ConditionsContainerType::iterator i_cond = i_mp->ConditionsBegin() ; i_cond != i_mp->ConditionsEnd() ; i_cond++) { if( i_cond->IsNot(TO_ERASE) ){ i_cond->Reset(NEW_ENTITY); //reset here if the condition is inserted PreservedConditions.push_back(*(i_cond.base())); PreservedConditions.back().SetId(condId); condId+=1; } } } } for(ModelPart::ConditionsContainerType::iterator i_cond = rModelPart.ConditionsBegin(); i_cond!= rModelPart.ConditionsEnd(); i_cond++) { if(i_cond->Is(CONTACT)){ PreservedConditions.push_back(*(i_cond.base())); PreservedConditions.back().SetId(condId); condId+=1; } } rModelPart.Conditions().swap(PreservedConditions); //Sort rModelPart.Nodes().Sort(); rModelPart.Elements().Sort(); rModelPart.Conditions().Sort(); //Unique rModelPart.Nodes().Unique(); rModelPart.Elements().Unique(); rModelPart.Conditions().Unique(); //Sort Again to have coherent numeration for nodes (mesh with shared nodes) unsigned int consecutive_index = 1; for(ModelPart::NodesContainerType::iterator in = rModelPart.NodesBegin() ; in != rModelPart.NodesEnd() ; in++) in->SetId(consecutive_index++); this->BuildComputingDomain(rModelPart, EchoLevel); if( EchoLevel > 1 ) std::cout<<" [ END MODEL PART ["<<rModelPart.Name()<<"] [Elems=:"<<rModelPart.NumberOfElements()<<"|Nodes="<<rModelPart.NumberOfNodes()<<"|Conds="<<rModelPart.NumberOfConditions()<<"] ] "<<std::endl; KRATOS_CATCH(" ") } //******************************************************************************************* //******************************************************************************************* void BuildComputingDomain (ModelPart& rModelPart, int EchoLevel) override { KRATOS_TRY std::string ComputingModelPartName; for(ModelPart::SubModelPartIterator i_mp= rModelPart.SubModelPartsBegin() ; i_mp!=rModelPart.SubModelPartsEnd(); i_mp++) { // if( (i_mp->Is(ACTIVE) && i_mp->Is(SOLID)) ){ //solid_computing_domain if( (i_mp->Is(ACTIVE) && i_mp->Is(SOLID)) || (i_mp->Is(ACTIVE) && i_mp->Is(FLUID)) ){ // solid_computing_domain and fluid_computing_domain ComputingModelPartName = i_mp->Name(); } } ModelPart& rComputingModelPart = rModelPart.GetSubModelPart(ComputingModelPartName); rComputingModelPart.Nodes().clear(); rComputingModelPart.Elements().clear(); rComputingModelPart.Conditions().clear(); for(ModelPart::SubModelPartIterator i_mp= rModelPart.SubModelPartsBegin() ; i_mp!=rModelPart.SubModelPartsEnd(); i_mp++) { // if( (i_mp->Is(SOLID) && i_mp->IsNot(ACTIVE)) || (i_mp->Is(BOUNDARY) && i_mp->Is(RIGID)) ){ if( ((i_mp->Is(ACTIVE) && i_mp->Is(SOLID)) || (i_mp->Is(BOUNDARY) && i_mp->Is(RIGID))) || (i_mp->Is(FLUID) && i_mp->IsNot(ACTIVE)) ){ for(ModelPart::NodesContainerType::iterator i_node = i_mp->NodesBegin() ; i_node != i_mp->NodesEnd() ; i_node++) { rComputingModelPart.Nodes().push_back(*(i_node.base())); // rComputingModelPart.AddNode(*(i_node.base())); // very slow! } for(ModelPart::ConditionsContainerType::iterator i_cond = i_mp->ConditionsBegin() ; i_cond != i_mp->ConditionsEnd() ; i_cond++) { rComputingModelPart.AddCondition(*(i_cond.base())); } for(ModelPart::ElementsContainerType::iterator i_elem = i_mp->ElementsBegin() ; i_elem != i_mp->ElementsEnd() ; i_elem++) { rComputingModelPart.AddElement(*(i_elem.base())); } } } //Sort rComputingModelPart.Nodes().Sort(); rComputingModelPart.Elements().Sort(); rComputingModelPart.Conditions().Sort(); //Unique rComputingModelPart.Nodes().Unique(); rComputingModelPart.Elements().Unique(); rComputingModelPart.Conditions().Unique(); if( EchoLevel > 1 ) std::cout<<" [ SUBMODEL PART ["<<rComputingModelPart.Name()<<"] [Elems="<<rComputingModelPart.NumberOfElements()<<"|Nodes="<<rComputingModelPart.NumberOfNodes()<<"|Conds="<<rComputingModelPart.NumberOfConditions()<<"] ] "<<std::endl; KRATOS_CATCH(" ") } void PerformModelSearches() override { KRATOS_TRY //NODAL NEIGHBOURS SEARCH NodalNeighboursSearchProcess FindNeighbours(mrMainModelPart); FindNeighbours.Execute(); //BOUNDARY NORMALS SEARCH and SHRINKAGE FACTOR BoundaryNormalsCalculationUtilities BoundaryComputation; BoundaryComputation.CalculateWeightedBoundaryNormals(mrMainModelPart, mEchoLevel); KRATOS_CATCH(" ") } //******************************************************************************************* //******************************************************************************************* ///@} ///@name Protected Access ///@{ ///@} ///@name Protected Inquiry ///@{ ///@} ///@name Protected LifeCycle ///@{ ///@} private: ///@name Static Member Variables ///@{ ///@} ///@name Member Variables ///@{ ///@} ///@name Private Operators ///@{ ///@} ///@name Private Operations ///@{ ///@} ///@name Private Access ///@{ ///@} ///@name Private Inquiry ///@{ ///@} ///@name Un accessible methods ///@{ /// Assignment operator. ModelStartEndMeshingWithConditionsForFluidsProcess& operator=(ModelStartEndMeshingWithConditionsForFluidsProcess const& rOther); /// Copy constructor. //ModelStartEndMeshingWithConditionsForFluidsProcess(ModelStartEndMeshingWithConditionsForFluidsProcess const& rOther); ///@} }; // Class ModelStartEndMeshingWithConditionsForFluidsProcess ///@} ///@name Type Definitions ///@{ ///@} ///@name Input and output ///@{ /// input stream function inline std::istream& operator >> (std::istream& rIStream, ModelStartEndMeshingWithConditionsForFluidsProcess& rThis); /// output stream function inline std::ostream& operator << (std::ostream& rOStream, const ModelStartEndMeshingWithConditionsForFluidsProcess& rThis) { rThis.PrintInfo(rOStream); rOStream << std::endl; rThis.PrintData(rOStream); return rOStream; } ///@} } // namespace Kratos. #endif // KRATOS_MODEL_START_END_MESHING_WITH_CONDITIONS_FOR_FLUIDS_PROCESS_H_INCLUDED defined
/** * 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. **/ #include "relational_operators/BuildAggregationExistenceMapOperator.hpp" #include <memory> #include <vector> #include "catalog/CatalogAttribute.hpp" #include "catalog/CatalogRelationSchema.hpp" #include "catalog/CatalogTypedefs.hpp" #include "query_execution/QueryContext.hpp" #include "query_execution/WorkOrderProtosContainer.hpp" #include "query_execution/WorkOrdersContainer.hpp" #include "relational_operators/WorkOrder.pb.h" #include "storage/AggregationOperationState.hpp" #include "storage/CollisionFreeVectorTable.hpp" #include "storage/StorageBlock.hpp" #include "storage/StorageBlockInfo.hpp" #include "storage/StorageManager.hpp" #include "storage/TupleStorageSubBlock.hpp" #include "storage/ValueAccessor.hpp" #include "storage/ValueAccessorUtil.hpp" #include "types/Type.hpp" #include "types/TypeID.hpp" #include "utility/BarrieredReadWriteConcurrentBitVector.hpp" #include "glog/logging.h" #include "tmb/id_typedefs.h" namespace quickstep { namespace { template <typename CppType, bool is_attr_nullable> void ExecuteBuild(const attribute_id attr_id, ValueAccessor *accessor, BarrieredReadWriteConcurrentBitVector *existence_map) { InvokeOnAnyValueAccessor( accessor, [&](auto *accessor) -> void { // NOLINT(build/c++11) accessor->beginIteration(); while (accessor->next()) { const void *value = accessor->template getUntypedValue<is_attr_nullable>(attr_id); if (!is_attr_nullable || value != nullptr) { existence_map->setBit(*reinterpret_cast<const CppType *>(value)); } } }); } // Dispatch helper. template <typename CppType> void ExecuteHelper(const attribute_id attr_id, const bool is_attr_nullable, ValueAccessor *accessor, BarrieredReadWriteConcurrentBitVector *existence_map) { if (is_attr_nullable) { ExecuteBuild<CppType, true>(attr_id, accessor, existence_map); } else { ExecuteBuild<CppType, false>(attr_id, accessor, existence_map); } } } // namespace bool BuildAggregationExistenceMapOperator::getAllWorkOrders( WorkOrdersContainer *container, QueryContext *query_context, StorageManager *storage_manager, const tmb::client_id scheduler_client_id, tmb::MessageBus *bus) { if (input_relation_is_stored_) { if (!started_) { for (const block_id input_block_id : input_relation_block_ids_) { container->addNormalWorkOrder( new BuildAggregationExistenceMapWorkOrder( query_id_, input_relation_, input_block_id, build_attribute_, query_context->getAggregationState(aggr_state_index_), storage_manager), op_index_); } started_ = true; } return true; } else { while (num_workorders_generated_ < input_relation_block_ids_.size()) { container->addNormalWorkOrder( new BuildAggregationExistenceMapWorkOrder( query_id_, input_relation_, input_relation_block_ids_[num_workorders_generated_], build_attribute_, query_context->getAggregationState(aggr_state_index_), storage_manager), op_index_); ++num_workorders_generated_; } return done_feeding_input_relation_; } } bool BuildAggregationExistenceMapOperator ::getAllWorkOrderProtos(WorkOrderProtosContainer *container) { if (input_relation_is_stored_) { if (!started_) { for (const block_id block : input_relation_block_ids_) { container->addWorkOrderProto(createWorkOrderProto(block), op_index_); } started_ = true; } return true; } else { while (num_workorders_generated_ < input_relation_block_ids_.size()) { container->addWorkOrderProto( createWorkOrderProto(input_relation_block_ids_[num_workorders_generated_]), op_index_); ++num_workorders_generated_; } return done_feeding_input_relation_; } } serialization::WorkOrder* BuildAggregationExistenceMapOperator ::createWorkOrderProto(const block_id block) { serialization::WorkOrder *proto = new serialization::WorkOrder; proto->set_work_order_type(serialization::BUILD_AGGREGATION_EXISTENCE_MAP); proto->set_query_id(query_id_); proto->SetExtension(serialization::BuildAggregationExistenceMapWorkOrder::relation_id, input_relation_.getID()); proto->SetExtension(serialization::BuildAggregationExistenceMapWorkOrder::build_block_id, block); proto->SetExtension(serialization::BuildAggregationExistenceMapWorkOrder::build_attribute, build_attribute_); proto->SetExtension(serialization::BuildAggregationExistenceMapWorkOrder::aggr_state_index, aggr_state_index_); return proto; } void BuildAggregationExistenceMapWorkOrder::execute() { BlockReference block( storage_manager_->getBlock(build_block_id_, input_relation_)); std::unique_ptr<ValueAccessor> accessor( block->getTupleStorageSubBlock().createValueAccessor()); CollisionFreeVectorTable *aggregate_table = state_->getCollisionFreeVectorTable(); DCHECK(aggregate_table != nullptr); BarrieredReadWriteConcurrentBitVector *existence_map = aggregate_table->getExistenceMap(); const Type &attr_type = input_relation_.getAttributeById(build_attribute_)->getType(); switch (attr_type.getTypeID()) { case TypeID::kInt: ExecuteHelper<int>(build_attribute_, attr_type.isNullable(), accessor.get(), existence_map); return; case TypeID::kLong: ExecuteHelper<std::int64_t>(build_attribute_, attr_type.isNullable(), accessor.get(), existence_map); return; default: LOG(FATAL) << "Build attribute type not supported by " << "BuildAggregationExistenceMapOperator: " << attr_type.getName(); } } } // namespace quickstep
//==------ usm_allocator.hpp - SYCL USM Allocator ------*- C++ -*-----------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // ===--------------------------------------------------------------------=== // #pragma once #include <CL/sycl/context.hpp> #include <CL/sycl/device.hpp> #include <CL/sycl/exception.hpp> #include <CL/sycl/queue.hpp> #include <CL/sycl/usm/usm_enums.hpp> #include <cstdlib> #include <memory> __SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declarations. void *aligned_alloc(size_t alignment, size_t size, const device &dev, const context &ctxt, usm::alloc kind); void free(void *ptr, const context &ctxt); template <typename T, usm::alloc AllocKind, size_t Alignment = 0> class usm_allocator { public: using value_type = T; using pointer = T *; using const_pointer = const T *; using reference = T &; using const_reference = const T &; public: template <typename U> struct rebind { typedef usm_allocator<U, AllocKind, Alignment> other; }; usm_allocator() = delete; usm_allocator(const context &Ctxt, const device &Dev) : MContext(Ctxt), MDevice(Dev) {} usm_allocator(const queue &Q) : MContext(Q.get_context()), MDevice(Q.get_device()) {} usm_allocator(const usm_allocator &Other) : MContext(Other.MContext), MDevice(Other.MDevice) {} /// Constructs an object on memory pointed by Ptr. /// /// Note: AllocKind == alloc::device is not allowed. /// /// @param Ptr is a pointer to memory that will be used to construct the /// object. /// @param Val is a value to initialize the newly constructed object. template < usm::alloc AllocT = AllocKind, typename std::enable_if<AllocT != usm::alloc::device, int>::type = 0> void construct(pointer Ptr, const_reference Val) { new (Ptr) value_type(Val); } template < usm::alloc AllocT = AllocKind, typename std::enable_if<AllocT == usm::alloc::device, int>::type = 0> void construct(pointer Ptr, const_reference Val) { throw feature_not_supported( "Device pointers do not support construct on host"); } /// Destroys an object. /// /// Note:: AllocKind == alloc::device is not allowed /// /// @param Ptr is a pointer to memory where the object resides. template < usm::alloc AllocT = AllocKind, typename std::enable_if<AllocT != usm::alloc::device, int>::type = 0> void destroy(pointer Ptr) { Ptr->~value_type(); } template < usm::alloc AllocT = AllocKind, typename std::enable_if<AllocT == usm::alloc::device, int>::type = 0> void destroy(pointer Ptr) { throw feature_not_supported( "Device pointers do not support destroy on host"); } /// Note:: AllocKind == alloc::device is not allowed. /// /// @param Val is a reference to object. /// @return an address of the object referenced by Val. template < usm::alloc AllocT = AllocKind, typename std::enable_if<AllocT != usm::alloc::device, int>::type = 0> pointer address(reference Val) const { return &Val; } template < usm::alloc AllocT = AllocKind, typename std::enable_if<AllocT == usm::alloc::device, int>::type = 0> pointer address(reference Val) const { throw feature_not_supported( "Device pointers do not support address on host"); } template < usm::alloc AllocT = AllocKind, typename std::enable_if<AllocT != usm::alloc::device, int>::type = 0> const_pointer address(const_reference Val) const { return &Val; } template < usm::alloc AllocT = AllocKind, typename std::enable_if<AllocT == usm::alloc::device, int>::type = 0> const_pointer address(const_reference Val) const { throw feature_not_supported( "Device pointers do not support address on host"); } /// Allocates memory. /// /// @param NumberOfElements is a count of elements to allocate memory for. pointer allocate(size_t NumberOfElements) { auto Result = reinterpret_cast<pointer>( aligned_alloc(getAlignment(), NumberOfElements * sizeof(value_type), MDevice, MContext, AllocKind)); if (!Result) { throw memory_allocation_error(); } return Result; } /// Deallocates memory. /// /// @param Ptr is a pointer to memory being deallocated. /// @param Size is a number of elements previously passed to allocate. void deallocate(pointer Ptr, size_t Size) { if (Ptr) { free(Ptr, MContext); } } private: constexpr size_t getAlignment() const { /* // This form might be preferable if the underlying implementation // doesn't do the right thing when given 0 for alignment return ((Alignment == 0) ? alignof(value_type) : Alignment); */ return Alignment; } const context MContext; const device MDevice; }; } // namespace sycl } // __SYCL_INLINE_NAMESPACE(cl)
/******************************************************************************** Copyright (c) 2015, TRACLabs, Inc. 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. ********************************************************************************/ #include <boost/date_time.hpp> #include <boost/math/tools/precision.hpp> #include <cmath> #include <limits> #include <trac_ik/dual_quaternion.h> #include <trac_ik/nlopt_ik.hpp> namespace NLOPT_IK { dual_quaternion targetDQ; double minfunc(const std::vector<double> &x, std::vector<double> &grad, void *data) { // Auxilory function to minimize (Sum of Squared joint angle error // from the requested configuration). Because we wanted a Class // without static members, but NLOpt library does not support // passing methods of Classes, we use these auxilary functions. NLOPT_IK *c = (NLOPT_IK *)data; return c->minJoints(x, grad); } double minfuncDQ(const std::vector<double> &x, std::vector<double> &grad, void *data) { // Auxilory function to minimize (Sum of Squared joint angle error // from the requested configuration). Because we wanted a Class // without static members, but NLOpt library does not support // passing methods of Classes, we use these auxilary functions. NLOPT_IK *c = (NLOPT_IK *)data; std::vector<double> vals(x); double jump = boost::math::tools::epsilon<float>(); double result[1]; c->cartDQError(vals, result); if (!grad.empty()) { double v1[1]; for (uint i = 0; i < x.size(); i++) { double original = vals[i]; vals[i] = original + jump; c->cartDQError(vals, v1); vals[i] = original; grad[i] = (v1[0] - result[0]) / (2 * jump); } } return result[0]; } double minfuncSumSquared(const std::vector<double> &x, std::vector<double> &grad, void *data) { // Auxilory function to minimize (Sum of Squared joint angle error // from the requested configuration). Because we wanted a Class // without static members, but NLOpt library does not support // passing methods of Classes, we use these auxilary functions. NLOPT_IK *c = (NLOPT_IK *)data; std::vector<double> vals(x); double jump = boost::math::tools::epsilon<float>(); double result[1]; c->cartSumSquaredError(vals, result); if (!grad.empty()) { double v1[1]; for (uint i = 0; i < x.size(); i++) { double original = vals[i]; vals[i] = original + jump; c->cartSumSquaredError(vals, v1); vals[i] = original; grad[i] = (v1[0] - result[0]) / (2.0 * jump); } } return result[0]; } double minfuncL2(const std::vector<double> &x, std::vector<double> &grad, void *data) { // Auxilory function to minimize (Sum of Squared joint angle error // from the requested configuration). Because we wanted a Class // without static members, but NLOpt library does not support // passing methods of Classes, we use these auxilary functions. NLOPT_IK *c = (NLOPT_IK *)data; std::vector<double> vals(x); double jump = boost::math::tools::epsilon<float>(); double result[1]; c->cartL2NormError(vals, result); if (!grad.empty()) { double v1[1]; for (uint i = 0; i < x.size(); i++) { double original = vals[i]; vals[i] = original + jump; c->cartL2NormError(vals, v1); vals[i] = original; grad[i] = (v1[0] - result[0]) / (2.0 * jump); } } return result[0]; } void constrainfuncm(uint m, double *result, uint n, const double *x, double *grad, void *data) { //Equality constraint auxilary function for Euclidean distance . //This also uses a small walk to approximate the gradient of the //constraint function at the current joint angles. NLOPT_IK *c = (NLOPT_IK *)data; std::vector<double> vals(n); for (uint i = 0; i < n; i++) { vals[i] = x[i]; } double jump = boost::math::tools::epsilon<float>(); c->cartSumSquaredError(vals, result); if (grad != NULL) { std::vector<double> v1(m); for (uint i = 0; i < n; i++) { double o = vals[i]; vals[i] = o + jump; c->cartSumSquaredError(vals, v1.data()); vals[i] = o; for (uint j = 0; j < m; j++) { grad[j * n + i] = (v1[j] - result[j]) / (2 * jump); } } } } NLOPT_IK::NLOPT_IK(const KDL::Chain &_chain, const KDL::JntArray &_q_min, const KDL::JntArray &_q_max, double _maxtime, double _eps, OptType _type) : chain(_chain), fksolver(chain), maxtime(_maxtime), eps(std::abs(_eps)), TYPE(_type) { assert(chain.getNrOfJoints() == _q_min.data.size()); assert(chain.getNrOfJoints() == _q_max.data.size()); //Constructor for an IK Class. Takes in a Chain to operate on, //the min and max joint limits, an (optional) maximum number of //iterations, and an (optional) desired error. reset(); if (chain.getNrOfJoints() < 2) { std::cout << "WARNING :" << "NLOpt_IK can only be run for chains of length 2 or more"; return; } opt = nlopt::opt(nlopt::LD_SLSQP, _chain.getNrOfJoints()); for (uint i = 0; i < chain.getNrOfJoints(); i++) { lb.push_back(_q_min(i)); ub.push_back(_q_max(i)); } for (uint i = 0; i < chain.segments.size(); i++) { std::string type = chain.segments[i].getJoint().getTypeName(); if (type.find("Rot") != std::string::npos) { if (_q_max(types.size()) >= std::numeric_limits<float>::max() && _q_min(types.size()) <= std::numeric_limits<float>::lowest()) types.push_back(KDL::BasicJointType::Continuous); else types.push_back(KDL::BasicJointType::RotJoint); } else if (type.find("Trans") != std::string::npos) types.push_back(KDL::BasicJointType::TransJoint); } assert(types.size() == lb.size()); std::vector<double> tolerance(1, boost::math::tools::epsilon<float>()); opt.set_xtol_abs(tolerance[0]); switch (TYPE) { case Joint: opt.set_min_objective(minfunc, this); opt.add_equality_mconstraint(constrainfuncm, this, tolerance); break; case DualQuat: opt.set_min_objective(minfuncDQ, this); break; case SumSq: opt.set_min_objective(minfuncSumSquared, this); break; case L2: opt.set_min_objective(minfuncL2, this); break; } } double NLOPT_IK::minJoints(const std::vector<double> &x, std::vector<double> &grad) { // Actual function to compute the error between the current joint // configuration and the desired. The SSE is easy to provide a // closed form gradient for. bool gradient = !grad.empty(); double err = 0; for (uint i = 0; i < x.size(); i++) { err += pow(x[i] - des[i], 2); if (gradient) grad[i] = 2.0 * (x[i] - des[i]); } return err; } void NLOPT_IK::cartSumSquaredError(const std::vector<double> &x, double error[]) { // Actual function to compute Euclidean distance error. This uses // the KDL Forward Kinematics solver to compute the Cartesian pose // of the current joint configuration and compares that to the // desired Cartesian pose for the IK solve. if (aborted || progress != -3) { opt.force_stop(); return; } KDL::JntArray q(x.size()); for (uint i = 0; i < x.size(); i++) q(i) = x[i]; int rc = fksolver.JntToCart(q, currentPose); if (rc < 0) std::cout << "KDL FKSolver is failing: " << q.data; if (std::isnan(currentPose.p.x())) { std::cout << "ERROR :" << "NaNs from NLOpt!!"; error[0] = std::numeric_limits<float>::max(); progress = -1; return; } KDL::Twist delta_twist = KDL::diffRelative(targetPose, currentPose); for (int i = 0; i < 6; i++) { if (std::abs(delta_twist[i]) <= std::abs(bounds[i])) delta_twist[i] = 0.0; } error[0] = KDL::dot(delta_twist.vel, delta_twist.vel) + KDL::dot(delta_twist.rot, delta_twist.rot); if (KDL::Equal(delta_twist, KDL::Twist::Zero(), eps)) { progress = 1; best_x = x; return; } } void NLOPT_IK::cartL2NormError(const std::vector<double> &x, double error[]) { // Actual function to compute Euclidean distance error. This uses // the KDL Forward Kinematics solver to compute the Cartesian pose // of the current joint configuration and compares that to the // desired Cartesian pose for the IK solve. if (aborted || progress != -3) { opt.force_stop(); return; } KDL::JntArray q(x.size()); for (uint i = 0; i < x.size(); i++) q(i) = x[i]; int rc = fksolver.JntToCart(q, currentPose); if (rc < 0) std::cout << "KDL FKSolver is failing: " << q.data; if (std::isnan(currentPose.p.x())) { std::cout << "ERROR :" << "NaNs from NLOpt!!"; error[0] = std::numeric_limits<float>::max(); progress = -1; return; } KDL::Twist delta_twist = KDL::diffRelative(targetPose, currentPose); for (int i = 0; i < 6; i++) { if (std::abs(delta_twist[i]) <= std::abs(bounds[i])) delta_twist[i] = 0.0; } error[0] = std::sqrt(KDL::dot(delta_twist.vel, delta_twist.vel) + KDL::dot(delta_twist.rot, delta_twist.rot)); if (KDL::Equal(delta_twist, KDL::Twist::Zero(), eps)) { progress = 1; best_x = x; return; } } void NLOPT_IK::cartDQError(const std::vector<double> &x, double error[]) { // Actual function to compute Euclidean distance error. This uses // the KDL Forward Kinematics solver to compute the Cartesian pose // of the current joint configuration and compares that to the // desired Cartesian pose for the IK solve. if (aborted || progress != -3) { opt.force_stop(); return; } KDL::JntArray q(x.size()); for (uint i = 0; i < x.size(); i++) q(i) = x[i]; int rc = fksolver.JntToCart(q, currentPose); if (rc < 0) std::cout << "KDL FKSolver is failing: " << q.data; if (std::isnan(currentPose.p.x())) { std::cout << "ERROR :" << "NaNs from NLOpt!!"; error[0] = std::numeric_limits<float>::max(); progress = -1; return; } KDL::Twist delta_twist = KDL::diffRelative(targetPose, currentPose); for (int i = 0; i < 6; i++) { if (std::abs(delta_twist[i]) <= std::abs(bounds[i])) delta_twist[i] = 0.0; } math3d::matrix3x3<double> currentRotationMatrix(currentPose.M.data); math3d::quaternion<double> currentQuaternion = math3d::rot_matrix_to_quaternion<double>(currentRotationMatrix); math3d::point3d currentTranslation(currentPose.p.data); dual_quaternion currentDQ = dual_quaternion::rigid_transformation(currentQuaternion, currentTranslation); dual_quaternion errorDQ = (currentDQ * !targetDQ).normalize(); errorDQ.log(); error[0] = 4.0f * dot(errorDQ, errorDQ); if (KDL::Equal(delta_twist, KDL::Twist::Zero(), eps)) { progress = 1; best_x = x; return; } } int NLOPT_IK::CartToJnt(const KDL::JntArray &q_init, const KDL::Frame &p_in, KDL::JntArray &q_out, const KDL::Twist _bounds, const KDL::JntArray &q_desired) { // User command to start an IK solve. Takes in a seed // configuration, a Cartesian pose, and (optional) a desired // configuration. If the desired is not provided, the seed is // used. Outputs the joint configuration found that solves the // IK. // Returns -3 if a configuration could not be found within the eps // set up in the constructor. boost::posix_time::ptime start_time = boost::posix_time::microsec_clock::local_time(); boost::posix_time::time_duration diff; bounds = _bounds; q_out = q_init; if (chain.getNrOfJoints() < 2) { std::cout << "ERROR :" << "NLOpt_IK can only be run for chains of length 2 or more"; return -3; } if (q_init.data.size() != types.size()) { printf(" ERROR : IK seeded with wrong number of joints. Expected %d but got %d", (int)types.size(), (int)q_init.data.size()); return -3; } opt.set_maxtime(maxtime); double minf; /* the minimum objective value, upon return */ targetPose = p_in; if (TYPE == 1) // DQ { math3d::matrix3x3<double> targetRotationMatrix(targetPose.M.data); math3d::quaternion<double> targetQuaternion = math3d::rot_matrix_to_quaternion<double>(targetRotationMatrix); math3d::point3d targetTranslation(targetPose.p.data); targetDQ = dual_quaternion::rigid_transformation(targetQuaternion, targetTranslation); } // else if (TYPE == 1) // { // z_target = targetPose*z_up; // x_target = targetPose*x_out; // y_target = targetPose*y_out; // } // fksolver.JntToCart(q_init,currentPose); std::vector<double> x(chain.getNrOfJoints()); for (uint i = 0; i < x.size(); i++) { x[i] = q_init(i); if (types[i] == KDL::BasicJointType::Continuous) continue; if (types[i] == KDL::BasicJointType::TransJoint) { x[i] = std::min(x[i], ub[i]); x[i] = std::max(x[i], lb[i]); } else { // Below is to handle bad seeds outside of limits if (x[i] > ub[i]) { //Find actual angle offset double diffangle = fmod(x[i] - ub[i], 2 * M_PI); // Add that to upper bound and go back a full rotation x[i] = ub[i] + diffangle - 2 * M_PI; } if (x[i] < lb[i]) { //Find actual angle offset double diffangle = fmod(lb[i] - x[i], 2 * M_PI); // Subtract that from lower bound and go forward a full rotation x[i] = lb[i] - diffangle + 2 * M_PI; } if (x[i] > ub[i]) x[i] = (ub[i] + lb[i]) / 2.0; } } best_x = x; progress = -3; std::vector<double> artificial_lower_limits(lb.size()); for (uint i = 0; i < lb.size(); i++) if (types[i] == KDL::BasicJointType::Continuous) artificial_lower_limits[i] = best_x[i] - 2 * M_PI; else if (types[i] == KDL::BasicJointType::TransJoint) artificial_lower_limits[i] = lb[i]; else artificial_lower_limits[i] = std::max(lb[i], best_x[i] - 2 * M_PI); opt.set_lower_bounds(artificial_lower_limits); std::vector<double> artificial_upper_limits(lb.size()); for (uint i = 0; i < ub.size(); i++) if (types[i] == KDL::BasicJointType::Continuous) artificial_upper_limits[i] = best_x[i] + 2 * M_PI; else if (types[i] == KDL::BasicJointType::TransJoint) artificial_upper_limits[i] = ub[i]; else artificial_upper_limits[i] = std::min(ub[i], best_x[i] + 2 * M_PI); opt.set_upper_bounds(artificial_upper_limits); if (q_desired.data.size() == 0) { des = x; } else { des.resize(x.size()); for (uint i = 0; i < des.size(); i++) des[i] = q_desired(i); } try { opt.optimize(x, minf); } catch (...) { } if (progress == -1) // Got NaNs progress = -3; if (!aborted && progress < 0) { double time_left; diff = boost::posix_time::microsec_clock::local_time() - start_time; time_left = maxtime - diff.total_nanoseconds() / 1000000000.0; while (time_left > 0 && !aborted && progress < 0) { for (uint i = 0; i < x.size(); i++) x[i] = fRand(artificial_lower_limits[i], artificial_upper_limits[i]); opt.set_maxtime(time_left); try { opt.optimize(x, minf); } catch (...) { } if (progress == -1) // Got NaNs progress = -3; diff = boost::posix_time::microsec_clock::local_time() - start_time; time_left = maxtime - diff.total_nanoseconds() / 1000000000.0; } } for (uint i = 0; i < x.size(); i++) { q_out(i) = best_x[i]; } return progress; } }