hexsha stringlengths 40 40 | size int64 7 1.05M | ext stringclasses 13
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 269 | max_stars_repo_name stringlengths 5 108 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 9 | max_stars_count float64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 269 | max_issues_repo_name stringlengths 5 116 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 9 | max_issues_count float64 1 77k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 269 | max_forks_repo_name stringlengths 5 116 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 9 | max_forks_count float64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 7 1.05M | avg_line_length float64 1.21 653k | max_line_length int64 6 990k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
699a62f6968b573dd616ee87b0562dfe71ffd169 | 413 | cpp | C++ | AIBattleground/Src/AISystemBase.cpp | CerberusDev/AIBattleground | 78cb72aeb9f33ff630a01df26c3056b7b7027c69 | [
"MIT"
] | null | null | null | AIBattleground/Src/AISystemBase.cpp | CerberusDev/AIBattleground | 78cb72aeb9f33ff630a01df26c3056b7b7027c69 | [
"MIT"
] | null | null | null | AIBattleground/Src/AISystemBase.cpp | CerberusDev/AIBattleground | 78cb72aeb9f33ff630a01df26c3056b7b7027c69 | [
"MIT"
] | null | null | null | // ----------------------------------------------------------------------------
// ------------- AI Battleground, Copyright(C) Maciej Pryc, 2016 --------------
// ----------------------------------------------------------------------------
#include "AISystemBase.h"
AISystemBase::AISystemBase(class Blackboard* argBlackboard) :
Blackboard(argBlackboard)
{
}
AISystemBase::~AISystemBase()
{
}
| 24.294118 | 80 | 0.380145 |
699bc77460deebc1e54bc9ee3786f9836cedec3b | 1,959 | cc | C++ | src/abc154/e.cc | nryotaro/at_c | 8d7d3aecb4e3c768aefdf0ceaeefb269ca9ab34c | [
"MIT"
] | null | null | null | src/abc154/e.cc | nryotaro/at_c | 8d7d3aecb4e3c768aefdf0ceaeefb269ca9ab34c | [
"MIT"
] | null | null | null | src/abc154/e.cc | nryotaro/at_c | 8d7d3aecb4e3c768aefdf0ceaeefb269ca9ab34c | [
"MIT"
] | null | null | null | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll dp[101][2][5];
ll solve(string s, ll k) {
int n = s.size();
ll c = s[0] - '0';
dp[1][1][0] = 1ll;
dp[1][1][1] = c - 1ll;
dp[1][0][1] = 1ll;
for(int i = 1; i < n; i++) {
c = s[i] - '0';
for(int j = 0; j <= k; j++) {
// dp[i+1][0][j]
if(c == 0) {
dp[i + 1][0][j] = dp[i][0][j];
} else { // c > 0
dp[i + 1][0][j] = j > 0ll ? dp[i][0][j - 1] : 0ll;
}
// dp[i+1][1][j]
if(c == 0) {
dp[i + 1][1][j] = dp[i][1][j];
if(j > 0)
dp[i + 1][1][j] += dp[i][1][j - 1] * 9ll;
else
dp[i + 1][1][1] += 9ll;
} else { // c > 0
// 1以上の値にする
dp[i + 1][1][j] = j == 0 ? 0ll : (dp[i][0][j - 1] * (c - 1ll));
// 0にする
dp[i + 1][1][j] += dp[i][0][j];
// 0にする
dp[i + 1][1][j] +=
dp[i][1][j] + (j == 0 ? 0ll : dp[i][1][j - 1] * 9ll);
}
}
}
// 8 0 は0
/*
for(int i = 0; i <= n; i++) {
for(int j = 0; j <= k; j++) {
cout << "dp[" << i << "][" << 0 << "][" << j << "] -> "
<< dp[i][0][j] << endl;
cout << "dp[" << i << "][" << 1 << "][" << j << "] -> "
<< dp[i][1][j] << endl;
}
}
*/
return dp[n][0][k] + dp[n][1][k];
}
#ifndef _debug
int main() {
string s;
cin >> s;
int k;
cin >> k;
cout << solve(s, k) << endl;
return 0;
}
#endif
/*
dp[0][0][0] -> 0
dp[0][1][0] -> 0
dp[0][0][1] -> 0
dp[0][1][1] -> 0
dp[1][0][0] -> 0
dp[1][1][0] -> 1
dp[1][0][1] -> 1
dp[1][1][1] -> 0
dp[2][0][0] -> 0
dp[2][1][0] -> 1
dp[2][0][1] -> 1
dp[2][1][1] -> 9
dp[3][0][0] -> 0
dp[3][1][0] -> 1
dp[3][0][1] -> 1
dp[3][1][1] -> 18
*/ | 23.60241 | 79 | 0.28586 |
69a07f728b17bc1b66924920a2d4d4642b548472 | 5,304 | cpp | C++ | nau/src/nau/render/materialSortRenderQueue.cpp | Khirion/nau | 47a2ad8e0355a264cd507da5e7bba1bf7abbff95 | [
"MIT"
] | 29 | 2015-09-16T22:28:30.000Z | 2022-03-11T02:57:36.000Z | nau/src/nau/render/materialSortRenderQueue.cpp | Khirion/nau | 47a2ad8e0355a264cd507da5e7bba1bf7abbff95 | [
"MIT"
] | 1 | 2017-03-29T13:32:58.000Z | 2017-03-31T13:56:03.000Z | nau/src/nau/render/materialSortRenderQueue.cpp | Khirion/nau | 47a2ad8e0355a264cd507da5e7bba1bf7abbff95 | [
"MIT"
] | 10 | 2015-10-15T14:20:15.000Z | 2022-02-17T10:37:29.000Z | #include "nau/render/materialSortRenderQueue.h"
#include "nau.h"
#include "nau/render/iRenderable.h"
#include "nau/geometry/boundingBox.h"
#include "nau/debug/profile.h"
using namespace nau::render;
using namespace nau::scene;
using namespace nau::material;
using namespace nau::math;
using namespace nau;
typedef std::pair<std::shared_ptr<MaterialGroup>, mat4*> pair_MatGroup_Transform;
#pragma warning( disable : 4503)
MaterialSortRenderQueue::MaterialSortRenderQueue(void) {
}
MaterialSortRenderQueue::~MaterialSortRenderQueue(void) {
clearQueue();
}
void
MaterialSortRenderQueue::clearQueue (void) {
std::map<int, std::map<std::shared_ptr<Material>, std::vector<pair_MatGroup_Transform >* >* >::iterator mapIter;
mapIter = m_RenderQueue.begin();
for ( ; mapIter != m_RenderQueue.end(); mapIter++) {
std::map <std::shared_ptr<Material>, std::vector<pair_MatGroup_Transform >* > *aMap;
std::map <std::shared_ptr<Material>, std::vector<pair_MatGroup_Transform >* >::iterator mapIter2;
aMap = (*mapIter).second;
mapIter2 = aMap->begin();
for ( ; mapIter2 != aMap->end(); mapIter2++) {
//if ((*mapIter2).second != NULL)
delete (*mapIter2).second;
}
delete aMap;
}
m_RenderQueue.clear(); /***MARK***/ //Possible memory leak
}
void
MaterialSortRenderQueue::addToQueue (std::shared_ptr<SceneObject> &aObject,
std::map<std::string, MaterialID> &materialMap) {
PROFILE ("Queue add");
int order;
std::shared_ptr<Material> aMaterial;
std::shared_ptr<IRenderable> &aRenderable = aObject->getRenderable();
std::vector<std::shared_ptr<MaterialGroup>> vMaterialGroups = aRenderable->getMaterialGroups();
for (auto &aGroup: vMaterialGroups) {
std::shared_ptr<nau::geometry::IndexData> &indexData = aGroup->getIndexData();
{
PROFILE ("Get material");
aMaterial = materialMap[aGroup->getMaterialName()].m_MatPtr;
}
order = aMaterial->getState()->getPropi(IState::ORDER);
if ((order >= 0) && (aMaterial) && (true == aMaterial->isEnabled())) {
if (0 == m_RenderQueue.count (order)){
m_RenderQueue[order] = new std::map <std::shared_ptr<Material>, std::vector<pair_MatGroup_Transform >* >;
}
std::map<std::shared_ptr<Material>, std::vector<pair_MatGroup_Transform >* > *materialMap = m_RenderQueue[order];
if (0 == materialMap->count (aMaterial)) {
(*materialMap)[aMaterial] = new std::vector<pair_MatGroup_Transform >;
}
std::vector<pair_MatGroup_Transform > *matGroupVec = (*materialMap)[aMaterial];
matGroupVec->push_back (pair_MatGroup_Transform(aGroup, aObject->_getTransformPtr()));
}
}
// ADD BOUNDING BOXES TO QUEUE
#ifdef NAU_RENDER_FLAGS
if (NAU->getRenderFlag(Nau::BOUNDING_BOX_RENDER_FLAG)) {
Profile("Enqueue Bounding Boxes");
vMaterialGroups = nau::geometry::BoundingBox::getGeometry()->getMaterialGroups();
for (auto& aGroup: vMaterialGroups) {
std::shared_ptr<Material> &aMaterial = MATERIALLIBMANAGER->getMaterial(aGroup->getMaterialName());
mat4 *trans = &((nau::geometry::BoundingBox *)(aObject->getBoundingVolume()))->getTransform();
if (0 == m_RenderQueue.count (0)){
m_RenderQueue[0] = new std::map <std::shared_ptr<Material>, std::vector<pair_MatGroup_Transform >* >;
}
std::map<std::shared_ptr<Material>, std::vector<pair_MatGroup_Transform >* > *materialMap = m_RenderQueue[aMaterial->getState()->getPropi(IState::ORDER)];
if (0 == materialMap->count (aMaterial)) {
(*materialMap)[aMaterial] = new std::vector<pair_MatGroup_Transform >;
}
std::vector<pair_MatGroup_Transform > *matGroupVec = (*materialMap)[aMaterial];
nau::geometry::BoundingBox *bb = (nau::geometry::BoundingBox *)(aObject->getBoundingVolume());
matGroupVec->push_back( pair_MatGroup_Transform(aGroup, &(bb->getTransform())));
}
}
#endif
}
void
MaterialSortRenderQueue::processQueue (void) {
PROFILE ("Process queue");
IRenderer *renderer = RENDERER;
std::map <int, std::map<std::shared_ptr<Material>, std::vector<pair_MatGroup_Transform >* >* >::iterator renderQueueIter;
renderQueueIter = m_RenderQueue.begin();
for (; renderQueueIter != m_RenderQueue.end(); ++renderQueueIter) {
std::map<std::shared_ptr<Material>, std::vector<pair_MatGroup_Transform >* >::iterator materialMapIter;
materialMapIter = (*renderQueueIter).second->begin();
for (; materialMapIter != (*renderQueueIter).second->end(); materialMapIter++) {
const std::shared_ptr<Material> &aMat = (*materialMapIter).first;
{
PROFILE ("Material prepare");
RENDERER->setMaterial(aMat);
//aMat->prepare();
}
std::vector<pair_MatGroup_Transform >::iterator matGroupsIter;
matGroupsIter = (*materialMapIter).second->begin();
{
PROFILE ("Geometry rendering");
for (; matGroupsIter != (*materialMapIter).second->end(); ++matGroupsIter) {
bool b = (*matGroupsIter).second->isIdentity();
if (!b) {
renderer->pushMatrix(IRenderer::MODEL_MATRIX);
renderer->applyTransform(IRenderer::MODEL_MATRIX, *(*matGroupsIter).second);
aMat->setUniformValues();
aMat->setUniformBlockValues();
}
{
PROFILE("Draw");
renderer->drawGroup ((*matGroupsIter).first);
}
if (!b)
renderer->popMatrix(IRenderer::MODEL_MATRIX);
}
}
aMat->restore();
}
}
}
| 31.384615 | 158 | 0.697775 |
69a195aec5b82d7c089d79f41e41520f1653bee4 | 430 | cpp | C++ | Classes/Retan_class/main.cpp | Bernardo1411/Programacao_Avancada | 5005b60155648872ca9d4f374b3d9ea035aa33a3 | [
"MIT"
] | null | null | null | Classes/Retan_class/main.cpp | Bernardo1411/Programacao_Avancada | 5005b60155648872ca9d4f374b3d9ea035aa33a3 | [
"MIT"
] | null | null | null | Classes/Retan_class/main.cpp | Bernardo1411/Programacao_Avancada | 5005b60155648872ca9d4f374b3d9ea035aa33a3 | [
"MIT"
] | null | null | null | #include <iostream>
#include "ponto.h"
using namespace std;
int main()
{
ponto p1(2,3), p2(5,6);
cout << p1;
cout << p2;
cout << "distancia P1 e P2: " << p1.dist(p2) << endl;
cout << "area P1 e P2: " << p1.area(p2) << endl;
ponto p3 = p1;
cout << p3;
cout << "distancia P3 e P2: " << p3.dist(p2) << endl;
cout << "area P3 e P2: " << p3.area(p2) << endl;
cin.get();
return 0;
}
| 15.925926 | 57 | 0.5 |
69a390cc0c446131353ccbc58108b6fc8dd3316a | 26,342 | cpp | C++ | Testbed/Framework/Main.cpp | louis-langholtz/Box2D | 7c74792bf177cf36640d735de2bba0225bf7f852 | [
"Zlib"
] | 32 | 2016-10-20T05:55:04.000Z | 2021-11-25T16:34:41.000Z | Testbed/Framework/Main.cpp | louis-langholtz/Box2D | 7c74792bf177cf36640d735de2bba0225bf7f852 | [
"Zlib"
] | 50 | 2017-01-07T21:40:16.000Z | 2018-01-31T10:04:05.000Z | Testbed/Framework/Main.cpp | louis-langholtz/Box2D | 7c74792bf177cf36640d735de2bba0225bf7f852 | [
"Zlib"
] | 7 | 2017-02-09T10:02:02.000Z | 2020-07-23T22:49:04.000Z | /*
* Original work Copyright (c) 2006-2013 Erin Catto http://www.box2d.org
* Modified work Copyright (c) 2017 Louis Langholtz https://github.com/louis-langholtz/Box2D
*
* 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 "imgui.h"
#include "RenderGL3.h"
#include "DebugDraw.hpp"
#include "Test.hpp"
#include "TestEntry.hpp"
#include <sstream>
#include <iostream>
#include <iomanip>
#include <memory>
#include <string>
#if defined(__APPLE__)
#include <OpenGL/gl3.h>
#else
#include <GL/glew.h>
#endif
#include <GLFW/glfw3.h>
#include <cstdio>
#if defined(_WIN32) || defined(_WIN64)
#include <direct.h>
#else
#include <cstdlib>
#include <cerrno>
#include <unistd.h>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
using namespace box2d;
//
struct UIState
{
bool showMenu;
int scroll;
int scrollarea1;
bool mouseOverMenu;
bool chooseTest;
};
class Selection
{
public:
using size_type = std::size_t;
Selection(size_type size, size_type selection = 0):
m_size(size),
m_selection(selection < size? selection: 0)
{
assert(size > 0);
assert(selection < size);
}
size_type Get() const
{
return m_selection;
}
void Set(size_type selection)
{
assert(selection < m_size);
if (selection < m_size)
{
m_selection = selection;
}
}
void Increment()
{
const auto next = m_selection + 1;
m_selection = (next < m_size)? next: 0;
}
void Decrement()
{
m_selection = (m_selection > 0)? m_selection - 1: m_size - 1;
}
private:
size_type m_selection = 0;
size_type m_size = 0;
};
class TestSuite
{
public:
using size_type = std::size_t;
TestSuite(Span<const TestEntry> testEntries, size_type index = 0):
m_testEntries(testEntries),
m_testIndex(index < testEntries.size()? index: 0)
{
assert(testEntries.size() > 0);
m_test = testEntries[m_testIndex].createFcn();
}
size_type GetTestCount() const
{
return m_testEntries.size();
}
Test* GetTest() const
{
return m_test.get();
}
size_type GetIndex() const
{
return m_testIndex;
}
const char* GetName(std::size_t index) const
{
return m_testEntries[index].name;
}
const char* GetName() const
{
return m_testEntries[m_testIndex].name;
}
void SetIndex(size_type index)
{
assert(index < GetTestCount());
m_testIndex = index;
RestartTest();
}
void RestartTest()
{
m_test = m_testEntries[m_testIndex].createFcn();
}
private:
Span<const TestEntry> m_testEntries;
size_type m_testIndex;
std::unique_ptr<Test> m_test;
};
//
namespace
{
TestSuite *g_testSuite = nullptr;
Selection *g_selection = nullptr;
Camera camera;
UIState ui;
Settings settings;
auto rightMouseDown = false;
auto leftMouseDown = false;
Length2D lastp;
Coord2D mouseScreen = Coord2D{0.0, 0.0};
Length2D mouseWorld = Length2D{0, 0};
const auto menuY = 10;
const auto menuWidth = 200;
auto menuX = 0;
auto menuHeight = 0;
}
static auto GetCwd()
{
// In C++17 this implementation should be replaced with fs::current_path()
auto retval = std::string();
#if defined(_WIN32) || defined(_WIN64)
const auto buffer = _getcwd(NULL, 0);
if (buffer)
{
retval += std::string(buffer);
std::free(buffer);
}
#else
char buffer[1024];
if (getcwd(buffer, sizeof(buffer)))
{
retval += buffer;
}
#endif
return retval;
}
static void CreateUI()
{
ui.showMenu = true;
ui.scroll = 0;
ui.scrollarea1 = 0;
ui.chooseTest = false;
ui.mouseOverMenu = false;
// Init UI
const char* fontPaths[] = {
// Path if Testbed running from MSVS or Xcode Build folder.
"../../Testbed/Data/DroidSans.ttf",
// This is the original path...
"../Data/DroidSans.ttf",
// Path if Testbed app running from Testbed folder
"Data/DroidSans.ttf",
// Possibly a relative path for windows...
"../../../../Data/DroidSans.ttf",
// Try the current working directory...
"./DroidSans.ttf",
};
const auto cwd = GetCwd();
if (cwd.empty())
{
std::perror("GetCwd");
}
for (auto&& fontPath: fontPaths)
{
fprintf(stderr, "Attempting to load font from \"%s/%s\", ", cwd.c_str(), fontPath);
if (RenderGLInitFont(fontPath))
{
fprintf(stderr, "succeeded.\n");
break;
}
fprintf(stderr, " failed.\n");
}
if (!RenderGLInit())
{
fprintf(stderr, "Could not init GUI renderer.\n");
assert(false);
return;
}
}
static void ResizeWindow(GLFWwindow*, int width, int height)
{
camera.m_width = width;
camera.m_height = height;
menuX = camera.m_width - menuWidth - 10;
menuHeight = camera.m_height - 20;
}
static Test::Key GlfwKeyToTestKey(int key)
{
switch (key)
{
case GLFW_KEY_SPACE: return Test::Key_Space;
case GLFW_KEY_COMMA: return Test::Key_Comma;
case GLFW_KEY_MINUS: return Test::Key_Minus;
case GLFW_KEY_PERIOD: return Test::Key_Period;
case GLFW_KEY_EQUAL: return Test::Key_Equal;
case GLFW_KEY_0: return Test::Key_0;
case GLFW_KEY_1: return Test::Key_1;
case GLFW_KEY_2: return Test::Key_2;
case GLFW_KEY_3: return Test::Key_3;
case GLFW_KEY_4: return Test::Key_4;
case GLFW_KEY_5: return Test::Key_5;
case GLFW_KEY_6: return Test::Key_6;
case GLFW_KEY_7: return Test::Key_7;
case GLFW_KEY_8: return Test::Key_8;
case GLFW_KEY_9: return Test::Key_9;
case GLFW_KEY_A: return Test::Key_A;
case GLFW_KEY_B: return Test::Key_B;
case GLFW_KEY_C: return Test::Key_C;
case GLFW_KEY_D: return Test::Key_D;
case GLFW_KEY_E: return Test::Key_E;
case GLFW_KEY_F: return Test::Key_F;
case GLFW_KEY_G: return Test::Key_G;
case GLFW_KEY_H: return Test::Key_H;
case GLFW_KEY_I: return Test::Key_I;
case GLFW_KEY_J: return Test::Key_J;
case GLFW_KEY_K: return Test::Key_K;
case GLFW_KEY_L: return Test::Key_L;
case GLFW_KEY_M: return Test::Key_M;
case GLFW_KEY_N: return Test::Key_N;
case GLFW_KEY_O: return Test::Key_O;
case GLFW_KEY_P: return Test::Key_P;
case GLFW_KEY_Q: return Test::Key_Q;
case GLFW_KEY_R: return Test::Key_R;
case GLFW_KEY_S: return Test::Key_S;
case GLFW_KEY_T: return Test::Key_T;
case GLFW_KEY_U: return Test::Key_U;
case GLFW_KEY_V: return Test::Key_V;
case GLFW_KEY_W: return Test::Key_W;
case GLFW_KEY_X: return Test::Key_X;
case GLFW_KEY_Y: return Test::Key_Y;
case GLFW_KEY_Z: return Test::Key_Z;
case GLFW_KEY_BACKSPACE: return Test::Key_Backspace;
case GLFW_KEY_KP_SUBTRACT: return Test::Key_Subtract;
case GLFW_KEY_KP_ADD: return Test::Key_Add;
}
return Test::Key_Unknown;
}
static void KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods)
{
NOT_USED(scancode);
if (action == GLFW_PRESS)
{
switch (key)
{
case GLFW_KEY_ESCAPE:
// Quit
glfwSetWindowShouldClose(window, GL_TRUE);
break;
case GLFW_KEY_LEFT:
// Pan left
if (mods == GLFW_MOD_CONTROL)
{
g_testSuite->GetTest()->ShiftOrigin(Length2D(2.0f * Meter, 0.0f * Meter));
}
else
{
camera.m_center.x -= 0.5f;
}
break;
case GLFW_KEY_RIGHT:
// Pan right
if (mods == GLFW_MOD_CONTROL)
{
g_testSuite->GetTest()->ShiftOrigin(Length2D(-2.0f * Meter, 0.0f * Meter));
}
else
{
camera.m_center.x += 0.5f;
}
break;
case GLFW_KEY_DOWN:
// Pan down
if (mods == GLFW_MOD_CONTROL)
{
g_testSuite->GetTest()->ShiftOrigin(Length2D(0.0f * Meter, 2.0f * Meter));
}
else
{
camera.m_center.y -= 0.5f;
}
break;
case GLFW_KEY_UP:
// Pan up
if (mods == GLFW_MOD_CONTROL)
{
g_testSuite->GetTest()->ShiftOrigin(Length2D(0.0f * Meter, -2.0f * Meter));
}
else
{
camera.m_center.y += 0.5f;
}
break;
case GLFW_KEY_HOME:
// Reset view
camera.m_zoom = 1.0f;
camera.m_center = Coord2D{0.0f, 20.0f};
break;
case GLFW_KEY_Z:
// Zoom out
camera.m_zoom = Min(1.1f * camera.m_zoom, 20.0f);
break;
case GLFW_KEY_X:
// Zoom in
camera.m_zoom = Max(0.9f * camera.m_zoom, 0.02f);
break;
case GLFW_KEY_R:
// Reset test
g_testSuite->RestartTest();
break;
case GLFW_KEY_SPACE:
// Launch a bomb.
if (g_testSuite->GetTest())
{
g_testSuite->GetTest()->LaunchBomb();
}
break;
case GLFW_KEY_P:
// Pause
settings.pause = !settings.pause;
break;
case GLFW_KEY_LEFT_BRACKET:
// Switch to previous test
g_selection->Decrement();
break;
case GLFW_KEY_RIGHT_BRACKET:
// Switch to next test
g_selection->Increment();
break;
case GLFW_KEY_TAB:
ui.showMenu = !ui.showMenu;
default:
if (g_testSuite->GetTest())
{
g_testSuite->GetTest()->KeyboardDown(GlfwKeyToTestKey(key));
}
}
}
else if (action == GLFW_RELEASE)
{
g_testSuite->GetTest()->KeyboardUp(GlfwKeyToTestKey(key));
}
// else GLFW_REPEAT
}
static void MouseButton(GLFWwindow*, const int button, const int action, const int mods)
{
const auto forMenu = (mouseScreen.x >= menuX);
switch (button)
{
case GLFW_MOUSE_BUTTON_LEFT:
{
switch (action)
{
case GLFW_PRESS:
leftMouseDown = true;
if (!forMenu)
{
if (mods == GLFW_MOD_SHIFT)
{
g_testSuite->GetTest()->ShiftMouseDown(mouseWorld);
}
else
{
g_testSuite->GetTest()->MouseDown(mouseWorld);
}
}
break;
case GLFW_RELEASE:
leftMouseDown = false;
if (!forMenu)
{
g_testSuite->GetTest()->MouseUp(mouseWorld);
}
break;
default:
break;
}
break;
}
case GLFW_MOUSE_BUTTON_RIGHT:
{
switch (action)
{
case GLFW_PRESS:
lastp = mouseWorld;
rightMouseDown = true;
break;
case GLFW_RELEASE:
rightMouseDown = false;
break;
default:
break;
}
}
default:
break;
}
}
static void MouseMotion(GLFWwindow*, double xd, double yd)
{
// Expects that xd and yd are the new mouse position coordinates,
// in screen coordinates, relative to the upper-left corner of the
// client area of the window.
mouseScreen = Coord2D{static_cast<float>(xd), static_cast<float>(yd)};
mouseWorld = ConvertScreenToWorld(camera, mouseScreen);
g_testSuite->GetTest()->MouseMove(mouseWorld);
if (rightMouseDown)
{
const auto movement = mouseWorld - lastp;
camera.m_center.x -= static_cast<float>(Real{movement.x / Meter});
camera.m_center.y -= static_cast<float>(Real{movement.y / Meter});
lastp = ConvertScreenToWorld(camera, mouseScreen);
}
}
static void ScrollCallback(GLFWwindow*, double, double dy)
{
if (ui.mouseOverMenu)
{
ui.scroll = -int(dy);
}
else
{
if (dy > 0)
{
camera.m_zoom /= 1.1f;
}
else
{
camera.m_zoom *= 1.1f;
}
}
}
static void Simulate(Drawer& drawer)
{
glEnable(GL_DEPTH_TEST);
settings.dt = (settings.hz != 0)? 1 / settings.hz : 0;
if (settings.pause)
{
if (!settings.singleStep)
{
settings.dt = 0.0f;
}
}
g_testSuite->GetTest()->DrawTitle(drawer, g_testSuite->GetName());
g_testSuite->GetTest()->Step(settings, drawer);
glDisable(GL_DEPTH_TEST);
if (settings.pause)
{
if (settings.singleStep)
{
settings.singleStep = false;
}
}
if (g_testSuite->GetIndex() != g_selection->Get())
{
g_testSuite->SetIndex(g_selection->Get());
camera.m_zoom = 1.0f;
camera.m_center = Coord2D{0.0f, 20.0f};
}
}
static bool UserInterface(int mousex, int mousey, unsigned char mousebutton, int mscroll)
{
auto shouldQuit = false;
imguiBeginFrame(mousex, mousey, mousebutton, mscroll);
ui.mouseOverMenu = false;
if (ui.showMenu)
{
const auto over = imguiBeginScrollArea("Testbed Controls",
menuX, menuY, menuWidth, menuHeight,
&ui.scrollarea1);
if (over) ui.mouseOverMenu = true;
imguiLabel("Test:");
if (imguiButton(g_testSuite->GetName(), true))
{
ui.chooseTest = !ui.chooseTest;
}
imguiSeparatorLine();
const auto defaultLinearSlop = StripUnit(DefaultLinearSlop);
imguiSlider("Reg Vel Iters", &settings.regVelocityIterations, 0, 100, 1, true);
imguiSlider("Reg Pos Iters", &settings.regPositionIterations, 0, 100, 1, true);
imguiSlider("TOI Vel Iters", &settings.toiVelocityIterations, 0, 100, 1, true);
imguiSlider("TOI Pos Iters", &settings.toiPositionIterations, 0, 100, 1, true);
imguiSlider("Max Sub Steps", &settings.maxSubSteps, 0, 100, 1, true);
imguiSlider("Hertz", &settings.hz, -120.0f, 120.0f, 5.0f, true);
imguiSlider("Linear Slop", &settings.linearSlop,
static_cast<float>(defaultLinearSlop / 10),
static_cast<float>(defaultLinearSlop),
static_cast<float>(defaultLinearSlop / 100),
true);
imguiSlider("Angular Slop", &settings.angularSlop,
static_cast<float>(Pi * 2 / 1800.0),
static_cast<float>(Pi * 2 / 18.0), 0.001f,
true);
imguiSlider("Reg Min Sep", &settings.regMinSeparation,
-5 * static_cast<float>(defaultLinearSlop),
-0 * static_cast<float>(defaultLinearSlop),
static_cast<float>(defaultLinearSlop) / 20,
true);
imguiSlider("TOI Min Sep", &settings.toiMinSeparation,
-5 * static_cast<float>(defaultLinearSlop),
-0 * static_cast<float>(defaultLinearSlop),
static_cast<float>(defaultLinearSlop) / 20,
true);
imguiSlider("Max Translation", &settings.maxTranslation, 0.0f, 12.0f, 0.05f, true);
imguiSlider("Max Rotation", &settings.maxRotation, 0.0f, 360.0f, 1.0f, true);
imguiSlider("Max Lin Correct", &settings.maxLinearCorrection, 0.0f, 1.0f, 0.01f, true);
imguiSlider("Max Ang Correct", &settings.maxAngularCorrection, 0.0f, 90.0f, 1.0f, true);
imguiSlider("Reg Resol % Rate", &settings.regPosResRate, 0, 100, 1, true);
imguiSlider("TOI Resol % Rate", &settings.toiPosResRate, 0, 100, 1, true);
if (imguiCheck("Sleep", settings.enableSleep, true))
settings.enableSleep = !settings.enableSleep;
if (imguiCheck("Warm Starting", settings.enableWarmStarting, true))
settings.enableWarmStarting = !settings.enableWarmStarting;
if (imguiCheck("Time of Impact", settings.enableContinuous, true))
settings.enableContinuous = !settings.enableContinuous;
if (imguiCheck("Sub-Stepping", settings.enableSubStepping, true))
settings.enableSubStepping = !settings.enableSubStepping;
imguiSeparatorLine();
if (imguiCheck("Shapes", settings.drawShapes, true))
settings.drawShapes = !settings.drawShapes;
if (imguiCheck("Joints", settings.drawJoints, true))
settings.drawJoints = !settings.drawJoints;
if (imguiCheck("Skins", settings.drawSkins, true))
settings.drawSkins = !settings.drawSkins;
if (imguiCheck("AABBs", settings.drawAABBs, true))
settings.drawAABBs = !settings.drawAABBs;
if (imguiCheck("Contact Points", settings.drawContactPoints, true))
settings.drawContactPoints = !settings.drawContactPoints;
if (imguiCheck("Contact Normals", settings.drawContactNormals, true))
settings.drawContactNormals = !settings.drawContactNormals;
if (imguiCheck("Contact Impulses", settings.drawContactImpulse, true))
settings.drawContactImpulse = !settings.drawContactImpulse;
if (imguiCheck("Friction Impulses", settings.drawFrictionImpulse, true))
settings.drawFrictionImpulse = !settings.drawFrictionImpulse;
if (imguiCheck("Center of Masses", settings.drawCOMs, true))
settings.drawCOMs = !settings.drawCOMs;
if (imguiCheck("Statistics", settings.drawStats, true))
settings.drawStats = !settings.drawStats;
if (imguiCheck("Pause", settings.pause, true))
settings.pause = !settings.pause;
if (imguiButton("Single Step", true))
settings.singleStep = !settings.singleStep;
if (imguiButton("Restart", true))
g_testSuite->RestartTest();
if (imguiButton("Quit", true))
shouldQuit = true;
imguiEndScrollArea();
}
const auto testMenuWidth = 200;
if (ui.chooseTest)
{
static int testScroll = 0;
const auto over = imguiBeginScrollArea("Choose Sample",
camera.m_width - menuWidth - testMenuWidth - 20, 10,
testMenuWidth, camera.m_height - 20,
&testScroll);
if (over) ui.mouseOverMenu = true;
const auto testCount = g_testSuite->GetTestCount();
for (auto i = decltype(testCount){0}; i < testCount; ++i)
{
if (imguiItem(g_testSuite->GetName(i), true))
{
g_selection->Set(i);
g_testSuite->SetIndex(i);
ui.chooseTest = false;
}
}
imguiEndScrollArea();
}
imguiEndFrame();
return !shouldQuit;
}
static void GlfwErrorCallback(int code, const char* str)
{
fprintf(stderr, "GLFW error (%d): %s\n", code, str);
}
static void ShowFrameInfo(double frameTime, double fps)
{
std::stringstream stream;
const auto viewport = ConvertScreenToWorld(camera);
stream << "Zoom=" << camera.m_zoom;
stream << " Center=";
stream << "{" << camera.m_center.x << "," << camera.m_center.y << "}";
stream << " Viewport=";
stream << "{";
stream << viewport.GetLowerBound().x << "..." << viewport.GetUpperBound().x;
stream << ", ";
stream << viewport.GetLowerBound().y << "..." << viewport.GetUpperBound().y;
stream << "}";
stream << std::setprecision(1);
stream << std::fixed;
stream << " Refresh=" << (1000.0 * frameTime) << "ms";
stream << std::setprecision(0);
stream << " FPS=" << fps;
AddGfxCmdText(5, 5, TEXT_ALIGN_LEFT, stream.str().c_str(), static_cast<unsigned int>(WHITE));
}
int main()
{
TestSuite testSuite(GetTestEntries());
Selection selection(testSuite.GetTestCount());
g_testSuite = &testSuite;
g_selection = &selection;
#if defined(_WIN32)
// Enable memory-leak reports
_CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF | _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG));
#endif
camera.m_width = 1280; // 1152;
camera.m_height = 960; // 864;
menuX = camera.m_width - menuWidth - 10;
menuHeight = camera.m_height - 20;
if (glfwSetErrorCallback(GlfwErrorCallback))
{
fprintf(stderr, "Warning: overriding previously installed GLFW error callback function.\n");
}
if (glfwInit() == 0)
{
fprintf(stderr, "Failed to initialize GLFW\n");
return -1;
}
const auto buildVersion = GetVersion();
const auto buildDetails = GetBuildDetails();
char title[64];
sprintf(title, "Box2D Testbed Version %d.%d.%d",
buildVersion.major, buildVersion.minor, buildVersion.revision);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
const auto mainWindow = glfwCreateWindow(camera.m_width, camera.m_height, title,
nullptr, nullptr);
if (mainWindow == nullptr)
{
fprintf(stderr, "Failed to open GLFW main window.\n");
glfwTerminate();
return -1;
}
glfwMakeContextCurrent(mainWindow);
printf("Box2D %d.%d.%d (%s), OpenGL %s, GLSL %s\n",
buildVersion.major, buildVersion.minor, buildVersion.revision, buildDetails.c_str(),
glGetString(GL_VERSION), glGetString(GL_SHADING_LANGUAGE_VERSION));
glfwSetScrollCallback(mainWindow, ScrollCallback);
glfwSetWindowSizeCallback(mainWindow, ResizeWindow);
glfwSetKeyCallback(mainWindow, KeyCallback);
glfwSetMouseButtonCallback(mainWindow, MouseButton);
glfwSetCursorPosCallback(mainWindow, MouseMotion);
glfwSetScrollCallback(mainWindow, ScrollCallback);
#if !defined(__APPLE__)
//glewExperimental = GL_TRUE;
GLenum err = glewInit();
if (GLEW_OK != err)
{
fprintf(stderr, "Error: %s\n", glewGetErrorString(err));
exit(EXIT_FAILURE);
}
#endif
CreateUI();
// Control the frame rate. One draw per monitor refresh.
glfwSwapInterval(1);
auto time1 = glfwGetTime();
auto frameTime = 0.0;
auto fps = 0.0;
glClearColor(0.3f, 0.3f, 0.3f, 1.f);
{
DebugDraw drawer(camera);
while (!glfwWindowShouldClose(mainWindow))
{
glViewport(0, 0, camera.m_width, camera.m_height);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
const auto mscroll = ui.scroll;
ui.scroll = 0;
const auto mousex = int(mouseScreen.x);
const auto mousey = camera.m_height - int(mouseScreen.y);
unsigned char mousebutton = (leftMouseDown)? IMGUI_MBUT_LEFT: 0;
if (!UserInterface(mousex, mousey, mousebutton, mscroll))
glfwSetWindowShouldClose(mainWindow, GL_TRUE);
Simulate(drawer);
// Measure speed
const auto time2 = glfwGetTime();
const auto timeElapsed = time2 - time1;
const auto alpha = 0.9;
frameTime = alpha * frameTime + (1.0 - alpha) * timeElapsed;
fps = 0.99 * fps + (1.0 - 0.99) / timeElapsed;
time1 = time2;
ShowFrameInfo(frameTime, fps);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDisable(GL_DEPTH_TEST);
RenderGLFlush(camera.m_width, camera.m_height);
glfwSwapBuffers(mainWindow);
glfwPollEvents();
}
}
RenderGLDestroy();
glfwTerminate();
return 0;
}
| 31.100354 | 101 | 0.558879 |
69a706b0d33df4e718ed0116d518e256c5a2ffed | 20 | cpp | C++ | Space_attack/other.cpp | marcelq11/Space_Attack_PSIO | 3f713b10658358a48fdb92252bd0f82bff950a5f | [
"MIT"
] | null | null | null | Space_attack/other.cpp | marcelq11/Space_Attack_PSIO | 3f713b10658358a48fdb92252bd0f82bff950a5f | [
"MIT"
] | null | null | null | Space_attack/other.cpp | marcelq11/Space_Attack_PSIO | 3f713b10658358a48fdb92252bd0f82bff950a5f | [
"MIT"
] | null | null | null | #include "other.h"
| 6.666667 | 18 | 0.65 |
69a86172d7133a45894a91551431a5804b3d5263 | 17,851 | cpp | C++ | src/predefined/FaceDetector.cpp | djinn-technologies/depthai-unity | 4064a0f3ea374e30203ee9a0a2c42f1e59791519 | [
"MIT"
] | null | null | null | src/predefined/FaceDetector.cpp | djinn-technologies/depthai-unity | 4064a0f3ea374e30203ee9a0a2c42f1e59791519 | [
"MIT"
] | null | null | null | src/predefined/FaceDetector.cpp | djinn-technologies/depthai-unity | 4064a0f3ea374e30203ee9a0a2c42f1e59791519 | [
"MIT"
] | null | null | null | /**
* This file contains face detector pipeline and interface for Unity scene called "Face Detector"
* Main goal is to perform face detection + depth
*/
#pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"
#pragma GCC diagnostic ignored "-Wdouble-promotion"
#if _MSC_VER // this is defined when compiling with Visual Studio
#define EXPORT_API __declspec(dllexport) // Visual Studio needs annotating exported functions with this
#else
#define EXPORT_API // XCode does not need annotating exported functions, so define is empty
#endif
// ------------------------------------------------------------------------
// Plugin itself
#include <iostream>
#include <cstdio>
#include <random>
#include "../utility.hpp"
// Common necessary includes for development using depthai library
#include "depthai/depthai.hpp"
#include "depthai/device/Device.hpp"
#include "depthai-unity/predefined/FaceDetector.hpp"
#include "spdlog/sinks/stdout_color_sinks.h"
#include "spdlog/spdlog.h"
#include "nlohmann/json.hpp"
/**
* Pipeline creation based on streams template
*
* @param config pipeline configuration
* @returns pipeline
*/
dai::Pipeline createFaceDetectorPipeline(PipelineConfig *config)
{
dai::Pipeline pipeline;
std::shared_ptr<dai::node::XLinkOut> xlinkOut;
auto colorCam = pipeline.create<dai::node::ColorCamera>();
// Color camera preview
if (config->previewSizeWidth > 0 && config->previewSizeHeight > 0)
{
xlinkOut = pipeline.create<dai::node::XLinkOut>();
xlinkOut->setStreamName("preview");
colorCam->setPreviewSize(config->previewSizeWidth, config->previewSizeHeight);
colorCam->preview.link(xlinkOut->input);
}
// Color camera properties
colorCam->setResolution(dai::ColorCameraProperties::SensorResolution::THE_1080_P);
if (config->colorCameraResolution == 1) colorCam->setResolution(dai::ColorCameraProperties::SensorResolution::THE_4_K);
if (config->colorCameraResolution == 2) colorCam->setResolution(dai::ColorCameraProperties::SensorResolution::THE_12_MP);
if (config->colorCameraResolution == 3) colorCam->setResolution(dai::ColorCameraProperties::SensorResolution::THE_13_MP);
colorCam->setInterleaved(config->colorCameraInterleaved);
colorCam->setColorOrder(dai::ColorCameraProperties::ColorOrder::BGR);
if (config->colorCameraColorOrder == 1) colorCam->setColorOrder(dai::ColorCameraProperties::ColorOrder::RGB);
colorCam->setFps(config->colorCameraFPS);
// neural network
auto nn1 = pipeline.create<dai::node::NeuralNetwork>();
nn1->setBlobPath(config->nnPath1);
colorCam->preview.link(nn1->input);
// output of neural network
auto nnOut = pipeline.create<dai::node::XLinkOut>();
nnOut->setStreamName("detections");
nn1->out.link(nnOut->input);
// Depth
if (config->confidenceThreshold > 0)
{
auto left = pipeline.create<dai::node::MonoCamera>();
auto right = pipeline.create<dai::node::MonoCamera>();
auto stereo = pipeline.create<dai::node::StereoDepth>();
// For RGB-Depth align
if (config->ispScaleF1 > 0 && config->ispScaleF2 > 0) colorCam->setIspScale(config->ispScaleF1, config->ispScaleF2);
if (config->manualFocus > 0) colorCam->initialControl.setManualFocus(config->manualFocus);
// Mono camera properties
left->setResolution(dai::MonoCameraProperties::SensorResolution::THE_400_P);
if (config->monoLCameraResolution == 1) left->setResolution(dai::MonoCameraProperties::SensorResolution::THE_720_P);
if (config->monoLCameraResolution == 2) left->setResolution(dai::MonoCameraProperties::SensorResolution::THE_800_P);
if (config->monoLCameraResolution == 3) left->setResolution(dai::MonoCameraProperties::SensorResolution::THE_480_P);
left->setBoardSocket(dai::CameraBoardSocket::LEFT);
right->setResolution(dai::MonoCameraProperties::SensorResolution::THE_400_P);
if (config->monoRCameraResolution == 1) right->setResolution(dai::MonoCameraProperties::SensorResolution::THE_720_P);
if (config->monoRCameraResolution == 2) right->setResolution(dai::MonoCameraProperties::SensorResolution::THE_800_P);
if (config->monoRCameraResolution == 3) right->setResolution(dai::MonoCameraProperties::SensorResolution::THE_480_P);
right->setBoardSocket(dai::CameraBoardSocket::RIGHT);
// Stereo properties
stereo->setConfidenceThreshold(config->confidenceThreshold);
// LR-check is required for depth alignment
stereo->setLeftRightCheck(config->leftRightCheck);
if (config->depthAlign > 0) stereo->setDepthAlign(dai::CameraBoardSocket::RGB);
stereo->setSubpixel(config->subpixel);
stereo->initialConfig.setMedianFilter(dai::MedianFilter::MEDIAN_OFF);
if (config->medianFilter == 1) stereo->initialConfig.setMedianFilter(dai::MedianFilter::KERNEL_3x3);
if (config->medianFilter == 2) stereo->initialConfig.setMedianFilter(dai::MedianFilter::KERNEL_5x5);
if (config->medianFilter == 3) stereo->initialConfig.setMedianFilter(dai::MedianFilter::KERNEL_7x7);
// Linking
left->out.link(stereo->left);
right->out.link(stereo->right);
auto xoutDepth = pipeline.create<dai::node::XLinkOut>();
xoutDepth->setStreamName("depth");
stereo->depth.link(xoutDepth->input);
}
// SYSTEM INFORMATION
if (config->rate > 0.0f)
{
// Define source and output
auto sysLog = pipeline.create<dai::node::SystemLogger>();
auto xout = pipeline.create<dai::node::XLinkOut>();
xout->setStreamName("sysinfo");
// Properties
sysLog->setRate(config->rate); // 1 hz updates
// Linking
sysLog->out.link(xout->input);
}
// IMU
if (config->freq > 0)
{
auto imu = pipeline.create<dai::node::IMU>();
auto xlinkOutImu = pipeline.create<dai::node::XLinkOut>();
xlinkOutImu->setStreamName("imu");
// enable ROTATION_VECTOR at 400 hz rate
imu->enableIMUSensor(dai::IMUSensor::ROTATION_VECTOR, config->freq);
// above this threshold packets will be sent in batch of X, if the host is not blocked and USB bandwidth is available
imu->setBatchReportThreshold(config->batchReportThreshold);
// maximum number of IMU packets in a batch, if it's reached device will block sending until host can receive it
// if lower or equal to batchReportThreshold then the sending is always blocking on device
// useful to reduce device's CPU load and number of lost packets, if CPU load is high on device side due to multiple nodes
imu->setMaxBatchReports(config->maxBatchReports);
// Link plugins IMU -> XLINK
imu->out.link(xlinkOutImu->input);
}
return pipeline;
}
extern "C"
{
/**
* Pipeline creation based on streams template
*
* @param config pipeline configuration
* @returns pipeline
*/
EXPORT_API bool InitFaceDetector(PipelineConfig *config)
{
dai::Pipeline pipeline = createFaceDetectorPipeline(config);
// If deviceId is empty .. just pick first available device
bool res = false;
if (strcmp(config->deviceId,"NONE")==0 || strcmp(config->deviceId,"")==0) res = DAIStartPipeline(pipeline,config->deviceNum,NULL);
else res = DAIStartPipeline(pipeline,config->deviceNum,config->deviceId);
return res;
}
/**
* Pipeline results
*
* @param frameInfo camera images pointers
* @param getPreview True if color preview image is requested, False otherwise. Requires previewSize in pipeline creation.
* @param useDepth True if depth information is requested, False otherwise. Requires confidenceThreshold in pipeline creation.
* @param retrieveInformation True if system information is requested, False otherwise. Requires rate in pipeline creation.
* @param useIMU True if IMU information is requested, False otherwise. Requires freq in pipeline creation.
* @param deviceNum Device selection on unity dropdown
* @returns Json with results or information about device availability.
*/
/**
* Example of json returned
* { "faces": [ {"label":0,"score":0.0,"xmin":0.0,"ymin":0.0,"xmax":0.0,"ymax":0.0,"xcenter":0.0,"ycenter":0.0},{"label":1,"score":1.0,"xmin":0.0,"ymin":0.0,"xmax":0.0,* "ymax":0.0,"xcenter":0.0,"ycenter":0.0}],"best":{"label":1,"score":1.0,"xmin":0.0,"ymin":0.0,"xmax":0.0,"ymax":0.0,"xcenter":0.0,"ycenter":0.0},"fps":0.0}
*/
EXPORT_API const char* FaceDetectorResults(FrameInfo *frameInfo, bool getPreview, bool drawBestFaceInPreview, bool drawAllFacesInPreview, float faceScoreThreshold, bool useDepth, bool retrieveInformation, bool useIMU, int deviceNum)
{
using namespace std;
using namespace std::chrono;
// Get device deviceNum
std::shared_ptr<dai::Device> device = GetDevice(deviceNum);
// Device no available
if (device == NULL)
{
char* ret = (char*)::malloc(strlen("{\"error\":\"NO_DEVICE\"}"));
::memcpy(ret, "{\"error\":\"NO_DEVICE\"}",strlen("{\"error\":\"NO_DEVICE\"}"));
ret[strlen("{\"error\":\"NO_DEVICE\"}")] = 0;
return ret;
}
// If device deviceNum is running pipeline
if (IsDeviceRunning(deviceNum))
{
// preview image
cv::Mat frame;
std::shared_ptr<dai::ImgFrame> imgFrame;
// other images
cv::Mat depthFrame, depthFrameOrig, dispFrameOrig, dispFrame, monoRFrameOrig, monoRFrame, monoLFrameOrig, monoLFrame;
// face info
nlohmann::json faceDetectorJson = {};
std::shared_ptr<dai::DataOutputQueue> preview;
std::shared_ptr<dai::DataOutputQueue> depthQueue;
// face detector results
auto detections = device->getOutputQueue("detections",1,false);
// if preview image is requested. True in this case.
if (getPreview) preview = device->getOutputQueue("preview",1,false);
// if depth images are requested. All images.
if (useDepth) depthQueue = device->getOutputQueue("depth", 1, false);
int countd;
if (getPreview)
{
auto imgFrames = preview->tryGetAll<dai::ImgFrame>();
countd = imgFrames.size();
if (countd > 0) {
auto imgFrame = imgFrames[countd-1];
if(imgFrame){
frame = toMat(imgFrame->getData(), imgFrame->getWidth(), imgFrame->getHeight(), 3, 1);
}
}
}
vector<std::shared_ptr<dai::ImgFrame>> imgDepthFrames,imgDispFrames,imgMonoRFrames,imgMonoLFrames;
std::shared_ptr<dai::ImgFrame> imgDepthFrame,imgDispFrame,imgMonoRFrame,imgMonoLFrame;
int count;
// In this case we allocate before Texture2D (ARGB32) and memcpy pointer data
if (useDepth)
{
// Depth
imgDepthFrames = depthQueue->tryGetAll<dai::ImgFrame>();
count = imgDepthFrames.size();
if (count > 0)
{
imgDepthFrame = imgDepthFrames[count-1];
depthFrameOrig = imgDepthFrame->getFrame();
cv::normalize(depthFrameOrig, depthFrame, 255, 0, cv::NORM_INF, CV_8UC1);
cv::equalizeHist(depthFrame, depthFrame);
cv::cvtColor(depthFrame, depthFrame, cv::COLOR_GRAY2BGR);
}
}
// Face detection results
struct Detection {
unsigned int label;
float score;
float x_min;
float y_min;
float x_max;
float y_max;
};
vector<Detection> dets;
auto det = detections->get<dai::NNData>();
std::vector<float> detData = det->getFirstLayerFp16();
float maxScore = 0.0;
int maxPos = 0;
nlohmann::json facesArr = {};
nlohmann::json bestFace = {};
if(detData.size() > 0){
int i = 0;
while (detData[i*7] != -1.0f && i*7 < (int)detData.size()) {
Detection d;
d.label = detData[i*7 + 1];
d.score = detData[i*7 + 2];
if (d.score > maxScore)
{
maxScore = d.score;
maxPos = i;
}
d.x_min = detData[i*7 + 3];
d.y_min = detData[i*7 + 4];
d.x_max = detData[i*7 + 5];
d.y_max = detData[i*7 + 6];
i++;
dets.push_back(d);
nlohmann::json face;
face["label"] = d.label;
face["score"] = d.score;
face["xmin"] = d.x_min;
face["ymin"] = d.y_min;
face["xmax"] = d.x_max;
face["ymax"] = d.y_max;
int x1 = d.x_min * frame.cols;
int y1 = d.y_min * frame.rows;
int x2 = d.x_max * frame.cols;
int y2 = d.y_max * frame.rows;
int mx = x1 + ((x2 - x1) / 2);
int my = y1 + ((y2 - y1) / 2);
face["xcenter"] = mx;
face["ycenter"] = my;
if (faceScoreThreshold <= d.score)
{
if (getPreview && countd > 0 && drawAllFacesInPreview) cv::rectangle(frame, cv::Rect(cv::Point(x1, y1), cv::Point(x2, y2)), cv::Scalar(255,255,255));
if (useDepth && count>0)
{
auto spatialData = computeDepth(mx,my,frame.rows,depthFrameOrig);
for(auto depthData : spatialData) {
auto roi = depthData.config.roi;
roi = roi.denormalize(depthFrame.cols, depthFrame.rows);
face["X"] = (int)depthData.spatialCoordinates.x;
face["Y"] = (int)depthData.spatialCoordinates.y;
face["Z"] = (int)depthData.spatialCoordinates.z;
}
}
facesArr.push_back(face);
}
}
}
int i = 0;
for(const auto& d : dets){
if (i == maxPos)
{
int x1 = d.x_min * frame.cols;
int y1 = d.y_min * frame.rows;
int x2 = d.x_max * frame.cols;
int y2 = d.y_max * frame.rows;
int mx = x1 + ((x2 - x1) / 2);
int my = y1 + ((y2 - y1) / 2);
// m_mx = mx;
// m_my = my;
if (faceScoreThreshold <= d.score)
{
bestFace["label"] = d.label;
bestFace["score"] = d.score;
bestFace["xmin"] = d.x_min;
bestFace["ymin"] = d.y_min;
bestFace["xmax"] = d.x_max;
bestFace["ymax"] = d.y_max;
bestFace["xcenter"] = mx;
bestFace["ycenter"] = my;
if (useDepth && count>0)
{
auto spatialData = computeDepth(mx,my,frame.rows,depthFrameOrig);
for(auto depthData : spatialData) {
auto roi = depthData.config.roi;
roi = roi.denormalize(depthFrame.cols, depthFrame.rows);
bestFace["X"] = (int)depthData.spatialCoordinates.x;
bestFace["Y"] = (int)depthData.spatialCoordinates.y;
bestFace["Z"] = (int)depthData.spatialCoordinates.z;
}
}
if (getPreview && countd > 0 && drawBestFaceInPreview) cv::rectangle(frame, cv::Rect(cv::Point(x1, y1), cv::Point(x2, y2)), cv::Scalar(255,255,255));
}
}
i++;
}
if (getPreview && countd>0) toARGB(frame,frameInfo->colorPreviewData);
faceDetectorJson["faces"] = facesArr;
faceDetectorJson["best"] = bestFace;
// SYSTEM INFORMATION
if (retrieveInformation) faceDetectorJson["sysinfo"] = GetDeviceInfo(device);
// IMU
if (useIMU) faceDetectorJson["imu"] = GetIMU(device);
char* ret = (char*)::malloc(strlen(faceDetectorJson.dump().c_str())+1);
::memcpy(ret, faceDetectorJson.dump().c_str(),strlen(faceDetectorJson.dump().c_str()));
ret[strlen(faceDetectorJson.dump().c_str())] = 0;
return ret;
}
char* ret = (char*)::malloc(strlen("{\"error\":\"DEVICE_NOT_RUNNING\"}"));
::memcpy(ret, "{\"error\":\"DEVICE_NOT_RUNNING\"}",strlen("{\"error\":\"DEVICE_NOT_RUNNING\"}"));
ret[strlen("{\"error\":\"DEVICE_NOT_RUNNING\"}")] = 0;
return ret;
}
} | 42.808153 | 327 | 0.563554 |
69a9b34733d8e2c7b1fb7c8680cde5cc71073bb5 | 37,002 | cpp | C++ | packages/monte_carlo/active_region/core/test/tstIndependentPhaseSpaceDimensionDistribution.cpp | bam241/FRENSIE | e1760cd792928699c84f2bdce70ff54228e88094 | [
"BSD-3-Clause"
] | 10 | 2019-11-14T19:58:30.000Z | 2021-04-04T17:44:09.000Z | packages/monte_carlo/active_region/core/test/tstIndependentPhaseSpaceDimensionDistribution.cpp | bam241/FRENSIE | e1760cd792928699c84f2bdce70ff54228e88094 | [
"BSD-3-Clause"
] | 43 | 2020-03-03T19:59:20.000Z | 2021-09-08T03:36:08.000Z | packages/monte_carlo/active_region/core/test/tstIndependentPhaseSpaceDimensionDistribution.cpp | bam241/FRENSIE | e1760cd792928699c84f2bdce70ff54228e88094 | [
"BSD-3-Clause"
] | 6 | 2020-02-12T17:37:07.000Z | 2020-09-08T18:59:51.000Z | //---------------------------------------------------------------------------//
//!
//! \file tstIndependentPhaseSpaceDimensionDistribution.cpp
//! \author Alex Robinson
//! \brief Independent phase space dimension distribution unit tests
//!
//---------------------------------------------------------------------------//
// Std Lib Includes
#include <iostream>
#include <memory>
// FRENSIE Includes
#include "MonteCarlo_IndependentPhaseSpaceDimensionDistribution.hpp"
#include "MonteCarlo_PhaseSpaceDimensionTraits.hpp"
#include "Utility_BasicCartesianCoordinateConversionPolicy.hpp"
#include "Utility_UniformDistribution.hpp"
#include "Utility_DeltaDistribution.hpp"
#include "Utility_DiscreteDistribution.hpp"
#include "Utility_ExponentialDistribution.hpp"
#include "Utility_RandomNumberGenerator.hpp"
#include "Utility_UnitTestHarnessWithMain.hpp"
#include "ArchiveTestHelpers.hpp"
//---------------------------------------------------------------------------//
// Testing Types
//---------------------------------------------------------------------------//
using namespace MonteCarlo;
typedef std::tuple<std::integral_constant<PhaseSpaceDimension,PRIMARY_SPATIAL_DIMENSION>,
std::integral_constant<PhaseSpaceDimension,SECONDARY_SPATIAL_DIMENSION>,
std::integral_constant<PhaseSpaceDimension,TERTIARY_SPATIAL_DIMENSION>,
std::integral_constant<PhaseSpaceDimension,PRIMARY_DIRECTIONAL_DIMENSION>,
std::integral_constant<PhaseSpaceDimension,SECONDARY_DIRECTIONAL_DIMENSION>,
std::integral_constant<PhaseSpaceDimension,TERTIARY_DIRECTIONAL_DIMENSION>,
std::integral_constant<PhaseSpaceDimension,ENERGY_DIMENSION>,
std::integral_constant<PhaseSpaceDimension,TIME_DIMENSION>
> TestPhaseSpaceDimensionsNoWeight;
typedef decltype(std::tuple_cat(TestPhaseSpaceDimensionsNoWeight(),std::make_tuple(std::integral_constant<PhaseSpaceDimension,WEIGHT_DIMENSION>()))) TestPhaseSpaceDimensions;
typedef TestArchiveHelper::TestArchives TestArchives;
//---------------------------------------------------------------------------//
// Testing Variables.
//---------------------------------------------------------------------------//
std::shared_ptr<const Utility::SpatialCoordinateConversionPolicy>
spatial_coord_conversion_policy( new Utility::BasicCartesianCoordinateConversionPolicy );
std::shared_ptr<const Utility::DirectionalCoordinateConversionPolicy>
directional_coord_conversion_policy( new Utility::BasicCartesianCoordinateConversionPolicy );
//---------------------------------------------------------------------------//
// Tests.
//---------------------------------------------------------------------------//
// Test that the dimension can be returned
FRENSIE_UNIT_TEST_TEMPLATE( IndependentPhaseSpaceDimensionDistribution,
getDimension,
TestPhaseSpaceDimensions )
{
FETCH_TEMPLATE_PARAM( 0, WrappedDimension );
constexpr PhaseSpaceDimension Dimension = WrappedDimension::value;
std::shared_ptr<const Utility::UnivariateDistribution> basic_distribution(
new Utility::UniformDistribution( 0.5, 1.5, 0.5 ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
dimension_distribution( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
FRENSIE_CHECK_EQUAL( dimension_distribution->getDimension(), Dimension );
}
//---------------------------------------------------------------------------//
// Test that the dimension class can be returned
FRENSIE_UNIT_TEST_TEMPLATE( IndependentPhaseSpaceDimensionDistribution,
getDimensionClass,
TestPhaseSpaceDimensions )
{
FETCH_TEMPLATE_PARAM( 0, WrappedDimension );
constexpr PhaseSpaceDimension Dimension = WrappedDimension::value;
std::shared_ptr<const Utility::UnivariateDistribution> basic_distribution(
new Utility::UniformDistribution( 0.5, 1.5, 0.5 ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
dimension_distribution( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
FRENSIE_CHECK_EQUAL( dimension_distribution->getDimensionClass(),
MonteCarlo::PhaseSpaceDimensionTraits<Dimension>::getClass() );
}
//---------------------------------------------------------------------------//
// Test that the distribution type name can be returned
FRENSIE_UNIT_TEST_TEMPLATE( IndependentPhaseSpaceDimensionDistribution,
getDistributionTypeName,
TestPhaseSpaceDimensions )
{
FETCH_TEMPLATE_PARAM( 0, WrappedDimension );
constexpr PhaseSpaceDimension Dimension = WrappedDimension::value;
std::shared_ptr<const Utility::UnivariateDistribution> basic_distribution(
new Utility::UniformDistribution( 0.5, 1.5, 0.5 ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
dimension_distribution( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
FRENSIE_CHECK_EQUAL( dimension_distribution->getDistributionTypeName(),
"Uniform Distribution" );
}
//---------------------------------------------------------------------------//
// Test if the distribution is independent
FRENSIE_UNIT_TEST_TEMPLATE( IndependentPhaseSpaceDimensionDistribution,
isIndependent,
TestPhaseSpaceDimensions )
{
FETCH_TEMPLATE_PARAM( 0, WrappedDimension );
constexpr PhaseSpaceDimension Dimension = WrappedDimension::value;
std::shared_ptr<const Utility::UnivariateDistribution> basic_distribution(
new Utility::UniformDistribution( 0.5, 1.5, 0.5 ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
dimension_distribution( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
FRENSIE_CHECK( dimension_distribution->isIndependent() );
}
//---------------------------------------------------------------------------//
// Test if the distribution is dependent on another dimension
FRENSIE_UNIT_TEST_TEMPLATE( IndependentPhaseSpaceDimensionDistribution,
isDependentOnDimension,
TestPhaseSpaceDimensions )
{
FETCH_TEMPLATE_PARAM( 0, WrappedDimension );
constexpr PhaseSpaceDimension Dimension = WrappedDimension::value;
std::shared_ptr<const Utility::UnivariateDistribution> basic_distribution(
new Utility::UniformDistribution( 0.5, 1.5, 0.5 ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
dimension_distribution( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
FRENSIE_CHECK( !dimension_distribution->isDependentOnDimension( MonteCarlo::PRIMARY_SPATIAL_DIMENSION ) );
FRENSIE_CHECK( !dimension_distribution->isDependentOnDimension( MonteCarlo::SECONDARY_SPATIAL_DIMENSION ) );
FRENSIE_CHECK( !dimension_distribution->isDependentOnDimension( MonteCarlo::TERTIARY_SPATIAL_DIMENSION ) );
FRENSIE_CHECK( !dimension_distribution->isDependentOnDimension( MonteCarlo::PRIMARY_DIRECTIONAL_DIMENSION ) );
FRENSIE_CHECK( !dimension_distribution->isDependentOnDimension( MonteCarlo::SECONDARY_DIRECTIONAL_DIMENSION ) );
FRENSIE_CHECK( !dimension_distribution->isDependentOnDimension( MonteCarlo::TERTIARY_DIRECTIONAL_DIMENSION ) );
FRENSIE_CHECK( !dimension_distribution->isDependentOnDimension( MonteCarlo::ENERGY_DIMENSION ) );
FRENSIE_CHECK( !dimension_distribution->isDependentOnDimension( MonteCarlo::TIME_DIMENSION ) );
FRENSIE_CHECK( !dimension_distribution->isDependentOnDimension( MonteCarlo::WEIGHT_DIMENSION ) );
}
//---------------------------------------------------------------------------//
// Test if the distribution is continuous
FRENSIE_UNIT_TEST_TEMPLATE( IndependentPhaseSpaceDimensionDistribution,
isContinuous,
TestPhaseSpaceDimensions )
{
FETCH_TEMPLATE_PARAM( 0, WrappedDimension );
constexpr PhaseSpaceDimension Dimension = WrappedDimension::value;
std::shared_ptr<const Utility::UnivariateDistribution> basic_distribution(
new Utility::UniformDistribution( 0.5, 1.5, 0.5 ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
dimension_distribution( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
FRENSIE_CHECK( dimension_distribution->isContinuous() );
basic_distribution.reset( new Utility::DeltaDistribution( 1.0 ) );
dimension_distribution.reset( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
FRENSIE_CHECK( !dimension_distribution->isContinuous() );
}
//---------------------------------------------------------------------------//
// Test if the distribution is tabular
FRENSIE_UNIT_TEST_TEMPLATE( IndependentPhaseSpaceDimensionDistribution,
isTabular,
TestPhaseSpaceDimensions )
{
FETCH_TEMPLATE_PARAM( 0, WrappedDimension );
constexpr PhaseSpaceDimension Dimension = WrappedDimension::value;
std::shared_ptr<const Utility::UnivariateDistribution> basic_distribution(
new Utility::UniformDistribution( 0.5, 1.5, 0.5 ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
dimension_distribution( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
FRENSIE_CHECK( dimension_distribution->isTabular() );
basic_distribution.reset( new Utility::ExponentialDistribution( 1.0, 1.0 ) );
dimension_distribution.reset( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
FRENSIE_CHECK( !dimension_distribution->isTabular() );
}
//---------------------------------------------------------------------------//
// Test if the distribution is uniform
FRENSIE_UNIT_TEST_TEMPLATE( IndependentPhaseSpaceDimensionDistribution,
isUniform,
TestPhaseSpaceDimensions )
{
FETCH_TEMPLATE_PARAM( 0, WrappedDimension );
constexpr PhaseSpaceDimension Dimension = WrappedDimension::value;
std::shared_ptr<const Utility::UnivariateDistribution> basic_distribution(
new Utility::UniformDistribution( 0.5, 1.5, 0.5 ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
dimension_distribution( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
FRENSIE_CHECK( dimension_distribution->isUniform() );
basic_distribution.reset( new Utility::ExponentialDistribution( 1.0, 1.0 ) );
dimension_distribution.reset( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
FRENSIE_CHECK( !dimension_distribution->isUniform() );
}
//---------------------------------------------------------------------------//
// Test if the distribution has the specified form
FRENSIE_UNIT_TEST_TEMPLATE( IndependentPhaseSpaceDimensionDistribution,
hasForm,
TestPhaseSpaceDimensions )
{
FETCH_TEMPLATE_PARAM( 0, WrappedDimension );
constexpr PhaseSpaceDimension Dimension = WrappedDimension::value;
std::shared_ptr<const Utility::UnivariateDistribution> basic_distribution(
new Utility::UniformDistribution( 0.5, 1.5, 0.5 ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
dimension_distribution( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
FRENSIE_CHECK( dimension_distribution->hasForm( Utility::UNIFORM_DISTRIBUTION ) );
FRENSIE_CHECK( !dimension_distribution->hasForm( Utility::EXPONENTIAL_DISTRIBUTION ) );
basic_distribution.reset( new Utility::ExponentialDistribution( 1.0, 1.0 ) );
dimension_distribution.reset( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
FRENSIE_CHECK( !dimension_distribution->hasForm( Utility::UNIFORM_DISTRIBUTION ) );
FRENSIE_CHECK( dimension_distribution->hasForm( Utility::EXPONENTIAL_DISTRIBUTION ) );
}
//---------------------------------------------------------------------------//
// Test if the distribution can be evaluated without a cascade
FRENSIE_UNIT_TEST_TEMPLATE( IndependentPhaseSpaceDimensionDistribution,
evaluateWithoutCascade,
TestPhaseSpaceDimensions )
{
FETCH_TEMPLATE_PARAM( 0, WrappedDimension );
constexpr PhaseSpaceDimension Dimension = WrappedDimension::value;
std::shared_ptr<const Utility::UnivariateDistribution> basic_distribution(
new Utility::UniformDistribution( 0.5, 0.9, 0.5 ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
dimension_distribution( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
MonteCarlo::PhaseSpacePoint point( spatial_coord_conversion_policy,
directional_coord_conversion_policy );
setCoordinate<Dimension>( point, 0.1 );
FRENSIE_CHECK_EQUAL( dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
setCoordinate<Dimension>( point, 0.5 );
FRENSIE_CHECK_EQUAL( dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<Dimension>( point, 0.7 );
FRENSIE_CHECK_EQUAL( dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<Dimension>( point, 0.9 );
FRENSIE_CHECK_EQUAL( dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<Dimension>( point, 1.0 );
FRENSIE_CHECK_EQUAL( dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
}
//---------------------------------------------------------------------------//
// Test if the distribution can be sampled without a cascade
FRENSIE_UNIT_TEST_TEMPLATE( IndependentPhaseSpaceDimensionDistribution,
sampleWithoutCascade,
TestPhaseSpaceDimensionsNoWeight )
{
FETCH_TEMPLATE_PARAM( 0, WrappedDimension );
constexpr PhaseSpaceDimension Dimension = WrappedDimension::value;
std::shared_ptr<const Utility::UnivariateDistribution> basic_distribution(
new Utility::UniformDistribution( 0.1, 0.9, 0.5 ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
dimension_distribution( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
MonteCarlo::PhaseSpacePoint point( spatial_coord_conversion_policy,
directional_coord_conversion_policy );
std::vector<double> fake_stream( 3 );
fake_stream[0] = 0.0;
fake_stream[1] = 0.5;
fake_stream[2] = 1.0 - 1e-15;
Utility::RandomNumberGenerator::setFakeStream( fake_stream );
dimension_distribution->sampleWithoutCascade( point );
FRENSIE_CHECK_EQUAL( getCoordinate<Dimension>( point ), 0.1 );
FRENSIE_CHECK_EQUAL( getCoordinateWeight<Dimension>( point ), 1.0 );
dimension_distribution->sampleWithoutCascade( point );
FRENSIE_CHECK_EQUAL( getCoordinate<Dimension>( point ), 0.5 );
FRENSIE_CHECK_EQUAL( getCoordinateWeight<Dimension>( point ), 1.0 );
dimension_distribution->sampleWithoutCascade( point );
FRENSIE_CHECK_FLOATING_EQUALITY( getCoordinate<Dimension>( point ), 0.9, 1e-15 );
FRENSIE_CHECK_EQUAL( getCoordinateWeight<Dimension>( point ), 1.0 );
}
//---------------------------------------------------------------------------//
// Test if the distribution can be sampled without a cascade and the
// trials can be counted
FRENSIE_UNIT_TEST_TEMPLATE( IndependentPhaseSpaceDimensionDistribution,
sampleAndRecordTrialsWithoutCascade,
TestPhaseSpaceDimensionsNoWeight )
{
FETCH_TEMPLATE_PARAM( 0, WrappedDimension );
constexpr PhaseSpaceDimension Dimension = WrappedDimension::value;
std::shared_ptr<const Utility::UnivariateDistribution> basic_distribution(
new Utility::UniformDistribution( 0.1, 0.9, 0.5 ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
dimension_distribution( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
MonteCarlo::PhaseSpacePoint point( spatial_coord_conversion_policy,
directional_coord_conversion_policy );
typename MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>::Counter trials = 0;
std::vector<double> fake_stream( 3 );
fake_stream[0] = 0.0;
fake_stream[1] = 0.5;
fake_stream[2] = 1.0 - 1e-15;
Utility::RandomNumberGenerator::setFakeStream( fake_stream );
dimension_distribution->sampleAndRecordTrialsWithoutCascade( point, trials );
FRENSIE_CHECK_EQUAL( getCoordinate<Dimension>( point ), 0.1 );
FRENSIE_CHECK_EQUAL( getCoordinateWeight<Dimension>( point ), 1.0 );
FRENSIE_CHECK_EQUAL( trials, 1 );
dimension_distribution->sampleAndRecordTrialsWithoutCascade( point, trials );
FRENSIE_CHECK_EQUAL( getCoordinate<Dimension>( point ), 0.5 );
FRENSIE_CHECK_EQUAL( getCoordinateWeight<Dimension>( point ), 1.0 );
FRENSIE_CHECK_EQUAL( trials, 2 );
dimension_distribution->sampleAndRecordTrialsWithoutCascade( point, trials );
FRENSIE_CHECK_FLOATING_EQUALITY( getCoordinate<Dimension>( point ), 0.9, 1e-15 );
FRENSIE_CHECK_EQUAL( getCoordinateWeight<Dimension>( point ), 1.0 );
FRENSIE_CHECK_EQUAL( trials, 3 );
}
//---------------------------------------------------------------------------//
// Test that the dimension value can be set and weighted appropriately
FRENSIE_UNIT_TEST_TEMPLATE( IndependentPhaseSpaceDimensionDistribution,
setDimensionValueAndApplyWeight,
TestPhaseSpaceDimensionsNoWeight )
{
FETCH_TEMPLATE_PARAM( 0, WrappedDimension );
constexpr PhaseSpaceDimension Dimension = WrappedDimension::value;
std::shared_ptr<const Utility::UnivariateDistribution> basic_distribution(
new Utility::UniformDistribution( 0.1, 0.9, 0.5 ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
dimension_distribution( new MonteCarlo::IndependentPhaseSpaceDimensionDistribution<Dimension>( basic_distribution ) );
MonteCarlo::PhaseSpacePoint point( spatial_coord_conversion_policy,
directional_coord_conversion_policy );
dimension_distribution->setDimensionValueAndApplyWeight( point, 0.1 );
FRENSIE_CHECK_EQUAL( getCoordinate<Dimension>( point ), 0.1 );
FRENSIE_CHECK_EQUAL( getCoordinateWeight<Dimension>( point ), 1.25 );
dimension_distribution->setDimensionValueAndApplyWeight( point, 0.5 );
FRENSIE_CHECK_EQUAL( getCoordinate<Dimension>( point ), 0.5 );
FRENSIE_CHECK_EQUAL( getCoordinateWeight<Dimension>( point ), 1.25 );
dimension_distribution->setDimensionValueAndApplyWeight( point, 0.9 );
FRENSIE_CHECK_EQUAL( getCoordinate<Dimension>( point ), 0.9 );
FRENSIE_CHECK_EQUAL( getCoordinateWeight<Dimension>( point ), 1.25 );
}
//---------------------------------------------------------------------------//
// Check that the distribution can be archived
FRENSIE_UNIT_TEST_TEMPLATE_EXPAND( PhaseSpaceDimension,
archive,
TestArchives )
{
FETCH_TEMPLATE_PARAM( 0, RawOArchive );
FETCH_TEMPLATE_PARAM( 1, RawIArchive );
typedef typename std::remove_pointer<RawOArchive>::type OArchive;
typedef typename std::remove_pointer<RawIArchive>::type IArchive;
std::string archive_base_name( "test_independent_phase_dimension_distribution" );
std::ostringstream archive_ostream;
{
std::unique_ptr<OArchive> oarchive;
createOArchive( archive_base_name, archive_ostream, oarchive );
std::shared_ptr<const Utility::UnivariateDistribution> basic_distribution(
new Utility::UniformDistribution( 0.5, 0.9, 0.5 ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
primary_spatial_dimension_distribution( new MonteCarlo::IndependentPrimarySpatialDimensionDistribution( basic_distribution ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
secondary_spatial_dimension_distribution( new MonteCarlo::IndependentSecondarySpatialDimensionDistribution( basic_distribution ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
tertiary_spatial_dimension_distribution( new MonteCarlo::IndependentTertiarySpatialDimensionDistribution( basic_distribution ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
primary_directional_dimension_distribution( new MonteCarlo::IndependentPrimaryDirectionalDimensionDistribution( basic_distribution ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
secondary_directional_dimension_distribution( new MonteCarlo::IndependentSecondaryDirectionalDimensionDistribution( basic_distribution ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
tertiary_directional_dimension_distribution( new MonteCarlo::IndependentTertiaryDirectionalDimensionDistribution( basic_distribution ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
energy_dimension_distribution( new MonteCarlo::IndependentEnergyDimensionDistribution( basic_distribution ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
time_dimension_distribution( new MonteCarlo::IndependentTimeDimensionDistribution( basic_distribution ) );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
weight_dimension_distribution( new MonteCarlo::IndependentWeightDimensionDistribution( basic_distribution ) );
FRENSIE_REQUIRE_NO_THROW( (*oarchive) << BOOST_SERIALIZATION_NVP(primary_spatial_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*oarchive) << BOOST_SERIALIZATION_NVP(secondary_spatial_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*oarchive) << BOOST_SERIALIZATION_NVP(tertiary_spatial_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*oarchive) << BOOST_SERIALIZATION_NVP(primary_directional_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*oarchive) << BOOST_SERIALIZATION_NVP(secondary_directional_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*oarchive) << BOOST_SERIALIZATION_NVP(tertiary_directional_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*oarchive) << BOOST_SERIALIZATION_NVP(energy_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*oarchive) << BOOST_SERIALIZATION_NVP(time_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*oarchive) << BOOST_SERIALIZATION_NVP(weight_dimension_distribution) );
}
// Copy the archive ostream to an istream
std::istringstream archive_istream( archive_ostream.str() );
// Load the archived distributions
std::unique_ptr<IArchive> iarchive;
createIArchive( archive_istream, iarchive );
std::shared_ptr<const MonteCarlo::PhaseSpaceDimensionDistribution>
primary_spatial_dimension_distribution,
secondary_spatial_dimension_distribution,
tertiary_spatial_dimension_distribution,
primary_directional_dimension_distribution,
secondary_directional_dimension_distribution,
tertiary_directional_dimension_distribution,
energy_dimension_distribution,
time_dimension_distribution,
weight_dimension_distribution;
FRENSIE_REQUIRE_NO_THROW( (*iarchive) >> BOOST_SERIALIZATION_NVP(primary_spatial_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*iarchive) >> BOOST_SERIALIZATION_NVP(secondary_spatial_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*iarchive) >> BOOST_SERIALIZATION_NVP(tertiary_spatial_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*iarchive) >> BOOST_SERIALIZATION_NVP(primary_directional_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*iarchive) >> BOOST_SERIALIZATION_NVP(secondary_directional_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*iarchive) >> BOOST_SERIALIZATION_NVP(tertiary_directional_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*iarchive) >> BOOST_SERIALIZATION_NVP(energy_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*iarchive) >> BOOST_SERIALIZATION_NVP(time_dimension_distribution) );
FRENSIE_REQUIRE_NO_THROW( (*iarchive) >> BOOST_SERIALIZATION_NVP(weight_dimension_distribution) );
iarchive.reset();
{
FRENSIE_CHECK_EQUAL( primary_spatial_dimension_distribution->getDimension(),
PRIMARY_SPATIAL_DIMENSION );
MonteCarlo::PhaseSpacePoint point( spatial_coord_conversion_policy,
directional_coord_conversion_policy );
setCoordinate<PRIMARY_SPATIAL_DIMENSION>( point, 0.1 );
FRENSIE_CHECK_EQUAL( primary_spatial_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
setCoordinate<PRIMARY_SPATIAL_DIMENSION>( point, 0.5 );
FRENSIE_CHECK_EQUAL( primary_spatial_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<PRIMARY_SPATIAL_DIMENSION>( point, 0.7 );
FRENSIE_CHECK_EQUAL( primary_spatial_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<PRIMARY_SPATIAL_DIMENSION>( point, 0.9 );
FRENSIE_CHECK_EQUAL( primary_spatial_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<PRIMARY_SPATIAL_DIMENSION>( point, 1.0 );
FRENSIE_CHECK_EQUAL( primary_spatial_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
}
{
FRENSIE_CHECK_EQUAL( secondary_spatial_dimension_distribution->getDimension(),
SECONDARY_SPATIAL_DIMENSION );
MonteCarlo::PhaseSpacePoint point( spatial_coord_conversion_policy,
directional_coord_conversion_policy );
setCoordinate<SECONDARY_SPATIAL_DIMENSION>( point, 0.1 );
FRENSIE_CHECK_EQUAL( secondary_spatial_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
setCoordinate<SECONDARY_SPATIAL_DIMENSION>( point, 0.5 );
FRENSIE_CHECK_EQUAL( secondary_spatial_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<SECONDARY_SPATIAL_DIMENSION>( point, 0.7 );
FRENSIE_CHECK_EQUAL( secondary_spatial_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<SECONDARY_SPATIAL_DIMENSION>( point, 0.9 );
FRENSIE_CHECK_EQUAL( secondary_spatial_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<SECONDARY_SPATIAL_DIMENSION>( point, 1.0 );
FRENSIE_CHECK_EQUAL( secondary_spatial_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
}
{
FRENSIE_CHECK_EQUAL( tertiary_spatial_dimension_distribution->getDimension(),
TERTIARY_SPATIAL_DIMENSION );
MonteCarlo::PhaseSpacePoint point( spatial_coord_conversion_policy,
directional_coord_conversion_policy );
setCoordinate<TERTIARY_SPATIAL_DIMENSION>( point, 0.1 );
FRENSIE_CHECK_EQUAL( tertiary_spatial_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
setCoordinate<TERTIARY_SPATIAL_DIMENSION>( point, 0.5 );
FRENSIE_CHECK_EQUAL( tertiary_spatial_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<TERTIARY_SPATIAL_DIMENSION>( point, 0.7 );
FRENSIE_CHECK_EQUAL( tertiary_spatial_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<TERTIARY_SPATIAL_DIMENSION>( point, 0.9 );
FRENSIE_CHECK_EQUAL( tertiary_spatial_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<TERTIARY_SPATIAL_DIMENSION>( point, 1.0 );
FRENSIE_CHECK_EQUAL( tertiary_spatial_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
}
{
FRENSIE_CHECK_EQUAL( primary_directional_dimension_distribution->getDimension(),
PRIMARY_DIRECTIONAL_DIMENSION );
MonteCarlo::PhaseSpacePoint point( spatial_coord_conversion_policy,
directional_coord_conversion_policy );
setCoordinate<PRIMARY_DIRECTIONAL_DIMENSION>( point, 0.1 );
FRENSIE_CHECK_EQUAL( primary_directional_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
setCoordinate<PRIMARY_DIRECTIONAL_DIMENSION>( point, 0.5 );
FRENSIE_CHECK_EQUAL( primary_directional_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<PRIMARY_DIRECTIONAL_DIMENSION>( point, 0.7 );
FRENSIE_CHECK_EQUAL( primary_directional_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<PRIMARY_DIRECTIONAL_DIMENSION>( point, 0.9 );
FRENSIE_CHECK_EQUAL( primary_directional_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<PRIMARY_DIRECTIONAL_DIMENSION>( point, 1.0 );
FRENSIE_CHECK_EQUAL( primary_directional_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
}
{
FRENSIE_CHECK_EQUAL( secondary_directional_dimension_distribution->getDimension(),
SECONDARY_DIRECTIONAL_DIMENSION );
MonteCarlo::PhaseSpacePoint point( spatial_coord_conversion_policy,
directional_coord_conversion_policy );
setCoordinate<SECONDARY_DIRECTIONAL_DIMENSION>( point, 0.1 );
FRENSIE_CHECK_EQUAL( secondary_directional_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
setCoordinate<SECONDARY_DIRECTIONAL_DIMENSION>( point, 0.5 );
FRENSIE_CHECK_EQUAL( secondary_directional_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<SECONDARY_DIRECTIONAL_DIMENSION>( point, 0.7 );
FRENSIE_CHECK_EQUAL( secondary_directional_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<SECONDARY_DIRECTIONAL_DIMENSION>( point, 0.9 );
FRENSIE_CHECK_EQUAL( secondary_directional_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<SECONDARY_DIRECTIONAL_DIMENSION>( point, 1.0 );
FRENSIE_CHECK_EQUAL( secondary_directional_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
}
{
FRENSIE_CHECK_EQUAL( tertiary_directional_dimension_distribution->getDimension(),
TERTIARY_DIRECTIONAL_DIMENSION );
MonteCarlo::PhaseSpacePoint point( spatial_coord_conversion_policy,
directional_coord_conversion_policy );
setCoordinate<TERTIARY_DIRECTIONAL_DIMENSION>( point, 0.1 );
FRENSIE_CHECK_EQUAL( tertiary_directional_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
setCoordinate<TERTIARY_DIRECTIONAL_DIMENSION>( point, 0.5 );
FRENSIE_CHECK_EQUAL( tertiary_directional_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<TERTIARY_DIRECTIONAL_DIMENSION>( point, 0.7 );
FRENSIE_CHECK_EQUAL( tertiary_directional_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<TERTIARY_DIRECTIONAL_DIMENSION>( point, 0.9 );
FRENSIE_CHECK_EQUAL( tertiary_directional_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<TERTIARY_DIRECTIONAL_DIMENSION>( point, 1.0 );
FRENSIE_CHECK_EQUAL( tertiary_directional_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
}
{
FRENSIE_CHECK_EQUAL( energy_dimension_distribution->getDimension(),
ENERGY_DIMENSION );
MonteCarlo::PhaseSpacePoint point( spatial_coord_conversion_policy,
directional_coord_conversion_policy );
setCoordinate<ENERGY_DIMENSION>( point, 0.1 );
FRENSIE_CHECK_EQUAL( energy_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
setCoordinate<ENERGY_DIMENSION>( point, 0.5 );
FRENSIE_CHECK_EQUAL( energy_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<ENERGY_DIMENSION>( point, 0.7 );
FRENSIE_CHECK_EQUAL( energy_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<ENERGY_DIMENSION>( point, 0.9 );
FRENSIE_CHECK_EQUAL( energy_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<ENERGY_DIMENSION>( point, 1.0 );
FRENSIE_CHECK_EQUAL( energy_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
}
{
FRENSIE_CHECK_EQUAL( time_dimension_distribution->getDimension(),
TIME_DIMENSION );
MonteCarlo::PhaseSpacePoint point( spatial_coord_conversion_policy,
directional_coord_conversion_policy );
setCoordinate<TIME_DIMENSION>( point, 0.1 );
FRENSIE_CHECK_EQUAL( time_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
setCoordinate<TIME_DIMENSION>( point, 0.5 );
FRENSIE_CHECK_EQUAL( time_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<TIME_DIMENSION>( point, 0.7 );
FRENSIE_CHECK_EQUAL( time_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<TIME_DIMENSION>( point, 0.9 );
FRENSIE_CHECK_EQUAL( time_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<TIME_DIMENSION>( point, 1.0 );
FRENSIE_CHECK_EQUAL( time_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
}
{
FRENSIE_CHECK_EQUAL( weight_dimension_distribution->getDimension(),
WEIGHT_DIMENSION );
MonteCarlo::PhaseSpacePoint point( spatial_coord_conversion_policy,
directional_coord_conversion_policy );
setCoordinate<WEIGHT_DIMENSION>( point, 0.1 );
FRENSIE_CHECK_EQUAL( weight_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
setCoordinate<WEIGHT_DIMENSION>( point, 0.5 );
FRENSIE_CHECK_EQUAL( weight_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<WEIGHT_DIMENSION>( point, 0.7 );
FRENSIE_CHECK_EQUAL( weight_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<WEIGHT_DIMENSION>( point, 0.9 );
FRENSIE_CHECK_EQUAL( weight_dimension_distribution->evaluateWithoutCascade( point ),
0.5 );
setCoordinate<WEIGHT_DIMENSION>( point, 1.0 );
FRENSIE_CHECK_EQUAL( weight_dimension_distribution->evaluateWithoutCascade( point ),
0.0 );
}
}
//---------------------------------------------------------------------------//
// Custom setup
//---------------------------------------------------------------------------//
FRENSIE_CUSTOM_UNIT_TEST_SETUP_BEGIN();
FRENSIE_CUSTOM_UNIT_TEST_INIT()
{
// Initialize the random number generator
Utility::RandomNumberGenerator::createStreams();
}
FRENSIE_CUSTOM_UNIT_TEST_SETUP_END();
//---------------------------------------------------------------------------//
// end tstIndependentPhaseSpaceDimensionDistribution.cpp
//---------------------------------------------------------------------------//
| 45.345588 | 174 | 0.690125 |
69af7ff8dd01d5795b5aad136359bafcaa259e47 | 2,604 | cc | C++ | projects/src/filesystem.cc | oliverlee/phobos | eba4adcca8f9f6afb060904b056596f383b52d8d | [
"BSD-2-Clause"
] | 2 | 2016-12-14T01:21:34.000Z | 2018-09-04T10:43:10.000Z | projects/src/filesystem.cc | oliverlee/phobos | eba4adcca8f9f6afb060904b056596f383b52d8d | [
"BSD-2-Clause"
] | 182 | 2016-04-25T13:36:52.000Z | 2020-07-20T10:24:18.000Z | projects/src/filesystem.cc | oliverlee/phobos | eba4adcca8f9f6afb060904b056596f383b52d8d | [
"BSD-2-Clause"
] | 6 | 2016-04-25T13:20:53.000Z | 2021-02-18T18:25:32.000Z | #include "filesystem.h"
#include "hal.h"
namespace {
FATFS SDC_FS;
bool fs_ready = false;
const unsigned int sdc_polling_interval = 10;
const unsigned int sdc_polling_delay = 10;
virtual_timer_t card_monitor_timer;
unsigned int debounce_counter;
/* SD card event sources */
event_source_t sdc_inserted_event;
event_source_t sdc_removed_event;
/* SD card event listeners */
event_listener_t el0;
event_listener_t el1;
void insertion_monitor_timer_callback(void *p) {
BaseBlockDevice *bbdp = reinterpret_cast<BaseBlockDevice*>(p);
chSysLockFromISR();
if (debounce_counter > 0) {
if (blkIsInserted(bbdp)) {
if (--debounce_counter == 0) {
chEvtBroadcastI(&sdc_inserted_event);
}
} else {
debounce_counter = sdc_polling_interval;
}
} else {
if (!blkIsInserted(bbdp)) {
debounce_counter = sdc_polling_interval;
chEvtBroadcastI(&sdc_removed_event);
}
}
chVTSetI(&card_monitor_timer, MS2ST(sdc_polling_delay), insertion_monitor_timer_callback, bbdp);
chSysUnlockFromISR();
}
void polling_monitor_timer_init(void *p) {
chEvtObjectInit(&sdc_inserted_event);
chEvtObjectInit(&sdc_removed_event);
chSysLock();
debounce_counter = sdc_polling_interval;
chVTSetI(&card_monitor_timer, MS2ST(sdc_polling_delay), insertion_monitor_timer_callback, p);
chSysUnlock();
}
/* Card insertion event. */
void InsertHandler(eventid_t id) {
FRESULT err;
(void)id;
/* On insertion SDC initialization and FS mount. */
if (sdcConnect(&SDCD1))
return;
err = f_mount(&SDC_FS, "/", 1);
if (err != FR_OK) {
sdcDisconnect(&SDCD1);
return;
}
fs_ready = TRUE;
}
/* Card removal event. */
void RemoveHandler(eventid_t id) {
(void)id;
sdcDisconnect(&SDCD1);
fs_ready = FALSE;
}
}
namespace filesystem {
const evhandler_t sdc_eventhandlers[] = {
InsertHandler,
RemoveHandler
};
void init() {
sdcStart(&SDCD1, nullptr); // Activate SDC driver 1, default configuration
polling_monitor_timer_init(&SDCD1); // Activate card insertion monitor
chEvtRegister(&sdc_inserted_event, &el0, 0);
chEvtRegister(&sdc_removed_event, &el1, 1);
}
bool ready() {
return fs_ready;
}
} // filesystem
| 26.571429 | 104 | 0.605991 |
69b1fc6fb53ab5c7d0ded5ebc70a22ffc81a667f | 20,238 | cpp | C++ | src/nextfodie/nex_request_handler.cpp | nexgus/nextfodie | 6ff71109b1d33d8dbf6cc9653783aa6d46bf31c6 | [
"MIT"
] | 1 | 2019-12-27T08:52:12.000Z | 2019-12-27T08:52:12.000Z | src/nextfodie/nex_request_handler.cpp | nexgus/nextfodie | 6ff71109b1d33d8dbf6cc9653783aa6d46bf31c6 | [
"MIT"
] | null | null | null | src/nextfodie/nex_request_handler.cpp | nexgus/nextfodie | 6ff71109b1d33d8dbf6cc9653783aa6d46bf31c6 | [
"MIT"
] | null | null | null | /*
*******************************************************************************
*
* Copyright (C) 2019 NEXAIOT Co., Ltd.
*
* 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 <algorithm>
#include <chrono>
#include <exception>
#include <iostream>
#include <limits>
#include <map>
#include <ostream>
#include <sstream>
#include <string>
#include <cpprest/containerstream.h>
#include <cpprest/http_listener.h>
#include <cpprest/json.h>
#include <MPFDParser-1.1.1/Parser.h>
#include "nex_inference_engine.h"
#include "nex_request_handler.h"
using namespace web;
namespace NexIE = NexInferenceEngine;
extern NexIE::ObjectDetection *ie;
typedef std::chrono::duration<double, std::ratio<1, 1000>> ms;
void handle_get(http_request request) {
http::status_code status = status_codes::OK;
json::value jsn;
auto uri = request.relative_uri();
auto path = uri.path();
std::cout << "---------- GET " << uri.to_string() << std::endl;
auto query = uri.query();
auto paths = http::uri::split_path(http::uri::decode(path));
if ((paths.size() != 1) || (paths[0] != "inference")) {
status = status_codes::NotFound;
std::ostringstream stream;
stream << "Path not found (" << path << ")";
jsn["error"] = json::value::string(stream.str());
std::cout << stream.str() << std::endl;
}
else {
auto queries = http::uri::split_query(query);
int possible_query_count = queries.size();
if ((possible_query_count < 1) || (possible_query_count > 3)) {
status = status_codes::BadRequest;
jsn["error"] = json::value::string("Bad Request (invalid query count)");
std::cout << "Bad Request (invalid query count)" << std::endl;
}
else {
if (queries.find("path") == queries.end()) {
status = status_codes::BadRequest;
jsn["error"] = json::value::string("Bad Request (cannot find path)");
std::cout << "Bad Request (cannot find path)" << std::endl;
}
else {
std::string::size_type sz;
auto imgpath = queries["path"];
float threshold = -1; // use default of inference engine
bool abs = false;
possible_query_count--;
if ((possible_query_count > 0) && (queries.find("threshold") != queries.end())) {
threshold = stof(queries["threshold"], &sz);
possible_query_count--;
if ((threshold < 0) || (threshold > 1)) {
threshold = -1;
}
}
if ((possible_query_count > 0) && (queries.find("abs") != queries.end())) {
if (queries["abs"] == "true") {
abs = true;
}
possible_query_count--;
}
if (possible_query_count > 0) {
status = status_codes::BadRequest;
jsn["error"] = json::value::string("Bad Request (unknown query)");
std::cout << "Bad Request (unknown query)" << std::endl;
}
else {
std::cout << "Inference request (image: " << imgpath << "; threshold: " << threshold
<< "; normalized: " << !abs << ")" << std::endl;
std::cout << "Infering..." << std::flush;
auto t0 = std::chrono::high_resolution_clock::now();
auto img = ie->openImage(imgpath);
auto t1 = std::chrono::high_resolution_clock::now();
auto inference = ie->infer(img);
auto t2 = std::chrono::high_resolution_clock::now();
jsn = ie->parse(inference, !abs, threshold);
auto t3 = std::chrono::high_resolution_clock::now();
status = status_codes::OK;
ms t_load = std::chrono::duration_cast<ms>(t1 - t0);
ms t_infer = std::chrono::duration_cast<ms>(t2 - t1);
ms t_parse = std::chrono::duration_cast<ms>(t3 - t2);
ms t_total = std::chrono::duration_cast<ms>(t3 - t0);
std::cout << " done (load: " << t_load.count() << "mS; infer: " << t_infer.count()
<< "mS; parse: " << t_parse.count() << "mS; total: " << t_total.count()
<< "mS)" << std::endl;
}
}
}
}
request.reply(status, jsn);
}
void handle_post(http_request request) {
auto t0 = std::chrono::high_resolution_clock::now();
http::status_code status = status_codes::OK;
json::value jsn;
auto uri = request.relative_uri();
auto path = uri.path();
std::cout << "---------- POST " << uri.to_string() << std::endl;
auto paths = http::uri::split_path(http::uri::decode(path));
if ((paths.size() != 1) || (paths[0] != "inference")) {
status = status_codes::NotFound;
std::ostringstream stream;
stream << "Path not found (" << path << ")";
jsn["error"] = json::value::string(stream.str());
std::cout << stream.str() << std::endl;
}
else {
http_headers headers = request.headers();
concurrency::streams::istream body = request.body();
char *img = NULL;
unsigned long img_size = 0;
double threshold = -1; // use default of inference engine
bool abs = false;
std::string img_filename;
if (headers.has("content-type")) {
auto parser = MPFD::Parser();
try {
parser.SetUploadedFilesStorage(MPFD::Parser::StoreUploadedFilesInMemory);
parser.SetMaxCollectedDataLength(std::numeric_limits<long>::max());
parser.SetContentType(headers["content-type"]);
// Move all body to parser to parse
// ref: https://docs.microsoft.com/zh-tw/previous-versions/jj950083%28v%3dvs.140%29
size_t total_read = 0;
auto content_length = headers.content_length();
while (total_read < content_length) {
concurrency::streams::container_buffer<std::string> isbuf; // in-stream buffer
size_t byte_read = body.read(isbuf, 16*1024).get();
total_read += byte_read;
const std::string &data = isbuf.collection();
parser.AcceptSomeData((const char*)data.c_str(), (long)byte_read);
}
// Validate parameters
std::map<std::string, MPFD::Field*> fields = parser.GetFieldsMap();
std::map<std::string, MPFD::Field*>::iterator it;
for (it=fields.begin(); it!=fields.end(); it++) {
if ((it->first == "image") && (fields[it->first]->GetType() == MPFD::Field::FileType)) {
img = fields[it->first]->GetFileContent();
img_size = fields[it->first]->GetFileContentSize();
img_filename = fields[it->first]->GetFileName();
}
else if ((it->first == "threshold") && (fields[it->first]->GetType() == MPFD::Field::TextType)) {
threshold = std::stod(fields[it->first]->GetTextTypeContent());
if ((threshold > 1) || (threshold < 0)) {
threshold = -1;
}
}
else if ((it->first == "abs") && (fields[it->first]->GetType() == MPFD::Field::TextType)) {
auto temp = fields[it->first]->GetTextTypeContent();
// convert content to lower case
std::for_each(temp.begin(), temp.end(), [](char& c) {
c = ::tolower(c);
});
if (temp == "true") {
abs = true;
}
}
else {
status = status_codes::BadRequest;
jsn["error"] = json::value::string("Invalid parameter");
std::cout << "Invalid parameter" << std::endl;
break;
}
}
if (status == status_codes::OK) {
if (img == NULL || img_size == 0) {
status = status_codes::BadRequest;
jsn["error"] = json::value::string("Cannot find image");
std::cout << "Cannot find image" << std::endl;
}
else {
std::cout << "Inference request (image size: " << img_size << "; threshold: " << threshold
<< "; normalized: " << !abs << ")" << std::endl;
std::cout << "Infering..." << std::flush;
auto t1 = std::chrono::high_resolution_clock::now();
auto cvimg = ie->openImage(img, (size_t)img_size);
auto t2 = std::chrono::high_resolution_clock::now();
auto inference = ie->infer(cvimg);
auto t3 = std::chrono::high_resolution_clock::now();
jsn = ie->parse(inference, !abs, threshold);
auto t4 = std::chrono::high_resolution_clock::now();
status = status_codes::OK;
ms t_rx = std::chrono::duration_cast<ms>(t1 - t0);
ms t_load = std::chrono::duration_cast<ms>(t2 - t1);
ms t_infer = std::chrono::duration_cast<ms>(t3 - t2);
ms t_parse = std::chrono::duration_cast<ms>(t4 - t3);
ms t_total = std::chrono::duration_cast<ms>(t4 - t0);
std::cout << " done (rx: " << t_rx.count() << "mS; load: " << t_load.count() << "mS; infer: " << t_infer.count()
<< "mS; parse: " << t_parse.count() << "mS; total: " << t_total.count() << "mS)" << std::endl;
}
}
}
catch (MPFD::Exception ex) {
status = status_codes::BadRequest;
jsn["error"] = json::value::string(ex.GetError());
std::cout << " " << ex.GetError() << std::endl;
}
catch (std::exception const &ex) {
status = status_codes::InternalError;
jsn["error"] = json::value::string(ex.what());
std::cout << " " << ex.what() << std::endl;
}
}
else {
status = status_codes::BadRequest;
jsn["error"] = json::value::string("Invalid header (cannot find content-type)");
std::cout << "Invalid header (cannot find content-type)" << std::endl;
}
}
request.reply(status, jsn);
}
void handle_put(http_request request) {
auto t0 = std::chrono::high_resolution_clock::now();
http::status_code status = status_codes::OK;
json::value jsn;
auto uri = request.relative_uri();
auto path = uri.path();
std::cout << "---------- PUT " << uri.to_string() << std::endl;
auto paths = http::uri::split_path(http::uri::decode(path));
if ((paths.size() != 1) || (paths[0] != "model" && paths[0] != "labelmap")) {
status = status_codes::NotFound;
std::ostringstream stream;
stream << "Path not found (" << path << ")";
jsn["error"] = json::value::string(stream.str());
std::cout << stream.str() << std::endl;
}
else {
char *labelmap = NULL, *model_xml = NULL, *model_bin = NULL;
unsigned long xml_size = 0, bin_size = 0, labelmap_size = 0;
http_headers headers = request.headers();
concurrency::streams::istream body = request.body();
auto parser = MPFD::Parser();
try {
parser.SetUploadedFilesStorage(MPFD::Parser::StoreUploadedFilesInMemory);
parser.SetMaxCollectedDataLength(std::numeric_limits<long>::max());
parser.SetContentType(headers.content_type());
// ref: https://docs.microsoft.com/zh-tw/previous-versions/jj950083%28v%3dvs.140%29
size_t total_read = 0;
auto content_length = headers.content_length();
while (total_read < content_length) {
concurrency::streams::container_buffer<std::string> isbuf; // in-stream buffer
size_t byte_read = body.read(isbuf, 16*1024).get();
total_read += byte_read;
const std::string &data = isbuf.collection();
parser.AcceptSomeData((const char*)data.c_str(), (long)byte_read);
}
std::map<std::string, MPFD::Field*> fields = parser.GetFieldsMap();
std::map<std::string, MPFD::Field*>::iterator it;
for (it=fields.begin(); it!=fields.end(); it++) {
if (fields[it->first]->GetType() == MPFD::Field::FileType) {
if (it->first == "xml") {
model_xml = fields[it->first]->GetFileContent();
xml_size = fields[it->first]->GetFileContentSize();
}
else if (it->first == "bin") {
model_bin = fields[it->first]->GetFileContent();
bin_size = fields[it->first]->GetFileContentSize();
}
else if (it->first == "labelmap") {
labelmap = fields[it->first]->GetFileContent();
labelmap_size = fields[it->first]->GetFileContentSize();
}
else {
status = status_codes::BadRequest;
std::ostringstream stream;
stream << "Invalid parameter/type (" << it->first << ")";
jsn["error"] = json::value::string(stream.str());
std::cout << "Invalid parameter/type (" << it->first << ")" << std::endl;
break;
}
}
else { // MPFD::Field::TextType
status = status_codes::BadRequest;
std::ostringstream stream;
stream << "Invalid parameter/type (" << it->first << ")";
jsn["error"] = json::value::string(stream.str());
std::cout << "Invalid parameter/type (" << it->first << ")" << std::endl;
break;
}
}
if (status == status_codes::OK) {
if (paths[0] == "model") {
if (model_xml == NULL || xml_size == 0 || model_bin == NULL || bin_size == 0) {
status = status_codes::BadRequest;
jsn["error"] = json::value::string("Cannot find model");
std::cout << "Cannot find model" << std::endl;
}
else {
std::cout << "Load model request (xml: " << xml_size << "; bin: " << bin_size << ")" << std::endl;
auto t1 = std::chrono::high_resolution_clock::now();
// Since OpenVINO cannot load model by file pointer or buffer, so we have to save it as a file
std::cout << "Loading..." << std::flush;
std::ofstream fp;
std::string filename_xml = "model.xml";
std::string filename_bin = "model.bin";
fp.open(filename_xml, std::ofstream::binary);
fp.write(model_xml, xml_size);
fp.close();
fp.open(filename_bin, std::ofstream::binary);
fp.write(model_bin, bin_size);
fp.close();
// Load model
ie->loadModel(filename_xml, filename_bin);
remove(filename_xml.c_str());
remove(filename_bin.c_str());
auto t2 = std::chrono::high_resolution_clock::now();
ms t_rx = std::chrono::duration_cast<ms>(t1 - t0);
ms t_load = std::chrono::duration_cast<ms>(t2 - t1);
ms t_total = std::chrono::duration_cast<ms>(t2 - t0);
std::cout << " done (rx: " << t_rx.count() << "mS; load: " << t_load.count()
<< "mS; total: " << t_total.count() << "mS)" << std::endl;
status = status_codes::OK;
jsn["xml"] = json::value::number(xml_size);
jsn["bin"] = json::value::number(bin_size);
}
}
else { // paths[0] == "labelmap"
if (labelmap == NULL || labelmap_size == 0) {
status = status_codes::BadRequest;
jsn["error"] = json::value::string("Cannot find labelmap");
std::cout << "Cannot find labelmap" << std::endl;
}
else {
std::cout << "Load labelmap" << std::endl;
std::cout << " labelmap_size: " << labelmap_size << std::endl;
status = status_codes::OK;
jsn["labelmap"] = json::value::number(labelmap_size);
}
}
}
}
catch (MPFD::Exception ex) {
status = status_codes::BadRequest;
jsn["error"] = json::value::string(ex.GetError());
std::cout << " " << ex.GetError() << std::endl;
}
catch (std::exception const &ex) {
status = status_codes::InternalError;
jsn["error"] = json::value::string(ex.what());
std::cout << " " << ex.what() << std::endl;
}
}
request.reply(status, jsn);
}
//void handle_del(http_request request) {
// http::status_code status;
// json::value jsn;
// auto uri = request.relative_uri();
// auto path = uri.path();
// std::cout << "---------- DELETE " << uri.to_string() << std::endl;
//
// auto paths = http::uri::split_path(http::uri::decode(path));
// if ((paths.size() != 1) || (paths[0] != "model" && paths[0] != "labelmap")) {
// status = status_codes::NotFound;
// std::ostringstream stream;
// stream << "Path not found (" << path << ")";
// jsn["error"] = json::value::string(stream.str());
// }
// else {
// status = status_codes::OK;
// jsn["message"] = json::value::string("Hello there, this is a DELETE response.");
// }
// request.reply(status, jsn);
//} | 47.395785 | 137 | 0.486758 |
69b9905adc72eba720b32122f1980ce4698e364f | 10,627 | cpp | C++ | src/extern/inventor/lib/database/src/so/nodes/nurbs/libnurbs/mesher.cpp | OpenXIP/xip-libraries | 9f0fef66038b20ff0c81c089d7dd0038e3126e40 | [
"Apache-2.0"
] | 2 | 2020-05-21T07:06:07.000Z | 2021-06-28T02:14:34.000Z | src/extern/inventor/lib/database/src/so/nodes/nurbs/libnurbs/mesher.cpp | OpenXIP/xip-libraries | 9f0fef66038b20ff0c81c089d7dd0038e3126e40 | [
"Apache-2.0"
] | null | null | null | src/extern/inventor/lib/database/src/so/nodes/nurbs/libnurbs/mesher.cpp | OpenXIP/xip-libraries | 9f0fef66038b20ff0c81c089d7dd0038e3126e40 | [
"Apache-2.0"
] | 6 | 2016-03-21T19:53:18.000Z | 2021-06-08T18:06:03.000Z | /*
*
* Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
*
* This library 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 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*
*/
/*
* mesher.c++ - $Revision: 1.2 $
* Derrick Burns - 1991
*/
#include "glimports.h"
#include "myassert.h"
#include "mystdio.h"
#include "mesher.h"
#include "gridvertex.h"
#include "gridtrimvertex.h"
#include "jarcloc.h"
#include "gridline.h"
#include "trimline.h"
#include "uarray.h"
#include "backend.h"
const float Mesher::ZERO = 0.0;
Mesher::Mesher( Backend& b )
: backend( b ),
p( sizeof( GridTrimVertex ), 100, "GridTrimVertexPool" )
{
stacksize = 0;
vdata = 0;
lastedge = 0;
}
Mesher::~Mesher( void )
{
if( vdata ) delete[] vdata;
}
void
Mesher::init( unsigned int npts )
{
p.clear();
if( stacksize < npts ) {
stacksize = 2 * npts;
if( vdata ) delete[] vdata;
vdata = new GridTrimVertex_p[stacksize];
}
}
inline void
Mesher::push( GridTrimVertex *gt )
{
assert( itop+1 != stacksize );
vdata[++itop] = gt;
}
inline void
Mesher::pop( long )
{
}
inline void
Mesher::openMesh()
{
backend.bgntmesh( "addedge" );
}
inline void
Mesher::closeMesh()
{
backend.endtmesh();
}
inline void
Mesher::swapMesh()
{
backend.swaptmesh();
}
inline void
Mesher::clearStack()
{
itop = -1;
last[0] = 0;
}
void
Mesher::finishLower( GridTrimVertex *gtlower )
{
for( push(gtlower);
nextlower( gtlower=new(p) GridTrimVertex );
push(gtlower) )
addLower();
addLast();
}
void
Mesher::finishUpper( GridTrimVertex *gtupper )
{
for( push(gtupper);
nextupper( gtupper=new(p) GridTrimVertex );
push(gtupper) )
addUpper();
addLast();
}
void
Mesher::mesh( void )
{
GridTrimVertex *gtlower, *gtupper;
Hull::init( );
nextupper( gtupper = new(p) GridTrimVertex );
nextlower( gtlower = new(p) GridTrimVertex );
clearStack();
openMesh();
push(gtupper);
nextupper( gtupper = new(p) GridTrimVertex );
nextlower( gtlower );
assert( gtupper->t && gtlower->t );
if( gtupper->t->param[0] < gtlower->t->param[0] ) {
push(gtupper);
lastedge = 1;
if( nextupper( gtupper=new(p) GridTrimVertex ) == 0 ) {
finishLower(gtlower);
return;
}
} else if( gtupper->t->param[0] > gtlower->t->param[0] ) {
push(gtlower);
lastedge = 0;
if( nextlower( gtlower=new(p) GridTrimVertex ) == 0 ) {
finishUpper(gtupper);
return;
}
} else {
if( lastedge == 0 ) {
push(gtupper);
lastedge = 1;
if( nextupper(gtupper=new(p) GridTrimVertex) == 0 ) {
finishLower(gtlower);
return;
}
} else {
push(gtlower);
lastedge = 0;
if( nextlower( gtlower=new(p) GridTrimVertex ) == 0 ) {
finishUpper(gtupper);
return;
}
}
}
while ( 1 ) {
if( gtupper->t->param[0] < gtlower->t->param[0] ) {
push(gtupper);
addUpper();
if( nextupper( gtupper=new(p) GridTrimVertex ) == 0 ) {
finishLower(gtlower);
return;
}
} else if( gtupper->t->param[0] > gtlower->t->param[0] ) {
push(gtlower);
addLower();
if( nextlower( gtlower=new(p) GridTrimVertex ) == 0 ) {
finishUpper(gtupper);
return;
}
} else {
if( lastedge == 0 ) {
push(gtupper);
addUpper();
if( nextupper( gtupper=new(p) GridTrimVertex ) == 0 ) {
finishLower(gtlower);
return;
}
} else {
push(gtlower);
addLower();
if( nextlower( gtlower=new(p) GridTrimVertex ) == 0 ) {
finishUpper(gtupper);
return;
}
}
}
}
}
inline int
Mesher::isCcw( int ilast )
{
REAL area = det3( vdata[ilast]->t, vdata[itop-1]->t, vdata[itop-2]->t );
return (area < ZERO) ? 0 : 1;
}
inline int
Mesher::isCw( int ilast )
{
REAL area = det3( vdata[ilast]->t, vdata[itop-1]->t, vdata[itop-2]->t );
return (area > -ZERO) ? 0 : 1;
}
inline int
Mesher::equal( int x, int y )
{
return( last[0] == vdata[x] && last[1] == vdata[y] );
}
inline void
Mesher::copy( int x, int y )
{
last[0] = vdata[x]; last[1] = vdata[y];
}
inline void
Mesher::move( int x, int y )
{
vdata[x] = vdata[y];
}
inline void
Mesher::output( int x )
{
backend.tmeshvert( vdata[x] );
}
/*---------------------------------------------------------------------------
* addedge - addedge an edge to the triangulation
*
* This code has been re-written to generate large triangle meshes
* from a monotone polygon. Although smaller triangle meshes
* could be generated faster and with less code, larger meshes
* actually give better SYSTEM performance. This is because
* vertices are processed in the backend slower than they are
* generated by this code and any decrease in the number of vertices
* results in a decrease in the time spent in the backend.
*---------------------------------------------------------------------------
*/
void
Mesher::addLast( )
{
register int ilast = itop;
if( lastedge == 0 ) {
if( equal( 0, 1 ) ) {
output( ilast );
swapMesh();
for( register int i = 2; i < ilast; i++ ) {
swapMesh();
output( i );
}
copy( ilast, ilast-1 );
} else if( equal( ilast-2, ilast-1) ) {
swapMesh();
output( ilast );
for( register int i = ilast-3; i >= 0; i-- ) {
output( i );
swapMesh();
}
copy( 0, ilast );
} else {
closeMesh(); openMesh();
output( ilast );
output( 0 );
for( register int i = 1; i < ilast; i++ ) {
swapMesh();
output( i );
}
copy( ilast, ilast-1 );
}
} else {
if( equal( 1, 0) ) {
swapMesh();
output( ilast );
for( register int i = 2; i < ilast; i++ ) {
output( i );
swapMesh();
}
copy( ilast-1, ilast );
} else if( equal( ilast-1, ilast-2) ) {
output( ilast );
swapMesh();
for( register int i = ilast-3; i >= 0; i-- ) {
swapMesh();
output( i );
}
copy( ilast, 0 );
} else {
closeMesh(); openMesh();
output( 0 );
output( ilast );
for( register int i = 1; i < ilast; i++ ) {
output( i );
swapMesh();
}
copy( ilast-1, ilast );
}
}
closeMesh();
//for( register long k=0; k<=ilast; k++ ) pop( k );
}
void
Mesher::addUpper( )
{
register int ilast = itop;
if( lastedge == 0 ) {
if( equal( 0, 1 ) ) {
output( ilast );
swapMesh();
for( register int i = 2; i < ilast; i++ ) {
swapMesh();
output( i );
}
copy( ilast, ilast-1 );
} else if( equal( ilast-2, ilast-1) ) {
swapMesh();
output( ilast );
for( register int i = ilast-3; i >= 0; i-- ) {
output( i );
swapMesh();
}
copy( 0, ilast );
} else {
closeMesh(); openMesh();
output( ilast );
output( 0 );
for( register int i = 1; i < ilast; i++ ) {
swapMesh();
output( i );
}
copy( ilast, ilast-1 );
}
lastedge = 1;
//for( register long k=0; k<ilast-1; k++ ) pop( k );
move( 0, ilast-1 );
move( 1, ilast );
itop = 1;
} else {
if( ! isCcw( ilast ) ) return;
do {
itop--;
} while( (itop > 1) && isCcw( ilast ) );
if( equal( ilast-1, ilast-2 ) ) {
output( ilast );
swapMesh();
for( register int i=ilast-3; i>=itop-1; i-- ) {
swapMesh();
output( i );
}
copy( ilast, itop-1 );
} else if( equal( itop, itop-1 ) ) {
swapMesh();
output( ilast );
for( register int i = itop+1; i < ilast; i++ ) {
output( i );
swapMesh();
}
copy( ilast-1, ilast );
} else {
closeMesh(); openMesh();
output( ilast );
output( ilast-1 );
for( register int i=ilast-2; i>=itop-1; i-- ) {
swapMesh();
output( i );
}
copy( ilast, itop-1 );
}
//for( register int k=itop; k<ilast; k++ ) pop( k );
move( itop, ilast );
}
}
void
Mesher::addLower()
{
register int ilast = itop;
if( lastedge == 1 ) {
if( equal( 1, 0) ) {
swapMesh();
output( ilast );
for( register int i = 2; i < ilast; i++ ) {
output( i );
swapMesh();
}
copy( ilast-1, ilast );
} else if( equal( ilast-1, ilast-2) ) {
output( ilast );
swapMesh();
for( register int i = ilast-3; i >= 0; i-- ) {
swapMesh();
output( i );
}
copy( ilast, 0 );
} else {
closeMesh(); openMesh();
output( 0 );
output( ilast );
for( register int i = 1; i < ilast; i++ ) {
output( i );
swapMesh();
}
copy( ilast-1, ilast );
}
lastedge = 0;
//for( register long k=0; k<ilast-1; k++ ) pop( k );
move( 0, ilast-1 );
move( 1, ilast );
itop = 1;
} else {
if( ! isCw( ilast ) ) return;
do {
itop--;
} while( (itop > 1) && isCw( ilast ) );
if( equal( ilast-2, ilast-1) ) {
swapMesh();
output( ilast );
for( register int i=ilast-3; i>=itop-1; i--) {
output( i );
swapMesh( );
}
copy( itop-1, ilast );
} else if( equal( itop-1, itop) ) {
output( ilast );
swapMesh();
for( register int i=itop+1; i<ilast; i++ ) {
swapMesh( );
output( i );
}
copy( ilast, ilast-1 );
} else {
closeMesh(); openMesh();
output( ilast-1 );
output( ilast );
for( register int i=ilast-2; i>=itop-1; i-- ) {
output( i );
swapMesh( );
}
copy( itop-1, ilast );
}
//for( register int k=itop; k<ilast; k++ ) pop( k );
move( itop, ilast );
}
}
| 21.732106 | 77 | 0.56347 |
69baeb7d6ebe81751f6ae3ba6556c8840ebc1edb | 533 | cpp | C++ | cpp/11973.cpp | jinhan814/BOJ | 47d2a89a2602144eb08459cabac04d036c758577 | [
"MIT"
] | 9 | 2021-01-15T13:36:39.000Z | 2022-02-23T03:44:46.000Z | cpp/11973.cpp | jinhan814/BOJ | 47d2a89a2602144eb08459cabac04d036c758577 | [
"MIT"
] | 1 | 2021-07-31T17:11:26.000Z | 2021-08-02T01:01:03.000Z | cpp/11973.cpp | jinhan814/BOJ | 47d2a89a2602144eb08459cabac04d036c758577 | [
"MIT"
] | null | null | null | #include <bits/stdc++.h>
#define fastio cin.tie(0)->sync_with_stdio(0)
using namespace std;
int n, k, v[50'000];
inline bool Check(const int mid) {
int cnt = 0;
for (int i = 0; i < n;) {
const int j = i;
while (i < n && v[i] - v[j] <= mid << 1) i++;
cnt++;
}
return cnt <= k;
}
int main() {
fastio;
cin >> n >> k;
for (int i = 0; i < n; i++) cin >> v[i];
sort(v, v + n);
int lo = -1, hi = 1e9;
while (lo + 1 < hi) {
int mid = lo + hi >> 1;
if (!Check(mid)) lo = mid;
else hi = mid;
}
cout << hi << '\n';
} | 17.766667 | 47 | 0.497186 |
69c1c472367f84931449ade7a28833db0e376d5c | 890 | cpp | C++ | sealtk/core/TrackUtils.cpp | BetsyMcPhail/seal-tk | 49eccad75e501450fbb63524062706968f5f3bef | [
"BSD-3-Clause"
] | null | null | null | sealtk/core/TrackUtils.cpp | BetsyMcPhail/seal-tk | 49eccad75e501450fbb63524062706968f5f3bef | [
"BSD-3-Clause"
] | null | null | null | sealtk/core/TrackUtils.cpp | BetsyMcPhail/seal-tk | 49eccad75e501450fbb63524062706968f5f3bef | [
"BSD-3-Clause"
] | null | null | null | /* This file is part of SEAL-TK, and is distributed under the OSI-approved BSD
* 3-Clause License. See top-level LICENSE file or
* https://github.com/Kitware/seal-tk/blob/master/LICENSE for details. */
#include <sealtk/core/TrackUtils.hpp>
#include <vital/range/indirect.h>
#include <qtStlUtil.h>
#include <QVariantHash>
namespace kv = kwiver::vital;
namespace kvr = kwiver::vital::range;
namespace sealtk
{
namespace core
{
// ----------------------------------------------------------------------------
kv::detected_object_type_sptr classificationToDetectedObjectType(
QVariantHash const& in)
{
if (in.isEmpty())
{
return nullptr;
}
auto out = std::make_shared<kv::detected_object_type>();
for (auto const& c : in | kvr::indirect)
{
out->set_score(stdString(c.key()), c.value().toDouble());
}
return out;
}
} // namespace core
} // namespace sealtk
| 21.190476 | 79 | 0.641573 |
69c266b24d7f83d369054b9fdb7489b66410c97b | 2,524 | cpp | C++ | two-pointers/3-I.cpp | forestLoop/Learning-ITMO-Academy-Pilot-Course | b70ea387cb6a7c26871d99ecf7109fd8f0237c3e | [
"MIT"
] | 6 | 2021-07-04T08:47:48.000Z | 2022-01-12T09:34:20.000Z | two-pointers/3-I.cpp | forestLoop/Learning-ITMO-Academy-Pilot-Course | b70ea387cb6a7c26871d99ecf7109fd8f0237c3e | [
"MIT"
] | null | null | null | two-pointers/3-I.cpp | forestLoop/Learning-ITMO-Academy-Pilot-Course | b70ea387cb6a7c26871d99ecf7109fd8f0237c3e | [
"MIT"
] | 2 | 2021-11-24T12:18:58.000Z | 2022-02-06T00:18:51.000Z | // I. Segment with the Required Subset
// https://codeforces.com/edu/course/2/lesson/9/3/practice/contest/307094/problem/I
#include <bitset>
#include <iostream>
#include <stack>
#include <vector>
constexpr int MAX_SUM = 1000;
constexpr int BITSET_SIZE = MAX_SUM + 1;
class KnapsackStack {
public:
KnapsackStack() {
bitsets_.push(1);
}
void Push(int value) {
values_.push(value);
const auto &last = bitsets_.top();
bitsets_.push(last | last << value);
}
int TopVal() const {
return values_.top();
}
std::bitset<BITSET_SIZE> TopBitset() const {
return bitsets_.top();
}
void Pop() {
bitsets_.pop();
values_.pop();
}
bool Empty() const {
return values_.empty();
}
private:
std::stack<int> values_{};
std::stack<std::bitset<BITSET_SIZE>> bitsets_{};
};
bool good(KnapsackStack &stack, KnapsackStack &stack_rev, const int expected_sum) {
const auto &bits1 = stack.TopBitset(), &bits2 = stack_rev.TopBitset();
for (int i = 0; i <= expected_sum; ++i) {
if (bits1[i] && bits2[expected_sum - i]) {
return true;
}
}
return false;
}
void add(KnapsackStack &stack, const int value) {
stack.Push(value);
}
void remove(KnapsackStack &stack, KnapsackStack &stack_rev) {
if (stack_rev.Empty()) {
while (!stack.Empty()) {
stack_rev.Push(stack.TopVal());
stack.Pop();
}
}
stack_rev.Pop();
}
// Time: O(NS)
// Space: O(N)
int min_good_segment(const std::vector<int> &arr, const int expected_sum) {
KnapsackStack stack, stack_rev;
const int n = arr.size();
int res = n + 1;
for (int lo = 0, hi = 0; lo < n; ++lo) {
while (hi < n && !good(stack, stack_rev, expected_sum)) {
add(stack, arr[hi++]);
}
if (hi >= n && !good(stack, stack_rev, expected_sum)) {
break;
}
// hi > lo must hold as expected_sum != 0
res = std::min(res, hi - lo);
remove(stack, stack_rev);
}
return (res > n) ? -1 : res;
}
int main() {
int n, s;
while (std::cin >> n >> s) {
std::vector<int> arr(n);
for (int i = 0; i < n; ++i) {
std::cin >> arr[i];
}
std::cout << min_good_segment(arr, s) << std::endl;
}
return 0;
}
static const auto speedup = []() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
return 0;
}();
| 24.504854 | 83 | 0.554279 |
69c44787494404b19eca8b6232646ae83313c677 | 4,925 | cpp | C++ | Retired_Proj/4_Unmap/unmap.cpp | billkarsh/Alignment_Projects | f2ce48477da866b09a13fd33f1a53a8af644b35b | [
"BSD-3-Clause"
] | 11 | 2015-07-24T14:41:25.000Z | 2022-03-19T13:27:51.000Z | Retired_Proj/4_Unmap/unmap.cpp | billkarsh/Alignment_Projects | f2ce48477da866b09a13fd33f1a53a8af644b35b | [
"BSD-3-Clause"
] | 1 | 2016-05-14T22:26:25.000Z | 2016-05-14T22:26:25.000Z | Retired_Proj/4_Unmap/unmap.cpp | billkarsh/Alignment_Projects | f2ce48477da866b09a13fd33f1a53a8af644b35b | [
"BSD-3-Clause"
] | 18 | 2015-03-10T18:45:58.000Z | 2021-08-16T13:56:48.000Z |
#include "File.h"
#include "ImageIO.h"
#include "TAffine.h"
#include <string.h>
// structure for unmapping a global image
struct orig_image {
public:
char *fname;
int w,h;
int xmin, ymin, xmax, ymax; // bounding box in global image of all point that map to this
orig_image(){fname = NULL; xmin = ymin = 1000000000; xmax = ymax = -1000000000;}
orig_image(char *f){fname = f; xmin = ymin = 1000000000; xmax = ymax = -1000000000;}
};
struct one_tform {
public:
int image_id; // which image
TAffine tr; // maps from global space to individual image
};
int main(int argc, char **argv)
{
vector<char *>noa; // non-option arguments
for(int i=1; i<argc; i++) {
// process arguments here
if( argv[i][0] != '-' )
noa.push_back(argv[i]);
else
printf("Ignored option '%s'\n", argv[i]);
}
if( noa.size() < 3 ) {
printf("Usage: unmap <image file> <map file> <file-of-transforms> [<where-to-put>] \n");
exit( 42 );
}
// step 1 - read the image file
uint32 w,h;
uint16* raster = Raster16FromPng(noa[0], w, h);
printf("width is %d, height %d\n", w, h);
// step 2 - read the mapping file
uint32 wm,hm;
uint16* map = Raster16FromPng(noa[1], wm, hm);
printf("width of map is %d, height %d\n", wm, hm);
// Step 3 - read the file of images and transforms
vector<orig_image> images;
vector<one_tform> tforms(1);
FILE *fp = FileOpenOrDie( noa[2], "r" );
{
CLineScan LS;
for(;;) {
if( LS.Get( fp ) <= 0 )
break;
if(strncmp(LS.line,"IMAGE",5) == 0) {
int id;
char fname[2048];
sscanf(LS.line+5, "%d %s", &id, fname);
printf("id %3d name %s\n", id, fname);
if( id != images.size() ) {
printf("Oops - bad image sequence number %d\n", id);
return 42;
}
images.push_back(orig_image(strdup(strtok(fname," '\n"))));
}
else if(strncmp(LS.line,"TRANS",5) == 0) {
int id, image_no;
double a,b,c,d,e,f;
sscanf(LS.line+5,"%d %d %lf %lf %lf %lf %lf %lf", &id, &image_no, &a, &b, &c, &d, &e, &f);
if( id != tforms.size() ) {
printf("Oops - bad transform sequence number %d\n", id);
return 42;
}
one_tform o;
o.image_id = image_no;
o.tr = TAffine(a,b,c,d,e,f);
tforms.push_back(o);
}
else {
printf("UNknown line %s\n", LS.line);
}
}
}
fclose(fp);
// OK, find the bounding bozes for all the images
for(int y=0; y<h; y++) {
for(int x=0; x<w; x++) {
uint16 t = map[x + w*y];
if( t != 0 ) {
int im = tforms[t].image_id;
images[im].xmin = min(images[im].xmin, x);
images[im].ymin = min(images[im].ymin, y);
images[im].xmax = max(images[im].xmax, x);
images[im].ymax = max(images[im].ymax, y);
}
}
}
//Now compute each image one at a time
for(int i=0; i<images.size(); i++) {
int x0 = images[i].xmin;
int x1 = images[i].xmax;
int y0 = images[i].ymin;
int y1 = images[i].ymax;
printf("Image %d, x=[%6d %6d] y = [%6d %6d]\n", i, x0, x1, y0, y1);
uint32 w, h;
//uint8* junk = Raster8FromTif( images[i].fname, w, h );
//RasterFree(junk);
vector<uint8> recon_raster(w*h,0); // create an empty raster
printf("Original size was %d wide by %d tall\n", w, h);
for(int y=y0; y<=y1; y++) {
for(int x=x0; x<=x1; x++) {
uint16 t = map[x + wm*y];
if( t != 0 && tforms[t].image_id == i ) { // maps to image i
Point pt(x,y);
tforms[t].tr.Transform( pt );
if( x == 8557 && y == 431 ) { // just for debugging
printf("X and Y in original image: %d %d. Pixel value is %d\n", x, y, t);
printf("Image id is %d. Transformation is", tforms[t].image_id);
tforms[t].tr.TPrint();
printf("Point in image: x=%f y=%f\n", pt.x, pt.y);
}
// This should be within the image, but double check
if( pt.x > -0.5 && pt.x < w-0.5 && pt.y > -0.5 && pt.y < h-0.5 ) { // it will round to a legal value
int ix = int(pt.x+0.5);
int iy = int(pt.y+0.5);
recon_raster[ix + w*iy] = raster[x + wm*y];
}
else {
printf("X and Y in original image: %d %d. Pixel value is %d\n", x, y, t);
printf("Image id is %d. Transformation is", tforms[t].image_id);
tforms[t].tr.TPrint();
printf("Point out of image: x=%f y=%f\n", pt.x, pt.y);
//return 42;
}
}
}
}
char fname[256];
sprintf(fname,"/tmp/%d.png", i);
Raster8ToPng8(fname, &recon_raster[0], w, h);
}
return 0;
}
| 30.974843 | 116 | 0.503959 |
69c4d12f88c3e3c9375e49785005d698497bce63 | 2,151 | cpp | C++ | examples/stopwatch_example.cpp | iontodirel/cpp_libraries | 05fc77be8844a299beee706d122792bef92a1c54 | [
"MIT"
] | null | null | null | examples/stopwatch_example.cpp | iontodirel/cpp_libraries | 05fc77be8844a299beee706d122792bef92a1c54 | [
"MIT"
] | null | null | null | examples/stopwatch_example.cpp | iontodirel/cpp_libraries | 05fc77be8844a299beee706d122792bef92a1c54 | [
"MIT"
] | null | null | null | #include "..\stopwatch.h"
#include <thread>
#include <chrono>
#include <cassert>
using namespace std::literals;
int main()
{
/* api documentation */
// create and start a stopwatch
stopwatch sw = stopwatch::start_new();
// checking if the stopwatch is running
if (sw.running() == true) {}
// stopping the stopwatch
sw.stop();
// returning the elapsed milliseconds
long long elapsed_ms = sw.elapsed_milliseconds();
// get a display friendly representation of the elapsed time ex: 1h34m10s
std::string str = sw.to_string();
/* tests */
stopwatch sw2;
assert(sw2.running() == false);
sw2.start();
assert(sw2.running() == true);
// Sleep for 100 milliseconds
std::this_thread::sleep_for(500ms);
sw2.stop();
assert(sw2.running() == false);
assert(sw2.elapsed_nanoseconds() >= 100000000);
assert(sw2.elapsed_microseconds() >= 100000);
assert(sw2.elapsed_milliseconds() >= 100);
assert(sw2.elapsed_seconds() >= 0.1);
sw2.reset();
assert(sw2.running() == false);
assert(sw2.elapsed_nanoseconds() == 0);
assert(sw2.elapsed_microseconds() == 0);
assert(sw2.elapsed_milliseconds() == 0);
assert(sw2.elapsed_seconds() == 0.0);
assert(sw2.elapsed_minutes() == 0.0);
assert(sw2.elapsed_hours() == 0.0);
assert(sw2.elapsed_hours() == 0.0);
sw2.restart();
std::this_thread::sleep_for(200ms);
stopwatch sw3(sw2);
assert(sw3.elapsed_milliseconds() == sw2.elapsed_milliseconds());
stopwatch sw4 = sw3;
assert(sw4.elapsed_milliseconds() == sw3.elapsed_milliseconds());
stopwatch sw5;
sw5 = sw4;
assert(sw5.elapsed_milliseconds() == sw4.elapsed_milliseconds());
stopwatch sw6;
sw6.swap(sw5);
assert(sw6.elapsed_milliseconds() == sw4.elapsed_milliseconds());
// create a stopwatch and set its elapsed value
stopwatch sw7;
sw7.elapsed(100ms);
assert(sw7.elapsed_milliseconds() == 100);
// create a stopwatch and start it in place
stopwatch sw8(autostart);
std::this_thread::sleep_for(200ms);
assert(sw8.elapsed_milliseconds() >= 100);
return 0;
} | 29.067568 | 77 | 0.655044 |
69c599470a13c2e342ab128a7a880c640282ced4 | 4,489 | cpp | C++ | demos/dox/index/mummy.cpp | h-2/SeqAnHTS | a1923897fe1bd359136cfd09f0d4c245978c0fce | [
"BSD-3-Clause"
] | 409 | 2015-01-12T22:02:01.000Z | 2022-03-29T06:17:05.000Z | demos/dox/index/mummy.cpp | h-2/SeqAnHTS | a1923897fe1bd359136cfd09f0d4c245978c0fce | [
"BSD-3-Clause"
] | 1,269 | 2015-01-02T22:42:25.000Z | 2022-03-08T13:31:46.000Z | demos/dox/index/mummy.cpp | h-2/SeqAnHTS | a1923897fe1bd359136cfd09f0d4c245978c0fce | [
"BSD-3-Clause"
] | 193 | 2015-01-14T16:21:27.000Z | 2022-03-19T22:47:02.000Z | #include <iostream>
#include <fstream>
#include <seqan/index.h>
#include <seqan/seq_io.h>
using namespace seqan;
template <typename TIndex>
void findMUMs(TIndex & esa, unsigned minLen)
{
typename Iterator<TIndex, Mums>::Type it(esa, minLen); // set minimum MUM length
String<typename SAValue<TIndex>::Type> occs; // temp. string storing the hit positions
std::cout << std::resetiosflags(std::ios::left);
while (!atEnd(it))
{
occs = getOccurrences(it); // gives hit positions (seqNo,seqOfs)
orderOccurrences(occs); // order them by seqNo
for (unsigned i = 0; i < length(occs); ++i)
std::cout << std::setw(8)
<< getValueI2(occs[i]) + 1 // output them in MUMmer's output format
<< " ";
std::cout << std::setw(8)
<< repLength(it)
<< "\n";
++it;
}
std::cout << std::setiosflags(std::ios::left) << "\n";
}
template <typename TSpec>
int runMummy(int argc, const char * argv[], unsigned seqCount, unsigned minLen)
{
typedef String<Dna5, TSpec> TString;
typedef StringSet<TString> TStringSet;
typedef Index<TStringSet> TIndex;
TIndex index;
// import sequences
StringSet<CharString> meta;
for (int arg = 1, seq = 0; arg < argc; ++arg)
{
// skip two argument options
if (strcmp(argv[arg], "-p") == 0 || strcmp(argv[arg], "--profile") == 0 ||
strcmp(argv[arg], "-l") == 0 || strcmp(argv[arg], "--minlen") == 0)
{
++arg;
continue;
}
if (argv[arg][0] != '-')
{
SeqFileIn file;
if (!open(file, argv[arg]))
{
std::cout << "Import of sequence " << argv[arg] << " failed.\n";
return 1;
}
readRecords(meta, indexText(index), file);
clear(meta);
close(file);
++seq;
}
}
std::cout << lengthSum(indexText(index)) << " bps sequence imported.\n";
findMUMs(index, minLen);
return 0;
}
void printHelp(int, const char *[], bool longHelp = false)
{
std::cout << "***************************************\n";
std::cout << "*** Simple MUM finder ***\n";
std::cout << "*** written by David Weese (c) 2007 ***\n";
std::cout << "***************************************\n\n";
std::cout << "Usage: mummy [OPTION]... <SEQUENCE FILE> ... <SEQUENCE FILE>\n";
if (longHelp)
{
std::cout << "\nOptions:\n";
std::cout << " -e, --extern \tuse external memory (for large datasets)\n";
std::cout << " -l, --minlen \tset minimum MUM length\n";
std::cout << " \tif not set, default value is 20\n";
std::cout << " -h, --help \tprint this help\n";
}
else
{
std::cout << "Try 'mummy --help' for more information.\n";
}
}
int main(int argc, const char * argv[])
{
if (argc < 2)
{
printHelp(argc, argv);
return 0;
}
unsigned optMinLen = 20;
bool optExtern = false;
unsigned seqCount = 0;
for (int arg = 1; arg < argc; ++arg)
{
if (argv[arg][0] == '-')
{
// parse option
if (strcmp(argv[arg], "-e") == 0 || strcmp(argv[arg], "--extern") == 0)
{
// use external memory algorithms
optExtern = true;
continue;
}
if (strcmp(argv[arg], "-l") == 0 || strcmp(argv[arg], "--minlen") == 0)
{
// minimum match length
if (arg + 1 == argc)
{
printHelp(argc, argv);
return 0;
}
++arg;
optMinLen = atoi(argv[arg]);
continue;
}
if (strcmp(argv[arg], "-h") == 0 || strcmp(argv[arg], "--help") == 0)
{
// print help
printHelp(argc, argv, true);
return 0;
}
}
else
{
// parse sequence file
++seqCount;
}
}
if (optExtern)
return runMummy<External<> >(argc, argv, seqCount, optMinLen);
else
return runMummy<Alloc<> >(argc, argv, seqCount, optMinLen);
}
| 29.339869 | 101 | 0.456672 |
69ca23742bc0f6e2b542a9f6253860cb03a2ef3f | 59,067 | cc | C++ | src/table_file.cc | LaudateCorpus1/Jungle-2 | 20b80ddaa2cd2e382e3ffd9e79e7d623e29a7f7c | [
"Apache-2.0"
] | 157 | 2019-12-27T18:12:19.000Z | 2022-03-27T13:34:52.000Z | src/table_file.cc | LaudateCorpus1/Jungle-2 | 20b80ddaa2cd2e382e3ffd9e79e7d623e29a7f7c | [
"Apache-2.0"
] | 11 | 2020-01-02T18:30:33.000Z | 2021-09-28T03:10:09.000Z | src/table_file.cc | LaudateCorpus1/Jungle-2 | 20b80ddaa2cd2e382e3ffd9e79e7d623e29a7f7c | [
"Apache-2.0"
] | 32 | 2019-12-28T18:17:27.000Z | 2021-12-24T02:05:10.000Z | /************************************************************************
Copyright 2017-2019 eBay 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
https://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 "table_file.h"
#include "bloomfilter.h"
#include "db_mgr.h"
#include "internal_helper.h"
#include "table_mgr.h"
#include <third_party/forestdb/include/libforestdb/fdb_types.h>
#include _MACRO_TO_STR(LOGGER_H)
namespace jungle {
static inline fdb_compact_decision fdb_cb_bridge
( fdb_file_handle *fhandle,
fdb_compaction_status status,
const char *kv_store_name,
fdb_doc *doc,
uint64_t last_oldfile_offset,
uint64_t last_newfile_offset,
void *ctx)
{
CompactionCbParams params;
params.rec.kv.key = SizedBuf(doc->keylen, doc->key);
params.rec.kv.value = SizedBuf(doc->bodylen, doc->body);
params.rec.meta = SizedBuf(doc->metalen, doc->meta);
params.rec.seqNum = doc->seqnum;
const DBConfig* db_config = (const DBConfig*)(ctx);
CompactionCbDecision dec = db_config->compactionCbFunc(params);
if (dec == CompactionCbDecision::DROP) return FDB_CS_DROP_DOC;
return FDB_CS_KEEP_DOC;
}
static inline void fdb_log_cb(int level,
int ec,
const char* file,
const char* func,
size_t line,
const char* err_msg,
void* ctx)
{
SimpleLogger* my_log = (SimpleLogger*)ctx;
my_log->put(level, file, func, line, "[FDB][%d] %s", ec, err_msg);
}
TableFile::FdbHandle::FdbHandle(TableFile* _parent,
const DBConfig* db_config,
const TableFileOptions& t_file_opt)
: parent(_parent)
, dbConfig(db_config)
, tFileOpt(t_file_opt)
, dbFile(nullptr)
, db(nullptr)
, config(getFdbSettings(db_config))
, kvsConfig(getKvsSettings())
{}
TableFile::FdbHandle::~FdbHandle() {
close();
}
fdb_config TableFile::FdbHandle::getFdbSettings(const DBConfig* db_config) {
fdb_config config = fdb_get_default_config();
DBMgr* mgr = DBMgr::getWithoutInit();
if (mgr) {
config.buffercache_size = mgr->getGlobalConfig()->fdbCacheSize;
fdb_set_log_callback_ex_global(fdb_log_cb,
mgr->getLogger());
}
// FIXME: `bulkLoading` should be deprecated.
(void)db_config->bulkLoading;
// NOTE:
// We enable "WAL flush before commit" option to reduce memory
// pressure, and those uncommitted data will not be seen by
// user since we set `do_not_search_wal` option.
//
// We also enable `bulk_load_mode` always on, as we don't want to
// keep dirty B+tree nodes in memory, that brings unnecessary
// memcpy overhead.
config.wal_flush_before_commit = true;
config.bulk_load_mode = true;
config.do_not_search_wal = true;
if (!db_config->directIoOpt.enabled) {
// NOTE:
// During compaction, Jungle manually reads records and copies it
// to new file, which may spoil the block cache of ForestDB,
// due to unnecessary doc block caching that will not be read again.
// We should disable caching doc block.
config.do_not_cache_doc_blocks = true;
config.num_blocks_readahead = 0;
} else {
// Direct-IO mode.
config.do_not_cache_doc_blocks = false;
config.durability_opt = FDB_DRB_ODIRECT;
config.num_blocks_readahead = db_config->directIoOpt.readaheadSize / 4096;
}
// Disable auto compaction,
// temporarily enable block reuse.
config.compaction_threshold = 0;
if ( db_config->blockReuseFactor &&
db_config->blockReuseFactor > 100 ) {
size_t F = db_config->blockReuseFactor;
// 300% -> 66.6% stale ratio.
// 333% -> 70% stale ratio.
config.block_reusing_threshold = (F - 100) * 100 / F;
} else {
// Disabled.
config.block_reusing_threshold = 100;
}
config.max_block_reusing_cycle = db_config->maxBlockReuseCycle;
config.min_block_reuse_filesize = tFileOpt.minBlockReuseFileSize;
config.seqtree_opt = FDB_SEQTREE_USE;
config.purging_interval = 0; // Disable.
config.num_keeping_headers = 10;
config.do_not_move_to_compacted_file = true;
//config.enable_reusable_block_reservation = true;
// If compaction callback function is given, enable it.
if (db_config->compactionCbFunc) {
config.compaction_cb = fdb_cb_bridge;
config.compaction_cb_ctx = (void*)db_config;
// Callback function will be invoked for every document.
config.compaction_cb_mask = FDB_CS_MOVE_DOC;
}
// We SHOULD have at least one ForestDB background compactor,
// to do lazy file deletion.
// NOTE:
// We can also disable both compactor and lazy deletion,
// but deleting large size file may have bad impact on latency,
// as foreground deletion usually happens on close of iterator.
config.enable_background_compactor = true;
config.num_compactor_threads = 1;
size_t upper_prime = PrimeNumber::getUpper(db_config->numExpectedUserThreads);
config.num_wal_partitions = upper_prime;
config.num_bcache_partitions = upper_prime;
config.log_msg_level = 4;
return config;
}
fdb_kvs_config TableFile::FdbHandle::getKvsSettings() {
return fdb_get_default_kvs_config();
}
void TableFile::FdbHandle::refreshSettings() {
config = getFdbSettings(dbConfig);
kvsConfig = getKvsSettings();
}
Status TableFile::FdbHandle::open(const std::string& filename) {
fdb_status fs;
fs = fdb_open(&dbFile, filename.c_str(), &config);
if (fs != FDB_RESULT_SUCCESS) return Status::FDB_OPEN_FILE_FAIL;
fs = fdb_kvs_open(dbFile, &db, NULL, &kvsConfig);
if (fs != FDB_RESULT_SUCCESS) return Status::FDB_OPEN_KVS_FAIL;
return Status();
}
Status TableFile::FdbHandle::openCustomCmp(const std::string& filename,
fdb_custom_cmp_variable cmp_func,
void* cmp_func_param)
{
fdb_status fs;
char* kvs_names[1] = {nullptr};
fdb_custom_cmp_variable functions[1] = {cmp_func};
void* user_params[1] = {cmp_func_param};
fs = fdb_open_custom_cmp(&dbFile, filename.c_str(), &config,
1, kvs_names, functions, user_params);
if (fs != FDB_RESULT_SUCCESS) return Status::FDB_OPEN_FILE_FAIL;
fs = fdb_kvs_open(dbFile, &db, NULL, &kvsConfig);
if (fs != FDB_RESULT_SUCCESS) return Status::FDB_OPEN_KVS_FAIL;
return Status();
}
Status TableFile::FdbHandle::commit() {
fdb_status fs;
fs = fdb_commit(dbFile, FDB_COMMIT_MANUAL_WAL_FLUSH);
if (fs != FDB_RESULT_SUCCESS) return Status::FDB_COMMIT_FAIL;
return Status();
}
Status TableFile::FdbHandle::close() {
fdb_status fs = FDB_RESULT_SUCCESS;
if (db) {
fs = fdb_kvs_close(db);
if (fs != FDB_RESULT_SUCCESS) return Status::FDB_KVS_CLOSE_FAIL;
db = nullptr;
}
if (dbFile) {
fdb_close(dbFile);
if (fs != FDB_RESULT_SUCCESS) return Status::FDB_CLOSE_FAIL;
dbFile = nullptr;
}
return Status();
}
TableFile::FdbHandleGuard::FdbHandleGuard( TableFile* _t_file,
FdbHandle* _handle )
: tFile(_t_file), handle(_handle)
{}
TableFile::FdbHandleGuard::~FdbHandleGuard() {
if (handle) tFile->returnHandle(handle);
}
TableFile::TableFile(const TableMgr* table_mgr)
: myNumber(NOT_INITIALIZED)
, fOps(nullptr)
, tableMgr(table_mgr)
, tableInfo(nullptr)
, writer(nullptr)
, bfByKey(nullptr)
, tlbByKey(nullptr)
, myLog(nullptr)
{}
TableFile::~TableFile() {
assert(snapHandles.size() == 0);
{ std::lock_guard<std::mutex> l(latestSnapshotLock);
for (Snapshot*& cur_snp: latestSnapshot) {
// Remaining snapshot's reference counter should be 1,
// which is referred to by this file.
// Note that all iterators derived from this file
// should be closed before calling this destructor.
assert(cur_snp->refCount == 1);
fdb_kvs_close(cur_snp->fdbSnap);
delete cur_snp;
}
}
if (writer) {
DELETE(writer);
}
for (auto& entry: readers) {
delete entry;
}
DELETE(bfByKey);
DELETE(tlbByKey);
}
std::string TableFile::getTableFileName(const std::string& path,
uint64_t prefix_num,
uint64_t table_file_num)
{
// Table file name example: table0001_00000001
// table0001_00000002
// ...
char p_num[16];
char t_num[16];
sprintf(p_num, "%04" PRIu64, prefix_num);
sprintf(t_num, "%08" PRIu64, table_file_num);
std::string t_filename = path + "/table" + p_num + "_" + t_num;
return t_filename;
}
TableFile::FdbHandle* TableFile::getIdleHandle() {
mGuard l(readersLock);
FdbHandle* ret = nullptr;
auto entry = readers.begin();
if (entry == readers.end()) {
l.unlock();
ret = new FdbHandle(this, tableMgr->getDbConfig(), myOpt);
openFdbHandle(tableMgr->getDbConfig(), filename, ret);
l.lock();
} else {
ret = *entry;
readers.pop_front();
}
return ret;
}
void TableFile::returnHandle(FdbHandle* f_handle) {
mGuard l(readersLock);
readers.push_front(f_handle);
}
Status TableFile::openFdbHandle(const DBConfig* db_config,
const std::string& f_name,
FdbHandle* f_handle)
{
Status s;
if (db_config->cmpFunc) {
// Custom cmp mode.
EP( f_handle->openCustomCmp( f_name,
db_config->cmpFunc,
db_config->cmpFuncParam ) );
} else {
EP( f_handle->open(f_name) );
}
return Status::OK;
}
uint64_t TableFile::getBfSizeByLevel(const DBConfig* db_config, size_t level) {
uint64_t MAX_TABLE_SIZE = db_config->getMaxTableSize(level);
uint64_t bf_bitmap_size = MAX_TABLE_SIZE / 1024 *
db_config->bloomFilterBitsPerUnit;
return bf_bitmap_size;
}
uint64_t TableFile::getBfSizeByWss(const DBConfig* db_config, uint64_t wss) {
uint64_t bf_bitmap_size = wss / 1024 *
db_config->bloomFilterBitsPerUnit;
return bf_bitmap_size;
}
uint64_t TableFile::getBfSize() const {
if (!bfByKey) return 0;
return bfByKey->size();
}
void TableFile::initBooster(size_t level, const DBConfig* db_config) {
uint64_t limit = tableMgr->getBoosterLimit(level);
if (!limit) return;
tlbByKey = new TableLookupBooster( limit, tableMgr, this );
}
Status TableFile::create(size_t level,
uint64_t table_number,
const std::string& f_name,
FileOps* f_ops,
const TableFileOptions& opt)
{
if (writer) return Status::ALREADY_INITIALIZED;
Status s;
filename = f_name;
myNumber = table_number;
fOps = f_ops;
myOpt = opt;
if (fOps->exist(filename)) {
// Previous file exists, which means that there is a legacy log file.
// We should overwrite it.
_log_warn(myLog, "table %s already exists, remove it", filename.c_str());
fOps->remove(filename);
}
const DBConfig* db_config = tableMgr->getDbConfig();
// Create a ForestDB file.
writer = new FdbHandle(this, tableMgr->getDbConfig(), myOpt);
EP( openFdbHandle(db_config, filename, writer) );
// Bloom filter (LSM mode only).
if ( db_config->bloomFilterBitsPerUnit > 0.0 &&
!bfByKey ) {
uint64_t bf_bitmap_size = myOpt.bloomFilterSize;
if (!bf_bitmap_size) bf_bitmap_size = getBfSizeByLevel(db_config, level);
bfByKey = new BloomFilter(bf_bitmap_size, 3);
// Initial save.
saveBloomFilter(filename + ".bf", bfByKey, true);
}
// Lookup booster.
initBooster(level, db_config);
// Initial commit.
EP( writer->commit() );
updateSnapshot();
return Status();
}
Status TableFile::load(size_t level,
uint64_t table_number,
const std::string& f_name,
FileOps* f_ops,
const TableFileOptions& opt)
{
if (writer) return Status::ALREADY_INITIALIZED;
if (!f_ops->exist(f_name.c_str())) return Status::FILE_NOT_EXIST;
Status s;
filename = f_name;
myNumber = table_number;
fOps = f_ops;
myOpt = opt;
const DBConfig* db_config = tableMgr->getDbConfig();
// Handle for writer.
writer = new FdbHandle(this, tableMgr->getDbConfig(), myOpt);
EP( openFdbHandle(db_config, filename, writer) );
// Bloom filter (LSM mode only).
if ( db_config->bloomFilterBitsPerUnit > 0.0 &&
!bfByKey ) {
std::string bf_filename = filename + ".bf";
loadBloomFilter(bf_filename, bfByKey);
}
// Lookup booster.
initBooster(level, db_config);
// Pre-load snapshot.
updateSnapshot();
return Status();
}
Status TableFile::loadBloomFilter(const std::string& filename,
BloomFilter*& bf_out)
{
// Bloom filter file doesn't exist, just OK.
if (!fOps->exist(filename)) {
bf_out = nullptr;
return Status::OK;
}
Status s;
FileHandle* b_file = nullptr;
EP( fOps->open(&b_file, filename.c_str()) );
try {
size_t file_size = fOps->eof(b_file);
if (!file_size) throw Status();
SizedBuf header( sizeof(uint32_t) * 2 );
SizedBuf::Holder h_header(header);
SizedBuf buf(file_size - header.size);
TC( fOps->pread(b_file, header.data, header.size, 0) );
RwSerializer ss(header);
// << Format >>
// Version 4 bytes
// Length (X) 4 bytes
// Bitmap X bytes
uint32_t ver = ss.getU32(s);
(void)ver;
uint32_t data_size = ss.getU32();
(void)data_size;
assert(data_size == buf.size);
TC( fOps->pread(b_file, buf.data, data_size, header.size) );
bf_out = new BloomFilter(0, 3);
// Memory region of `buf` will be moved to Bloom filter.
bf_out->moveBitmapFrom(buf.data, buf.size);
EP( fOps->close(b_file) );
DELETE(b_file);
return Status::OK;
} catch (Status s) {
EP( fOps->close(b_file) );
DELETE(b_file);
return Status::OK;
}
}
Status TableFile::saveBloomFilter(const std::string& filename,
BloomFilter* bf,
bool call_fsync)
{
if (filename.empty() || !bf || !bf->size()) return Status::OK;
Status s;
FileHandle* b_file = nullptr;
EP( fOps->open(&b_file, filename.c_str()) );
try {
size_t data_size = bf->size() / 8;
SizedBuf buf( sizeof(uint32_t) * 2);
SizedBuf::Holder h_buf(buf);
RwSerializer ss(buf);
ss.putU32(0);
ss.putU32(data_size);
TC( fOps->pwrite(b_file, buf.data, buf.size, 0) );
TC( fOps->pwrite(b_file, bf->getPtr(), data_size, buf.size) );
if (call_fsync) fOps->fsync(b_file);
EP( fOps->close(b_file) );
DELETE(b_file);
return Status::OK;
} catch (Status s) {
EP( fOps->close(b_file) );
DELETE(b_file);
return Status::OK;
}
}
Status TableFile::changeOptions(const TableFileOptions& new_opt) {
Status s;
_log_info(myLog, "table %zu_%zu changed minBlockReuseFileSize %zu -> %zu",
tableMgr->getTableMgrOptions()->prefixNum, myNumber,
myOpt.minBlockReuseFileSize, new_opt.minBlockReuseFileSize);
myOpt = new_opt;
// Close and reopen to apply the new configuration.
writer->close();
writer->refreshSettings();
EP( openFdbHandle(tableMgr->getDbConfig(), filename, writer) );
return Status();
}
Status TableFile::openSnapshot(DB* snap_handle,
const uint64_t checkpoint)
{
Status s;
uint64_t snap_seqnum = 0;
bool clone_from_latest = false;
{ mGuard l(chkMapLock);
auto entry = chkMap.find(checkpoint);
if (entry == chkMap.end()) {
// Exact match doesn't exist.
auto e_max = chkMap.rbegin();
if ( e_max == chkMap.rend() ||
checkpoint > e_max->second ) {
// Beyond the table's checkpoint.
// Take the latest marker.
clone_from_latest = true;
} else {
// Find greatest one smaller than chk.
auto entry = chkMap.begin();
while (entry != chkMap.end()) {
if (entry->first <= checkpoint) {
snap_seqnum = entry->second;
}
entry++;
}
}
} else {
// Exact match exists.
snap_seqnum = entry->second;
}
}
if (!clone_from_latest && !snap_seqnum) return Status::INVALID_CHECKPOINT;
fdb_status fs;
fdb_kvs_handle* fdbSnap = nullptr;
if (clone_from_latest) {
// Clone snapshot from the latest one.
Snapshot* snp = nullptr;
leaseSnapshot(snp);
fs = fdb_snapshot_open(snp->fdbSnap, &fdbSnap, snp->fdbSeqnum);
returnSnapshot(snp);
} else {
// Otherwise: open snapshot based on seq number.
FdbHandleGuard g(this, getIdleHandle());
fdb_kvs_handle* kvs_db = g.handle->db;
fs = fdb_snapshot_open(kvs_db, &fdbSnap, snap_seqnum);
}
if (fs != FDB_RESULT_SUCCESS) return Status::FDB_OPEN_KVS_FAIL;
{ mGuard l(snapHandlesLock);
snapHandles.insert( std::make_pair(snap_handle, fdbSnap) );
}
return Status();
}
Status TableFile::closeSnapshot(DB* snap_handle) {
Status s;
fdb_kvs_handle* fdb_snap = nullptr;
{ mGuard l(snapHandlesLock);
auto entry = snapHandles.find(snap_handle);
if (entry == snapHandles.end()) return Status::INVALID_SNAPSHOT;
fdb_snap = entry->second;
snapHandles.erase(entry);
}
fdb_status fs = fdb_kvs_close(fdb_snap);
if (fs != FDB_RESULT_SUCCESS) return Status::FDB_CLOSE_FAIL;
return Status();
}
void TableFile::addCheckpoint(uint64_t chk, uint64_t commit_seqnum) {
if (tableInfo) {
_log_info(myLog, "file lv %zu num %zu hash %zu checkpoint %zu %zu",
tableInfo->level, tableInfo->number, tableInfo->hashNum,
chk, commit_seqnum);
}
const DBConfig* db_config = tableMgr->getDbConfig();
mGuard l(chkMapLock);
chkMap.insert( std::make_pair(chk, commit_seqnum) );
// Remove old checkpoints if it exceeds the limit.
while (chkMap.size() > db_config->maxKeepingCheckpoints) {
auto entry = chkMap.begin();
if (entry == chkMap.end()) break;
chkMap.erase(entry);
}
}
Status TableFile::setCheckpoint(Record* rec,
uint64_t prev_seqnum,
std::list<uint64_t>& checkpoints,
bool remaining_all)
{
Status s;
for (auto& chk_entry: checkpoints) {
uint64_t chk = chk_entry;
if ( prev_seqnum == chk ||
(prev_seqnum < chk && rec && chk < rec->seqNum) ||
(prev_seqnum <= chk && remaining_all) ) {
// Commit for the checkpoint.
fdb_seqnum_t commit_seqnum;
fdb_get_kvs_seqnum(writer->db, &commit_seqnum);
EP( writer->commit() );
addCheckpoint(chk, commit_seqnum);
}
if (chk > prev_seqnum && rec && chk > rec->seqNum) break;
}
return Status();
}
void TableFile::userMetaToRawMeta(const SizedBuf& user_meta,
const InternalMeta& internal_meta,
SizedBuf& raw_meta_out)
{
// Add 9+ bytes in front:
// identifier 1 byte
// version 4 bytes
// flags 4 bytes
// [ original value length 4 bytes ] only if compressed
// NOTE: Even though `user_meta` is empty, we should put 9 bytes.
const size_t I_META_SIZE = getInternalMetaLen(internal_meta);
if (!raw_meta_out.size) {
raw_meta_out.alloc(user_meta.size + I_META_SIZE);
}
RwSerializer rw(raw_meta_out);
// Put 0x1 as an identifier.
rw.putU8(0x1);
// Version 1.
rw.putU32(0x0);
// Flags.
uint32_t flags = 0x0;
if (internal_meta.isTombstone) flags |= TF_FLAG_TOMBSTONE;
if (internal_meta.isCompressed) flags |= TF_FLAG_COMPRESSED;
rw.putU32(flags);
// Original value length (if compressed).
if (internal_meta.isCompressed) {
rw.putU32(internal_meta.originalValueLen);
}
// User meta.
rw.put(user_meta.data, user_meta.size);
}
void TableFile::rawMetaToUserMeta(const SizedBuf& raw_meta,
InternalMeta& internal_meta_out,
SizedBuf& user_meta_out)
{
if (raw_meta.empty()) return;
RwSerializer rw(raw_meta);
// Check identifier.
uint8_t identifier = rw.getU8();
if (identifier != 0x1) {
// No conversion.
raw_meta.copyTo(user_meta_out);
return;
}
// Version.
uint32_t version = rw.getU32();
(void)version; // TODO: version.
// Flags.
uint32_t flags = rw.getU32();
if (flags & TF_FLAG_TOMBSTONE) internal_meta_out.isTombstone = true;
if (flags & TF_FLAG_COMPRESSED) internal_meta_out.isCompressed = true;
if (internal_meta_out.isCompressed) {
// Original value length (if compressed).
internal_meta_out.originalValueLen = rw.getU32();
}
// User meta.
if (rw.pos() >= raw_meta.size) {
// Empty user meta.
return;
}
user_meta_out.alloc(raw_meta.size - rw.pos());
rw.get(user_meta_out.data, user_meta_out.size);
}
void TableFile::readInternalMeta(const SizedBuf& raw_meta,
InternalMeta& internal_meta_out)
{
if (raw_meta.empty()) return;
RwSerializer rw(raw_meta);
// Check identifier.
uint8_t identifier = rw.getU8();
if (identifier != 0x1) {
// No conversion.
return;
}
// Version.
uint32_t version = rw.getU32();
(void)version; // TODO: version.
// Flags.
uint32_t flags = rw.getU32();
if (flags & TF_FLAG_TOMBSTONE) internal_meta_out.isTombstone = true;
if (flags & TF_FLAG_COMPRESSED) internal_meta_out.isCompressed = true;
if (internal_meta_out.isCompressed) {
// Original value length (if compressed).
internal_meta_out.originalValueLen = rw.getU32();
}
}
uint32_t TableFile::tfExtractFlags(const SizedBuf& raw_meta) {
RwSerializer rw(raw_meta);
rw.getU8();
rw.getU32();
return rw.getU32();
}
bool TableFile::tfIsTombstone(uint32_t flags) {
return (flags & TF_FLAG_TOMBSTONE);
}
bool TableFile::tfIsCompressed(uint32_t flags) {
return (flags & TF_FLAG_COMPRESSED);
}
Status TableFile::sync() {
fdb_status fs = fdb_sync_file(writer->dbFile);
if (fs != FDB_RESULT_SUCCESS) return Status::FDB_COMMIT_FAIL;
return Status();
}
size_t TableFile::getInternalMetaLen(const InternalMeta& meta) {
return sizeof(uint8_t) + // Identifier
sizeof(uint32_t) + // Version
sizeof(uint32_t) + // Flags
(meta.isCompressed ? sizeof(uint32_t) : 0); // Length (if compressed)
}
Status TableFile::setSingle(uint32_t key_hash_val,
const Record& rec,
uint64_t& offset_out,
bool set_as_it_is,
bool is_last_level,
bool force_delete)
{
fdb_doc doc;
fdb_status fs;
fdb_kvs_handle* kvs_db = writer->db;
memset(&doc, 0x0, sizeof(doc));
doc.key = rec.kv.key.data;
doc.keylen = rec.kv.key.size;
DB* parent_db = tableMgr->getParentDb();
const DBConfig* db_config = tableMgr->getDbConfig();
const bool COMPRESSION = tableMgr->isCompressionEnabled();
InternalMeta i_meta;
i_meta.isTombstone = rec.isDel();
const size_t TMP_BUF_SIZE = 512;
char tmp_buf[TMP_BUF_SIZE];
SizedBuf raw_meta_static;
SizedBuf raw_meta_alloc;
SizedBuf::Holder h_raw_meta(raw_meta_alloc);
size_t original_value_size = rec.kv.value.size;
ssize_t comp_buf_size = 0; // Output buffer size.
ssize_t comp_size = 0; // Actual compressed size.
// Local compression buffer to avoid frequent memory allocation.
const ssize_t LOCAL_COMP_BUF_SIZE = 4096;
char local_comp_buf[LOCAL_COMP_BUF_SIZE];
SizedBuf comp_buf;
SizedBuf::Holder h_comp_buf(comp_buf);
// Refer to the local buffer by default.
comp_buf.referTo( SizedBuf(LOCAL_COMP_BUF_SIZE, local_comp_buf) );
if (set_as_it_is) {
// Store the given meta as it is.
doc.meta = rec.meta.data;
doc.metalen = rec.meta.size;
} else {
// Otherwise: prepend internal meta and do compression if enabled.
if (COMPRESSION && !i_meta.isTombstone) {
// If compression is enabled, ask if we compress this record.
comp_buf_size = db_config->compOpt.cbGetMaxSize(parent_db, rec);
if (comp_buf_size > 0) {
if (comp_buf_size > LOCAL_COMP_BUF_SIZE) {
// Bigger than the local buffer size, allocate a new.
comp_buf.alloc(comp_buf_size);
}
// Do compression.
comp_size = db_config->compOpt.cbCompress(parent_db, rec, comp_buf);
if (comp_size > 0) {
// Compression succeeded, set the flag.
i_meta.isCompressed = true;
i_meta.originalValueLen = original_value_size;
} else if (comp_size < 0) {
_log_err( myLog, "compression failed: %zd, db %s, key %s",
comp_size,
parent_db->getPath().c_str(),
rec.kv.key.toReadableString().c_str() );
}
// Otherwise: if `comp_size == 0`,
// that implies cancelling compression.
}
}
const size_t INTERNAL_META_SIZE = getInternalMetaLen(i_meta);
if (rec.meta.size + INTERNAL_META_SIZE < TMP_BUF_SIZE) {
// Use `tmp_buf`.
raw_meta_static.referTo
( SizedBuf(rec.meta.size + INTERNAL_META_SIZE, tmp_buf) );
userMetaToRawMeta(rec.meta, i_meta, raw_meta_static);
doc.meta = raw_meta_static.data;
doc.metalen = raw_meta_static.size;
} else {
// Metadata is too big. Allocate a new.
userMetaToRawMeta(rec.meta, i_meta, raw_meta_alloc);
doc.meta = raw_meta_alloc.data;
doc.metalen = raw_meta_alloc.size;
}
}
if (i_meta.isCompressed) {
doc.body = comp_buf.data;
doc.bodylen = comp_size;
} else {
doc.body = rec.kv.value.data;
doc.bodylen = rec.kv.value.size;
}
doc.seqnum = rec.seqNum;
doc.flags = FDB_CUSTOM_SEQNUM;
bool deletion_executed = false;
if ( ( db_config->purgeDeletedDocImmediately &&
tableInfo &&
tableInfo->level &&
is_last_level ) ||
force_delete ) {
// Immediate purging option,
// only for the bottom-most non-zero level.
InternalMeta i_meta_from_rec;
readInternalMeta(rec.meta, i_meta_from_rec);
if (i_meta_from_rec.isTombstone || force_delete) {
fs = fdb_del(kvs_db, &doc);
deletion_executed = true;
}
}
if (!deletion_executed) {
fs = fdb_set(kvs_db, &doc);
}
if (fs != FDB_RESULT_SUCCESS) {
return Status::FDB_SET_FAIL;
}
offset_out = doc.offset;
if (rec.isIns()) {
// Set bloom filter if exists.
if (bfByKey) {
uint64_t hash_pair[2];
get_hash_pair(db_config, rec.kv.key, false, hash_pair);
bfByKey->set(hash_pair);
}
}
// Put into booster if exists.
if (tlbByKey) {
TableLookupBooster::Elem ee( key_hash_val, rec.seqNum, offset_out );
tlbByKey->setIfNew(ee);
}
return Status();
}
Status TableFile::setBatch(std::list<Record*>& batch,
std::list<uint64_t>& checkpoints,
const SizedBuf& min_key,
const SizedBuf& min_key_next_table,
uint32_t target_hash,
bool bulk_load_mode)
{
Timer tt;
const DBConfig* db_config = tableMgr->getDbConfig();
uint64_t prev_seqnum = 0;
size_t num_l0 = tableMgr->getNumL0Partitions();
size_t set_count = 0;
size_t del_count = 0;
uint64_t total_dirty = 0;
uint64_t time_for_flush_us = 0;
for (auto& entry: batch) {
Record* rec = entry;
// If hash is given, check hash.
uint32_t hash_val = tableMgr->getKeyHash(rec->kv.key);
if (target_hash != _SCU32(-1)) {
size_t key_hash = hash_val % num_l0;
if (key_hash != target_hash) continue;
}
// If range is given, check range:
// [min_key, min_key_next_table)
if ( !min_key.empty() &&
rec->kv.key < min_key) continue;
if ( !min_key_next_table.empty() &&
rec->kv.key >= min_key_next_table ) continue;
// Append all checkpoints that
// `record[n-1] seqnum <= chk < record[n] seqnum`
setCheckpoint(rec, prev_seqnum, checkpoints);
if (rec->isCmd()) continue;
uint64_t offset_out = 0;
Status s = setSingle(hash_val, *rec, offset_out);
if (!s) return s;
if (rec->isDel()) del_count++;
else set_count++;
total_dirty += rec->size();
prev_seqnum = rec->seqNum;
if ( db_config->preFlushDirtySize &&
db_config->preFlushDirtySize < total_dirty ) {
Timer flush_time;
fdb_sync_file(writer->dbFile);
total_dirty = 0;
time_for_flush_us += flush_time.getUs();
}
}
// Set all remaining (record[n] <= chk) checkpoints.
setCheckpoint(nullptr, prev_seqnum, checkpoints, true);
// Save bloom filter.
// WARNING: Writing bloom filter SHOULD BE DONE BEFORE COMMIT.
Timer tt_bf;
if (bfByKey) saveBloomFilter(filename + ".bf", bfByKey, true);
uint64_t bf_elapsed = tt_bf.getUs();
if (!bulk_load_mode) {
// Commit and update index node (not in bulk load mode).
writer->commit();
// Pre-load & keep the snapshot of latest table file data.
updateSnapshot();
}
SimpleLogger::Levels ll = SimpleLogger::INFO;
if (tableInfo) {
if (tableInfo->level) {
_log_( ll, myLog,
"L%zu: file %zu_%zu, set %zu del %zu, %zu us, %zu us, %zu us",
tableInfo->level,
tableMgr->getTableMgrOptions()->prefixNum,
myNumber,
set_count, del_count, tt.getUs(), bf_elapsed,
time_for_flush_us );
} else {
_log_( ll, myLog,
"L%zu: hash %zu, file %zu_%zu, set %zu del %zu, %zu us, %zu us, "
"%zu us",
tableInfo->level,
tableInfo->hashNum,
tableMgr->getTableMgrOptions()->prefixNum,
myNumber,
set_count, del_count, tt.getUs(), bf_elapsed,
time_for_flush_us );
}
} else {
_log_( ll, myLog,
"brand new table: file %zu_%zu, set %zu del %zu, %zu us, %zu us, %zu us",
tableMgr->getTableMgrOptions()->prefixNum,
myNumber,
set_count, del_count, tt.getUs(), bf_elapsed,
time_for_flush_us );
}
// Bulk load mode: all done here.
if (bulk_load_mode) return Status();
{
// Remove all checkpoints earlier than the oldest seqnum.
uint64_t oldest_seq = 0;
getOldestSnapMarker(oldest_seq);
mGuard l(chkMapLock);
auto entry = chkMap.begin();
while (entry != chkMap.end()) {
if ( entry->first < oldest_seq ||
entry->second < oldest_seq ) {
if (tableInfo) {
_log_debug( myLog,
"file lv %zu num %zu hash %zu removed "
"checkpoint %zu %zu",
tableInfo->level, tableInfo->number,
tableInfo->hashNum,
entry->first, entry->second );
}
entry = chkMap.erase(entry);
} else {
entry++;
}
}
}
return Status();
}
Status TableFile::get(DB* snap_handle,
Record& rec_io,
bool meta_only)
{
DB* parent_db = tableMgr->getParentDb();
const DBConfig* db_config = tableMgr->getDbConfig();
SizedBuf data_to_hash = get_data_to_hash(db_config, rec_io.kv.key, false);
// Search bloom filter first if exists.
if ( bfByKey &&
db_config->useBloomFilterForGet &&
!bfByKey->check(data_to_hash.data, data_to_hash.size) ) {
return Status::KEY_NOT_FOUND;
}
fdb_status fs;
fdb_doc doc_base;
fdb_doc doc_by_offset;
memset(&doc_base, 0x0, sizeof(doc_base));
doc_base.key = rec_io.kv.key.data;
doc_base.keylen = rec_io.kv.key.size;
fdb_doc* doc = &doc_base;
if (snap_handle) {
// Snapshot (does not use booster).
fdb_kvs_handle* kvs_db = nullptr;
{ mGuard l(snapHandlesLock);
auto entry = snapHandles.find(snap_handle);
if (entry == snapHandles.end()) return Status::SNAPSHOT_NOT_FOUND;
kvs_db = entry->second;
}
if (meta_only) {
fs = fdb_get_metaonly(kvs_db, doc);
} else {
fs = fdb_get(kvs_db, doc);
}
} else {
// Normal.
FdbHandleGuard g(this, getIdleHandle());
fdb_kvs_handle* kvs_db = g.handle->db;
bool skip_normal_search = false;
uint32_t key_hash = get_murmur_hash_32(data_to_hash);
IF ( !meta_only && tlbByKey ) {
// Search booster if exists.
memset(&doc_by_offset, 0x0, sizeof(doc_by_offset));
Status s = tlbByKey->get( key_hash, doc_by_offset.offset );
if (!s) break;
fs = fdb_get_byoffset_raw(kvs_db, &doc_by_offset);
if (fs != FDB_RESULT_SUCCESS) {
break;
}
if ( rec_io.kv.key == SizedBuf( doc_by_offset.keylen,
doc_by_offset.key ) ) {
skip_normal_search = true;
free(doc_by_offset.key);
doc_by_offset.key = rec_io.kv.key.data;
doc_by_offset.keylen = rec_io.kv.key.size;
doc = &doc_by_offset;
} else {
free(doc_by_offset.key);
free(doc_by_offset.meta);
free(doc_by_offset.body);
}
};
if (!skip_normal_search) {
if (meta_only) {
fs = fdb_get_metaonly(kvs_db, doc);
} else {
fs = fdb_get(kvs_db, doc);
if ( fs == FDB_RESULT_SUCCESS && tlbByKey ) {
// Put into booster if exists.
tlbByKey->setIfNew( TableLookupBooster::Elem
( key_hash, doc->seqnum, doc->offset ) );
}
}
}
}
if (fs != FDB_RESULT_SUCCESS) {
return Status::KEY_NOT_FOUND;
}
try {
Status s;
if (!meta_only) {
rec_io.kv.value.set(doc->bodylen, doc->body);
rec_io.kv.value.setNeedToFree();
}
// Decode meta.
SizedBuf user_meta_out;
SizedBuf raw_meta(doc->metalen, doc->meta);;
SizedBuf::Holder h_raw_meta(raw_meta); // auto free raw meta.
raw_meta.setNeedToFree();
InternalMeta i_meta_out;
rawMetaToUserMeta(raw_meta, i_meta_out, user_meta_out);
user_meta_out.moveTo( rec_io.meta );
// Decompress if needed.
TC( decompressValue(parent_db, db_config, rec_io, i_meta_out) );
rec_io.seqNum = doc->seqnum;
rec_io.type = (i_meta_out.isTombstone || doc->deleted)
? Record::DELETION
: Record::INSERTION;
return Status();
} catch (Status s) {
rec_io.kv.value.free();
rec_io.meta.free();
return s;
}
}
Status TableFile::getNearest(DB* snap_handle,
const SizedBuf& key,
Record& rec_out,
SearchOptions s_opt,
bool meta_only)
{
DB* parent_db = tableMgr->getParentDb();
const DBConfig* db_config = tableMgr->getDbConfig();
fdb_status fs;
fdb_doc doc_base;
fdb_doc doc_by_offset;
memset(&doc_base, 0x0, sizeof(doc_base));
fdb_doc* doc = &doc_base;
fdb_get_nearest_opt_t nearest_opt;
switch (s_opt) {
default:
case SearchOptions::GREATER_OR_EQUAL:
nearest_opt = FDB_GET_GREATER_OR_EQUAL;
break;
case SearchOptions::GREATER:
nearest_opt = FDB_GET_GREATER;
break;
case SearchOptions::SMALLER_OR_EQUAL:
nearest_opt = FDB_GET_SMALLER_OR_EQUAL;
break;
case SearchOptions::SMALLER:
nearest_opt = FDB_GET_SMALLER;
break;
};
if (snap_handle) {
// Snapshot (does not use booster).
fdb_kvs_handle* kvs_db = nullptr;
{ mGuard l(snapHandlesLock);
auto entry = snapHandles.find(snap_handle);
if (entry == snapHandles.end()) return Status::SNAPSHOT_NOT_FOUND;
kvs_db = entry->second;
}
if (meta_only) {
// FIXME.
fs = fdb_get_nearest(kvs_db, key.data, key.size, doc, nearest_opt);
} else {
fs = fdb_get_nearest(kvs_db, key.data, key.size, doc, nearest_opt);
}
} else {
// Normal.
FdbHandleGuard g(this, getIdleHandle());
fdb_kvs_handle* kvs_db = g.handle->db;
// NOTE:
// Unlike Bloom filter, we can still use table lookup booster
// as it returns true if exact match exists.
bool skip_normal_search = false;
uint32_t key_hash = tableMgr->getKeyHash(key);
IF ( s_opt.isExactMatchAllowed() && !meta_only && tlbByKey ) {
// Search booster if exists.
memset(&doc_by_offset, 0x0, sizeof(doc_by_offset));
Status s = tlbByKey->get( key_hash, doc_by_offset.offset );
if (!s) break;
fs = fdb_get_byoffset_raw(kvs_db, &doc_by_offset);
if (fs != FDB_RESULT_SUCCESS) {
break;
}
if ( key == SizedBuf( doc_by_offset.keylen,
doc_by_offset.key ) ) {
skip_normal_search = true;
doc = &doc_by_offset;
} else {
free(doc_by_offset.key);
free(doc_by_offset.meta);
free(doc_by_offset.body);
}
};
if (!skip_normal_search) {
if (meta_only) {
// FIXME.
fs = fdb_get_nearest(kvs_db, key.data, key.size, doc, nearest_opt);
} else {
fs = fdb_get_nearest(kvs_db, key.data, key.size, doc, nearest_opt);
}
}
}
if (fs != FDB_RESULT_SUCCESS) {
return Status::KEY_NOT_FOUND;
}
try {
Status s;
rec_out.kv.key.set(doc->keylen, doc->key);
rec_out.kv.key.setNeedToFree();
if (!meta_only) {
rec_out.kv.value.set(doc->bodylen, doc->body);
rec_out.kv.value.setNeedToFree();
}
// Decode meta.
SizedBuf user_meta_out;
SizedBuf raw_meta(doc->metalen, doc->meta);;
SizedBuf::Holder h_raw_meta(raw_meta); // auto free raw meta.
raw_meta.setNeedToFree();
InternalMeta i_meta_out;
rawMetaToUserMeta(raw_meta, i_meta_out, user_meta_out);
user_meta_out.moveTo( rec_out.meta );
// Decompress if needed.
TC( decompressValue(parent_db, db_config, rec_out, i_meta_out) );
rec_out.seqNum = doc->seqnum;
rec_out.type = (i_meta_out.isTombstone || doc->deleted)
? Record::DELETION
: Record::INSERTION;
return Status();
} catch (Status s) {
rec_out.kv.value.free();
rec_out.meta.free();
return s;
}
}
Status TableFile::getPrefix(DB* snap_handle,
const SizedBuf& prefix,
SearchCbFunc cb_func)
{
DB* parent_db = tableMgr->getParentDb();
const DBConfig* db_config = tableMgr->getDbConfig();
if ( bfByKey &&
db_config->useBloomFilterForGet ) {
uint64_t hash_pair[2];
bool used_custom_hash = get_hash_pair(db_config, prefix, true, hash_pair);
if ( used_custom_hash &&
!bfByKey->check(hash_pair) ) {
// Unlike point get, use bloom filter only when custom hash is used.
return Status::KEY_NOT_FOUND;
}
}
fdb_status fs;
fdb_doc doc_base;
memset(&doc_base, 0x0, sizeof(doc_base));
fdb_doc* doc = &doc_base;
fdb_get_nearest_opt_t nearest_opt = FDB_GET_GREATER_OR_EQUAL;
auto is_prefix_match = [&](const SizedBuf& key) -> bool {
if (key.size < prefix.size) return false;
return (SizedBuf::cmp( SizedBuf(prefix.size, key.data),
prefix ) == 0);
};
FdbHandleGuard g(this, snap_handle ? nullptr: getIdleHandle());
fdb_kvs_handle* kvs_db = nullptr;
if (snap_handle) {
mGuard l(snapHandlesLock);
auto entry = snapHandles.find(snap_handle);
if (entry == snapHandles.end()) return Status::SNAPSHOT_NOT_FOUND;
kvs_db = entry->second;
} else {
kvs_db = g.handle->db;
}
SizedBuf last_returned_key;
SizedBuf::Holder h_last_returned_key(last_returned_key);
prefix.copyTo(last_returned_key);
do {
// TODO: Not sure we can use table lookup booster.
fs = fdb_get_nearest(kvs_db,
last_returned_key.data,
last_returned_key.size,
doc,
nearest_opt);
if (fs != FDB_RESULT_SUCCESS) {
return Status::KEY_NOT_FOUND;
}
// Find next greater key.
nearest_opt = FDB_GET_GREATER;
Status s;
Record rec_out;
Record::Holder h_rec_out(rec_out);
rec_out.kv.key.set(doc->keylen, doc->key);
rec_out.kv.key.setNeedToFree();
rec_out.kv.value.set(doc->bodylen, doc->body);
rec_out.kv.value.setNeedToFree();
// Decode meta.
SizedBuf user_meta_out;
SizedBuf raw_meta(doc->metalen, doc->meta);;
SizedBuf::Holder h_raw_meta(raw_meta); // auto free raw meta.
raw_meta.setNeedToFree();
InternalMeta i_meta_out;
rawMetaToUserMeta(raw_meta, i_meta_out, user_meta_out);
user_meta_out.moveTo( rec_out.meta );
// Decompress if needed.
s = decompressValue(parent_db, db_config, rec_out, i_meta_out);
if (!s) {
_log_err(myLog, "decompression failed: %d, key %s",
s, rec_out.kv.key.toReadableString().c_str());
continue;
}
rec_out.seqNum = doc->seqnum;
rec_out.type = (i_meta_out.isTombstone || doc->deleted)
? Record::DELETION
: Record::INSERTION;
if (!is_prefix_match(rec_out.kv.key)) {
// Prefix doesn't match, exit.
break;
}
SearchCbDecision dec = cb_func({rec_out});
if (dec == SearchCbDecision::STOP) {
return Status::OPERATION_STOPPED;
}
last_returned_key.free();
rec_out.kv.key.copyTo(last_returned_key);
} while (true);
return Status::OK;
}
fdb_index_traversal_decision cb_fdb_index_traversal( fdb_kvs_handle *fhandle,
void* key,
size_t keylen,
uint64_t offset,
void *ctx )
{
TableFile::IndexTraversalCbFunc* cb_func = (TableFile::IndexTraversalCbFunc*)ctx;
TableFile::IndexTraversalParams params;
params.key = SizedBuf(keylen, key);
params.offset = offset;
TableFile::IndexTraversalDecision dec = (*cb_func)(params);
if (dec == TableFile::IndexTraversalDecision::STOP) {
return FDB_IT_STOP;
}
return FDB_IT_NEXT;
}
Status TableFile::traverseIndex(DB* snap_handle,
const SizedBuf& start_key,
IndexTraversalCbFunc cb_func)
{
FdbHandleGuard g(this, snap_handle ? nullptr: getIdleHandle());
fdb_kvs_handle* kvs_db = nullptr;
if (snap_handle) {
mGuard l(snapHandlesLock);
auto entry = snapHandles.find(snap_handle);
if (entry == snapHandles.end()) return Status::SNAPSHOT_NOT_FOUND;
kvs_db = entry->second;
} else {
kvs_db = g.handle->db;
}
fdb_traverse_index( kvs_db,
start_key.data,
start_key.size,
cb_fdb_index_traversal,
(void*)&cb_func );
return Status::OK;
}
Status TableFile::decompressValue(DB* parent_db,
const DBConfig* db_config,
Record& rec_io,
const InternalMeta& i_meta)
{
if (!i_meta.isCompressed) return Status::OK;
// Output buffer may not be given in meta-only mode.
// In such cases, just ignore.
if (rec_io.kv.value.empty()) return Status::OK;
if (!db_config->compOpt.cbDecompress) {
_log_fatal(myLog, "found compressed record %s, but decompression "
"function is not given",
rec_io.kv.key.toReadableString().c_str());
return Status::INVALID_CONFIG;
}
SizedBuf decomp_buf(i_meta.originalValueLen);
ssize_t output_len =
db_config->compOpt.cbDecompress(parent_db, rec_io.kv.value, decomp_buf);
if (output_len != i_meta.originalValueLen) {
_log_fatal(myLog, "decompression failed: %zd, db %s, key %s",
output_len,
parent_db->getPath().c_str(),
rec_io.kv.key.toReadableString().c_str());
return Status::DECOMPRESSION_FAILED;
}
// Switch value and free the previous (compressed) one.
SizedBuf prev_buf = rec_io.kv.value;
rec_io.kv.value = decomp_buf;
prev_buf.free();
return Status::OK;
}
// WARNING:
// For performance gaining purpose, `rec_out` returned by
// this function will have RAW meta including internal flags.
Status TableFile::getByOffset(DB* snap_handle,
uint64_t offset,
Record& rec_out)
{
fdb_status fs;
fdb_doc doc_by_offset;
memset(&doc_by_offset, 0x0, sizeof(doc_by_offset));
doc_by_offset.offset = offset;
fdb_doc* doc = &doc_by_offset;
if (snap_handle) {
// Snapshot (does not use booster).
fdb_kvs_handle* kvs_db = nullptr;
{ mGuard l(snapHandlesLock);
auto entry = snapHandles.find(snap_handle);
if (entry == snapHandles.end()) return Status::SNAPSHOT_NOT_FOUND;
kvs_db = entry->second;
}
fs = fdb_get_byoffset_raw(kvs_db, &doc_by_offset);
} else {
// Normal.
FdbHandleGuard g(this, getIdleHandle());
fdb_kvs_handle* kvs_db = g.handle->db;
fs = fdb_get_byoffset_raw(kvs_db, &doc_by_offset);
}
if (fs != FDB_RESULT_SUCCESS) {
return Status::INVALID_OFFSET;
}
rec_out.kv.key.set(doc->keylen, doc->key);
rec_out.kv.key.setNeedToFree();
rec_out.kv.value.set(doc->bodylen, doc->body);
rec_out.kv.value.setNeedToFree();
rec_out.meta.set(doc->metalen, doc->meta);
rec_out.meta.setNeedToFree();
rec_out.seqNum = doc->seqnum;
rec_out.type = tfIsTombstone(0)
? Record::DELETION
: Record::INSERTION;
return Status();
}
Status TableFile::appendCheckpoints(RwSerializer& file_s)
{
mGuard l(chkMapLock);
file_s.putU32(chkMap.size());
for (auto& entry: chkMap) {
uint64_t chk = entry.first;
uint64_t fdb_seq = entry.second;
file_s.putU64(chk);
file_s.putU64(fdb_seq);
}
return Status();
}
Status TableFile::loadCheckpoints(RwSerializer& file_s)
{
mGuard l(chkMapLock);
Status s;
uint32_t num_chks = file_s.getU32(s);
for (size_t ii=0; ii<num_chks; ++ii) {
uint64_t chk = file_s.getU64(s);
uint64_t fdb_seq = file_s.getU64(s);
chkMap.insert( std::make_pair(chk, fdb_seq) );
}
return Status();
}
Status TableFile::getAvailCheckpoints(std::list<uint64_t>& chk_out) {
mGuard l(chkMapLock);
for (auto& entry: chkMap) {
uint64_t chk_num = entry.first;
chk_out.push_back(chk_num);
}
return Status();
}
Status TableFile::getCheckpointSeqnum(uint64_t chk, uint64_t& seqnum_out) {
mGuard l(chkMapLock);
auto entry = chkMap.find(chk);
if (entry != chkMap.end()) {
seqnum_out = entry->second;
return Status();
}
return Status::ERROR;
}
Status TableFile::destroySelf() {
if (fOps->exist(filename.c_str())) {
// Instead removing it immediately,
// put it into remove list.
DBMgr* dbm = DBMgr::getWithoutInit();
std::string bf_filename = filename + ".bf";
if (!dbm) {
fOps->remove(filename.c_str());
fOps->remove(bf_filename.c_str());
} else {
dbm->addFileToRemove(filename);
dbm->addFileToRemove(bf_filename);
}
}
return Status();
}
Status TableFile::getLatestSnapMarker(uint64_t& last_snap_seqnum) {
FdbHandleGuard g(this, this->getIdleHandle());
fdb_file_handle* db_file = g.handle->dbFile;
// Get last snap marker.
fdb_snapshot_info_t* markers = nullptr;
uint64_t num_markers = 0;
fdb_status fs = fdb_get_all_snap_markers(db_file, &markers, &num_markers);
if (fs != FDB_RESULT_SUCCESS) return Status::ERROR;
if (!markers || !num_markers) return Status::SNAPSHOT_NOT_FOUND;
last_snap_seqnum = markers[0].kvs_markers[0].seqnum;
fdb_free_snap_markers(markers, num_markers);
return Status();
}
Status TableFile::getSnapMarkerUpto(uint64_t upto,
uint64_t& snap_seqnum_out)
{
FdbHandleGuard g(this, this->getIdleHandle());
fdb_file_handle* db_file = g.handle->dbFile;
// Get last snap marker.
fdb_snapshot_info_t* markers = nullptr;
uint64_t num_markers = 0;
fdb_status fs = fdb_get_all_snap_markers(db_file, &markers, &num_markers);
if (fs != FDB_RESULT_SUCCESS) return Status::ERROR;
if (!markers || !num_markers) return Status::SNAPSHOT_NOT_FOUND;
snap_seqnum_out = 0;
for (size_t ii=0; ii<num_markers; ++ii) {
if (upto >= markers[ii].kvs_markers[0].seqnum) {
snap_seqnum_out = markers[ii].kvs_markers[0].seqnum;
break;
}
}
fdb_free_snap_markers(markers, num_markers);
return Status();
}
Status TableFile::getOldestSnapMarker(uint64_t& oldest_snap_seqnum) {
FdbHandleGuard g(this, this->getIdleHandle());
fdb_file_handle* db_file = g.handle->dbFile;
// Get first snap marker.
fdb_snapshot_info_t* markers = nullptr;
uint64_t num_markers = 0;
fdb_status fs = fdb_get_all_snap_markers(db_file, &markers, &num_markers);
if (fs != FDB_RESULT_SUCCESS) return Status::ERROR;
if (!markers || !num_markers) return Status::SNAPSHOT_NOT_FOUND;
oldest_snap_seqnum = markers[num_markers-1].kvs_markers[0].seqnum;
fdb_free_snap_markers(markers, num_markers);
return Status();
}
Status TableFile::getStats(TableStats& stats_out) {
FdbHandleGuard g(this, this->getIdleHandle());
fdb_file_handle* db_file = g.handle->dbFile;
fdb_kvs_handle* kvs_db = g.handle->db;
fdb_file_info info;
fdb_status fs = fdb_get_file_info(db_file, &info);
if (fs != FDB_RESULT_SUCCESS) return Status::ERROR;
fdb_kvs_info kvs_info;
fs = fdb_get_kvs_info(kvs_db, &kvs_info);
stats_out.numKvs = info.doc_count;
stats_out.workingSetSizeByte = info.space_used;
stats_out.totalSizeByte = info.file_size;
// This should be a bug.
assert(stats_out.workingSetSizeByte < stats_out.totalSizeByte * 10);
if (stats_out.workingSetSizeByte > stats_out.totalSizeByte * 10) {
_log_fatal(myLog, "found wrong WSS, %s, %zu / %zu",
filename.c_str(),
stats_out.workingSetSizeByte,
stats_out.totalSizeByte);
DBMgr* dbm = DBMgr::getWithoutInit();
if (dbm) {
_log_fatal(dbm->getLogger(),
"found wrong WSS, %s, %zu / %zu",
filename.c_str(),
stats_out.workingSetSizeByte,
stats_out.totalSizeByte);
}
// Make it small so as to compact quickly
stats_out.workingSetSizeByte = stats_out.totalSizeByte / 10;
}
stats_out.blockReuseCycle = info.sb_bmp_revnum;
stats_out.numIndexNodes = info.num_live_nodes;
stats_out.lastSeqnum = kvs_info.last_seqnum;
stats_out.approxDocCount = kvs_info.doc_count;
stats_out.approxDelCount = kvs_info.deleted_count;
return Status();
}
Status TableFile::getMaxKey(SizedBuf& max_key_out) {
Status s;
TableFile::Iterator itr;
EP( itr.init(nullptr, this, SizedBuf(), SizedBuf()) );
try {
TC( itr.gotoEnd() );
Record rec_out;
Record::Holder h_rec_out(rec_out);
TC( itr.get(rec_out) );
rec_out.kv.key.moveTo(max_key_out);
return Status();
} catch (Status s) {
return s;
}
}
bool TableFile::isEmpty() {
Status s;
TableFile::Iterator itr;
EP(itr.init(nullptr, this, SizedBuf(), SizedBuf()));
try {
Record rec_out;
Record::Holder h_rec_out(rec_out);
TC(itr.get(rec_out));
} catch (Status s) {
return true;
}
return false;
}
Status TableFile::getMinKey(SizedBuf& min_key_out) {
Status s;
TableFile::Iterator itr;
EP( itr.init(nullptr, this, SizedBuf(), SizedBuf()) );
try {
Record rec_out;
Record::Holder h_rec_out(rec_out);
TC( itr.get(rec_out) );
rec_out.kv.key.moveTo(min_key_out);
return Status();
} catch (Status s) {
return s;
}
}
Status TableFile::updateSnapshot() {
fdb_seqnum_t snap_seqnum = 0;
getLatestSnapMarker(snap_seqnum);
FdbHandleGuard g(this, getIdleHandle());
fdb_kvs_handle* kvs_db = g.handle->db;
fdb_kvs_handle* snap_handle = nullptr;
fdb_status fs = fdb_snapshot_open(kvs_db, &snap_handle, snap_seqnum);
if (fs != FDB_RESULT_SUCCESS) return Status::FDB_OPEN_KVS_FAIL;
Snapshot* new_snp = new Snapshot(this, snap_handle, snap_seqnum);
std::list<Snapshot*> stale_snps;
{ std::lock_guard<std::mutex> l(latestSnapshotLock);
auto entry = latestSnapshot.begin();
// Decrease the reference count of the previously latest one.
if (entry != latestSnapshot.end()) {
Snapshot*& latest_snp = *entry;
latest_snp->refCount--;
}
while (entry != latestSnapshot.end()) {
Snapshot*& cur_snp = *entry;
if (!cur_snp->refCount) {
stale_snps.push_back(cur_snp);
entry = latestSnapshot.erase(entry);
} else {
entry++;
}
}
latestSnapshot.push_front(new_snp);
}
// Close all stale snapshots (refCount == 0).
for (Snapshot*& cur_snp: stale_snps) {
_log_trace(myLog, "delete snapshot %p refcount %zu",
cur_snp, cur_snp->refCount);
fdb_kvs_close(cur_snp->fdbSnap);
delete cur_snp;
}
return Status();
}
Status TableFile::leaseSnapshot(TableFile::Snapshot*& snp_out) {
std::lock_guard<std::mutex> l(latestSnapshotLock);
auto entry = latestSnapshot.begin();
assert(entry != latestSnapshot.end());
Snapshot* snp = *entry;
snp->refCount++;
_log_trace(myLog, "lease snapshot %p refcount %zu",
snp, snp->refCount);
snp_out = snp;
return Status();
}
Status TableFile::returnSnapshot(TableFile::Snapshot* snapshot) {
std::list<Snapshot*> stale_snps;
{ std::lock_guard<std::mutex> l(latestSnapshotLock);
snapshot->refCount--;
_log_trace(myLog, "return snapshot %p refcount %zu",
snapshot, snapshot->refCount);
auto entry = latestSnapshot.begin();
while (entry != latestSnapshot.end()) {
Snapshot*& cur_snp = *entry;
if (!cur_snp->refCount) {
stale_snps.push_back(cur_snp);
entry = latestSnapshot.erase(entry);
} else {
entry++;
}
}
}
// Close all stale snapshots (refCount == 0).
for (Snapshot*& cur_snp: stale_snps) {
_log_trace(myLog, "delete snapshot %p refcount %zu",
cur_snp, cur_snp->refCount);
fdb_kvs_close(cur_snp->fdbSnap);
delete cur_snp;
}
return Status();
}
} // namespace jungle
| 31.773534 | 88 | 0.5884 |
69cd59d6cc01fd94fd58d9248686ed83ccedd3b1 | 134,375 | inl | C++ | src/fonts/stb_font_arial_50_latin1.inl | stetre/moonfonts | 5c8010c02ea62edcf42902e09478b0cd14af56ea | [
"MIT"
] | 3 | 2018-03-13T12:51:57.000Z | 2021-10-11T11:32:17.000Z | src/fonts/stb_font_arial_50_latin1.inl | stetre/moonfonts | 5c8010c02ea62edcf42902e09478b0cd14af56ea | [
"MIT"
] | null | null | null | src/fonts/stb_font_arial_50_latin1.inl | stetre/moonfonts | 5c8010c02ea62edcf42902e09478b0cd14af56ea | [
"MIT"
] | null | null | null | // Font generated by stb_font_inl_generator.c (4/1 bpp)
//
// Following instructions show how to use the only included font, whatever it is, in
// a generic way so you can replace it with any other font by changing the include.
// To use multiple fonts, replace STB_SOMEFONT_* below with STB_FONT_arial_50_latin1_*,
// and separately install each font. Note that the CREATE function call has a
// totally different name; it's just 'stb_font_arial_50_latin1'.
//
/* // Example usage:
static stb_fontchar fontdata[STB_SOMEFONT_NUM_CHARS];
static void init(void)
{
// optionally replace both STB_SOMEFONT_BITMAP_HEIGHT with STB_SOMEFONT_BITMAP_HEIGHT_POW2
static unsigned char fontpixels[STB_SOMEFONT_BITMAP_HEIGHT][STB_SOMEFONT_BITMAP_WIDTH];
STB_SOMEFONT_CREATE(fontdata, fontpixels, STB_SOMEFONT_BITMAP_HEIGHT);
... create texture ...
// for best results rendering 1:1 pixels texels, use nearest-neighbor sampling
// if allowed to scale up, use bilerp
}
// This function positions characters on integer coordinates, and assumes 1:1 texels to pixels
// Appropriate if nearest-neighbor sampling is used
static void draw_string_integer(int x, int y, char *str) // draw with top-left point x,y
{
... use texture ...
... turn on alpha blending and gamma-correct alpha blending ...
glBegin(GL_QUADS);
while (*str) {
int char_codepoint = *str++;
stb_fontchar *cd = &fontdata[char_codepoint - STB_SOMEFONT_FIRST_CHAR];
glTexCoord2f(cd->s0, cd->t0); glVertex2i(x + cd->x0, y + cd->y0);
glTexCoord2f(cd->s1, cd->t0); glVertex2i(x + cd->x1, y + cd->y0);
glTexCoord2f(cd->s1, cd->t1); glVertex2i(x + cd->x1, y + cd->y1);
glTexCoord2f(cd->s0, cd->t1); glVertex2i(x + cd->x0, y + cd->y1);
// if bilerping, in D3D9 you'll need a half-pixel offset here for 1:1 to behave correct
x += cd->advance_int;
}
glEnd();
}
// This function positions characters on float coordinates, and doesn't require 1:1 texels to pixels
// Appropriate if bilinear filtering is used
static void draw_string_float(float x, float y, char *str) // draw with top-left point x,y
{
... use texture ...
... turn on alpha blending and gamma-correct alpha blending ...
glBegin(GL_QUADS);
while (*str) {
int char_codepoint = *str++;
stb_fontchar *cd = &fontdata[char_codepoint - STB_SOMEFONT_FIRST_CHAR];
glTexCoord2f(cd->s0f, cd->t0f); glVertex2f(x + cd->x0f, y + cd->y0f);
glTexCoord2f(cd->s1f, cd->t0f); glVertex2f(x + cd->x1f, y + cd->y0f);
glTexCoord2f(cd->s1f, cd->t1f); glVertex2f(x + cd->x1f, y + cd->y1f);
glTexCoord2f(cd->s0f, cd->t1f); glVertex2f(x + cd->x0f, y + cd->y1f);
// if bilerping, in D3D9 you'll need a half-pixel offset here for 1:1 to behave correct
x += cd->advance;
}
glEnd();
}
*/
#ifndef STB_FONTCHAR__TYPEDEF
#define STB_FONTCHAR__TYPEDEF
typedef struct
{
// coordinates if using integer positioning
float s0,t0,s1,t1;
signed short x0,y0,x1,y1;
int advance_int;
// coordinates if using floating positioning
float s0f,t0f,s1f,t1f;
float x0f,y0f,x1f,y1f;
float advance;
} stb_fontchar;
#endif
#define STB_FONT_arial_50_latin1_BITMAP_WIDTH 256
#define STB_FONT_arial_50_latin1_BITMAP_HEIGHT 580
#define STB_FONT_arial_50_latin1_BITMAP_HEIGHT_POW2 1024
#define STB_FONT_arial_50_latin1_FIRST_CHAR 32
#define STB_FONT_arial_50_latin1_NUM_CHARS 224
#define STB_FONT_arial_50_latin1_LINE_SPACING 32
static unsigned int stb__arial_50_latin1_pixels[]={
0x10266620,0x20001333,0x30000cca,0x64403333,0x8800002c,0x009acba9,
0x5dd4c000,0xccb8009a,0x54c00002,0x019abcca,0xba880000,0xacc8003c,
0x5997000a,0x98000000,0xfd800199,0x7ffdc2ff,0x5ff98004,0xffff3000,
0x01ffd80b,0xfffb5000,0x19ffffff,0x7ffd4000,0x00cfffff,0x0000fffa,
0xffffffb5,0x39ffffff,0xff900000,0xfff80dff,0x07fffff6,0x3fe7ffd0,
0x15ffffff,0xffffffff,0x3fffee07,0x7ffec005,0x027ffdc2,0x0007ff40,
0x806fffd8,0x40006ff8,0xfffffffb,0xcfffffff,0x3ff62000,0xffffffff,
0x07ffd01f,0xfffd7100,0xffffffff,0x07dfffff,0x3fff2000,0x7ffc06ff,
0x9ffffff6,0xff3ffe80,0x2bffffff,0xfffffff8,0xffff983f,0x3f6003ff,
0x7ffdc2ff,0x1ffdc004,0xffff9800,0x07ff9000,0xffffb100,0xffffffff,
0x001dffff,0x3bfffff6,0x0ffffffd,0x4003ffe8,0xfffffffc,0xfedccdef,
0x1effffff,0x3ffea000,0x7fc05fff,0xfffffb6f,0x9fff401f,0xffffffff,
0xffffff15,0xffe887ff,0x002fffdf,0xfb85fffb,0x3e6004ff,0xf90000ff,
0x7c4005ff,0x3e6001ff,0x9acfffff,0xfffca988,0x7d400eff,0x2e21bfff,
0xfe86fffe,0xffd1003f,0x0015bfff,0xfffffd71,0x3ff20007,0x3ffe003f,
0x1fffe446,0x3fe7ffd0,0x209999ff,0xfffb9999,0xe9fffec3,0x98800fff,
0x4ccc4099,0x0fffa000,0x27ffc400,0x037fdc00,0xcfffff88,0xfffc8800,
0x3ff600ef,0x3ffe603f,0x01fff41f,0x67ffff44,0x3f660000,0xe8005fff,
0x664006ff,0x6fff883c,0x7fcfffa0,0x7fd4007f,0x97ffee3f,0x0006fff9,
0x3fea0000,0x3ff20007,0x3ffe0005,0xffffd802,0xfffc8002,0x3fffe03f,
0x1fffe400,0xf300fffa,0x0001bfff,0x1ffffdc0,0x09fff100,0xfffb0000,
0xff9fff40,0x7fd4007f,0x1ffff33f,0x005fffc8,0xffd00000,0x00000009,
0xb80dff90,0x0002ffff,0xf81ffff6,0xffa806ff,0x01fff46f,0x007ffff3,
0x3ffa2000,0xfff1002f,0xf9000007,0x9fff40ff,0x54007fff,0x00003fff,
0x4c000000,0x00001fff,0xfff98000,0x13fffe01,0xffff1000,0x07fffa05,
0xfd033510,0x7fff407f,0x44000002,0x8800fffe,0x00003fff,0xd00fffc8,
0x1fffe7ff,0x07fff500,0x0cccc000,0x81999800,0x4cc06ffd,0x33300019,
0x82fffc03,0x000ffffa,0x05fffd80,0x001bfff9,0xb81fff40,0xa8802fff,
0xf98001cc,0xff9805ff,0x4ccc003f,0x01fff900,0x7ffcfffa,0x7ffd4007,
0x0bfffa03,0x003ffff0,0x445fff98,0x7fc04fff,0x7cc001ff,0x3ff205ff,
0x5fffd80f,0x15930000,0x77fffc40,0x7ffd0000,0x809fff10,0xffffffd9,
0x07fff60d,0x9801fff7,0x7c003fff,0xfff906ff,0x7cfffa01,0x7d4007ff,
0x3ffa03ff,0x7ffe402f,0x7ffe4004,0x00fffe42,0x0013fff2,0x4c05fff9,
0x7fc44fff,0x000003ff,0xfffffa80,0x3ffe8002,0x5c06ffd8,0xffffffff,
0x0fffd0ef,0xf300fffe,0xff8005ff,0x1fff706f,0x7fcfffa0,0x7fd4007f,
0x3fffa03f,0x37ffcc02,0x21fffe00,0xf9806ffe,0x7fc006ff,0x6fff807f,
0x00ffffd4,0xfc800000,0x000dffff,0xff30fffa,0x7ffe403f,0xfffeceff,
0x706fff8e,0xff980fff,0x7ffc002f,0x03fff706,0x7ffcfffa,0x7ffd4007,
0x0bfffa03,0x007fffa0,0x2227ffcc,0xfd004fff,0x3e6003ff,0xffd804ff,
0x3fffee0f,0x40000000,0xffffffd9,0xffd002ff,0x205ffd87,0x40bffffc,
0xffffffe8,0x03fff104,0x0017ffcc,0x7d41bffe,0x7ffd01ff,0x5001fffe,
0x7f407fff,0xffb802ff,0xfff9004f,0x03fffa83,0x009fff70,0x2007fff2,
0x3ee2fffc,0x000007ff,0x5ffffcc0,0x0dfffffe,0x3e1fff40,0xfff302ff,
0xfffe807f,0x3ffa02ff,0x07ffea02,0x20dfff00,0xfd01fffa,0x01fffe7f,
0x407fff50,0x8802fffe,0xf8807fff,0xfffc86ff,0xffff1002,0x0dfff100,
0xc93ffee0,0x00006fff,0x3bffe200,0x3fffff20,0x8fffa03f,0x3fa07ffa,
0xff9803ff,0x3f600fff,0x3ffee03f,0x37ffc001,0xd02fff98,0x1fffe7ff,
0x07fff500,0x8017fff4,0x5402fffd,0xffe83fff,0x3ff6002f,0x7ffd402f,
0xdfff5003,0x0027ffec,0xfff50000,0xffffd301,0x7ffd01df,0xfb827fe4,
0x3fa006ff,0x7fe407ff,0x01bff604,0xf81bffe0,0x7ffd04ff,0x5001fffe,
0x7f407fff,0xff5002ff,0xfffd80bf,0x01ffff80,0x017ffea0,0x2001fffb,
0x3f67fff9,0x000004ff,0x7013ff60,0x81ffffff,0x3ffe2ccb,0x05fffd01,
0x02fffec0,0x7cc17fee,0xff8003ff,0x3fff606f,0xff3ffe81,0xffa800ff,
0x3fffa03f,0x3fffe002,0x0bfff100,0x0003fffe,0x2201ffff,0x22005fff,
0x3ff27fff,0x0000005f,0x3005fff1,0x01dffffd,0xa80fff88,0x64006fff,
0x7e403fff,0xfffe883f,0x6fff8000,0x037ffe60,0x3ffe7ffd,0x7ffd4007,
0x0bfffa03,0x02fffc80,0xf105fff7,0xf9000fff,0x3fee05ff,0x7ffc002f,
0x0dfff70f,0x3e200000,0x3f2005ff,0x7cc05fff,0x7fffb07f,0x2fffc800,
0xb517fec0,0x0007ffff,0xf701bffe,0x3fa5bfff,0x00ffff3f,0x203fffa8,
0x2002fffe,0xfd05fff9,0x3ffe60ff,0xfff98006,0x00fffd05,0x2a3fffd0,
0x00006fff,0x03fffa00,0x1ffffb80,0x741bfea0,0x74001fff,0x7f400fff,
0x3bfff60f,0x3ffe0001,0xffffa806,0x3fe7ffd4,0x7fd4007f,0x3fffa03f,
0x7fff4002,0x827ffcc0,0x0005fff9,0xf981fffd,0xfd8004ff,0xffff31ff,
0x00400001,0x800bfff9,0x2e03fffd,0xffff05ff,0x6fff8001,0x363ffcc0,
0x40001fff,0xf5006fff,0x4fffa9ff,0x54007fff,0x3fa03fff,0x7dc002ff,
0x7ffe43ff,0x0dfff101,0x0fffee00,0x0003fff9,0x7fc1fffd,0x200002ff,
0x3e20bdff,0x5000efff,0x7dc0bfff,0x7fff885f,0x2fffcc00,0xfb17ff20,
0x40009fff,0xfa806fff,0x7ffd4fff,0x5001fffe,0x7f407fff,0x7c4002ff,
0x37ffc6ff,0x00dfff10,0xf1bffe20,0x3a000dff,0x3ff20fff,0xf300004f,
0xffa83fff,0xff003fff,0x2ffdc0bf,0x0037ffc4,0x880fffee,0x7e4c3fff,
0xf0004fff,0xffc80dff,0x7ffd1cef,0x5001fffe,0x7f407fff,0xfd8002ff,
0x7fff30ff,0x007fff80,0x4c3fff60,0xf0003fff,0xfffa8fff,0xfc80000f,
0xfff906ff,0x7cc01bff,0x3fea03ff,0x00ffff06,0x00ffffc4,0xfd80dff9,
0xff8001ff,0x3ffe606f,0xff3ffe85,0xffa800ff,0x3fffa03f,0xfffa8002,
0x801fff93,0x20007ffe,0xff93fffa,0x3fe0001f,0x5ffff86f,0x7ffc4000,
0x3ffea03f,0xff903fff,0x4cbbb63f,0xfffb07ff,0x3fffe400,0x803fff30,
0x8004fff9,0x3f206fff,0x3ffe80ff,0xa800ffff,0x3fa03fff,0xff0002ff,
0x017ffadf,0x0003fffa,0xffd6fff8,0x3fe2000b,0xffffa85f,0xffd10002,
0xfe8801ff,0x321effff,0x3ffa4fff,0x701fff33,0xf1005fff,0x3e60dfff,
0xff9004ff,0xdfff000f,0xe827ffc0,0x0ffff3ff,0x03fffa80,0x000bfffa,
0x7fcfffe4,0xfffc802f,0x3ff20002,0x002fff9f,0x209fff50,0x003ffffe,
0x04ffffd8,0x3ffffee0,0x44fffdcf,0xfff13ffe,0x0dfff503,0x4ffffe88,
0x00ffff98,0x003fff70,0xf306fff8,0x3ffa05ff,0x800ffff3,0x3a03fffa,
0x30002fff,0x1fffdfff,0x09fff500,0x77ffcc00,0x90000fff,0x3e605fff,
0x800cffff,0x05ffffea,0xffffd880,0xfe81efff,0x217ff63f,0x304ffff8,
0x8bffffff,0x002ffffb,0x0007ffea,0x3ea0dfff,0x7ffd01ff,0x5001fffe,
0x7f407fff,0x3a0002ff,0x004fffff,0x0001bffe,0x09fffffd,0x03fff400,
0x3fffffea,0xdba989ad,0x006fffff,0x7ffffd40,0x47ffd01f,0xf980fffb,
0xdb9adfff,0xffffefff,0x1fffffdd,0x17ffcc00,0x41bffe00,0xfd01fffb,
0x01fffe7f,0x407fff50,0x0002fffe,0x07ffffee,0x007ffd80,0x7ffffdc0,
0x3ffe0001,0xffff9805,0xffffffff,0x00efffff,0xfffd8800,0x3ffe81ff,
0x540fffe2,0xffffffff,0xffffa9ef,0x00efffff,0x02fff980,0xb837ffc0,
0xffd01fff,0x001fffe7,0x7407fff5,0x20002fff,0x006ffff8,0x000fffdc,
0x0dffff10,0x17ffcc00,0xffffd880,0xffffffff,0x800003ff,0x40effffb,
0x7fec3ffe,0x3fffee06,0xfd10dfff,0x0bffffff,0x1fffcc00,0x41bffe00,
0xfd00fffb,0x01fffe7f,0x407fff50,0x0002fffe,0x001fffec,0x0013ffe2,
0x007fffb0,0x007ffe40,0x3ffff220,0x0cffffff,0x3e600000,0x7ff44fff,
0x02fffcc3,0x037dfb51,0x159dfdb1,0x406aaa20,0x4003fff9,0xff706fff,
0x4fffa01f,0x54007fff,0x3fa03fff,0x640002ff,0xd8000fff,0x640007ff,
0x20000fff,0x40004fff,0x01acffd8,0x7d400000,0x1fff46ff,0x0027ffe4,
0x7f440000,0xfff301ff,0x6fff8007,0x201fff70,0xffff3ffe,0x3fffa800,
0x00bfffa0,0x00bfff00,0x00bffe60,0x005fff80,0x003ffea0,0x001ffa00,
0x00ff65c0,0x3a0fffe8,0xfff883ff,0x0000002f,0x813fffa2,0x2003fff8,
0xf706fff8,0x3ffa01ff,0x800ffff3,0x3a03fffa,0x20002fff,0x0002fffa,
0x40017ff6,0x0002fffa,0x00017ff6,0x02fbffe2,0x4fffc800,0x43fffb00,
0xff303ffe,0x000019ff,0x5fffe980,0x01fffc40,0x20bfff10,0xfd00fffc,
0x01fffe7f,0x407fff50,0x0002fffe,0x0001bffa,0x0001fff3,0x4000dffd,
0x0001fff8,0x6fffcb88,0x3ffe6000,0x7ffc400e,0x301fff47,0x005fffff,
0xfff91000,0x3ffe00bf,0x3ffe6004,0x40fffb05,0xffff3ffe,0x3fffa800,
0x00bfffa0,0x01fffe40,0x027fec00,0x00ffff20,0x005ffc80,0x2fff8800,
0x3fffe000,0x27ffe405,0xf300fffa,0x015bffff,0xfffb9800,0x3fe004ff,
0xff7000ff,0x17ffe09f,0xfff3ffe8,0xfffa800f,0x0bfffa03,0x3fb2b2e0,
0x80000fff,0x9700fff8,0x1ffffd95,0x3ffe2000,0xfa800000,0x2a0003ff,
0x4c1dffff,0x742ffffd,0xfd8803ff,0x9befffff,0x3ae66201,0x02ffffff,
0x0e7ffe40,0x7ff5c4c4,0x3ff6622f,0x4fffa03f,0xaaaaffff,0x3f2aaaa1,
0x3ffa03ff,0xfffb802f,0x0001ffff,0x5c17fee0,0x1fffffff,0x0fff6000,
0x3732a000,0x001fffff,0x7ffffe40,0xffffffff,0x003ffe83,0x3fffffaa,
0xfeefffff,0xffffffff,0x88000cff,0x26ffffff,0x7ffffffb,0x3ffffffe,
0x7cfffa00,0x5fffffff,0xfffffff1,0x7fff407f,0xffffa802,0x800002ff,
0xffa81ffe,0x0002ffff,0x0001bfe6,0x7fffffec,0xf900003f,0xffffffff,
0x3ffa05ff,0xffda8003,0xffffffff,0xffffffff,0x640000cf,0x366fffff,
0x22ffffff,0x03ffffff,0xfff9fff4,0xf15fffff,0x7fffffff,0x017fff40,
0x1f7fffcc,0xff880000,0xeffff985,0x7fec0003,0xffb00000,0x0003bfff,
0xffffc880,0x3a01ceff,0x220003ff,0xfffffeca,0xbeffffff,0x7d400001,
0x3ffe6fff,0x7ffc2fff,0xffe802ef,0xddddddb3,0x3bbba29d,0x0002eeee,
0x000a9880,0x02a98000,0x00001531,0x000006aa,0x00000062,0x2001a988,
0x00001aaa,0x4d554ccc,0x00000019,0x54c45533,0x0355500a,0x000d5540,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00066660,0x00000000,0x98000000,
0x00001999,0x33330000,0x10000001,0x00001333,0x02666620,0x31000000,
0x00001333,0x99988000,0x7ffe4000,0x0000003f,0x5c40077a,0xffffffec,
0xffffffff,0x7fec000f,0x000002ff,0x7fffe400,0x4c000002,0x0006ffff,
0xfffff100,0xf8000000,0xf000efff,0x40000dff,0x2005fffd,0x2ffffffa,
0xf8800000,0x7fe4403f,0xffffffff,0xffffffff,0xffe8000f,0x0000006f,
0x13fffe20,0xff100000,0x000bffff,0x3fffe600,0x70000003,0x4003ffff,
0x00006fff,0x4017fff6,0xffdefff9,0x4000000f,0x3e600ffb,0xffffffff,
0xffffffff,0x8000ffff,0x002ffff8,0xff700000,0x000000bf,0xfff9fffb,
0x2a000007,0x00007fff,0x07fffd00,0x006fff80,0x17fff600,0x27fffa20,
0x000efff8,0x81bf6000,0xfffffff8,0xeeeeefff,0x0eeeffff,0xbfff3000,
0x20000000,0x0000ffff,0xa7ffe400,0x0001fffd,0x07fff900,0xffa80000,
0xfff8004f,0x3f600006,0xffd805ff,0x17ffee4f,0x4ff80000,0x3fffff60,
0xc83fffff,0x200007ff,0x0001fffa,0x7ffdc000,0x54000001,0x3fe26fff,
0x000000ff,0x0000dffb,0x006ffe80,0x000dfff0,0x004ccc40,0x3a1bffee,
0x00003fff,0xf301ff98,0xffffffff,0xfff907ff,0xffc80000,0x40000005,
0x00003fff,0x0ffffc40,0x001bffee,0x17ff4400,0xffa80000,0xfff0000f,
0x0000000d,0x00000000,0x7dc0ff90,0xffffffff,0x7ffc83ff,0x00000000,
0x00000000,0x00000000,0x00000000,0xf8000000,0x000006ff,0x00000000,
0x205fe800,0xfffffffd,0xfc83ffff,0x2600007f,0x0009abca,0x79530000,
0x00000135,0x26af2a60,0x00000000,0x00000000,0x0037ffc0,0xfb826200,
0xb80005ff,0xb9805fff,0x02ffccdc,0x3ffffffa,0xc83fffff,0x2e0007ff,
0xffffffed,0x00002dff,0x7ffff6dc,0x002dffff,0x7ff6dc00,0x2dffffff,
0x17ffee00,0x3ffee000,0x00bfff75,0x4bfff700,0x65446fff,0xfd000acd,
0x02fffdcb,0x2fffdc00,0xfffffb50,0x7f40bfff,0xffffffff,0x7ffc83ff,
0xfffe9800,0xffffffff,0x40003eff,0xffffffe9,0xefffffff,0x7f4c0003,
0xffffffff,0x803effff,0x0005fffb,0xf75fffb8,0x70000bff,0x7ffcbfff,
0xfffffd16,0xfe8019ff,0x017ffee6,0x17ffee00,0x7fffffe4,0x80efffff,
0xfffffffd,0xfc83ffff,0x7fdc007f,0xffffffff,0x4fffffff,0xffff7000,
0xffffffff,0x009fffff,0x3ffffee0,0xffffffff,0x5c04ffff,0x80005fff,
0xff75fffb,0xf70000bf,0x77ffcbff,0xfffffff9,0x3e01ffff,0x17ffee7f,
0x3ffee000,0xfffffd85,0xfffffbbd,0x7fffe42f,0x3fffffff,0x1007ffc8,
0x9dfffffb,0x3faea635,0x000effff,0xdfffffb1,0x3aea6359,0x00efffff,
0xfffffb10,0x2ea6359d,0x0efffffe,0x00bfff70,0x2bfff700,0x0005fffb,
0x3e5fffb8,0xdfffffff,0xfffffdbb,0x7dcfff02,0xb80005ff,0x7fdc5fff,
0x3fea0bff,0x7d46fffe,0xffffffff,0x7ffc83ff,0xfffffd00,0x3ffaa005,
0xffd006ff,0x2a005fff,0x006ffffe,0x05fffffd,0x3ffffaa0,0x0bfff706,
0xbfff7000,0x0017ffee,0xf97ffee0,0x80dfffff,0x40ffffe8,0x3fee7ff8,
0xfb80005f,0x3ffe25ff,0xe8ffc84f,0x7ff41fff,0xffffffff,0x807ffc83,
0x00dffffb,0x4ffffd80,0x6ffffdc0,0xfffd8000,0x7ffdc04f,0xfd8000df,
0xffb84fff,0xfb80005f,0xbfff75ff,0xfff70000,0x27ffffcb,0x13fffa20,
0x3ee1fff1,0xb80005ff,0x3ff25fff,0x269ff06f,0x7fcc5fff,0xffffffff,
0x407ffc83,0x004ffff8,0x0ffffe40,0x04ffff88,0x7fffe400,0x9ffff101,
0xfffc8000,0x2fffdc1f,0x7ffdc000,0x00bfff75,0x4bfff700,0x800fffff,
0x7cc7fff9,0xbfff71ff,0xfff70000,0x40ffff4b,0x3bfa2ff9,0xfffffb85,
0xfc83ffff,0x7ffec07f,0xffd00006,0x3fff60df,0xffd00006,0x3fff60df,
0xffd00006,0x5fffb8df,0xfffb8000,0x00bfff75,0x4bfff700,0x2003ffff,
0x3e61fffd,0xbfff71ff,0xfff70000,0x41fffe6b,0x20020ffb,0xffffffe8,
0x07ffc83f,0x00bfffe6,0x7fffd400,0x17fffcc1,0xfffa8000,0x7fffcc1f,
0xff500002,0x7ffdc3ff,0xffb80005,0x0bfff75f,0xbfff7000,0x0007fffc,
0x7d45fff5,0xbfff72ff,0xfff70000,0x41bffeab,0x2a0006fd,0x83ffffdc,
0x3f607ffc,0x400005ff,0x7ec4fffe,0x400005ff,0x7ec4fffe,0x400005ff,
0x3ee4fffe,0xb80005ff,0xfff75fff,0xff70000b,0x037ffcbf,0xa93ffe60,
0xfff72fff,0xff70000b,0x13ffeebf,0x0000ffe2,0x641fffc4,0x3ffe07ff,
0x5c00002f,0x7ffc7fff,0x5c00002f,0x7ffc7fff,0x5c00002f,0x3fee7fff,
0xfb80005f,0xbfff75ff,0xfff70000,0x002fffcb,0xfb97ffe2,0xbfff73ff,
0xfff70000,0x20ffff2b,0x00001ffa,0xf907fff1,0x3ffe20ff,0x4400000f,
0xff11ffff,0x800001ff,0xf11ffff8,0x00001fff,0x71ffff88,0x0000bfff,
0x3eebfff7,0xb80005ff,0x3ffe5fff,0x7fff8004,0x7dcfffee,0xb80005ff,
0xfff95fff,0x000ff905,0x41fffc40,0xff307ffc,0x200000ff,0xff33fffe,
0x200000ff,0xff33fffe,0x200000ff,0xff73fffe,0xf70000bf,0x3ffeebff,
0xffb80005,0x00fffe5f,0xfc9fffe0,0xbfff74ff,0xfff70000,0x20ffff2b,
0x200004ff,0xfc83fff8,0xffff507f,0x3f600000,0xffff53ff,0x3f600000,
0xffff53ff,0x3f600000,0xbfff73ff,0xfff70000,0x017ffeeb,0x97ffee00,
0xf8004fff,0x3fff27ff,0x00bfff75,0x2bfff700,0x7cc5fffb,0x2200002f,
0xffc83fff,0x0dfff707,0x3ff60000,0x0dfff74f,0x3ff60000,0x0dfff74f,
0x3ff60000,0x0bfff74f,0xbfff7000,0x0017ffee,0xf97ffee0,0x7c4005ff,
0x3fff66ff,0x00bfff75,0x2bfff700,0x7dc6fffa,0x019a880f,0x20fffe20,
0xff907ffc,0x2000009f,0xff95fffc,0x2000009f,0xff95fffc,0x2000009f,
0xff75fffc,0xf70000bf,0x3ffeebff,0xffb80005,0x01bffe5f,0x6cbfff30,
0xfff76fff,0xff70000b,0x1fffe6bf,0x3ff20bfd,0xfff1002f,0x20fff907,
0x0004fffd,0x2bfff900,0x0004fffd,0x2bfff900,0x0004fffd,0x2bfff900,
0x0005fffb,0xf75fffb8,0x70000bff,0x7ffcbfff,0x7ffdc007,0x5dbfffa3,
0x80005fff,0x3fa5fffb,0x07ff11ff,0x4003fffa,0xfc83fff8,0xbfffb07f,
0x3f600000,0xbfffb4ff,0x3f600000,0xbfffb4ff,0x3f600000,0xbfff74ff,
0xfff70000,0x017ffeeb,0x97ffee00,0x2003ffff,0x3fe0ffff,0xbfff77ff,
0xfff70000,0x477ffdcb,0xffa81ffa,0x3fe2005f,0x07ffc83f,0x000dfff9,
0x4ffffa00,0x0006fffc,0x27fffd00,0x0006fffc,0x27fffd00,0x0005fffb,
0xf75fffb8,0x70000bff,0x7ffcbfff,0xfff7007f,0x57ffff8d,0x0000dfff,
0x7c49fff9,0x87fccfff,0x002ffff8,0x320fffe2,0xfff707ff,0x3e00000f,
0xfff73fff,0x3e00000f,0xfff73fff,0x3e00000f,0xfff53fff,0xff90000d,
0x1bffea9f,0x3fff2000,0x17ffffe4,0x83ffff50,0xff57ffff,0xfb0000df,
0xfffa89ff,0x7fd44fff,0x7c4004ff,0x7ffc83ff,0x01ffff50,0xfff88000,
0x1ffff52f,0xff880000,0xffff52ff,0xf8800001,0xfff52fff,0xffb0000d,
0x1bffea9f,0x3fff6000,0x3fffffe4,0x7ffdc41e,0x7ffff84f,0x000dfff3,
0x907fffd0,0xb9dfffff,0x00bfffff,0x907fff10,0x7ffc0fff,0x5400001f,
0x7ffc7fff,0x5400001f,0x7ffc7fff,0x5400001f,0x3fe67fff,0xfe80006f,
0xdfff33ff,0xfffd0000,0x7fffffc7,0xfffeefff,0xfff80dff,0x0ffff37f,
0x7fffd000,0x3ffffee0,0x0dffffff,0x3fff8800,0x3207ffc8,0x00006fff,
0x3227fff4,0x00006fff,0x3227fff4,0x00006fff,0xf327fff4,0xd0000fff,
0x3fe67fff,0xfe80007f,0x3bffe3ff,0xffffffe8,0x3fe04fff,0x3fffe7ff,
0x7ffc0001,0x3ffe601f,0x01efffff,0x0fffe200,0xfa81fff2,0x00002fff,
0xa83ffff7,0x0002ffff,0x83ffff70,0x002ffffa,0x3ffff700,0x001ffff8,
0xf0ffffc0,0x80003fff,0x3fe1ffff,0x3ffff26f,0x76c01dff,0x3fff65ee,
0x3fee0003,0x67fcc07f,0x0000abca,0xc83fff88,0x7ff407ff,0x440000ff,
0xfd06ffff,0x80001fff,0xd06ffff8,0x0001ffff,0x86ffff88,0x0003fffd,
0xfb1fffee,0x5c0007ff,0x7ffc7fff,0x00aba986,0xffffb800,0xffff0000,
0x01ffb80b,0xfff10000,0x80fff907,0x004ffff9,0x0ffffec0,0x04ffff98,
0x7fffec00,0x9ffff301,0xfffd8000,0xffffb81f,0xffff0000,0x0ffffb8b,
0xbffff000,0x0006fff8,0xffff3000,0xfff7000b,0x06fe805f,0x3fe20000,
0x07ffc83f,0x0dffffc8,0x7fff4400,0x7ffe404f,0x744000df,0x6404ffff,
0x000dffff,0x27ffff44,0x05ffff98,0x2ffffb80,0x02ffffcc,0x17fffdc0,
0x0001bffe,0x643ffff8,0x801effff,0x06ffffe9,0x00027fc4,0x07fff100,
0x3a00fff9,0x002fffff,0x0dfffff5,0x3fffffa0,0xffff5002,0x3ffa00df,
0xf5002fff,0xc80dffff,0x801effff,0x06ffffe9,0x03dffff9,0xdffffd30,
0x000dfff0,0x21ffffc0,0xfffffff8,0xfecbaace,0x401fffff,0x00001ffa,
0x20fffe20,0xb1007ffc,0x79dfffff,0xffd97313,0x2001dfff,0xefffffd8,
0xecb989bc,0x00efffff,0xfffffb10,0x9731379d,0x1dfffffd,0xfffff880,
0xcbaaceff,0x1ffffffe,0xffffff10,0xd97559df,0x03ffffff,0x0000dfff,
0x4c1ffffc,0xfffffffe,0xffffffff,0x7fc801ff,0x7c400000,0x7ffc83ff,
0x7fffe400,0xffffffff,0x004fffff,0xffffff90,0xffffffff,0x20009fff,
0xfffffffc,0xffffffff,0x3a6004ff,0xffffffff,0xffffffff,0x7ff4c01f,
0xffffffff,0x1fffffff,0x000dfff0,0x81ffffc0,0xffffffd8,0xffffffff,
0x0bff000e,0xff880000,0x07ffc83f,0xffffea80,0xffffffff,0x540002ef,
0xfffffffe,0x2effffff,0x7ff54000,0xffffffff,0x8002efff,0xffffffd8,
0xffffffff,0xffb1000e,0xffffffff,0x401dffff,0x00006fff,0x3006eeee,
0xfffffff9,0x40039fff,0x00002ff9,0x41fffc40,0x20007ffc,0xffffffd9,
0x0001cfff,0x7fffecc0,0x01cfffff,0x7fecc000,0xcfffffff,0xfc980001,
0xffffffff,0x930001cf,0xffffffff,0xff0039ff,0x000000df,0x2eea6600,
0x8800099a,0x000000eb,0x5c177744,0x300006ee,0x00335953,0x2a660000,
0x000019ac,0x35953300,0x4c000003,0x099abba9,0x2a660000,0x00099abb,
0x00017bba,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x4ccc0000,0x00000019,
0x00999988,0x99980000,0x80000009,0x00009998,0x13333100,0x30000000,
0x00003333,0x00266620,0x01333310,0x3f6a0000,0x2ffcc0ce,0x7fec0000,
0x000002ff,0x1bfffe20,0x3f200000,0x00002fff,0x77fffcc0,0xf8800000,
0x00006fff,0x7fffcc00,0xf9800005,0x54006fff,0xfe85ffff,0x7e4002ff,
0x9bdfffff,0x00004ffd,0x00dfffd0,0x7fe40000,0x000000ff,0x027fffc4,
0x3fa20000,0x0005ffff,0x5ffff500,0x6c000000,0x0000efff,0x7ffffc40,
0x7fdc005f,0x7fff41ff,0x3ffe6002,0xffffffff,0x000001ff,0x003ffff1,
0xfff10000,0x0000003f,0x000dfff7,0x9fffb000,0x00007fff,0x01bffee0,
0x7fcc0000,0x800000ff,0xfffcfffd,0x7ffe4003,0x017fff45,0x9319ff90,
0x09ffffff,0xff980000,0x8000005f,0x0003fffb,0x1ffff000,0xfb800000,
0x5fffb5ff,0x3f200000,0x000002ff,0x002fffd8,0x4fffc800,0x8003fffb,
0x3fa0fffe,0x3f6002ff,0x2dedb81f,0xf5000000,0x000003ff,0x0005fff8,
0x3fff7000,0xf9800000,0xfff10fff,0x2000003f,0x00006ffe,0x027ffc40,
0x7ffd4000,0x1ffff10e,0x27ff4400,0x0005fffd,0x00000000,0x0017ff20,
0x0effb800,0xfd000000,0x8000007f,0x542ffff8,0x0000efff,0x02ffe880,
0x3ff20000,0xf8800005,0x7fdc1fff,0x7fcc006f,0x05fffd0f,0xabca9800,
0x00000009,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x17fff400,0x3ffb6e00,0x2dffffff,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x2005fffd,
0xffffffe9,0xefffffff,0xff000003,0x5c000fff,0xffffffff,0xffffffff,
0x05ffffff,0x3ffffc00,0x3e000000,0x20007fff,0xfffffffb,0xffffffff,
0x5fffffff,0x013fffee,0xffffd800,0xffffff70,0xffffffff,0xffffffff,
0x8bfffa0b,0xb802fffe,0xffffffff,0xffffffff,0x5400004f,0x002fffff,
0xffffff70,0xffffffff,0xffffffff,0x7fd4000b,0x00002fff,0xfffff500,
0x3fee0005,0xffffffff,0xffffffff,0x7f45ffff,0x80001fff,0x2e3ffffb,
0xffffffff,0xffffffff,0x05ffffff,0x7f45fffd,0x3f6202ff,0x1aceffff,
0xffffd753,0x200001df,0x06fffffd,0xfffff700,0xffffffff,0xffffffff,
0x7ec000bf,0x0006ffff,0xffffb000,0x3ee000df,0xffffffff,0xffffffff,
0x4c5fffff,0x0006ffff,0x22ffffc4,0xfffffffb,0xffffffff,0x5fffffff,
0x745fffd0,0x3fa02fff,0x5002ffff,0x00dffffd,0xfdfff100,0xf70003ff,
0xdddddfff,0xdddddddd,0x009ddddd,0x3fbffe20,0x000001ff,0x7ff7ffc4,
0xffb8001f,0xeeeeeeff,0xeeeeeeee,0xfb84eeee,0x20004fff,0x5c0ffffd,
0xeeeeffff,0xeeeeeeee,0x04eeeeee,0x7f45fffd,0xfff702ff,0xfb0001bf,
0x80009fff,0xfff9fffb,0xfffb8004,0x00000005,0xff9fffb8,0x4000004f,
0xfff9fffb,0xfffb8004,0xe8000005,0x8001ffff,0xb82ffffa,0x00005fff,
0x22fffe80,0xf882fffe,0x40004fff,0x001ffffc,0x7f5bffa0,0x7dc000ff,
0x000005ff,0xd6ffe800,0x00001fff,0xfeb7ff40,0x7dc000ff,0x000005ff,
0x06ffff98,0x2ffffc40,0x005fffb8,0xfffe8000,0x20bfffa2,0x0006fffd,
0x00dfffd0,0x64fffe60,0x5c003fff,0x00005fff,0x7ffcc000,0x007fff93,
0x3ffe6000,0x007fff93,0x005fffb8,0xfff70000,0x7fec007f,0xfff700ef,
0xd000000b,0x7ff45fff,0x7fffcc2f,0xff500002,0xf90003ff,0x3ffe63ff,
0x7ffdc006,0x00000005,0xf98fffe4,0x000006ff,0x3e63fff9,0x7dc006ff,
0x000005ff,0x07ffffa0,0x07fffea0,0x005fffb8,0xfffe8000,0xb0bfffa2,
0x0000bfff,0x004fffe8,0x7f47fff8,0x3ee001ff,0x000005ff,0x23fffc00,
0x0001fffe,0x747fff80,0x2e001fff,0x00005fff,0x3fffe600,0x7fffc406,
0x2fffdc04,0x7f400000,0x3fffa2ff,0x017fffc2,0x3ffee000,0x7ffd4007,
0x027ffdc4,0x00bfff70,0x7d400000,0x7ffdc4ff,0x7d400004,0x7ffdc4ff,
0x3ffee004,0x40000005,0x203ffffb,0xb806fffd,0x00005fff,0x22fffe80,
0x3e22fffe,0x00000fff,0x00ffffc4,0x883fffb0,0x7000ffff,0x0000bfff,
0x7ffec000,0x07fffc41,0xfffb0000,0x0ffff883,0x0bfff700,0xfd000000,
0xff501fff,0xff7003ff,0x000000bf,0x7f45fffd,0x3ffe62ff,0xfd000007,
0x3e2007ff,0xfffb06ff,0x3ffee007,0x00000005,0x360dfff1,0x00003fff,
0x360dfff1,0xf7003fff,0x00000bff,0xbffff300,0x009fffd0,0x0017ffee,
0x3fffa000,0xa8bfffa2,0x00007fff,0x007fffb0,0x5413ffee,0xf7006fff,
0x00000bff,0x13ffee00,0x0037ffd4,0x04fffb80,0x200dfff5,0x0005fffb,
0xfff70000,0x37ffe45f,0x0bfff700,0xffd00000,0x17fff45f,0x000dfff7,
0x13fff600,0x00ffff40,0x7003ffff,0x5555dfff,0x55555555,0x00355555,
0x201fffe8,0x0001ffff,0x201fffe8,0xb801ffff,0xaaaaefff,0xaaaaaaaa,
0x001aaaaa,0xf36fffe8,0x5c003fff,0xaaaaefff,0xaaaaaaaa,0x201aaaaa,
0x3fa2fffe,0x3fff22ff,0xf9000004,0xff300bff,0xfffc80df,0xffffb805,
0xffffffff,0xffffffff,0x3fe6003f,0x7ffe406f,0x7fcc0005,0x7ffe406f,
0xffffb805,0xffffffff,0xffffffff,0xff98003f,0x3fffdbff,0x7fffdc00,
0xffffffff,0xffffffff,0x3fffa03f,0xd8bfffa2,0x00004fff,0x00bfff90,
0x9807fff9,0x5c00ffff,0xffffffff,0xffffffff,0x003fffff,0x300ffff2,
0x0001ffff,0x201fffe4,0x400ffff9,0xfffffffb,0xffffffff,0x03ffffff,
0xfffff700,0xf7000bff,0xffffffff,0xffffffff,0x7407ffff,0x3ffa2fff,
0x17fff62f,0x7fec0000,0x7ffc404f,0xfffe800f,0x7fffdc03,0xffffffff,
0xffffffff,0xfff1003f,0xfffd001f,0x3fe20007,0xffe800ff,0x7ffdc03f,
0xffffffff,0xffffffff,0x3a0003ff,0x00ffffff,0xfffffb80,0xffffffff,
0xffffffff,0x8bfffa03,0x3f22fffe,0x000006ff,0xb807fffd,0xf7005fff,
0xffb80dff,0xaaaaaaef,0xaaaaaaaa,0xf7001aaa,0x3ee00bff,0xf70006ff,
0x3ee00bff,0x7fdc06ff,0xaaaaaaef,0xaaaaaaaa,0x20001aaa,0x02fffff9,
0x5dfff700,0x55555555,0x55555555,0x17fff403,0x7dc5fffd,0x000007ff,
0xe807ffff,0x9999bfff,0xff999999,0x3fee02ff,0x0000005f,0x4cdffff4,
0x99999999,0x8002ffff,0x999bfffe,0xf9999999,0x3ee02fff,0x000005ff,
0xdfff9000,0x7ffdc000,0xe8000005,0x3ffa2fff,0x3fffea2f,0x7c400000,
0x3e602fff,0xffffffff,0xffffffff,0x3fee05ff,0x0000005f,0x3fffffe6,
0xffffffff,0x005fffff,0x7fffffcc,0xffffffff,0x205fffff,0x0005fffb,
0xff700000,0x7dc000bf,0x000005ff,0x3a2fffe8,0x7ffc2fff,0x5400001f,
0x7e407fff,0xffffffff,0xffffffff,0xff700fff,0x000000bf,0x7fffffe4,
0xffffffff,0x00ffffff,0x3fffff20,0xffffffff,0x0fffffff,0x00bfff70,
0x2e000000,0x20005fff,0x0005fffb,0x2fffe800,0xf90bfffa,0x80000dff,
0x7c04fffe,0xffffffff,0xffffffff,0xf703ffff,0x00000bff,0x7fffffc0,
0xffffffff,0x3fffffff,0x3ffffe00,0xffffffff,0xffffffff,0x0bfff703,
0x20000000,0x0005fffb,0x0017ffee,0x3fffa000,0x50bfffa2,0x0005ffff,
0x07fffee0,0x99efffa8,0x99999999,0x6fffc999,0x00bfff70,0x3fea0000,
0x999999ef,0xc9999999,0xf5006fff,0x33333dff,0x33333333,0x2e0dfff9,
0x00005fff,0xfff70000,0x7fdc000b,0x8000005f,0x3fa2fffe,0xfffe82ff,
0x7c40000f,0x7ec06fff,0xf10003ff,0xff705fff,0x000000bf,0x000ffff6,
0x017fffc4,0x001fffec,0x82ffff88,0x0005fffb,0xff700000,0x7dc000bf,
0x000005ff,0x3a2fffe8,0xff982fff,0x6c0004ff,0x2201ffff,0x0000ffff,
0x2e17fffa,0x00005fff,0x0ffff880,0x3fffa000,0x7fffc405,0x3ffa0000,
0x5fffb85f,0x00000000,0x000bfff7,0x002fffdc,0x7fff4000,0xfffc8002,
0x744000df,0x5c04ffff,0x40005fff,0x5c0ffffa,0x00005fff,0x05fffb80,
0x7fffd400,0x17ffee00,0xffff5000,0x05fffb81,0x70000000,0x4000bfff,
0x0005fffb,0x2fffe800,0xe806eeea,0x002fffff,0x0dfffff5,0x005fffd0,
0x4ffff880,0x002fffdc,0x7fff4000,0x7fc40002,0x3ffa04ff,0x7c40002f,
0x7fdc4fff,0x0000005f,0x0bfff700,0x2fffdc00,0x7f400000,0x3fffa2ff,
0x3fff6203,0x989bceff,0xfffffecb,0x7ffcc00e,0xfc80000f,0x7ffdc7ff,
0x4c000005,0x0000ffff,0x307fffc8,0x0001ffff,0xb8ffff90,0x00005fff,
0xfff70000,0x7fdc000b,0x8000005f,0x3fa2fffe,0xffc803ff,0xffffffff,
0x4fffffff,0x0bfff900,0x3ffe6000,0x3fffee2f,0xeeeeeeee,0xeeeeeeee,
0x7fe42eee,0xf300005f,0xff905fff,0x260000bf,0x3ee2ffff,0xeeeeefff,
0xeeeeeeee,0x02eeeeee,0x0bfff700,0x7fffdc00,0xeeeeeeee,0xeeeeeeee,
0xffe82eee,0x0ffffa2f,0x7ffff540,0xffffffff,0x3fe002ef,0x200002ff,
0x3ee5fffe,0xffffffff,0xffffffff,0x43ffffff,0x0002ffff,0x217fffa0,
0x0002ffff,0xb97fffa0,0xffffffff,0xffffffff,0x3fffffff,0xbfff7000,
0x7ffdc000,0xffffffff,0xffffffff,0xfe83ffff,0x3fffa2ff,0x7fecc003,
0xcfffffff,0x7ffd4001,0x7dc00007,0xfff70fff,0xffffffff,0xffffffff,
0x7d47ffff,0x400007ff,0x2a0ffffb,0x00007fff,0xb87fffdc,0xffffffff,
0xffffffff,0x3fffffff,0xbfff7000,0x7ffdc000,0xffffffff,0xffffffff,
0xfe83ffff,0x000002ff,0x03359533,0x27ffec00,0x3fe20000,0xffff74ff,
0xffffffff,0xffffffff,0x7fec7fff,0x4400004f,0x3f64ffff,0x400004ff,
0xf74ffff8,0xffffffff,0xffffffff,0x07ffffff,0x17ffee00,0xffffb800,
0xffffffff,0xffffffff,0xffe83fff,0x0000002f,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x26660000,
0x3fe80019,0x55550000,0x00155550,0x00000000,0x4c0aaa98,0x00001aaa,
0x80000000,0x54c0aaa9,0x555401aa,0x05554c0a,0x81555300,0x0001aaa9,
0x05edc400,0x3ffe6000,0x3fe8004f,0xfff88000,0x00ffff87,0x677ecc00,
0x0007ff81,0x3217ffec,0x00003fff,0x82deec88,0x20000ffd,0x7e42fffd,
0x7ff403ff,0x17ffec0f,0x85fffb00,0x0003fffc,0x3fbfea00,0x3f60001f,
0xb73006ff,0x059dffff,0x1fffe200,0x0003fffe,0xffffffa8,0x05ffc9be,
0x17ffec00,0x000ffff2,0xfffff300,0xfff539df,0xfffd8000,0x01fffe42,
0xfb03fffa,0x7ec005ff,0x7ffe42ff,0x3a000003,0x000bd10e,0x003fffe6,
0xffffffb1,0x005dffff,0xf87fff88,0x10000fff,0xffffffff,0x007fffff,
0x42fffd80,0x0003fffc,0x7ffffec0,0x4fffffff,0x7ffec000,0x01fffe42,
0xfb03fffa,0x7ec005ff,0x7ffe42ff,0xf3000003,0x8000fa85,0x4402fffd,
0xffffffff,0x02ffffff,0x21fffe20,0x0000ffff,0xd711dff5,0x00dfffff,
0x85fffb00,0x0003fffc,0x227ffe20,0xffffffda,0x7fec0000,0x1fffe42f,
0xb03fffa0,0x6c005fff,0x7fe42fff,0x3000003f,0x001fa85f,0x401fffcc,
0xeadffffe,0xfffffdcf,0x00000001,0xa83ffb80,0x00003eed,0x80000000,
0xec984ff9,0x000000ce,0x00000000,0x00000000,0x0db17a00,0x00bff900,
0x743dfff9,0xdfffd53f,0x00000000,0x00000000,0x4d5e54c0,0x00000000,
0x00000000,0x00000000,0x00000000,0x2ffcffb8,0x7c400000,0x1ff41fff,
0x5c3ffff3,0x80005fff,0x0005fffb,0xb7000000,0xfffffffd,0x000005bf,
0x7dc00000,0xffffffff,0xffffffff,0x205fffff,0x0002fffe,0x01ffffe0,
0xfff00000,0x000000ff,0xfd09fff3,0x24fffe87,0x0005fffb,0xf95fffb8,
0x80001fff,0x9804fffa,0xfffffffe,0x3effffff,0xfff00000,0x7dc000ff,
0xffffffff,0xffffffff,0x205fffff,0x0002fffe,0x5fffff50,0x2a000000,
0x002fffff,0x205fffd0,0xfe82fffb,0x72fffdc3,0x0000bfff,0x3f2bfff7,
0x40005fff,0x5c04fffa,0xffffffff,0xffffffff,0x5400004f,0x002fffff,
0xffffff70,0xffffffff,0xffffffff,0x17fff40b,0xfffd8000,0x000006ff,
0xdfffffb0,0x3fffa000,0x03fff902,0x701507fd,0x0000bfff,0x3f2bfff7,
0x0003ffff,0x4413ffea,0xcefffffd,0xffd7531a,0x0001dfff,0x3fffff60,
0xfff70006,0xdddddddf,0xdddddddd,0x7f409ddd,0x880002ff,0x1fffefff,
0x7c400000,0x01fffeff,0x02fffe80,0xfd07fff9,0x7ffdc007,0xffb80005,
0xfffff95f,0x3ea0001f,0xfffd04ff,0x3aa005ff,0x0006ffff,0xffefff88,
0xffb8001f,0x0000005f,0x0005fffd,0xff3fff70,0x8000009f,0xfff9fffb,
0xfffe8004,0x0dfff502,0x7dc007fd,0xb80005ff,0xfff95fff,0x2000bfff,
0xfb84fffa,0x8000dfff,0x004ffffd,0x7cfffdc0,0xfb8004ff,0x000005ff,
0x005fffd0,0x3adffd00,0x00000fff,0x7f5bffa0,0x7f4000ff,0xfff102ff,
0x003fe81f,0x0017ffee,0x657ffee0,0x3fffffff,0x4fffa800,0x027fffc4,
0x3ffff200,0x3ffa0001,0x001fffd6,0x005fffb8,0xfffd0000,0xff980005,
0x07fff93f,0x3fe60000,0x07fff93f,0x02fffe80,0xe87bfffa,0x3fee003f,
0xfb80005f,0xffff95ff,0x8001ffff,0x7ec4fffa,0xd00006ff,0x2000dfff,
0xff93fff9,0xffb8007f,0x0000005f,0x0005fffd,0xf31fffc8,0x00000dff,
0x7cc7fff2,0x7f4006ff,0x3fe602ff,0x3fe9cfff,0x17ffee00,0x3ffee000,
0xff9fff95,0xfa800bff,0x3ffe64ff,0xf500002f,0x90003fff,0x3fe63fff,
0x7fdc006f,0x0000005f,0x0005fffd,0x7f47fff8,0x800001ff,0x7ff47fff,
0x3ffa001f,0x7ffcc02f,0x00cfffff,0x00bfff70,0x2bfff700,0xffabfffc,
0x3ea003ff,0x3fff64ff,0x7f400005,0xff8004ff,0x0ffff47f,0x0bfff700,
0x3fa00000,0x2a0002ff,0x7fdc4fff,0x5400004f,0x7fdc4fff,0x3ffa004f,
0xfff9802f,0xceffffff,0x17ffee01,0x3ffee000,0x367fff95,0x5000ffff,
0x7ffc9fff,0x5c00002f,0x54007fff,0x7fdc4fff,0x3fee004f,0x0000005f,
0x0005fffd,0x220fffec,0x0000ffff,0x107fff60,0x2001ffff,0x1002fffe,
0xffffffd7,0x3ee09fff,0xb80005ff,0xfff95fff,0x17fffe27,0x8a7ffd40,
0x0000ffff,0x0ffffc40,0x83fffb00,0x000ffff8,0x000bfff7,0x3fffa000,
0xfff10002,0x0ffff60d,0x7ffc4000,0x07fffb06,0x00bfffa0,0x3ffff260,
0x5c1effff,0x80005fff,0xff95fffb,0x7fffd47f,0x4fffa803,0x000ffff3,
0x0ffffa00,0x837ffc40,0x7003fffd,0x0000bfff,0x0bfffa00,0x27ffdc00,
0x006fffa8,0x09fff700,0x401bffea,0x0002fffe,0x3fffb7fa,0x7ffdc6ff,
0xffb80005,0x87fff95f,0x400ffffd,0xff54fffa,0x200000ff,0x7003fffd,
0x3ea09fff,0xff7006ff,0x555555df,0x55555555,0xfe803555,0xfd0002ff,
0x7ffc03ff,0xfe80001f,0x3ffe01ff,0xfffe801f,0x4ffa0002,0x23ffffd9,
0x0005fffb,0xf95fffb8,0xfff887ff,0x7ffd405f,0x00dfff74,0x3fff6000,
0x3fffd004,0x00ffffc0,0x7fffffdc,0xffffffff,0x3fffffff,0x017fff40,
0x037ffcc0,0x0017fff2,0x80dfff30,0xe805fffc,0x20002fff,0x7ffe43fe,
0x0bfff70f,0xbfff7000,0x2a0ffff2,0x2a03ffff,0xfff94fff,0x32000009,
0xf9805fff,0x7fe406ff,0xfffb805f,0xffffffff,0xffffffff,0x7ff403ff,
0xffc8002f,0x7ffcc03f,0x3f20000f,0x7fcc03ff,0x7ff400ff,0x3fa0002f,
0x97fffc43,0x0005fffb,0xf95fffb8,0x3ff607ff,0xfff500ff,0x013fff69,
0x7ffe4000,0x3fffc805,0x07fffcc0,0x3ffffee0,0xffffffff,0xffffffff,
0x17fff403,0x3fffe200,0x3fffe800,0xffff1000,0x7fffd001,0x02fffe80,
0x360ffa00,0xfff73fff,0xff70000b,0x0ffff2bf,0x837fffc4,0xffb4fffa,
0x200000bf,0x4404fffd,0xe800ffff,0x7dc03fff,0xaaaaaeff,0xaaaaaaaa,
0x7401aaaa,0x5c002fff,0xf7005fff,0x2e000dff,0xf7005fff,0xffe80dff,
0x40ae602f,0xfffb83fe,0x00bfff75,0x2bfff700,0x2e03fffc,0xfa83ffff,
0xdfff94ff,0x3fa00000,0x7fdc03ff,0xfff7005f,0x5fffb80d,0xfd000000,
0xfe8005ff,0x99999bff,0xfff99999,0xffe8002f,0x999999bf,0xffff9999,
0x0bfffa02,0x741bffea,0x5fffa83f,0x000dfff5,0x329fff90,0x7ec03fff,
0x7fd40fff,0x0ffff74f,0x3ffe0000,0x7fff403f,0x9999999b,0x2ffff999,
0x017ffee0,0x7ff40000,0x3fe6002f,0xffffffff,0xffffffff,0x7fcc005f,
0xffffffff,0xffffffff,0x3fffa05f,0x07fff882,0xfff707fd,0x01bffea7,
0x53fff600,0x4403fffc,0x7d46ffff,0xffff54ff,0xf8800001,0x3e602fff,
0xffffffff,0xffffffff,0x3fee05ff,0x0000005f,0x4005fffd,0xfffffffc,
0xffffffff,0x000fffff,0x3ffffff2,0xffffffff,0x00ffffff,0x3e05fffd,
0x3fe82fff,0xf32fffd8,0xd0000dff,0x3ff27fff,0xfffb803f,0x93ffea3f,
0x0001ffff,0x03fffd40,0x3ffffff2,0xffffffff,0x00ffffff,0x000bfff7,
0x3fffa000,0x3fffe002,0xffffffff,0xffffffff,0x3ffe003f,0xffffffff,
0xffffffff,0xfffd03ff,0x1bfff205,0xfff30ffa,0x1fffe61f,0x3fffa000,
0x007fff93,0x543ffff6,0x3ff24fff,0x7400006f,0x7fc04fff,0xffffffff,
0xffffffff,0xff703fff,0x000000bf,0x400bfffa,0x999efffa,0x99999999,
0x06fffc99,0x33dfff50,0x33333333,0xdfff9333,0x40bfffa0,0x744ffff9,
0x3fffa23f,0x00ffffc4,0x47fffe00,0x1003fffc,0x3eadffff,0x3ffea4ff,
0xf700002f,0x7d403fff,0x99999eff,0x99999999,0xf706fffc,0x00000bff,
0x00bfffa0,0x001fffec,0x02ffff88,0x003fffd8,0x05ffff10,0x6405fffd,
0xfd0dffff,0x1bfffea7,0x000ffff6,0x327fffb8,0x2e003fff,0xffabffff,
0x7ffff44f,0x7fc40000,0x7fec06ff,0xff10003f,0xfff705ff,0x2000000b,
0x8802fffe,0x0000ffff,0x1017fffa,0x0001ffff,0x742ffff4,0x7e402fff,
0xeffeffff,0x81ffffff,0x000ffffb,0x64bffff0,0x6c003fff,0xfffcffff,
0x27fffcc4,0x3fff6000,0x3ffe201f,0x3fa0000f,0xfffb85ff,0xd0000005,
0xf7005fff,0xa8000bff,0x2e00ffff,0x40005fff,0x740ffffa,0xfc802fff,
0xffffffff,0xf301efff,0x7000bfff,0x7e45ffff,0x7c4003ff,0x4fffffff,
0x0dffffc8,0x7fff4400,0x7ffdc04f,0x7fd40005,0x7ffdc0ff,0xd0000005,
0xfd005fff,0x880005ff,0x3a04ffff,0x40002fff,0x744ffff8,0xb5002fff,
0xffffffff,0xfff9009f,0xfd3003df,0xffc8dfff,0xffb8003f,0xd04fffff,
0x005fffff,0x1bffffea,0x00bfffa0,0x9ffff100,0x005fffb8,0xfffd0000,
0xffff9805,0xffc80000,0xffff307f,0xff900001,0x2fffe8ff,0xdffb9800,
0x3fe2000a,0xacefffff,0xffffecba,0x7ffe41ff,0xfffb0003,0x36209fff,
0xbcefffff,0xffecb989,0x4c00efff,0x0000ffff,0x5c7fffc8,0xeeeeffff,
0xeeeeeeee,0x2eeeeeee,0x805fffd0,0x0005fffc,0x05ffff30,0x000bfff9,
0x8bfffe60,0x0002fffe,0x4c000ffa,0xfffffffe,0xffffffff,0xfffc81ff,
0xfff10003,0xfc809fff,0xffffffff,0xffffffff,0xbfff9004,0x3fe60000,
0x3ffee2ff,0xffffffff,0xffffffff,0xfd03ffff,0xfff805ff,0x3a00002f,
0xfff85fff,0x3a00002f,0x3ffa5fff,0x3fa0002f,0x3f620003,0xffffffff,
0x00efffff,0x0007fff9,0x27ffffdc,0x7ffff540,0xffffffff,0x3fe002ef,
0x200002ff,0x3ee5fffe,0xffffffff,0xffffffff,0x03ffffff,0x5405fffd,
0x00007fff,0x507fffdc,0x0000ffff,0xd0ffffb8,0x40005fff,0x980003fe,
0xfffffffc,0x6401cfff,0x40003fff,0x004ffffd,0x3fffff66,0x001cffff,
0x003fffd4,0x3fffee00,0xffffff70,0xffffffff,0xffffffff,0x3fffa07f,
0x13fff602,0xfff10000,0x27ffec9f,0x3fe20000,0x5fffd4ff,0x00e5c000,
0x2ea66000,0x900099ab,0x80007fff,0x004ffff8,0x33595330,0x7ffec000,
0x7c400004,0x00004fff,0x00000000,0x00000000,0xfd000000,0x000005ff,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x5d4c4000,0x00001aac,0x00000000,
0x00015510,0x00333220,0x0000aa88,0x000f32a0,0x54c00000,0x400001aa,
0x26003cca,0x20000aca,0x00004cc8,0x2000732e,0xfffffeb8,0x001cffff,
0x5d4c4000,0xb90009ac,0x17ff4401,0x5ffd8000,0x0bffa200,0x7ffcc000,
0x3faa0001,0xffb8001c,0x003effff,0x01fff980,0xfffffe98,0xffc8000d,
0x3fe00004,0x7fe4000f,0xffffffff,0x001effff,0x7ffed400,0x1dffffff,
0x220dff70,0x0002fffe,0x000effa8,0x005fffd1,0x00fffa00,0xffcefd80,
0x3fff2001,0x03ffffff,0x01fff400,0x7fffffd4,0x22001fff,0x00000fff,
0x4400dff3,0xfffffffe,0xffffffff,0xb80003ff,0xffffffff,0x0dffffff,
0x2e0bffee,0x002fffff,0x00fffc40,0x2fffffb8,0x5ffc8000,0xd13e2000,
0x3ffe600b,0xfffea89b,0xbff90000,0x33fffe00,0x006fffc9,0x00013ff2,
0x5004ffc8,0x9bffffff,0x3feea635,0x0005ffff,0xffffffb1,0xffffffff,
0xfff59fff,0xfffffa87,0x740002ff,0xffa804ff,0x002fffff,0x007ffcc0,
0xfb81f700,0x85ffc800,0x8001fff9,0xb800fffa,0x7fcc0fff,0xfff8802f,
0x3fa00000,0xfff9801f,0xf7000eff,0x800bffff,0xefffffe9,0xeba989ac,
0xffffffff,0xd9dffc84,0x2e0002ff,0xff9006ff,0x005ffb3b,0x017ffc40,
0xf907ea00,0xff500800,0xff88001f,0x7fff002f,0x201bff20,0x00004ffc,
0x7401ffe2,0x8003ffff,0x02ffffe8,0xdfffff10,0x3ffee003,0x3b905fff,
0x80017fec,0x9000fff9,0x017fec3b,0x00bffb00,0x7cc37e00,0x75440004,
0xfd8004ff,0xfff1005f,0x01ffea03,0x0001fff1,0x402ffd40,0x002ffffc,
0x3ffffa20,0xffffd800,0x7ec4000c,0xb0104fff,0xd10005ff,0x404007ff,
0x50002ffd,0x00001dff,0x03ffbfee,0xffffb800,0xeffb8003,0x1fff3000,
0x803ffe60,0x00003ffd,0x2601ffec,0x0005ffff,0x05ffff98,0x01ffffd4,
0xfffffd00,0x0bff6003,0x017ff600,0x00bff600,0x007ffe20,0x05b71000,
0xbfffb000,0xfff88003,0x3ffea001,0x03fff100,0x0003ffe6,0x801fff00,
0x000ffffb,0x1ffff900,0x1bfffe20,0xffffd800,0xffb006ff,0xfffa8005,
0xffd80000,0x4ffe8002,0x00000000,0xfffecb80,0x9ffd000c,0x07ff9800,
0x6c07ffe2,0x400003ff,0xfe806ff9,0x400004ff,0xf502ffff,0x20003fff,
0xfffbfffc,0x2ffd801f,0x0bffe200,0x17fec000,0x01bfee00,0x36ea6000,
0x80001abc,0xc803ffe8,0xf88006ff,0xfff300ff,0x00fff301,0x09ff7000,
0x00ffff98,0x7ffec000,0x0bfffb05,0x47fff200,0xd805ffff,0x3f6002ff,
0x3600004f,0x3e6002ff,0x300000ff,0xfffffffd,0x80007fff,0x7cc06ffb,
0xff0000ff,0x1ffea03f,0x0001ffec,0x2017fec0,0x0006fffc,0x0ffffa80,
0x00ffffc4,0x917ffdc0,0xfb00ffff,0x3fee005f,0x7ec00006,0xffd1002f,
0x3ee00007,0xffffffff,0x440dffff,0xff900cba,0x1fff440f,0x09ffd000,
0x3e617ff6,0x8800007f,0x7ec00fff,0x800005ff,0x541ffff8,0xa8007fff,
0x7fcc3fff,0x7fec00ff,0x1fff9802,0x7fec0000,0x0bff9002,0x3fffa000,
0xfedccdef,0xff84ffff,0x0dfff04f,0x0002ffec,0xf70bffea,0x7ffb03ff,
0xff500000,0x9fffd00b,0x3fe00000,0x7ffdc1ff,0x7ffcc007,0x03ffff04,
0xe802ffd8,0x800003ff,0xfa802ffd,0xb80000ff,0x2602ffff,0x640ffffd,
0xfc9adfff,0xff503fff,0xfd00001f,0xfffd7dff,0x00dff309,0x0fff2000,
0x00ffffa0,0x7fffc000,0x02fffe42,0x409fff10,0x6c02ffff,0x7fe402ff,
0xfb000005,0xfff8805f,0xffd00002,0x3ffa003f,0xffffd83f,0x104fffff,
0x00005fff,0x3fffffa2,0xffe80dff,0xfd000003,0xffff003f,0x3a000005,
0x7fec3fff,0xffd1004f,0x3fffe80b,0x5017fec0,0x00001fff,0xb00bff60,
0x200009ff,0x2005fff9,0xf704fffb,0x05dfffff,0x00027ff4,0x7ffffe40,
0x00dff503,0x1ffe2000,0x017fffc0,0xfffe8000,0x01ffff43,0x400effe8,
0x0004fffd,0x202fff88,0x00bcdcca,0x37fdc000,0x305dd700,0x54003db9,
0x4cc05fff,0x7fdc009a,0x0bbae006,0x3a004c40,0xb97302ff,0x7fdc0037,
0x7ffff004,0x3fe00000,0x7fff43ff,0x0effd803,0x04fffd80,0x04ffd800,
0xfffffff5,0x2600009f,0xf5001fff,0x800005ff,0x0005fff9,0x007ffe60,
0x0017ffd4,0x20dff500,0xdffffffc,0x02ffd800,0x009fffd0,0xffff3000,
0x04fffd85,0x8007ffe4,0x0004fffe,0x54077fdc,0xffffffff,0xe80004ff,
0xff3003ff,0x200005ff,0x05fffda8,0x0fffa000,0x17fffcc0,0x5ffd0000,
0xffffffb0,0xff801dff,0xfffb000f,0xf500000b,0xffc83fff,0x3fff205f,
0x3fffe001,0x3fe60003,0x3bfff01f,0x007fff54,0x00bff900,0x0bffffa2,
0xfd975100,0x0bffffff,0x17ff2000,0x7ffff440,0xff500002,0x3dfff50d,
0x409fff91,0x32006ff9,0x00006fff,0xb87fffb8,0xff706fff,0x7fc4005f,
0x3a0002ff,0xfff503ff,0x05fff503,0x03ffea00,0x7fffff40,0xfffeb802,
0xffffffff,0xa80005ff,0xfd000fff,0x0005ffff,0x3a0bffa0,0xfff984ff,
0x009ff901,0x007fffcc,0x3fff2000,0x87fffa85,0x4003fffa,0x001ffff9,
0x880dff90,0x1fff1019,0x5fff1000,0x3bbff600,0x3fee02ff,0xffffffff,
0x05fffcdf,0x17ffc400,0xfeeffd80,0xfb80002f,0x1fff986f,0x3a09ffd0,
0x7f4001ff,0x200004ff,0x983ffff8,0x3e62ffff,0xfb8004ff,0xf30006ff,
0xb80001ff,0xfb0005ff,0x3ff2009f,0x702ffd8f,0xdfffffff,0x7ffcc379,
0x7fec0005,0x1fff9004,0x00005ffb,0xff505ffd,0x42ffe40f,0xb8007ff8,
0x9001ffff,0x3fff6017,0xbfffd00f,0x0013ffe2,0x00ffffe2,0x00bffe20,
0x05fff300,0x00dff700,0x7ec7ffea,0xffffa82f,0x7fcc00be,0x3ee0005f,
0xfff5006f,0x000bff63,0x2e0dff70,0x3fee06ff,0x005ffa86,0x05ffff88,
0x20cfff88,0x204ffffa,0xfe9ffffa,0xff90005f,0xfb0001ff,0xfb8000bf,
0xf98005ff,0xff9801ff,0x20bff62f,0x000dfffd,0x000bfff5,0x2007ffe6,
0x3f62fff9,0x7fc0002f,0x0bff902f,0x7ec3ffd4,0xff70003f,0xffa805ff,
0xfff8afff,0x7ff400ff,0x000effff,0x06ffff88,0x00fffa80,0xbfffb100,
0x0fffa000,0xb0fffe20,0xffff05ff,0x7ffdc001,0x7ffd0005,0x87fff100,
0x20002ffd,0x3ee06ffb,0x1ffee06f,0x80003ffe,0x204ffffe,0xffffffd9,
0xa803ffff,0x00efffff,0x3ffffb00,0x1fff8800,0xfffd3000,0x3ff20007,
0x09ffd006,0xff985ffb,0x7ff4006f,0xffc8005f,0x09ffd006,0x20005ffb,
0x2e01fff8,0x3fee06ff,0x0037fcc5,0x3ffffe20,0x3ff2201e,0x004fffff,
0x013ffff6,0x3ffffa60,0x4ffe8003,0xffff5000,0x3fe60005,0xfff8800f,
0xffffffff,0xffff34ff,0x3fff2001,0x7fd4005f,0xfff8800f,0xffffffff,
0x7dc004ff,0x3ffd405f,0xfb89ffb0,0xe980004f,0xacefffff,0xfffdba89,
0x2000ffff,0x2efffffc,0xfffff700,0xdff7000b,0x3ffee000,0xfd10000e,
0x3fe2005f,0xffffffff,0xfff14fff,0xfff7009f,0x7c400dff,0xff1002ff,
0xffffffff,0x44009fff,0x7c401fff,0xfff882ff,0x0017ff42,0xffffd880,
0xffffffff,0xffffffff,0xffffb803,0x9aceffff,0xfffedb98,0x4c000dff,
0xa8001fff,0x40005fff,0x54005ffd,0xeaaaaaaa,0x3fa1acff,0xf9302fff,
0x00ffffff,0x2002ffec,0xaaaaaaaa,0x001acffe,0x64017ff2,0x3f662fff,
0x07ffc46f,0x3fee0000,0xffffffff,0xffedffff,0xff502eff,0xfffff97f,
0xffffffff,0x0007ffff,0x0007ffd1,0xfffffff1,0x407fffff,0x0000effa,
0x4c17fec0,0xcdefffff,0xebfffffe,0xfb800fff,0x400000ef,0x44002ffd,
0xf1001fff,0xfffbdfff,0x05ffa85f,0x3faa0000,0xffffffff,0x3fffee0c,
0x1fffd46f,0xffffffd3,0xdfffffff,0x3ff20003,0xfff90005,0xffffffff,
0x3ffe207f,0xfd800001,0xffff502f,0xbfffffff,0x00fffee1,0x0003fff1,
0x005ffb00,0x4005ffc8,0xffffffe9,0x03ffc82f,0xa9880000,0x26009abb,
0x7f45fffe,0xfffb504f,0x39ffffff,0x7ffd4000,0x99970000,0x99999999,
0x13ffa059,0x665c0000,0x3fff6201,0x4c2effff,0x7f406fff,0x7000004f,
0x7c400399,0xc88001ff,0x700deffe,0x00000199,0xfd500000,0x1004e885,
0x00335753,0x00266200,0x4c000000,0x00000019,0x2aea6200,0x26600001,
0x00000001,0x00099880,0x00000100,0x00000000,0x0000000c,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x13333000,0x2e620000,0x100001ab,0x00013333,0x00666660,
0x4cccc000,0x4cccc000,0x33000001,0x00000133,0x26620000,0x04ccc409,
0x0ccccc00,0x33310000,0x00999881,0x3fffea00,0xd930000e,0x3dffffff,
0xffe88000,0xfb00007f,0x00003fff,0x02ffffb8,0x17fffe40,0x3fee0000,
0x320006ff,0xea81efff,0x3fff6000,0x01fffe42,0x17fffe40,0xfffd8000,
0x01fffe42,0xfffff880,0xffc8005f,0xffffffff,0x7cc0005f,0x00003fff,
0x000bfffd,0x04ffff80,0x0dfffb00,0x7ffcc000,0x20004fff,0xd52ffffa,
0x7ec007ff,0x7ffe42ff,0xfffb0003,0x3f60000d,0x7ffe42ff,0xfffd0003,
0x4007fff9,0xdefffffc,0x04ffffff,0x3fffd400,0xfff88000,0xf700001f,
0x44000dff,0x0002fffe,0xfcfffe88,0x260003ff,0xfffffffe,0x3ff6002e,
0x1fffe42f,0xfffe8800,0xffd80002,0x1fffe42f,0x9fffec00,0xa802fffd,
0x4c0cffff,0x001ffffc,0x01fffdc0,0x5fff9800,0xfffd0000,0xff980001,
0xfd80006f,0x3fffd3ff,0x7ffcc000,0xd8002eff,0x7fe42fff,0x3e60003f,
0xd80006ff,0x7fe42fff,0x7fdc003f,0x3fffe26f,0x27fff400,0x00ffffa0,
0x01bff600,0x1fffb800,0x7ffd4000,0xff500001,0x7dc0005f,0x3ffe65ff,
0x7e44000f,0x003fffff,0x88133310,0x40000999,0x0001fffa,0x2204ccc4,
0x26000999,0x7dc1ffff,0xff100eff,0xffa801ff,0xfd00005f,0x6400005f,
0x740005ff,0x400003ff,0x30005ffb,0xfb81ffff,0xfb3006ff,0xfffd9fff,
0x00000003,0x17fee000,0x00000000,0xfa800000,0xff8804ff,0x0000004f,
0x00000000,0x00000000,0x00000000,0x2219fffb,0x0000efff,0x00000000,
0x00000000,0x2e000000,0xfa803fff,0x000003ff,0x00000000,0x00000000,
0x00000000,0xf5017f30,0x00000bff,0x00000000,0x00000000,0x2af72a62,
0x7fff7000,0x01fffb00,0x66dd4c00,0x999801ab,0x04ccc000,0x98001333,
0xa9880099,0x2000abdc,0x4c000999,0x04c00099,0x0005fffb,0x157b9531,
0x32a60000,0x00000abc,0x01579953,0xffffc800,0x402fffff,0x4c02fffc,
0x98004fff,0xfffffffe,0xff103fff,0x7fcc00bf,0x0bfff14f,0x027ffcc0,
0x3ffffff2,0x7c402fff,0x3e6005ff,0x764c04ff,0xffacffff,0x7fe4006f,
0x2fffffff,0xffff7000,0x005fffff,0x3ffffee0,0x4002ffff,0xfffffffa,
0x00dfffff,0xd803fff9,0x5c001fff,0xffffffff,0x40dfffff,0x2005fff8,
0xff14fff9,0x7fcc00bf,0xffff504f,0xffffffff,0x3ffe201b,0x3ffe6005,
0x3ffff204,0xffffffff,0xfffa803f,0xffffffff,0xfb1000df,0xffffffff,
0x22001bff,0xfffffffd,0x800dffff,0xdefffffa,0xffffffdc,0x01fffc81,
0x0017ffe6,0x9bdffffd,0xfffffdb9,0x05fff889,0x453ffe60,0x26005fff,
0xffa84fff,0xfdcdefff,0x881fffff,0x26005fff,0xfe984fff,0xffefffff,
0x407fffff,0xdefffffa,0xffffffdc,0x7fffcc01,0xfffdcdef,0x7cc00eff,
0xdcdeffff,0x00efffff,0x07bfffe2,0x437fffdc,0x3601fffc,0x2e000fff,
0x2602ffff,0x220ffffd,0x26005fff,0xfff14fff,0x7ffcc00b,0x77fffc44,
0xdffff701,0x00bfff10,0x7427ffcc,0x220bffff,0x3fffffe9,0x3dffff10,
0x1bfffee0,0x03dfffd0,0x017fffe6,0x203dfffd,0x205ffff9,0x400dfffd,
0x643fffe9,0xff301fff,0xffe800bf,0xfffd001f,0x02fffc47,0x229fff30,
0x26005fff,0x7fec4fff,0x7f4c00df,0x7ffc43ff,0x3ffe6005,0x0f7ffdc4,
0x17ffff20,0x006fffec,0x40ffffa6,0x8806fffb,0xf701fffe,0xfd100dff,
0xfff503ff,0x3fea001f,0x3fff20ff,0x07fff701,0x02fffcc0,0x449fff70,
0x26005fff,0xfff14fff,0x7ffcc00b,0x03fffea4,0x07fffd40,0x400bfff1,
0x3e24fff9,0xfb001fff,0xffa81fff,0xff5000ff,0xfff881ff,0xfff3000f,
0x1ffff10d,0x1bffe600,0x000ffff6,0x7e47fffd,0xfff701ff,0x76e4c00b,
0x3ffea001,0x017ffe25,0xf14fff98,0x7cc00bff,0x3fff64ff,0x7fff4003,
0x017ffe23,0x324fff98,0x22005fff,0x7ec2ffff,0x7f4003ff,0x7ffe43ff,
0x7ffec003,0x01fffe41,0xd07fff60,0xa8001fff,0x3ff24fff,0xffff101f,
0x30000007,0x7fc4bfff,0x3fe6005f,0x0bfff14f,0xd27ffcc0,0xa8001fff,
0x3fe24fff,0x3fe6005f,0x07fffa4f,0x89fff900,0x4000fffe,0x7ec4fffa,
0x7dc001ff,0x7ffec3ff,0x7ffdc001,0x0037ffc3,0xf937ffc4,0x7fec03ff,
0x00000dff,0x5fffda88,0x8017ffe2,0xff14fff9,0x7fcc00bf,0x01bffe4f,
0x89bffe20,0x26005fff,0x3ffe4fff,0xfffa8007,0x0037ffc5,0x3a37ffc4,
0x4c000fff,0x7ff44fff,0x7fcc000f,0x17ffe64f,0x93fffc00,0x74403fff,
0x001effff,0xffd97510,0x44bfffff,0x26005fff,0xfff14fff,0x7ffcc00b,
0x00bfff34,0xf89fffe0,0x3e6005ff,0xdfff14ff,0xdfff3000,0x002fffcc,
0x7fc7fff8,0xeeeeeeff,0xfeeeeeee,0x7fffc5ff,0xeeeeeeee,0xfffeeeee,
0x013ffea5,0xc87fffc0,0x6c401fff,0x004fffff,0xffffffd7,0xbfffffff,
0x002fffc4,0x3e29fff3,0x3e6005ff,0x9fff54ff,0x3fffe000,0x00bfff10,
0xf9a7ffcc,0xf88005ff,0x3ffea7ff,0xffff0004,0x3ffffe21,0xffffffff,
0x6fffffff,0x3fffffe2,0xffffffff,0x26ffffff,0x0004fffb,0x3f23fffd,
0xff7001ff,0x7dc0bfff,0xffffffff,0x5fffcdff,0x8017ffe2,0xff14fff9,
0x7fcc00bf,0x09fff74f,0x47fffa00,0x2005fff8,0xff54fff9,0x3fe0009f,
0x13ffee7f,0x8ffff400,0xfffffff9,0xffffffff,0x267fffff,0xffffffff,
0xffffffff,0x3ea7ffff,0xff0004ff,0x3fff21ff,0x3ffe6001,0xfffb85ff,
0x1bceffff,0xf897ffe6,0x3e6005ff,0xbfff14ff,0xa7ffcc00,0x0004fffa,
0x3e21ffff,0x3e6005ff,0xbfff34ff,0xffff1000,0x0027ffd4,0xf30ffff8,
0x55555dff,0x55555555,0x7fcc5555,0xaaaaaaef,0xaaaaaaaa,0x3ffe62aa,
0xfff88005,0x007fff27,0x3ffffb10,0x5f7fffd4,0x2fffcc00,0x400dfff1,
0xff14fffa,0x7fd400df,0x0bfff34f,0x4ffff100,0x2006fff8,0xff34fffa,
0xff3000df,0x2fffccdf,0x3fffc400,0x000dfff1,0x06fff880,0x7ffc4000,
0xfff98006,0x007fff27,0xb27ffec0,0x2001bfff,0x3e25fffa,0x3ea006ff,
0xdfff14ff,0xa7ffd400,0x8006fff8,0x3e27fff9,0x3ea006ff,0xffff14ff,
0x9fff5000,0x0037ffc4,0x3e3fffcc,0x00000fff,0x0007fffc,0x03fffe00,
0x4bfff700,0x0001fffc,0x7fcdfff5,0x3ee000ff,0x37ffc5ff,0x49fff900,
0x32006fff,0x3ffe4fff,0x7fdc000f,0x037ffc5f,0x7c9fff90,0x64000fff,
0x7ffc3fff,0x7fdc000f,0x0fffec5f,0x2026a200,0x4001fffd,0xffd809a8,
0x7ff4004f,0x07fff22f,0x3ffe2004,0x00dfff36,0x7c5fffe8,0x3fa007ff,
0x1fffe4ff,0x24fffe80,0x4004fffd,0x7fc2fffe,0x3ffa007f,0x13fff24f,
0x1ffff880,0x0027ffec,0xf90bfffa,0xfc800bff,0x7ffe45ff,0x7ffe4005,
0x07fffcc5,0x0ffffb80,0xd507fff2,0x7ffdc01f,0x01ffff34,0x17ffff20,
0x9007fffd,0x7f49ffff,0xffc803ff,0x3ffe64ff,0xfff7000f,0x3fffe81f,
0x4ffffc80,0x003fffe6,0x4c2fffe4,0x7000ffff,0xf881ffff,0xf1002fff,
0xff883fff,0xff1002ff,0xfff903ff,0xfffa801d,0x0fffe44f,0x7c0bfffb,
0xfff13fff,0xfff7009f,0xfffc8dff,0x3ffee00f,0x3fff24ff,0x3ffee00f,
0x7ffe44ff,0x7ffd400e,0xffffc84f,0x3fffee00,0x77ffec4f,0x7fffdc00,
0x1dfff900,0x4ffffa80,0x03ffff70,0x06fffe88,0x803ffff7,0x106fffe8,
0x815fffff,0x86ffffc8,0x3a21fffc,0x36a0cfff,0x3fa0ffff,0xf9302fff,
0x98ffffff,0x10beffff,0xffffff95,0x77fffcc9,0xfff9510b,0xff889fff,
0x6440afff,0xf306ffff,0x2217dfff,0xffffffca,0x7ffffcc4,0xffffd882,
0x3fffe204,0x7fe440af,0x7ff406ff,0x764c0cff,0x3a01ffff,0x4c0cffff,
0x01ffffec,0x3fffffea,0xffffffee,0x1fffc80e,0x77ffffcc,0x42fffffe,
0xdefffff9,0xbfffffec,0x7ec0fffe,0xffffffff,0x4ffe9fff,0x7fffffec,
0xe9ffffff,0xfffa84ff,0xfffeefff,0x3600efff,0xffffffff,0xffe9ffff,
0xffffe884,0xfffffdef,0xfffa805f,0xfffeefff,0x4c00efff,0xeffffffe,
0x2fffffff,0x7ffff4c0,0xfffffeff,0xfd8802ff,0xffffffff,0xff900dff,
0xffff503f,0x07ffffff,0x3fffffea,0x70dfffff,0xff907fff,0xdfffffff,
0x3213ffa3,0xffffffff,0x09ffd1ef,0x3fffff62,0x0dffffff,0xfffffc80,
0xfd1effff,0x7ffec09f,0xffffffff,0x3ff62003,0xffffffff,0xf91000df,
0xffffffff,0x22005fff,0xfffffffc,0x002fffff,0x7fffff5c,0x7e401dff,
0xffb301ff,0x801bffff,0xffffffd8,0x7ffcc2ef,0xffffd506,0x7ff419df,
0xffffd504,0x7ff419df,0x7fff5c04,0x001dffff,0x7fffff54,0x13ffa0ce,
0xfffffb70,0x20001bff,0xffffffeb,0xb50001df,0xffffffff,0x3f6a0007,
0x3fffffff,0xaba98000,0x10000009,0x80013775,0x001aba98,0x0055cc00,
0x00ab9800,0x55d4c000,0xb9800009,0x4400000a,0x00000aba,0x004d5d4c,
0x35751000,0x54400001,0x000009ab,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x88000000,0x99988199,
0x26660000,0x32000009,0x332e00cc,0x4ccc4001,0x26000001,0x00001999,
0x000ccccc,0x004cccc0,0x5dd4c000,0x0000000a,0x40033333,0x99881998,
0x00ccc809,0x0ffff400,0x000ffff2,0x037fffd4,0x07ff9800,0x0007ffe2,
0x000ffff7,0x3fffe600,0x3e600005,0x40004fff,0x006ffffa,0x3fffa600,
0x0000dfff,0x3fffe600,0x3fffa004,0x417ffec1,0x40003ffd,0x7e41fffe,
0xf98003ff,0x005fffff,0x206ffb80,0xb8007ff9,0x00007fff,0x00dfffb0,
0x6fffd800,0x7ffcc000,0x80005fff,0xfffffffc,0x00001fff,0x00dfffb0,
0x6c1fffe8,0xffa82fff,0x7ff40005,0x1fffe41f,0x3fffa200,0x0003fffc,
0xf7027fe4,0xff7000df,0x300000ff,0x0001ffff,0x07fffcc0,0xfffd1000,
0x0007fff9,0x6fffffdc,0x00ffffff,0x7ffcc000,0x7ff4000f,0x17ffec1f,
0x0003ffc4,0xf907fffa,0xfd8007ff,0x3fffb3ff,0x1fff4000,0x0009ff90,
0x000ffff7,0x05fff900,0xfffd8000,0x7fec0002,0x03fffb3f,0x7ffff300,
0x2ffff541,0x3ff60000,0xffe8001f,0x17ffec1f,0x0001ffe8,0x26206662,
0x3ee00099,0x3ffe26ff,0xfff0000f,0x017ff403,0x00cccc40,0x3ffe2000,
0x7c400004,0x5c0003ff,0x3fe26fff,0x7e4000ff,0xfff505ff,0x7cc0000f,
0x310003ff,0x13331033,0x0013ff20,0x26000000,0x7dc0ffff,0xf98006ff,
0x3ffe207f,0x00000001,0x005ffc80,0x05ffc800,0x7fffcc00,0x037ffdc1,
0x807fffa0,0x0001ffff,0x000bffb0,0xff300000,0x0000000d,0x00000000,
0xf3037fdc,0x000000ff,0x00000000,0x00000000,0x3ffe0000,0x0fffec07,
0x00000000,0xfff00000,0x00000001,0x00000000,0xfb813ff2,0x2aa0006f,
0x0000001a,0x00000000,0x40000000,0x3e01fffe,0x00000fff,0x00000000,
0x000bff60,0x2f36ea60,0x54c0001a,0x401abcdb,0xe9999998,0x99999cff,
0x999dffd9,0xbfff1000,0x2a620000,0x0000abdc,0x15799530,0x32a60000,
0x20000abc,0xf506fffc,0x20000dff,0x1abcdba9,0x00099980,0x3ee04ccc,
0xfd30005f,0xffffffff,0x7f4c007f,0xffffffff,0xffff703f,0xffffffff,
0xffffffff,0x22005fff,0x80004fff,0xfffffffc,0xf70002ff,0xffffffff,
0x3fee0005,0x2fffffff,0xffffa800,0x17fff443,0xfffd3000,0x7fffffff,
0x017ffe20,0x4c4fff98,0xfb8007ff,0xffffffff,0x400dffff,0xfffffffb,
0x0dffffff,0x7fffffdc,0xffffffff,0xffffffff,0xfff3002f,0x7fd40007,
0xffffffff,0xb1000dff,0xffffffff,0x2001bfff,0xffffffd8,0x00dfffff,
0x97fffec0,0x005fffe9,0x3ffffee0,0xffffffff,0x2fffc40d,0x09fff300,
0x74003ffd,0xccdeffff,0x4fffffed,0x3bffffa0,0xfffedccd,0x7ffdc4ff,
0xffffffff,0xffffffff,0x7002ffff,0x20005fff,0xdefffffa,0xffffffdc,
0x7fffcc01,0xfffdcdef,0x7cc00eff,0xdcdeffff,0x00efffff,0x3ffffe20,
0x005ffffd,0x3bffffa0,0xfffedccd,0x7ffc44ff,0x3ffe6005,0x003ffc84,
0x405ffff7,0x80ffffd9,0x202ffffb,0x00ffffd9,0x2e04ffc8,0x3e0005ff,
0x88001fff,0x701effff,0xe80dffff,0xf301efff,0xfe80bfff,0xff301eff,
0xfa800bff,0x4fffffff,0x3ffee000,0x3ff6602f,0x3ffe20ff,0x3ffe6005,
0x006ffa84,0x2003fffd,0xfe83fffe,0xffd001ff,0x5ffd007f,0x0027fec0,
0x005fffd8,0x01bfffb0,0x03fffe98,0x100dfff7,0x2e03fffd,0xe8806fff,
0x6c001fff,0x01efffff,0x0ffff400,0x23fffe80,0x2005fff8,0xf884fff9,
0x7fcc00ff,0x3fee005f,0x2fffcc4f,0x09fff700,0x201fff88,0xc8002ffe,
0x8000ffff,0x000ffffa,0x881ffff5,0x3000ffff,0xff10dfff,0x3e6001ff,
0xfb3006ff,0x009fffff,0x05fff980,0x893ffee0,0x26005fff,0xffd04fff,
0x1edc9805,0x17ffea00,0x4003db93,0x4c05fffa,0x3fe207ff,0x7fec000f,
0xfb0003ff,0xfe8007ff,0x7ffe43ff,0x7ffec003,0x01fffe41,0x007fff60,
0xfffffff9,0x4c0005ff,0x2a001edc,0x3fe25fff,0x3fe6005f,0x09ff704f,
0x7fcc0000,0x2600005f,0x7dc05fff,0x1ffea06f,0x7ffffb00,0x7fff4000,
0x7ffd4000,0x00fffec4,0xb0fffee0,0xb8003fff,0x3f603fff,0xfffaefff,
0x000001ff,0x25fff980,0x2005fff8,0xf304fff9,0x100000df,0x00bfffb5,
0xfffb5100,0x04ffc80b,0xd8017fee,0x0003ffff,0x40037ffc,0x7f46fff8,
0x7cc000ff,0x7fff44ff,0x7ffcc000,0x9ffffb04,0x077fffd4,0x0002f3b2,
0x7ffed440,0x017ffe25,0x204fff98,0x10001fff,0xffffd975,0x4400bfff,
0xffffecba,0x7f405fff,0x13ff602f,0x17fffe40,0x3ffe6000,0xffff0005,
0xeeeffff8,0xeeeeeeee,0x7c5fffee,0xeeeeefff,0xeeeeeeee,0xffc85fff,
0xfffb83ff,0x17fffc5f,0x3b2ea200,0x5fffffff,0x8017ffe2,0x3604fff9,
0x3ae003ff,0xffffffff,0x405fffff,0xffffffeb,0x5fffffff,0x807ffe20,
0xfa802fff,0x80002fff,0x0004fffa,0x3e21ffff,0xffffffff,0xffffffff,
0x3fe26fff,0xffffffff,0xffffffff,0x7ffc46ff,0x3fff603f,0x1ffff33f,
0xffffd700,0xffffffff,0x2fffc4bf,0x09fff300,0x5c02ffd4,0xffffffff,
0xfffcdfff,0xfffff705,0x9bffffff,0x7fdcbfff,0xffffffff,0xffffffff,
0x362fffff,0x00003fff,0x0009fff7,0x7cc7fffa,0xffffffff,0xffffffff,
0x3fe67fff,0xffffffff,0xffffffff,0x7ffe47ff,0x7fff4407,0x05fffcaf,
0x7fffffdc,0xfcdfffff,0x3ffe25ff,0x3ffe6005,0x01ffe204,0xfffffff7,
0x7fcc379d,0xffffb85f,0x21bcefff,0x3ee5fff9,0xffffffff,0xffffffff,
0x22ffffff,0x00007fff,0x0013ffea,0xf987fffc,0xaaaaaeff,0xaaaaaaaa,
0x3fe62aaa,0xaaaaaaef,0xaaaaaaaa,0x7ffec2aa,0xffff8804,0x203fffff,
0xfffffffb,0x3fe61bce,0x17ffe25f,0x04fff980,0xfa817ff4,0x400befff,
0x7d45fff9,0x400befff,0x3ee5fff9,0xffffffff,0xffffffff,0x32ffffff,
0x3000bfff,0x0bfff303,0x4ffff100,0x0006fff8,0x037ffc40,0x7fffc000,
0xffff5001,0x7d40ffff,0x400befff,0x3e25fff9,0x3ea006ff,0x7fe404ff,
0x1bfffb04,0x17ffea00,0x001bfffb,0x9897ffea,0x99bfff99,0xcffe9999,
0x70999999,0x88007fff,0x3fe27fff,0xff98006f,0x07fffc7f,0x3ffe0000,
0x7c00000f,0x2e001fff,0x03ffffff,0x0037fff6,0xf12fffd4,0x7d400dff,
0x7fcc04ff,0x01ffff06,0x22fffdc0,0x2000ffff,0xf105fffb,0x7ffc01ff,
0x5fffa802,0x2fffdc00,0x0003fffe,0xfd8bfff7,0x544001ff,0x1fffd809,
0x404d4400,0x4003fffe,0x407ffffd,0x2000ffff,0x7fc5fffb,0x3ff2006f,
0x0fff804f,0x0037ffcc,0xf997fffa,0x7f4006ff,0xfff305ff,0x007ffc40,
0x003fffc4,0xfb0ffff6,0xfe8009ff,0x7ffe42ff,0x7ffe4005,0x02fffe45,
0x917fff20,0xc800dfff,0x304fffff,0xe800dfff,0x7ffc5fff,0x3fffa007,
0x42ffd804,0x000ffff9,0x4cbffff9,0x9000ffff,0x2e0bffff,0x3fea05ff,
0x3fffe007,0xffff5004,0x0ffff981,0x1ffff700,0x02ffff88,0x83ffff10,
0x002ffff8,0xa83ffff1,0x9003ffff,0x9fffffff,0x01ffff30,0x17ffff20,
0x9007fffd,0x7009ffff,0xfff88bff,0xfffb804f,0x3ffe26ff,0xfffb804f,
0x9ffb06ff,0x002ffe40,0x807ffff7,0x905ffff9,0xa801dfff,0xf704ffff,
0xe8803fff,0xff706fff,0xfe8803ff,0xfffb06ff,0xfffd805f,0x44ffffff,
0x804ffff8,0x46fffffb,0x200ffffc,0x04fffffb,0xfe87ff88,0xf9302fff,
0xe8ffffff,0x9302ffff,0x0fffffff,0xfd80bffa,0x7fec003f,0x32209dff,
0x100effff,0x815fffff,0x06ffffc8,0x067ffff4,0x3ffffb26,0x3ffffa01,
0x7ff64c0c,0xfff301ff,0x32a239ff,0xfbdfffff,0x7f44ffff,0xf9302fff,
0x98ffffff,0x10beffff,0xffffff95,0x07ffa009,0xbdfffff3,0x7fffffd9,
0x7cc1fffd,0xecdeffff,0xfebfffff,0x7ffc40ff,0x00bffe00,0xfffffd10,
0xffffffdf,0xfffa803f,0xfffeefff,0x4c00efff,0xeffffffe,0x2fffffff,
0x7ffff4c0,0xfffffeff,0x7fd402ff,0xffffffff,0x3ee4ffff,0x3e64ffff,
0xecdeffff,0xfebfffff,0x7ffec0ff,0xffffffff,0x004ffe9f,0xff507ff9,
0xffffffff,0x3ffee1bf,0x7ffffd43,0x0dffffff,0xf987fff7,0x3ffe207f,
0xfff90000,0xffffffff,0x3f62001b,0xffffffff,0x91000dff,0xffffffff,
0x2005ffff,0xffffffc8,0x02ffffff,0xfffffd10,0x05ffffff,0xa81ffff9,
0xffffffff,0xff70dfff,0xffff907f,0x23dfffff,0xf5004ffe,0x3ff620df,
0x42efffff,0xd886fff9,0xefffffff,0x237ffcc2,0x3ea05ffb,0x6c40007f,
0xdffffffe,0xffd70002,0x03bfffff,0x3fff6a00,0x003fffff,0xfffffb50,
0x20007fff,0xffffffec,0x3fea00ce,0xffffb101,0xf985dfff,0xffd506ff,
0x7419dfff,0xff1004ff,0x5d4c401f,0x3100001a,0x40003575,0x32a02cca,
0x4c00003c,0x4000009a,0x0009aba9,0x26aea200,0x2a200000,0x000009ab,
0x30006ee6,0x57531005,0xb9800003,0x5c00000a,0x000001cc,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00200000,0x5dd4c000,0x4000009a,0x09acba98,0x01999800,0x00333300,
0x00000008,0x01357953,0x00000000,0x00008000,0x5e554c00,0x0000001a,
0xeda80131,0x000bceff,0x3fffee20,0x000cffff,0x7fffed40,0x00cfffff,
0x003ffff0,0x405fff98,0xcdfffec8,0xdb80000a,0xfffffffe,0x3ee002df,
0xb80005ff,0xa8805fff,0x0cefffec,0xffc98000,0xdfffffff,0xf3000002,
0x3ffa609f,0x3fffffff,0xffffa800,0xffffffff,0xfffb8003,0xffffffff,
0x6400cfff,0x64004fff,0x3ee02fff,0xffffffff,0xfd30002f,0xffffffff,
0x007dffff,0x000bfff7,0x80bfff70,0xfffffffa,0x50003fff,0xfffffffd,
0x7dffffff,0xffe80000,0xfffff984,0x4fffffff,0x3fffe600,0xfffeddff,
0xfb1002ff,0xffffffff,0xdfffffff,0x37ffcc01,0x81fffe00,0xfffffffe,
0x002fffff,0x7fffffdc,0xffffffff,0x7dc04fff,0xb80005ff,0x3f205fff,
0xffffffff,0x22005fff,0xaceffffd,0xffeca999,0x80000eff,0x7c44fffd,
0xa89befff,0x804ffffd,0x81effff8,0x01ffffe9,0x7fffffcc,0xca9889ac,
0x00efffff,0x4007fffa,0xf904fff9,0x5115bfff,0x007ffffb,0xdfffffb1,
0x3aea6359,0x00efffff,0x000bfff7,0x20bfff70,0x9beffffd,0x3ffffda8,
0xcfffe980,0xfff93001,0x7ec0005f,0x7fec4fff,0xfff500ef,0xfffe803f,
0x6fffd805,0x3ffffe20,0xffc8800c,0xff700eff,0x3ff2009f,0xffffa81f,
0x3fffea01,0x7ffff401,0xffd5002f,0x3fee0dff,0xfb80005f,0xfffb85ff,
0x3ffee01f,0x3ffea01f,0xfb10000e,0xd88007ff,0x264fffff,0xfa806fff,
0x3fe205ff,0xff8800ff,0xfffb00ff,0xff90005f,0x3fe207ff,0xfff8807f,
0x07fffd06,0x407fff70,0x00dffffb,0x4ffffd80,0x005fffb8,0x45fffb80,
0x801ffff8,0xf104fffd,0x200009ff,0x7001fffb,0x9fffffff,0x801fffec,
0xf500fffd,0x7e400bff,0xfffb82ff,0x3f60002f,0x3ff607ff,0x7ffd402f,
0x06fff883,0x441bffe0,0x0004ffff,0x20ffffe4,0x0005fffb,0x645fffb8,
0xf5004fff,0x3ffa0dff,0x7dc00004,0x3fa600ef,0x4fffffff,0x001ffff1,
0x640fffe6,0x2a003fff,0xfff84eff,0x7c40004f,0xff502fff,0xfffd80bf,
0x04fffb80,0x203fffa0,0x0006fffd,0xb8dfffd0,0x80005fff,0x7fc5fffb,
0x3fa000ff,0x2ffe40ef,0x37bbbbae,0x7ec02bcc,0xffff705f,0x29fff5df,
0x4006fff9,0xffb07fff,0x2018007f,0x000ffffa,0x05fffd80,0x4403fffe,
0x75105fff,0x7ff4003b,0x7fffcc0f,0xff500002,0x7ffdc3ff,0xffb80005,
0x13ffe65f,0xfff88000,0x7ffffe40,0x00dfffff,0xf881ffd1,0xff33ffff,
0x0fffee9f,0x01fffd00,0x0009fffb,0x02fffec0,0x00ac9800,0xb817ffe4,
0x00002fff,0xfd86fff8,0x400005ff,0x3ee4fffe,0xb80005ff,0x3fee5fff,
0x2e00002f,0xdffc83ff,0xfffeedcc,0x89ff500f,0x261efff8,0xfffb4fff,
0xfffc8005,0x05fffc82,0xffff1000,0x00000007,0x3a0bfff3,0x800007ff,
0xff84fffa,0x400002ff,0x3ee7fffb,0xb80005ff,0x3ff65fff,0x3a00000f,
0x0ffc80ff,0x407ffd10,0x177c47ff,0xfea7ffcc,0x7dc001ff,0xfffa83ff,
0xff500006,0x000003ff,0x03fffa00,0x0009fff3,0x1ffff980,0x007fffc4,
0x3ffe2000,0x0bfff71f,0xbfff7000,0x54437ff4,0x4c00acdc,0x1ff904ff,
0x7037fcc0,0x301445ff,0x3ffe9fff,0x7fd4001f,0xffff884f,0xffb80000,
0x000000ff,0x87fff700,0x0001fffc,0x7ffff910,0x00ffff30,0x3fffa000,
0x00bfff73,0x4bfff700,0x3fa66fff,0x0dffffff,0x3203ff70,0x3fe200ff,
0x013fe207,0xff4fff98,0xfa8001ff,0xfffd04ff,0xff700005,0x000000ff,
0x237ffc40,0x40006fff,0xfffffedc,0x0ffff502,0x3ff60000,0x0bfff73f,
0xbfff7000,0x7cd7ffe2,0xffffffff,0x0ffc81ef,0x6401ff90,0x2ffc05ff,
0x29fff300,0xa8007fff,0x33324fff,0xcccefffe,0xf9002ccc,0x00000dff,
0x0fffd800,0x0007fff3,0xfffffff8,0x1bffee01,0x7fec0000,0x0bfff74f,
0xbfff7000,0x3eb3ffe2,0xffedefff,0x7ec1ffff,0x203ff207,0x401fffb8,
0x3e6006fe,0x7fff8cff,0x5fffa800,0x3ffffffe,0x3fffffff,0x09fffb00,
0xa8000000,0xfff93fff,0x7fc40001,0x1dffffff,0x004fffc8,0xbfff9000,
0x0017ffee,0x4d7ffee0,0xcfffefff,0x7fffdc40,0xf9037f46,0xffffffff,
0xffb007ff,0x67ffcc00,0x8007fff8,0x3fe5fffa,0xffffffff,0xb003ffff,
0x00009fff,0xdfff0000,0x00017ffa,0xffb959b3,0xffd85fff,0x9000004f,
0x3feebfff,0xfb80005f,0xffff35ff,0xff9803ff,0x81bfa3ff,0xfffffffc,
0xfb001dff,0x7ffcc00f,0x007fff8c,0x325fffa8,0xdfffeccc,0x002ccccc,
0x000bfff9,0xff900000,0x005fff3f,0x3ffa6000,0x3fff61ff,0xfb000005,
0x3ffee9ff,0xffb80005,0xfffff35f,0x3ffee007,0x640ffb0f,0xfffcabff,
0x037f4003,0x3e9fff30,0xfb8007ff,0x3ff204ff,0x7dc0003f,0x000006ff,
0xefff9800,0x00000fff,0x937fff40,0x0000dfff,0x5cffffa0,0x80005fff,
0xff35fffb,0xfe800dff,0x01ff92ff,0xff703ff2,0x02ffc00d,0x3e9fff30,
0x5c000fff,0x3ee04fff,0x540005ff,0x00006fff,0xfffd0000,0x000009ff,
0x25ffff30,0x0007fffb,0x27ffff00,0x0006fffa,0xf34fffc8,0xb8009fff,
0x3ff73fff,0x3203ff20,0xff9804ff,0x3ffe6004,0x003ffff4,0x203fffc8,
0x0003fffa,0x007fffcc,0x20001000,0x01fffffb,0xffb00000,0x3fffea9f,
0x7c400000,0xfff52fff,0xffb0000d,0x3fffe29f,0x7ffd4002,0x320bff34,
0x5ffd00ff,0x002ffc80,0x7ed3ffe6,0x7e4001ff,0x3fee02ff,0xff80001f,
0x200002ff,0x1000bdff,0x000dffff,0x7ffdc000,0x007fffe5,0xffff5000,
0x0037ffcc,0xf1ffff40,0x98003fff,0x3ffa5fff,0x300ffc80,0x7fc01fff,
0x7ffcc006,0x005fff94,0x201fffd8,0x0000fffc,0x004fffc8,0x3ffff300,
0x1fffec00,0xf5000000,0x7ffe4dff,0x7f400006,0x3ffe64ff,0xffe80007,
0x0bfffa3f,0x49fff300,0xffc83ffa,0x413ff600,0x4c003ffa,0xfff54fff,
0x7fff8009,0x002fff40,0x0ffffa80,0xfffc8000,0x7ffe4006,0x1bb32000,
0x93ffee00,0x002ffffa,0x3ffff700,0x001ffff8,0x90ffffc0,0xa8009fff,
0x7ffc2fff,0x1007fe41,0xff883fff,0x7fcc000f,0x0ffff14f,0x02fffd40,
0x0001fff5,0x02ffffc0,0x3fffe200,0x2fffc003,0x07fffa00,0x87fff900,
0x000ffffe,0x37fffc40,0x001fffec,0xa8ffff70,0x64006fff,0x7fdc0fff,
0x2007fe46,0x7fec6ffc,0xfff98004,0x007fffa4,0xd01fffec,0x800007ff,
0x002ffffa,0x1ffffd10,0x17ffd400,0x13fff200,0x1fffe880,0x027fffcc,
0x3ffff600,0x0ffffb81,0xbffff000,0x00ffff88,0x6c1fffa0,0x400005ff,
0x30006ffc,0x7fdc9fff,0xfff8805f,0x5ffe880f,0xffd00000,0xfb0007ff,
0xe8009fff,0xfa8006ff,0xf9000fff,0x3ff20fff,0x44000dff,0x304ffffe,
0x000bffff,0xb05ffff7,0x2e00dfff,0xfd105fff,0x880001df,0x0000fffd,
0x7c49fff3,0x3a204fff,0xfe884fff,0xabccaaff,0xf3008801,0x0019ffff,
0x0bffffd5,0x03fffc80,0x0dfffd00,0x05ffff70,0x17fffff4,0xfffffa80,
0x7fffe406,0xffe9801e,0xfff106ff,0xfff980bf,0x3ffe602f,0xfd30002f,
0x4c0005ff,0x7fd44fff,0x7f4c0cff,0x7f440eff,0xffffffff,0x99acefff,
0x3ea05fda,0x9adfffff,0xfffdba98,0x565c06ff,0x00ffffec,0xdffff100,
0xffffb105,0xfffd8809,0x989bceff,0xfffffecb,0x7ffc400e,0xaaceffff,
0xfffffecb,0x3ffee01f,0x3ee20adf,0xe8804fff,0x5002efff,0x003dfffb,
0x84fff980,0xdefffffc,0x81ffffff,0xfffffff8,0xffffffff,0x0fffffff,
0x3ffffe60,0xffffffff,0x400effff,0xfffffffb,0x7fd40001,0xffdeffff,
0x2006ffff,0xfffffffc,0xffffffff,0x3a6004ff,0xffffffff,0xffffffff,
0xfffb801f,0xfffedfff,0x32000eff,0xbcdfffff,0xffffdcba,0xf300005f,
0x3fea09ff,0xffffffff,0x3fff601f,0xffdccdff,0xffffffff,0x7ec402ff,
0xffffffff,0x003fffff,0x5ffffff5,0x3faa0000,0xffffffff,0xea8003ff,
0xffffffff,0x02efffff,0xffffd880,0xffffffff,0x26000eff,0xfffffffe,
0x30005fff,0xfffffffb,0x5bffffff,0x7fcc0000,0x3ff6604f,0x00bfffff,
0x3005ffd4,0xffffffd7,0x3220019f,0xffffffff,0x26000cff,0x003effff,
0xffffb800,0x000dffff,0x7fffecc0,0x01cfffff,0xfffc9800,0xcfffffff,
0xfd910001,0x05bfffff,0xffd71000,0x17dfffff,0xff300000,0x2ea2009f,
0x00a0009a,0x06aeea20,0x75531000,0x98800035,0x8000000a,0x000abba8,
0x59533000,0x40000033,0x99abba99,0x26200000,0x00000abb,0x0026a620,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x40000000,0x00aabca9,0x00010000,0x00002200,
0x2f2aa600,0x2000001a,0x409bdcb9,0x00000998,0x00000000,0x30000000,
0x00359753,0x33332600,0xcccccccc,0x50002ccc,0xffffffd9,0x00017dff,
0x77fff6dc,0xb710001c,0x007dfffd,0x7ffe4c00,0x2dffffff,0xffd50000,
0x6cbfffff,0x300006ff,0x40009fff,0x3fe6fffa,0x0000006f,0x7ffffe4c,
0x0bceffff,0xffffb800,0xffffffff,0x4c004fff,0xfffffffe,0x2fffffff,
0x7fff5400,0x0dffffff,0x3fffea00,0x03ffffff,0x3fffaa00,0xffffffff,
0x20003eff,0xfffffffc,0xffd8efff,0xff300006,0x7d40009f,0x1bffe6ff,
0x74c00000,0xffffffff,0x3fffffff,0x7fffec00,0xffffffff,0x26004fff,
0xffffffff,0xffffffff,0xfff9004f,0xffffffff,0xfd8803ff,0xffffffff,
0x44005fff,0xaceffffd,0xffeca999,0x6c000eff,0xdcefffff,0xffeffffe,
0xff300006,0x7d40009f,0x1bffe6ff,0x3ee00000,0xffffffff,0xffffffff,
0xffd000df,0xffffffff,0x009fffff,0x3bffffe6,0xeba999ab,0x404fffff,
0x9beffff9,0x6ffffb98,0x77fffec0,0xfffba89b,0xffd3005f,0x3260039f,
0x5002ffff,0x301bffff,0x0dffffff,0x3ffe6000,0x3fea0004,0x01bffe6f,
0xffd88000,0x9acdffff,0xfffecb98,0x7c400eff,0x99999dff,0x09999999,
0x5ffffb00,0x3fffaa00,0xfffd101f,0x7fff4c09,0xbffff504,0x3fffa201,
0x77ffd403,0xffb10000,0xfffd007f,0xfffe8809,0xf300006f,0x540009ff,
0x3ffe6fff,0x36000006,0x004fffff,0x13ffffea,0x007fff30,0x3ffe6000,
0x7fc4001f,0xfff505ff,0xffff300d,0x0bfffd01,0x01ffff10,0x0013ffe2,
0x00fffdc0,0x200dfff5,0x006ffff9,0x09fff300,0x37ffd400,0x0000dfff,
0x3bfffea0,0xffe88001,0x3fee01ff,0x7000002f,0x20009fff,0xc80ffffa,
0xfb002fff,0xfffb83ff,0xfff7000f,0x013ffa09,0x3ee004cc,0xfff900ef,
0x7ffec005,0xff300006,0x7d40009f,0x1bffe6ff,0x3fe20000,0xe80006ff,
0x3f205fff,0x000000ff,0x0005fff9,0x6c0ffffc,0xf9001fff,0xfffc87ff,
0x37ff4003,0x9502ffe4,0x07fffffd,0xfe82ffec,0x7fcc007f,0xf300006f,
0x540009ff,0x3ffe6fff,0xfc800006,0x80001fff,0x3a07fffb,0x000007ff,
0x000ffff6,0xd83fffd8,0xf7001fff,0xfffd87ff,0x7ffec001,0x203ffe20,
0xffffffd8,0xe880efff,0x5fff80ff,0x37ffc400,0x0dee5cc0,0x0013ffe6,
0x3e6fffa8,0x665446ff,0x3fe2001b,0x200004ff,0xff02ffff,0x400000bf,
0x0007fffa,0xffb80662,0xfff9002f,0x00ffff83,0x717ffe40,0x3ffa07ff,
0xffca9acf,0x4ffa80ef,0x0027ffcc,0xd5037ffc,0x7fffffff,0x0013ffe6,
0x3e6fffa8,0xfffb16ff,0x5009ffff,0x0000ffff,0xf301bdb8,0x001107ff,
0x7ffff100,0x7c400000,0xff8805ff,0x3fffc46f,0x27ffdc00,0xff901ffd,
0x27ff403d,0x7fd47ff8,0xffe8003f,0xfffff906,0xf39fffff,0x540009ff,
0x3ffe6fff,0xfffffe8e,0x200effff,0x0005fffd,0xfffa8000,0xdffffd72,
0x3fa00039,0x0001dfff,0x07fffd00,0xf84fffd8,0xfc8007ff,0x09ff34ff,
0x8803fff1,0x5ff707ff,0x001fffdc,0x7ec37ff4,0xfdcdffff,0x4fffefff,
0x3ffea000,0x3fffffe6,0xffecceff,0xff881fff,0x000004ff,0xfbfffc80,
0xffffffff,0xffa8003f,0x01ceffff,0x3ffe6000,0x3faa21df,0xffe80eff,
0x7fec000f,0x303ff75f,0x066009ff,0x3ea4ff88,0xff8004ff,0x7fffd46f,
0xfffff505,0x7d40009f,0x3fffe6ff,0xff980eff,0xfff986ff,0x0000002f,
0xffffffd8,0xffffffff,0x7cc000ef,0xffffffff,0x4c0001bd,0xfffffffe,
0xb00dffff,0xe8005fff,0x1ff96fff,0x0003ff70,0xff32ffc0,0xfff000bf,
0x04fffe8d,0x27ffff4c,0xdfff5000,0x02fffffc,0x50bfffa2,0x0003ffff,
0xffff0000,0x97559dff,0x00bfffff,0xfffffd10,0x5bffffff,0x3ff20001,
0x2fffffff,0x037ffdc0,0x2dffff70,0x1ffb07fd,0x37f40000,0x800dfff1,
0x3ea6fff8,0xff5006ff,0x540009ff,0x3ffe6fff,0xffa800ff,0x3fffdc6f,
0x44000000,0x201fffff,0x02ffffe8,0xfffeb880,0xffffffff,0xfb5000cf,
0xffffffff,0x3e2019ff,0xf8804fff,0xdfd6ffff,0x0001ffe0,0xfff8ffb0,
0x3fee001f,0x0ffff26f,0x04fffe80,0x9bffea00,0x2003ffff,0x3ee2fffe,
0x54c006ff,0xaaaaaaaa,0x7fcc2aaa,0xffb001ff,0x4c0001ff,0xffffffeb,
0x402fffff,0xbcfffffb,0xfffffdca,0xbffff701,0x3fffea01,0x20dfd6ff,
0x400007ff,0x7ffdc7fd,0x3fffe005,0x001fff66,0x0009fff7,0xff37ffd4,
0xffb800ff,0x1bfff23f,0xfffff900,0xffffffff,0x88002620,0x0003ffff,
0xfffd9510,0x205fffff,0x204ffffb,0x00ffffe9,0x7bfffffd,0xf5fffb95,
0x41ff6bff,0x00000ffe,0x3ffe1bfa,0xfffc801f,0x01bffe6f,0x009fff30,
0xf37ffd40,0xf9800dff,0x3ffee4ff,0x7ffe4006,0xffffffff,0x6400007f,
0x00004fff,0xffffb510,0xfff883ff,0xfffb003f,0x3fffa20b,0xffffffff,
0xf95fff8a,0x03ffb01f,0xbff00620,0x05ffff70,0xb7ffffe4,0x4005fff8,
0x0004fff8,0xff9bffea,0x7fc4005f,0x1fffea6f,0xfffff900,0xffffffff,
0xffa80000,0x8000006f,0x45ffffea,0x2005fffc,0x201ffff8,0xfffffffc,
0xbfff31ff,0x3ee07fee,0x3ffb004f,0x3a09ff30,0xaabdffff,0xffffffec,
0x009fff36,0x004fff88,0xf9bffea0,0x7c4004ff,0x3ffe67ff,0x2aa6000f,
0xfbaaaaaa,0x400007ff,0x0007fff9,0xfffb1000,0x0ffff41f,0x13fff200,
0x9dffb930,0x34fffa85,0xfff10bff,0x0fffa801,0x3602ffc8,0xffffffff,
0x6fffafff,0x0009fff5,0x40009fff,0x3fe6fffa,0xfff8004f,0x0bfffe27,
0xfff10000,0xf880000f,0x2eaa07ff,0x7c40000c,0x3ffe1fff,0x7fd4000f,
0x7004005f,0x7ff47fff,0x00effb80,0x3e09fff3,0xfffb806f,0x88efffff,
0xfff55fff,0x9fff000b,0x7ffd4000,0x0013ffe6,0xfe8dfff1,0x400005ff,
0x0007fff8,0x037ffcc0,0x0005fffd,0x227fffd0,0x88007fff,0x00006fff,
0xfa87fff2,0x9fffd03f,0xdfffd735,0x007ff501,0x337fb2a2,0x4d7ffe22,
0x44006fff,0x75314fff,0xdfff5001,0x2002fffc,0x7dc5fff9,0x400007ff,
0x6547fff8,0xffa8005c,0x3fff605f,0xffc80005,0x01fffe3f,0x017ffe60,
0x87fff800,0xfc881fff,0xffffffff,0x0fff880e,0x7fcc0000,0x0ffff15f,
0x94fff980,0xf5003fff,0x2fffcbff,0x13ffea00,0x007ffff1,0x3fffc400,
0x000bfffa,0x5c09fff9,0x80007fff,0x3fa1ffff,0x7d4001ff,0x372e64ff,
0x3ffea001,0x206ffb85,0xefffffda,0x013ff602,0x3ffea000,0x003fffa4,
0xf74fffa8,0xff7005ff,0x07fffcbf,0x07fff900,0x003ffffb,0x1fffe200,
0x4009fff9,0x201ffff8,0x004ffff8,0x83fffe60,0x4003fffc,0x3e62fffc,
0x3f6004ff,0xbffb02ff,0x80135100,0x3b206ffc,0x3f6000cd,0x3fff22ff,
0x3fffa004,0x009fff54,0x7fc9fff9,0xff1002ff,0xfff103ff,0x700001df,
0xffa8ffff,0xff9001ff,0xfffb00bf,0xe98001bf,0x7fdc4fff,0xff3000ff,
0x6fff81ff,0x0dfff300,0x0077ff44,0x3fff6200,0x13ffee00,0x07fffd40,
0x001ffff3,0x269ffff5,0x2200ffff,0x3fe2ffff,0xfc800eff,0x3fea04ff,
0x30002fff,0x88fffffd,0xb806fffe,0x9801ffff,0x02efffff,0x1fffff70,
0x01ffffd0,0x84fffe88,0x5404fffd,0x4c02ffff,0x0002ffff,0x805fffd3,
0x400ffffa,0xd85ffff8,0x2600efff,0xf14ffffe,0x3a209fff,0x3fe0ffff,
0x7d406fff,0x7e400fff,0x002dffff,0xffffffb3,0xdffff30d,0xffffb305,
0x7ffd4009,0x9bceffff,0xfffffdca,0xffff102f,0xfff7017d,0x3ffe60df,
0x7fdcc0cf,0xfd1005ff,0x2a005dff,0x801efffd,0x02efffe8,0x01ffffd5,
0x85fffff1,0xffffffb8,0x3bfffee4,0xffffca9b,0x7ffffc4f,0x7fe441df,
0xff9003ff,0x579fffff,0xffffd975,0x5c05ffff,0xdeffffff,0x03ffffff,
0xfffffa80,0xffffffff,0x403fffff,0xeffffffa,0xffffffed,0x3fffea01,
0xfffffdef,0xffc8005f,0xbabcdfff,0x5fffffdc,0x7fffcc00,0xffffefff,
0x3e602fff,0xfeefffff,0x4fffbfff,0x7ffffff4,0x0effffff,0x7ff6fffc,
0xffffeeff,0x7fd4005f,0xffffffff,0xffffffff,0xfea800cf,0xffffffff,
0x220002ff,0xfffffffd,0xefffffff,0xfffd3001,0xffffffff,0xfff7001b,
0xffffffff,0x7ecc0009,0xffffffff,0x002dffff,0xffffff50,0x3dffffff,
0xfffff300,0x3e7fffff,0x7ff444ff,0xffffffff,0x8cfff80e,0xfffffffe,
0x910003ff,0xffffffff,0xbfffffff,0xfff70001,0x019dffff,0x3fb26000,
0xffffffff,0xff70002d,0x5dffffff,0xfffd8800,0x001dffff,0xfffd7100,
0x017dffff,0x3ffaa000,0x02dfffff,0x7fffdc40,0x3ffe2eff,0xfffff704,
0x7fc07bff,0x3ffff24f,0x00001dff,0xffffffb5,0x0037bdff,0x13773100,
0x98800000,0x009abcaa,0x57531000,0x53100003,0x00001357,0x009a9880,
0xaa980000,0x9800009a,0x400009ba,0x0000aba8,0x00037510,0xaba99800,
0x00000001,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x10000000,0x00000000,0x00099988,0x00006662,0x00000000,0x00000000,
0x04fffd80,0x3fffe600,0xffe80003,0xffffffff,0xffffffff,0x5fffffff,
0x7fffc000,0xb8800007,0xbdefffed,0xf9800000,0xfff702ff,0x7ffe4005,
0x00bfff71,0x3fee0000,0xffffffff,0x02ceffff,0x3ffffee0,0xffffffff,
0xffffffff,0x3fffe65f,0xfffb0000,0xff30000d,0xffffffff,0xffffffff,
0xffffffff,0x7fd4000b,0x00002fff,0x3fffffee,0x002fffff,0x17fff400,
0x002fffb8,0x7dc7fff2,0x000005ff,0xffffff70,0xffffffff,0x7007dfff,
0xffffffff,0xffffffff,0x8bffffff,0x8005fffc,0x002ffff9,0xfffffd80,
0xffffffff,0xffffffff,0x005fffff,0x3fffff60,0xfe880006,0xffffffff,
0x0005ffff,0x05ffff90,0x800bffee,0xff71fffc,0x000000bf,0x3fffffee,
0xffffffff,0x03ffffff,0x3fffffee,0xffffffff,0xffffffff,0x0ffffc45,
0x17fffa00,0x3ffe6000,0xffffeeef,0xeeeeeeef,0xeeeeeeee,0xfff10004,
0x0003fffd,0xadffffd8,0xfffeb989,0x7cc0004f,0xf702ffff,0x7e4005ff,
0xbfff71ff,0x2e000000,0xeeeeffff,0xffeeeeee,0x704fffff,0xddddffff,
0xdddddddd,0x09dddddd,0x400dfff7,0x001ffffa,0x46fffd80,0x0004fffc,
0xfff70000,0x0009fff3,0x017fffdc,0x007ffff2,0x7ffff440,0x5fff702f,
0x8fffe400,0x0005fffb,0xbfff7000,0x7ff54400,0xffb83fff,0x8000005f,
0xd002fffe,0x00009fff,0xc85ffff3,0x00004fff,0x2dffd000,0x0000fffe,
0x2005ffff,0x0006fffc,0x5ffffffb,0x00bffee0,0xf71fffc8,0x00000bff,
0x017ffee0,0x7ffffdc0,0x02fffdc1,0x7fd40000,0xfffa807f,0xfd80000f,
0xfffc86ff,0x80000004,0xff93fff9,0xff30007f,0x7fc400bf,0xffa8007f,
0x702fffef,0x64005fff,0xfff71fff,0x9999999d,0x00155579,0x00bfff70,
0x2ffffcc0,0x0017ffee,0x7ffec000,0x1ffff403,0x7ffc4000,0x4fffc82f,
0xc8000000,0xfff31fff,0xfff7000d,0xfffd8007,0x3ffe2001,0x702fffbc,
0x64005fff,0xfff71fff,0xffffffff,0x5dffffff,0x3ffee001,0x7fe40005,
0x3ffee1ff,0x30000005,0x2e01ffff,0x00006fff,0x320dfff9,0x00004fff,
0x47fff800,0x4001fffe,0x4001fffd,0x2002fffc,0xfff76ffd,0x0bffee05,
0x71fffc80,0xffffffff,0xffffffff,0x7007ffff,0x8000bfff,0x2e5ffff8,
0x00005fff,0x13fff200,0x00bfffe2,0x3fffe200,0x09fff902,0xfa800000,
0x7ffdc4ff,0x554c4004,0x7ffec000,0x3fff7002,0x5c0bffee,0x32002fff,
0xfff71fff,0xffffffff,0xffffffff,0xffb805ff,0xfb80005f,0x3ffee7ff,
0x20000005,0x641ffff8,0x00005fff,0x640dfff9,0x00004fff,0x0fffec00,
0x003fffe2,0xffe80000,0xfff9800f,0x40bffee3,0x2002fffb,0xff71fffc,
0x333333bf,0xff755333,0x5c03ffff,0x80005fff,0xf71ffff8,0x00000bff,
0x25fffb80,0x001ffff8,0x2ffff880,0x013fff20,0xff880000,0x7fffb06f,
0x2a000000,0xfd006fff,0x2fffb8df,0x007fff70,0xfb8fffe4,0xd88005ff,
0x2e06ffff,0x00005fff,0x3ee7fffd,0x000005ff,0x91fffe80,0x00009fff,
0x901bfff2,0x00009fff,0x27ffdc00,0x006fffa8,0xfffd0000,0x1fff9009,
0x702fffb8,0x6c007fff,0xfff71fff,0x7fe4000b,0xfff700ff,0x3f20000b,
0xbfff75ff,0x50000000,0xfff1bfff,0xf100001f,0xfc807fff,0xaaaaadff,
0xaaaaaaaa,0x7ff4001a,0x3fffe01f,0x5c000001,0x5400ffff,0xffb83fff,
0x7fff702f,0x8fffec00,0x0005fffb,0x40bfffe2,0x0005fffb,0x2ebfff90,
0xaaaaefff,0xaaaaaaaa,0x001aaaaa,0x7ff7fff4,0xf700003f,0xff900fff,
0xffffffff,0xffffffff,0x7ffcc009,0x2fffe406,0xff500000,0xff8805ff,
0x5fff705f,0x013ffee0,0xf71fffe8,0xe8000bff,0x2aaa4fff,0xaaaefffd,
0x801aaaaa,0xff76fffb,0xffffffff,0xffffffff,0x55307fff,0xfff95555,
0x5557ffff,0x7c001555,0xfc803fff,0xffffffff,0xffffffff,0x3ff2004f,
0x7ffcc03f,0xa800000f,0xd805ffff,0xff700fff,0x3ffee05f,0x3fffe005,
0x00bfff71,0x26fffc80,0xffffffff,0xffffffff,0x6fffb803,0xfffffff7,
0xffffffff,0x07ffffff,0xfffffff9,0xffffffff,0x05ffffff,0x01fffee0,
0x7fffffe4,0xffffffff,0x1004ffff,0xd001ffff,0x00007fff,0x0effffa8,
0x017ffdc0,0x2e05fff7,0xf3007fff,0x3fee3fff,0x7e40005f,0x3fffe5ff,
0xffffffff,0xb803ffff,0xfff76fff,0xffffffff,0xffffffff,0xfff907ff,
0xffffffff,0xffffffff,0x3fe005ff,0xff9003ff,0x555555bf,0x55555555,
0x3ffee003,0xdfff7005,0x7fd40000,0x7c400eff,0x7fdc05ff,0xffff702f,
0xfffe8809,0x0bfff71f,0x4fffd800,0x3fff6aaa,0xaaaaaaae,0xfffb801a,
0x55dfff75,0x55555555,0x35555555,0xdddddd70,0xddffffdd,0x3ddddddd,
0x1ffff700,0x13fff200,0x3fa00000,0x99999bff,0xfff99999,0xfb80002f,
0xe800efff,0x7dc00eff,0xfff702ff,0x7fec05ff,0xfff71fff,0x7fc4000b,
0xfff703ff,0x3f20000b,0xbfff75ff,0x80000000,0x0002fffc,0xffffffd0,
0xffffffff,0x0009ffff,0xffff9800,0xffffffff,0x5fffffff,0x7ffe4000,
0xffb800ef,0xfffb801f,0xfffff702,0xfd7315bf,0x2e3fffff,0x20005fff,
0x701ffffd,0x0000bfff,0x7dd3fff6,0x000005ff,0x17ffe400,0x7ffd4000,
0xffffffff,0xffffffff,0x64000004,0xffffffff,0xffffffff,0x8000ffff,
0x05ffffd8,0x33bfff30,0x93333333,0x13337fff,0x3fffffee,0xffffffff,
0xff71fffd,0xfb1000bf,0x7dc09fff,0xf00005ff,0x3fee7fff,0x2000005f,
0x99999998,0x99bfffc9,0x00999999,0x7ffffff4,0xffffffff,0x004fffff,
0x7fffc000,0xffffffff,0xffffffff,0x7f44003f,0x2e004fff,0xffffffff,
0xffffffff,0xf75fffff,0xffffb5ff,0xff39ffff,0x37ffee3f,0x99999999,
0xffffdcaa,0x3fee00ff,0xf880005f,0xfff71fff,0x6400000b,0xffffffff,
0xffffffff,0x202fffff,0xeeeffffa,0xeeeeeeee,0x004ffffe,0x3ffea000,
0x9999999e,0xfc999999,0x3e6006ff,0x4003ffff,0xfffffffb,0xffffffff,
0x75ffffff,0x3ff25fff,0xff33efff,0x3fffee3f,0xffffffff,0xffffffff,
0x7ffdc02f,0xffc80005,0x17ffee6f,0xffc80000,0xffffffff,0xffffffff,
0x3fa02fff,0xfc8004ff,0x000004ff,0x000ffff6,0x017fffc4,0x17ffffcc,
0x7fffdc00,0xffffffff,0xffffffff,0x85fff75f,0xf7000ab9,0xffffffff,
0xffffffff,0xf7001bff,0x98000bff,0x3ee4ffff,0x000005ff,0x3bbbbbae,
0xeeffffee,0x1eeeeeee,0x01ffff30,0x09fff900,0x3fe20000,0x3a0000ff,
0x7c405fff,0x0001ffff,0x55555551,0xfb555555,0x235559ff,0x0002fffb,
0xffffffb8,0xffffffff,0x2001dfff,0x0005fffb,0x70ffffec,0x0000bfff,
0xfffc8000,0x3ff60002,0xff90005f,0x2000009f,0x0005fffb,0x007fffd4,
0x003ffffd,0xff700000,0x3ffee05f,0xffb80002,0xaaaaaaef,0x00019aaa,
0x0017ffee,0x45ffffa8,0x0005fffb,0x7fe40000,0xff30002f,0x320003ff,
0x00004fff,0x005fffd0,0x4ffff880,0x03ffff70,0x2e000000,0xff702fff,
0xf700005f,0x00000bff,0x017ffee0,0x7ffffdc0,0x02fffdc0,0x32000000,
0xb0002fff,0x4000bfff,0x0004fffc,0x0ffff980,0xfffc8000,0x2ffff887,
0x20000000,0xf702fffb,0x700005ff,0x0000bfff,0x17ffee00,0xfffea880,
0xfffb83ff,0x00000005,0x0017ffe4,0x00ffffcc,0xdffff900,0xdddddddd,
0x3ddddddd,0x005fffc8,0x5ffff300,0xeeffffd8,0xeeeeeeee,0x002eeeee,
0x817ffdc0,0x0002fffb,0x005fffb8,0xfff70000,0xdddddddf,0xffffffdd,
0x3fee07ff,0xeeeeeeff,0xeeeeeeee,0x002eeeee,0x0017ffe4,0x0037ffec,
0x3fffff20,0xffffffff,0x1fffffff,0x0017fffc,0x4bfffd00,0xfffffff9,
0xffffffff,0x003fffff,0x817ffdc0,0x0002fffb,0x005fffb8,0xfff70000,
0xffffffff,0xffffffff,0x7ffdc05d,0xffffffff,0xffffffff,0x4003ffff,
0x4002fffc,0x002ffff8,0x7ffffe40,0xffffffff,0x1fffffff,0x001fffea,
0x1ffff700,0x3fffffea,0xffffffff,0x03ffffff,0x17ffdc00,0x002fffb8,
0x05fffb80,0xff700000,0xffffffff,0xdfffffff,0xffff7005,0xffffffff,
0xffffffff,0xc8007fff,0x64002fff,0x80006fff,0xfffffffc,0xffffffff,
0x361fffff,0x00004fff,0xca7fffc4,0xffffffff,0xffffffff,0x0003ffff,
0xa817ffdc,0x80001eee,0x0005fffb,0xffff7000,0xffffffff,0x40039dff,
0xfffffffb,0xffffffff,0xffffffff,0x00000003,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x88000000,0x0009acba,0x00000000,0x206f72e6,0x26660998,
0x566dd440,0x32e20000,0x02cc980a,0x00000000,0x26206662,0x7fdc0099,
0xffffffff,0x02ceffff,0x3ffffea0,0xffffffff,0xffffffff,0xffffff71,
0xffffffff,0x0159ddff,0x7fffdc00,0x202fffff,0x0006fffa,0x205fffb8,
0xffffffea,0xf93ffa3f,0xfffd13ff,0x0019ffff,0xdfffffa8,0x360fff22,
0x20003fff,0x24fffff8,0xffb5fff8,0x3fffc83f,0x7fddbffe,0xffffffff,
0xefffffff,0xffffa803,0xffffffff,0xffffffff,0xfffff71f,0xffffffff,
0xffffffff,0xffea8005,0xffffffff,0xfffa81ef,0xffb80006,0xffff905f,
0x29ffffff,0x3ffe4ffe,0xfffffe8b,0x001fffff,0xfffffff3,0x03fffdff,
0x0007fffb,0x13ffffe2,0x3f6bfff1,0x7ffe41ff,0x7ddbffe3,0xffffffff,
0xffffffff,0x3ea03fff,0xffffffff,0xffffffff,0xff71ffff,0xffffffff,
0xffffffff,0x2009ffff,0xeffffffa,0xffffffed,0x037ffd41,0x2fffdc00,
0x677fffec,0xedfffebb,0x37ffe4ff,0xdbbdffff,0x802fffff,0xffcadffd,
0xb04fffff,0x10007fff,0x107fffff,0x3ff6bfff,0x1fffe41f,0x3feedfff,
0xeeeeeeff,0xffffeeee,0xff504fff,0xddddddff,0xdddddddd,0x3fee3ddd,
0xccccccef,0xfedccccc,0x403fffff,0x02fffff8,0x41dffff7,0x0006fffa,
0x545fffb8,0xf304ffff,0x7c9fffff,0x80dfffff,0x00ffffe8,0x3aa07ff4,
0x3f604fff,0x7cc003ff,0xf103ffff,0x3fff6bff,0xf1fffe41,0x3ffeedff,
0x3f6a2005,0xfa83ffff,0x400006ff,0x0005fffb,0x1fffff91,0x07fffec0,
0x97fffe60,0x0006fffa,0x745fffb8,0x74403fff,0x3fe4ffff,0x74404fff,
0x55404fff,0xb0026202,0x4c007fff,0x203fffff,0x3315fff8,0x41333103,
0xfff72aaa,0x3fea000b,0x7fd41fff,0x5c00006f,0x40005fff,0x103ffffb,
0x2005ffff,0xf50ffffa,0x70000dff,0x7fd4bfff,0xfff5006f,0x7ffffc9f,
0x7fff9800,0x36000000,0xf3003fff,0x8807ffff,0x00005fff,0x00bfff70,
0x2ffffd40,0x001bffea,0x0bfff700,0xdfffb000,0x017ffee0,0x2a3fffd0,
0x80006fff,0x3f65fffb,0x3fa003ff,0x3fffe4ff,0x3fff6003,0xb0000001,
0xf3007fff,0x1005ffff,0x0000bfff,0x017ffee0,0x3ffff700,0x0037ffd4,
0x17ffee00,0x3ffee000,0x07fffb07,0x53fffc80,0x0000dfff,0x7fcbfff7,
0x7fd4007f,0x03fffe4f,0x02fffa80,0x2f36ea60,0x7ffec01a,0x7fffcc03,
0xfff1002f,0x2e00000b,0x80005fff,0x3ea5fffe,0x400006ff,0x0005fffb,
0x80ffff98,0x4001ffed,0xff53fffb,0xf70000df,0x3ffe2bff,0x7ffcc007,
0x001bffe4,0x9809fff3,0xfffffffe,0xffb03fff,0x7ffcc07f,0x3e2002ff,
0x333105ff,0xf7099980,0x70000bff,0x7fd4ffff,0x5c00006f,0x80005fff,
0x0807fffb,0x1fffd800,0x000dfff5,0x26bfff70,0x44006fff,0x3ffe4fff,
0x7ffc4005,0x3fffee05,0xffffffff,0x7ffec0df,0xfffff303,0xfff88005,
0x03fff905,0xffbb7ffc,0xf880005f,0xfff51fff,0xfb80000d,0xd80005ff,
0x00006fff,0x7d4ffff0,0xb80006ff,0xfff55fff,0x9fff000b,0x40027ffc,
0xffd07fff,0xdb99bdff,0xd89fffff,0xff983fff,0x88001fff,0xff905fff,
0xb7ffc03f,0x0005fffb,0x2a7fffd0,0x00006fff,0x002fffdc,0x13fffe20,
0x3ff20000,0x1bffea5f,0x3ffee000,0x009fff55,0x7fc9ffd0,0xfff8003f,
0x2ffffb87,0x3ffff660,0x30ffff60,0x003fffff,0x417ffe20,0x3e01fffc,
0xbfff76ff,0x3ff60000,0x0dfff55f,0xfffb8000,0x3fea0005,0x00000fff,
0x50ffffdc,0x0000dfff,0x3e6bfff7,0xff8005ff,0x013ffe4f,0x3a1fffe0,
0xfd001fff,0x7ffec7ff,0x3ffffe63,0x3fe20001,0x3fff905f,0xfbb7ffc0,
0x900005ff,0x3feabfff,0xaaaaaaff,0xaaaaaaaa,0x05fffb82,0x3ff2a620,
0x00003fff,0x227fffdc,0xeeeffffa,0xeeeeeeee,0xffeeeeee,0x0dfff15f,
0x24fff880,0x44005fff,0x7fcc6fff,0x3fee005f,0x4ffff64f,0x0ffffff9,
0x3ffe2000,0x03fff905,0xffbb7ffc,0xf700005f,0x3ffeadff,0xffffffff,
0x7fffffff,0xeeffffb8,0xfeeeeeee,0xffffffff,0x7e400005,0xffa84fff,
0xffffffff,0xffffffff,0x25ffffff,0x4c007fff,0x3ffe4fff,0x7ffcc006,
0x00f6e4c5,0x6cbfff50,0xfff9bfff,0x0006ffff,0x6417ffe2,0x3fe01fff,
0x0bfff76f,0x3ffee000,0xffffff56,0xffffffff,0xf70fffff,0xffffffff,
0xffffffff,0x0005ffff,0x4ffffc80,0xffffff50,0xffffffff,0xffffffff,
0x7fff4bff,0x3ffea001,0x001fffe4,0x0007fff7,0xb2fffcc0,0xffffbfff,
0x009fffff,0x417ffe20,0x3e01fffc,0xbfff76ff,0x3fee0000,0xfffff56f,
0xffffffff,0x70ffffff,0xffffffff,0xffffffff,0x00017bff,0x4ffffb80,
0x3bfffea0,0xeeeeeeee,0xeeeeeeee,0x3ff25fff,0x3ffa005f,0x0ffffe4f,
0x00ffff80,0xffda8800,0x3ffff65f,0xffd8efff,0xf88002ff,0xfff905ff,
0xbb7ffc03,0x00005fff,0x3eabfff9,0xaaaaafff,0xaaaaaaaa,0xffffb82a,
0xfeeeeeee,0x000cffff,0xffff3000,0x6fffa809,0xfffb8000,0x07fffe25,
0x93fffea0,0x7007ffff,0x8800dfff,0xffffecba,0x3ff65fff,0xf10effff,
0x8001ffff,0xf905fff8,0x7ffc03ff,0x00bfff76,0x53fffa00,0x0006fffa,
0x02fffdc0,0x37ffff22,0xfd800000,0xffa804ff,0xfb80006f,0x7ffdc5ff,
0x3ffa600e,0x3fffe4ff,0x7ffd405f,0xffeb801f,0xffffffff,0x3ff65fff,
0x7d40efff,0x44005fff,0xff905fff,0xb7ffc03f,0x0005fffb,0x2a7ffff0,
0x00006fff,0x802fffdc,0x00fffffa,0x3ffe2000,0xdfff5007,0xfff70000,
0x5ffffd0b,0xffffff50,0x7fffffc9,0x7ffdc41e,0x7ffdc04f,0xffffffff,
0x365fffcd,0x900effff,0x4007ffff,0xf905fff8,0x7ffc03ff,0x00bfff76,
0x5ffff100,0x001bffea,0x0bfff700,0x37fffd40,0xfff30000,0x3ffea007,
0xffb80006,0xfffe985f,0xffffeeff,0x3fe4fffe,0xefffffff,0x0dfffffe,
0x3ffffee0,0x261bceff,0x3ff65fff,0x7ff400ef,0xff1001ff,0x3fff20bf,
0x5dbffe01,0x80005fff,0xf51ffff9,0x80000dff,0x4005fffb,0x005ffffb,
0x05fff700,0x01bffea0,0x17ffee00,0x7ffffec4,0xff9cffff,0x23bffe4f,
0xfffffffe,0x7fd404ff,0x4c00beff,0x3ff65fff,0xfff9803f,0xff8800ef,
0x3fff905f,0xfbb7ffc0,0xc80005ff,0x3fea7fff,0x5c00006f,0xd8005fff,
0x0003ffff,0x001fffc8,0x000dfff5,0x80bfff70,0xefffffeb,0x7c9fff32,
0xfff916ff,0xb003bfff,0x2001bfff,0x3f65fffa,0xff7003ff,0xff100bff,
0x3fff20bf,0x5dbffe01,0x40005fff,0x2a3ffff9,0x00006fff,0x002fffdc,
0x0fffffc4,0x3fff6000,0xdfff5000,0xfff70000,0x055cc00b,0xff93ffe6,
0x0aba886f,0x03fffe00,0x25fffb80,0x2003fffd,0x403ffffd,0xf905fff8,
0x7ffc03ff,0x00bfff76,0x0ffffd80,0x001bffea,0x0bfff700,0x3fffea00,
0x4cc40006,0x3ffea001,0xffb80006,0xf300005f,0x37ffc9ff,0xfff30000,
0xfffe800d,0x00ffff65,0x1fffff88,0x417ffe20,0x3e01fffc,0xbfff76ff,
0x7ffd4000,0x37ffd44f,0x3fee0000,0x3f60005f,0x00004fff,0x6fffa800,
0xfffb8000,0xff300005,0x037ffc9f,0xffff3000,0x3fff2001,0x0ffff65f,
0xdffff500,0x82fffc40,0x3e01fffc,0xbfff76ff,0x3ffee000,0x7ffd40ff,
0x7dc00006,0x220005ff,0x001fffff,0x7fd40000,0xfb80006f,0x300005ff,
0x7ffc9fff,0x3e200006,0xfb804fff,0x3f66ffff,0xfd8003ff,0xff104fff,
0x3fff20bf,0x5dbffe01,0x22005fff,0x2fffffea,0x006fffa8,0x2fffdc00,
0x3ffee000,0x5550006f,0x3fea0035,0xfb80006f,0x300005ff,0x7ffc9fff,
0x7f400006,0xf9302fff,0x6cffffff,0x88003fff,0x882ffffe,0xff905fff,
0xb7ffc03f,0xeeeffffb,0xffeeeeee,0x02ffffff,0x000dfff5,0x05fffb80,
0xffffd800,0xffff8003,0xdfff5004,0xfff70000,0x3e60000b,0x1bffe4ff,
0xfff30000,0xffd9bdff,0xfffd7fff,0x00ffff61,0x7ffffcc0,0x82fffc40,
0x3e01fffc,0xffff76ff,0xffffffff,0xffffffff,0x37ffd405,0x3fee0000,
0xf880005f,0x4000ffff,0x5004ffff,0x0000dfff,0x000bfff7,0xf93ffe60,
0x800006ff,0xfffffffa,0xf70dffff,0x3fff67ff,0x3ff20003,0x7ffc46ff,
0x03fff905,0xffbb7ffc,0xffffffff,0xefffffff,0x7ffd400b,0x7dc00006,
0x700005ff,0x800bffff,0x5004ffff,0x0000dfff,0x000bfff7,0xf93ffe60,
0x000006ff,0xffffffb1,0xfff985df,0x007fffb6,0x4ffffe80,0x6417ffe2,
0x3fe01fff,0xfffff76f,0xdfffffff,0x5400379b,0x00006fff,0x002fffdc,
0x5ffffd00,0x27fffc00,0x06fffa80,0x5fffb800,0xddd30000,0x002f7747,
0x2ea62000,0xffd8001a,0x7cc0003f,0xff12ffff,0x3fff20bf,0x01bffe01,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0xcdcba800,0x2a20001a,0x0001aacb,
0x19999800,0x00000000,0x00ccccc0,0x10000000,0x00001333,0x00000000,
0x84cccc00,0x00006fff,0x0001bffe,0x7fffe440,0x002effff,0x7fffffe4,
0x007fffb6,0x7fffe400,0x7ffffe42,0x3fe00006,0x7fcc6fff,0x3fff24ff,
0x7d40000f,0xfff304ff,0x3fee01ff,0xffffffff,0x2defffff,0x7ffffec0,
0xffffffff,0xff801bde,0x0dfff3ff,0x37ffc000,0x7fcc0000,0xffffffff,
0xff9005ff,0x36bfffff,0x00003fff,0x3237fff4,0x01ffffff,0xffffa800,
0x37ffec6f,0x017ffff2,0x09fff500,0xdfffffd1,0x3ffffee0,0xffffffff,
0x0bffffff,0xffffffd8,0xffffffff,0x3e01efff,0xdfff3fff,0x7ffc0000,
0x7d400006,0xecdeffff,0x404fffff,0xfffffffa,0x07fffb3f,0xffe88000,
0x3ffff22f,0xd80003ff,0x266fffff,0x7e40ffff,0x0003ffff,0x3613ffea,
0x5fffcfff,0xffffffb8,0xffffffff,0x0effffff,0x7fffffec,0xffffffff,
0xf02fffff,0x3ffe7fff,0x3fe00006,0x2200006f,0x981effff,0x202ffffc,
0x31befffd,0x00ffff61,0x3ffe6000,0x3fffff26,0xff80006f,0x3f66ffff,
0xfffc81ff,0x50000fff,0xffb89fff,0x87fff95f,0xeeeffffb,0xeeeeeeee,
0x45ffffff,0xeeeefffd,0xffeeeeee,0xf81fffff,0xdfff3fff,0x7ffc0000,
0x3f600006,0x7dc00dff,0x3ffa06ff,0x3fff600f,0xf5000003,0x3fff23ff,
0x0001ffff,0x3fffffea,0x207fff36,0x5ffffffc,0x9fff5000,0xd07fffcc,
0x7fdc5fff,0xffb8005f,0x3ff64fff,0x3f62003f,0x99986fff,0x00dfff09,
0x037ffc00,0xffff8800,0x1fffd001,0xb01fffe0,0x00007fff,0xfcaffdc0,
0x03fffdff,0x3fbff600,0x0bff96ff,0x7fffffe4,0xffa8003f,0x5ffff14f,
0x70ffff98,0x2000bfff,0xb0ffffe9,0x70007fff,0x2001ffff,0x00006fff,
0x0001bffe,0x002fffdc,0xf103dff7,0xffd80dff,0x0000003f,0x7fdfffe4,
0xff10006f,0x00dfff7f,0xffffffc8,0x7d4000ff,0x700004ff,0x4000bfff,
0xfb1ffffa,0x3a0007ff,0xff002fff,0x7c0000df,0xb00006ff,0x08003fff,
0x02fffc40,0x000ffff6,0xfff90000,0x003fff95,0xff3fff50,0xffc800df,
0x05ffffcf,0x027ffd40,0x5fffb800,0x7fffc000,0x007fffb3,0x017fff20,
0x88037ffc,0xfff81999,0x0accb986,0x007fffc0,0x7cccc400,0x09999eff,
0x000ffff6,0x90ccc400,0xfff55fff,0x9ffb0007,0x262dfff1,0x3fff2019,
0x03ffffab,0x813ffea0,0x7dc01998,0x6c0005ff,0xfffb5fff,0x3fea0007,
0xdfff006f,0x9ffff700,0x7dcdfff0,0x3effffff,0x007fff88,0xfffff900,
0x45ffffff,0x0003fffd,0x23fff900,0xfff2fffc,0xfff8800d,0xf96fff89,
0x3ff203ff,0x1ffffb3f,0x13ffea00,0x201fffc8,0x0005fffb,0xfdb7ffdc,
0xf70003ff,0x3fe007ff,0x7ffdc06f,0x1dfff03f,0xfffffffb,0xff887fff,
0xf900006f,0xffffffff,0x7ffec5ff,0xf9000003,0x3fff23ff,0x003fff92,
0xff8bffd4,0x03fff96f,0x7c4ffff2,0xf5005fff,0x7fe409ff,0x3ffee01f,
0x7fe40005,0x07fffb5f,0x07fff600,0x7037ffc0,0x7c07ffff,0xffffefff,
0xfffffede,0x01bffe63,0x7f775c00,0x1eeeefff,0x000ffff6,0x8fffe400,
0xff32fffc,0x7fec007f,0x32dfff14,0xff901fff,0x7fffd47f,0x4fffa803,
0x807fff20,0x0005fffb,0xfd9ffff4,0xf98003ff,0x3fe007ff,0xffff506f,
0xfffff807,0x7f4c0aef,0xfff10fff,0xf100000d,0xffd80bff,0x9000003f,
0x3ff23fff,0x01bffe2f,0xf88fffc4,0x3fff96ff,0xb0ffff20,0xa801ffff,
0x3f204fff,0x3fee01ff,0x3ea0005f,0xfffb2fff,0xfffc8007,0x3ffe001f,
0x3ffffa86,0x6fffff80,0x17fffc40,0x0000ffff,0x80bfff10,0x0003fffd,
0x23fff900,0x3f22fffc,0xffb801ff,0x65bffe26,0xff901fff,0xffff887f,
0x27ffd405,0x403fff90,0x0005fffb,0x6cdffff3,0xccccefff,0xffdccccc,
0x7c001eff,0x7ffd46ff,0xffff002f,0xfff9001d,0x007fff49,0x7c406aa0,
0x7fec05ff,0x9000003f,0x3ff23fff,0x0fffe62f,0xf893ff60,0x3fff96ff,
0x20ffff20,0x203ffffa,0x3204fffa,0x3ee01fff,0x262005ff,0x22fffffd,
0xfffffffd,0xffffffff,0xf8000eff,0x3ffea6ff,0x3ffe002f,0xfff3003f,
0x00fffecb,0x10dfff10,0xfd80bfff,0x000003ff,0x3f23fff9,0x37ffc2ff,
0x887ffe20,0xfff96fff,0x0ffff203,0x807fffec,0x3204fffa,0x3ee01fff,
0xeeeeefff,0xffffeeee,0x7ec5ffff,0xffffffff,0xffffffff,0x7fc000cf,
0x5ffff56f,0x2ffff800,0x4bfff100,0x2005fffb,0xf883fffb,0x7fec05ff,
0x9000003f,0x3ff23fff,0x0fffe42f,0xf88dff70,0x3fff96ff,0x40ffff20,
0x506ffff8,0x7e409fff,0x3fee01ff,0xffffffff,0xffffffff,0x7fec0cff,
0xffffffff,0xffffffff,0x3fe002ff,0x4ffffaef,0x0ffff800,0x4dfff100,
0x001ffff8,0xf101fffd,0xffd80bff,0x9000003f,0x3ff23fff,0x1fffcc2f,
0xf887ffd0,0x3fff96ff,0x80ffff20,0xa83ffffb,0x3f204fff,0x3fee01ff,
0xffffffff,0xffffffff,0x9fffb01d,0x33333333,0xffffb753,0x3ffe007f,
0x0fffffff,0x03fffc00,0xb8dfff10,0x6400efff,0xff106fff,0xfffd80bf,
0xf9000003,0x3fff23ff,0x106fff82,0xff881fff,0x03fff96f,0xb00ffff2,
0xfa81ffff,0x3ff204ff,0x3ffee01f,0xffffffff,0x01acceef,0x001fffec,
0x0fffffd4,0x3fe35555,0xffffffff,0x37ffc006,0x0dfff100,0x815ffffd,
0x00ffffd8,0xd80bfff1,0x00003fff,0x323fff90,0xffc82fff,0x86ffb80f,
0xff96fff8,0x3fff203f,0x7fffc403,0x027ffd46,0x5c03fff9,0x00005fff,
0x007fffb0,0x97fffa20,0xfff3ffff,0xffff7fff,0x37ffc007,0x0dfff100,
0xdffffff3,0x5ffffffd,0x02fffc40,0x000ffff6,0x8fffe400,0xf982fffc,
0x3ffe83ff,0xf96fff88,0x3ff203ff,0xfffb803f,0x13ffea3f,0x201fffc8,
0x0005fffb,0x07fffb00,0x7fffe400,0x3e7ffff0,0xff71ffff,0x3fe003ff,
0x3fe2006f,0xfffb106f,0xffffffff,0x5fff8805,0x01fffec0,0xfffc8000,
0x205fff91,0x7fc46fff,0x6fff880f,0x3203fff9,0xfb003fff,0x3fea1fff,
0x3fff204f,0x17ffee01,0x7fec0000,0x3e60003f,0xffff1fff,0xb07fffe7,
0x3e00dfff,0x3e2006ff,0x7f5406ff,0x04ffffff,0x80bfff10,0x0003fffd,
0x23fff900,0xf902fffc,0x37fdc3ff,0xf96fff88,0x3ff203ff,0xfff1003f,
0x13ffeadf,0x201fffc8,0x0005fffb,0x07fffb00,0x2ffff800,0x3fe7ffff,
0xffff886f,0x06fff803,0x01bffe20,0x00d6ffcc,0x017ffe20,0x0007fffb,
0x47fff200,0xf302fffc,0x1fff49ff,0xf96fff88,0x3ff203ff,0x3fee003f,
0x4fffabff,0x807fff20,0x0005fffb,0x07fffb00,0x7fffc400,0x837ffc01,
0x401ffffb,0x22006fff,0xf9006fff,0xf100019f,0xffd80bff,0x9000003f,
0x3ff23fff,0x5bffa02f,0xf100fff9,0x3fff2dff,0x07fff901,0xcffffd80,
0x3f204fff,0x3fee01ff,0xb000005f,0x40007fff,0x400ffffa,0x3fa06fff,
0x7ffc06ff,0x3ffe2006,0xffffd006,0x7fc4001b,0x7ffec05f,0xf9000003,
0x3fff23ff,0x27fff202,0x3e205ffc,0x3fff96ff,0x00ffff20,0xffffff10,
0x7fe409ff,0x3ffee01f,0xfb000005,0x6c0007ff,0xff806fff,0x3ffe606f,
0x1bffe03f,0x06fff880,0x0fffea20,0x05fff880,0x001fffec,0x1fffc800,
0x4c05fff9,0x2ffebfff,0x65bffe20,0xff901fff,0xff70007f,0x409fffff,
0x2e01fffc,0x00005fff,0x007fffb0,0x13fffee0,0x901bffe0,0x3e03ffff,
0x3e2006ff,0xfd8006ff,0x3fe2007f,0x7ffec05f,0xf9000003,0x3fff23ff,
0x7ffff402,0x3fe200ff,0x03fff96f,0x000ffff2,0x7fffffec,0x07fff204,
0x005fffb8,0x7fffb000,0xfffda800,0xfff800ff,0x6fffe806,0x400dfff0,
0x1006fff8,0x00dfff73,0x202fffc4,0xeeeefffd,0xeeeeeeee,0xf901eeee,
0x3fff23ff,0x7fffe402,0x7ffc405f,0x203fff96,0x0003fffc,0x9ffffff1,
0x00fffe40,0x000bfff7,0x3bfff600,0xeeeeeeee,0xffffffee,0xdfff001f,
0x7ffff300,0x400dfff0,0x2606fff8,0xffffffff,0x3ffe2002,0x7fffec05,
0xffffffff,0x1fffffff,0x323fff90,0x7cc02fff,0x4402ffff,0xfff96fff,
0x0ffff203,0xffffb800,0x3fff204f,0x17ffee01,0x7fec0000,0xffffffff,
0xffffffff,0x3fe003ff,0xfff9006f,0x06fff83f,0x81bffe20,0xfffffff9,
0x7ffc4002,0x7fffec05,0xffffffff,0x1fffffff,0x323fff90,0xfe802fff,
0xff8807ff,0x03fff96f,0x000ffff2,0x09ffffb0,0x700fffe4,0x0000bfff,
0x3fffff60,0xffffffff,0x00cfffff,0x8037ffc0,0x7c6ffff8,0x3e2006ff,
0x332606ff,0x10002cce,0xfd80bfff,0xffffffff,0xffffffff,0xfff901ff,
0x00bfff23,0x2017fff2,0xff96fff8,0x3fff203f,0x7fc40003,0x3ff204ff,
0x3ffee01f,0xfb000005,0xffffffff,0x79bddfff,0x00000001,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x97100000,0x05991017,0x00000100,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x26000000,0x2a200999,0x7ffd400a,0x3ff22dff,
0x81322003,0x4c5ffff8,0xffffffff,0xffffffff,0x25ffffff,0x004ffffb,
0x3ffff600,0x3ffffa20,0x7fd40000,0x3ffe61ff,0xfff70007,0x3f2000ff,
0xfffff4ff,0xffffffff,0xffffffff,0x3f27ffff,0x800007ff,0x3fe1ffff,
0xffd103ff,0x7fffc405,0xffefffff,0x9ff7001f,0x2ffffc40,0x3fffffe6,
0xffffffff,0xffffffff,0x0fffff45,0x7ffdc000,0xffff983f,0x3fe20005,
0xffff83ff,0xfffd8001,0xfe8001ff,0xfffff2ff,0xffffffff,0xffffffff,
0x3e67ffff,0x00002fff,0xff1bffea,0xffd107ff,0x77fe405f,0xffffffca,
0xfff5005f,0x7fffc409,0x7ffffcc5,0xffffffff,0xffffffff,0x7fffcc5f,
0x7fc40006,0x3fee05ff,0xfd0003ff,0x3ff60bff,0xfff8003f,0x44003fff,
0x3ffe7fff,0xffffffff,0xffffffff,0x23ffffff,0x0005fffe,0xf0ffff60,
0xffb87fff,0x3fa02fff,0x7fff541f,0xfff5000d,0x7fffc409,0x777774c5,
0xeeeeeeee,0xfffeeeee,0xffffb84f,0x3ff60004,0x7ff400ff,0x7e4001ff,
0xff700fff,0xffa800bf,0x4005ffff,0x3b65fffa,0xeeeeeeee,0xeeeffffe,
0x2eeeeeee,0x003fffee,0x3fffe200,0xa9ffffc0,0x2fffffff,0x9880aaa0,
0x7ffd4000,0x3fffe204,0xe8800005,0xfd00ffff,0x50003fff,0x1005ffff,
0x400dffff,0x202ffffa,0x4007fff9,0x7ffdfffc,0x1fffe400,0x37ffd400,
0xffff8800,0xffb80002,0x0999985f,0xffb3bff9,0x00000005,0x8813ffea,
0x0005ffff,0x1ffffe80,0x1bfffe60,0xbffff100,0x7fffd400,0xffff8804,
0x0ffff804,0x2f7ffa00,0x3a002fff,0xa8001fff,0x20006fff,0x0005fffc,
0x002fffe8,0x2ffd8772,0x50000000,0x7c409fff,0x00005fff,0x01ffffec,
0x01ffffdc,0x01dfffb0,0x1ffffd80,0x037fff40,0x002fffd8,0xff17fff1,
0x3fe2009f,0xff50007f,0x7cc000df,0x20000fff,0x4007fff9,0x002ffd80,
0x157b9531,0x7fdccc00,0x220999cf,0x0005ffff,0x13ffff20,0x1ffffe80,
0x1ffffa80,0xfffe8800,0xffff900f,0x3ffee001,0x3fff7004,0x5401bffa,
0x50004fff,0x8000dfff,0x0003fffe,0x0013fff2,0x200bff60,0xfffffffc,
0x7fcc02ff,0xffffffff,0x027fffc3,0xffffb800,0x7ffcc006,0x7ffc406f,
0x3e60004f,0xffa85fff,0x3e6002ff,0xffb006ff,0x007ffe4d,0x0017ffe4,
0x006fffa8,0x037ffdc0,0x01ffff00,0x05ffb000,0x7fffffd4,0x0dffffff,
0xffffff30,0xff87ffff,0x980004ff,0x000fffff,0x03ffffb8,0x001bfff6,
0x8bffff20,0x004ffff8,0x800ffff8,0x3fea4fff,0xfffe802f,0xfff50000,
0xff88000d,0xfa8000ff,0xb00005ff,0x3fea05ff,0xfdcdefff,0x881fffff,
0xeffffeee,0x7fff42ee,0x7fc40003,0x20001fff,0xa80ffffe,0x0001ffff,
0x21ffffd0,0x0006fffd,0x9803fff9,0x3fe22fff,0x7ffc405f,0x3fea0006,
0xfd80006f,0xfd8003ff,0xb00002ff,0xfff105ff,0x3fee03df,0x7fd406ff,
0x7fff404f,0x7ff40003,0x4c0003ff,0xfe85ffff,0x200004ff,0xfbdffff9,
0x50000fff,0xfb807fff,0x3fff40ff,0x013ffea0,0x06fffa80,0x6fffa800,
0x3fffc400,0x5ffb0000,0x01bfffb0,0x03fffe98,0xb013ffea,0x40005fff,
0x004ffffc,0x5ffff700,0x0037ffe4,0x7fffdc00,0x0002ffff,0xd017ffe2,
0xfff70dff,0x0fffe403,0xdfff5000,0x3ffe0000,0x3fee001f,0x3600004f,
0x7ffd42ff,0xfff5000f,0x3ffea01f,0x0fffec04,0xffffa800,0x7f400006,
0xffff36ff,0x36000003,0x04ffffff,0x07ffe800,0x260fffe2,0x3fa03fff,
0x7d40007f,0x900006ff,0x74009fff,0x00001fff,0xffb0bff6,0xffe8007f,
0x9fff503f,0x01fffc80,0xfffff980,0x7cc00000,0xfffdbfff,0x22000003,
0x006fffff,0x03fff900,0x7c07ffea,0xfff106ff,0xffa8000b,0xf300006f,
0x3e600fff,0x400006ff,0x7ff42ffd,0x7fd4000f,0x9fff504f,0x00fffc80,
0x7ffff440,0xf7000001,0x0bffffff,0xff900000,0x20000bff,0xf903fffa,
0x7ffec0ff,0x03fffa80,0x37ffd400,0xfffd0000,0x5fff9005,0xffd80000,
0x0037ffc2,0xa837ffc4,0x7dc04fff,0x7ec000ff,0x00002fff,0x7fffff40,
0x4000000f,0x3ffffff9,0xfff88000,0x40bfff05,0xfc82fffb,0x540001ff,
0x00006fff,0x2017ffea,0x0000ffff,0xbfff3000,0x1fffe000,0x2027ffd4,
0x64007ffb,0x0004ffff,0xffff9800,0x4000002f,0xfffffff8,0xfe80001f,
0x2fff986f,0x213ffe20,0x80007ffe,0x0006fffa,0x203fffc0,0x0004fffa,
0x3ffea000,0xffff0004,0x09fff501,0x2007ffa8,0x005ffffa,0x3ff20000,
0x8000006f,0xfffefffd,0xfc80006f,0x7ffdc0ff,0x437ff400,0x80004fff,
0x0006fffa,0x017ffe40,0x2003fffb,0x3fe0aaaa,0xfff703ff,0x3ffa0009,
0x4fffa81f,0x803ffcc0,0x00effff9,0x3ee00000,0x000005ff,0x5cffffdc,
0x0004ffff,0x3617ffcc,0xffc806ff,0x0bffe60f,0x3ffea000,0x7cc00006,
0xfff105ff,0x7fffc00d,0x40ffffe3,0x0004fffa,0xf501ffff,0xff9809ff,
0xfffe8806,0x0000001f,0x002fffdc,0xffff3000,0x0ffffec7,0x13ffe000,
0xf5009fff,0x7ffdc3ff,0xffa80000,0xe800006f,0xffb80fff,0x3ffe003f,
0x0ffffe3f,0x002fffcc,0xa83fffc4,0x7c404fff,0xfffd806f,0x0000002f,
0x005fffb8,0xfffd1000,0xfffff88d,0x3ff60000,0x007ffea6,0xfd8fffe2,
0xf500006f,0x00000dff,0xfd07fff7,0x7fc001ff,0x3fffe3ff,0x0dfff103,
0x0ffff300,0x1013ffea,0xffc80bff,0x000004ff,0x0bfff700,0x3ff60000,
0xfffa80ff,0x3ee0005f,0x0fff90ff,0xff2fff40,0x2a00009f,0x00006fff,
0x446fff88,0x7c005fff,0x3ffe3fff,0x3fffe03f,0x7ffdc000,0x09fff505,
0x7d409ff0,0x00005fff,0x3ffee000,0xfb800005,0x3f602fff,0x30003fff,
0x3ffa3fff,0x5ffee005,0x0001fff9,0x00dfff50,0x3fff6000,0x007fff20,
0xfff17f40,0x7ffec05f,0x7fff4004,0x09fff502,0xffff3000,0x0000001d,
0x02fffdc0,0x3ffe6000,0x7ff4405f,0xff0000ff,0x07fff17f,0x547ffcc0,
0x200007ff,0x0006fffa,0x47fff500,0x10006ffe,0x7fff41ff,0x3fffe601,
0xffff7000,0x13ffe601,0xfffd1000,0x0000003f,0x05fffb80,0x7fff4000,
0xfff9800e,0xffb0006f,0x001fff5b,0xffcafff8,0x3ea00005,0x000006ff,
0x7fcdbffe,0xdf50003f,0x400fffc8,0x400efffc,0x204ffffa,0x0006fff9,
0x00ffffec,0x5c000000,0x00005fff,0x007ffff2,0x04ffffc8,0xfceffb80,
0xffd8006f,0x0003ffec,0x01bffea0,0xfffc8000,0x000fffb8,0x7dc5fe88,
0xfff8806f,0x7e440aff,0x7c406fff,0x41abdfff,0x3f21aaaa,0x00002fff,
0xfff70000,0x3ea0000b,0xe8003fff,0x4001ffff,0x4ffffff9,0xfeffb800,
0x200001ff,0x0006fffa,0x2fffe200,0x88005ffe,0x7fd40efe,0xffff5005,
0xffffddff,0xff001dff,0xf8bfffff,0xfff13fff,0xddddddff,0xdddddddd,
0x01dddddd,0x17ffee00,0x3ffe2000,0xff10006f,0xf8001fff,0x002fffff,
0x7fffff88,0x7fd40000,0x4000006f,0x2fffeffd,0x220bb000,0x362004ff,
0xffffffff,0x3000dfff,0x8dffffff,0xff13ffff,0xffffffff,0xffffffff,
0x3fffffff,0x3ffee000,0xffe80005,0x2e0000ff,0x4005ffff,0x00fffffc,
0x9ffffd00,0xffa80000,0x4000006f,0x07fffffa,0x15500200,0xfffd7000,
0x003bffff,0xfffffb30,0xf13ffff8,0xffffffff,0xffffffff,0xffffffff,
0x3fee0003,0x7e40005f,0x80002fff,0x003ffffd,0x017fffea,0x2ffffc80,
0x7fd40000,0x8000006f,0x004fffff,0x80000000,0x0009aba9,0xff013100,
0x3ffe27ff,0xffffffff,0xffffffff,0x01ffffff,0x0bfff700,0x7fffd400,
0xff100004,0x22001fff,0x0003ffff,0x003fffea,0xdfff5000,0xf9000000,
0x00001fff,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0xcb980000,0x5c199502,0xcccccccc,
0xcccccccc,0xddd53ccc,0xdddddddd,0xdddddddd,0x75c00ddd,0x000000ee,
0x4c400500,0x00accdcb,0x15e6dd44,0x6dd4c000,0x40001abc,0x01acdcba,
0x5e654c00,0x2666000a,0x04ccc000,0xfff90000,0x7ff439ff,0x3fffffa0,
0xffffffff,0x56ffffff,0x0b000003,0x007ffe40,0xcdba8800,0x00dfc82b,
0x3fffffea,0x4c1effff,0xffffffff,0x3a6000bf,0xffffffff,0x322003ff,
0xffffffff,0x7fdc002e,0x2fffffff,0x02fffc40,0x3e9fff30,0x3ff63fff,
0xffffb85f,0xfffeffff,0x7fffff47,0xffffffff,0x56ffffff,0x0b000003,
0x007ffe40,0x3fffea00,0xa8bfffff,0xffb106ff,0xffffffff,0x3fee3fff,
0xffffffff,0xffb800ef,0xffffffff,0x4c00dfff,0xffffffff,0x8805ffff,
0xfffffffd,0x100dffff,0x4c00bfff,0xffff4fff,0x42fffec7,0xffdacfff,
0x742fffff,0xffffffff,0xffffffff,0x00355fff,0x6400b000,0x10000fff,
0xfffffffb,0xffffffff,0xffffd101,0xffd999bd,0xffffdfff,0xfffd99bd,
0x7ff401df,0xedccdeff,0x204fffff,0xdefffffa,0x4fffffec,0x3ffffe60,
0xffffdcde,0xfff880ef,0x3ffe6005,0x6c7ffff4,0x7fc45fff,0x7fffe446,
0x99999883,0x99999999,0x50efffc9,0x0b000003,0x007ffe40,0x7ffffc40,
0xfffeccdf,0xff902fff,0x7f4c03df,0x02ffffff,0x20dfffd3,0x202ffffb,
0x80ffffd9,0x81effff8,0x02ffffc9,0x203dfffd,0x885ffff9,0x26005fff,
0xffff4fff,0x22fffec7,0x06601aa8,0x3fe60000,0x0006a1ff,0xfc801600,
0xfd8000ff,0xfd303fff,0x3fe05fff,0xfff5006f,0xfb001dff,0xfffd05ff,
0x3fffa003,0x0dfffd83,0x437ffdc0,0x8806fffb,0x7c41fffe,0x3e6005ff,
0x7ffff4ff,0x002fffec,0xd1000000,0x01a85fff,0x20058000,0x4000fffc,
0x401ffffa,0xa86ffffb,0x3e003fff,0x1002ffff,0xff98dfff,0x3fee005f,
0x7fffc44f,0x1fffd001,0x007fffc4,0x446fff98,0x26005fff,0xfffd4fff,
0x02fffe47,0xb0000000,0x03509fff,0x400b0000,0x2000fffc,0x402ffff8,
0x2ffffff9,0x0007f6dc,0x800bfffd,0x3260fffc,0x3ea001ed,0x7ffdc5ff,
0x3bfee005,0x00ffff21,0x443fffb0,0x26005fff,0xfffb4fff,0x9a7ffdc5,
0xccb98099,0x2a00001a,0x1a80ffff,0x26580000,0xc9999999,0x9999afff,
0x3fee0999,0x7ff4406f,0x0006fffc,0x00ffff60,0x003fff50,0x17ffe600,
0x8003fffb,0x03fffb00,0x23fffb80,0x2005fff8,0xff74fff9,0x97ffcc1f,
0x3ff23fff,0x02ffffff,0x7fffc400,0x00003502,0x3fffe6b0,0xffffffff,
0xffffffff,0x00bfff26,0xfff17ffb,0xb988000f,0x4002fffe,0x0003fff9,
0x2fffed44,0x0003fffe,0x007fff40,0x893ffe60,0x26005fff,0xfff54fff,
0xff1fff88,0x3ffff67f,0x04ffffff,0x17fff200,0x800001a8,0xffffff35,
0xffffffff,0x4dffffff,0x2e01fffd,0x3fff65ff,0xdb751000,0xdfffffff,
0xdddddddd,0x9fffdddd,0x3b2ea200,0x5fffffff,0x001fffe2,0xeeffff80,
0xeeeeeeee,0x25fffeee,0x2005fff8,0xff14fff9,0x7fcfff0d,0xdffffdcf,
0x4ffffffe,0xffff9800,0x00006a00,0x7fffcd60,0xffffffff,0xffffffff,
0x403fffa6,0x3f20eff9,0xfb7101ff,0xffffffff,0xffffffff,0xffffffff,
0x5c0dffff,0xfffffffe,0x25ffffff,0x0006fff8,0xffffff10,0xffffffff,
0x4dffffff,0x2005fff8,0x3fe4fff9,0x3fe6fd85,0x441dffff,0x007ffffa,
0x404fffd8,0x5800001a,0x99999991,0x999fffd9,0x7c799999,0xfff107ff,
0x82fffb83,0xfffffff9,0xffecefff,0xffffffff,0xffffffff,0xffffb87f,
0xdfffffff,0x3e65fffc,0x300006ff,0xffffffff,0xffffffff,0x7c4fffff,
0x3e6005ff,0x206aa4ff,0x3fffe1a9,0x7ffcc04f,0x3fe6002f,0x00d401ff,
0x9002c000,0x22001fff,0xffd06fff,0x87fff705,0xeffffffa,0x3ff60abd,
0xaaaaaabf,0xaaaaaaaa,0x7fffdc2a,0x21bcefff,0x3e25fff9,0x300006ff,
0x5555dfff,0x55555555,0x7c455555,0x3e6005ff,0x3e0004ff,0xf9006fff,
0x7e4009ff,0x01a805ff,0x20058000,0x2000fffc,0xffc87fff,0x45fff904,
0x0adffffa,0x00fffec0,0xffff5000,0xff98017d,0x03fffc5f,0x6fff8800,
0x7fc40000,0x3fea006f,0x02cc884f,0x400bfffe,0x2005fffa,0xa802ffff,
0x05800001,0x003fff20,0x7d47ffe8,0x3fff606f,0x013fff61,0x002fffd8,
0x37fff600,0xbfff5000,0x000fffe8,0x3ffe0d54,0x2200000f,0x2a006fff,
0xffb84fff,0x07fffe03,0x02fffcc0,0x007fffa8,0xb0000035,0x07ffe400,
0x23fffb00,0x3a00fff8,0x3ffe27ff,0x7fff4007,0x4d64c003,0x003fffe0,
0x6c5fffb8,0x22001fff,0x3ff66fff,0x4d44001f,0x006fff80,0x3613fff2,
0x3ffe01ff,0xfff1000f,0x3fff600b,0x00035003,0x7e400b00,0x3f2000ff,
0x05ffd3ff,0xf537ffc4,0x7cc00bff,0x64005fff,0xfff34fff,0xfffe800d,
0x02fffdc5,0x647fff70,0x64005fff,0x7ffc5fff,0x3fffa007,0x0cffff84,
0x2007fff8,0x8806fff8,0x5000ffff,0x0b000003,0x007ffe40,0xf9dfff50,
0xfffc809f,0x01fffea5,0x3fffffd8,0x1ffff100,0x003fffe6,0x22ffffe4,
0x001ffff8,0x7c41fffd,0xf1002fff,0xffe83fff,0xfffc803f,0x7f65444f,
0x37ffc0ff,0x0dfff100,0x00bfff90,0x400000d4,0x3fff2005,0x3ffe2000,
0x7c406fff,0x3fe22fff,0xffc802ff,0x403fffff,0x225fffe8,0xb804ffff,
0xb86fffff,0x6400efff,0xffb86fff,0x7f4401ff,0xfffc86ff,0x3ffee00f,
0x7ffc04ff,0x0037ffc3,0xf00dfff1,0x54003fff,0x05800001,0x003fff20,
0x1fffff70,0x27fff440,0x80f7fff4,0xfccfffea,0x540acfff,0x740ffffe,
0x9302ffff,0x0fffffff,0x02bffffa,0x01ffffb1,0x033ffffa,0x3ffffd93,
0x7dffff30,0x3fff2a21,0x3e604fff,0x37ffc5ff,0x0dfff100,0x006fffa8,
0x400000d4,0x0aaa6005,0x7ffff400,0x7ffd440c,0xfff980ef,0xfedcceff,
0x3fee1eff,0xffeeffff,0xf981ffff,0xecdeffff,0xfebfffff,0xfff980ff,
0xfffeefff,0x3a602fff,0xfeffffff,0x02ffffff,0x3ffffff6,0xe9ffffff,
0xdb9934ff,0xff85ffff,0x3fe2006f,0x7ffec06f,0x000d4003,0x00002c00,
0x3ffff600,0xfffeeeff,0x3ee01fff,0xffffffff,0xffa80dff,0xffffffff,
0x3fea01ef,0xffffffff,0x7fff70df,0x3ffff620,0x2fffffff,0xffffc880,
0xffffffff,0xffffc802,0xd1efffff,0x3ffee9ff,0xff84ffff,0x3fe2006f,
0x7fffc06f,0x000d4000,0xccc8ac00,0xcccccccc,0xcccccccc,0x7fffdc3c,
0xffffffff,0xd8801eff,0xceffffff,0x7ff64c02,0x002effff,0xffffffb1,
0xfff985df,0x7fff5406,0x8004ffff,0xffffffda,0x754003ff,0x0cefffff,
0x7fe53ffa,0xff01dfff,0x7fc400df,0x3ffe606f,0x001a8007,0xfff35800,
0xffffffff,0xffffffff,0x477fccdf,0xffffffd9,0x988002ef,0x200009ba,
0x00009ab9,0x00357531,0x2aea6000,0x75100001,0x30000135,0x31000157,
0x0dfff001,0x037ffc40,0x000bfff7,0xb0000035,0x3fffffe6,0xffffffff,
0x26ffffff,0x54c41ffa,0x000009ab,0x00000000,0x00000000,0x00000000,
0x00000000,0x801bffe0,0x3606fff8,0xa8004fff,0x35800001,0xffffffff,
0xffffffff,0x298dffff,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x4400dfff,0x3fa06fff,0xda8002ff,0xcccccccc,0xcccccccc,
0x0006cccc,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0xdfff0000,0x37ffc400,0x003ffff0,0x20000000,0x88888888,0x88888888,
0x88888888,0x3fffff20,0xffffffff,0xffffffff,0x0002ffff,0x00000000,
0x00000000,0x00000000,0xff000000,0x7fc400df,0xffff106f,0x00000001,
0xfffff900,0xffffffff,0xffffffff,0x3f25ffff,0xffffffff,0xffffffff,
0xffffffff,0x00000002,0x00000000,0x00000000,0x00000000,0x00dfff00,
0x9837ffc4,0x00006fff,0xff900000,0xffffffff,0xffffffff,0x5fffffff,
0x3bbbbbb2,0xeeeeeeee,0xeeeeeeee,0x00002eee,0x00000000,0x00000000,
0x00000000,0xfff00000,0x7ffc400d,0x0bfff506,0x00000000,0x3bbbbbae,
0xeeeeeeee,0xeeeeeeee,0x00001eee,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0xca980000,0x00009acd,0x2af72a62,
0x82666000,0x9980acb8,0x26200199,0x4ccc0999,0x0bcdb980,0x0abcb980,
0x00133310,0x4c426660,0x26620019,0x86662001,0xcb980999,0x999801ac,
0x99999999,0x09999999,0x0a200000,0x200ddd44,0xffffffb8,0x4000efff,
0xfffffffc,0x7fc402ff,0xfffff73f,0x7fffdc3b,0xdfffb002,0x7ec7fff0,
0x85ffffff,0xffffffd8,0x7fff883f,0x4fffb800,0x2005fff9,0x8802ffff,
0x3ffe5fff,0x3fffff23,0xff302fff,0xffffffff,0xffffffff,0xb300000b,
0xffff709f,0x3ffa03df,0xffffffff,0xffa803ff,0xffffffff,0xff100dff,
0xfffff57f,0xfffe81ff,0x7ffdc00f,0x8bfff81f,0xfffffffe,0x3ffa24ff,
0x5fffffff,0x002fffd8,0xfa8ffff4,0xff9804ff,0xffa804ff,0x6cfffe3f,
0xffffffff,0xfff984ff,0xffffffff,0x5fffffff,0xfd710000,0xfffc89ff,
0x6c2fffff,0xcccdffff,0x03fffffd,0x3bffffea,0xfffffdcd,0xbfff881f,
0x5fffffff,0x04ffff88,0x40ffffe6,0xfffecfff,0xfffffedf,0xdefffe8a,
0x41ffffff,0x2005fffa,0x7fc6fff8,0xfffc807f,0xfffc806f,0x3f73ffe0,
0xfffedfff,0x7fcc4fff,0xffffffff,0xffffeeff,0x7e4c0004,0x2a4fffff,
0xfd712dff,0x3bffea1f,0xdfffb100,0x3bfffe20,0xdffff701,0xffffff10,
0x205fb79f,0xd01ffffa,0x7fc0bfff,0x441dffff,0xfffffffd,0x6ffff983,
0x000ffff8,0xfd87fff7,0x7ff401ff,0x7fc00fff,0x7ffffc6f,0x7fd441df,
0x880007ff,0x0005fffe,0x3fffff6a,0x1ffa1dff,0xffc9ffcc,0x7ffc402f,
0xdfffd81f,0x7fff4c00,0x7ffffc43,0xfffd8005,0x0efffc86,0x17ffffe0,
0x3ffffff0,0x43fffd40,0xd002fffc,0xffb81fff,0x3ffe203f,0x3e602fff,
0x7fffc3ff,0x7ffcc04f,0x7ec0002f,0x44000eff,0xffffffeb,0x04ff80cf,
0x3fff57fa,0x43fffb80,0x000ffffa,0x441ffff5,0x000fffff,0x24ffff88,
0x401ffffa,0x400effff,0x804ffffc,0x7cc0fffe,0xff9805ff,0x5fff885f,
0x3fbffea0,0x3ffee04f,0x037fffc0,0x004fffc8,0x03ffff20,0xffffc980,
0x2202efff,0x5bf201ff,0x3000fffe,0x0ffff601,0x47fffd00,0x003ffff8,
0x27fffea0,0x803ffff8,0xa802ffff,0xd800ffff,0xffe81fff,0x7ffe400f,
0x40fffd02,0x6ffcdffc,0x3e1bffa0,0xf5002fff,0x2e000bff,0x5001ffff,
0xfffffffd,0x13fe0039,0xfff75fe8,0xfe80003d,0x7d4000ff,0x3ffe24ff,
0x7e40002f,0x5fffdeff,0x03ffff00,0x00ffff30,0x2e0bfff2,0x7fc03fff,
0x3ffee07f,0xf55ffd01,0xfff101ff,0x03ffff09,0x017ffe60,0x0bfffea0,
0xfffff710,0x80017dff,0x7ff307fe,0x3bffffe6,0xfff8001c,0xfff88006,
0x03fffe26,0x3fffa000,0xf000ffff,0x3e600fff,0xff7006ff,0xdfff105f,
0x027ffd40,0xf109fff3,0x5fff31ff,0xf03fff50,0x22001fff,0x4c005fff,
0x5c03ffff,0xdfffffff,0x3fe60001,0x1ffd712e,0x7fffffe4,0x4c00bdff,
0xf0005fff,0x7ffc4fff,0xff300007,0x4005ffff,0xf3007fff,0x3ee00bff,
0xfffb02ff,0x07fff601,0xf70dfff0,0x427ffcdf,0xfff07ffd,0x7ffc400f,
0x3ffe2006,0xfffc804f,0x00000bef,0xfffffff9,0xffff705f,0x7dffffff,
0x013ffea0,0x887fffc0,0x00006fff,0x013fffee,0x200dfff0,0x7004fff9,
0x3ea05fff,0xfff883ff,0x0fffc806,0xffb27fec,0x209fff0d,0x22006fff,
0xd1006fff,0x3200bfff,0x000cffff,0x7fffd400,0x3f6601ef,0xffffffff,
0x7ffdc0ef,0xfffd0004,0x01bffe23,0xffffc800,0x3ffe000e,0x9fff3006,
0x0bffee00,0xfa86fff8,0xffa803ff,0x517ffc2f,0x7fcc1fff,0x0dfff01f,
0x037ffc40,0x00efffe8,0xffffff90,0x4400003b,0x22001ab9,0xfffffeca,
0x3fea2fff,0xfff0004f,0x1bffe21f,0x7ffcc000,0x3e004fff,0xff3006ff,
0x3fee009f,0x3fff202f,0x007ffec1,0x3e64fff8,0x3ffe20ff,0xf81fff22,
0x3e2006ff,0xffd806ff,0x75c000ff,0xbeffffff,0x00000000,0x3fff6e20,
0x3ffe66ff,0xfff88005,0x01bffe27,0x3fffa200,0xf002ffff,0x3e600dff,
0xff7004ff,0x7ffcc05f,0x017ffe24,0x3ee7ffd8,0x25ffe86f,0x3fe05ffe,
0x3fe2006f,0x7ffe406f,0x3660001f,0xcfffffff,0x33330001,0x32200001,
0xff10ffff,0xff3000df,0x37ffc4ff,0x7ffec000,0x00ffffad,0x3006fff8,
0x2e009fff,0x7f402fff,0x0bffee7f,0xd1fffa80,0xfff909ff,0xf80bffe6,
0x3e2006ff,0x3fee06ff,0x100002ff,0xfffffff9,0x7fdc005d,0x353102ff,
0x3fffe200,0x003fffe3,0x44bfff70,0x40006fff,0xfb0ffffa,0xfff00bff,
0x3ffe600d,0x5fff7004,0xd1fffb80,0xf8800fff,0x2fff8bff,0xfb9fffa8,
0x3ffe00ff,0x3ffe2006,0x9ffff506,0x3ae00000,0xcfffffff,0x3fffe200,
0x09fff704,0xb1fffdc0,0xe8009fff,0x3fe22fff,0x3e20006f,0x3fe22fff,
0x7ffc03ff,0x9fff3006,0x0bffee00,0xf19fff10,0xfd0009ff,0x01fff3bf,
0xffb7fff1,0x06fff80b,0x21bffe20,0x005ffff9,0xffd98000,0x82dfffff,
0x2205fffb,0x3a006fff,0x3fe61fff,0xff7000ff,0x7ffc41ff,0x3ff60006,
0xffffa85f,0x01bffe00,0x8027ffcc,0xd802fffb,0x1fffbeff,0xcfffb800,
0x3ffa06ff,0x7c03fffe,0x3e2006ff,0x7ffc46ff,0x0000005f,0x7ffffe44,
0x77ffc4ff,0x27fff400,0x43fffd40,0x400efffc,0x444ffffa,0x70006fff,
0x3601ffff,0x3fe06fff,0xfff3006f,0x3ffee009,0xffffa802,0xf30006ff,
0x409fffff,0x0ffffffc,0x0037ffc0,0x744dfff1,0x0000efff,0x3faa0000,
0x3fea4fff,0xfffa801f,0xffd501df,0xffff109f,0xffc8815f,0xfff886ff,
0xfff98006,0x3ffe202f,0x0dfff03f,0x013ffe60,0x8017ffdc,0x03ffffff,
0x3ffffa00,0x3ffea02f,0xfff806ff,0x3ffe2006,0x2bffff66,0xaaaaaa99,
0x00aaaaaa,0x3ff66000,0x800fffa4,0xeffffffc,0x5fffffee,0x3ffffea0,
0xfffffeef,0xfff880ef,0xfffe8006,0xffffb805,0x006fff81,0x2009fff3,
0x9002fffb,0x001fffff,0x7ffffe40,0x7ffffc00,0x06fff803,0x45bffe20,
0xffffffff,0xffffffff,0x0002ffff,0x0004c880,0xffffff90,0x07ffffff,
0xfffffb10,0x1bffffff,0x01bffe20,0x01ffff90,0x21bfff60,0xf3006fff,
0x3ee009ff,0xff3002ff,0x98000bff,0xd806ffff,0xf800ffff,0x3e2006ff,
0xffff16ff,0xffffffff,0xffffffff,0x00000005,0x3ff22000,0x2defffff,
0x7fff5c00,0x401dffff,0x2006fff8,0x003ffff9,0xf13fffe2,0x3e600dff,
0xff7004ff,0x7ff4005f,0xff80002f,0xffb803ff,0xdfff006f,0xb7ffc400,
0xfffffff8,0xffffffff,0x002fffff,0x00000000,0x009baa98,0x35753000,
0x00000001,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x30000000,0x88000003,0x00140001,0x0002aaa8,
0x2e099910,0x039972cc,0x08009991,0x90000800,0x00003999,0x00019991,
0x8006aaa6,0x00aacba8,0x026aa660,0x0abb9880,0x00555540,0x00016fe4,
0x000ff440,0xd8004fb8,0xb00007ff,0xfff509ff,0x203ffea1,0xd9003ffe,
0x02f44001,0x01ffffc0,0x1fffe400,0x3fffee00,0x36603eff,0xcfffffff,
0x3fffaa00,0x5c00cfff,0x0dffffff,0x007ffff0,0x017dfff9,0x3fffa000,
0xdfffd911,0x13ffee17,0x00fffb00,0x81fff700,0x7ec3fff8,0x1fff985f,
0x0077fe40,0x002fff44,0x000ffffe,0x0fffff10,0x7ffffe40,0xf983ffff,
0xffffffff,0xffff706f,0x01ffffff,0x3ffffff6,0xfff81eff,0xfffc803f,
0x0001cfff,0x37ffffa2,0xffffffff,0x04ffffdf,0x003ffec0,0x20bffe60,
0xff986ffd,0x06ffd82f,0x03bfffe6,0x1ffffe88,0x0ffffe00,0xffff7000,
0xfff3005f,0xfffd5137,0x0beffe81,0x985fff93,0xda9bdfff,0xffb85fff,
0xfffcabdf,0x03ffff86,0xfffffd98,0x10002eff,0xfffffffd,0xffffffff,
0xfb0009ff,0xfe8000ff,0x2fffa86f,0x881fff90,0x3e604fff,0xe880efff,
0x4002ffff,0x0002eeed,0x37fffff4,0x4c2ffe40,0x3fe61fff,0x89ff901f,
0xffd06ffc,0x83fff88f,0x7fc2fff9,0x2e2003ff,0xffffffff,0x7ec4000c,
0xdbceffff,0x04fffffe,0x00fffb00,0x20fffe40,0x2205fff8,0xffc85fff,
0x3ffe601f,0x3ffa20ef,0x000002ff,0x5fffd400,0x01001fff,0x7103ffea,
0x22ffdc07,0xff701caa,0x206ffb8d,0x5fd06ffc,0x3ff6a000,0x01dfffff,
0x0bffff20,0x00ffffe4,0x007ffd80,0xb0bfff30,0xfb803fff,0x7ffc43ff,
0x3ffe600f,0xfffe88ef,0x0000002f,0xfd6ffd80,0x2a2000bf,0x22004ffe,
0x006ffdb9,0x7ec3ffd8,0x1ffe203f,0x00003fe2,0xffffff91,0xff8807df,
0x7fd400ff,0xffb0005f,0xffd1000f,0x4fffb81f,0x83fffd00,0x5405fffa,
0xffeeffff,0x999102ff,0x99999999,0x99999999,0x3ffe6079,0x001fff72,
0x03ffffb8,0x7fffee54,0x54006fff,0x7ff40fff,0x207ffc02,0x400006fa,
0xffffffea,0xfffb80cf,0x1fffb002,0x0fffb000,0x89fffb00,0x000ffff8,
0xfd0dfff5,0xffa805ff,0x02ffffff,0x3fffffe6,0xffffffff,0x06ffffff,
0x7fc4fff9,0x7fec004f,0xffd501df,0xffffffff,0x7ffdc00d,0x401fff85,
0x3fa21fff,0x93000005,0x7fffffff,0x2007ffc8,0x64c2fffa,0xfccccccc,
0xcccccfff,0x3fea2ccc,0x7ffec0ff,0x7ffec003,0x07fffcc4,0x3ffffea0,
0x7ffcc02f,0xffffffff,0xffffffff,0x4fff886f,0x0007ffe4,0x19fffd97,
0x67ffffcc,0x06ffa8ab,0x05fffd88,0xff805ffd,0x01dfd10f,0xeb880000,
0x7ec4ffff,0x3fe2005f,0x7fffdc3f,0xffffffff,0xffffffff,0x513fffa4,
0x5000ffff,0xfe81ffff,0x7f4404ff,0x4c00ffff,0xffffffff,0xffffffff,
0xfb86ffff,0x7ffcc1ff,0xffd10003,0x8177fec7,0x74c06ffb,0x3f603fff,
0x1ffe202f,0x000000bb,0x27fffdc4,0x88017ffa,0x7fdc3fff,0xffffffff,
0xffffffff,0x3ffea4ff,0x1fffec0f,0x0ffff600,0x401ffff3,0xffffffe8,
0x0000000e,0xd06fff80,0x5c000dff,0x0fffa6ff,0x2a06ffd8,0x6401ffff,
0x3fee05ff,0x00000046,0xfffffd98,0x037fec4f,0xb85fff30,0xffffffff,
0xffffffff,0x7e44ffff,0x7ffc44ff,0xfff5000f,0x05fffd0b,0x7fffff44,
0x0000efff,0x3fea0000,0x5fff502f,0x900cba88,0x27ff4fff,0x706fffb8,
0x3001dfff,0xfd103fff,0x0000009f,0xfffffeb8,0x7fdc0bef,0xfff9001f,
0xfffb0003,0x3fffa000,0x027ffd40,0x540fffe8,0x3a204fff,0xff9affff,
0x50000eff,0xe8003555,0x7ffc07ff,0xf04fff86,0x7ffe4dff,0xffff950a,
0x0bfff70d,0x9bfffd80,0x007ffea8,0xff930000,0x05bfffff,0x4037ffc4,
0x0006fff9,0x2000fffb,0xfd85fff9,0x7fdc01ff,0x77ffc43f,0xffffd100,
0x77fffcc5,0xffff8000,0x3ffe6003,0x0fffe404,0x26b7fff2,0x223ffffc,
0xffffffff,0x7d47ffcf,0xcccccfff,0x7fc40ccc,0xffffffff,0x54000002,
0xfffffffd,0xfffb001c,0x3ffa601b,0xffb0002f,0x7fdc000f,0x2fffc41f,
0x90bfff10,0x3a203fff,0xf982ffff,0x4000efff,0x2003ffff,0x4401fffd,
0xffd85fff,0x4fffffff,0xffffffa8,0x745ffb1e,0xffffffff,0xd880ffff,
0x1effffff,0xf7100000,0x7dffffff,0xfffc8001,0xfda9abff,0x0002ffff,
0x8000fffb,0xffa86ffe,0x1fff902f,0x104fff88,0x405ffffd,0x00effffa,
0x00ffffe0,0x8037ffc4,0xfb80fffd,0x02efffff,0x260de654,0xffff31aa,
0xffffffff,0x6edd401f,0x3000002c,0xfffffffb,0x3f20005b,0xffffffff,
0xffffffff,0x7ffd8002,0x7ffc4000,0x986ffd82,0xffd82fff,0x3fffa206,
0xffffa802,0x3fffe000,0x5fff9003,0x13ffea00,0x0009a998,0x00000000,
0x70000000,0x9fffffff,0x7fe40003,0xffffffff,0xffffffff,0x7fec002f,
0xffb80007,0x43fff887,0xff985ffd,0x17f4401f,0x001ff500,0x00000000,
0x00000000,0x00000000,0xff900000,0x00017dff,0x73ffff88,0x5dffffff,
0x0017fff6,0x0000fffb,0x3ea0fff6,0x1dff50ff,0x2007ffd0,0x00980028,
0xc8000000,0x332600cc,0xcccccccc,0xcccccccc,0x999932cc,0x99999999,
0x99999999,0x00019805,0x80666660,0x0002dffc,0x441ffcc0,0xefd809a9,
0x3ffec000,0x2aa88000,0x2aa35550,0x02aa881a,0x00000000,0x3fe00000,
0x3ffee00f,0xffffffff,0xffffffff,0xfffff74f,0xffffffff,0x9fffffff,
0xfffffd70,0x87620039,0x703ffffb,0x40000039,0x06400039,0x02f76400,
0x00000000,0x00000000,0x80000000,0x7fdc07fe,0xffffffff,0xffffffff,
0xffff74ff,0xffffffff,0xffffffff,0x7ffff449,0x0befffff,0xfc83fd30,
0x000007ff,0x00000000,0x00000000,0x00000000,0x00000000,0xdfb01000,
0x7fffdc10,0xffffffff,0xffffffff,0xffffff74,0xffffffff,0x29ffffff,
0xfffffff8,0xdfffffff,0x1fffecab,0x003fffd8,0x00000000,0x00000000,
0x00000000,0x00000000,0xee800000,0x6d4df90b,0x3333310f,0x33333333,
0x9fff3333,0x26666662,0x99999999,0x10999999,0xffdfffff,0xffffffff,
0x03ffffff,0x000dffd1,0x00000000,0x00000000,0x00000000,0x00000000,
0xff880000,0xebdfdcff,0x00002fff,0x00027ffc,0x56ffc400,0x3fffae20,
0xffffffff,0x5fff300d,0x00000000,0x00000000,0x00000000,0x00000000,
0x40000000,0xfffffffa,0x04ffffff,0x27ffc000,0x7c400000,0xfffd9804,
0x803fffff,0x00005ffa,0x00000000,0x00000000,0x00000000,0x00000000,
0x6dd44000,0xacefffff,0xff800000,0x8000004f,0x65440028,0x0000acdd,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x005fffc8,
0x4fff8000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0xc8000000,0x005ffdff,0x27ffc000,0x4c400000,0x4ccc4099,
0x99999950,0x00399999,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x3ff6dff7,0x3e000005,0xdddd54ff,0xdddddddd,0xdddddddd,
0x70bfff27,0x3fee9fff,0xffffffff,0x0000003f,0x00000000,0x00000000,
0x00000000,0x00000000,0x7ffcc000,0x009fff12,0x53ffe000,0xfffffffb,
0xffffffff,0xf94fffff,0xfffb85ff,0xffffff74,0x007fffff,0x00000000,
0x00000000,0x00000000,0x00000000,0x80000000,0x7fdc5ffa,0xff000004,
0x3fffee9f,0xffffffff,0xffffffff,0xb85fff94,0xfff74fff,0xffffffff,
0x00000007,0x00000000,0x00000000,0x00000000,0x00000000,0xb01d3000,
0x74000005,0xdddd53ee,0xdddddddd,0xdddddddd,0x70bfff27,0x2aa69fff,
0xaaaaaaaa,0x0000001a,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x04ccc400,0x00026662,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,
};
static signed short stb__arial_50_latin1_x[224]={ 0,3,2,0,1,2,1,1,2,2,1,2,3,1,
4,0,1,4,1,1,0,1,1,2,1,1,4,3,2,2,2,1,2,-1,3,2,3,3,3,2,3,4,1,3,
3,3,3,2,3,1,3,2,1,3,0,0,0,0,0,3,0,0,1,-1,1,1,2,1,1,1,0,1,2,2,
-3,2,2,2,2,1,2,1,2,1,0,2,0,0,0,0,0,1,4,1,1,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,5,2,0,1,-1,
4,1,1,0,1,2,2,1,0,-1,2,1,0,0,4,3,0,4,2,2,0,3,2,2,0,3,-1,-1,-1,-1,
-1,-1,0,2,3,3,3,3,1,3,-1,0,-1,3,2,2,2,2,2,3,1,3,3,3,3,0,3,3,1,1,
1,1,1,1,1,1,1,1,1,1,0,4,-1,0,1,2,1,1,1,1,1,1,2,2,2,2,2,0,2,0,
};
static signed short stb__arial_50_latin1_y[224]={ 40,7,7,7,5,7,7,7,7,7,7,13,35,26,
35,7,7,7,7,7,7,8,7,8,7,7,16,16,13,17,13,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,46,7,16,7,16,7,16,7,16,7,7,
7,7,7,16,16,16,16,16,16,16,8,16,16,16,16,16,16,7,7,7,20,12,12,12,12,12,12,12,12,12,
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,40,16,7,7,13,7,
7,7,7,7,7,18,17,26,7,2,7,13,7,7,7,16,7,21,39,7,7,18,7,7,7,16,-1,-1,-1,0,
1,1,7,7,-1,-1,-1,1,-1,-1,-1,1,7,0,-1,-1,-1,0,1,14,6,-1,-1,-1,1,-1,7,7,7,7,
7,8,7,6,16,16,7,7,7,7,7,7,7,7,7,8,7,7,7,8,7,15,15,7,7,7,7,7,7,7,
};
static unsigned short stb__arial_50_latin1_w[224]={ 0,6,12,25,22,36,28,6,12,12,15,22,6,13,
5,13,22,13,22,22,23,23,22,21,22,22,5,6,22,22,22,22,42,31,25,29,27,25,23,31,26,5,18,27,
21,31,26,31,25,33,29,26,26,26,30,42,30,30,27,9,13,10,19,27,10,22,22,21,21,23,14,21,20,5,
10,21,5,33,20,23,22,21,14,20,13,20,22,32,23,22,22,13,4,13,24,23,23,23,23,23,23,23,23,23,
23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,0,5,21,24,23,26,
4,22,13,34,15,20,22,13,34,27,13,22,15,15,9,20,25,5,10,9,16,19,35,35,37,22,31,31,31,31,
31,31,43,29,25,25,25,25,9,9,15,13,31,26,31,31,31,31,31,20,33,26,26,26,26,30,25,23,22,22,
22,22,22,22,37,21,23,23,23,23,9,9,15,13,23,20,23,23,23,23,23,22,23,20,20,20,20,22,22,22,
};
static unsigned short stb__arial_50_latin1_h[224]={ 0,33,13,34,40,35,34,13,43,43,15,22,12,5,
5,34,34,33,33,34,33,33,34,32,34,34,24,31,23,14,23,33,43,33,33,34,33,33,33,34,33,33,34,33,
33,33,33,34,33,36,33,34,33,34,33,33,33,33,33,42,34,42,18,3,7,25,34,25,34,25,33,34,33,33,
43,33,33,24,24,25,33,33,24,25,33,25,24,24,24,34,24,43,43,43,8,28,28,28,28,28,28,28,28,28,
28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,33,42,34,22,33,
43,43,6,34,17,21,14,5,34,4,13,27,17,18,7,33,42,6,11,17,17,21,35,35,35,34,41,41,41,40,
39,39,33,43,41,41,41,39,41,41,41,39,33,40,42,42,42,41,40,20,36,42,42,42,40,41,33,34,34,34,
34,33,34,35,25,33,34,34,34,34,33,33,33,33,34,32,34,34,34,33,34,19,27,34,34,34,34,43,42,43,
};
static unsigned short stb__arial_50_latin1_s[224]={ 255,39,243,47,11,202,168,244,24,60,156,
48,241,232,248,239,1,242,104,102,127,227,184,22,28,51,250,237,219,195,1,
83,131,72,224,49,1,230,29,195,106,248,153,201,81,113,155,125,198,1,53,
1,179,157,206,136,105,74,46,218,241,228,156,96,243,153,172,176,131,198,66,
109,23,249,188,1,229,85,175,22,155,133,46,1,25,222,119,142,61,79,196,
174,213,199,218,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,
44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,255,249,28,
24,24,1,126,103,218,74,192,71,172,232,207,68,242,68,208,176,242,151,50,
249,243,244,224,92,105,69,164,73,33,91,123,120,192,224,28,73,155,65,212,
152,238,1,239,178,198,61,76,108,140,1,88,112,35,172,199,1,34,181,172,
25,49,197,24,178,1,141,115,44,207,120,144,231,103,145,182,235,159,1,114,
96,1,1,183,133,91,72,93,138,220,37,226,1, };
static unsigned short stb__arial_50_latin1_t[224]={ 1,451,485,244,130,172,244,469,1,1,563,
544,544,572,122,172,279,279,349,279,349,314,279,485,314,314,417,451,518,563,544,
383,1,349,417,279,383,349,383,314,383,88,314,383,417,417,417,279,417,172,383,
314,451,279,451,451,451,451,451,1,244,1,544,513,563,485,314,485,314,485,417,
314,417,383,1,417,383,518,518,518,383,383,518,518,451,485,518,518,518,279,518,
1,1,1,563,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,1,45,45,
279,544,349,1,1,572,314,544,544,563,572,279,513,518,485,544,544,532,349,45,
79,499,451,544,544,172,172,172,244,88,88,88,130,130,130,349,1,88,88,88,
130,88,130,1,130,349,130,45,45,45,88,130,544,172,45,45,45,130,88,349,
209,209,244,244,383,244,172,485,417,209,244,244,209,417,417,417,383,209,485,209,
244,209,451,209,544,485,209,209,209,244,1,45,1, };
static unsigned short stb__arial_50_latin1_a[224]={ 199,199,254,398,398,637,478,137,
238,238,279,418,199,238,199,199,398,398,398,398,398,398,398,398,
398,398,199,199,418,418,418,398,727,478,478,517,517,478,437,557,
517,199,358,478,398,597,517,557,478,557,517,478,437,517,478,676,
478,478,437,199,199,199,336,398,238,398,398,358,398,398,199,398,
398,159,159,358,159,597,398,398,398,398,238,358,199,398,358,517,
358,358,358,239,186,239,418,537,537,537,537,537,537,537,537,537,
537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
537,537,537,537,537,537,537,537,199,238,398,398,398,398,186,398,
238,528,265,398,418,238,528,395,286,393,238,238,238,413,385,199,
238,238,262,398,597,597,597,437,478,478,478,478,478,478,716,517,
478,478,478,478,199,199,199,199,517,517,557,557,557,557,557,418,
557,517,517,517,517,478,478,437,398,398,398,398,398,398,637,358,
398,398,398,398,199,199,199,199,398,398,398,398,398,398,398,393,
437,398,398,398,398,358,398,358, };
// Call this function with
// font: NULL or array length
// data: NULL or specified size
// height: STB_FONT_arial_50_latin1_BITMAP_HEIGHT or STB_FONT_arial_50_latin1_BITMAP_HEIGHT_POW2
// return value: spacing between lines
static void stb_font_arial_50_latin1(stb_fontchar font[STB_FONT_arial_50_latin1_NUM_CHARS],
unsigned char data[STB_FONT_arial_50_latin1_BITMAP_HEIGHT][STB_FONT_arial_50_latin1_BITMAP_WIDTH],
int height)
{
int i,j;
if (data != 0) {
unsigned int *bits = stb__arial_50_latin1_pixels;
unsigned int bitpack = *bits++, numbits = 32;
for (i=0; i < STB_FONT_arial_50_latin1_BITMAP_WIDTH*height; ++i)
data[0][i] = 0; // zero entire bitmap
for (j=1; j < STB_FONT_arial_50_latin1_BITMAP_HEIGHT-1; ++j) {
for (i=1; i < STB_FONT_arial_50_latin1_BITMAP_WIDTH-1; ++i) {
unsigned int value;
if (numbits==0) bitpack = *bits++, numbits=32;
value = bitpack & 1;
bitpack >>= 1, --numbits;
if (value) {
if (numbits < 3) bitpack = *bits++, numbits = 32;
data[j][i] = (bitpack & 7) * 0x20 + 0x1f;
bitpack >>= 3, numbits -= 3;
} else {
data[j][i] = 0;
}
}
}
}
// build font description
if (font != 0) {
float recip_width = 1.0f / STB_FONT_arial_50_latin1_BITMAP_WIDTH;
float recip_height = 1.0f / height;
for (i=0; i < STB_FONT_arial_50_latin1_NUM_CHARS; ++i) {
// pad characters so they bilerp from empty space around each character
font[i].s0 = (stb__arial_50_latin1_s[i]) * recip_width;
font[i].t0 = (stb__arial_50_latin1_t[i]) * recip_height;
font[i].s1 = (stb__arial_50_latin1_s[i] + stb__arial_50_latin1_w[i]) * recip_width;
font[i].t1 = (stb__arial_50_latin1_t[i] + stb__arial_50_latin1_h[i]) * recip_height;
font[i].x0 = stb__arial_50_latin1_x[i];
font[i].y0 = stb__arial_50_latin1_y[i];
font[i].x1 = stb__arial_50_latin1_x[i] + stb__arial_50_latin1_w[i];
font[i].y1 = stb__arial_50_latin1_y[i] + stb__arial_50_latin1_h[i];
font[i].advance_int = (stb__arial_50_latin1_a[i]+8)>>4;
font[i].s0f = (stb__arial_50_latin1_s[i] - 0.5f) * recip_width;
font[i].t0f = (stb__arial_50_latin1_t[i] - 0.5f) * recip_height;
font[i].s1f = (stb__arial_50_latin1_s[i] + stb__arial_50_latin1_w[i] + 0.5f) * recip_width;
font[i].t1f = (stb__arial_50_latin1_t[i] + stb__arial_50_latin1_h[i] + 0.5f) * recip_height;
font[i].x0f = stb__arial_50_latin1_x[i] - 0.5f;
font[i].y0f = stb__arial_50_latin1_y[i] - 0.5f;
font[i].x1f = stb__arial_50_latin1_x[i] + stb__arial_50_latin1_w[i] + 0.5f;
font[i].y1f = stb__arial_50_latin1_y[i] + stb__arial_50_latin1_h[i] + 0.5f;
font[i].advance = stb__arial_50_latin1_a[i]/16.0f;
}
}
}
#ifndef STB_SOMEFONT_CREATE
#define STB_SOMEFONT_CREATE stb_font_arial_50_latin1
#define STB_SOMEFONT_BITMAP_WIDTH STB_FONT_arial_50_latin1_BITMAP_WIDTH
#define STB_SOMEFONT_BITMAP_HEIGHT STB_FONT_arial_50_latin1_BITMAP_HEIGHT
#define STB_SOMEFONT_BITMAP_HEIGHT_POW2 STB_FONT_arial_50_latin1_BITMAP_HEIGHT_POW2
#define STB_SOMEFONT_FIRST_CHAR STB_FONT_arial_50_latin1_FIRST_CHAR
#define STB_SOMEFONT_NUM_CHARS STB_FONT_arial_50_latin1_NUM_CHARS
#define STB_SOMEFONT_LINE_SPACING STB_FONT_arial_50_latin1_LINE_SPACING
#endif
| 69.768951 | 115 | 0.816283 |
69cf159f7d5b64cc24ca1479796d1679dc4f0c94 | 6,136 | cpp | C++ | Plugins/uPacketDivision/uPacketDivision/Assembler.cpp | hecomi/uPacketDivision | 264a9dbe77a03f8534c2e087d7b33143478c6822 | [
"MIT"
] | 4 | 2021-11-28T23:54:15.000Z | 2022-02-20T10:50:28.000Z | Plugins/uPacketDivision/uPacketDivision/Assembler.cpp | hecomi/uPacketDivision | 264a9dbe77a03f8534c2e087d7b33143478c6822 | [
"MIT"
] | null | null | null | Plugins/uPacketDivision/uPacketDivision/Assembler.cpp | hecomi/uPacketDivision | 264a9dbe77a03f8534c2e087d7b33143478c6822 | [
"MIT"
] | null | null | null | #include <chrono>
#include <algorithm>
#include "Assembler.h"
#include "Log.h"
namespace uPacketDivision
{
void Frame::AddChunkData(const void *pData, uint32_t)
{
const auto &header = *reinterpret_cast<const PacketHeader*>(pData);
if (header.version != GetPacketHeaderVersion())
{
DebugLog("Packet version (%u) is wrong.", header.version);
return;
}
if (header.type != static_cast<uint32_t>(PacketType::Chunk))
{
DebugLog("Packet type (%u) is wrong.", header.type);
return;
}
if (!buf_)
{
Initialize(header);
}
if (header.chunkCount != chunkCount_ ||
header.timestamp != timestamp_ ||
header.totalSize != totalSize_ ||
header.chunkIndex > chunkCount_)
{
DebugLog("Detected a wrong packet (count: %u / %u, time: %u / %u, size: %u / %u, index: %u).",
header.chunkCount, chunkCount_,
header.timestamp, timestamp_,
header.totalSize, totalSize_,
header.chunkIndex);
return;
}
bool &flag = receivedChunkIndices_.at(header.chunkIndex);
if (flag)
{
DebugLog("Received a same chunkIndex data.");
return;
}
flag = true;
const auto offset = header.offsetSize;
if (offset + header.chunkSize > totalSize_)
{
DebugLog("Received data exceeds the buffer size.");
return;
}
auto *pDst = buf_.get() + offset;
const auto *pSrc = reinterpret_cast<const char*>(pData) + sizeof(PacketHeader);
memcpy(pDst, pSrc, header.chunkSize);
receivedSize_ += header.chunkSize;
}
bool Frame::IsCompleted() const
{
if (receivedChunkIndices_.empty()) return false;
for (const auto &pair : receivedChunkIndices_)
{
if (!pair.second) return false;
}
if (receivedSize_ != totalSize_)
{
DebugLog("Receive size is wrong.");
return false;
}
return true;
}
void Frame::Initialize(const PacketHeader &header)
{
totalSize_ = header.totalSize;
timestamp_ = header.timestamp;
chunkCount_ = header.chunkCount;
for (uint32_t i = 0; i < chunkCount_; ++i)
{
receivedChunkIndices_.emplace(i, false);
}
buf_ = std::make_unique<char[]>(totalSize_);
}
// ---
void Assembler::AddChunkData(const void* pData, uint32_t size)
{
constexpr uint32_t headerSize = sizeof(PacketHeader);
if (size < headerSize)
{
DebugLog("Received data size (%u) is smaller than header (%u).",
size, headerSize);
return;
}
const auto &header = *reinterpret_cast<const PacketHeader*>(pData);
if (header.version != GetPacketHeaderVersion())
{
DebugLog("Packet version is wrong.");
return;
}
if (header.chunkSize + headerSize != size)
{
DebugLog("Packet size is wrong (size: %u, chunk: %u, header: %u).",
size, header.chunkSize, headerSize);
return;
}
if (header.type != static_cast<uint32_t>(PacketType::Chunk))
{
DebugLog("Header type is not supported (%u).", header.type);
return;
}
const auto index = header.frameIndex;
if (index > latestFrameIndex_ || latestFrameIndex_ == -1)
{
latestFrameIndex_ = index;
latestTimestamp_ = header.timestamp;
}
if (oldestFrameIndex_ == -1)
{
oldestFrameIndex_ = index;
}
auto it = frames_.find(index);
if (it == frames_.end())
{
auto frame = std::make_unique<Frame>();
frame->AddChunkData(pData, size);
frames_.emplace(index, std::move(frame));
}
else
{
const auto &frame = it->second;
frame->AddChunkData(pData, size);
}
CheckAll();
}
void Assembler::CheckAll()
{
using namespace std::chrono;
eventType_ = EventType::None;
lossType_ = LossType::None;
if (frames_.empty()) return;
auto it = frames_.find(oldestFrameIndex_);
if (it == frames_.end())
{
DebugLog("packet loss.");
eventType_ = EventType::PacketLoss;
lossType_ = LossType::NotReceived;
if (latestFrameIndex_ > oldestFrameIndex_)
{
++oldestFrameIndex_;
}
return;
}
const auto &packet = it->second;
if (packet->IsCompleted())
{
assembledFrameIndices_.push_back(oldestFrameIndex_);
eventType_ = EventType::FrameCompleted;
++oldestFrameIndex_;
}
else
{
const auto dt = latestTimestamp_ - packet->GetTimestamp();
if (dt > timeout_)
{
DebugLog("packet timeout (> %u ms, %u / %u).",
timeout_, packet->GetReceivedSize(), packet->GetTotalSize());
eventType_ = EventType::PacketLoss;
lossType_ = LossType::Timeout;
frames_.erase(oldestFrameIndex_);
if (latestFrameIndex_ > oldestFrameIndex_)
{
++oldestFrameIndex_;
}
return;
}
}
}
uint64_t Assembler::GetAssembledFrameIndex() const
{
return !assembledFrameIndices_.empty() ?
*assembledFrameIndices_.begin() :
-1;
}
const char * Assembler::GetFrameData(uint64_t index) const
{
const auto it = frames_.find(index);
return (it != frames_.end()) ?
it->second->GetData() :
nullptr;
}
uint32_t Assembler::GetFrameSize(uint64_t index) const
{
const auto it = frames_.find(index);
return (it != frames_.end()) ?
it->second->GetTotalSize() :
0;
}
void Assembler::RemoveFrame(uint64_t index)
{
const auto it = frames_.find(index);
if (it != frames_.end())
{
frames_.erase(it);
}
auto &indices = assembledFrameIndices_;
indices.erase(
std::remove(indices.begin(), indices.end(), index),
indices.end());
}
} | 23.330798 | 103 | 0.564211 |
69d86305d9ebc709378d6fa463a2778b4555147f | 671 | hpp | C++ | incs/Borders.hpp | paribro/hydrodynamic-simulator | 63f16099a4b60bd6240d2c7a6950009637197382 | [
"MIT"
] | 2 | 2020-08-12T11:41:04.000Z | 2021-02-20T20:02:44.000Z | incs/Borders.hpp | prdbrg/hydrodynamic-simulator | 63f16099a4b60bd6240d2c7a6950009637197382 | [
"MIT"
] | null | null | null | incs/Borders.hpp | prdbrg/hydrodynamic-simulator | 63f16099a4b60bd6240d2c7a6950009637197382 | [
"MIT"
] | null | null | null | #ifndef BORDERS_CLASS_HPP
# define BORDERS_CLASS_HPP
# include <glm/glm.hpp>
# include <Define.hpp>
# include <AModule.hpp>
class Borders: public AModule
{
public:
Borders(Model & model);
~Borders(void);
private:
Borders(void);
Borders(Borders const & model);
Borders & operator=(Borders const & rhs);
void assignVertices(GLfloat x, int y, GLfloat z);
void assignNormals(GLfloat x, GLfloat y, GLfloat z);
void createVertices(void);
void createColors(void);
void createElements(void);
void createNormals(void);
GLfloat _bordersTop;
GLfloat * _terrainVertices;
GLfloat _thickness;
};
#endif /* ! BORDERS_CLASS_HPP */
| 20.96875 | 56 | 0.700447 |
69d8aab470b3a352c977d76a1eaee5315661a965 | 2,141 | cpp | C++ | Code/Client/ClientUI/Source/ZlibUtil.cpp | MarvinGeng/TinyIM | 01c1c2e257e85caf8afa5ac5ecc4d5295fb0d710 | [
"MIT"
] | null | null | null | Code/Client/ClientUI/Source/ZlibUtil.cpp | MarvinGeng/TinyIM | 01c1c2e257e85caf8afa5ac5ecc4d5295fb0d710 | [
"MIT"
] | null | null | null | Code/Client/ClientUI/Source/ZlibUtil.cpp | MarvinGeng/TinyIM | 01c1c2e257e85caf8afa5ac5ecc4d5295fb0d710 | [
"MIT"
] | 1 | 2022-01-15T03:18:26.000Z | 2022-01-15T03:18:26.000Z | /*
* 压缩工具类,ZlibUtil.cpp
* zhangyl 2018.03.09
*/
#include "stdafx.h"
#include "../zlib1.2.11/zlib.h"
#include <string.h>
#include "ZlibUtil.h"
//最大支持压缩10M
#define MAX_COMPRESS_BUF_SIZE 10*1024*1024
bool ZlibUtil::CompressBuf(const char* pSrcBuf, size_t nSrcBufLength, char* pDestBuf, size_t& nDestBufLength)
{
if (pSrcBuf == NULL || nSrcBufLength == 0 || nSrcBufLength > MAX_COMPRESS_BUF_SIZE || pDestBuf == NULL)
return false;
//计算缓冲区大小,并为其分配内存
//压缩后的长度是不会超过nDestBufLength的
nDestBufLength = compressBound(nSrcBufLength);
//压缩
int ret = compress((Bytef*)pDestBuf, (uLongf*)&nDestBufLength, (const Bytef*)pSrcBuf, nSrcBufLength);
if (ret != Z_OK)
return false;
return true;
}
bool ZlibUtil::CompressBuf(const std::string& strSrcBuf, std::string& strDestBuf)
{
if (strSrcBuf.empty())
return false;
int nSrcLength = strSrcBuf.length();
if (nSrcLength > MAX_COMPRESS_BUF_SIZE)
return false;
int nDestBufLength = compressBound(nSrcLength);
if (nDestBufLength <= 0)
return false;
char* pDestBuf = new char[nDestBufLength];
memset(pDestBuf, 0, nDestBufLength * sizeof(char));
//压缩
int ret = compress((Bytef*)pDestBuf, (uLongf*)&nDestBufLength, (const Bytef*)strSrcBuf.c_str(), nSrcLength);
if (ret != Z_OK)
{
delete[] pDestBuf;
return false;
}
strDestBuf.append(pDestBuf, nDestBufLength);
delete[] pDestBuf;
return true;
}
bool ZlibUtil::UncompressBuf(const std::string& strSrcBuf, std::string& strDestBuf, size_t nDestBufLength)
{
char* pDestBuf = new char[nDestBufLength];
memset(pDestBuf, 0, nDestBufLength * sizeof(char));
int nPrevDestBufLength = nDestBufLength;
//解压缩
int ret = uncompress((Bytef*)pDestBuf, (uLongf*)&nDestBufLength, (const Bytef*)strSrcBuf.c_str(), strSrcBuf.length());
if (ret != Z_OK)
{
delete[] pDestBuf;
return false;
}
if (nPrevDestBufLength == nDestBufLength)
{
int k = 0;
k++;
}
strDestBuf.append(pDestBuf, nDestBufLength);
delete[] pDestBuf;
return true;
} | 25.795181 | 122 | 0.657637 |
69d8c36761d3a233b51e22bbde23d7dd80b3438d | 1,690 | cc | C++ | benchmarks/svf/svf.cc | wolvre/maple | c856c70e224a1354f40bbc16b43ff31b96141f75 | [
"Apache-2.0"
] | 5 | 2015-07-20T09:42:22.000Z | 2021-08-30T06:24:17.000Z | benchmarks/svf/svf.cc | wolvre/maple | c856c70e224a1354f40bbc16b43ff31b96141f75 | [
"Apache-2.0"
] | null | null | null | benchmarks/svf/svf.cc | wolvre/maple | c856c70e224a1354f40bbc16b43ff31b96141f75 | [
"Apache-2.0"
] | 2 | 2017-05-23T11:57:07.000Z | 2017-06-30T11:30:44.000Z | #include <pthread.h>
#include <iostream>
#include <stdlib.h>
#include <assert.h>
#include "sync01.h"
#include "sync02.h"
#include "stateful001.h"
#include "stateful002.h"
int inputX = 0;
int inputY = 0;
int data1 = -1, data2 = -1, data3 = -1, data4 = -1;
pthread_mutex_t m;
void add1()
{
data1++;
sync01();
}
void add2()
{
data2++;
sync02();
}
void add3()
{
data3++;
stateful001();
}
void add4()
{
data4++;
stateful002();
}
void lock()
{
pthread_mutex_lock(&m);
}
void unlock()
{
pthread_mutex_unlock(&m);
}
void *thread1(void *arg){
lock();
data1++;
data2++;
data3++;
data4++;
unlock();
}
void *thread2(void *arg){
if(inputX > 0 && inputY > 0)
{
add1();
lock();
add3();
unlock();
}
else if(inputX > 0 && inputY <= 0)
{
lock();
add1();
unlock();
lock();
add4();
unlock();
}
else if(inputX <= 0 && inputY > 0)
{
lock();
add2();
unlock();
lock();
add3();
unlock();
}
else
{
lock();
add2();
unlock();
lock();
add4();
unlock();
}
}
int main(int argc, char ** argv) {
inputX = atoi(argv[1]);
inputY = atoi(argv[2]);
pthread_t t1,t2;
pthread_create(&t1, 0, thread1, 0);
pthread_create(&t2, 0, thread2, 0);
pthread_join(t1, 0);
pthread_join(t2, 0);
int sum = data1+data2+data3+data4;
if(sum != 2){
std::cout << "sum = " << sum << std::endl;
}
assert(sum==2);
return 0;
}
| 14.322034 | 51 | 0.457396 |
69d9f8142a17782cacd9ada58f37b6100053badf | 1,730 | hh | C++ | src/interface/MiniMap.hh | zermingore/warevolved | efd0c506658ce6e4ecb6c7eb5bb7d620bc05fd52 | [
"MIT"
] | 1 | 2019-09-23T18:16:27.000Z | 2019-09-23T18:16:27.000Z | src/interface/MiniMap.hh | zermingore/warevolved | efd0c506658ce6e4ecb6c7eb5bb7d620bc05fd52 | [
"MIT"
] | 2 | 2018-11-12T18:48:03.000Z | 2018-11-15T21:10:02.000Z | src/interface/MiniMap.hh | zermingore/warevolved | efd0c506658ce6e4ecb6c7eb5bb7d620bc05fd52 | [
"MIT"
] | null | null | null | /**
* \file
* \date August 22, 2017
* \author Zermingore
* \namespace interface
* \brief Side panel's MiniMap class declaration
*/
#ifndef INTERFACE_MINIMAP_HH_
# define INTERFACE_MINIMAP_HH_
# include <memory>
# include <vector>
# include <utility>
# include <graphics/graphic_types.hh>
# include <interface/InterfaceElement.hh>
# include <common/using.hh>
class Map;
namespace interface {
class Cursor;
/**
* \class MiniMap
* \brief In charge of the build / display of the minimap in the side panel
*/
class MiniMap final: public InterfaceElement
{
public:
/**
* \brief Constructor: needs the Map and Cursor to check what is hovered
* \param size Minimap's frame size
* \param map Game's map
* \param cursor Cursor of the player (needed to put a mark on the minimap)
*/
MiniMap(const graphics::Size2& size,
const std::shared_ptr<const Map>& map,
const std::shared_ptr<const Cursor>& cursor);
/**
* \brief Update the minimap content
* \todo Don't rebuild the minimap if the map / cursor position didn't change
*/
void update() override final;
/**
* \brief Draw the minimap in the side panel
*/
void draw() override final;
/**
* \brief Set the MiniMap position
* \param pos New position
*/
void setPosition(const graphics::Pos2& pos);
/**
* \brief Set the MiniMap frame size
* \param size New size
*/
void setFrameSize(const graphics::Size2& size);
private:
graphics::Size2 _frameSize; ///< Draw area size
const Map& _map; ///< Pointer on the game's map
/// The cursor's position is displayed on the minimap
const Cursor& _playerCursor;
};
} // namespace interface
#endif /* !INTERFACE_MINIMAP_HH_ */
| 20.116279 | 79 | 0.678613 |
69db2db1e436f63c84fa746623f66d4ebd6aa610 | 3,004 | cpp | C++ | engine/src/app/Window.cpp | Dino97/Kinemo | 4aeee2c960961f2e5d453734b9fb1a8e7c717cdf | [
"MIT"
] | 2 | 2019-10-14T02:19:55.000Z | 2019-10-15T01:24:53.000Z | engine/src/app/Window.cpp | Dino97/Kinemo | 4aeee2c960961f2e5d453734b9fb1a8e7c717cdf | [
"MIT"
] | null | null | null | engine/src/app/Window.cpp | Dino97/Kinemo | 4aeee2c960961f2e5d453734b9fb1a8e7c717cdf | [
"MIT"
] | null | null | null | #include "Window.h"
#include "glad/glad.h"
#include "GLFW/glfw3.h"
#include <iostream>
namespace Kinemo
{
void OpenGLDebugCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam);
Window::Window(const WindowProperties& properties)
{
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
GLFWmonitor* monitor = properties.Mode == WindowMode::Windowed ? nullptr : glfwGetPrimaryMonitor();
m_Window = glfwCreateWindow(properties.Width, properties.Height, properties.Title.c_str(), monitor, nullptr);
glfwMakeContextCurrent(m_Window);
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
{
}
glfwSetWindowUserPointer(m_Window, &m_Data);
glfwSetKeyCallback(m_Window, [](GLFWwindow* window, int key, int scancode, int action, int mods) {
WindowData& data = *(WindowData*)glfwGetWindowUserPointer(window);
switch(action)
{
case GLFW_PRESS:
{
Events::KeyPressedEvent event(key, 0);
data.EventCallback(event);
break;
}
case GLFW_RELEASE:
{
Events::KeyReleasedEvent event(key);
data.EventCallback(event);
break;
}
case GLFW_REPEAT:
{
Events::KeyPressedEvent event(key, 1);
data.EventCallback(event);
break;
}
}
});
glfwSetMouseButtonCallback(m_Window, [](GLFWwindow* window, int button, int action, int mods) {
WindowData& data = *(WindowData*)glfwGetWindowUserPointer(window);
switch (action)
{
case GLFW_PRESS:
{
Events::MouseButtonPressedEvent event(button);
data.EventCallback(event);
break;
}
case GLFW_RELEASE:
{
Events::MouseButtonReleasedEvent event(button);
data.EventCallback(event);
break;
}
}
});
glEnable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_DEBUG_OUTPUT);
glDebugMessageCallbackARB(OpenGLDebugCallback, nullptr);
}
void OpenGLDebugCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam)
{
std::cerr << "[OpenGL Debug]: " << message << std::endl;
}
Window::~Window()
{
glfwDestroyWindow(m_Window);
}
void Window::Clear() const
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glClearColor(0.1f, 0.1f, 0.1f, 1.0f); // dark gray
}
void Window::Update() const
{
glfwPollEvents();
glfwSwapBuffers(m_Window);
}
void Window::SetEventCallback(const EventCallbackFn& callback)
{
m_Data.EventCallback = callback;
}
void Window::SetVSync(bool vsync)
{
glfwSwapInterval(vsync ? 1 : 0);
}
bool Window::IsClosing() const
{
return glfwWindowShouldClose(m_Window);
}
void Window::SetTitle(const std::string& title)
{
m_WindowProperties.Title = title;
glfwSetWindowTitle(m_Window, title.c_str());
}
} | 23.84127 | 151 | 0.704394 |
69dcb8ac6bb044141d4a7ebe874e5ff1b71122c7 | 3,070 | cpp | C++ | push-3.1.0/test/test_name.cpp | emilydolson/eco-ea-mancala | f9c42611547205c97524830ea3ad33e675aaadbd | [
"MIT"
] | null | null | null | push-3.1.0/test/test_name.cpp | emilydolson/eco-ea-mancala | f9c42611547205c97524830ea3ad33e675aaadbd | [
"MIT"
] | null | null | null | push-3.1.0/test/test_name.cpp | emilydolson/eco-ea-mancala | f9c42611547205c97524830ea3ad33e675aaadbd | [
"MIT"
] | null | null | null |
/***************************************************************************
* Copyright (C) 2004 by Maarten Keijzer *
* mkeijzer@xs4all.nl *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <iostream>
#include <string>
#include "StaticInit.h"
#include "Literal.h"
#include "CodeUtils.h"
#include "Word.h"
using namespace std;
using namespace push;
int main()
{
Code code = parse("(fib : fib)");
{
Env env;
push_call(env, code);
env.go(100);
}
if (dict_size() != 1) return 1;
collect_garbage();
if (dict_size() != 1) return 1;
code = nil;
collect_garbage();
if (dict_size() != 0) return 1;
code = parse("(foo : bar bar : (foo bar) )");
{
Env env;
push_call(env, code);
env.go(100);
cout << env << endl;
}
if (dict_size() != 2) return 1;
collect_garbage();
if (dict_size() != 2) return 1;
cout << "before destroy " << dict_size() << endl;
code = nil;
collect_garbage();
if (dict_size() != 0) return 1;
code = parse("(foo : bar bar : baz baz : (foo baz) )");
{
Env env;
push_call(env, code);
env.go(100);
}
Code baz = parse("baz");
cout << "Baz is bound to " << get_code(static_cast<Literal<name_t>*>(baz.get())->get()) << endl;
collect_garbage();
if (dict_size() != 3) return 1;
code = nil;
collect_garbage();
if (dict_size() != 1) return 1;
baz = nil;
collect_garbage();
if (dict_size() != 0) return 1;
code = parse("(foo : (baz baz))");
collect_garbage();
if (dict_size() != 2) {
cout << "Err: dict size = " << endl;
return 1;
}
code = nil;
collect_garbage();
if (dict_size() != 0) return 1;
return 0;
}
| 26.016949 | 100 | 0.461889 |
69de404ebd1736490b849a0bf983dc730f8073b5 | 587 | cpp | C++ | brutopia.cpp | plotkin1996/nio-2015 | e2f82d183ca698c7f626f782b74e0c2206c5f17b | [
"MIT"
] | 1 | 2015-02-09T14:11:12.000Z | 2015-02-09T14:11:12.000Z | brutopia.cpp | plotkin1996/nio-2015 | e2f82d183ca698c7f626f782b74e0c2206c5f17b | [
"MIT"
] | null | null | null | brutopia.cpp | plotkin1996/nio-2015 | e2f82d183ca698c7f626f782b74e0c2206c5f17b | [
"MIT"
] | null | null | null | #include <iostream>
#include <vector>
#include <map>
using namespace std;
int main(int argc,char** argv)
{
int K,N;
map<int,int> m;
int result=0,group=0,maxgroup=0;
for(cin>>K>>N;N!=0;N--)
{
int a,b;cin>>a>>b;
if(m.find(a)==m.end()) m[a]= 1; else m[a]+=1;
if(m.find(b)==m.end()) m[b]=-1; else m[b]-=1;
}
for(map<int,int>::iterator i=m.begin();i!=m.end();i++)
{
group+=i->second;
if(group==0) result+=maxgroup,maxgroup=group=0;
if(group>maxgroup) maxgroup=group;
}
cout<<result;
}
| 21.740741 | 58 | 0.512777 |
69e19dddbc67b1ad175a8e49a731c6b4c6bf12d0 | 6,839 | hpp | C++ | posu/units/system/si/electric_current.hpp | zhu48/posu | 4872bd7572485c1c352aaf5db7a99d578a682113 | [
"MIT"
] | null | null | null | posu/units/system/si/electric_current.hpp | zhu48/posu | 4872bd7572485c1c352aaf5db7a99d578a682113 | [
"MIT"
] | 33 | 2020-12-14T02:50:22.000Z | 2022-03-08T03:20:15.000Z | posu/units/system/si/electric_current.hpp | zhu48/posu | 4872bd7572485c1c352aaf5db7a99d578a682113 | [
"MIT"
] | null | null | null | #ifndef POSU_UNITS_SI_ELECTRIC_CURRENT_HPP
#define POSU_UNITS_SI_ELECTRIC_CURRENT_HPP
#include "posu/units/base_unit.hpp"
#include "posu/units/system/electric_current.hpp"
namespace posu::units::si {
struct electric_current : public posu::units::electric_current {
using type = electric_current;
using kind_type = posu::units::electric_current;
using period = std::ratio<1>;
};
} // namespace posu::units::si
namespace posu::units {
template<>
inline constexpr bool enable_as_unit<si::electric_current> = true;
}
namespace posu::units::si {
template<typename Rep, typename Period>
using basic_ampere = quantity<Rep, Period, electric_current>;
using attoamperes = basic_ampere<int, std::atto>;
using femtoamperes = basic_ampere<int, std::femto>;
using picoamperes = basic_ampere<int, std::pico>;
using nanoamperes = basic_ampere<int, std::nano>;
using microamperes = basic_ampere<int, std::micro>;
using milliamperes = basic_ampere<int, std::milli>;
using centiamperes = basic_ampere<int, std::centi>;
using deciamperes = basic_ampere<int, std::deci>;
using amperes = basic_ampere<int, std::ratio<1>>;
using decaamperes = basic_ampere<int, std::deca>;
using hectoamperes = basic_ampere<int, std::hecto>;
using kiloamperes = basic_ampere<int, std::kilo>;
using megaamperes = basic_ampere<int, std::mega>;
using gigaamperes = basic_ampere<int, std::giga>;
using teraamperes = basic_ampere<int, std::tera>;
using petaamperes = basic_ampere<int, std::peta>;
using exaamperes = basic_ampere<int, std::exa>;
inline namespace literals {
inline namespace electric_current_literals {
[[nodiscard]] constexpr auto operator""_aA(unsigned long long value) -> attoamperes;
[[nodiscard]] constexpr auto operator""_aA(long double value)
-> basic_ampere<double, std::atto>;
[[nodiscard]] constexpr auto operator""_fA(unsigned long long value) -> femtoamperes;
[[nodiscard]] constexpr auto operator""_fA(long double value)
-> basic_ampere<double, std::femto>;
[[nodiscard]] constexpr auto operator""_pA(unsigned long long value) -> picoamperes;
[[nodiscard]] constexpr auto operator""_pA(long double value)
-> basic_ampere<double, std::pico>;
[[nodiscard]] constexpr auto operator""_nA(unsigned long long value) -> nanoamperes;
[[nodiscard]] constexpr auto operator""_nA(long double value)
-> basic_ampere<double, std::nano>;
[[nodiscard]] constexpr auto operator""_uA(unsigned long long value) -> microamperes;
[[nodiscard]] constexpr auto operator""_uA(long double value)
-> basic_ampere<double, std::micro>;
[[nodiscard]] constexpr auto operator""_mA(unsigned long long value) -> milliamperes;
[[nodiscard]] constexpr auto operator""_mA(long double value)
-> basic_ampere<double, std::milli>;
[[nodiscard]] constexpr auto operator""_cA(unsigned long long value) -> centiamperes;
[[nodiscard]] constexpr auto operator""_cA(long double value)
-> basic_ampere<double, std::centi>;
[[nodiscard]] constexpr auto operator""_dA(unsigned long long value) -> deciamperes;
[[nodiscard]] constexpr auto operator""_dA(long double value)
-> basic_ampere<double, std::deci>;
[[nodiscard]] constexpr auto operator""_A(unsigned long long value) -> amperes;
[[nodiscard]] constexpr auto operator""_A(long double value)
-> basic_ampere<double, std::ratio<1>>;
[[nodiscard]] constexpr auto operator""_daA(unsigned long long value) -> decaamperes;
[[nodiscard]] constexpr auto operator""_daA(long double value)
-> basic_ampere<double, std::deca>;
[[nodiscard]] constexpr auto operator""_hA(unsigned long long value) -> hectoamperes;
[[nodiscard]] constexpr auto operator""_hA(long double value)
-> basic_ampere<double, std::hecto>;
[[nodiscard]] constexpr auto operator""_kA(unsigned long long value) -> kiloamperes;
[[nodiscard]] constexpr auto operator""_kA(long double value)
-> basic_ampere<double, std::kilo>;
[[nodiscard]] constexpr auto operator""_MA(unsigned long long value) -> megaamperes;
[[nodiscard]] constexpr auto operator""_MA(long double value)
-> basic_ampere<double, std::mega>;
[[nodiscard]] constexpr auto operator""_GA(unsigned long long value) -> gigaamperes;
[[nodiscard]] constexpr auto operator""_GA(long double value)
-> basic_ampere<double, std::giga>;
[[nodiscard]] constexpr auto operator""_TA(unsigned long long value) -> teraamperes;
[[nodiscard]] constexpr auto operator""_TA(long double value)
-> basic_ampere<double, std::tera>;
[[nodiscard]] constexpr auto operator""_PA(unsigned long long value) -> petaamperes;
[[nodiscard]] constexpr auto operator""_PA(long double value)
-> basic_ampere<double, std::peta>;
[[nodiscard]] constexpr auto operator""_EA(unsigned long long value) -> exaamperes;
[[nodiscard]] constexpr auto operator""_EA(long double value)
-> basic_ampere<double, std::exa>;
} // namespace electric_current_literals
} // namespace literals
using namespace literals::electric_current_literals;
} // namespace posu::units::si
#include "posu/units/system/si/ipp/electric_current.ipp"
namespace posu::units::si {
inline namespace references {
inline namespace electric_current_references {
inline constexpr auto aA = 1_aA;
inline constexpr auto fA = 1_fA;
inline constexpr auto pA = 1_pA;
inline constexpr auto nA = 1_nA;
inline constexpr auto uA = 1_uA;
inline constexpr auto mA = 1_mA;
inline constexpr auto cA = 1_cA;
inline constexpr auto dA = 1_dA;
inline constexpr auto A = 1_A;
inline constexpr auto daA = 1_daA;
inline constexpr auto hA = 1_hA;
inline constexpr auto kA = 1_kA;
inline constexpr auto MA = 1_MA;
inline constexpr auto GA = 1_GA;
inline constexpr auto TA = 1_TA;
inline constexpr auto PA = 1_PA;
inline constexpr auto EA = 1_EA;
} // namespace electric_current_references
} // namespace references
} // namespace posu::units::si
#endif // #ifndef POSU_UNITS_SI_ELECTRIC_CURRENT_HPP
| 47.165517 | 97 | 0.639421 |
69e2b63845fe337ad0c8eb2d1646301809720d44 | 496 | cpp | C++ | source/code/scratch/old_repos/Jstd/Jstd/project/src/jstd-tool/jstd-tool/database_dumper.cpp | luxe/CodeLang-compiler | 78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a | [
"MIT"
] | 33 | 2019-05-30T07:43:32.000Z | 2021-12-30T13:12:32.000Z | source/code/scratch/old_repos/Jstd/Jstd/project/src/jstd-tool/jstd-tool/database_dumper.cpp | luxe/CodeLang-compiler | 78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a | [
"MIT"
] | 371 | 2019-05-16T15:23:50.000Z | 2021-09-04T15:45:27.000Z | source/code/scratch/old_repos/Jstd/Jstd/project/src/jstd-tool/jstd-tool/database_dumper.cpp | UniLang/compiler | c338ee92994600af801033a37dfb2f1a0c9ca897 | [
"MIT"
] | 6 | 2019-08-22T17:37:36.000Z | 2020-11-07T07:15:32.000Z | #include "database_dumper.hpp"
#include "utilities.hpp"
#include "global.hpp"
#include <cstdlib>
#include <fstream>
void Database_Dumper::Dump_Database_If_Needed(Program_Options const& program_options, std::time_t const& last_run_time) {
if (program_options.Database()){
Perform_Timed_Database_Dumping(program_options, last_run_time);
}
return;
}
void Database_Dumper::Perform_Timed_Database_Dumping(Program_Options const& program_options, std::time_t const& last_run_time){
return;
}
| 24.8 | 127 | 0.802419 |
69e2c03aba56f1945d3b65501dd6a53b7fa545cf | 2,771 | hpp | C++ | modules/core/reduction/include/nt2/core/functions/scalar/inner_fold.hpp | pbrunet/nt2 | 2aeca0f6a315725b335efd5d9dc95d72e10a7fb7 | [
"BSL-1.0"
] | 2 | 2016-09-14T00:23:53.000Z | 2018-01-14T12:51:18.000Z | modules/core/reduction/include/nt2/core/functions/scalar/inner_fold.hpp | pbrunet/nt2 | 2aeca0f6a315725b335efd5d9dc95d72e10a7fb7 | [
"BSL-1.0"
] | null | null | null | modules/core/reduction/include/nt2/core/functions/scalar/inner_fold.hpp | pbrunet/nt2 | 2aeca0f6a315725b335efd5d9dc95d72e10a7fb7 | [
"BSL-1.0"
] | null | null | null | //==============================================================================
// Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//==============================================================================
#ifndef NT2_CORE_FUNCTIONS_SCALAR_INNER_FOLD_HPP_INCLUDED
#define NT2_CORE_FUNCTIONS_SCALAR_INNER_FOLD_HPP_INCLUDED
#include <nt2/core/functions/inner_fold.hpp>
#include <boost/fusion/include/pop_front.hpp>
#include <nt2/include/functions/scalar/numel.hpp>
namespace nt2 { namespace details
{
template <class X, class N, class B, class U>
BOOST_FORCEINLINE typename X::value_type
inner_fold_step(X const& in, const std::size_t& p, N const& neutral, B const& bop, U const&)
{
typedef typename X::value_type value_type;
typedef typename X::extent_type extent_type;
extent_type ext = in.extent();
std::size_t ibound = boost::fusion::at_c<0>(ext);
value_type out = neutral(nt2::meta::as_<value_type>());
for(std::size_t i = 0; i < ibound; ++i)
{
out = bop(out, nt2::run(in, i+p, meta::as_<value_type>()));
}
return out;
}
} }
namespace nt2 { namespace ext
{
//============================================================================
// Generates inner_fold
//============================================================================
NT2_FUNCTOR_IMPLEMENTATION( nt2::tag::inner_fold_, tag::cpu_, (A0)(A1)(A2)(A3)(A4)
, ((ast_< A0, nt2::container::domain>))
((ast_< A1, nt2::container::domain>))
(unspecified_<A2>)
(unspecified_<A3>)
(unspecified_<A4>)
)
{
typedef void result_type;
typedef typename A0::value_type value_type;
typedef typename boost::remove_reference<A1>::type::extent_type extent_type;
BOOST_FORCEINLINE result_type operator()(A0& out, A1& in, A2 const& neutral, A3 const& bop, A4 const& uop) const
{
extent_type ext = in.extent();
std::size_t ibound = boost::fusion::at_c<0>(ext);
std::size_t obound = nt2::numel(boost::fusion::pop_front(ext));
for(std::size_t j = 0, k = 0; j < obound; ++j, k+=ibound)
{
nt2::run(out, j, details::inner_fold_step(in,k, neutral, bop, uop));
}
}
};
} }
#endif
| 37.445946 | 116 | 0.510646 |
69e7b9f35f2749d9ec18ec50f7ad54aa4218466f | 421 | cc | C++ | confonnx/server/enclave/props.cc | kapilvgit/onnx-server-openenclave | 974e747c9ba08d6a4fc5cc9943acc1b937a933df | [
"MIT"
] | null | null | null | confonnx/server/enclave/props.cc | kapilvgit/onnx-server-openenclave | 974e747c9ba08d6a4fc5cc9943acc1b937a933df | [
"MIT"
] | null | null | null | confonnx/server/enclave/props.cc | kapilvgit/onnx-server-openenclave | 974e747c9ba08d6a4fc5cc9943acc1b937a933df | [
"MIT"
] | null | null | null | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include <openenclave/enclave.h>
// Default parameters, can be overridden during signing.
OE_SET_ENCLAVE_SGX(
1, /* ProductID */
1, /* SecurityVersion */
true, /* AllowDebug */
609600 / 10, /* HeapPageCount */
131072 / 10, /* StackPageCount */
8); /* TCSCount */
| 30.071429 | 60 | 0.603325 |
69edef0a4d42fd8bcf2bb492b6894147cd714fd4 | 2,676 | cpp | C++ | main.cpp | finn-harman/Enigma | db9438a7efd24b3d47ed6bf0dfaa8fbb13f7872a | [
"MIT"
] | null | null | null | main.cpp | finn-harman/Enigma | db9438a7efd24b3d47ed6bf0dfaa8fbb13f7872a | [
"MIT"
] | null | null | null | main.cpp | finn-harman/Enigma | db9438a7efd24b3d47ed6bf0dfaa8fbb13f7872a | [
"MIT"
] | null | null | null | #include <iostream>
#include <fstream>
#include "errors.h"
#include "plugboard.h"
#include "rotor.h"
#include "reflector.h"
#include "enigma.h"
using namespace std;
int const alphabet_size = 26;
void organise_inputs(int argc, char** argv);
int main(int argc, char** argv)
{
int input, pb_output0, rf_output, rot_output0 = 0, rot_output1 = 0, pb_output1;
int input_number = argc;
int file_number = input_number - 1;
int rotor_number = file_number - 3;
if (test_INSUFFICIENT_NUMBER_OF_PARAMETERS(file_number) != 0) {
cerr << "Insufficient number of parameters. Usage: enigma plugboard-file reflector-file (<rotor_file>)* rotor_positions";
return 1;
}
char* plugboard_file = argv[1];
char* reflector_file = argv[2];
char* position_file = argv[input_number - 1];
char** rotor_files;
rotor_files = new char*[rotor_number];
for (int i = 0 ; i < rotor_number ; i++)
rotor_files[i] = argv[i+3];
Enigma enig(alphabet_size, rotor_number, plugboard_file, reflector_file, rotor_files, position_file);
enig.load();
enig.error_check();
if (enig.error_code != 0) {
cerr << enig.error_comment;
delete [] rotor_files;
return enig.error_code;
}
enig.map();
int MAX_LENGTH = 100;
char phrase[MAX_LENGTH];
char output[MAX_LENGTH];
cin.getline(phrase, MAX_LENGTH);
int array_length = 0;
int i = 0;
while(phrase[i] != '\0') {
array_length++;
i++;
}
int output_length = 0;
for (int i = 0 ; i < array_length ; i++) {
if (test_INVALID_INPUT_CHARACTER(phrase[i]) != 0) {
for (int j = 0 ; j < output_length ; j++)
if (output[j] != ' ')
cerr << output[j];
cerr << endl;
cerr << "Invalid input character. Input must be capital letter or white space";
return 2;
}
if ((phrase[i] == ' ') || (phrase[i] == '\n') || (phrase[i] == 9) || (phrase[i] == 13)) {
output[i] = ' ';
output_length++;
}
else {
input = phrase[i] - 'A';
int pb_input0 = input;
if (rotor_number > 0) {
enig.rotate_rotors();
enig.pass_plugboard(pb_input0, pb_output0);
enig.pass_rotors0(pb_output0, rot_output0);
enig.pass_reflector(rot_output0, rf_output);
enig.pass_rotors1(rf_output, rot_output1);
enig.pass_plugboard(rot_output1, pb_output1);
}
else {
enig.pass_plugboard(pb_input0, pb_output0);
enig.pass_reflector(pb_output0, rf_output);
enig.pass_plugboard(rf_output, pb_output1);
}
output[i] = pb_output1 + 'A';
output_length++;
}
}
for (int i = 0 ; i < output_length ; i++)
if (output[i] != ' ')
cout << output[i];
delete [] rotor_files;
return 0;
}
| 22.677966 | 125 | 0.631913 |
69eeca25028549bfb8a4c1f3122fdd82dded221b | 709 | cpp | C++ | src/utils/common/physdll.cpp | cstom4994/SourceEngineRebuild | edfd7f8ce8af13e9d23586318350319a2e193c08 | [
"MIT"
] | 6 | 2022-01-23T09:40:33.000Z | 2022-03-20T20:53:25.000Z | src/utils/common/physdll.cpp | cstom4994/SourceEngineRebuild | edfd7f8ce8af13e9d23586318350319a2e193c08 | [
"MIT"
] | null | null | null | src/utils/common/physdll.cpp | cstom4994/SourceEngineRebuild | edfd7f8ce8af13e9d23586318350319a2e193c08 | [
"MIT"
] | 1 | 2022-02-06T21:05:23.000Z | 2022-02-06T21:05:23.000Z | //========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//=============================================================================//
#include <stdio.h>
#include "physdll.h"
#include "filesystem_tools.h"
static CSysModule *pPhysicsModule = NULL;
CreateInterfaceFn GetPhysicsFactory(void) {
if (!pPhysicsModule) {
pPhysicsModule = g_pFullFileSystem->LoadModule("engine.dll");
if (!pPhysicsModule)
return NULL;
}
return Sys_GetFactory(pPhysicsModule);
}
void PhysicsDLLPath(const char *pPathname) {
if (!pPhysicsModule) {
pPhysicsModule = g_pFullFileSystem->LoadModule(pPathname);
}
}
| 24.448276 | 81 | 0.57969 |
69f3b7b6da6023a0b52386197d29b1e5bcd2c290 | 509 | cpp | C++ | WeeklyHomework/0310_Above_Average.cpp | Ping6666/Algorithm-Project | cdf0b56cd277badcdd964982f5c033fd4888274a | [
"MIT"
] | 1 | 2021-04-12T05:08:07.000Z | 2021-04-12T05:08:07.000Z | WeeklyHomework/0310_Above_Average.cpp | Ping6666/Algorithm-Projects | cdf0b56cd277badcdd964982f5c033fd4888274a | [
"MIT"
] | null | null | null | WeeklyHomework/0310_Above_Average.cpp | Ping6666/Algorithm-Projects | cdf0b56cd277badcdd964982f5c033fd4888274a | [
"MIT"
] | null | null | null | #include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int N,score[100][100],sum[100],ans[100];
cin>>N;
for(int i=0;i<N;i++)
{
cin>>score[i][0];
sum[i]=0;
ans[i]=0;
for(int j=0;j<score[i][0];j++)
{
cin>>score[i][j+1];
sum[i]+=score[i][j+1];
}
for(int j=0;j<score[i][0];j++)
{
if(score[i][j+1]*score[i][0]>sum[i])
{
ans[i]+=1;
}
}
ans[i]*=100;
cout<<fixed<<setprecision(3)<<float(ans[i])/score[i][0]<<"%"<<endl;
}
}
| 16.966667 | 70 | 0.485265 |
69f43de5ad9383ee1aba2396742ee1fc7628b0e5 | 2,067 | cpp | C++ | jogo/src/utils/classes/menu.cpp | Hyodar/jogo-tecprog | 3a8cdf2cae583ad88a9377d0fbf796ba45d9d408 | [
"MIT"
] | null | null | null | jogo/src/utils/classes/menu.cpp | Hyodar/jogo-tecprog | 3a8cdf2cae583ad88a9377d0fbf796ba45d9d408 | [
"MIT"
] | null | null | null | jogo/src/utils/classes/menu.cpp | Hyodar/jogo-tecprog | 3a8cdf2cae583ad88a9377d0fbf796ba45d9d408 | [
"MIT"
] | null | null | null |
// Libraries
// ---------------------------------------------------------------------------
// Class header
// ---------------------
#include "menu.hpp"
// Internal libraries
// ---------------------
#include "graphics_manager.hpp"
using namespace bardadv::core;
using namespace bardadv::menus;
// Methods
// ---------------------------------------------------------------------------
Menu::Menu() : Ent(0, 0) {
// noop
}
// ---------------------------------------------------------------------------
Menu::~Menu() {
// noop
}
// ---------------------------------------------------------------------------
void Menu::addButton(int left, int top, int width, int height, MenuCommand action) {
MenuItem button;
button.rect.left = left;
button.rect.top = top;
button.rect.width = width;
button.rect.height = height;
button.action = action;
menuItems.push_back(button);
}
// ---------------------------------------------------------------------------
void Menu::render(sf::RenderWindow& renderWindow) {
renderWindow.draw(sprite);
renderWindow.display();
}
// ---------------------------------------------------------------------------
MenuCommand Menu::handleClick(int x, int y) {
std::list<MenuItem>::iterator item;
for(item = menuItems.begin(); item != menuItems.end(); item++) {
sf::Rect<int> menuItemRect = item->rect;
if(menuItemRect.contains(x, y)){
return item->action;
}
}
return MenuCommand::NOOP;
}
// ---------------------------------------------------------------------------
MenuCommand Menu::getMenuResponse(sf::RenderWindow& renderWindow) {
sf::Event event;
while(true) {
while(renderWindow.pollEvent(event)) {
switch(event.type) {
case sf::Event::MouseButtonPressed:
return handleClick(event.mouseButton.x, event.mouseButton.y);
case sf::Event::Closed:
return MenuCommand::EXIT;
default:;
}
}
}
}
| 24.607143 | 84 | 0.426222 |
69f9c008f5133233c43e173c9ac827b31ad70ca4 | 4,489 | cxx | C++ | test/itkHDF5UltrasoundImageIOTest.cxx | tbirdso/ITKUltrasound | fb5915978de73a71b0fc43b9ce1c9d32dfa19783 | [
"Apache-2.0"
] | 38 | 2015-01-20T14:16:22.000Z | 2022-03-16T09:23:09.000Z | test/itkHDF5UltrasoundImageIOTest.cxx | thewtex/ITKUltrasound | 9ab459466ffe155840fdf3de30aafb3660dba800 | [
"Apache-2.0"
] | 83 | 2015-08-05T14:09:42.000Z | 2022-03-30T20:28:03.000Z | test/itkHDF5UltrasoundImageIOTest.cxx | thewtex/ITKUltrasound | 9ab459466ffe155840fdf3de30aafb3660dba800 | [
"Apache-2.0"
] | 29 | 2015-03-27T23:23:20.000Z | 2022-01-04T22:44:57.000Z | /*=========================================================================
*
* Copyright NumFOCUS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#include "itkArray.h"
#include "itkHDF5UltrasoundImageIO.h"
#include "itkHDF5UltrasoundImageIOFactory.h"
#include "itkMetaDataObject.h"
#include "itkTestingMacros.h"
#include "itkMath.h"
#include "itkImageIORegion.h"
int
itkHDF5UltrasoundImageIOTest(int argc, char * argv[])
{
if (argc < 2)
{
std::cerr << "Usage: " << argv[0] << " inputImage" << std::endl;
return EXIT_FAILURE;
}
const char * inputImageFileName = argv[1];
itk::HDF5UltrasoundImageIO::Pointer imageIO = itk::HDF5UltrasoundImageIO::New();
ITK_EXERCISE_BASIC_OBJECT_METHODS(imageIO, HDF5UltrasoundImageIO, StreamingImageIOBase);
ITK_TEST_EXPECT_TRUE(!imageIO->CanReadFile("AMINCFile.mnc"));
ITK_TEST_EXPECT_TRUE(imageIO->CanReadFile(inputImageFileName));
imageIO->SetFileName(inputImageFileName);
imageIO->ReadImageInformation();
const unsigned int Dimension = 3;
itk::SizeValueType dimensions[Dimension];
for (unsigned int ii = 0; ii < Dimension; ++ii)
{
dimensions[ii] = imageIO->GetDimensions(ii);
}
std::cout << "Dimensions: [ " << dimensions[0] << ", " << dimensions[1] << ", " << dimensions[2] << " ]" << std::endl;
ITK_TEST_EXPECT_EQUAL(dimensions[0], 240);
ITK_TEST_EXPECT_EQUAL(dimensions[1], 328);
ITK_TEST_EXPECT_EQUAL(dimensions[2], 125);
std::cout << "ComponentType: " << imageIO->GetComponentTypeAsString(imageIO->GetComponentType()) << std::endl;
ITK_TEST_EXPECT_EQUAL(imageIO->GetComponentType(), itk::IOComponentEnum::FLOAT);
const itk::MetaDataDictionary & metaDataDict = imageIO->GetMetaDataDictionary();
std::string sliceType;
itk::ExposeMetaData<std::string>(metaDataDict, "SliceType", sliceType);
std::cout << "SliceType: " << sliceType << std::endl;
ITK_TEST_EXPECT_EQUAL(sliceType, "Image");
using SliceSpacingType = itk::Array<double>;
SliceSpacingType sliceSpacing(2);
itk::ExposeMetaData<SliceSpacingType>(metaDataDict, "SliceSpacing", sliceSpacing);
std::cout << "SliceSpacing: [ " << sliceSpacing[0] << ", " << sliceSpacing[1] << " ]" << std::endl;
ITK_TEST_EXPECT_TRUE(itk::Math::FloatAlmostEqual(sliceSpacing[0], 0.1925));
ITK_TEST_EXPECT_TRUE(itk::Math::FloatAlmostEqual(sliceSpacing[1], 0.167811, 10, 1e-6));
using SliceOriginType = itk::Array<double>;
SliceOriginType sliceOrigin(2);
itk::ExposeMetaData<SliceOriginType>(metaDataDict, "SliceOrigin", sliceOrigin);
std::cout << "SliceOrigin: [ " << sliceOrigin[0] << ", " << sliceOrigin[1] << " ]" << std::endl;
ITK_TEST_EXPECT_TRUE(itk::Math::FloatAlmostEqual(sliceOrigin[0], 0.0));
ITK_TEST_EXPECT_TRUE(itk::Math::FloatAlmostEqual(sliceOrigin[1], -27.2693, 10, 1e-3));
using ElevationalSliceAnglesType = itk::Array<double>;
ElevationalSliceAnglesType elevationalSliceAngles(imageIO->GetDimensions(2));
itk::ExposeMetaData<ElevationalSliceAnglesType>(metaDataDict, "ElevationalSliceAngles", elevationalSliceAngles);
std::cout << "ElevationalSliceAngles: [ " << elevationalSliceAngles[0] << ", " << elevationalSliceAngles[1] << ", "
<< elevationalSliceAngles[2] << " ..." << std::endl;
ITK_TEST_EXPECT_TRUE(itk::Math::FloatAlmostEqual(elevationalSliceAngles[0], -1.0821, 10, 1e-3));
ITK_TEST_EXPECT_TRUE(itk::Math::FloatAlmostEqual(elevationalSliceAngles[1], -1.06465, 10, 1e-4));
float * buffer = new float[10 * 10 * 10];
itk::ImageIORegion ioRegion(Dimension);
for (unsigned int ii = 0; ii < Dimension; ++ii)
{
ioRegion.SetIndex(ii, 0);
ioRegion.SetSize(ii, 10);
}
imageIO->SetIORegion(ioRegion);
imageIO->Read(static_cast<void *>(buffer));
ITK_TEST_EXPECT_EQUAL(buffer[0], 88.0);
ITK_TEST_EXPECT_EQUAL(buffer[1], 78.0);
ITK_TEST_EXPECT_EQUAL(buffer[2], 77.0);
delete[] buffer;
return EXIT_SUCCESS;
}
| 41.564815 | 120 | 0.689686 |
69fde02f06219de5181fed4b4211e703e0b110ab | 1,281 | cpp | C++ | algorithmic-toolbox/week5_dynamic_programming1/2_primitive_calculator/primitive_calculator.cpp | hsgrewal/algorithms | b7532cc14221490128bb6aa12b06d20656855b8d | [
"MIT"
] | null | null | null | algorithmic-toolbox/week5_dynamic_programming1/2_primitive_calculator/primitive_calculator.cpp | hsgrewal/algorithms | b7532cc14221490128bb6aa12b06d20656855b8d | [
"MIT"
] | null | null | null | algorithmic-toolbox/week5_dynamic_programming1/2_primitive_calculator/primitive_calculator.cpp | hsgrewal/algorithms | b7532cc14221490128bb6aa12b06d20656855b8d | [
"MIT"
] | null | null | null | #include <iostream>
#include <vector>
#include <algorithm>
#include <limits>
using std::vector;
vector<int> optimal_sequence(int n) {
std::vector<int> sequence;
vector<int> array(n + 1);
int a1, m2, m3;
for (int i = 2; i <= n; ++i) {
a1 = m2 = m3 = std::numeric_limits<int>::max();
if (i - 1 >= 0) {
a1 = 1 + array.at(i - 1);
}
if (i % 2 == 0 and i / 2 >= 0) {
m2 = 1 + array.at(i / 2);
}
if (i % 3 == 0 and i / 3 >= 0) {
m3 = 1 + array.at(i / 3);
}
array[i] = std::min(a1, std::min(m2, m3));
}
while (n > 1) {
sequence.push_back(n);
if (n % 3 == 0 and array.at(n / 3) + 1 == array.at(n)) {
n /= 3;
} else if (n % 2 == 0 and array.at(n / 2) + 1 == array.at(n)) {
n /= 2;
} else if (array.at(n - 1) + 1 == array.at(n)) {
n = n - 1;
}
}
sequence.push_back(1);
reverse(sequence.begin(), sequence.end());
return sequence;
}
int main() {
int n;
std::cin >> n;
vector<int> sequence = optimal_sequence(n);
std::cout << sequence.size() - 1 << std::endl;
for (size_t i = 0; i < sequence.size(); ++i) {
std::cout << sequence[i] << " ";
}
}
| 26.142857 | 71 | 0.442623 |
0e0151bb98ff6cfa3a739a80ed8b0665eeaa33e4 | 309 | hpp | C++ | epoch/ayla/include/ayla/serialization/cylinder_serializer.hpp | oprogramadorreal/vize | 042c16f96d8790303563be6787200558e1ec00b2 | [
"MIT"
] | 47 | 2020-03-30T14:36:46.000Z | 2022-03-06T07:44:54.000Z | epoch/ayla/include/ayla/serialization/cylinder_serializer.hpp | oprogramadorreal/vize | 042c16f96d8790303563be6787200558e1ec00b2 | [
"MIT"
] | null | null | null | epoch/ayla/include/ayla/serialization/cylinder_serializer.hpp | oprogramadorreal/vize | 042c16f96d8790303563be6787200558e1ec00b2 | [
"MIT"
] | 8 | 2020-04-01T01:22:45.000Z | 2022-01-02T13:06:09.000Z | #ifndef AYLA_CYLINDER_SERIALIZER_HPP
#define AYLA_CYLINDER_SERIALIZER_HPP
namespace ayla {
class Cylinder;
}
namespace boost {
namespace serialization {
template <class Archive>
void serialize(Archive& ar, ayla::Cylinder& cylinder, const unsigned int version);
}
}
#endif // AYLA_CYLINDER_SERIALIZER_HPP | 18.176471 | 82 | 0.802589 |
0e032a6fdb93400c1863fd8f936662b9b3d24266 | 2,893 | cpp | C++ | tests/util_scoped_timer.cpp | extcpp/base | 26b1384cbbd5cb3171e4cd22c8eb5f09ec0c5732 | [
"MIT"
] | null | null | null | tests/util_scoped_timer.cpp | extcpp/base | 26b1384cbbd5cb3171e4cd22c8eb5f09ec0c5732 | [
"MIT"
] | 22 | 2019-10-15T20:47:02.000Z | 2020-01-26T20:26:19.000Z | tests/util_scoped_timer.cpp | extcpp/base | 26b1384cbbd5cb3171e4cd22c8eb5f09ec0c5732 | [
"MIT"
] | 1 | 2020-09-24T08:53:15.000Z | 2020-09-24T08:53:15.000Z | // Copyright - 2020 - Jan Christoph Uhde <Jan@UhdeJC.com>
// Please see LICENSE.md for license or visit https://github.com/extcpp/basics
#include <ext/macros/compiler.hpp>
#include <ext/util/scoped_timer.hpp>
#include <gtest/gtest.h>
#include <iostream>
#include <thread>
using namespace ext::util;
constexpr auto ms = std::chrono::milliseconds(1);
void assert_time_eq(std::size_t ms_expected, std::pair<std::uint64_t, std::string> const& in, std::size_t steps = 1) {
#ifndef EXT_TESTS_NO_TIME_CRITICAL
#ifdef EXT_COMPILER_VC
ms_expected += 2 * steps;
#else
ms_expected += steps;
#endif
ASSERT_LE(in.first / (1000 * 1000), ms_expected);
#else
(void) ms_expected;
(void) in;
(void) steps;
std::cerr << "time not asserted\n";
#endif // EXT_TESTS_NO_TIME_CRITICAL
}
TEST(util_scoped_timer, nostep) {
scoped_timer_res result;
auto callback = [&result](scoped_timer_res const& in) {
result = in;
return in;
};
{
scoped_timer timer(callback);
std::this_thread::sleep_for(ms);
}
assert_time_eq(1, result.front());
}
TEST(util_scoped_timer, steps) {
scoped_timer_res result;
auto callback = [&result](scoped_timer_res const& in) {
result = in;
return in;
};
{
scoped_timer timer(callback);
std::this_thread::sleep_for(ms);
timer.add_step();
std::this_thread::sleep_for(ms);
timer.add_step();
std::this_thread::sleep_for(ms);
}
assert_time_eq(3, result[0], 3);
assert_time_eq(1, result[1], 1);
assert_time_eq(1, result[2], 2);
assert_time_eq(1, result[3], 3);
ASSERT_STREQ("destructor", result.back().second.c_str());
}
TEST(util_scoped_timer, no_dtor) {
scoped_timer_res result;
auto callback = [&result](scoped_timer_res const& in) {
result = in;
return in;
};
{
scoped_timer timer(callback);
timer.disable_dtor_entry();
std::this_thread::sleep_for(ms);
timer.add_step();
std::this_thread::sleep_for(ms);
timer.add_step();
std::this_thread::sleep_for(ms);
}
assert_time_eq(2, result[0], 2);
assert_time_eq(1, result[1], 1);
assert_time_eq(1, result[2], 2);
ASSERT_STREQ("", result.back().second.c_str());
}
TEST(util_scoped_timer, dismiss) {
scoped_timer_res result;
auto callback = [&result](scoped_timer_res const& in) {
result = in;
return in;
};
{
scoped_timer timer(callback);
timer.disable_dtor_entry();
timer.dismiss();
timer.init("", 1);
std::this_thread::sleep_for(ms);
timer.add_step("fin");
std::this_thread::sleep_for(ms);
timer.run();
}
assert_time_eq(1, result[0], 1);
assert_time_eq(1, result[1], 1);
ASSERT_STREQ("fin", result[1].second.c_str());
}
| 25.830357 | 118 | 0.622883 |
0e0a5d6325e483fccf2b291a21ec1f3da9682996 | 2,042 | cpp | C++ | src/ParamGen.cpp | Jesusausage/ZKP_Voting | c98658ac533522a146b0be5a976cb215f130a4ec | [
"MIT"
] | 1 | 2019-07-04T18:54:07.000Z | 2019-07-04T18:54:07.000Z | src/ParamGen.cpp | Jesusausage/ZKP_Voting | c98658ac533522a146b0be5a976cb215f130a4ec | [
"MIT"
] | null | null | null | src/ParamGen.cpp | Jesusausage/ZKP_Voting | c98658ac533522a146b0be5a976cb215f130a4ec | [
"MIT"
] | 1 | 2019-09-10T00:15:30.000Z | 2019-09-10T00:15:30.000Z | #include "ParamGen.hpp"
void generateParams()
{
auto ecg = GenerateECGroup();
auto base = GenerateECBase();
std::ofstream token_out(TOKEN_FILE);
std::ofstream id_out(ID_FILE);
CryptoPP::Integer token_keys[10][5];
CryptoPP::ECPPoint tokens[10][5];
CryptoPP::ECPPoint token_sums[5];
CryptoPP::Integer id_keys[10];
CryptoPP::ECPPoint ids[10];
CryptoPP::ECPPoint id_sum;
for (int i = 0; i < 10; i++) {
for (int option = 0; option < 5; option++) {
token_keys[i][option] = RandomInteger(1, ecg.order);
tokens[i][option] = ecg.curve.Multiply(token_keys[i][option], base);
token_sums[option] = ecg.curve.Add(token_sums[option], tokens[i][option]);
}
WriteTokens(tokens[i], 5, token_out);
id_keys[i] = RandomInteger(1, ecg.order);
ids[i] = ecg.curve.Multiply(id_keys[i], base);
id_sum = ecg.curve.Add(id_sum, ids[i]);
WriteID(ids[i], id_out);
}
token_out.close();
id_out.close();
std::ofstream priv_out("private_keys.txt");
priv_out << id_keys[0] << std::endl;
for (int i = 0; i < 5; ++i)
priv_out << token_keys[0][i] << std::endl;
priv_out.close();
priv_out.open("private_keys1.txt");
priv_out << id_keys[1] << std::endl;
for (int i = 0; i < 5; ++i)
priv_out << token_keys[1][i] << std::endl;
priv_out.close();
PublicData pub(ecg, 10, 5);
PrivateData priv(5);
VoteData data(ecg, base, pub, priv);
for (int i = 1; i < 10; ++i) {
Voter voter(ecg, base, id_sum, tokens[i], 5);
voter.setTokenKeys(token_keys[i]);
voter.castVote(i % 5);
Vote vote = voter.getVoteAndProofs();
KeyGen key_gen(ecg, base, token_sums, ids[i], 5);
key_gen.setIDKey(id_keys[i]);
Key key = key_gen.getKeysAndProofs();
CryptoPP::byte output[2445];
int n;
vote.serialise(output, n);
key.serialise(output + 1630, n);
data.processVKPair(output, i);
}
} | 29.171429 | 86 | 0.582272 |
0e0bb2f4f3904d3a93316a4ef605060e6fc4bfc1 | 3,860 | cpp | C++ | SampleFoundation/Triangulation/Triangulation.cpp | wjezxujian/WildMagic4 | 249a17f8c447cf57c6283408e01009039810206a | [
"BSL-1.0"
] | 3 | 2021-08-02T04:03:03.000Z | 2022-01-04T07:31:20.000Z | SampleFoundation/Triangulation/Triangulation.cpp | wjezxujian/WildMagic4 | 249a17f8c447cf57c6283408e01009039810206a | [
"BSL-1.0"
] | null | null | null | SampleFoundation/Triangulation/Triangulation.cpp | wjezxujian/WildMagic4 | 249a17f8c447cf57c6283408e01009039810206a | [
"BSL-1.0"
] | 5 | 2019-10-13T02:44:19.000Z | 2021-08-02T04:03:10.000Z | // Geometric Tools, Inc.
// http://www.geometrictools.com
// Copyright (c) 1998-2006. All Rights Reserved
//
// The Wild Magic Version 4 Restricted Libraries source code is supplied
// under the terms of the license agreement
// http://www.geometrictools.com/License/Wm4RestrictedLicense.pdf
// and may not be copied or disclosed except in accordance with the terms
// of that agreement.
#include "Triangulation.h"
WM4_WINDOW_APPLICATION(Triangulation);
const int g_iSize = 256;
//----------------------------------------------------------------------------
Triangulation::Triangulation ()
:
WindowApplication2("Triangulation",0,0,g_iSize,g_iSize,
ColorRGBA(1.0f,1.0f,1.0f,1.0f))
{
m_akVertex = 0;
m_aiIndex = 0;
}
//----------------------------------------------------------------------------
bool Triangulation::OnInitialize ()
{
if (!WindowApplication2::OnInitialize())
{
return false;
}
// select a polygon
m_iVQuantity = 10;
m_akVertex = WM4_NEW Vector2f[m_iVQuantity];
m_akVertex[0][0] = 29.0f; m_akVertex[0][1] = 139.0f;
m_akVertex[1][0] = 78.0f; m_akVertex[1][1] = 99.0f;
m_akVertex[2][0] = 125.0f; m_akVertex[2][1] = 141.0f;
m_akVertex[3][0] = 164.0f; m_akVertex[3][1] = 116.0f;
m_akVertex[4][0] = 201.0f; m_akVertex[4][1] = 168.0f;
m_akVertex[5][0] = 157.0f; m_akVertex[5][1] = 163.0f;
m_akVertex[6][0] = 137.0f; m_akVertex[6][1] = 200.0f;
m_akVertex[7][0] = 98.0f; m_akVertex[7][1] = 134.0f;
m_akVertex[8][0] = 52.0f; m_akVertex[8][1] = 146.0f;
m_akVertex[9][0] = 55.0f; m_akVertex[9][1] = 191.0f;
// construct the triangulation
m_iTQuantity = m_iVQuantity-2;
TriangulateEC<float>(m_iVQuantity,m_akVertex,Query::QT_FILTERED,
0.001f,m_aiIndex);
OnDisplay();
return true;
}
//----------------------------------------------------------------------------
void Triangulation::OnTerminate ()
{
WM4_DELETE[] m_akVertex;
WM4_DELETE[] m_aiIndex;
WindowApplication2::OnTerminate();
}
//----------------------------------------------------------------------------
void Triangulation::OnDisplay ()
{
ClearScreen();
Color kBlue(0,0,255), kBlack(0,0,0), kGray(128,128,128);
int i, iX0, iY0, iX1, iY1;
// draw the triangulation edges
const int* piIndex = m_aiIndex;
for (i = 0; i < m_iTQuantity; i++)
{
int iV0 = *piIndex++;
int iV1 = *piIndex++;
int iV2 = *piIndex++;
iX0 = (int)m_akVertex[iV0][0];
iY0 = (int)m_akVertex[iV0][1];
iX1 = (int)m_akVertex[iV1][0];
iY1 = (int)m_akVertex[iV1][1];
DrawLine(iX0,iY0,iX1,iY1,kGray);
iX0 = (int)m_akVertex[iV1][0];
iY0 = (int)m_akVertex[iV1][1];
iX1 = (int)m_akVertex[iV2][0];
iY1 = (int)m_akVertex[iV2][1];
DrawLine(iX0,iY0,iX1,iY1,kGray);
iX0 = (int)m_akVertex[iV2][0];
iY0 = (int)m_akVertex[iV2][1];
iX1 = (int)m_akVertex[iV0][0];
iY1 = (int)m_akVertex[iV0][1];
DrawLine(iX0,iY0,iX1,iY1,kGray);
}
// draw the polygon edges
for (int i0 = m_iVQuantity-1, i1 = 0; i1 < m_iVQuantity; i0 = i1++)
{
iX0 = (int)m_akVertex[i0][0];
iY0 = (int)m_akVertex[i0][1];
iX1 = (int)m_akVertex[i1][0];
iY1 = (int)m_akVertex[i1][1];
DrawLine(iX0,iY0,iX1,iY1,kBlue);
}
// draw the polygon vertices
for (i = 0; i < m_iVQuantity; i++)
{
iX0 = (int)m_akVertex[i][0];
iY0 = (int)m_akVertex[i][1];
for (int iDY = -1; iDY <= 1; iDY++)
{
for (int iDX = -1; iDX <= 1; iDX++)
{
SetPixel(iX0+iDX,iY0+iDY,kBlack);
}
}
}
WindowApplication2::OnDisplay();
}
//----------------------------------------------------------------------------
| 30.634921 | 78 | 0.525907 |
0e0c6135bb6004a72f5cf58ea0ed1409e1f9f9be | 3,634 | cpp | C++ | src/elements/cube.cpp | jamillosantos/imu-mock | 3d314e8ef37263d72fda412d6d40e522005405f8 | [
"MIT"
] | 1 | 2018-01-21T05:38:04.000Z | 2018-01-21T05:38:04.000Z | src/elements/cube.cpp | mote-robotics/imu-mock | 3d314e8ef37263d72fda412d6d40e522005405f8 | [
"MIT"
] | null | null | null | src/elements/cube.cpp | mote-robotics/imu-mock | 3d314e8ef37263d72fda412d6d40e522005405f8 | [
"MIT"
] | null | null | null | /**
* @author J. Santos <jamillo@gmail.com>
* @date October 06, 2016
*/
#include "cube.h"
draw::Colour elements::Cube::lineColour(1.0f, 1.0f, 1.0f, 0.6f);
elements::CubeColours::CubeColours() :
_top(draw::Colour::RED), _bottom(draw::Colour::ORANGE), _left(draw::Colour::YELLOW),
_right(draw::Colour::WHITE), _front(draw::Colour::BLUE), _back(draw::Colour::GREEN)
{ }
draw::Colour &elements::CubeColours::top()
{
return this->_top;
}
void elements::CubeColours::top(draw::Colour &top)
{
this->_top = top;
}
draw::Colour &elements::CubeColours::bottom()
{
return this->_bottom;
}
void elements::CubeColours::bottom(draw::Colour &bottom)
{
this->_bottom = bottom;
}
draw::Colour &elements::CubeColours::left()
{
return this->_left;
}
void elements::CubeColours::left(draw::Colour &left)
{
this->_left = left;
}
draw::Colour &elements::CubeColours::right()
{
return this->_right;
}
void elements::CubeColours::right(draw::Colour &right)
{
this->_right = right;
}
draw::Colour &elements::CubeColours::front()
{
return this->_front;
}
void elements::CubeColours::front(draw::Colour &front)
{
this->_front = front;
}
draw::Colour &elements::CubeColours::back()
{
return this->_back;
}
void elements::CubeColours::back(draw::Colour &back)
{
this->_back = back;
}
void elements::CubeColours::colour(const draw::Colour &colour)
{
this->_top = colour;
this->_bottom = colour;
this->_left = colour;
this->_right = colour;
this->_front = colour;
this->_back = colour;
}
void elements::Cube::draw()
{
glBegin(GL_QUADS);
{
// Top
this->_colour.top().draw();
glVertex3f(-0.5f, -0.5f, -0.5f);
glVertex3f(-0.5f, 0.5f, -0.5f);
glVertex3f(0.5f, 0.5f, -0.5f);
glVertex3f(0.5f, -0.5f, -0.5f);
// Bottom
this->_colour.bottom().draw();
glVertex3f(-0.5f, -0.5f, 0.5f);
glVertex3f(-0.5f, 0.5f, 0.5f);
glVertex3f(0.5f, 0.5f, 0.5f);
glVertex3f(0.5f, -0.5f, 0.5f);
// Left
this->_colour.left().draw();
glVertex3f(-0.5f, -0.5f, -0.5f);
glVertex3f(-0.5f, 0.5f, -0.5f);
glVertex3f(-0.5f, 0.5f, 0.5f);
glVertex3f(-0.5f, -0.5f, 0.5f);
// Right
this->_colour.right().draw();
glVertex3f(0.5f, -0.5f, -0.5f);
glVertex3f(0.5f, 0.5f, -0.5f);
glVertex3f(0.5f, 0.5f, 0.5f);
glVertex3f(0.5f, -0.5f, 0.5f);
// Front
this->_colour.front().draw();
glVertex3f(-0.5f, -0.5f, -0.5f);
glVertex3f(0.5f, -0.5f, -0.5f);
glVertex3f(0.5f, -0.5f, 0.5f);
glVertex3f(-0.5f, -0.5f, 0.5f);
// Back
this->_colour.back().draw();
glVertex3f(-0.5f, 0.5f, -0.5f);
glVertex3f(0.5f, 0.5f, -0.5f);
glVertex3f(0.5f, 0.5f, 0.5f);
glVertex3f(-0.5f, 0.5f, 0.5f);
}
glEnd();
// Draws the line contour of the cube.
glBegin(GL_LINES);
{
lineColour.draw();
glVertex3f(-0.5f, -0.5f, -0.5f);
glVertex3f(-0.5f, 0.5f, -0.5f);
glVertex3f( 0.5f, 0.5f, -0.5f);
glVertex3f( 0.5f, -0.5f, -0.5f);
glVertex3f(-0.5f, -0.5f, 0.5f);
glVertex3f(-0.5f, 0.5f, 0.5f);
glVertex3f( 0.5f, 0.5f, 0.5f);
glVertex3f( 0.5f, -0.5f, 0.5f);
glVertex3f(-0.5f, -0.5f, -0.5f);
glVertex3f(-0.5f, 0.5f, -0.5f);
glVertex3f(-0.5f, 0.5f, 0.5f);
glVertex3f(-0.5f, -0.5f, 0.5f);
glVertex3f( 0.5f, -0.5f, -0.5f);
glVertex3f( 0.5f, 0.5f, -0.5f);
glVertex3f( 0.5f, 0.5f, 0.5f);
glVertex3f( 0.5f, -0.5f, 0.5f);
glVertex3f(-0.5f, -0.5f, -0.5f);
glVertex3f( 0.5f, -0.5f, -0.5f);
glVertex3f( 0.5f, -0.5f, 0.5f);
glVertex3f(-0.5f, -0.5f, 0.5f);
glVertex3f(-0.5f, 0.5f, -0.5f);
glVertex3f( 0.5f, 0.5f, -0.5f);
glVertex3f( 0.5f, 0.5f, 0.5f);
glVertex3f(-0.5f, 0.5f, 0.5f);
}
glEnd();
}
elements::CubeColours &elements::Cube::colour()
{
return this->_colour;
} | 22.294479 | 85 | 0.61585 |
0e0db1fd0bd8ee19cec18d6339686fa9b66a0ebc | 1,052 | cpp | C++ | aws-cpp-sdk-servicecatalog/source/model/DescribePortfolioShareStatusRequest.cpp | Neusoft-Technology-Solutions/aws-sdk-cpp | 88c041828b0dbee18a297c3cfe98c5ecd0706d0b | [
"Apache-2.0"
] | 1 | 2022-02-12T08:09:30.000Z | 2022-02-12T08:09:30.000Z | aws-cpp-sdk-servicecatalog/source/model/DescribePortfolioShareStatusRequest.cpp | Neusoft-Technology-Solutions/aws-sdk-cpp | 88c041828b0dbee18a297c3cfe98c5ecd0706d0b | [
"Apache-2.0"
] | 1 | 2021-10-14T16:57:00.000Z | 2021-10-18T10:47:24.000Z | aws-cpp-sdk-servicecatalog/source/model/DescribePortfolioShareStatusRequest.cpp | ravindra-wagh/aws-sdk-cpp | 7d5ff01b3c3b872f31ca98fb4ce868cd01e97696 | [
"Apache-2.0"
] | 1 | 2021-11-09T11:58:03.000Z | 2021-11-09T11:58:03.000Z | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/servicecatalog/model/DescribePortfolioShareStatusRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ServiceCatalog::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribePortfolioShareStatusRequest::DescribePortfolioShareStatusRequest() :
m_portfolioShareTokenHasBeenSet(false)
{
}
Aws::String DescribePortfolioShareStatusRequest::SerializePayload() const
{
JsonValue payload;
if(m_portfolioShareTokenHasBeenSet)
{
payload.WithString("PortfolioShareToken", m_portfolioShareToken);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribePortfolioShareStatusRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWS242ServiceCatalogService.DescribePortfolioShareStatus"));
return headers;
}
| 23.909091 | 121 | 0.789924 |
97b98fef6f27bb72b87edcde7566c85b1db11509 | 5,127 | cc | C++ | chromeos/dbus/upstart_client.cc | metux/chromium-deb | 3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chromeos/dbus/upstart_client.cc | metux/chromium-deb | 3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chromeos/dbus/upstart_client.cc | metux/chromium-deb | 3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | // Copyright 2016 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 "chromeos/dbus/upstart_client.h"
#include "base/bind.h"
#include "base/memory/weak_ptr.h"
#include "dbus/bus.h"
#include "dbus/message.h"
#include "dbus/object_proxy.h"
namespace chromeos {
namespace {
const char kUpstartServiceName[] = "com.ubuntu.Upstart";
const char kUpstartJobInterface[] = "com.ubuntu.Upstart0_6.Job";
const char kUpstartStartMethod[] = "Start";
const char kUpstartRestartMethod[] = "Restart";
const char kUpstartStopMethod[] = "Stop";
const char kUpstartAuthPolicyPath[] = "/com/ubuntu/Upstart/jobs/authpolicyd";
const char kUpstartMediaAnalyticsPath[] =
"/com/ubuntu/Upstart/jobs/rtanalytics";
class UpstartClientImpl : public UpstartClient {
public:
UpstartClientImpl() : weak_ptr_factory_(this) {}
~UpstartClientImpl() override {}
// UpstartClient override.
void StartAuthPolicyService() override {
dbus::MethodCall method_call(kUpstartJobInterface, kUpstartStartMethod);
dbus::MessageWriter writer(&method_call);
writer.AppendArrayOfStrings(std::vector<std::string>());
writer.AppendBool(true); // Wait for response.
auth_proxy_->CallMethod(&method_call,
dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
base::Bind(&UpstartClientImpl::HandleAuthResponse,
weak_ptr_factory_.GetWeakPtr()));
}
void RestartAuthPolicyService() override {
dbus::MethodCall method_call(kUpstartJobInterface, kUpstartRestartMethod);
dbus::MessageWriter writer(&method_call);
writer.AppendArrayOfStrings(std::vector<std::string>());
writer.AppendBool(true); // Wait for response.
auth_proxy_->CallMethod(&method_call,
dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
base::Bind(&UpstartClientImpl::HandleAuthResponse,
weak_ptr_factory_.GetWeakPtr()));
}
void StartMediaAnalytics(const UpstartCallback& callback) override {
dbus::MethodCall method_call(kUpstartJobInterface, kUpstartStartMethod);
dbus::MessageWriter writer(&method_call);
writer.AppendArrayOfStrings(std::vector<std::string>());
writer.AppendBool(true); // Wait for response.
ma_proxy_->CallMethod(
&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
base::Bind(&UpstartClientImpl::HandleStartMediaAnalyticsResponse,
weak_ptr_factory_.GetWeakPtr(), callback));
}
void RestartMediaAnalytics(const UpstartCallback& callback) override {
dbus::MethodCall method_call(kUpstartJobInterface, kUpstartRestartMethod);
dbus::MessageWriter writer(&method_call);
writer.AppendArrayOfStrings(std::vector<std::string>());
writer.AppendBool(true); // Wait for response.
ma_proxy_->CallMethod(
&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
base::Bind(&UpstartClientImpl::HandleStartMediaAnalyticsResponse,
weak_ptr_factory_.GetWeakPtr(), callback));
}
void StopMediaAnalytics() override {
dbus::MethodCall method_call(kUpstartJobInterface, kUpstartStopMethod);
dbus::MessageWriter writer(&method_call);
writer.AppendArrayOfStrings(std::vector<std::string>());
writer.AppendBool(true); // Wait for response.
ma_proxy_->CallMethod(
&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
base::Bind(&UpstartClientImpl::HandleStopMediaAnalyticsResponse,
weak_ptr_factory_.GetWeakPtr()));
}
protected:
void Init(dbus::Bus* bus) override {
bus_ = bus;
auth_proxy_ = bus_->GetObjectProxy(
kUpstartServiceName, dbus::ObjectPath(kUpstartAuthPolicyPath));
ma_proxy_ = bus_->GetObjectProxy(
kUpstartServiceName, dbus::ObjectPath(kUpstartMediaAnalyticsPath));
}
private:
void HandleAuthResponse(dbus::Response* response) {
LOG_IF(ERROR, !response) << "Failed to signal Upstart, response is null";
}
void HandleStartMediaAnalyticsResponse(const UpstartCallback& callback,
dbus::Response* response) {
if (!response) {
LOG(ERROR) << "Failed to signal Upstart, response is null.";
callback.Run(false);
return;
}
callback.Run(true);
}
void HandleStopMediaAnalyticsResponse(dbus::Response* response) {
LOG_IF(ERROR, !response) << "Failed to signal Upstart, response is null";
}
dbus::Bus* bus_ = nullptr;
dbus::ObjectProxy* auth_proxy_ = nullptr;
dbus::ObjectProxy* ma_proxy_ = nullptr;
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<UpstartClientImpl> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(UpstartClientImpl);
};
} // namespace
UpstartClient::UpstartClient() {}
UpstartClient::~UpstartClient() {}
// static
UpstartClient* UpstartClient::Create() {
return new UpstartClientImpl();
}
} // namespace chromeos
| 36.621429 | 78 | 0.704115 |
97bb897a388326c6e4f0d84a8a136f3b232f9348 | 10,399 | cpp | C++ | light_caster/main.cpp | raylib-extras/examples-cpp | 1cac8ea52805c03d4fd29e924c854400f8ba72ef | [
"Zlib"
] | 10 | 2021-11-18T06:19:32.000Z | 2022-03-08T04:44:19.000Z | light_caster/main.cpp | raylib-extras/examples-cpp | 1cac8ea52805c03d4fd29e924c854400f8ba72ef | [
"Zlib"
] | 1 | 2022-01-02T05:27:00.000Z | 2022-03-24T04:42:40.000Z | light_caster/main.cpp | raylib-extras/examples-cpp | 1cac8ea52805c03d4fd29e924c854400f8ba72ef | [
"Zlib"
] | null | null | null | #include "raylib.h"
#include "raymath.h"
#include "rlgl.h"
// constants from OpenGL
#define GL_SRC_ALPHA 0x0302
#define GL_MIN 0x8007
#define GL_MAX 0x8008
#include <vector>
// Draw a gradient-filled circle
// NOTE: Gradient goes from inner radius (color1) to border (color2)
void DrawLightGradient(int centerX, int centerY, float innerRadius, float outterRadius, Color color1, Color color2)
{
rlCheckRenderBatchLimit(3 * 3 * 36);
if (innerRadius == 0)
{
DrawCircleGradient(centerX, centerY, outterRadius, color1, color2);
return;
}
rlBegin(RL_TRIANGLES);
for (int i = 0; i < 360; i += 10)
{
// inner triangle at color1
rlColor4ub(color1.r, color1.g, color1.b, color1.a);
rlVertex2f((float)centerX, (float)centerY);
rlVertex2f((float)centerX + sinf(DEG2RAD * i) * innerRadius, (float)centerY + cosf(DEG2RAD * i) * innerRadius);
rlVertex2f((float)centerX + sinf(DEG2RAD * (i + 10)) * innerRadius, (float)centerY + cosf(DEG2RAD * (i + 10)) * innerRadius);
if (outterRadius > innerRadius)
{
rlVertex2f((float)centerX + sinf(DEG2RAD * (i + 10)) * innerRadius, (float)centerY + cosf(DEG2RAD * (i + 10)) * innerRadius);
rlVertex2f((float)centerX + sinf(DEG2RAD * i) * innerRadius, (float)centerY + cosf(DEG2RAD * i) * innerRadius);
rlColor4ub(color2.r, color2.g, color2.b, color2.a);
rlVertex2f((float)centerX + sinf(DEG2RAD * i) * outterRadius, (float)centerY + cosf(DEG2RAD * i) * outterRadius);
rlColor4ub(color1.r, color1.g, color1.b, color1.a);
rlVertex2f((float)centerX + sinf(DEG2RAD * (i + 10)) * innerRadius, (float)centerY + cosf(DEG2RAD * (i + 10)) * innerRadius);
rlColor4ub(color2.r, color2.g, color2.b, color2.a);
rlVertex2f((float)centerX + sinf(DEG2RAD * i) * outterRadius, (float)centerY + cosf(DEG2RAD * i) * outterRadius);
rlVertex2f((float)centerX + sinf(DEG2RAD * (i + 10)) * outterRadius, (float)centerY + cosf(DEG2RAD * (i + 10)) * outterRadius);
}
}
rlEnd();
}
class LightInfo
{
public:
Vector2 Position = { 0,0 };
RenderTexture ShadowMask;
RenderTexture GlowTexture;
bool Valid = false;
bool HasColor = false;
Color LightColor = WHITE;
LightInfo()
{
ShadowMask = LoadRenderTexture(GetScreenWidth(), GetScreenHeight());
GlowTexture = LoadRenderTexture(GetScreenWidth(), GetScreenHeight());
UpdateLightMask();
}
LightInfo(const Vector2& pos)
{
ShadowMask = LoadRenderTexture(GetScreenWidth(), GetScreenHeight());
GlowTexture = LoadRenderTexture(GetScreenWidth(), GetScreenHeight());
UpdateLightMask();
Position = pos;
}
void Move(const Vector2& position)
{
Position = position;
Dirty = true;
}
void SetRadius(float outerRadius)
{
OuterRadius = outerRadius;
Dirty = true;
}
void SetColor(Color color)
{
HasColor = true;
LightColor = color;
}
bool BoxInLight(const Rectangle& box)
{
return CheckCollisionRecs(Bounds, box);
}
void ShadowEdge(const Vector2& sp, const Vector2& ep)
{
float extension = OuterRadius*2;
Vector2 spVector = Vector2Normalize(Vector2Subtract(sp, Position));
Vector2 spProjection = Vector2Add(sp, Vector2Scale(spVector, extension));
Vector2 epVector = Vector2Normalize(Vector2Subtract(ep, Position));
Vector2 epProjection = Vector2Add(ep, Vector2Scale(epVector, extension));
std::vector<Vector2> polygon;
polygon.push_back(sp);
polygon.push_back(ep);
polygon.push_back(epProjection);
polygon.push_back(spProjection);
Shadows.push_back(polygon);
}
void UpdateLightMask()
{
BeginTextureMode(ShadowMask);
ClearBackground(WHITE);
// force the blend mode to only set the alpha of the destination
rlSetBlendFactors(GL_SRC_ALPHA, GL_SRC_ALPHA, GL_MIN);
rlSetBlendMode(BLEND_CUSTOM);
if (Valid)
DrawLightGradient(Position.x, Position.y, InnerRadius, OuterRadius, ColorAlpha(WHITE,0), WHITE);
rlDrawRenderBatchActive();
rlSetBlendMode(BLEND_ALPHA);
rlSetBlendFactors(GL_SRC_ALPHA, GL_SRC_ALPHA, GL_MAX);
rlSetBlendMode(BLEND_CUSTOM);
for (std::vector<Vector2> shadow : Shadows)
{
DrawTriangleFan(&shadow[0], 4, WHITE);
}
rlDrawRenderBatchActive();
// go back to normal
rlSetBlendMode(BLEND_ALPHA);
EndTextureMode();
BeginTextureMode(GlowTexture);
ClearBackground(BLANK);
if (Valid)
DrawLightGradient(Position.x, Position.y, InnerRadius, OuterRadius, ColorAlpha(LightColor, 0.75f), ColorAlpha(LightColor, 0));
rlDrawRenderBatchActive();
rlSetBlendFactors(GL_SRC_ALPHA, GL_SRC_ALPHA, GL_MIN);
rlSetBlendMode(BLEND_CUSTOM);
for (std::vector<Vector2> shadow : Shadows)
{
DrawTriangleFan(&shadow[0], 4, BLANK);
}
rlDrawRenderBatchActive();
// go back to normal
rlSetBlendMode(BLEND_ALPHA);
EndTextureMode();
}
void Update(const std::vector<Rectangle>& boxes)
{
if (!Dirty)
return;
Dirty = false;
Bounds.x = Position.x - OuterRadius;
Bounds.y = Position.y - OuterRadius;
Bounds.width = OuterRadius * 2;
Bounds.height = OuterRadius * 2;
Shadows.clear();
for (const auto& box : boxes)
{
// are we in a box
if (CheckCollisionPointRec(Position, box))
return;
if (!CheckCollisionRecs(box, Bounds))
continue;
// compute shadow volumes for the faces we are opposite to
// top
Vector2 sp = { box.x, box.y };
Vector2 ep = { box.x + box.width, box.y };
if (Position.y > ep.y)
ShadowEdge(sp, ep);
// right
sp = ep;
ep.y += box.height;
if (Position.x < ep.x)
ShadowEdge(sp, ep);
// bottom
sp = ep;
ep.x -= box.width;
if (Position.y < ep.y)
ShadowEdge(sp, ep);
// left
sp = ep;
ep.y -= box.height;
if (Position.x > ep.x)
ShadowEdge(sp, ep);
// add the actual box as a shadow to get the corner of it.
// If the map is going to draw the box, then don't do this
std::vector<Vector2> polygon;
polygon.emplace_back(Vector2{ box.x, box.y });
polygon.emplace_back(Vector2{ box.x, box.y + box.height });
polygon.emplace_back(Vector2{ box.x + box.width, box.y + box.height });
polygon.emplace_back(Vector2{ box.x + box.width, box.y });
Shadows.push_back(polygon);
}
Valid = true;
UpdateLightMask();
}
float OuterRadius = 200;
float InnerRadius = 50;
Rectangle Bounds = { -150,-150,300,300 };
std::vector<std::vector<Vector2>> Shadows;
bool Dirty = true;
};
std::vector<Rectangle> Boxes;
Rectangle RandomBox()
{
float x = GetRandomValue(0, GetScreenWidth());
float y = GetRandomValue(0, GetScreenHeight());
float w = GetRandomValue(10,100);
float h = GetRandomValue(10,100);
return Rectangle{ x,y,w,h };
}
void SetupBoxes(const Vector2& startPos)
{
Boxes.emplace_back(Rectangle{ 50,50, 40, 40 });
Boxes.emplace_back(Rectangle{ 1200, 700, 40, 40 });
Boxes.emplace_back(Rectangle{ 200, 600, 40, 40 });
Boxes.emplace_back(Rectangle{ 1000, 50, 40, 40 });
Boxes.emplace_back(Rectangle{ 500, 350, 40, 40 });
for (int i = 0; i < 50; i++)
{
Rectangle rect = RandomBox();
while (CheckCollisionPointRec(startPos,rect))
rect = RandomBox();
Boxes.emplace_back(rect);
}
}
int main()
{
SetConfigFlags(/*FLAG_VSYNC_HINT ||*/ FLAG_MSAA_4X_HINT);
InitWindow(1280, 800, "LightCaster");
// SetTargetFPS(144);
RenderTexture LightMask = LoadRenderTexture(GetScreenWidth(), GetScreenHeight());
std::vector<LightInfo> Lights;
Lights.emplace_back();
Lights[0].Move(Vector2{ 600, 400 });
SetupBoxes(Lights[0].Position);
Image img = GenImageChecked(64, 64, 32, 32, GRAY, DARKGRAY);
Texture2D tile = LoadTextureFromImage(img);
UnloadImage(img);
bool showLines = false;
while (!WindowShouldClose())
{
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT))
Lights[0].Move(GetMousePosition());
if (IsMouseButtonPressed(MOUSE_BUTTON_RIGHT))
{
Lights.emplace_back(GetMousePosition());
switch ((Lights.size() - 1) % 3)
{
default:
Lights.rbegin()->SetColor(YELLOW);
break;
case 1:
Lights.rbegin()->SetColor(BLUE);
break;
case 2:
Lights.rbegin()->SetColor(RED);
break;
case 3:
Lights.rbegin()->SetColor(GREEN);
break;
}
}
float delta = GetMouseWheelMove();
if (delta != 0)
{
float newRad = Lights[0].OuterRadius;
newRad += delta * 10;
if (newRad > Lights[0].InnerRadius)
Lights[0].SetRadius(newRad);
}
if (IsKeyPressed(KEY_F1))
showLines = !showLines;
bool dirtyLights = false;
for (auto& light : Lights)
{
if (light.Dirty)
dirtyLights = true;
light.Update(Boxes);
}
// update the light mask
if (dirtyLights)
{
// build up the light mask
BeginTextureMode(LightMask);
ClearBackground(BLACK);
// force the blend mode to only set the alpha of the destination
rlSetBlendFactors(GL_SRC_ALPHA, GL_SRC_ALPHA, GL_MIN);
rlSetBlendMode(BLEND_CUSTOM);
for (auto& light : Lights)
{
// if (light.Valid)
DrawTextureRec(light.ShadowMask.texture, Rectangle{ 0, 0, (float)GetScreenWidth(), -(float)GetScreenHeight() }, Vector2Zero(), WHITE);
}
rlDrawRenderBatchActive();
// go back to normal
rlSetBlendMode(BLEND_ALPHA);
EndTextureMode();
}
BeginDrawing();
ClearBackground(BLACK);
DrawTextureRec(tile, Rectangle{ 0,0,(float)GetScreenWidth(),(float)GetScreenHeight() }, Vector2Zero(), WHITE);
rlSetBlendMode(BLEND_ADDITIVE);
for (auto& light : Lights)
{
if (light.HasColor)
DrawTextureRec(light.GlowTexture.texture, Rectangle{ 0, 0, (float)GetScreenWidth(), -(float)GetScreenHeight() }, Vector2Zero(), WHITE);
}
rlDrawRenderBatchActive();
rlSetBlendMode(BLEND_ALPHA);
DrawTextureRec(LightMask.texture, Rectangle{ 0, 0, (float)GetScreenWidth(), -(float)GetScreenHeight() }, Vector2Zero(), ColorAlpha(WHITE, showLines ? 0.75f : 1.0f));
for (auto& light : Lights)
DrawCircle(int(light.Position.x), int(light.Position.y), 10, light.LightColor);
if (showLines)
{
for (std::vector<Vector2> shadow : Lights[0].Shadows)
{
DrawTriangleFan(&shadow[0], 4, DARKPURPLE);
}
for (const auto& box : Boxes)
{
if (Lights[0].BoxInLight(box))
DrawRectangleRec(box, PURPLE);
}
for (const auto& box : Boxes)
{
DrawRectangleLines(box.x,box.y, box.width, box.height, DARKBLUE);
}
DrawText("(F1) Hide Shadow Volumes", 0, 0, 20, GREEN);
}
else
{
DrawText("(F1) Show Shadow Volumes", 0, 0, 20, GREEN);
}
DrawFPS(1200, 0);
DrawText(TextFormat("Lights %d", (int)Lights.size()), 1050, 20, 20, GREEN);
EndDrawing();
}
CloseWindow();
return 0;
} | 24.64218 | 167 | 0.683623 |
97bc92512489c19bd54536f23f947fe46fb8292e | 591 | cpp | C++ | src/J/J102.cpp | wlhcode/lscct | 7fd112a9d1851ddcf41886d3084381a52e84a3ce | [
"MIT"
] | null | null | null | src/J/J102.cpp | wlhcode/lscct | 7fd112a9d1851ddcf41886d3084381a52e84a3ce | [
"MIT"
] | null | null | null | src/J/J102.cpp | wlhcode/lscct | 7fd112a9d1851ddcf41886d3084381a52e84a3ce | [
"MIT"
] | null | null | null | #include<bits/stdc++.h>
using namespace std;
int r[200005][4];
int main(){
int x,y,n,a=0,q=0;
bool small=0;
cin>>y>>x>>n;
for(int i=1;i<=n;i++){
cin>>r[i][0]>>r[i][1]>>r[i][2];
if(r[i][0]>=y&&q==0) q=i-1;
if(r[i][0]<y) small=1;
}
if(q==0&&small) q=n;
if(!small) q=0;
while(q>0){
y=r[q][0];
bool gone=0;
while(r[q][0]==y){
if(!gone&&r[q][1]>r[q][2]&&x<=r[q][1]&&x>=r[q][2]){
x=r[q][2];
a++;
gone=1;
}
else if(!gone&&r[q][1]<r[q][2]&&x>=r[q][1]&&x<=r[q][2]){
x=r[q][2];
a++;
gone=1;
}
q--;
if(q<=0) break;
}
}
cout<<a<<endl;
}
| 16.885714 | 59 | 0.431472 |
97c34395c7e4e97ef721670fb96a4cc1f4e2fcac | 2,765 | cpp | C++ | src/installerapplication.cpp | CommitteeOfZero/noidget | 1ba0b37f7552c1659a8a7c8dd62893c9eece702a | [
"MIT"
] | null | null | null | src/installerapplication.cpp | CommitteeOfZero/noidget | 1ba0b37f7552c1659a8a7c8dd62893c9eece702a | [
"MIT"
] | null | null | null | src/installerapplication.cpp | CommitteeOfZero/noidget | 1ba0b37f7552c1659a8a7c8dd62893c9eece702a | [
"MIT"
] | null | null | null | #include "installerapplication.h"
#include "installerwindow.h"
#include <api/apihost.h>
#include "fs.h"
#include <tx/transaction.h>
#include "receiptwriter.h"
#include "win32_registry.h"
#include <QFile>
#include <QTextStream>
#include <QStyleFactory>
#include <QResource>
#include <QMessageBox>
#include <QScriptEngineAgent>
#ifdef SCRIPT_DEBUG
#include <QScriptEngineDebugger>
#include <QAction>
#endif
class ErrorAgent : public QScriptEngineAgent {
public:
ErrorAgent(QScriptEngine* engine) : QScriptEngineAgent(engine) {}
void exceptionThrow(qint64 scriptId, const QScriptValue& exception,
bool hasHandler) override {
if (hasHandler) return;
QMessageBox mb(ngApp->window());
mb.setText(
QString("Script error (please send this to patch developers):\n%1")
.arg(exception.toString()));
mb.setDetailedText(engine()->currentContext()->backtrace().join('\n'));
mb.setWindowTitle("Script error");
mb.exec();
}
};
InstallerApplication::InstallerApplication(int& argc, char** argv)
: QApplication(argc, argv) {
// Despite Q_ENUM this is apparently required for use in signals
qRegisterMetaType<InstallerApplication::State>(
"InstallerApplication::State");
_currentState = State::Preparation;
if (!QResource::registerResource("userdata.rcc")) {
QMessageBox::critical(0, "Error",
"Could not load userdata.rcc (are you running "
"the installer out of its directory?)");
exit(1);
return;
}
w = new InstallerWindow(0);
// we do not set these globally so that we can have unthemed dialogs
w->setStyle(QStyleFactory::create("windows"));
QFile qssFile(":/kofuna/style.qss");
qssFile.open(QFile::ReadOnly | QFile::Text);
QTextStream ts(&qssFile);
w->setStyleSheet(ts.readAll());
h = new api::ApiHost(0);
_fs = new Fs(this);
#ifdef Q_OS_WIN32
_registry = new Registry(this);
#endif
_receipt = new ReceiptWriter(this);
_tx = new Transaction(this);
QFile scriptFile(":/userdata/script.js");
scriptFile.open(QFile::ReadOnly | QFile::Text);
QTextStream ts2(&scriptFile);
#ifdef SCRIPT_DEBUG
QScriptEngineDebugger* debugger = new QScriptEngineDebugger(this);
debugger->attachTo(h->engine());
debugger->action(QScriptEngineDebugger::InterruptAction)->trigger();
#else
ErrorAgent* agent = new ErrorAgent(h->engine());
h->engine()->setAgent(agent);
#endif
h->engine()->evaluate(ts2.readAll(), "script.js");
}
InstallerApplication::~InstallerApplication() {
if (w) delete w;
if (h) delete h;
}
void InstallerApplication::showWindow() { w->show(); } | 29.414894 | 79 | 0.662929 |
97c48b8a9788a1ab9232e0d8f1621cfa722de560 | 99 | hpp | C++ | templates/include/Quote.hpp | mcqueen256/mql4dllft | 2b918da25efa8056eca967e4d40d07487f030ee8 | [
"MIT"
] | null | null | null | templates/include/Quote.hpp | mcqueen256/mql4dllft | 2b918da25efa8056eca967e4d40d07487f030ee8 | [
"MIT"
] | 11 | 2017-07-11T22:26:44.000Z | 2017-07-20T04:14:54.000Z | templates/include/Quote.hpp | mcqueen256/mql4dllft | 2b918da25efa8056eca967e4d40d07487f030ee8 | [
"MIT"
] | null | null | null | #ifndef QUOTE_HPP
#define QUOTE_HPP
class Quote {
private:
public:
Quote();
~Quote();
};
#endif | 9 | 17 | 0.686869 |
97c5775757ddabd48f6c0aadaef9348ed40d34f0 | 7,770 | cpp | C++ | src/protocol/websocket/client.cpp | cysme/pump | d91cfdf3e09ebca1e90f0c1395a3b3fba1158a0c | [
"Apache-2.0"
] | 2 | 2020-07-16T04:57:40.000Z | 2020-11-24T10:33:48.000Z | src/protocol/websocket/client.cpp | jimi36/pump | d91cfdf3e09ebca1e90f0c1395a3b3fba1158a0c | [
"Apache-2.0"
] | 2 | 2020-12-23T09:40:16.000Z | 2021-03-03T09:49:36.000Z | src/protocol/websocket/client.cpp | cysme/pump | d91cfdf3e09ebca1e90f0c1395a3b3fba1158a0c | [
"Apache-2.0"
] | 3 | 2020-11-24T10:33:35.000Z | 2021-04-19T01:53:24.000Z | /*
* Copyright (C) 2015-2018 ZhengHaiTao <ming8ren@163.com>
*
* 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.
*/
// Import std::find function
#include <algorithm>
#include "pump/transport/tcp_dialer.h"
#include "pump/transport/tls_dialer.h"
#include "pump/protocol/websocket/utils.h"
#include "pump/protocol/websocket/client.h"
namespace pump {
namespace protocol {
namespace websocket {
client::client(const std::string &url,
const std::map<std::string, std::string> &headers) noexcept
: started_(false),
sv_(nullptr),
is_upgraded_(false),
upgrade_url_(url),
upgrade_req_headers_(headers) {
}
bool client::start(service_ptr sv,const client_callbacks &cbs) {
// Check service.
if (!sv) {
return false;
}
// Check callbacks.
if (!cbs.started_cb ||!cbs.data_cb || !cbs.error_cb) {
return false;
}
// Set and check started state.
if (started_.exchange(true)) {
return false;
}
sv_ = sv;
cbs_ = cbs;
if (!__start()) {
return false;
}
return true;
}
void client::stop() {
// Set and check started state.
if (!started_.exchange(false)) {
return;
}
// Stop dialer.
if (dialer_ && dialer_->is_started()) {
dialer_->stop();
}
// Stop connection.
if (conn_ && conn_->is_valid()) {
conn_->stop();
}
}
bool client::send(const block_t *b, int32_t size) {
// Check started state.
if (!started_.load()) {
return false;
}
// Check connection.
if (!conn_ || !conn_->is_valid()) {
return false;
}
return conn_->send(b, size);
}
void client::on_dialed(client_wptr wptr,
transport::base_transport_sptr &transp,
bool succ) {
PUMP_LOCK_WPOINTER(cli, wptr);
if (cli) {
if (!succ) {
cli->cbs_.error_cb("client dial error");
return;
}
upgrade_callbacks ucbs;
ucbs.pocket_cb = pump_bind(&client::on_upgrade_response, wptr, _1);
ucbs.error_cb = pump_bind(&client::on_error, wptr, _1);
cli->conn_.reset(new connection(cli->sv_, transp, true));
if (cli->conn_->start_upgrade(true, ucbs)) {
cli->cbs_.error_cb("client transport start error");
return;
}
std::string data;
PUMP_ASSERT(cli->upgrade_req_);
cli->upgrade_req_->serialize(data);
if (!cli->conn_->send_buffer(data.c_str(), (int32_t)data.size())) {
cli->cbs_.error_cb("client connection send upgrade request error");
}
// Check started state
if (!cli->started_.load()) {
cli->conn_->stop();
}
}
}
void client::on_dial_timeouted(client_wptr wptr) {
PUMP_LOCK_WPOINTER(cli, wptr);
if (cli) {
cli->cbs_.error_cb("client dial timeouted");
}
}
void client::on_dial_stopped(client_wptr wptr) {
PUMP_LOCK_WPOINTER(cli, wptr);
if (cli) {
cli->cbs_.error_cb("client dial stopped");
}
}
void client::on_upgrade_response(client_wptr wptr, http::pocket_sptr pk) {
PUMP_LOCK_WPOINTER(cli, wptr);
if (cli) {
auto resp = std::static_pointer_cast<http::response>(pk);
if (!cli->__check_upgrade_response(resp)) {
cli->cbs_.error_cb("client connection upgrade response invalid");
return;
}
cli->cbs_.started_cb();
connection_callbacks cbs;
cbs.frame_cb = pump_bind(&client::on_frame, wptr, _1, _2, _3);
cbs.error_cb = pump_bind(&client::on_error, wptr, _1);
if (!cli->conn_->start(cbs)) {
cli->cbs_.error_cb("client connection start error");
}
}
}
void client::on_frame(client_wptr wptr, const block_t *b, int32_t size, bool end) {
PUMP_LOCK_WPOINTER(cli, wptr);
if (cli) {
cli->cbs_.data_cb(b, size, end);
}
}
void client::on_error(client_wptr wptr, const std::string &msg) {
PUMP_LOCK_WPOINTER(cli, wptr);
if (cli) {
cli->conn_.reset();
cli->cbs_.error_cb(msg);
}
}
bool client::__start() {
// Create upgrade request
upgrade_req_.reset(new http::request(upgrade_url_));
upgrade_req_->set_http_version(http::VERSION_11);
upgrade_req_->set_method(http::METHOD_GET);
for (auto &h : upgrade_req_headers_) {
upgrade_req_->set_head(h.first, h.second);
}
auto u = upgrade_req_->get_uri();
if (!upgrade_req_->has_head("Host")) {
upgrade_req_->set_unique_head("Host", u->get_host());
}
upgrade_req_->set_unique_head("Connection", "Upgrade");
upgrade_req_->set_unique_head("Upgrade", "websocket");
upgrade_req_->set_unique_head("Sec-WebSocket-Version", "13");
upgrade_req_->set_unique_head("Sec-WebSocket-Key", compute_sec_key());
// Init bind address
transport::address bind_address("0.0.0.0", 0);
// Create transport dialer
if (u->get_type() == http::URI_WSS) {
auto peer_address = http::host_to_address(true, u->get_host());
dialer_ = transport::tcp_dialer::create(bind_address, peer_address, 3000);
} else if (u->get_type() == http::URI_WS) {
auto peer_address = http::host_to_address(false, u->get_host());
dialer_ = transport::tls_dialer::create(bind_address, peer_address, 3000, 3000);
} else {
return false;
}
// Start transport dialer
transport::dialer_callbacks cbs;
cbs.dialed_cb = pump_bind(&client::on_dialed, shared_from_this(), _1, _2);
cbs.timeouted_cb = pump_bind(&client::on_dial_timeouted, shared_from_this());
cbs.stopped_cb = pump_bind(&client::on_dial_stopped, shared_from_this());
if (!dialer_->start(sv_, cbs)) {
return false;
}
return true;
}
bool client::__check_upgrade_response(http::response_sptr &resp) {
if (resp->get_status_code() != 101 ||
resp->get_http_version() != http::VERSION_11) {
return false;
}
std::string upgrade;
if (!resp->get_head("Upgrade", upgrade) || upgrade != "websocket") {
return false;
}
std::vector<std::string> connection;
if (!resp->get_head("Connection", connection) ||
std::find(connection.begin(), connection.end(), "Upgrade") ==
connection.end()) {
return false;
}
std::string sec_accept;
if (!resp->get_head("Sec-WebSocket-Accept", sec_accept)) {
return false;
}
return true;
}
} // namespace websocket
} // namespace protocol
} // namespace pump
| 31.714286 | 92 | 0.563964 |
97c76b6ded2d81f894df6d6bec179d34d02bd5ed | 5,538 | cpp | C++ | packages/monte_carlo/event/estimator/test/tstSurfaceFluxEstimatorDagMC.cpp | bam241/FRENSIE | e1760cd792928699c84f2bdce70ff54228e88094 | [
"BSD-3-Clause"
] | 10 | 2019-11-14T19:58:30.000Z | 2021-04-04T17:44:09.000Z | packages/monte_carlo/event/estimator/test/tstSurfaceFluxEstimatorDagMC.cpp | bam241/FRENSIE | e1760cd792928699c84f2bdce70ff54228e88094 | [
"BSD-3-Clause"
] | 43 | 2020-03-03T19:59:20.000Z | 2021-09-08T03:36:08.000Z | packages/monte_carlo/event/estimator/test/tstSurfaceFluxEstimatorDagMC.cpp | bam241/FRENSIE | e1760cd792928699c84f2bdce70ff54228e88094 | [
"BSD-3-Clause"
] | 6 | 2020-02-12T17:37:07.000Z | 2020-09-08T18:59:51.000Z | //---------------------------------------------------------------------------//
//!
//! \file tstSurfaceFluxEstimatorDagMC.cpp
//! \author Alex Robinson
//! \brief Surface flux estimator using DagMC unit tests.
//!
//---------------------------------------------------------------------------//
// Std Lib Includes
#include <iostream>
// FRENSIE Includes
#include "MonteCarlo_SurfaceFluxEstimator.hpp"
#include "MonteCarlo_PhotonState.hpp"
#include "Geometry_DagMCModel.hpp"
#include "Utility_UnitTestHarnessWithMain.hpp"
//---------------------------------------------------------------------------//
// Testing Variables
//---------------------------------------------------------------------------//
std::shared_ptr<const Geometry::Model> model;
//---------------------------------------------------------------------------//
// Tests.
//---------------------------------------------------------------------------//
// Check that the surface areas can be extracted if a DagMC model is used
FRENSIE_UNIT_TEST_TEMPLATE( SurfaceFluxEstimator,
constructor,
MonteCarlo::WeightMultiplier,
MonteCarlo::WeightAndEnergyMultiplier,
MonteCarlo::WeightAndChargeMultiplier )
{
FETCH_TEMPLATE_PARAM( 0, ContributionMultiplierPolicy );
std::shared_ptr<MonteCarlo::Estimator> estimator;
std::vector<MonteCarlo::StandardSurfaceEstimator::SurfaceIdType>
surface_ids( {46, 53, 55, 57, 58, 83, 86, 89, 92, 425, 434} );
FRENSIE_REQUIRE_NO_THROW( estimator.reset( new MonteCarlo::SurfaceFluxEstimator<ContributionMultiplierPolicy>(
0u,
10.0,
surface_ids,
*model ) ) );
FRENSIE_REQUIRE( estimator->isEntityAssigned( 46 ) );
FRENSIE_CHECK_FLOATING_EQUALITY( estimator->getEntityNormConstant( 46 ),
2.848516339523823717e+02,
1e-15 );
FRENSIE_REQUIRE( estimator->isEntityAssigned( 53 ) );
FRENSIE_CHECK_FLOATING_EQUALITY( estimator->getEntityNormConstant( 53 ),
9.773235727898624248e+01,
1e-15 );
FRENSIE_REQUIRE( estimator->isEntityAssigned( 55 ) );
FRENSIE_CHECK_FLOATING_EQUALITY( estimator->getEntityNormConstant( 55 ),
1.666730003051475251e+01,
1e-15 );
FRENSIE_REQUIRE( estimator->isEntityAssigned( 57 ) );
FRENSIE_CHECK_FLOATING_EQUALITY( estimator->getEntityNormConstant( 57 ),
2.594277176251208061e+02,
1e-15 );
FRENSIE_REQUIRE( estimator->isEntityAssigned( 58 ) );
FRENSIE_CHECK_FLOATING_EQUALITY( estimator->getEntityNormConstant( 58 ),
3.715085987553494107e+01,
1e-15 );
FRENSIE_REQUIRE( estimator->isEntityAssigned( 83 ) );
FRENSIE_CHECK_FLOATING_EQUALITY( estimator->getEntityNormConstant( 83 ),
6.714270351030512529e+01,
1e-15 );
FRENSIE_REQUIRE( estimator->isEntityAssigned( 86 ) );
FRENSIE_CHECK_FLOATING_EQUALITY( estimator->getEntityNormConstant( 86 ),
3.165650076907713384e-01,
1e-15 );
FRENSIE_REQUIRE( estimator->isEntityAssigned( 89 ) );
FRENSIE_CHECK_FLOATING_EQUALITY( estimator->getEntityNormConstant( 89 ),
3.165650076907712274e-01,
1e-15 );
FRENSIE_REQUIRE( estimator->isEntityAssigned( 92 ) );
FRENSIE_CHECK_FLOATING_EQUALITY( estimator->getEntityNormConstant( 92 ),
3.165650076907711163e-01,
1e-15 );
FRENSIE_REQUIRE( estimator->isEntityAssigned( 425 ) );
FRENSIE_CHECK_FLOATING_EQUALITY( estimator->getEntityNormConstant( 425 ),
8.970071513450820433,
1e-15 );
FRENSIE_REQUIRE( estimator->isEntityAssigned( 434 ) );
FRENSIE_CHECK_FLOATING_EQUALITY( estimator->getEntityNormConstant( 434 ),
4.002587201643236448,
1e-15 );
}
//---------------------------------------------------------------------------//
// Custom setup
//---------------------------------------------------------------------------//
FRENSIE_CUSTOM_UNIT_TEST_SETUP_BEGIN();
std::string test_dagmc_geom_file_name;
FRENSIE_CUSTOM_UNIT_TEST_COMMAND_LINE_OPTIONS()
{
ADD_STANDARD_OPTION_AND_ASSIGN_VALUE( "test_cad_file",
test_dagmc_geom_file_name, "",
"Test CAD file name" );
}
FRENSIE_CUSTOM_UNIT_TEST_INIT()
{
Geometry::DagMCModelProperties local_properties( test_dagmc_geom_file_name );
local_properties.setTerminationCellPropertyName( "graveyard" );
local_properties.setMaterialPropertyName( "mat" );
local_properties.setDensityPropertyName( "rho" );
local_properties.setEstimatorPropertyName( "tally" );
model.reset( new Geometry::DagMCModel( local_properties ) );
}
FRENSIE_CUSTOM_UNIT_TEST_SETUP_END();
//---------------------------------------------------------------------------//
// end tstSurfaceFluxEstimatorDagMC.cpp
//---------------------------------------------------------------------------//
| 41.328358 | 112 | 0.524016 |
97c7fe1215edf4b42686f017ef6d2281e3ab6088 | 22,669 | cpp | C++ | apc_grasping/src/fill_bins_and_tote.cpp | Juxi/apb-baseline | fd47a5fd78cdfd75c68601a40ca4726d7d20c9ce | [
"BSD-3-Clause"
] | 9 | 2017-02-06T10:24:56.000Z | 2022-02-27T20:59:52.000Z | apc_grasping/src/fill_bins_and_tote.cpp | Juxi/apb-baseline | fd47a5fd78cdfd75c68601a40ca4726d7d20c9ce | [
"BSD-3-Clause"
] | null | null | null | apc_grasping/src/fill_bins_and_tote.cpp | Juxi/apb-baseline | fd47a5fd78cdfd75c68601a40ca4726d7d20c9ce | [
"BSD-3-Clause"
] | 2 | 2017-10-15T08:33:37.000Z | 2019-03-05T07:29:38.000Z | /*
Copyright 2016 Australian Centre for Robotic Vision
*/
#include <geometry_msgs/Pose.h>
#include <ros/ros.h>
#include <moveit_msgs/CollisionObject.h>
#include <moveit_msgs/PlanningScene.h>
#include <apc_msgs/FillUnfillBinsCollisionModel.h>
#include <std_srvs/SetBool.h>
#include <std_srvs/Trigger.h>
#include <xmlrpc.h>
#include <tf/tf.h>
#include <tf/transform_datatypes.h>
#include <tf/transform_broadcaster.h>
std::vector<std::string> BINS = {
"bin_A", "bin_B", "bin_C", "bin_D", "bin_E", "bin_F",
"bin_G", "bin_H", // "bin_I", "bin_J", "bin_K", "bin_L",
};
double SHELF_LIP_THICKNESS = 0.0;
tf::Transform tote_tf;
bool publish_tf = false;
bool tf_published = false;
tf::TransformBroadcaster *br;
class CollisionInterface {
private:
std::string planning_scene_topic_;
XmlRpc::XmlRpcValue shelf_layout_;
XmlRpc::XmlRpcValue tote_information_;
bool tote_on_;
bool pillar_on_;
ros::Publisher planning_scene_publisher_;
ros::NodeHandle nh_;
std::string current_bin;
public:
// Constuctor
CollisionInterface() {
ROS_INFO("[Constructor] we need a node handle at least...");
exit(1);
}
CollisionInterface(ros::NodeHandle& nh, std::string scene_topic) {
nh_ = nh;
planning_scene_topic_ = scene_topic;
init();
}
CollisionInterface(ros::NodeHandle& nh) {
nh_ = nh;
init();
}
~CollisionInterface() {}
// create and advertise the publisher to the planning scene
void createPublisher() {
planning_scene_publisher_ = nh_.advertise<moveit_msgs::PlanningScene>(
planning_scene_topic_.c_str(), 1);
}
// get shelf layout from parameter server
void getShelfLayout() {
nh_.getParam("shelf_layout", shelf_layout_);
}
// get tote information from parameter server
void getToteInformation() {
nh_.getParam("tote_information", tote_information_);
}
// initialise various bits and pieces
void init() {
tote_on_ = false;
pillar_on_ = false;
createPublisher();
getShelfLayout();
getToteInformation();
}
// setters and getters
std::string getPlanningSceneTopic() {
return planning_scene_topic_;
}
void setPlanningSceneTopic(std::string scene_topic) {
planning_scene_topic_ = scene_topic;
}
int getNumSubscribers() {
return planning_scene_publisher_.getNumSubscribers();
}
bool toggleLipFillbox(std_srvs::SetBool::Request & req,
std_srvs::SetBool::Response& res) {
// getShelfLayout();
// std::string bin_name = current_bin;
// moveit_msgs::PlanningScene planning_scene_diff;
//
// if (req.data) {
// moveit_msgs::CollisionObject collision_object;
//
// collision_object.operation = moveit_msgs::CollisionObject::ADD;
//
// shape_msgs::SolidPrimitive primitive;
// primitive.type = primitive.BOX;
//
// geometry_msgs::Pose pose;
//
// planning_scene_diff.is_diff = true;
//
// planning_scene_diff.world.collision_objects.clear();
//
// double side_h = 0.08;
// double side_w = shelf_layout_[bin_name]["bin_width"];
// double side_d = 0.05;
// collision_object.id = bin_name + "_lip_fillbox";
// collision_object.header.frame_id = bin_name;
// primitive.dimensions = { side_h, side_w, side_d };
// collision_object.primitives.clear();
// collision_object.primitives.push_back(primitive);
// collision_object.primitive_poses.clear();
// setGeometry(pose, side_h, -1.0 * side_w, -1.0 * side_d);
// double bin_height = shelf_layout_[bin_name]["bin_height"];
// pose.position.x += bin_height - 0.04;
// ROS_INFO_STREAM(pose);
// collision_object.primitive_poses.push_back(pose);
// ROS_INFO_STREAM(collision_object);
// planning_scene_diff.world.collision_objects.push_back(
// collision_object);
// } else {
// moveit_msgs::CollisionObject detach_object;
// detach_object.operation = moveit_msgs::CollisionObject::REMOVE;
// moveit_msgs::PlanningScene planning_scene;
// planning_scene_diff.is_diff = true;
// planning_scene_diff.world.collision_objects.clear();
//
// detach_object.id = current_bin + "_lip_fillbox";
//
// ROS_INFO_STREAM(detach_object.id);
// detach_object.header.frame_id = current_bin;
// ROS_INFO_STREAM(detach_object);
// planning_scene_diff.world.collision_objects.push_back(
// detach_object);
// }
try {
// planning_scene_publisher_.publish(planning_scene_diff);
res.success = true;
return true;
// if any errors, return unsuccessful, should probably handle this
// better
} catch (...) {
res.success = false;
return false;
}
}
bool fillBins(apc_msgs::FillUnfillBinsCollisionModel::Request & req,
apc_msgs::FillUnfillBinsCollisionModel::Response& res) {
getShelfLayout();
// in case unfill not previously called, remove box in current bin
std_srvs::Trigger unfillSrvMsg;
if (!unfillBins(unfillSrvMsg.request, unfillSrvMsg.response)) {
ROS_INFO_STREAM("Unable to remove previous collision objects");
res.success.data = false;
return true;
}
if (req.bin_id.data.empty()) {
ROS_INFO_STREAM("No bin_id provided!");
res.success.data = false;
return true;
}
std::string bin_name = req.bin_id.data;
current_bin = bin_name;
// create a collision object to be used to fill bins
moveit_msgs::CollisionObject collision_object;
collision_object.operation = moveit_msgs::CollisionObject::ADD;
moveit_msgs::PlanningScene planning_scene_diff;
geometry_msgs::Pose pose;
planning_scene_diff.is_diff = true;
planning_scene_diff.world.collision_objects.clear();
double side_h = 0.04;
double side_w = shelf_layout_[bin_name]["bin_width"];
double side_d = 0.5;
collision_object.id = bin_name + "_fillbox";
collision_object.header.frame_id = bin_name;
shape_msgs::SolidPrimitive primitive;
primitive.type = primitive.BOX;
primitive.dimensions = { side_h, side_w, side_d };
collision_object.primitives.push_back(primitive);
collision_object.primitive_poses.clear();
setGeometry(pose, -1.0 * side_h, -1.0 * side_w, side_d);
pose.position.x += SHELF_LIP_THICKNESS;
collision_object.primitive_poses.push_back(pose);
planning_scene_diff.world.collision_objects.push_back(collision_object);
// lip fillbox
// side_h = 0.08;
// side_w =
// shelf_layout_[bin_name]["bin_width"];
// side_d = 0.05;
// collision_object.id = bin_name + "_lip_fillbox";
// collision_object.header.frame_id = bin_name;
// primitive.dimensions = { side_h, side_w, side_d };
// collision_object.primitives.clear();
// collision_object.primitives.push_back(primitive);
// collision_object.primitive_poses.clear();
// setGeometry(pose, side_h, -1.0 * side_w, -1.0 * side_d);
// double bin_height = shelf_layout_[bin_name]["bin_height"];
// pose.position.x += bin_height - 0.04;
// ROS_INFO_STREAM(pose);
// collision_object.primitive_poses.push_back(pose);
// ROS_INFO_STREAM(collision_object);
// planning_scene_diff.world.collision_objects.push_back(collision_object);
// generate collision objects within shelves
for (int i = 0; i < 8; i++) {
if (BINS[i] == bin_name) continue;
collision_object.id = BINS[i] + "_fillbox";
collision_object.header.frame_id = BINS[i];
fillCollisionModel(collision_object, i);
planning_scene_diff.world.collision_objects.push_back(
collision_object);
}
// thicken left wall of shelf
side_h = 0.351 * 4;
side_w = 0.05;
side_d = 0.5;
collision_object.id = "left_fillbox";
collision_object.header.frame_id = "/bin_A";
collision_object.primitives[0].dimensions.clear();
collision_object.primitives[0].dimensions = { side_h, side_w, side_d };
collision_object.primitive_poses.clear();
setGeometry(pose, side_h, side_w, side_d);
collision_object.primitive_poses.push_back(pose);
planning_scene_diff.world.collision_objects.push_back(collision_object);
// thicken right wall of shelf
setGeometry(pose, side_h, -1.0 * side_w, side_d);
collision_object.id = "right_fillbox";
collision_object.header.frame_id = "/bin_B";
collision_object.primitive_poses.clear();
double offset = shelf_layout_["bin_B"]["bin_width"];
pose.position.y -= offset;
collision_object.primitive_poses.push_back(pose);
planning_scene_diff.world.collision_objects.push_back(collision_object);
// thicken top of shelf
side_h = 0.05;
side_w = 0.351 * 2;
side_d = 0.5;
setGeometry(pose, -1.0 * side_h, -1.0 * side_w, side_d);
collision_object.id = "top_fillbox";
collision_object.header.frame_id = "/bin_A";
collision_object.primitives[0].dimensions.clear();
collision_object.primitives[0].dimensions = { side_h, side_w, side_d };
collision_object.primitive_poses.clear();
collision_object.primitive_poses.push_back(pose);
planning_scene_diff.world.collision_objects.push_back(collision_object);
// // thicken botto lip
// setGeometry(pose, side_h, -1.0 * side_w, side_d);
// offset =
// shelf_layout_["bin_J"]["bin_height"];
// pose.position.x += offset;
// collision_object.id = "bottom_fillbox";
// collision_object.header.frame_id = "/bin_J";
// collision_object.primitives[0].dimensions.clear();
// collision_object.primitives[0].dimensions = { side_h, side_w, side_d
// };
// collision_object.primitive_poses.clear();
// collision_object.primitive_poses.push_back(pose);
// planning_scene_diff.world.collision_objects.push_back(collision_object);
ROS_INFO("[fillBins] filling all bins except %s", bin_name.c_str());
// publish scene
try {
planning_scene_publisher_.publish(planning_scene_diff);
res.success.data = true;
} catch (...) {
res.success.data = false;
}
ROS_INFO("Bins filled!");
return true;
}
void fillCollisionModel(moveit_msgs::CollisionObject& obj, int bin_id) {
geometry_msgs::Pose pose;
shape_msgs::SolidPrimitive primitive;
primitive.type = primitive.BOX;
ROS_INFO_STREAM("YOOOOOO bin_id is: " << bin_id);
double height = shelf_layout_[BINS[bin_id]]["bin_height"];
double width = shelf_layout_[BINS[bin_id]]["bin_width"];
double depth = 0.5;
// use bin row heights and column widths
primitive.dimensions = { height, width, depth };
setGeometry(pose, height, -1.0 * width, depth);
obj.primitives.clear();
obj.primitive_poses.clear();
obj.primitives.push_back(primitive);
obj.primitive_poses.push_back(pose);
}
// add appropriate offset with respect to bin TFs
void setGeometry(geometry_msgs::Pose& pose, double x, double y, double z) {
pose.position.x = x;
pose.position.x /= 2.0f;
pose.position.x -= SHELF_LIP_THICKNESS;
pose.position.y = y;
pose.position.y /= 2.0f;
pose.position.z = z;
pose.position.z /= 2.0f;
}
void loadCollisionGeometry(int id, geometry_msgs::Pose& pose,
shape_msgs::SolidPrimitive& primitive) {
ROS_ERROR("loadCollisionGeometry() not implemented yet.");
}
// remove all bin fills and wall thickeners
bool unfillBins(std_srvs::Trigger::Request & req,
std_srvs::Trigger::Response& res) {
getShelfLayout();
moveit_msgs::CollisionObject detach_object;
detach_object.operation = moveit_msgs::CollisionObject::REMOVE;
moveit_msgs::PlanningScene planning_scene;
planning_scene.is_diff = true;
planning_scene.world.collision_objects.clear();
// remove all bin fillers
for (int i = 0; i < 8; i++) {
detach_object.id = BINS[i] + "_fillbox";
detach_object.header.frame_id = BINS[i];
planning_scene.world.collision_objects.push_back(detach_object);
detach_object.id = BINS[i] + "_lip_fillbox";
detach_object.header.frame_id = BINS[i];
planning_scene.world.collision_objects.push_back(detach_object);
}
// remove wall thickeners
detach_object.id = "left_fillbox";
detach_object.header.frame_id = "bin_A";
planning_scene.world.collision_objects.push_back(detach_object);
detach_object.id = "top_fillbox";
planning_scene.world.collision_objects.push_back(detach_object);
detach_object.id = "right_fillbox";
detach_object.header.frame_id = "bin_C";
planning_scene.world.collision_objects.push_back(detach_object);
// detach_object.id = "bottom_fillbox";
// detach_object.header.frame_id = "bin_J";
// planning_scene.world.collision_objects.push_back(detach_object);
// publish object removals
try {
planning_scene_publisher_.publish(planning_scene);
res.success = true;
ROS_INFO_STREAM("Bin fill collision objects removed!");
} catch (...) {
res.success = false;
}
return true;
}
// add and remove the tote and tote pillar
bool moveTote(apc_msgs::FillUnfillBinsCollisionModel::Request & req,
apc_msgs::FillUnfillBinsCollisionModel::Response& res) {
// Get the pose of the tote with respect to torso from the parameter
// server
XmlRpc::XmlRpcValue tote = tote_information_["tote"];
geometry_msgs::Pose tote_pose;
double pos_x = tote["position_x"];
double box_x = tote["box_x"];
double pos_y = tote["position_y"];
double box_y = tote["box_y"];
double pos_z = tote["position_z"];
double box_z = tote["box_z"];
tote_pose.position.x = pos_x;
tote_pose.position.y = pos_y;
tote_pose.position.z = pos_z;
tf::Quaternion tote_orientation;
tote_orientation.setRPY(((double)tote["orientation_roll"]),
((double)tote["orientation_pitch"]),
((double)tote["orientation_yaw"]));
tf::quaternionTFToMsg(tote_orientation, tote_pose.orientation);
tf::poseMsgToTF(tote_pose, tote_tf);
geometry_msgs::Pose not_tote_pose;
not_tote_pose.position.x = box_x / 2.0;
not_tote_pose.position.y = box_y / 2.0;
not_tote_pose.position.z = -box_z / 2.0;
not_tote_pose.orientation.x = 0.0;
not_tote_pose.orientation.y = 0.0;
not_tote_pose.orientation.z = 0.0;
not_tote_pose.orientation.w = 1.0;
tf::Transform not_tote_tf;
tf::poseMsgToTF(not_tote_pose, not_tote_tf);
not_tote_tf = tote_tf * not_tote_tf;
tf::poseTFToMsg(not_tote_tf, not_tote_pose);
publish_tf = true;
bool tote_on = false;
bool pillar_on = false;
moveit_msgs::CollisionObject obj;
obj.header.frame_id = "/torso"; // Always publish with respect to torso
tote_on = tote_on_;
pillar_on = pillar_on_;
if (req.bin_id.data == "tote_on") {
ROS_INFO_STREAM("tote_on");
tote_on = true;
} else if (req.bin_id.data == "tote_off") {
ROS_INFO_STREAM("tote_off");
tote_on = false;
} else if (req.bin_id.data == "pillar_on") {
ROS_INFO_STREAM("pillar_on");
pillar_on = true;
} else if (req.bin_id.data == "pillar_off") {
ROS_INFO_STREAM("pillar_off");
pillar_on = false;
} else if (req.bin_id.data == "all_on") {
ROS_INFO_STREAM("all_on");
tote_on = true;
pillar_on = true;
} else if (req.bin_id.data == "all_off") {
ROS_INFO_STREAM("all_off");
tote_on = false;
pillar_on = false;
}
moveit_msgs::PlanningScene planning_scene;
planning_scene.world.collision_objects.clear();
planning_scene.is_diff = true;
nh_.getParam("tote_information", tote_information_);
// geometry_msgs::Pose pose;
shape_msgs::SolidPrimitive primitive;
primitive.type = primitive.BOX;
if (tote_on) {
obj.id = "tote";
obj.operation = moveit_msgs::CollisionObject::ADD;
// add tote
// dimensions
primitive.dimensions = { box_x, box_y,
box_z };
// // position
// tote_pose.position.x = pos_x +
// box_x*sin((double)tote["orientation_yaw"]) / 2.0;
// tote_pose.position.y = pos_y +
// box_y*sin((double)tote["orientation_yaw"]) / 2.0;
// tote_pose.position.z = pos_z - box_z / 2.0;
ROS_INFO_STREAM("Tote position: " << not_tote_pose);
// add obj to scene
obj.primitives.push_back(primitive);
obj.primitive_poses.push_back(not_tote_pose);
planning_scene.world.collision_objects.push_back(obj);
ROS_INFO_STREAM("Tote added to Collision Scene!");
} else {
obj.id = "tote";
obj.operation = moveit_msgs::CollisionObject::REMOVE;
planning_scene.world.collision_objects.push_back(obj);
ROS_INFO_STREAM("Tote removed from Collision Scene!");
}
obj.primitives.clear();
obj.primitive_poses.clear();
if (pillar_on) {
// obj.id = "tote_pillar";
// obj.operation = moveit_msgs::CollisionObject::ADD;
// // add tote_pillar
// XmlRpc::XmlRpcValue tote_pillar =
// tote_information_["tote_pillar"];
// // dimensions
// primitive.dimensions = {tote_pillar["box_x"],
// tote_pillar["box_y"],
// tote_pillar["box_z"]};
// // position
// pose.position.x = -((double)tote_pillar["position_x"]) / 2.0;
// pose.position.y = -((double)tote_pillar["position_y"]) / 2.0;
// pose.position.z = ((double)tote_pillar["position_z"]) / 2.0 +
// ((double)tote["box_z"]) / 2.0;
// // add obj to scene
// obj.id = "tote_pillar";
// obj.primitives.push_back(primitive);
// obj.primitive_poses.push_back(pose);
// planning_scene.world.collision_objects.push_back(obj);
// ROS_INFO_STREAM("Tote pillar added to Collision Scene!");
// if tote is in place, remove from scene
} else {
// obj.id = "tote_pillar";
// obj.operation = moveit_msgs::CollisionObject::REMOVE;
// planning_scene.world.collision_objects.push_back(obj);
// ROS_INFO_STREAM("Tote pillar removed from Collision Scene!");
}
// publish scene
try {
planning_scene_publisher_.publish(planning_scene);
res.success.data = true;
tote_on_ = tote_on;
pillar_on_ = pillar_on;
// if any errors, return unsuccessful, should probably handle this
// better
} catch (...) {
res.success.data = false;
return false;
}
return true;
}
};
int main(int argc, char **argv) {
ros::init(argc, argv, "fill_bins_and_tote");
ROS_INFO("Starting bin filling and tote placement node!");
ros::AsyncSpinner spinner(1);
spinner.start();
ros::NodeHandle node_hdl;
br = new tf::TransformBroadcaster();
std::string scene_topic;
node_hdl.param<std::string>("apc_planning_scene_topic", scene_topic,
"planning_scene");
CollisionInterface object_collision_service(node_hdl, scene_topic);
// Advertise Services to be used (and implementd here)
ros::ServiceServer srv_attach_ = node_hdl.advertiseService(
"apc_grasping/fill_bins", &CollisionInterface::fillBins,
&object_collision_service);
ros::ServiceServer srv_detach_ = node_hdl.advertiseService(
"apc_grasping/unfill_bins", &CollisionInterface::unfillBins,
&object_collision_service);
ros::ServiceServer srv_tote_inplace_ = node_hdl.advertiseService(
"apc_grasping/move_tote", &CollisionInterface::moveTote,
&object_collision_service);
ros::ServiceServer srv_toggle_lipfillbox_ = node_hdl.advertiseService(
"apc_grasping/toggle_lip", &CollisionInterface::toggleLipFillbox,
&object_collision_service);
ROS_INFO(
"fill_bins_and_tote node started! ready to add toggle collision "
"objects to the scene...");
while (ros::ok()) {
if (publish_tf) {
br->sendTransform(tf::StampedTransform(tote_tf, ros::Time::now(),
"torso", "tote"));
tf_published = true;
}
ros::spinOnce();
}
ros::shutdown();
return 0;
}
| 37.908027 | 83 | 0.5961 |
97c9998964e85bfb4e70b1f99c3c4b490be2c22a | 235 | cpp | C++ | docs/mfc/reference/codesnippet/CPP/cmfcpopupmenu-class_2.cpp | jmittert/cpp-docs | cea5a8ee2b4764b2bac4afe5d386362ffd64e55a | [
"CC-BY-4.0",
"MIT"
] | 14 | 2018-01-28T18:10:55.000Z | 2021-11-16T13:21:18.000Z | docs/mfc/reference/codesnippet/CPP/cmfcpopupmenu-class_2.cpp | jmittert/cpp-docs | cea5a8ee2b4764b2bac4afe5d386362ffd64e55a | [
"CC-BY-4.0",
"MIT"
] | null | null | null | docs/mfc/reference/codesnippet/CPP/cmfcpopupmenu-class_2.cpp | jmittert/cpp-docs | cea5a8ee2b4764b2bac4afe5d386362ffd64e55a | [
"CC-BY-4.0",
"MIT"
] | 2 | 2018-10-10T07:37:30.000Z | 2019-06-21T15:18:07.000Z | CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
// CPoint point
// CMenu* pPopup
// The this pointer points to CMainFrame class which extends the CFrameWnd class.
pPopupMenu->Create (this, point.x, point.y, pPopup->Detach ()); | 47 | 83 | 0.72766 |
97cd01b4141bf5cca6925538f0cc7b863578db68 | 4,656 | cpp | C++ | src/generate-random-inputs-euclidean.cpp | maumueller/random-inputs | 12d876dfbf06a54af3e876123905a082b41e04dc | [
"MIT"
] | 1 | 2019-07-31T07:33:26.000Z | 2019-07-31T07:33:26.000Z | src/generate-random-inputs-euclidean.cpp | maumueller/random-inputs | 12d876dfbf06a54af3e876123905a082b41e04dc | [
"MIT"
] | null | null | null | src/generate-random-inputs-euclidean.cpp | maumueller/random-inputs | 12d876dfbf06a54af3e876123905a082b41e04dc | [
"MIT"
] | null | null | null | /**
* @file generate-random-inputs-euclidean.cpp
* @author Martin Aumüller
*
*/
#include <algorithm>
#include <cmath>
#include <random>
#include <utility>
#include <fstream>
#include <iostream>
#include <set>
#include <tclap/CmdLine.h>
std::random_device rd;
std::mt19937_64 gen(rd());
std::normal_distribution<double> distribution(0.0, 1.0);
using vecType = std::vector<double>;
double length(const vecType& v) {
double t = 0.0;
for (auto e: v) {
t += e * e;
}
return sqrt(t);
}
void normalize(vecType& v) {
auto len = length(v);
for (size_t i = 0; i < v.size(); i++) {
v[i] /= len;
}
}
vecType generateRandomVector(size_t d, bool unit) {
vecType v(d);
for (size_t i = 0; i < d; i++)
v[i] = distribution(gen) / sqrt(d);
if (unit)
normalize(v);
return v;
}
vecType distortPoint(const vecType& v, float targetDistance, bool unit) {
size_t d = v.size();
vecType w(d);
for (size_t i = 0; i < d; i++)
w[i] = v[i] + distribution(gen) * targetDistance/sqrt(d);
if (unit)
normalize(w);
return w;
}
template <typename T>
void writeFile(std::string filename, std::set<T>& set) {
std::ofstream outputFile;
outputFile.open(filename);
for (auto& q: set) {
for (auto& e: q) {
outputFile << e << " ";
}
outputFile << std::endl;
}
outputFile.close();
}
int main(int argc, char** argv) {
TCLAP::CmdLine cmd("This program generates random inputs in Euclidean space.", ' ', "0.9");
TCLAP::ValueArg<size_t> numberOfPointsArg("n", "numpoints", "Total number of points", true, 10, "integer");
TCLAP::ValueArg<size_t> numberOfDimensionsArg("d", "dimension", "Number of dimensions", true, 15, "integer");
TCLAP::ValueArg<size_t> numberOfClusters("c", "numclusters", "Number of clusters", true, 15, "integer");
TCLAP::ValueArg<size_t> pointsPerCluster("p", "pointscluster", "Number of points per cluster", true, 15, "integer");
TCLAP::ValueArg<std::string> outputFileArg("o", "outputfile", "File the output should be written to. ", true, "input.txt", "string");
TCLAP::ValueArg<std::string> queryOutFileArg("q", "queryoutfile", "File the query set should be written to. ", true, "input.txt", "string");
TCLAP::ValueArg<size_t> seedArg("s", "seed", "Seed for random generator", false, 1234, "integer");
TCLAP::SwitchArg randomQueryArg("g", "randomqueries", "Should random query points (without close neighbors) be added?");
TCLAP::SwitchArg normalizeArg("N", "normalize", "Normalize vectors to unit length?");
cmd.add(numberOfPointsArg);
cmd.add(numberOfDimensionsArg);
cmd.add(numberOfClusters);
cmd.add(pointsPerCluster);
cmd.add(outputFileArg);
cmd.add(queryOutFileArg);
cmd.add(seedArg);
cmd.add(randomQueryArg);
cmd.add(normalizeArg);
cmd.parse(argc, argv);
auto d = numberOfDimensionsArg.getValue();
auto n = numberOfPointsArg.getValue();
auto numClusters = numberOfClusters.getValue();
auto numPoints = pointsPerCluster.getValue();
size_t numNoisePoints = 2 * numPoints;
bool unit = normalizeArg.isSet();
if (seedArg.isSet()) {
gen.seed(seedArg.getValue());
}
std::set<vecType> set;
std::set<vecType> querySet;
for (size_t i = 0; i < numClusters; i++) {
querySet.insert(generateRandomVector(d, unit));
}
std::cout << "Generated " << querySet.size() << " clusters ... " << std::endl;
double windowSize = sqrt(2) / (3.0 * numClusters);
int curQuery = 0;
for (auto& q: querySet) {
curQuery++;
double targetDistance = curQuery * windowSize;
// Compute points at target distance around query.
for (size_t i = 0; i < numPoints; i++) {
set.insert(distortPoint(q, targetDistance, unit));
}
// Compute some noise.
targetDistance *= 2;
for (size_t i = 0; i < numNoisePoints; i++) {
set.insert(distortPoint(q, targetDistance, unit));
}
}
// Add random query points
if (randomQueryArg.isSet()) {
for (size_t i = 0; i < numClusters; i++) {
querySet.insert(generateRandomVector(d, unit));
}
}
std::cout << "Created clusters with a total number of " << set.size() << " points." << std::endl;
std::cout << "Fill with random points..." << std::endl;
// Fill with random points
while (set.size() < n) {
set.insert(generateRandomVector(d, unit));
}
std::cout << "Writing result to file" << std::endl;
writeFile(outputFileArg.getValue(), set);
writeFile(queryOutFileArg.getValue(), querySet);
return 0;
}
| 30.03871 | 141 | 0.624785 |
97ce52b8c973ca389d67b354274bf9b4de93785e | 23,632 | cpp | C++ | src/clustering/louvain.cpp | zlthinker/STBA | c0034d67018c9b7a72459821e9e9ad46870b6292 | [
"MIT"
] | 175 | 2020-08-02T11:48:11.000Z | 2022-02-28T04:54:36.000Z | src/clustering/louvain.cpp | zlthinker/STBA | c0034d67018c9b7a72459821e9e9ad46870b6292 | [
"MIT"
] | 1 | 2020-10-02T08:42:11.000Z | 2020-10-02T08:42:11.000Z | src/clustering/louvain.cpp | zlthinker/STBA | c0034d67018c9b7a72459821e9e9ad46870b6292 | [
"MIT"
] | 25 | 2020-08-02T13:04:15.000Z | 2022-02-28T04:54:28.000Z | #include "STBA/clustering/louvain.h"
#include "STBA/utility.h"
#include <queue>
#include <chrono>
#include <unordered_map>
#include <iostream>
size_t RandomPick(std::unordered_map<size_t, double> const & prob_map)
{
assert(!prob_map.empty());
double sum = 0.0;
std::unordered_map<size_t, double>::const_iterator it = prob_map.begin();
for (; it != prob_map.end(); it++)
{
sum += it->second;
}
double r = ((double) rand() / (RAND_MAX)) * sum;
double accu_sum = 0.0;
it = prob_map.begin();
size_t index = it->first;
for (; it != prob_map.end(); it++)
{
accu_sum += it->second;
if (accu_sum >= r)
{
index = it->first;
break;
}
}
return index;
}
Louvain::Louvain() : max_community_(std::numeric_limits<size_t>::max()), temperature_(10.0)
{
}
Louvain::Louvain(std::vector<size_t> const & nodes,
std::unordered_map<size_t, std::unordered_map<size_t, double> > const & edges)
: max_community_(std::numeric_limits<size_t>::max()), temperature_(10.0)
{
Initialize(nodes, edges);
}
Louvain::Louvain(std::vector<size_t> const & nodes,
std::vector<std::pair<size_t, size_t> > const & edges)
: max_community_(std::numeric_limits<size_t>::max()), temperature_(10.0)
{
Initialize(nodes, edges);
}
Louvain::~Louvain()
{
}
void Louvain::Initialize(std::vector<size_t> const & nodes,
std::vector<std::pair<size_t, size_t> > const & edges)
{
size_t node_num = nodes.size();
graph_.Resize(node_num);
node_graph_.Resize(node_num);
node_map_.resize(node_num);
community_map_.resize(node_num);
community_size_.resize(node_num);
community_in_weight_.resize(node_num);
community_total_weight_.resize(node_num);
std::unordered_map<size_t, size_t> node_index_map;
for (size_t i = 0; i < node_num; i++)
{
node_index_map[nodes[i]] = i;
double node_weight = 0.0;
graph_.AddSelfEdge(node_weight);
node_graph_.AddSelfEdge(node_weight);
node_map_[i] = i;
community_map_[i] = i;
community_size_[i] = 1;
community_in_weight_[i] = node_weight * 2;
community_total_weight_[i] = node_weight * 2;
}
sum_edge_weight_ = 0.0;
for (size_t i = 0; i < edges.size(); i++)
{
std::pair<size_t, size_t> const & edge = edges[i];
size_t index1 = edge.first;
size_t index2 = edge.second;
assert(node_index_map.find(index1) != node_index_map.end());
assert(node_index_map.find(index2) != node_index_map.end());
size_t node_index1 = node_index_map[index1];
size_t node_index2 = node_index_map[index2];
if (node_index1 > node_index2) continue;
double weight = 1.0;
graph_.AddUndirectedEdge(node_index1, node_index2, weight);
node_graph_.AddUndirectedEdge(node_index1, node_index2, weight);
sum_edge_weight_ += 2 * weight;
community_total_weight_[node_index1] += weight;
community_total_weight_[node_index2] += weight;
}
double avg_weight = sum_edge_weight_ / edges.size();
for (size_t i = 0; i < node_num; i++)
{
node_graph_.AddSelfEdge(i, avg_weight);
graph_.AddSelfEdge(i, avg_weight);
}
std::cout << "------------------ Build graph --------------------\n"
<< "# nodes: " << graph_.NodeNum() << ", # edges: " << edges.size() << "\n"
<< "---------------------------------------------------\n";
}
void Louvain::Initialize(std::vector<size_t> const & nodes,
std::unordered_map<size_t, std::unordered_map<size_t, double> > const & edges)
{
size_t node_num = nodes.size();
graph_.Resize(node_num);
node_graph_.Resize(node_num);
node_map_.resize(node_num);
community_map_.resize(node_num);
community_size_.resize(node_num);
community_in_weight_.resize(node_num);
community_total_weight_.resize(node_num);
std::unordered_map<size_t, size_t> node_index_map;
for (size_t i = 0; i < node_num; i++)
{
node_index_map[nodes[i]] = i;
double node_weight = 0.0;
graph_.AddSelfEdge(node_weight);
node_graph_.AddSelfEdge(node_weight);
node_map_[i] = i;
community_map_[i] = i;
community_size_[i] = 1;
community_in_weight_[i] = node_weight * 2;
community_total_weight_[i] = node_weight * 2;
}
sum_edge_weight_ = 0.0;
size_t edge_num = 0;
std::unordered_map<size_t, std::unordered_map<size_t, double> >::const_iterator it1 = edges.begin();
for (; it1 != edges.end(); it1++)
{
size_t index1 = it1->first;
assert(node_index_map.find(index1) != node_index_map.end());
size_t node_index1 = node_index_map[index1];
std::unordered_map<size_t, double> const & submap = it1->second;
std::unordered_map<size_t, double>::const_iterator it2 = submap.begin();
for (; it2 != submap.end(); it2++)
{
size_t index2 = it2->first;
if (index1 == index2) continue;
edge_num++;
assert(node_index_map.find(index2) != node_index_map.end());
size_t node_index2 = node_index_map[index2];
if (node_index1 > node_index2) continue;
double weight = it2->second;
graph_.AddUndirectedEdge(node_index1, node_index2, weight);
node_graph_.AddUndirectedEdge(node_index1, node_index2, weight);
sum_edge_weight_ += 2 * weight;
community_total_weight_[node_index1] += weight;
community_total_weight_[node_index2] += weight;
}
}
double avg_weight = sum_edge_weight_ / edge_num;
for (size_t i = 0; i < node_num; i++)
{
node_graph_.AddSelfEdge(i, avg_weight);
graph_.AddSelfEdge(i, avg_weight);
}
std::cout << "------------------ Build graph --------------------\n"
<< "# nodes: " << nodes.size() << ", # edges: " << edge_num << "\n"
<< "---------------------------------------------------\n";
}
void Louvain::Reinitialize()
{
graph_ = node_graph_;
size_t node_num = node_graph_.NodeNum();
node_map_.resize(node_num);
community_map_.resize(node_num);
community_size_.resize(node_num);
community_in_weight_.resize(node_num);
community_total_weight_.resize(node_num);
for (size_t i = 0; i < node_num; i++)
{
double node_weight = 0.0;
node_map_[i] = i;
community_map_[i] = i;
community_size_[i] = 1;
community_in_weight_[i] = node_weight * 2;
community_total_weight_[i] = node_weight * 2;
}
}
double Louvain::Modularity(size_t const community) const
{
assert(community < community_in_weight_.size());
double in_weight = community_in_weight_[community];
double total_weight = community_total_weight_[community];
double modularity = in_weight / sum_edge_weight_ - std::pow(total_weight / sum_edge_weight_, 2);
return modularity;
}
double Louvain::Modularity() const
{
double modularity = 0.0;
size_t num_communities = community_in_weight_.size();
for (size_t i = 0; i < num_communities; i++)
{
double in_weight = community_in_weight_[i];
double total_weight = community_total_weight_[i];
modularity += in_weight / sum_edge_weight_ - std::pow(total_weight / sum_edge_weight_, 2);
}
return modularity;
}
double Louvain::EdgeWeight(size_t const index1, size_t const index2) const
{
return node_graph_.EdgeWeight(index1, index2);
}
void Louvain::GetClusters(std::vector<std::vector<size_t> > & clusters) const
{
clusters.clear();
size_t num_communities = community_in_weight_.size();
size_t num_nodes = node_map_.size();
clusters.resize(num_communities, std::vector<size_t>());
for (size_t i = 0; i < num_nodes; i++)
{
size_t community_index = node_map_[i];
assert(community_index < num_communities && "[GetClusters] Community index out of range");
clusters[community_index].push_back(i);
}
}
void Louvain::GetEdgesAcrossClusters(std::vector<std::pair<size_t, size_t> > & pairs) const
{
pairs.clear();
size_t node_num = node_graph_.NodeNum();
for (size_t i = 0; i < node_num; i++)
{
size_t node_index1 = i;
size_t community_index1 = node_map_[node_index1];
std::vector<EdgeData> const & edges = node_graph_.GetIncidentEdges(i);
for (size_t j = 0; j < edges.size(); j++)
{
EdgeData const & edge = edges[j];
size_t node_index2 = edge.node;
size_t community_index2 = node_map_[node_index2];
if (node_index1 > node_index2)
continue;
if (community_index1 != community_index2)
{
pairs.push_back(std::make_pair(node_index1, node_index2));
}
}
}
}
void Louvain::Print()
{
std::cout << "------------------------ Print ------------------------\n";
std::cout << "# communities = " << community_in_weight_.size() << ", modularity = " << Modularity() << "\n";
std::vector<std::vector<size_t> > clusters;
GetClusters(clusters);
for (size_t i = 0; i < clusters.size(); i++)
{
std::vector<size_t> const & nodes = clusters[i];
std::cout << "Community " << i << " of size " << nodes.size() << ": ";
for (size_t j = 0; j < nodes.size(); j++)
{
size_t node_index = nodes[j];
std::cout << node_index << " ";
}
std::cout << "\n";
}
std::cout << "-------------------------------------------------------\n";
}
void Louvain::Cluster()
{
size_t pass = 0;
while(Merge())
{
Rebuild();
pass++;
}
}
/*!
* @param initial_pairs - The end points of initial pairs must be in the same cluster.
*/
void Louvain::Cluster(std::vector<std::pair<size_t, size_t> > const & initial_pairs)
{
size_t pass = 0;
Merge(initial_pairs);
Rebuild();
while(Merge())
{
Rebuild();
pass++;
}
}
/*!
* @brief StochasticCluster introduces stochasticity to clustering by merging clusters with some probability
* rather than greedily like louvain's algorithm.
*/
void Louvain::StochasticCluster()
{
size_t pass = 0;
std::srand(unsigned(std::time(0)));
while (StochasticMerge())
{
Rebuild();
pass++;
}
}
void Louvain::StochasticCluster(std::vector<std::pair<size_t, size_t> > const & initial_pairs)
{
size_t pass = 0;
Merge(initial_pairs);
Rebuild();
std::srand(unsigned(std::time(0)));
while (StochasticMerge())
{
Rebuild();
pass++;
}
}
bool Louvain::Merge()
{
bool improved = false;
std::queue<size_t> queue;
size_t node_num = graph_.NodeNum();
std::unordered_map<size_t, bool> visited;
for (size_t i = 0; i < node_num; i++)
{
size_t community_index = i;
if (community_size_[community_index] < max_community_)
{
queue.push(community_index);
visited[community_index] = false;
}
else
{
visited[community_index] = true;
}
}
std::vector<size_t> prev_community_size = community_size_;
size_t loop_count = 0;
while(!queue.empty())
{
size_t node_index = queue.front();
queue.pop();
visited[node_index] = true;
double self_weight = graph_.GetSelfWeight(node_index);
double total_weight = self_weight;
std::vector<EdgeData> const & edges = graph_.GetIncidentEdges(node_index);
std::unordered_map<size_t, double> neighb_weights;
for (size_t i = 0; i < edges.size(); i++)
{
EdgeData const & edge = edges[i];
size_t neighb_index = edge.node;
size_t neighb_community_index = community_map_[neighb_index];
neighb_weights[neighb_community_index] += edge.weight;
total_weight += edge.weight;
}
size_t prev_community = community_map_[node_index];
double prev_neighb_weight = neighb_weights[prev_community];
community_map_[node_index] = -1;
community_size_[prev_community] -= prev_community_size[node_index];
community_in_weight_[prev_community] -= 2 * prev_neighb_weight + self_weight;
community_total_weight_[prev_community] -= total_weight;
double max_inc = 0.0;
size_t best_community = prev_community;
double best_neighb_weight = prev_neighb_weight;
std::unordered_map<size_t, double>::const_iterator it = neighb_weights.begin();
for (; it != neighb_weights.end(); it++)
{
size_t neighb_community_index = it->first;
if (community_size_[neighb_community_index] >= max_community_)
continue;
double neighb_weight = it->second;
double neighb_community_total_weight = community_total_weight_[neighb_community_index];
double inc = (neighb_weight - (neighb_community_total_weight * total_weight) / sum_edge_weight_) / sum_edge_weight_ * 2;
if (inc > max_inc)
{
max_inc = inc;
best_community = neighb_community_index;
best_neighb_weight = neighb_weight;
}
}
community_map_[node_index] = best_community;
community_size_[best_community] += prev_community_size[node_index];
community_in_weight_[best_community] += 2 * best_neighb_weight + self_weight;
community_total_weight_[best_community] += total_weight;
if (best_community != prev_community)
{
for (size_t i = 0; i < edges.size(); i++)
{
EdgeData const & edge = edges[i];
size_t neighb_index = edge.node;
size_t neighb_community_index = community_map_[neighb_index];
if (visited[neighb_index] && community_size_[neighb_community_index] < max_community_)
{
queue.push(neighb_index);
visited[neighb_index] = false;
}
}
improved = true;
}
if (++loop_count > 3 * node_num)
break;
}
return improved;
}
bool Louvain::Merge(std::vector<std::pair<size_t, size_t> > const & initial_pairs)
{
size_t node_num = graph_.NodeNum();
std::vector<double> weights;
weights.reserve(initial_pairs.size());
for (size_t i = 0; i < initial_pairs.size(); i++)
{
size_t node_index1 = initial_pairs[i].first;
size_t node_index2 = initial_pairs[i].second;
double weight = graph_.EdgeWeight(node_index1, node_index2);
weights.push_back(weight);
}
std::vector<size_t> pair_indexes = SortIndexes(weights, false);
UnionFind union_find;
union_find.InitSets(node_num);
std::vector<size_t> node_visit_times;
node_visit_times.resize(node_num, 0);
for (size_t i = 0; i < pair_indexes.size(); i++)
{
size_t pair_index = pair_indexes[i];
size_t node_index1 = initial_pairs[pair_index].first;
size_t node_index2 = initial_pairs[pair_index].second;
if (node_visit_times[node_index1] < 1 && node_visit_times[node_index2] < 1)
{
union_find.Union(node_index1, node_index2);
node_visit_times[node_index1]++;
node_visit_times[node_index2]++;
}
}
for (size_t i = 0; i < node_num; i++)
{
size_t node_index = i;
community_in_weight_[node_index] = 0.0;
community_total_weight_[node_index] = 0.0;
community_size_[node_index] = 0;
}
for (size_t i = 0; i < node_num; i++)
{
size_t node_index = i;
size_t community_index = union_find.Find(node_index);
community_map_[node_index] = community_index;
community_in_weight_[community_index] += graph_.GetSelfWeight(node_index);
community_total_weight_[community_index] += graph_.GetSelfWeight(node_index);
community_size_[community_index] += 1;
}
for (size_t i = 0; i < node_num; i++)
{
size_t node_index1 = i;
size_t community_index1 = community_map_[node_index1];
std::vector<EdgeData> const & edges = graph_.GetIncidentEdges(node_index1);
for (size_t j = 0; j < edges.size(); j++)
{
EdgeData const & edge = edges[j];
size_t node_index2 = edge.node;
if (node_index1 > node_index2) continue;
size_t community_index2 = community_map_[node_index2];
double weight = edge.weight;
if (community_index1 == community_index2)
{
community_in_weight_[community_index1] += 2 * weight;
community_total_weight_[community_index1] += 2 * weight;
}
else
{
community_total_weight_[community_index1] += weight;
community_total_weight_[community_index2] += weight;
}
}
}
return true;
}
bool Louvain::StochasticMerge()
{
bool improve = false;
std::queue<size_t> queue;
size_t community_num = graph_.NodeNum();
for (size_t i = 0; i < community_num; i++)
{
size_t community_index = i;
if (community_size_[community_index] < max_community_)
{
queue.push(community_index);
}
}
size_t node_num = node_graph_.NodeNum();
size_t node_edge_num = node_graph_.EdgeNum();
size_t community_edge_num = graph_.EdgeNum();
double factor = (community_num + community_edge_num) / double(node_num + node_edge_num);
std::vector<size_t> prev_community_size = community_size_;
while(!queue.empty())
{
size_t node_index = queue.front();
queue.pop();
double self_weight = graph_.GetSelfWeight(node_index);
double total_weight = self_weight;
std::unordered_map<size_t, double> neighb_weights; // the weight of edge to neighboring community
std::vector<EdgeData> const & edges = graph_.GetIncidentEdges(node_index);
for (size_t i = 0; i < edges.size(); i++)
{
EdgeData const & edge = edges[i];
size_t neighb_index = edge.node;
size_t neighb_community_index = community_map_[neighb_index];
neighb_weights[neighb_community_index] += edge.weight;
total_weight += edge.weight;
}
size_t prev_community = community_map_[node_index];
double prev_neighb_weight = neighb_weights[prev_community];
community_map_[node_index] = -1;
community_size_[prev_community] -= prev_community_size[node_index];
community_in_weight_[prev_community] -= 2 * prev_neighb_weight + self_weight;
community_total_weight_[prev_community] -= total_weight;
std::unordered_map<size_t, double> prob_map;
std::unordered_map<size_t, double>::const_iterator it = neighb_weights.begin();
for (; it != neighb_weights.end(); it++)
{
size_t neighb_community_index = it->first;
size_t neighb_community_size = community_size_[neighb_community_index];
if (prev_community_size[node_index] + neighb_community_size >= max_community_)
continue;
double neighb_weight = it->second;
double neighb_community_total_weight = community_total_weight_[neighb_community_index];
double inc = factor * (neighb_weight - (neighb_community_total_weight * total_weight) / sum_edge_weight_);
double prob = std::exp(temperature_ * inc);
prob_map[neighb_community_index] = prob;
}
assert(!prob_map.empty());
size_t best_community = RandomPick(prob_map);
double best_neighb_weight = neighb_weights[best_community];
if (best_community != prev_community)
improve = true;
community_map_[node_index] = best_community;
community_size_[best_community] += prev_community_size[node_index];
community_in_weight_[best_community] += 2 * best_neighb_weight + self_weight;
community_total_weight_[best_community] += total_weight;
}
return improve;
}
void Louvain::RearrangeCommunities()
{
std::unordered_map<size_t, size_t> renumbers; // map from old cluster index to organized cluster index
size_t num = 0;
for (size_t i = 0; i < community_map_.size(); i++)
{
std::unordered_map<size_t, size_t>::const_iterator it = renumbers.find(community_map_[i]);
if (it == renumbers.end())
{
renumbers[community_map_[i]] = num;
community_map_[i] = num;
num++;
}
else
{
community_map_[i] = it->second;
}
}
for (size_t i = 0; i < node_map_.size(); i++)
{
node_map_[i] = community_map_[node_map_[i]];
}
std::vector<size_t> community_size_new(num);
std::vector<double> community_in_weight_new(num);
std::vector<double> community_total_weight_new(num);
for (size_t i = 0; i < community_in_weight_.size(); i++)
{
std::unordered_map<size_t, size_t>::const_iterator it = renumbers.find(i);
if (it != renumbers.end())
{
size_t new_community_index = it->second;
community_size_new[new_community_index] = community_size_[i];
community_in_weight_new[new_community_index] = community_in_weight_[i];
community_total_weight_new[new_community_index] = community_total_weight_[i];
}
}
community_size_new.swap(community_size_);
community_in_weight_new.swap(community_in_weight_);
community_total_weight_new.swap(community_total_weight_);
}
void Louvain::Rebuild()
{
RearrangeCommunities();
size_t num_communities = community_in_weight_.size();
std::vector<std::vector<size_t>> community_nodes(num_communities);
for (size_t i = 0; i < graph_.NodeNum(); i++)
{
community_nodes[community_map_[i]].push_back(i);
}
Graph graph_new;
graph_new.Resize(num_communities);
for (size_t i = 0; i < num_communities; i++)
{
std::vector<size_t> const & nodes = community_nodes[i];
double self_weight = 0.0;
std::unordered_map<size_t, double> edges_new;
for (size_t j = 0; j < nodes.size(); j++)
{
size_t node_index = nodes[j];
self_weight += graph_.GetSelfWeight(node_index);
std::vector<EdgeData> const & edges = graph_.GetIncidentEdges(node_index);
for (size_t k = 0; k < edges.size(); k++)
{
EdgeData const & edge = edges[k];
edges_new[community_map_[edge.node]] += edge.weight;
}
}
self_weight += edges_new[i];
graph_new.AddSelfEdge(i, self_weight);
std::unordered_map<size_t, double>::const_iterator it = edges_new.begin();
for (; it != edges_new.end(); it++)
{
size_t neighb_community_index = it->first;
double weight = it->second;
if (i != neighb_community_index)
{;
graph_new.AddDirectedEdge(i, neighb_community_index, weight);
}
}
}
graph_.Swap(graph_new);
community_map_.resize(num_communities);
for (size_t i = 0; i < num_communities; i++)
{
community_map_[i] = i;
}
}
| 33.663818 | 132 | 0.609047 |
97ce6d330d558ae100db503d62572da03fa4e46a | 1,593 | cpp | C++ | 3rdparty/libcxx/libcxx/test/std/language.support/support.limits/support.limits.general/exception.version.pass.cpp | jbdelcuv/openenclave | c2e9cfabd788597f283c8dd39edda5837b1b1339 | [
"MIT"
] | 15 | 2019-08-05T01:24:20.000Z | 2022-01-12T08:19:55.000Z | 3rdparty/libcxx/libcxx/test/std/language.support/support.limits/support.limits.general/exception.version.pass.cpp | jbdelcuv/openenclave | c2e9cfabd788597f283c8dd39edda5837b1b1339 | [
"MIT"
] | 21 | 2020-02-05T11:09:56.000Z | 2020-03-26T18:09:09.000Z | 3rdparty/libcxx/libcxx/test/std/language.support/support.limits/support.limits.general/exception.version.pass.cpp | jbdelcuv/openenclave | c2e9cfabd788597f283c8dd39edda5837b1b1339 | [
"MIT"
] | 9 | 2019-09-24T06:26:58.000Z | 2021-11-22T08:54:00.000Z | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// WARNING: This test was generated by generate_feature_test_macro_components.py
// and should not be edited manually.
// <exception>
// Test the feature test macros defined by <exception>
/* Constant Value
__cpp_lib_uncaught_exceptions 201411L [C++17]
*/
#include <exception>
#include "test_macros.h"
#if TEST_STD_VER < 14
# ifdef __cpp_lib_uncaught_exceptions
# error "__cpp_lib_uncaught_exceptions should not be defined before c++17"
# endif
#elif TEST_STD_VER == 14
# ifdef __cpp_lib_uncaught_exceptions
# error "__cpp_lib_uncaught_exceptions should not be defined before c++17"
# endif
#elif TEST_STD_VER == 17
# ifndef __cpp_lib_uncaught_exceptions
# error "__cpp_lib_uncaught_exceptions should be defined in c++17"
# endif
# if __cpp_lib_uncaught_exceptions != 201411L
# error "__cpp_lib_uncaught_exceptions should have the value 201411L in c++17"
# endif
#elif TEST_STD_VER > 17
# ifndef __cpp_lib_uncaught_exceptions
# error "__cpp_lib_uncaught_exceptions should be defined in c++2a"
# endif
# if __cpp_lib_uncaught_exceptions != 201411L
# error "__cpp_lib_uncaught_exceptions should have the value 201411L in c++2a"
# endif
#endif // TEST_STD_VER > 17
int main() {}
| 27.947368 | 80 | 0.666667 |
97d12936cf4bb7640cd2bd31ab0c547dd7ffbc28 | 8,751 | cc | C++ | src/catkin_projects/drake_iiwa_sim/src/ros_scene_graph_visualizer.cc | mehrdad-shokri/spartan | 854b26e3af75910ef57b874db7853abd4249543e | [
"BSD-3-Clause-Clear"
] | 32 | 2017-09-09T12:02:02.000Z | 2022-01-26T10:46:31.000Z | src/catkin_projects/drake_iiwa_sim/src/ros_scene_graph_visualizer.cc | mehrdad-shokri/spartan | 854b26e3af75910ef57b874db7853abd4249543e | [
"BSD-3-Clause-Clear"
] | 235 | 2017-06-06T18:14:17.000Z | 2020-10-01T15:09:21.000Z | src/catkin_projects/drake_iiwa_sim/src/ros_scene_graph_visualizer.cc | mehrdad-shokri/spartan | 854b26e3af75910ef57b874db7853abd4249543e | [
"BSD-3-Clause-Clear"
] | 32 | 2017-06-09T15:27:59.000Z | 2021-07-13T02:58:58.000Z | #include "drake_iiwa_sim/ros_scene_graph_visualizer.h"
#include "drake/multibody/shapes/geometry.h"
#include "drake/common/drake_assert.h"
#include "drake/geometry/geometry_visualization.h"
#include "drake/math/rigid_transform.h"
#include "drake/math/rotation_matrix.h"
#include "drake/math/quaternion.h"
#include "drake/lcm/drake_mock_lcm.h"
#include "drake_lcmtypes/drake/lcmt_viewer_load_robot.hpp"
namespace drake_iiwa_sim {
using drake::geometry::SceneGraph;
using drake::math::RigidTransform;
using drake::math::RotationMatrix;
using drake::systems::Context;
using drake::systems::EventStatus;
using drake::systems::rendering::PoseBundle;
using drake::systems::Value;
using Eigen::Quaternion;
using DrakeShapes::Mesh;
using DrakeShapes::TrianglesVector;
using DrakeShapes::PointsVector;
/// Heavily references Drake's meshcat_visualizer,
/// especially for the initialization / load hack
/// that abuses the LCM draw_robot call to do the
/// scenegraph-interaction heavy lifting.
RosSceneGraphVisualizer::RosSceneGraphVisualizer(
const SceneGraph<double>& scene_graph,
std::string server_name,
double draw_period)
: server_(server_name),
scene_graph_(scene_graph),
pose_bundle_input_port_(DeclareAbstractInputPort(
drake::systems::kUseDefaultName, Value<PoseBundle<double>>()).get_index())
{
DeclareInitializationPublishEvent(&RosSceneGraphVisualizer::DoInitialization);
DeclarePeriodicPublishEvent(draw_period, 0.0, &RosSceneGraphVisualizer::DoPeriodicPublish);
}
std::string RosSceneGraphVisualizer::MakeFullName(const std::string& input_name,
int robot_num) const {
std::string source_name, frame_name;
if (input_name == "world") {
// Not sure the history of this, but all geometry *but*
// world geometry comes in with "source_name::frame_name",
// while world geometry is just named "world".
source_name = "world";
frame_name = "world";
} else {
auto offset = input_name.find("::");
if (offset == std::string::npos) {
return "";
}
source_name = input_name.substr(0, offset);
frame_name = input_name.substr(offset + 2);
}
std::stringstream full_name;
full_name << source_name << "::" << robot_num << "::" << frame_name;
return full_name.str();
}
EventStatus RosSceneGraphVisualizer::DoInitialization(const Context<double>& context) const {
drake::lcm::DrakeMockLcm mock_lcm;
drake::geometry::DispatchLoadMessage(scene_graph_, &mock_lcm);
auto load_robot_msg = mock_lcm.DecodeLastPublishedMessageAs
<drake::lcmt_viewer_load_robot>("DRAKE_VIEWER_LOAD_ROBOT");
for (const auto link : load_robot_msg.link){
std::string full_name = MakeFullName(link.name, link.robot_num);
if (full_name == ""){
printf("Couldn't find separator, this name is malformed. Skipping...\n");
printf("Name in question was: %s\n", link.name.c_str());
continue;
}
visualization_msgs::InteractiveMarker int_marker;
int_marker.header.frame_id = "base";
int_marker.header.stamp = ros::Time();
int_marker.name = full_name.c_str();
visualization_msgs::InteractiveMarkerControl control_marker;
control_marker.always_visible = true;
for (const auto geom : link.geom){
// MBT current sets alpha = 0 to make collision geometry
// "invisible", so don't draw them.
if (geom.color[3] == 0){
continue;
}
visualization_msgs::Marker geom_marker;
switch (geom.type){
case geom.BOX:
if (geom.num_float_data != 3){
printf("Malformed geom.BOX, skipping.");
break;
}
geom_marker.type = visualization_msgs::Marker::CUBE;
geom_marker.scale.x = geom.float_data[0];
geom_marker.scale.y = geom.float_data[1];
geom_marker.scale.z = geom.float_data[2];
geom_marker.color.r = geom.color[0];
geom_marker.color.g = geom.color[1];
geom_marker.color.b = geom.color[2];
geom_marker.color.a = geom.color[3];
break;
case geom.SPHERE:
if (geom.num_float_data != 1){
printf("Malformed geom.SPHERE, skipping.");
break;
}
geom_marker.type = visualization_msgs::Marker::SPHERE;
geom_marker.scale.x = geom.float_data[0];
geom_marker.scale.y = geom.float_data[0];
geom_marker.scale.z = geom.float_data[0];
geom_marker.color.r = geom.color[0];
geom_marker.color.g = geom.color[1];
geom_marker.color.b = geom.color[2];
geom_marker.color.a = geom.color[3];
break;
case geom.CYLINDER:
if (geom.num_float_data != 2){
printf("Malformed geom.CYLINDER, skipping.");
break;
}
geom_marker.type = visualization_msgs::Marker::CYLINDER;
geom_marker.scale.x = geom.float_data[1];
geom_marker.scale.y = geom.float_data[1];
geom_marker.scale.z = geom.float_data[0];
geom_marker.color.r = geom.color[0];
geom_marker.color.g = geom.color[1];
geom_marker.color.b = geom.color[2];
geom_marker.color.a = geom.color[3];
break;
case geom.MESH:
if (geom.num_float_data != 3 || geom.string_data.size() < 4){
printf("Malformed geom.MESH, skipping.");
break;
}
// Unfortunately Rviz seems to only want package-relative
// paths, not absolute paths. So instead, load in the appropriate
// geometry and send it over as triangles.
{
Mesh mesh("", geom.string_data.substr(
0, geom.string_data.size()-3) + std::string("obj"));
PointsVector points;
TrianglesVector faces;
mesh.LoadObjFile(&points, &faces);
geom_marker.type = visualization_msgs::Marker::TRIANGLE_LIST;
geom_marker.scale.x = geom.float_data[0];
geom_marker.scale.y = geom.float_data[1];
geom_marker.scale.z = geom.float_data[2];
geom_marker.color.r = geom.color[0];
geom_marker.color.g = geom.color[1];
geom_marker.color.b = geom.color[2];
geom_marker.color.a = geom.color[3];
for (const auto face : faces){
for (int i=0; i<3; i++) {
const Eigen::Vector3d& pt = points[face[i]];
geom_marker.points.emplace_back();
geometry_msgs::Point * new_point_msg = &geom_marker.points.back();
new_point_msg->x = pt[0];
new_point_msg->y = pt[1];
new_point_msg->z = pt[2];
}
}
}
break;
default:
printf("UNSUPPORTED GEOMETRY TYPE %d IGNORED\n", geom.type);
break;
}
// Set geom marker offset in its parent marker
geom_marker.pose.position.x = geom.position[0];
geom_marker.pose.position.y = geom.position[1];
geom_marker.pose.position.z = geom.position[2];
geom_marker.pose.orientation.w = geom.quaternion[0];
geom_marker.pose.orientation.x = geom.quaternion[1];
geom_marker.pose.orientation.y = geom.quaternion[2];
geom_marker.pose.orientation.z = geom.quaternion[3];
control_marker.markers.push_back(geom_marker);
}
int_marker.controls.push_back(control_marker);
server_.insert(int_marker);
}
server_.applyChanges();
return EventStatus::Succeeded();
}
EventStatus RosSceneGraphVisualizer::DoPeriodicPublish(
const Context<double>& context) const {
const drake::systems::AbstractValue* input =
this->EvalAbstractInput(context, 0);
DRAKE_ASSERT(input != nullptr);
const auto& pose_bundle = input->GetValue<PoseBundle<double>>();
for (int frame_i = 0; frame_i < pose_bundle.get_num_poses(); frame_i++) {
const RigidTransform<double> tf(pose_bundle.get_pose(frame_i));
const Eigen::Vector3d t = tf.translation();
const Quaternion<double> q = tf.rotation().ToQuaternion();
geometry_msgs::Pose pose_msg;
pose_msg.position.x = t[0];
pose_msg.position.y = t[1];
pose_msg.position.z = t[2];
pose_msg.orientation.w = q.w();
pose_msg.orientation.x = q.x();
pose_msg.orientation.y = q.y();
pose_msg.orientation.z = q.z();
int robot_num = pose_bundle.get_model_instance_id(frame_i);
std::string full_name = MakeFullName(pose_bundle.get_name(frame_i), robot_num);
server_.setPose(full_name, pose_msg);
}
server_.applyChanges();
ros::spinOnce();
return EventStatus::Succeeded();
}
} // namespace drake_iiwa_sim | 38.893333 | 93 | 0.642898 |
97d2074f21a845e1b6b7ec12ba6a27e54cc3cf51 | 136,210 | cpp | C++ | capPaintPlayerWav2Sketch/AudioSampleYeahwav.cpp | Drc3p0/TouchSound | 3748d161a3706918ce75934cd64543347426545e | [
"MIT"
] | 1 | 2019-10-23T17:47:05.000Z | 2019-10-23T17:47:05.000Z | capPaintPlayerWav2Sketch/AudioSampleYeahwav.cpp | Drc3p0/TouchSound | 3748d161a3706918ce75934cd64543347426545e | [
"MIT"
] | null | null | null | capPaintPlayerWav2Sketch/AudioSampleYeahwav.cpp | Drc3p0/TouchSound | 3748d161a3706918ce75934cd64543347426545e | [
"MIT"
] | null | null | null | // Audio data converted from WAV file by wav2sketch
#include "AudioSampleYeahwav.h"
// Converted from YEAHwav.wav, using 11025 Hz, u-law encoding
const unsigned int AudioSampleYeahwav[12089] = {
0x0300BCDD,0x00020380,0x01010480,0x81808282,0x83868180,0x85878002,0x80018500,0x0003808A,
0x81000082,0x01018301,0x83820400,0x82000083,0x80810185,0x00038801,0x01800082,0x88810082,
0x84810203,0x83850300,0x81848484,0x01058687,0x02808780,0x03880205,0x84838103,0x84050085,
0x00030185,0x02818283,0x81848100,0x84848005,0x85800300,0x02020582,0x01808383,0x82018883,
0x84838184,0x81848183,0x02810002,0x00038001,0x84000186,0x028A8483,0x00868483,0x81038101,
0x81830501,0x01008883,0x81848186,0x83828600,0x84840202,0x81858280,0x82818400,0x81040285,
0x03050001,0x01038080,0x80018203,0x80850080,0x00848981,0x89828386,0x84890584,0x81838102,
0x83808385,0x82808187,0x02878284,0x01828502,0x00818200,0x03828202,0x02020283,0x01008403,
0x84010181,0x81870001,0x80818482,0x85008486,0x80858380,0x03858300,0x03858400,0x01038601,
0x85038187,0x02830481,0x04018206,0x00000284,0x01818582,0x81818484,0x81858384,0x87808681,
0x81830400,0x02020301,0x83068080,0x01850101,0x87008583,0x82870184,0x81838581,0x01008885,
0x8403858A,0x06888381,0x82838A04,0x89860386,0x86858181,0x00840481,0x83018282,0x03828000,
0x88858280,0x03878106,0x85058080,0x80018082,0x82008680,0x85068186,0x87810182,0x04888101,
0x81858201,0x86028482,0x87000188,0x87838085,0x00858501,0x81868384,0x83828883,0x80818582,
0x80850103,0x0081840A,0x87030280,0x8B810486,0x03860100,0x08838906,0x81038683,0x87850084,
0x888A8184,0x01828701,0x02820083,0x00028203,0x00848300,0x86048683,0x84838088,0x81808102,
0x02870800,0x87028103,0x01828101,0x8406848A,0x838B0586,0x00848B05,0x01868584,0x02878601,
0x02858202,0x82828602,0x81870104,0x87828082,0x80818389,0x8004868A,0x04838583,0x01028183,
0x04840305,0x03800305,0x82850503,0x83858603,0x8F848691,0x8483898F,0x05078588,0x03078085,
0x0D81040B,0x0983020D,0x81808307,0x91028188,0x89848089,0x88880484,0x81820282,0x03048101,
0x82090688,0x0D090306,0x01028581,0x828A8401,0x8D878885,0x8A8C8186,0x80878C05,0x81048083,
0x060D0500,0x00070F86,0x01848508,0x8A019000,0x83898685,0x81868985,0x86880886,0x05008005,
0x03030B80,0x0208070F,0x08810309,0x900C8B89,0x858A808D,0x01888883,0x09880283,0x00038500,
0x02000703,0x02030708,0x070A010B,0x8F020387,0x8B839185,0x86868B8E,0x03898886,0x07808881,
0x07810788,0x1004820E,0x800B0280,0x8C818282,0x8C8B8C85,0x8A849189,0x048A8586,0x81020281,
0x04801304,0x0E060610,0x030D0580,0x90880B8A,0x8E8A8788,0x80848C86,0x0F019085,0x81108492,
0x10048286,0x0C0B0802,0x8303020B,0x81900205,0x8F828B82,0x858A008B,0x89028D81,0x028D8187,
0x030B8902,0x0F050A07,0x8D040E09,0x888C840E,0x89908188,0x07908402,0x8D02878A,0x80840100,
0x010C1089,0x10060910,0x0C01870C,0x8984828F,0x89878B86,0x8D839185,0x038F8984,0x8805048C,
0x07030D0B,0x0107070A,0x04910D82,0x92098A89,0x8A8A0086,0x87878F83,0x028B818D,0x020D8100,
0x10040B11,0x0D8A0310,0x9387818D,0x89889005,0x85008F88,0x808A028B,0x85078184,0x10030510,
0x880F0506,0x128F8410,0x91018495,0x8F8E8B83,0x858E8E00,0x108A8700,0x82130281,0x0E85110A,
0x950D8785,0x048F8480,0x8581888F,0x06918388,0x8E099485,0x11860401,0x85100B81,0x10868215,
0x878E0E92,0x87028802,0x8C0A8B85,0x0B858A87,0x8A040C94,0x0E090416,0x0C901205,0x95039184,
0x038E9007,0x8485818A,0x05900687,0x84098A02,0x0D020C07,0x81061004,0x8A0E9411,0x80900B8D,
0x848A0787,0x8A838486,0x02068B05,0x08000D86,0x8F0D0306,0x068C8A10,0x02920890,0x03828708,
0x89098E82,0x06078A85,0x07030C8C,0x9210850C,0x12958112,0x82910D93,0x870A8708,0x89098202,
0x07018582,0x02820D89,0x9009030C,0x0C908607,0x8284059A,0x810F8980,0x0005850A,0x1086870D,
0x09820501,0x97108206,0x0093860C,0x83970F99,0x810D9007,0x00080081,0x0F068408,0x10000485,
0x8905000A,0x878A9512,0x069C0691,0x87858388,0x88058204,0x0806850D,0x07810E82,0x808E0601,
0x93099700,0x0E908B83,0x0109068B,0x88821001,0x8B038807,0x08850081,0x108F0787,0x90008888,
0x800F9213,0x81820F82,0x028A8387,0x85000793,0x0B05000B,0x0C0A8911,0x09910F8A,0x900C8B05,
0x88929005,0x8C899293,0x08880591,0x070C0E82,0x981B840D,0x14890A13,0x02041394,0x91048B89,
0x89018F91,0x01038292,0x07068504,0x0A961386,0x93100100,0x03070118,0x92880989,0x05888906,
0x06001087,0x910B0D03,0x87059714,0x199D108E,0x80808001,0x8E8D8D04,0x87839205,0x09890808,
0x00059011,0x11950F91,0x8E1A8406,0x0190100C,0x93038D93,0x83038890,0x070B0187,0x8D8F1492,
0x92158E03,0x110C0313,0x8A8F1192,0x928A8983,0x87850D00,0x09910F09,0x9A119500,0x13079215,
0x07871493,0x8906918B,0x0582888B,0x080A8300,0x94881189,0x94189A16,0x17901607,0x92800E92,
0x82938903,0x82858784,0x0C960A06,0x950F8F86,0x0B10921A,0x028E118A,0x87829288,0x0A8F0692,
0x921C8F00,0x16981581,0x98161091,0x84019219,0x859B0E94,0x90058C8A,0x068D1389,0x8C1A9412,
0x20961F03,0x9613868C,0x8A918380,0x92850693,0x8B888386,0x13950B8A,0x8D1B8A0C,0x068B8310,
0x898B8A8B,0x0A849009,0x82868682,0x8E128C07,0x1498131A,0x98940389,0x8892940C,0x0A8C078B,
0x01030E8A,0x1D0E1289,0x9311149A,0x89059702,0x858B809A,0x8B808289,0x11880406,0x86091909,
0x8A89911D,0x87A00392,0x8790828B,0x010D910B,0x1D051400,0x0013870C,0x03879980,0x81928DA1,
0x981B9A94,0x16828382,0x8C1E1381,0x86901610,0x889A0105,0x9B819A02,0x0E909C13,0x20810D8A,
0x19148F14,0x11858587,0x90920A94,0xA71EA50E,0x15998E81,0x8E811B98,0x12860912,0x0E88188B,
0x8682100C,0x9718A315,0x22938485,0x8E8382A1,0x09889985,0x81000991,0x8F030717,0x881A9D21,
0x23A41316,0x86938B96,0x118C9583,0x0A808291,0x00010687,0x9A20971C,0x169D8211,0x819A13A0,
0x19898A0F,0x03841091,0x1B83051C,0xA721A211,0x149A9C14,0x00931AA4,0x07010304,0x19821B86,
0x1C961315,0xA70F9F97,0x8614AB19,0x10971D9C,0x1A1B8D0A,0x108B2488,0x1A959D18,0x91A30CAC,
0x9E22AD0F,0x1618930F,0x10221E0E,0x1D931717,0x9F0D9C92,0x21AD019E,0x96018CAE,0x19190112,
0x981F1D87,0x1310041F,0xAD1E1091,0x8991A322,0x069520A5,0x9C17018D,0x848B1603,0x92201206,
0x1EAA2981,0xA8249401,0xA012A223,0xA082918C,0x038D0514,0x9C021B0D,0x28819530,0x0FA11F9A,
0x09979B00,0x839A129E,0x8D85A017,0x30A4121B,0xAC2AA495,0x2184A924,0x031B19A0,0x25169525,
0x1D0C1A9D,0xA92AAB91,0x0FA98DA7,0x86070CB1,0x220A2296,0x0530211A,0xA51E1A04,0xA8A81EA3,
0xA704A08C,0x129F1A8E,0x11292120,0x988C2A23,0xABA4121A,0xA1A1AD26,0x12B281A1,0x200E0D0C,
0x1F973013,0x8922A42E,0x298BA52C,0x1AA900AD,0x9E19AB98,0x23A5868E,0x20149688,0x241B8C0B,
0x992B979B,0x95138617,0x819C8F99,0x180E8C9E,0x8019208F,0xA7300292,0x11B12F92,0xB21DA5A2,
0x1B040692,0x0A1F32A0,0x8622291B,0x99B43481,0xB827C026,0x0CB00AA4,0x8F2C8C08,0x31903826,
0x8B09902E,0x28B9A60F,0xB59698BC,0x250DB233,0x3382341B,0x1930AC38,0x1CBB02A8,0xB22DC39C,
0x38C02FB0,0x2F389E27,0x3005322D,0xAA10A623,0x0DA9B598,0x9DBD30C4,0x1C3ABB37,0x2B9A3B94,
0x8030AA34,0xA1A80110,0xB0B421A8,0x1F2DC143,0x21BA3CA6,0x221EB338,0x20B932A2,0x2FA5B61A,
0xB343C522,0x3AB42580,0x1C37B502,0x37B32AA3,0x9429A1A1,0xBF9B31A8,0x2B11C145,0xB2AA40BE,
0x289BA73B,0x1BA53AA6,0x3B16B41F,0xC83834CA,0x3490A641,0xB32823B8,0x311CAB3A,0xC0AA30B8,
0x50C1C34B,0x869429C3,0x42AEB63A,0x9F10869E,0x2DBFA739,0xB1C135B1,0x2A21C750,0x8BA02421,
0x9FA7933B,0x9AB5A227,0xB337B5AD,0x33BF4CBC,0x10412816,0x94943EA3,0xA725B493,0x3A1DB3C2,
0xB54900CC,0x3842841A,0x2037B1AD,0x1129BFC0,0x382ABCBA,0x454CC72D,0x472F38AF,0x2DA4BFAE,
0xA2B4C5C9,0x119BC0B4,0x53B19D43,0x2D3D3029,0x13B2B941,0xABB8B7BA,0xB3A90BA5,0x83BD4530,
0xB1248D4C,0xC9A90320,0xB2B127A2,0x92244421,0xCF3450A9,0xBAAF2747,0xD1AF36C5,0xA2233194,
0x92434630,0xC84E3411,0xB1C747B4,0xB7B6A0C3,0x302417B7,0x2F3B3921,0x403AB38F,0xA02128D1,
0x4039C08A,0x3C45B3A4,0x812DB5A2,0x46B8CBBA,0xB652D1D0,0x45422699,0x36412C21,0x0714A891,
0x9DC4B4B0,0x252CC932,0x22B64204,0x9EC29440,0x04B8AD19,0xA2C1063B,0x51C5B954,0x32A41D31,
0xA9C3A133,0x98B3A015,0xC092BB2F,0x43D246A1,0xA741A327,0x9E983D2F,0xAE382E37,0xCEA740B4,
0xC8C44DB2,0xB634A54C,0xC5112CA1,0xC0B53B90,0x00B53131,0xC3284DA8,0x28209652,0xBC9530B7,
0x37BDA994,0x2E32B3AC,0xD054B4BF,0x37C13D03,0x293AA1AA,0x9144B1BF,0x944514BB,0xC153A5C0,
0x36B64CC6,0xAD43B198,0xAB9B3CCC,0xB0392C11,0x9B41BA8B,0xB3A143D2,0x13A1A330,0x3523B404,
0x443AA246,0x3A3DC18B,0x960A44D2,0x42BCC13A,0x2E21CFC3,0x3823C0B2,0x4D2BCAB9,0x2F4B37CB,
0x34412032,0x2D45B426,0xAC982813,0x44BDD3B2,0xCA2C1AD7,0x99BB2122,0x4110083D,0x3D223946,
0x53A0AF2A,0xC23623C3,0x0DC5C044,0x2DC3CE26,0xA1B6BE9C,0x54A0B997,0x3151B2B8,0x493C2C30,
0x2439B81F,0x80C0B0B0,0x49B0C4BA,0xCF50BAD7,0x993035AE,0x2D2F261C,0x37342E22,0x412CAC32,
0xC63921C6,0x94BD3638,0xA4BCC534,0x1E8284B6,0x51C3BB25,0x1043BCC8,0x46238045,0x30A0C333,
0x38212605,0x4E37D121,0xAE48A1D8,0x9823A4A7,0x2EB0CCAC,0x3C27170A,0x084CC0C6,0xAA4352CF,
0x2A233345,0x3A31C398,0xC0062A29,0xB89FCE9E,0x8EC644CA,0x2AB2C13E,0x3B43B4B4,0x489C4049,
0x374FC934,0x3FB545B3,0xB4B8CBA5,0xA412C2C4,0x1EA2C996,0xB156C0D0,0x49365112,0x42279935,
0x3540341A,0xCA9C1AB7,0xDA332AD5,0x9EC63033,0x40A2C0B3,0x81443D87,0xA5234442,0xC2915801,
0x21B1C256,0xB529C6CC,0xAEC719C4,0xB5B8C6A8,0x49B14F2A,0x9046874D,0x8C4533A4,0x85940913,
0xC0A8C5BE,0x40C332A2,0xC21BA0AA,0x9B2E4026,0xA23CA221,0xB01992B7,0x49A6B849,0x95A4A3C6,
0x21243D35,0xBB288E1C,0x29B30CB7,0x373BCD4B,0xBFAFA8CF,0x1CBA2430,0x9A823792,0x50A63B34,
0xB152BD3F,0x20A61DB9,0xC4BDB881,0xC0CAA9B9,0x539BBB30,0xC34A35C2,0x47434034,0x0AB03941,
0xB3C7C333,0x3039CE1B,0xC6BC43D1,0x362026A8,0x431BB137,0x4923B236,0xCD549FB2,0xBACE4680,
0x33862A2A,0x20ABCCB2,0x3833BAC2,0xD03E51C2,0x85C4B44D,0x39434232,0xAE3D00BC,0xB238B2C0,
0xB2CB57AF,0xB1BCD048,0xC1343083,0xC93534C5,0xB7383EAC,0x52CA4A51,0x1836970D,0xD09D4742,
0xCDCD18C0,0xBD1CA4C3,0x36B3C04A,0x44079CC7,0x81305251,0xBBC24740,0x45AB2616,0xCA49D123,
0xA0BFB5D3,0x85C2B13B,0xA3B52023,0x54413D31,0xC14838B9,0x45428D95,0xC0B1B93F,0xB6CFC1C0,
0xAA4F15A0,0xC2CF44C5,0x5242AEB9,0xAD493933,0xA4BAA926,0xC2504C15,0xBBCAA745,0x3540B5D2,
0xBCAC31C4,0xA9A2C2B9,0x28945A2C,0xB134C64C,0x215544B0,0xC3CC3E19,0xBAC5D0C0,0x3AC54E4E,
0xCDC4C5BA,0x345450B6,0xB4BA454D,0x45C6BBBB,0x4144B460,0xDBD1ACD1,0x349245B2,0xAEC90736,
0x5EBECBC2,0x265FBB55,0xC0C822B0,0x30205342,0xCAD5D02D,0x5C37D6D7,0xC84E44B5,0x94CCC5B8,
0x52565252,0xC3D4B64B,0x515BD3D5,0xCE1A5FB8,0xBFD8D9C7,0x425344A3,0xC8D0C221,0x435A11D2,
0x3D305A5B,0x92B1C8C3,0xB04C53AA,0xDBE2D5C4,0x46253BD5,0x152CAD63,0x2901C0D0,0x46586454,
0xDCE0D13B,0x51B945CF,0xD4A3105B,0xD0C7DADA,0x4E515F4E,0xD1DCC24B,0x65AB2154,0xC7262959,
0xD2C9D2D7,0x11465632,0xCDE2DBA0,0x6549CB52,0xCE224B51,0x12C7B3CE,0x25566155,0xD1E4D7B2,
0x5155D9B3,0xDABF3E50,0x45D6CEAF,0x4E5B6055,0xC1E0CA26,0x475ABFC3,0xD9BA425A,0xA5D5DCC8,
0x34525831,0xBEC7D4A9,0x575940D1,0xB18A4C5F,0xC0D0DFC4,0x444B474B,0xE0B6D7C2,0x544D48DB,
0x3E41524F,0x37A6D2D2,0x485A3F44,0xE9A1C1CA,0x43BF4FD2,0xC03A4A4B,0x420EC7D8,0x51595036,
0xE6CAA191,0x4CB2382D,0xC6184A50,0xA9C6D2E0,0x535B5222,0xE2CB4BAC,0x518184AE,0xB7395357,
0xC1D1D6D4,0x525242C6,0xC9DF4446,0x5432CCB8,0xB64B5253,0xC9CECEC6,0x265342A3,0xAFE03550,
0x2D4026DA,0xCC405953,0xB0CAD5C6,0x5954321B,0xC1DAC25D,0x5305C6E0,0xBB435E45,0xD2D4D8BD,
0x5A5147A5,0xB6BEC35F,0x0BA3D2E1,0x41265F55,0xB9D9D60B,0x6042BDCA,0xBD43CB57,0xB347B6DE,
0x20405738,0xB3C6CEB6,0x613FA2BB,0xCFB1D037,0x2C49B6D7,0x2D2B5357,0xB6D0D9C8,0x634F4398,
0xE2A1883F,0x4637C5DE,0xA24E584B,0xCED9DE24,0x67529E19,0xDC084433,0x2AA5C0D8,0xC9525451,
0xC3DED12F,0x614EA7C3,0xD2A94F3E,0x3434CFD4,0xB851524D,0xD1D4C9B2,0x415E14B9,0xCCCE4D83,
0x494DB6DD,0xB4565646,0xB2C9DEC7,0x566225BB,0xD0E12743,0x4635D2E2,0x3C53605B,0xC0D8E0B2,
0x5B6593D3,0xCAD24B57,0xC1D0D5E1,0x483E6254,0xCED5D623,0x49600FCC,0xC4A74F5B,0x982ACFDB,
0x3C475380,0xD2CDD4C3,0x505943C9,0xC0C08C52,0x4645C7D6,0x974F5946,0xCEDAD7D1,0x545155C9,
0xD8C6A85F,0x5134D5E0,0x415C6050,0xE0E3D5BB,0x504B5DD6,0xD2CD4366,0x0EB7DCDA,0x3E626241,
0xDCDABE26,0x442050DE,0xAA1B4963,0xBB12E0DC,0x0A545205,0xD1D0BB4F,0x4D4558CB,0xBFA9AF4E,
0x3B4AD8DE,0x0351514F,0xD5D6DEC1,0x62495ACB,0xD8A44C5E,0xAD30DFE2,0x4C5B5B4D,0xE1DED534,
0x65383CD4,0xC3444054,0xB9C3DDD6,0x31525B53,0xDCDAC73C,0x64C039C3,0xC7A03C5B,0x0795DBDC,
0x3F565C4C,0xE1DFC340,0x68B288B5,0xBA472151,0xD3CED4E0,0x2C575F58,0xE1D7313C,0x65A6BAAE,
0xC9402F4D,0xBD92CCDC,0xBC505151,0xDBE19F31,0x6444A146,0xD4284251,0xA7C1D8DE,0x33596157,
0xE2E1D0A3,0x6540B3B4,0xC948485D,0xC6C3DBE1,0x50605444,0xDEDFBB3E,0x61A4D22E,0xD0434C51,
0xBA02D4D7,0x32575743,0xD6DFBC2D,0x6327D32F,0xCAA34E5C,0xD1B1DCE0,0x4E616141,0xD6D9C382,
0x62B4D8A6,0x15403E5A,0xC8D4D8C9,0x3B5B4D06,0xD5D6323A,0x60B8C128,0xC12E0F57,0x2FB2DAD5,
0x40585947,0xD9D6D2C6,0x6926CCB0,0xC1373B62,0xC3DDE1DF,0x5A63634E,0xE6E29449,0x613AE1D4,
0x405F6357,0xD3E2E3D3,0x615343C1,0xD4D1415F,0x51DBDDAB,0x34524252,0xAAD7B1B6,0x394F4DA4,
0xD4D0B7AA,0x64ADC194,0xC9034B5B,0x97D2E4E2,0x62616444,0xE7E5C544,0x64BFD6D0,0x37576166,
0xE3EDDFDA,0x616457B1,0xE1CD5157,0x60DAE1DC,0x54585B5D,0xD5E4D3B7,0x56494382,0xE1AD1A48,
0x63D1C2C8,0x3F4D5551,0xC0E3DCD9,0x5C605751,0xEADFB758,0x60B8CDE5,0x45626564,0xE5E7E5E2,
0x6B6556C4,0xE4A54266,0x4FE7E1E6,0x506B654F,0xEAE0D03C,0x564B32D8,0xD7485463,0x3EDDB5DC,
0xB25D5253,0xE4D38DD3,0x4D5F473A,0xE1C81D52,0x62C0BEE3,0x46615A63,0xF0E8E5D4,0x655B673C,
0xEAC55364,0x1CD1E1F0,0x616E6769,0xEDE6E0C5,0x61498BE2,0xC8B66172,0xE0E0D9EB,0x62675F4F,
0xE5C2C04C,0x504324E3,0xA8BF5358,0xBFB7E4CD,0x3C4A5C5E,0xDEDFC794,0x5A6059D8,0xE01B505C,
0x55CEEBE8,0x5D66625A,0xE5EDE049,0x6360B1E3,0xD849656D,0xDEDEECE3,0x696C600E,0xE0E39A50,
0x5D47E7E6,0x3A5F6163,0xC8DEEBC9,0x535057A9,0xE3994F54,0x6251E4D8,0x3457354A,0x40D9E2D3,
0x51605443,0xE6E4CE51,0x610DAED1,0xCC605F60,0xC9E4E4E5,0x636C5A4B,0xE5DC3158,0x64DAEBE7,
0x5C5F5D6F,0xEBEEDDD8,0x675C4C2E,0xE0AA6464,0x44E2E2E4,0x6957564E,0xEAE3D412,0x60D24340,
0xC8485C5D,0xB2E1CADB,0x49545451,0xE139D4C3,0x56C762CF,0xAFA59D53,0x149DD0D6,0x3F4A5556,
0xE5E3D82D,0x39506DD2,0xE0223B65,0x40B7E2E3,0x52646351,0xE5E1D211,0x4F56A1E3,0x24315B6D,
0xD3E4E1DE,0x5D645CB1,0xE3D24C52,0x4B46D1E4,0x5E5F62BA,0xCEDCD9D5,0x654CD3C7,0xC8964C54,
0x50D3D0D9,0x2453458B,0xD71C35AE,0x5243B7BA,0x013D34BE,0x4537B1DC,0x4254C54E,0xCED4CCCC,
0x54AF464F,0xDAA74845,0xC539ADDA,0x5D4B4D51,0xC1BFD2C0,0x5D41D6D7,0xC644465A,0xD7CCD1C3,
0x443B578E,0xC1C4C162,0xBF42E0D1,0xCB6661A7,0xD3B7BCB0,0xBA5830DB,0x21425057,0x3FC9E2D0,
0x425342A9,0xCFC74047,0xB545B7D8,0x2A286341,0xD1D3CFAA,0x4D5D47D3,0x4A478BBB,0x57BCE0DA,
0xB052413A,0xCDE2C858,0x51AF1F35,0xDA4E4B50,0xD4AA94DA,0x56603952,0xD2D6B4D1,0x4A3839C7,
0x8957254D,0xDAD2D6D7,0x61C3625B,0xE5DCB84D,0x27489BC0,0xC853535E,0xD1D2CDD7,0x5B6352D2,
0xDDCAB956,0x56BAE3C9,0x5951485B,0xDADAD6BE,0x3E5640C2,0xE5A16824,0x42B0C7CD,0x62562287,
0xC7CDD3C4,0x61A1C0C4,0xE19AB35A,0x9CD90A28,0x50BD5855,0xC9D0C939,0x2F4034C2,0xC8D45360,
0x54C8C0E5,0x484A5A37,0xB0DDDD45,0x564318C2,0xE0CD6455,0xD3D5D3C1,0x17606222,0xD4CEB950,
0x4F55C0E3,0xB1674E0F,0x2CCCB0E4,0x50BEB4A5,0xB2DBB068,0xBECE9EB5,0x4933474A,0xD156C8D3,
0xB6953C07,0x56BCD14E,0x232CC912,0xD2C6274B,0x5A25D343,0xC2263F02,0xD0DC1F35,0xB5515243,
0xDA9D4241,0xC32C4CE4,0x11525262,0xC7C8D4C7,0x5849B0C9,0xCBCB4D60,0xC63CDFE2,0x41596834,
0xDFDB1F1F,0x6043A6CD,0x52493548,0x4CD7E9E1,0x335A0B52,0xE5D24958,0x55C508A8,0xC0534859,
0xDFAEDCE1,0x5C335B56,0xE03E3FD2,0x52223DD6,0x414D4858,0xCAD8E5D4,0x445E62C3,0xE1B02A45,
0x483CD0DF,0x3C5E5C58,0xC3D7DFD0,0x7051CDD4,0xD53DB32A,0xAADFC6C6,0x51475260,0xC1E0D335,
0x4F2B2AB4,0xB260D254,0x4FC0C3E5,0x5BA94F46,0xC2E1D64C,0x43353AB1,0xC9D66047,0xCCC788C7,
0xCE5A5C2E,0xCEC64BA3,0x5654CACE,0x3862C7B3,0x08D6C7DE,0x5A319954,0x17DBC941,0x38C3AB20,
0x5CD43B48,0xC54CD945,0x5028ADC7,0x15D0372F,0x41ABD551,0xC8D0B543,0x55DC3C5E,0xD6B3274A,
0xE09957C9,0x844F4956,0xCDA7CAC1,0xBD6233CB,0xC2C25139,0xC2C8D8B8,0x4F505751,0xE0CF0FB8,
0x6681CEC1,0xD85D494A,0xD5DFCED2,0x613DB95C,0xE2C1D163,0xB8DCA6B4,0x550A5E66,0xE2D5CEBB,
0x334750C8,0x8A11315C,0x21CBB9DA,0xA5624B9B,0xD5D6AE48,0x5048C3A4,0xE0C15147,0xBBC654DD,
0x5A535050,0xE051D0E0,0x5D4940D8,0xBB033A5E,0xD8DAD8E0,0x4E466454,0xD6DC3354,0x4342A9E5,
0xA1546647,0xD8C8A6D5,0x5E2DB4D0,0xE05C2052,0xB0DE83C7,0x4D5D4A31,0xC44236D2,0x4323A9C9,
0x68BAD1AF,0x8151D2E0,0x3FB4B296,0x1F3ABC41,0xB638A934,0xD7C83E24,0x288B59C2,0x9948CA3C,
0x2C59C2DE,0x44524DA7,0x43C3D6C8,0x9A5AD8C9,0x0BD65756,0x5031E3CB,0x4A5749BC,0xD5D33632,
0x5EC2CBC5,0x4448D157,0x44D6E543,0x55CEA058,0xD8D3025F,0xB9C20A8D,0xCFAF6847,0x4BC7E488,
0x585951D1,0xD7C5B43D,0x4FC6C9CB,0x5663444D,0xDDE1C0E0,0x5C5D42CD,0xC024345E,0x37DBE1DE,
0x47525652,0xBDE3CE5F,0x4AC1D8CC,0xBC816266,0xD7E59AC4,0x45455745,0xEB404F2C,0x30BA1D87,
0x5C533F31,0xCD9DD9D3,0x5594B444,0xB4E0AE60,0xC50FD341,0xC7395251,0xD13FC1BC,0x44523A87,
0xD720ADA3,0x29C661D5,0x9842B65D,0xE1B3C7D6,0x474E65AF,0xDBBBBA57,0x5257D1E5,0xAB5A651B,
0xC4DBDEBB,0x5F439CD8,0xD2234665,0xD2D7D5DC,0x624D5860,0xDCD5C41F,0x314245DE,0x4756554B,
0x39B1E0E4,0x4F65B5CB,0xB8DD2C52,0x5730DDCB,0xAD53514F,0x8ACAD4DB,0x5C53A99F,0xBA96DB59,
0x50A8D5DB,0x41395B59,0xCBE8DF36,0x551E5546,0xEAC0604A,0x43DBC9B1,0x4A636039,0xE1DDA5C6,
0x65B2C2C1,0x1DBB3861,0xD1DFE1C8,0x514E5E55,0xE4DE3A5B,0xA53C94C3,0xB95C5A49,0xDED94EE4,
0x5B5EB52D,0xE0553921,0x3E83ADE2,0x14525253,0x95C1D0D7,0x366037D6,0x16B7102B,0x5332DBC5,
0x3D594030,0xE0D7D6C2,0x60CC5F4A,0xE0B14253,0xCF45A5E1,0x46546052,0xC3D7DC1C,0x6C5ADDDF,
0xD64D5148,0x4FDAE9BE,0x5B5E3056,0xE1D6BF4F,0x932FD3D3,0x50545F58,0x21D7E2D5,0x605D42D5,
0xC5D34658,0x58D5E2D0,0x5656214F,0xDBE04EDB,0x582EB144,0xCD9A4E55,0xC5D5B7C9,0x87495552,
0xCEEECA56,0x4F02CC59,0xE2306451,0xDDD224B5,0x445B5C42,0xDA3EC634,0x54C737E4,0x3B524553,
0xCECADCBA,0x515552C3,0xE0D23352,0x48DD40AA,0x92654042,0xD0C0AADE,0x5C5C98DA,0xC1373E4B,
0x4049D8E3,0x1D4D5DA9,0xA2D4BFBD,0x545FE1C0,0xC82E4C4B,0xD2ABD6D3,0x5F216053,0xD0DDDE43,
0x54BDD630,0xBEB96261,0xCFD1D2D2,0x636153CE,0xD8D05030,0x61E4E1D5,0x5C575260,0xD6DEE090,
0x4F5296D4,0xD2D16761,0xE1DAD6A2,0x4B6D59CC,0xD0CA404A,0x5746E7E3,0x655B4947,0xE1CCD6D3,
0x45A010D0,0xA2D36364,0xD4CFE036,0x415650B6,0xE1985F39,0x3142D4D0,0x5040BA8D,0xC0C8C85D,
0x20C0B638,0x4CB92245,0x2437DF38,0xD9B05134,0x49C840C0,0x44414621,0x30B4CE31,0xC03209D3,
0x2B184855,0xD2C1C4C8,0xC16352D8,0xA82C4053,0x9FCBD8D6,0x584C0960,0xD543CACC,0x2D4AC3E2,
0x4E9C585C,0xE1D7C8C7,0x5D614EC1,0x953C4AB7,0x36CFE1E1,0x6524514B,0xDBDCD357,0x48BFC6D5,
0x50D16466,0xD8E1E249,0x535747C8,0xCF455156,0x2ECBE0E0,0x674B2F44,0xD5AED852,0x8CB3C7C8,
0xB444595D,0xD5C3C9D5,0x004C4A3B,0xE21A5783,0x4C91B9AD,0x425A4C15,0xE3D9D1D0,0x5008574C,
0xDED35A51,0x48C7D48B,0x3B5B5918,0xD4C5BCA9,0x579EB9D7,0xD0524D51,0x35B0DBD5,0x585654C4,
0xD1D6C543,0x4F55C3D3,0x42620711,0xBBDED7DF,0x62044D42,0xD0CFC463,0x52B5E2D8,0x5254565B,
0xE9CDAED7,0x614212C1,0xC852285A,0xC2DFDBD9,0x62505853,0xE8D9CC56,0x4ACD41C1,0xE3626651,
0xE0E1B4D0,0x5E5454AD,0xCD40205D,0x47D2DEE8,0x4060555F,0xCEEAD454,0x494B2FDC,0xC200605E,
0xC4D3D1CF,0x66623DC9,0xB194C7B9,0x513FDEE5,0x1136595A,0xC6E2D742,0x503F1A4A,0xDD48324E,
0x12DA3EDB,0x45555353,0xCCC6C8C2,0x52532ACF,0xDBAA4A50,0xC9D735DD,0x4E6A945B,0xDEBFBBD4,
0x574C1FD7,0xB3524E60,0xD2DAE3DB,0x6C6220AA,0xD8CD50BB,0x4BD8DDDA,0x55595A63,0xD9D7C2C1,
0x64C1D6E1,0xB1BC526B,0xD7E6E041,0x545E563C,0xDBCC5055,0x28DED5D1,0x63392363,0xE2B1D318,
0x43443ED1,0xC19C5B5C,0xD9CFDCC6,0x12515F48,0xE162ABC2,0x564544E7,0x5E50859F,0xCDBFD7C3,
0x4A5352E0,0xD3C03848,0x37D651D6,0xA1528955,0xD0372CC2,0x445DBED1,0x303DA23A,0x46E4E1C2,
0x5950C666,0xE1D9303D,0x5CC6B5C7,0x424C5457,0xDADABFCB,0x604DC1C8,0xD138574B,0x1FE3DACD,
0x58532E5C,0xE0C53645,0xCEC13AC2,0x48455744,0xD6D7CA93,0x51513CB5,0xD1285042,0x1B32CDD1,
0x49153A3E,0xD54BD644,0x503BB9D5,0x46474535,0x92C3D4B6,0x514B33BE,0xD214C12B,0xC8CA62E3,
0x32444E51,0xA0A7D09D,0x51468CC3,0xCDC03F42,0xDDD1A4D3,0x49394866,0xD5C02034,0x343634D5,
0x3E545052,0xAFD2DCD1,0x6923D5B2,0xAF3BB634,0xC3DDCDA0,0x5E254A57,0xC8D9C151,0x5C17D9A6,
0xBC5A23C0,0xC4DD46C2,0x5409C347,0xDCB74455,0xC9DE2635,0xD6575D51,0xE13453C2,0x4E5DC5D2,
0xA3614AD2,0xCFC8AED3,0x524440C6,0xC2C43653,0x30C391DB,0xBF535715,0xC71D34AD,0x5448CBDC,
0x6348C346,0xC5DEE8C4,0x584A2860,0x02D7D054,0x40C6D3C0,0x21445353,0xE2B99C15,0x6737B4DA,
0x422E484A,0xCDD6E2C6,0x51335450,0xE4DA4C5C,0xBAD846C6,0x30674A3F,0xD4CEC632,0x524942DF,
0xBF4D5150,0x46D6E0D7,0x2E46CD5D,0xE1CE6322,0x3949C8D4,0x44625343,0xD4D4D7D6,0x5D6030C9,
0xDBBB56C9,0x4DE4D138,0x5A564754,0xDDD7BB27,0x3A4026CD,0xDB556145,0xBED9D5CC,0x5E5FAB44,
0xDDCC1B53,0x43BFD5D3,0x59585150,0xC9DFDE3B,0x6457D7E0,0xB438624F,0x31E2E2C0,0x61498735,
0xB9CBC35A,0x8BBBD5DC,0xB15E5A3F,0xC3E0CD4C,0x3E40A4C0,0xD5C65E60,0xE0C7C8D1,0xA5536454,
0xDBC14FC9,0xAF61BDDB,0xB35A61B2,0xD6D0CACB,0x66534ED8,0xD4BAC443,0x41C6D0CC,0x2F576036,
0xCCD1C6A2,0x65A7D9C7,0xB255BC61,0xC7E8DECE,0x62503B60,0xDEDBB25F,0xB8C5B5D5,0x4A615855,
0xE1D440D5,0x6D31D3DF,0x39574458,0xD4E3DFD4,0x424B5841,0xDAB3574F,0xA4D1DCB8,0x5A642944,
0xD5D6319F,0x5A25D6C7,0xC5BA4754,0xC2E1C554,0xA440529B,0xDD535ABC,0xA6B9ADC0,0x475E4DC3,
0x48C7C1D1,0x385FC7DA,0xD3B09E35,0x45CA5022,0x2656CEC1,0xCD4709B9,0x5364D4D5,0x3E2C45C5,
0x21DCD6C9,0x55A5B860,0xD4CF4B39,0xC4DFA5B1,0x4330635B,0xD5C4C849,0x8ACBA7D4,0x17415163,
0xE0E1B83E,0x5CC00B2F,0xB63B2265,0xDBA5A3D4,0x604043CF,0xD336B047,0xBAC4BAD1,0x59604787,
0xD09513D1,0x53C1D2C5,0x5052BB52,0xC1C4BADA,0x4E40C2AB,0xD1504F4A,0xC3D5CBBC,0x51514C3C,
0xD957B5C8,0x4F09CBD3,0x4A453098,0xB1DA8B50,0x4646BAD2,0xC2B13F4A,0xA3D438BB,0xB74D3142,
0x41AF3799,0x5329E3B4,0xA6B40852,0xD6E3A956,0x41BE4A57,0xD83A5835,0xDA3291D0,0x904761C9,
0xD03555A5,0x41BECED2,0x43568953,0xD4C811C8,0xB24350D2,0x3251944C,0x3139D0DA,0x643FBDB8,
0xB3B8D642,0x52E0DA3E,0x60B6C465,0xD4D4D22E,0xB0B65393,0x90454359,0xBDC4A8DC,0x6432B7BB,
0xC023A834,0xB3BECDCB,0x4D3C4956,0xD748C5D2,0x2F5496CF,0xCA504FB4,0x40CACCA5,0x584D30BD,
0xDCBC9630,0xC2DA49D2,0xD6565E5F,0xCCDD3296,0x485736C4,0xC94D5340,0xE1D3C1D2,0x665A4EC8,
0xB3B5A387,0x3615E0D8,0x464E4F51,0xC1BEA741,0x60D6E5D3,0x4D469465,0xDAD9D1C4,0x44AB5B3E,
0xB5CE4555,0xD5D7B7A7,0x60B64454,0xE2A09242,0x09C151D4,0x2E4B3B5B,0xD4B2D0BA,0xB8525ADB,
0x525BBA24,0x4FC4D8DE,0x5929D454,0xCFC00934,0x4485B8D0,0x13C62759,0xC53CC9AC,0x5B4B9C04,
0xB94144D1,0x37C0D3D0,0x57543121,0xCDC4D1BA,0xC41351D2,0xC85B5948,0x09D0D28D,0x5A4CD78B,
0xC4403812,0xD3D2B4C1,0x31D15150,0xD4D44C62,0xD6D34FA8,0xB3536048,0xC8292DC6,0x3AA1C2D7,
0x56329755,0xDA41B4D7,0x4B523FD3,0x4C258F52,0xC5B0D4CE,0x5B03ACB4,0xC15ECE44,0x2BE2D2CD,
0x592E3454,0xD7D2915B,0xBAD03627,0x58281A34,0xCBD54B24,0x311BC5C9,0xB0534F44,0x34C3BEC2,
0xB7B5B543,0x45371036,0x41A1DBAF,0x37432AAD,0xC4CF163B,0x3B412600,0xD9254943,0xDF5A2CD3,
0x564352C6,0x413CC3CF,0x453CCFD4,0x4E4F393A,0xD5CBCEC1,0x52B65BD4,0x1241CA5A,0xC60DD7D2,
0x5B465104,0xABCBC857,0xB8DCDCD3,0x2A35546E,0xE3D13CC4,0xA1AC51D0,0x20386163,0xDAC2D1D0,
0x586229E0,0xB4B23452,0xA3DAD6D3,0x5359533A,0xD7C73C4C,0x04C6C3D8,0x49325D48,0xD5D1DA53,
0x5250CAB8,0xB74F5341,0xC7D3CFC0,0x4C3D429C,0x5442DB56,0x41C9D3E4,0x51A83C56,0xC0D2B059,
0x4CCBCEBB,0x503AB654,0xDE43BAD5,0x37C35220,0x5529BB42,0xC82915B7,0xB32C4CD2,0xD83653C3,
0xC4534CD2,0xC74B9730,0x425C30D8,0x5534CDC7,0x4EC6CF2F,0x37CEE250,0x29B65538,0xCFBF2131,
0xD2AB4B46,0x103F44B0,0x365127BD,0xB6C3AED7,0x51B8C355,0xA7231B35,0x13C3C4B6,0xAA234BA1,
0xE09D5FB4,0x4ED1B13A,0x0059C94B,0xD8C343C2,0x36C5303E,0x0A3A134A,0xB8C8C430,0x5F4B9FCA,
0xBB2F3CB2,0x4DC5E0AB,0x5A1FC348,0x41BED242,0xB3B2A2D1,0x2F573F2C,0xADC7A6B9,0xA8A4AE98,
0xD0B25D42,0xD3B047C6,0x2349844D,0xDB4D33D1,0x405840D0,0x3A5596C9,0xA6D0D5BE,0x64B3B853,
0xD4C0B72D,0xC0D844D7,0x45483A63,0xD6B31CB6,0x554309D2,0x0F564807,0xDCD9D3CF,0x60373B42,
0xD1B83D57,0xB0CAC6D5,0xB7606039,0xD9D0994F,0x3AE0D8D5,0x86595E69,0xE2E3B417,0x553629C2,
0x45335962,0xDECDCFDB,0x6A5EC7E2,0xC251A655,0x39DEE0D6,0x65422F53,0xD430C044,0xC3E0C7CD,
0x6149395E,0xE0CFB405,0x4624ADC0,0x9E5B3E4C,0xDCD421C3,0x3C304FBD,0xAD619B3C,0x4BA8CEDF,
0x4F37C4C1,0x40D05041,0x39C3D5A7,0x1840B340,0xD6A35004,0xAA238E36,0x314434C3,0x3745CFB7,
0x244225C6,0xC74318B4,0x93B752C5,0xB13CB83F,0xC851B5C2,0x35D24CC1,0x44BFBB4C,0xD9C21A51,
0x1ED35047,0xD3215419,0xDD3E60D1,0xB14F45C4,0x5259C7C9,0x28C0C9CB,0x461BCC54,0x32D4C839,
0x52D2D15A,0xC4CC4140,0xD1C35344,0x53CFB630,0xCB3E304B,0xB0D7BD37,0x105550C5,0xCB403B01,
0x38C3B0AA,0x5D53D0B9,0xBE2636CE,0x36C9D9BC,0x52C89760,0x9DD0CD4D,0xB135301E,0x185B18A9,
0xCCC4B7D2,0x563152D1,0xC0332538,0x4E52D1E0,0x3A113C3C,0xCEC73030,0x50D2D428,0xB958324B,
0xD8D6C434,0x40405491,0xDA375548,0xD0D14CC7,0x4C6437C9,0xD4914DD2,0x51C1D4D4,0x5B608C52,
0xD6DCD1C4,0x59DCA348,0xD8296257,0xD5D8C242,0x553C0CB8,0xCC3E5355,0xC6D9D3C7,0x345A411B,
0xC2D34E57,0xB0BFCBCE,0x1F5560AB,0xC6D63533,0x65C5DBCF,0x45A9B251,0xD1D9D752,0x3F418646,
0xB7315653,0xD0D2CBC7,0x5A60C0C5,0x2F5617D1,0x53DDD5D8,0x6012C154,0xC3B4BB54,0xC6D7B3C2,
0xB9574323,0xDEBD58A3,0x01332DC3,0x525D31B2,0xA7388AD0,0xBC32D1D2,0xC75051A5,0x3ABAC445,
0xB848A3D7,0x154C5889,0xB2D7CA42,0xB9C9BA3E,0x4CD95B50,0xD237D851,0xC7143BC4,0xCC006157,
0x9D49CFCD,0xC641B5C5,0x55C84251,0xC2A503D0,0x5231A6AB,0xCAC9B451,0xB0060434,0xCC163BB3,
0xCD54A344,0x1EC53585,0x4E398D33,0xAA4DC8CD,0x52C115B5,0x51DCDA45,0xC6B94748,0xD2D03B55,
0xC8413138,0xD4B4553F,0xC0CF5641,0x4B94D6B7,0x46512742,0xACD5CFC2,0x53480688,0x303EB043,
0x83D1CEC3,0x6746D19E,0xC186C03B,0xB0D2DFC5,0x5BB15759,0xD6C2944E,0xC905C5D1,0x40695021,
0xB3C42BD8,0x5D27E1E2,0x4F2C4F59,0xCCE1CB48,0x1740A7BC,0xE05965AB,0xD5BEC508,0x496946E2,
0xC1544CD2,0x4BC0D5D2,0x2688BF3B,0xAFE16443,0x34DAD804,0xA2524E55,0xE1D3394A,0xA1914C30,
0xD4884B1D,0xC1D0915C,0xBC3E4FDA,0x2E375443,0x2E08C7C4,0x234121BB,0x59D0B2C0,0x9F44E44C,
0xB2C7363A,0x88DC3060,0xAAB0AB4C,0xD5385622,0x5AB0D0C2,0x4C57D1D3,0x4FB4C3A7,0x22C4C245,
0xACB79142,0xD4C34E4D,0xD355B8D0,0xC5B85EB9,0x4F4E2AA8,0x3248C5D3,0x4831B10C,0x37C4D343,
0x2559C2DE,0x51CCA43A,0x34B4D24A,0x3EB7370C,0xAEC53D4D,0xE3D2864F,0xD03567D9,0xBC565521,
0xBC4CB9DD,0x484840BF,0x414C8EB6,0xCCD5D1CE,0x55B9354D,0xC122C34A,0xA9A137CE,0x42AB4050,
0xBB45AD30,0xB487A9E0,0x363B3A52,0xC5B4CCC2,0x261C3E3E,0xD4C3574F,0xD6C79F25,0x50453B3F,
0xCDA72D35,0xAA8036D8,0x5658A53B,0xD4BBB1B5,0x4E3ACDD0,0x5850C141,0xC1D2D5AA,0x4AD81A42,
0x22B13A65,0xDEDBB509,0x0A9860A6,0xCB4957A8,0xBB32D0D4,0x54534233,0x15B6C118,0x51C7D9BE,
0x43210A39,0xB4C3A230,0x5DD1C6BC,0x2C4F8654,0xCEC39ECA,0x495323C4,0xCE33C932,0xBB40C2C0,
0x590A49A8,0xBEA6AF31,0x2DC1CBB5,0x334B4F43,0xD9D4B8B0,0xAD592EC4,0xBE5A4E96,0xC40BA2CE,
0x5146D3BD,0x51503633,0x9DE2D5D0,0x39883F4D,0xD9354151,0xD5D14A9E,0xC6A4573E,0xD6445243,
0x2944BDD8,0x4A2648A5,0xC1C039A0,0x53C2C9B0,0x39BD313C,0x01D3C449,0x4786D822,0x25BC4056,
0xD3DB5043,0x29532DC2,0xB4453CA1,0xB9C634C3,0x5449CDD0,0x373EC448,0xADDBC647,0x1F43304A,
0x0527B541,0xC2C2B8C6,0x464B4CD0,0x8342BA30,0x563FE2C2,0x4C30411E,0xB5D4CD52,0xA1BDCF18,
0xBE47578D,0xC4CE35B0,0x39549CC9,0xB85655C3,0x9FB1B6C9,0x3834C5A3,0xC0A5421C,0x56C6C9C8,
0x4C2AA319,0xBDD1C253,0x428408A3,0xD6155149,0xD6D24221,0x155F3BD5,0xC95858CF,0x15C4CFC6,
0x5C55B1B1,0xD4D09639,0xC3DCC856,0x2C4C464D,0xD2B250B5,0xAB06AACF,0x40565245,0x9CDAD0CB,
0x54A4D64A,0xCCC6525C,0xC9D9AE34,0x3B5344BF,0xD33B5445,0x42DACBD3,0x4B622CC3,0xD3B04935,
0x4FCED5BA,0x4E4B3440,0xD1C81C22,0x64D9DDC4,0x3B49A354,0xD7DDA450,0x421E3640,0xBB2B444C,
0xDFC82E87,0x5A5EC8D6,0x4C5641CE,0x47D5DDC4,0x4B43C144,0xBDB93251,0xC5D1CA42,0x2B5FC8CD,
0x26285BC5,0x50D0D792,0x4E46BC21,0xA5C7A640,0x44D8C248,0xCD59B6C3,0xAA98560E,0x4FB8D2BB,
0x2B40429B,0xB44129C8,0x3346C1D1,0xC76047DA,0x90B2B445,0x534DD3D0,0x488A26AC,0xAED0D043,
0xC4A9C227,0xD52F68A3,0xC1B1B24B,0xC35894D0,0xD3505FCD,0x4C41C9CA,0x2940D2CC,0x15CD5DBF,
0xC113BF50,0x8757A1BF,0xD0933FC5,0x1F3647C7,0xDE11332C,0x4AD058C3,0xC9414149,0xC91340AE,
0x33C10A9C,0x1D403130,0xE8D7AC45,0x52C76143,0xD3575017,0xD22F41DE,0x5750BCAC,0x9A441244,
0xDDDAD9D1,0x61C55760,0xDBCF895A,0xD9C830D0,0x23506251,0xD3B44539,0xD7D3D0D6,0x55525B62,
0xDCD513B1,0x57C8BCD2,0x33424E58,0xD2D0B331,0x52D5C5C8,0x4222B86D,0xE1DE2DC7,0x454655B1,
0xA643404D,0xCBBACCD1,0x54D84821,0x29A8D56D,0xDEDDC0C0,0x21955D50,0xCBBA5254,0x2951CDDB,
0x61C717C7,0x0727DB63,0x38D5D5AB,0x55BC074A,0xC3DAA753,0xBBCD204E,0x61D6BA40,0xD554B951,
0xB0BF29CE,0x373E4045,0xB81EC4C2,0x80B34416,0x6CD4D930,0xC62FD633,0x11D1C151,0x49C72B5E,
0xC0B1C5A5,0xB7044A99,0x65B2D32B,0x324CD7D2,0x49C3D340,0x31CA2556,0xB3C2BD45,0xB927353C,
0x5B38D9C4,0x9E5155DD,0x4338D39F,0x534DD4C1,0x4BA9BB32,0xA2CCC74F,0x6498E4CD,0x41B751B7,
0xC4D8D457,0x4144AC2B,0xA64A533F,0xD2C9C2A9,0x636AE1DC,0x414E52DA,0x42D0E4D5,0x6052BC48,
0xC4B9B251,0xD9D0C8B3,0x5E669AC3,0xC3B755B5,0x369FE1E6,0x5C5E5545,0xC3CCC940,0x8AD6D7CA,
0x49654B21,0xD1D44621,0x4144CEE1,0x2B575140,0xBEAE21B7,0x4A4FD7D6,0x4567BED2,0x32D0C4C8,
0x523AC1C9,0xB83E8C42,0xD6D29FAB,0xC8B55555,0xD85452AE,0xB64644D8,0x445146D4,0xA249B5A6,
0x5125D0D7,0x9DC0B032,0x27242533,0xCBAD3123,0x973649C9,0xC4244539,0x3151B7C8,0xCE29A8B0,
0x4F39B3BA,0xBD0B4001,0xC4B534B9,0xD7474EB0,0xBD195139,0xD3C1442D,0x512EB312,0xC13D48CD,
0x43209ABD,0x4D8AD4A5,0x349CA02D,0xCED9914F,0x5493C557,0xDDCE55A5,0xD0C358B9,0x95514FB2,
0xB55635BF,0x3CCED0D6,0x6553D554,0xB5D0A0B7,0xD0D5C4C8,0x33A9575B,0xD5CC495A,0x42CECAD3,
0x5954C258,0xCAD8403A,0x49CBD8C7,0x50414E50,0xD0D7C548,0x58C6C8C2,0x5259BC51,0xD4D886BC,
0x4943A7C9,0x314E4353,0x96D1D6D2,0x6998D2C0,0x5813D754,0xD0DDD7B4,0xA2A2505A,0xC8C6475F,
0xD2B9B6C5,0x545740C7,0x562EC1C9,0x5F1BE5D1,0x4E3EC345,0x34CDD146,0x4BB6C632,0x1553C0AA,
0x51D3C3D4,0x3C52B407,0xC3419035,0x20A7C0BD,0x3A303E43,0xC354B8C6,0x44D7CBD1,0x1754AB4B,
0xD2973D41,0x4650A8D3,0xA65135A5,0xCC503AD5,0x58D7D712,0x5057D540,0xC7D1C221,0x42BB4148,
0xD0912249,0xD73460CA,0xB42893C1,0x955AB637,0xC63A96D8,0x45344AC1,0x98A7C745,0xD0CC462A,
0xC3C53E40,0x22C3465B,0xC4A9B2C3,0xC44654C1,0xC9C83846,0x4BD91649,0xD6BE1C43,0xC4D75D59,
0xC5C13D31,0xB35550AE,0xC3D3B3B9,0x5A46CC41,0xBD35BCAA,0x8ED251B7,0x2CBDA234,0xAF374454,
0xD1E1C5B7,0x4BB23257,0xDBD15055,0xC5B255CB,0x17544040,0xA6A1A124,0x41DBC4CB,0x5049CA5A,
0xD8D5C045,0x944D45C8,0x1F00475A,0x90C3C6A0,0x64C0D9CC,0x4832C75D,0xC4E1DB1B,0x38623CBF,
0xA5B3504A,0xC5CEBCCC,0x5C602BD8,0xB8443490,0x55D5E2C7,0x6157D136,0xB4C53AB3,0xACD6D2B3,
0x614EC855,0xD5C4409A,0x9ECAB1A5,0x61488A3A,0xCB34D3A7,0x2BC7C7C7,0x5D46B152,0xBAB2BAC2,
0x3129C3C1,0x5E3B2C2D,0x4333E332,0x9047D9D4,0x435245A0,0xA7CB2C9C,0x4C38D2C8,0x30B73E43,
0xCED7BE60,0xC4C348C2,0xC86757D3,0x09A82DCD,0x4A4AC7D3,0x554CBDBE,0x46E0BB3D,0x92D5B444,
0xDA554645,0x8AAA45BF,0x414B82C9,0xA117AF90,0x37928FC8,0xB9492C25,0xD64744C8,0x9A1242BA,
0x455C27D1,0xC394BEC3,0xB24F49D9,0xC93A1951,0x904445D7,0x333DB1B6,0x20A0A840,0xD0CDC9AD,
0xC35B5739,0xDCD24F08,0x132359D4,0xA3623700,0xAE2303D2,0x58CFDCC7,0x5743A652,0xD7CBB8D3,
0x43CE4A2F,0xA9308161,0xD0A739C7,0xB45044D1,0x47AB414B,0xD2C6E3C9,0x4F525248,0xD4D24B48,
0xB3B6C4B6,0xAE4D562C,0xD6C45443,0x42E1DCB2,0x5C40305E,0xDCD34790,0xB3D72136,0x262A4A5B,
0xE1C34F4C,0x24D24BD7,0x4646B55A,0xC183C9A4,0x5399C6BF,0x47AE3149,0xC0D1C247,0x41A8BBC0,
0xC338A15B,0xC0DA953B,0x2D523BCC,0xC0343F3F,0xC02B36B2,0x5B4AD3CD,0x404927BD,0xC5DDCE90,
0x4037343D,0x1BC73647,0xB7AA9D30,0x673DD4C6,0x3542AEB1,0x31DBE12A,0x3F16A754,0xD3C64150,
0xCAB640B6,0x5860A8B9,0x3742CDBB,0x59BCDDD0,0x5AAAB140,0xBBC7D34A,0xC7BD0CC1,0x12514645,
0xBFD85499,0x3154C9DA,0xAA585735,0xB2CCD1C3,0x49520DC5,0xBA54B0C3,0xD3D02FC6,0x524DBA43,
0xA6363A33,0xA1A1C3D6,0x40454248,0xC151B8CA,0x25A6D1DB,0x512F5238,0xD0D1964B,0xB050A5D1,
0xA8495A3E,0xD24886D4,0x6998DFD1,0x4A55CBC0,0xC2D4D33E,0x48C03047,0xD4984F55,0xE20551D3,
0x214850AA,0x2050B621,0x30A0C5D9,0x51353CBD,0xD0B71A5A,0xD1A807D2,0xA54B53A4,0xC0C158B6,
0xC422C4B2,0x3F5434C3,0xCBB13731,0xCFD651B2,0xB840B251,0xD75B55C4,0xBE3032CC,0x514042C3,
0xB33BCDBA,0x49C59CC5,0x3BA5C54E,0x3CA7BA32,0xB4A439C6,0xBC174232,0xDBD04B53,0x21023FCC,
0x2A5F3CB7,0x34C7C1C8,0x453ED73F,0x5341BD45,0xDED9A720,0x25C95432,0xC7484646,0xCE9DB8CE,
0x34B24C42,0xA0C5534F,0xE1CEC6B5,0x401E5D51,0xDA884E2D,0xBE2412D6,0x455B50C8,0xBE31A541,
0x2ADBDACB,0x508F5460,0xDAD0AB43,0xBCB3A7BA,0xA84B544F,0xCCAA43C1,0x2635BFD4,0x53463851,
0xC5D3BCC8,0x5641BF9B,0x38C2324B,0xB8CDD4BC,0x2C1B213F,0xAEB6305F,0xD3D0AED1,0x35405852,
0xD6C3354A,0xC4CBB52A,0x48CE5236,0xCA913255,0x9494C5D0,0x46464C91,0xB7C72741,0x1DCB9BCA,
0x42C6C158,0xCBD2CD5D,0x11D24C3C,0xC2344750,0xD0293DA4,0x4B56C5D1,0x5AAD21C3,0x3124DBB5,
0x4BC2C6B5,0x4FBD0455,0xC7D8AC50,0x51A4B5C6,0x4A40BD40,0xC3C6D74C,0x4EC4BB32,0x17324A45,
0xD0D6C63B,0x93C94546,0x510C0054,0xC2A7BCD3,0x5831ABAD,0x3B8ABA54,0x33DDD7C7,0x30C02454,
0xB0CE415E,0xCDA4C8C5,0x4D504238,0xC0A73F44,0x46BCD8CA,0x5251A3B4,0x3350D6BB,0x53C0B1DB,
0x5426BB41,0xBFC4C542,0x3991B0B5,0x9CB03157,0x5314D9D1,0x515599D3,0x262AD146,0x04CCD484,
0x44534C99,0xD7C3413C,0x3147CDD5,0x5B25263C,0x49B0D0AD,0x93D8CDBC,0x47821F62,0xDCD3194D,
0xCD5950D7,0xC14262B7,0xA048D3CE,0x5F57D1D4,0x4F2191B0,0xB8D5DA17,0x3B5E35BC,0xB44E272B,
0x2ECCB7DE,0x524BAB96,0xA045BB36,0xCCC7B6C2,0x315A53CC,0x4910B020,0xC254D3DA,0x263B45BF,
0x40103482,0xC4B9D0BE,0x235A56C6,0xC7D0B642,0x4CD4C938,0xB3904451,0xD5A25236,0xD5BE13C2,
0x395B5FC8,0xD75406AD,0x2844B3E7,0x57512E44,0xA3BAC519,0xCDCCC1C3,0xA1B05E40,0xDABA2F5F,
0x4459D1E1,0x445A59D0,0xAABAC5C3,0xB2B2CDB2,0xA9415E40,0xE1D02039,0x503E3CD8,0x26572857,
0xB6CBCCD1,0x2DA83AC1,0xB0D05462,0xE1D2CBAE,0xC43A5E36,0xD5C46247,0xC937B1C2,0x1A582BC3,
0x05C74F49,0x31CCCCD3,0x41452142,0xD99BB134,0x31CC46AF,0x15C64852,0xD0CCAD52,0xBD4A43CA,
0x2631513E,0x23CDC7C7,0x3A5AB2CA,0xA5C8AB42,0x36D8C955,0xB03549BF,0xCB3C4944,0xB8D2C3B8,
0x50C4425D,0xA4DBBB2F,0xD5B3B655,0xB4C8584C,0xD0B15043,0xC3471ED5,0xC25655AD,0x5AC5D219,
0x4CBADEB9,0x4DC6C04A,0xC4D90F60,0x87D3BA4B,0x44443938,0x40221FC1,0x29ABD3C4,0x51C4C749,
0xC33B2643,0x25C1B1B5,0x43C48045,0x541AD84D,0x2E3BC3CF,0x50C3CA23,0x19C8B358,0x36B3CAA6,
0xC19F5047,0xCB0B91C3,0x2A4A51CD,0x935DBBBD,0x912DA4D6,0x593FC7B7,0xA0A3BE4E,0xC757D7DC,
0x4CBD59C2,0x20CAAC4C,0x242BCFB6,0x41474C85,0xD2C42942,0xB08BA7DB,0x525DBD50,0xD0C0C4C3,
0x53B59AC8,0x3F523C51,0xD9C3C4BC,0xB7C049D1,0x2BB9595B,0xD8B5C2BE,0x11553CCA,0x113E5643,
0xD4CCC9BE,0x4E5433BF,0xCB5EA8B4,0x10D514D7,0x573E1430,0xC430A448,0xD3D6C4C8,0x46BB6053,
0xC8B73C27,0xC848C6C6,0x403B4591,0xB1C03E50,0x3FCCDBCF,0x39423852,0xD4DA4938,0x46D2453D,
0x263A1343,0xDAA8432E,0x46D82EC6,0x3939B85A,0xC7B2C441,0x285331C9,0x472A42B9,0x37C9BF1B,
0x5AABE1C2,0x2DA53019,0x95D8BA53,0x50BEC242,0xA743A44A,0xD2A8373C,0x5851D7D2,0x544BAAC4,
0x2CBEDACA,0x46A5B418,0x47D24453,0xCDC2C150,0xC364ADDF,0x3E47578C,0x35B1DBD4,0x4A53BFC4,
0x345DB9AD,0xD4C4B1D1,0x335456DF,0xA353424E,0xA4B7D1E0,0x46183826,0x10C43D4F,0xE1B0D20F,
0xA33F63B6,0xD337524C,0x813EACDA,0x545827C5,0xCAA90CBB,0xCFDA18D8,0x31B25A65,0xE2C9954E,
0xB92E53CA,0xB14F6040,0xD3A1B6B6,0x5225D6DD,0x55AD5355,0xD7D9C8B2,0x47B0A743,0x9E354F5C,
0xD9CC2499,0x59BECBCC,0x3F1DCB66,0xD1E1B6C1,0x2A48548C,0xC8395050,0xC0C0BCC2,0x5C52C3D2,
0xBF442445,0xCFE3D71E,0x4AC3465F,0xCEC45155,0xD6BE24BF,0x605532CF,0x9757C1A2,0x54CAD9D9,
0x5040A536,0x94C7C648,0xC8D5C54B,0x5C5024BD,0xD1BF42A6,0x3CC4D231,0x4B3E414E,0xB5A515B3,
0xDBC2BAB7,0x525F44B8,0xA9CA3EB4,0x3689D7CE,0x21513E51,0x91C63C49,0xBBDBD1C6,0x45613035,
0xCB8E341A,0x5635D7DD,0x575545B1,0xB507CD3B,0x23D4D8BE,0xA0555218,0xC9D52651,0x3314D5D5,
0x4F515754,0xC3CFB199,0x39B2D4D0,0x4B5D5939,0xD6D0D0B2,0x4422C3DE,0x99565F57,0xCDC1CCB0,
0x402DD0D9,0xB15A6932,0xD9D4D121,0x5A54C5DE,0x4A494D50,0xD0C5D3D2,0x4548D4D2,0x0E356060,
0xE1D3D1BE,0x4A5157C3,0xD0A94856,0xC4CEB6C1,0xB95630DB,0xC0306153,0xC8D0D5C0,0x565644A4,
0xD19B3C4C,0xDE92C3D1,0xA8AC5DBD,0xC0C05858,0xD11DC3DB,0x4F505637,0xC4C02249,0x2ECBD0CA,
0x3D84AD36,0xBDD33E60,0xBAD9BAC3,0x49535344,0xD1AB3A3F,0xDAC20CCE,0x42C2593E,0xC0B2C361,
0xC0BAC6D4,0x4D44523D,0xC5CDB245,0xCBD3B34B,0x5DA4AA32,0xCDAE3C55,0xC0D4C4CB,0x44514F4D,
0x03C8B52D,0xB6D4C4B9,0x61C3BD49,0xBBC1D264,0x1BD8C6CD,0x2F4B5A50,0xC9C1272F,0x2ED3CEBF,
0x6145A535,0xE03AB531,0x40C9CDBC,0x49345251,0xBDD0C04F,0x2BD1D0C5,0x60493A52,0xCACAD2A2,
0x4BA0CCC9,0x48503B53,0xB5C3CD0E,0x51D1D1C7,0x5C500F53,0xD9D6CDBA,0x51CAB43D,0x87455D49,
0xC3AECBB6,0x5A39D5CF,0x5E53C432,0xCFD6C9C7,0x4534CF96,0x2A854C61,0xC7C5CAC5,0x554B12CA,
0x4E4BC839,0x86D0CED2,0x6343D2B1,0x943CBC51,0xB1CED5BD,0x5C3FC438,0x3457B2A1,0xCCD3C0D7,
0x42403D80,0xAECA5558,0xB518C8CE,0x475BC0C9,0x4856C0C8,0x43D5CFCE,0x5019D044,0xBE43004A,
0xBDC93EB6,0x3B4DAAC1,0x836093CC,0x3221C5D8,0x5441BFC6,0x53C1C63D,0x32A1DB46,0x1641B2AD,
0xA15139C9,0xADC03CCB,0x4A43BDB5,0xB14628AB,0xB9B644D0,0x2A4BBBA7,0x4255C2C0,0x43C4C6B7,
0x4B2ECDBA,0x020C4148,0x499AD3AF,0x124C9AD3,0x3363B1D1,0x05BCC2CC,0x5532C7C2,0x2B3B2250,
0xBEC5D0C8,0x27261C31,0xBA5452B4,0x98C2B3D1,0x5655C2CC,0x93382939,0x9DADC8C9,0xA85424D4,
0xC05C26AD,0x29CEB2CD,0x503A32A1,0x962EB240,0x8C46B9CD,0x474FBAD3,0xBC5DC1CF,0x4AB7C8BE,
0x5145C2B4,0xB403068C,0xC7983BAF,0xC9354AC7,0xC35553C8,0x273BBCCA,0x5249C6C8,0x4228BE2B,
0x42B7C2C6,0xA93CBCA9,0xA15D94CD,0x2DBA3FC4,0x4649C9C7,0xAB478936,0xC536A4BD,0xAF4814D4,
0x2C591BD0,0x44C8C03A,0x471EC0CC,0xB8404139,0xD1AD4C32,0xC93AAAD1,0xB16752DB,0xC349AACC,
0x5642CDDA,0x59331392,0xBAC4C646,0xC507C3CA,0xB65E56A7,0x2EC6CBC3,0x4C58D5CF,0x33532127,
0xBCC20EC8,0x4246B0CD,0xBA6146BE,0xBBD1D0CA,0x34423CD0,0xB8474C51,0xBCC2C5B5,0x305B22D7,
0xB55E53CB,0x31C8D3CE,0x6241D2CD,0x2934B543,0xC9C2C7A8,0x8F3B2802,0xBF5F4FBE,0xB9B4ABC9,
0x3F51C4D3,0x37A54B40,0x90BDC0C4,0xA75ABCCF,0xB65F46CE,0x18C4C7C2,0x423935BC,0xB34B2440,
0xB13221D4,0x4350B2DB,0x356012CD,0x42D0D4C2,0x5434C720,0xB2B1A346,0xA4CAA451,0xA821A9C7,
0xB2624ED4,0x4130C7CF,0x4A49C7D0,0x3C1E112B,0xBF4BA6B1,0x2342C6D2,0xA75848D3,0xA8BE38C5,
0x449CB5BC,0x2A4E2831,0x818F34C2,0x3E40D9C4,0x4E59A2CC,0x22D3BA32,0x3193C6CA,0xB5435A46,
0xC4919A92,0x2157C8DF,0x3B6736D2,0x84CABBCC,0x570FC8D5,0x38403550,0xB7B2BCB8,0x44B5C9D0,
0x1A5F49B2,0xABD1CC26,0x4C4C9CD3,0xBF46573A,0x23A4C7D0,0x5514D6C9,0xC85847AE,0xD0C4C10F,
0x474241C0,0x9D2C4648,0x2B3CBECC,0x4643D2CC,0x45522DD3,0x8BC6D030,0x4646CABF,0xAB2D5239,
0xBEBA0DC1,0x16AF27A9,0xC55449C1,0xD04E36C9,0x095216D6,0x413A391E,0x47B4CDC0,0x42B6D123,
0xA64E2CB9,0xB6D0A64A,0x313FD022,0x21524C3F,0xB739C0D1,0x1189BAD1,0x34503FB0,0xC2BFBD4A,
0xC44F8DD8,0xBF49554A,0xB4BA43BD,0x28C5C5CA,0xA05A4AAD,0xCDB79C32,0x493DC1DA,0x544EAC52,
0x8CC7D237,0xC0D7C2C3,0xB7555A50,0xD3BF0243,0x194FB3DD,0x246749C1,0xBBA3A1CC,0x30D5CBCC,
0x225A5337,0xCAC21214,0x3931C9D9,0x344A524A,0xBAD1B043,0xC7C896C8,0xBD605EBB,0xBBBD2D0A,
0x572CD7E0,0x40523D4B,0xC0B1C6AA,0xC3CA36C5,0x935854B9,0xC58B2C30,0x434FCBE0,0x405444A8,
0x109BCBBE,0xC7C83BAE,0xC25549CB,0xBB9B4540,0x3F13BDCB,0x3C43222A,0xB64712C4,0xA6C81AB5,
0x2E59B7CF,0x4C3294AB,0x46B0DBC4,0x373BA03A,0xB4A03644,0xD4C29C30,0xC16536DE,0x935A52C9,
0x3FC1DAD5,0x5D46C4AB,0xB1380A46,0xCDC1C4C0,0x3559B0D2,0x49C05047,0x2AD2DAB6,0x3F5341B6,
0xB72F4442,0xBAB0C4CA,0x625ED5D7,0x5541BEC2,0x37D6DCCC,0x4C903850,0xB59AAF55,0xC9B5B0B6,
0x555DC3D4,0x133C22CB,0x22B6D0C9,0x40442C47,0xA4ACB23D,0x93BCB196,0x6091D437,0xBFA6BCB7,
0xA5C8B696,0x409A2E56,0x2FAC9A36,0x4130B3C0,0x6026D4C8,0x4715D3B7,0x3CD4D246,0x3B39C13C,
0xA72B48A1,0xC2904CAD,0x56CCD3AF,0x4041CE48,0xB2D3BF49,0xC1C72532,0xAFB95235,0xAE882557,
0x3ED2D7B6,0x303D3656,0xCDDA114A,0x2A3F1DA3,0x434216A5,0x8BB5CA34,0x4FD7D2B4,0x3DB44160,
0xD6D93343,0xBF3448B0,0x153A5634,0xA1A7C6A7,0x2FC3C9D4,0x34285355,0xCED61036,0x5091B718,
0x271F1D56,0xD3C9B71F,0xD7D252AF,0xBF98555C,0xD3193584,0x4A56A8D3,0x26384224,0x8BC2C0A1,
0xC9CBB924,0x25A54150,0xD5B94421,0xB6B652BE,0xB32E4C44,0xB74834B0,0xD4A731C5,0x404944CA,
0x352B1CC2,0x12ACC6C0,0xB1233340,0xBD804C4E,0xD0C1ACAF,0xBA544DD1,0xCF594DC1,0xC431AAD5,
0x5249A3C4,0x37463445,0xCEC7CAC8,0x2D5830D5,0x8AA15048,0xB3CBD4B8,0x414C43BF,0xB93B5426,
0xB8BEC3C5,0x5955CCD3,0x4428A42D,0x37B3D8CA,0x3E3E40B2,0xC0384440,0xC1B0C9A8,0x585DCAD4,
0x272A2AAF,0x2FC0D9C2,0x995449B7,0xA839082A,0x9BCCC435,0x56AEBFAF,0x95B20F3D,0x9F1BBCA0,
0xB08732A2,0x4FBDA440,0x50C7B831,0x49CAD8B0,0xABA6224A,0xAFCE1D53,0x39AA962D,0x4627AE88,
0xB149B3C1,0xA3C1CFBA,0x4792B04E,0x80C5354B,0x16B9B8B6,0x892C213F,0xD0204440,0xC9D8AD94,
0x3C404E20,0xB6A54B2F,0x38BECBAD,0x5427B843,0xC6C9C051,0xCADD9F0A,0xB8935458,0xD52F3431,
0x293C9DBB,0x434B221B,0xBE063C21,0xBED4CCC6,0x4745284D,0xD2912931,0xC0C836C9,0x13175B44,
0xB7A44040,0xCB3CA3C7,0x475138D2,0x4034A0CB,0x27C9C5C3,0x20A0A850,0xBC8C2248,0xC50B4323,
0xB13232C8,0xB45137B9,0x8E48C4CA,0x143C2DC3,0x4A011BB4,0x3216BF3A,0xA024CDCE,0x92194037,
0xC4C44640,0x951322C3,0x455813C2,0xA44294BB,0x45AFD7C9,0x46AEAD2C,0x47D2AF54,0x9CA9CE10,
0x2546321D,0xC0BE3F3D,0x41D1C6B1,0x4A481D27,0xC3BA8C23,0x3F27C9C0,0x493D373E,0xBCC49427,
0xBBD1BFA2,0xA7543141,0xCC964484,0x2D9DB6B6,0x1F224812,0xBA143437,0xD0D1C025,0x47A24246,
0xC1A13093,0x1F8B8CC1,0x99BA4840,0x2C99B949,0xADC1B5A6,0x0CC54519,0xC2221739,0xBE0A37A4,
0xB0333619,0x444EA61B,0xB23FA2D1,0xCA8043D5,0x42B1B54F,0x92278840,0xB58BAAC2,0x2D323EA3,
0xD53451A9,0xD6488CBE,0x4D2E42B1,0x3B44B5C0,0x35A0C5C0,0x489FB10A,0xCACB1A55,0x9696C92F,
0x004755D0,0xAD232CAD,0x40B3C1BA,0x5234C70C,0x932A984C,0x53B1D8CE,0x4551AAD0,0xA7BFB441,
0xB1CBB842,0x3232923F,0xB10C4026,0x4CC1BCC4,0x343DC832,0xB0C4931B,0xC8C54147,0xB7175029,
0xAF114423,0x91B6CBBF,0x41D19152,0xAEC2BA52,0xBAB33240,0xBFBA4722,0xB8414512,0xCBB61A99,
0xC7D44F3C,0x313E9B43,0x3C4C41CB,0xB936A9CF,0x3311A1A5,0xC8BC404A,0xDA8248BD,0xB94049AD,
0xAC5454D2,0xB43FB1CB,0x5646C6B0,0x9722B436,0xC547BFD1,0x284741D5,0x3C431EA3,0x31B9DA36,
0x5240C51D,0xBF304145,0x4428C7CB,0x2E39C7CD,0x44A70F33,0xB7B1C834,0x429740C5,0xA6A55344,
0x52C5CFBC,0x57B1DD38,0x29C8C34C,0xD1D40346,0xB1CA524A,0xB2B04F52,0xC2B3C496,0x3DC21247,
0xBEA89131,0xC3944228,0x46A18E9B,0x314A06C0,0xD40A25A0,0xD91D50A7,0xB6894E41,0x3B3D09C5,
0x2046B1C3,0xB74841CF,0xCCB21937,0xB04A310F,0x23383AD2,0x4A47C0B6,0x30AAC7AB,0x4BB0C2AE,
0x24BAC355,0x47C8C733,0x9645BAC8,0x85A14A19,0xADD03040,0x3F1BB231,0x2D45A009,0xA3C6C6AF,
0x4ED4C044,0xB7B24345,0xD3C7304C,0xBF2C463A,0xA04A44A4,0xC1C98887,0x30D140C5,0x29462C4E,
0xBD3D28C2,0xB8411ED0,0x2C5342B4,0xA33AB0B3,0x2841C7DC,0x443A4BC0,0x4199D036,0x27A5CD06,
0x2BC13945,0xC5C01C48,0x2FBE32B7,0xB14022BB,0x3F80B643,0x32C3CF3A,0x3BC5104D,0xC1B9364C,
0x93CEA4B0,0x3D3C9727,0xCE3933AC,0x31C081A8,0x31013247,0x0A993191,0xCBBF9530,0xCD8948BE,
0xCB443A4C,0xB33CA7B0,0x394931D0,0x463E07B2,0x22AABC32,0x44A2D3CC,0x3D9E9347,0xAE27BB2B,
0x092821D0,0x4E3F33B1,0x2BB4A737,0x38CFD2B3,0xBF480341,0xC7CA4C42,0x16C4169E,0x203A3420,
0xC7124740,0xCEC9B51C,0x158C3D32,0xB7C03F56,0x9DD0B7B2,0xA3424982,0xB7324933,0xC79CACC8,
0x494732D0,0x4E48B832,0xA5B8C2D6,0x261F4022,0x1A26B14E,0xC930B8AB,0x5150CBD5,0x3C3A2CB8,
0xA7CCB784,0x43A1AA42,0x4430B34A,0xC1C09E2D,0x2AC5C6C9,0x1D813D4C,0x3FD0B732,0x3742B5B1,
0xB9412F3C,0xC3C82F41,0xD7CF4243,0xC2B75731,0xCB493FB4,0xC8533FD3,0x96473AA2,0x34B3AB35,
0xBBC22527,0xB35122D2,0x304445B4,0x32C2C4C7,0x4C2CC741,0x4D35BC35,0xB4AFBE06,0x56BCD6CB,
0x432D2D44,0xCED6CD53,0x89489D1E,0x434A47A3,0x34AAA9C5,0x34D9D5C1,0x43C13762,0xD9CB4349,
0xCE9441C4,0x36445540,0x9EA731B2,0xCFB3CACB,0xB0515DAB,0xC0341E39,0x269BC6D0,0x474C3EA4,
0xB12C99BE,0xBB4113CB,0x5059CCD0,0x4D3088C4,0x3BD0D6B0,0x25C2364B,0xCBCA5147,0xC12E302C,
0x4EBDCFB0,0x4440C451,0xD0D9C13A,0xA2BA4A43,0x12A84545,0xB32A9D2A,0xD5C2B4A8,0x89975D28,
0xA52F3C2F,0x3646C6D2,0x423EBBC5,0xB3442533,0xD6C5A13E,0x435594D2,0x524D3ABD,0x44C2D9CE,
0x4F0CB200,0x28C4964F,0x91C4C546,0x53C9CFC1,0x2F440449,0xD5D31C25,0x39973C35,0x893C4250,
0x952EC2AA,0xD4D28BCA,0xC5966435,0xD4B4414B,0x255020D5,0x3E5848C2,0xB706B0C5,0xD0CA170B,
0x475138BD,0x9345AEA7,0x462DD5D1,0x453D2333,0x0EC4A642,0x45C4B4A2,0x51C2D814,0x3695C152,
0xD6D33D44,0xC3C35145,0x0E454746,0x1933B8C2,0xD415BDC9,0xB9425288,0x9BBD434D,0x4132C1CB,
0x44432AB8,0x3EAEBD95,0xC8B1C603,0x5426C5B7,0x433C9E49,0xA9D0CEB2,0x35113E39,0xAD0A3F44,
0xC6A82AC1,0x50A1D2C8,0x42404E31,0xD7C2A107,0xAC3A37B1,0x9D534640,0xBA9AB7C4,0xC3BAB0C2,
0x434847A3,0x8AA135A5,0x43AFD4BD,0x494A2E0B,0xBCCAAA49,0xA8B8B830,0x31A6C0C0,0x39A9B05A,
0xD2D0B508,0xB3AC5791,0xB52F5348,0x9F46A3C4,0xC6BFB3C2,0x345D93B0,0xC4A838C0,0x44B3ADCE,
0x50441629,0x25A6C198,0xBBBF1334,0x2AB3A3C1,0x81AD334D,0xB9D4C443,0x3F35A239,0xBA3E4D42,
0xABBC98B7,0x40BDC3BB,0x122E4589,0xC0C3CE53,0x1A34B6C4,0x92475334,0xA7A6971F,0xC7B6A8A2,
0x5711ABC2,0x4242C439,0xB0CEC6D2,0x42294344,0xC3B81452,0xA181AE1F,0x4037CBB9,0xC23F51BE,
0xD4B43BC1,0x3C4927B1,0x32403435,0x1C1EC4C3,0xB530B7BA,0x4D0027B1,0xAAAABB44,0x2CD7B52A,
0x49AD3543,0xD0993746,0xD23D3CC3,0x143A8CBC,0x3D4243B1,0x32BCC5A8,0x413EC5B2,0xBF1D3936,
0xBAA33BB5,0xC39A2330,0x4F25ABC1,0xB843203D,0x44B1D2C8,0x474137B3,0xC9C93640,0xC2BE9D38,
0xA94721B4,0xAF4E50BE,0xB2C4B09D,0x323AC5CB,0x3F244E49,0xC3CBAA2B,0x8EB8BDA5,0x44BB1647,
0xB0A5094C,0xC3CAB4C3,0xA0505485,0xCDB03344,0x2313A5B2,0x2541B2B6,0x3954A2CE,0x45BFC1C8,
0x4789CE9E,0xB3C24D48,0xB1C78947,0xBEAFAE3B,0xC3AE3024,0x42BB403F,0xC5A0B1AB,0x17342BC2,
0x37B65051,0xB6B1C497,0x0D45C0C5,0x5853BCC6,0xB4ACB7BF,0x47CAD0B8,0x37284550,0xBCD29048,
0xB0C68521,0xC4364132,0xCA5154C9,0x9492B5C3,0x514BB3C3,0xBAA13035,0x03D3B634,0x453DA197,
0xAEB6A191,0x98BFA744,0xB9A69403,0x0440452F,0xCEB73A32,0xB9B545BC,0xB8334A2F,0x4D42C7C2,
0x0241BDB2,0x48C6CFB6,0x32A72A50,0xD1CB3430,0x24C0408E,0xB933344F,0xBD4DADBB,0x3A4601CE,
0x142BC3B3,0x31B63936,0xCECFB540,0x98583DC8,0xC91E4937,0xB69E3FC2,0x2318BE19,0x33354039,
0xBFAA9BAF,0x399EC9C8,0x4D398047,0xC7B5BCAC,0xA5AB3A81,0x9600334B,0xBC1C1E11,0xCE9149B9,
0x404C9CCC,0x343D210D,0x43D9D6B5,0x4BB89D5A,0xD5C73F45,0xC32E50A5,0xC7B22931,0x324434B3,
0xB2C03F9E,0x44A2C9C2,0x35A29852,0xB6D49235,0xA6284647,0xB81DB8B6,0x513582C8,0xB5B49B44,
0x4BC8D1C9,0x3B432E56,0xBEC6B812,0xBBA53CA2,0x30A22F24,0x1E41320A,0xC0C9C3B2,0x5A22BEA2,
0xB33B1250,0xCDCAB0C0,0x532F0BB0,0x952C8A45,0xB1C2BF9E,0x93B2A232,0x5139A40B,0xBD88B032,
0xB2A6C4C9,0x8D454D39,0x13C0C12C,0x4A3CACAB,0xBDBEA13E,0x43C7BEA1,0xA54C2E40,0xCBD2BCC4,
0x38194F43,0xC0AB284B,0x313B98C6,0xA4283A13,0x472CB8C8,0xC6B0A948,0x2DBDCDD0,0x40515448,
0xD2D395AC,0x272320B4,0xB4405449,0xC1C3B8B8,0xB5B7A636,0x1F1D3FB1,0xA7434B3E,0xC9CECCC2,
0x425451B9,0xD1C04150,0x86B2CAD0,0x30465410,0xB3A1C281,0x2635B6C1,0xBE004632,0x8B20258B,
0x3947A8A4,0xC127B7CA,0x4359ADCE,0x0CC2B80A,0x3BC6BE3C,0xB4C5A14A,0x1B154131,0xC3974D49,
0xBFCBCDCB,0x58B22E42,0xCAD09E5A,0xC0C6C2C0,0x1449573F,0xB0B52728,0x223692AB,0x41A3CCC7,
0x948D1344,0xD5C64632,0xA93F3BCF,0x334E5232,0xBA92C0C1,0x42A9C1C8,0x3935394A,0xBCB1B8A9,
0x5132C7C4,0x45B9BC32,0xB3CC9D4B,0x13CA9545,0x3EBEC240,0xAF991C41,0xBAB82B3D,0xCCBD2238,
0xC5375433,0x3B411ABC,0xAE44BAC4,0x422FC7CB,0x4F2CAA32,0xB2C0C441,0xB4B3A69A,0x573A8981,
0xA59FBF35,0x82D4D1BD,0x36134957,0xD2C33741,0x813321C3,0x4F4B1AB3,0xB028B9C4,0xB2428FC3,
0x5438CDC5,0x5133A82F,0xC9D7C937,0x453BA298,0xC5265249,0x91CAC6BD,0x279DAC22,0xC8865241,
0xC42433B5,0x345327CA,0x4545B9C9,0x4C0EC4B1,0x20A3C03C,0x36C8C6B6,0x28CF0346,0xCBB43B55,
0xCD9A2E9C,0x3D533CC4,0x314A34BE,0xB1B4C0C2,0x013301BB,0xBB424627,0xA5CBC3B9,0x4032AC35,
0xBDB02D40,0x91BC412E,0xB8C6C330,0x1B494825,0xCBB14037,0x3434BBCE,0x514592AF,0xB7C8BA49,
0xBFC4C1B4,0x20544BB4,0xB51E2BA9,0x2E37AFCB,0x3E4122B9,0x09AB0D3B,0xC0C7BE10,0xCBC75048,
0xC5B34327,0xA84C46C1,0x9E992EB9,0x4980C382,0x1C91B340,0xB1BE3840,0xA8C9C1A6,0x88534BB0,
0xB89981B5,0x4318C8B6,0xACB39E43,0x92B7333F,0xC5803023,0xB34C40C9,0x8F3B3C94,0x3BC0CAA8,
0x39C2CD1C,0x06B24554,0xD2C22D32,0xAC8D30C4,0x3D414447,0xC3BF9E2B,0x33AAB6C5,0x2C832B4A,
0xBDAE27B3,0xB4233EAB,0x4830BFC0,0x40258E31,0xB2D0BB17,0x289D2A40,0x96193024,0xA0A02805,
0xAACAC1A1,0x920E4540,0xBCBD3622,0x13369026,0x2137A1AC,0x3710940D,0xB1C19B42,0x18A4BEBB,
0x1827341F,0x9136BC1A,0x208BC2BE,0x3E9B3542,0xB1B62F4B,0xC7AA9CB8,0x474B8FCD,0x2833A440,
0xB8CEC9B9,0x2DBB303F,0xB8294F4E,0xBA1920BB,0x4CA3C4C3,0x2314AE4D,0xB9CCB986,0x25853625,
0x203B3825,0x2F3116B8,0x27C0C5AF,0x4445B3B5,0x319EA526,0x31C2C19F,0xB81E2931,0xC10E4080,
0x443A26B1,0xB9A4BA9E,0x22A623AC,0x06B53540,0xBA2A1516,0x3432B3BF,0x4D37B698,0xBABBBB28,
0x32C9C5B9,0x3E3F4650,0xC8BEB038,0x1F38A5BC,0x32473125,0x3138B3C6,0x22B4C8C0,0x403DC2B1,
0xA9813943,0xC9C9AD14,0x4742338A,0xAA1F4336,0x20B1B6BE,0xB309B085,0x3A2128A2,0xAEB4162A,
0x2E0AC2C0,0x324346A4,0x21A6AEA7,0x4414C28A,0x34B5BE30,0xB2C30435,0xB63F3D2E,0xC78E19C2,
0x384040B3,0x3342A003,0xB5B1C3B6,0xA62E25BC,0x27483608,0xB1B9B6B3,0x5028BDB6,0x31302946,
0xC2C8BC0B,0xBCB42A0E,0xAC484836,0xBCA11DBE,0x3F35C3CB,0x44441FB0,0x21031323,0xBCC6B226,
0x434503BD,0xA132322B,0x09B9C7C6,0x9627302E,0xBCBF363A,0xA9302F15,0xC6403AB6,0x9A4022CA,
0x43451206,0x1AB1C19B,0x2FB3B017,0xB5BD153F,0x8C472CB7,0xC3C0AC00,0x36219C9A,0xB13C4B3D,
0xB0B3B4C4,0x343D31AC,0x962B3A0D,0xB2B1BDAC,0x4730C0C3,0x87283823,0xC3BA2028,0xB5A1149C,
0x2C404928,0xC0B48A32,0xB8A5C0C7,0x244848A6,0x0D35182C,0xA5B9CAB6,0x38863D1B,0xB3BA2847,
0xB89F8193,0xC2B13511,0x1821322F,0xA524B1B4,0x310333B6,0x91AB1F37,0x24351509,0xA9242F20,
0x40BBCFC4,0x382FA130,0xCCCD2B43,0xB5AB270C,0xB4474D36,0xB93236A8,0x0D32B5C1,0x2D40B2C4,
0x2BA12F40,0xC2CBBC0A,0x26161CA7,0x9F3E5047,0xAABABDB1,0xA6BFBAB0,0xAEB65050,0xC7B53B20,
0x173E10CF,0x4242338B,0x3A26C19B,0x10C0C194,0x35D0BF3A,0xA21A3846,0xC90E3E2F,0xA71302B6,
0x2B392426,0xBC95A5A7,0xB68E372E,0x3041B3C0,0x2E3F32AC,0xAFC2A69F,0x3D8AB706,0xB2AF3141,
0xC1C62742,0xC5BF2708,0x803E4DAC,0xA7323A28,0x2700C0B6,0x3308AF15,0x10B23048,0xB1BCB692,
0xA7C3B5B3,0x2E244049,0xC0AD2E3A,0x9B20A7C8,0x4039403F,0x94A8B882,0xA727209D,0x1EC1B3AD,
0x3328A783,0xC1A39E1D,0x04940A2E,0x2A2C2F2D,0x001D3412,0xBAA6301C,0x2B3FB6C1,0x2A9AB4B3,
0x99C6A033,0xA6BB9F2C,0x99314937,0xBA113C29,0xB91EA0B4,0x1B4438C0,0x99131239,0xB6C5CCB9,
0x3B293523,0xB2AE4448,0xABA2A4A5,0xBFBEA5B0,0x20A8504C,0xC3B92020,0x8A3D28C6,0x312F3093,
0x3A18BCA5,0x9FACAA28,0x15CFB034,0xB2B60A4C,0xBF314334,0xB89238B9,0x413E21BE,0x2796B8A4,
0x89B69030,0x40BAC4AC,0x163E3D2D,0xC7B82D2D,0x323594B3,0xA88E232D,0xAFBC3822,0xC5A49A06,
0x415420D0,0x313136B0,0x2CC7C9B6,0x21A22830,0xC3B4504B,0xBDB09809,0xB2442EC1,0xB6493DCA,
0x413FABB9,0xB1C3BE88,0x16B93301,0xA9A14445,0x883795A5,0xC4B118B2,0x151E42B0,0xC0243F24,
0xAD200BBD,0x28189A30,0x3E31B7A1,0xA78E2825,0xAAC8BFB2,0xACA83D46,0xC727499C,0xA19421B6,
0x4D46AEB3,0xA9278C30,0x24ACB5A6,0x04BEB614,0xB62A1031,0xC2AE2C38,0x3B25B0C3,0x35453104,
0x10A1A5A0,0xB28C8F1A,0x4244B8C2,0x1989A128,0xA7BBC52F,0xB92C1A33,0x1E3833AB,0x8D3197A0,
0xAD41B2C0,0x403EA9C3,0x4DA8B7AA,0xABB4A441,0xB9B5AA19,0xB9263A39,0x054D9ABA,0xBE2712C4,
0x3637BEC2,0x4241243B,0x8AC0B6AF,0x33AD8010,0x32341F2E,0xC1A70EAD,0xC0C09FBA,0x8C45481D,
0xA73804A6,0x308BB9AF,0x4C32AC8A,0x0FA28498,0x98C18789,0xB8BE933D,0xB2A144AE,0xB3344320,
0x4012C5C2,0x423CB8A1,0xA3C1A737,0x2DA63641,0xC0C0B625,0x9DB13E93,0x2C974333,0x950CC4B3,
0x3013BCB3,0x362A3743,0xB0B7B032,0xA5BBB7B2,0x32AC3145,0xB3B29641,0xADAAA2B6,0x3E3C3D21,
0x0990B930,0xA805A401,0x86C9BFA8,0x3A16AC51,0xCEBE2243,0x882238C5,0x3837403B,0x2021B7AB,
0x1AA5BBAA,0x34C7BE38,0xB3A6B347,0xBB294037,0xBEB42B98,0x393834B8,0x852C2E22,0x80C0AA0A,
0x40C1C3B6,0x353D303B,0xCDC01E43,0x981B11B1,0xB727411A,0x25AC44A1,0xA987A6A1,0x471BC5C9,
0x3E233728,0xBFB89839,0xB9ADA39F,0xAB3A502D,0xC5B6332B,0x2E41B4CA,0x44409AC0,0x40A4A9B5,
0xB2B8B527,0xC033321E,0xB2203D3B,0x2A23000B,0xC21F23B0,0x403EC1CC,0x42402AAF,0xBC88C0A9,
0xA4AC9FA2,0x4139353D,0xB2280137,0xBEA895BA,0x3735B3BB,0x434A0CC2,0xB8AAA1BA,0x2EBEC0B7,
0x36423D49,0xB7958026,0xB1AE8CB2,0x4C3CB8B6,0x2A3512BB,0xA4C2ABBF,0x19A02A3E,0xAB272730,
0x102204A0,0x27AA9CA2,0x403AC7B9,0x3C8986B0,0xAFC52241,0xB4B2A2A1,0x9A414939,0x92B5AF24,
0x9DA2C112,0x3632C0BD,0x4019412E,0xB4C4AE26,0xB094A6A3,0xAE28423C,0x94B11646,0xC0BCB9AF,
0x42422DBF,0x3D9B332D,0xABBCBCA7,0xB5B1978C,0xA6954944,0xADAA8F08,0xB33336A4,0x410EB4C2,
0x4C2606AC,0xC8BF9535,0xC0B133AB,0x90313F3C,0x963D0B8B,0xAE129FC5,0x4E10BBBC,0x1D9D962E,
0xCA158B80,0xB89D302B,0x2B453936,0x0939AAB1,0xA8B1B9B8,0x3E97C1B4,0x2745A213,0xC9BB932C,
0x30918310,0x30433437,0x131F03A2,0xA4A6A087,0x42B5CCC2,0xA03C9D8C,0xC0B23540,0x23B5BA9A,
0x35413521,0x95143C35,0x31BDC1B5,0x34AAC8A0,0xB6891948,0xBEAC2E3B,0x862011B7,0x1C3938AA,
0x2AA9AB8F,0x21A5BA41,0xBBC1BA0B,0x01A73A43,0xAD824043,0x9F24ABC6,0x112628BD,0x23B1333A,
0xA2A2B025,0xB8BAACB9,0x360D4941,0x9E0C3C2C,0xB9B0B7CC,0x382D3BB4,0x8D293142,0xAD94BBB6,
0xA5B106B7,0x2F914731,0xB60B2F21,0xAB3EBBC9,0x29352E27,0x35ABC028,0x2C33A285,0xC5C0141A,
0xA63235B6,0x3D491095,0xAD94B9B1,0x3BBDC0B0,0x40332F45,0xC1C11931,0xBABA9799,0x44429FBF,
0x27420921,0xA2C5C3B1,0x41B61435,0xAF923B49,0xC00B3091,0xBAC0B2B4,0x4A36B32A,0x1A8E019B,
0xA2C1A3B0,0x279A3142,0xB721363C,0xB9A027A6,0xA09F4626,0x2EC2CAC4,0x424190B0,0xC3A93C4A,
0xB3BEC2B0,0x2C41412C,0xBF39452A,0xA1A2B4BC,0x430CC7B9,0xA20E9146,0xC4B82E30,0xB09920A2,
0x3E4723B6,0x343125B5,0x35BCC09B,0x10B8C121,0x94A6453E,0xBBB63B27,0x411ABDC6,0x3C4080B1,
0x85B6B89C,0x389A2042,0xCBC3A23C,0xAC383AC0,0x143D3D3A,0xA4C4C920,0x38A1BEB2,0x1B364645,
0xC0B61836,0xB7A4ACB7,0x20411CB3,0x30064092,0xB1C1B28B,0x121F9BAF,0x1A2A4434,0xA6A69631,
0xB912A7B3,0x3F3EB5C5,0x168A1531,0xA9AFB626,0x813C2501,0xA21B2917,0x1A289091,0x2D05B3AF,
0x8EC0C2C1,0x369F3145,0xB1A53D46,0xAB97A6C4,0x474433B6,0x32BDB532,0x87B8C429,0xC6BAB291,
0x91224D14,0xB13E4439,0x8B16C9C4,0x3815A68A,0x0AB9424A,0xC2C2A82D,0xBC200CB6,0x29493CA1,
0x412BC0C0,0x95B1B2A7,0xB20C16AC,0x9422433D,0x052C2125,0xB02691B4,0x42AFC1C4,0x3A308C38,
0xB0C0C710,0x99201BB0,0x0A303E31,0x322B1F20,0xB2A59BA7,0x26AEA6B8,0x3BBFA743,0xBAB10647,
0xC2AFA7C4,0x48454297,0xAEA6153F,0x8193C2C1,0xC0B91C29,0xB0904B2B,0xB139312E,0x2235B2C5,
0x3B0AA093,0x379EB523,0xC5A81233,0xC3221ABF,0x3E4229AF,0x48369CB2,0x08A4B8B1,0x14B7B58E,
0x9C0A4249,0x29A5B7AB,0x8529A3C1,0x37C0C1B0,0x3F28A24D,0xC5BCAA3F,0x832236B9,0x2D282B0A,
0x1293AE37,0xB4B2ACAB,0xB2B43004,0x9BB3453D,0xAA34349E,0xB9A1ABBF,0x393839B2,0x9C1B0138,
0x0E1ABAB1,0xB71D231D,0x313EB2BF,0x17312323,0x0989BFB9,0x368094B2,0x3DA21034,0xA0808338,
0xB0B5ACBA,0x40AB1F98,0x33ACC036,0x9D9ABD36,0xB2AD1A93,0x24374438,0xAAA89923,0x872D0FAC,
0xC5C3B0A4,0x26B8491E,0xC11E4138,0xA236AFC2,0x3B311A9D,0x35240D29,0xBDB2B22A,0xBA358EB5,
0x274624AE,0x4220B2BC,0x8AA0B6A9,0x28A4B3B4,0x890D3F46,0x2AACB5AF,0x2C3D84B5,0x31C0BEAA,
0x3098A34A,0xC0B99F42,0xB2842EB5,0x232116AA,0x399CA139,0xA8BBB602,0xB7B03516,0xBCA2482E,
0x2C493A17,0xB6A9BEBE,0x2F288FC4,0xB18D3C45,0xAAABB391,0xB3292D97,0x4736A9C5,0x382F9A0A,
0x98B3C79F,0x1323251E,0x12983834,0x2028B58C,0x292DB6B5,0xB8BCAB25,0x25C69D81,0x932A4447,
0xC5B0A8A2,0x424134A3,0x8EAE1341,0xA0B2ACA0,0xC3B78620,0x0F3332AA,0x24313683,0x9101B9C2,
0x11252286,0x29302C37,0xB404981D,0x1136B4C1,0xB0138AB5,0x40A91D28,0x15A8152D,0x15A6BDBD,
0x21383637,0x32B4BB96,0x371CB031,0xC5B8A329,0x382FB494,0x37932933,0xB2B4139E,0xB5B4A2B2,
0x1929463C,0xB2921230,0x1F338CC0,0xC1A5099D,0x26212238,0xB8B23234,0x1336B3CA,0x334034A7,
0x35A5B207,0x2F08AC1A,0xA9AA9C87,0x163496A0,0x459FB8B1,0x0FA1B90E,0xB4AE8B85,0x11273F40,
0x95ACA421,0xA6352C96,0xC2C1B4AF,0x33AD4240,0xB4AF3D3C,0x9817A1C7,0x15371D99,0x302F1C37,
0xAFA8BDA0,0x002FB8BE,0x18453283,0x38918AAD,0x1EB4A3A8,0x229384A8,0xB397393A,0x28B9B99D,
0x2D369034,0xC1BABDB2,0x37153A36,0x18983537,0xB293B0B9,0xAA1F27AA,0x23113F21,0x13A5AA24,
0xA984B5AD,0x3A32B1B5,0x3D10372D,0xC1C0B184,0x403AB4C0,0x0838403B,0xADB7B6B0,0x2AA30490,
0xB9A11237,0x99B83B14,0x25A70EAA,0x1C0BB237,0x9415988A,0x25203089,0x9B9D3432,0xB19BB9A8,
0x36A1B0BE,0x2D35459B,0xC4B4B035,0x1D80BDAD,0x29454432,0xA2AB1285,0x9589B5AF,0x30A3BAAB,
0x040D3C96,0xBD841727,0x2A2DB11B,0x290BA021,0x9A9C2020,0xAAB6A527,0x84A21D41,0xA7C1B2B3,
0x304B32A0,0xBEA2223C,0x1EAAB5C0,0x2535348A,0xAA3A2AA1,0xB2A3A80C,0x3190AAAA,0x04429EA1,
0x0A839119,0x10C0AD94,0x459CB5B3,0xA133353D,0xBAB18792,0x2B972626,0xB9ACB021,0x85052424,
0xAEB5361A,0x9FA33090,0x2234A3A2,0x293420A8,0xADB2121C,0xA1959598,0x312AA296,0x323A28B7,
0xBCB8AF96,0x3FA4BBA1,0x36372C41,0xB2AF9500,0x889E90B2,0x37ABBBA5,0x25323703,0xC5971824,
0x9194A587,0x2B221723,0xA3253120,0xC2C19D03,0x96834033,0xA1B6A2A3,0x3343A082,0xBDA1213D,
0x3096B1C2,0x28413806,0xA52CB0AD,0x1F06B3BB,0x39828D14,0x9B26B921,0x32258FA4,0x11BA299A,
0x3ABEBA9D,0x0A301C45,0xC0B0AEA5,0x2B244205,0xBFB29833,0x1DA123A8,0xB5A44098,0xB02538A7,
0x2E23B49D,0x2C2B9820,0xB19F2423,0xA491A29B,0x3F9EB8B1,0x404296A8,0xB6A8B118,0x2BB1B9A4,
0x1E2E3943,0xB20D8AAB,0x232E15B0,0x9EC4BC82,0x16229C2C,0xB532283C,0xA3B028AE,0x35922699,
0x261E0F2B,0xB89E8893,0xA52736B0,0xBFB6A28B,0x3D31AB15,0x1F223929,0xAAB8AEC2,0x3E392121,
0x2D9CAA25,0x2481A7AF,0xB0A90B15,0x36ABAE30,0x2A9B989B,0xB8060C22,0xBABAB108,0x3216403B,
0xA70F2528,0x8D3905BF,0xAC8E2320,0x202E00B4,0xB33D8D1A,0xB633B3C0,0x26A424B9,0x39951D35,
0x92139C32,0xA1959CA2,0x91B4098C,0x42AAB036,0xA59B1341,0xB1BAB4C2,0x3D383727,0x9FA2013C,
0xA1A2ADA8,0xBCB61693,0x35153194,0x24273216,0xA212B2B8,0x8610A092,0x162E3A31,0xB41C1106,
0x3639B5C3,0xA89598AB,0x2AA702C0,0x94372743,0xB3B1BA10,0x3A252BA1,0x15BB8B37,0x17A8B73C,
0xAC099426,0xB4B124B5,0x19232938,0x1D0B122B,0xB2B4A0BE,0x1A4240B4,0xB4202531,0x2FA0B5B8,
0x99233628,0x3AB3BEA9,0x3B21181C,0x06AEB5A4,0xA41EAAAC,0x8F2D3122,0x18A32536,0x1AA0B09A,
0xB214A2A1,0xB7222BB4,0x12253742,0xADBDC184,0x3D361CB3,0x9F224441,0x97B2BBAA,0xAC289CA2,
0xB7229AC0,0x8504373A,0x27B41E1E,0x1421A4B9,0x373A2794,0x99AA1A3C,0x2EC1BEA5,0xA4181B3E,
0x1ABDC0B3,0x403839A0,0xC0A9AD35,0x8393B5B0,0x97334233,0xAB243BA4,0xA39CA792,0x3303B6A0,
0xA43F92AA,0x8F121205,0x88BEA819,0x4507B7B2,0xA52C3129,0xACAFA7A8,0x302A3434,0xC1AFAF9F,
0x25243E95,0xACB42929,0x01A9AA8E,0x2A2DA10C,0x162B119A,0xA19A058B,0x01039111,0xA8B1B093,
0x2F44881B,0xBFA62429,0x27BBA7C0,0x3D3E433B,0xADABB087,0x1492A5AB,0xACB99E26,0x3812BC30,
0x3082259A,0xB2A732A6,0x0FA0A29C,0x343F3033,0xBDA08699,0x163405C3,0xB19CA135,0x2E2CA3BF,
0x223F1824,0xA8B5BC9D,0x39A20E82,0x2DB11026,0xB4029136,0xB4218B9B,0xB2922BAC,0x27A83135,
0x8D063A25,0xC0B59FBA,0x203F3BB1,0x8B87A72D,0x3D13C0B0,0xA7122130,0x25C1B1AF,0x3032173D,
0x1B9DB729,0x8194ABB4,0x1826310F,0xA8A62431,0x9099A6A5,0xAB932910,0x99B5BBA4,0x3D2D4626,
0xB9B28A10,0x3132B4BE,0x19353C3F,0xA7B4B283,0x22189E11,0x2635BEB8,0x2737AAC7,0x2720952B,
0xA4BCA839,0x33160EA6,0x92323F36,0xB5BFBB94,0x20052C29,0xC7B42491,0x143C42BB,0xA7303C1D,
0x9CA6C3B7,0x24338A0F,0x183F2511,0xABA022AE,0x20A5A3A7,0x02B7B31F,0x24201C3C,0xB0AA3430,
0x24C0BFC0,0x39303041,0xB3B4A12C,0x171523AF,0xAD8A302B,0x36B4BEB0,0xA2222833,0xC3301925,
0x0C1CA0B5,0x433220A6,0x1E908614,0x0491B586,0xA0A71D2B,0x40B0C5BA,0x42281439,0xBEC0B81F,
0x0A2429B3,0x962C423A,0x8A0CAE0E,0xAC1E13B7,0xAB3D2DB4,0x9D3A96B2,0x3724AA9B,0x9FB7A3A4,
0x98A721A1,0x11283E3D,0x15B7B8B4,0x28139533,0xC2B49923,0x923445B0,0xA3323023,0x2F94C3B5,
0x23A5AB86,0xAE254027,0xB3A6028C,0x3626B1A2,0xAAA4A089,0x0FA63525,0xAC9F3F34,0x15B6C3C1,
0x3E3E032C,0xBCAC8F3D,0x93A61AA7,0x9A2C361C,0x0CB0B8B1,0x99A38534,0xB6223D2F,0xACADA2B8,
0x493C90B3,0x2B27A830,0x96B4BDAB,0x9B953637,0x3EC0C0AE,0x3738A93D,0xC6B4B336,0x928618B3,
0x0B364133,0xA68781B3,0xA2088DAE,0xA3332D87,0x3198B8A8,0x451B95AA,0xB5A79735,0xA619AEB1,
0x93323F38,0x84C0C1A7,0x342E9932,0xBDB0A529,0x313DA0C5,0x35323927,0xA4BCB5A9,0x948F1793,
0x86413C27,0xAAA4A3AD,0x2E9BA3B6,0xB4981F3A,0xAA31AABA,0x233F3717,0xA9C5BEAC,0x3BA22E28,
0xB1AB3941,0x962C04B6,0x242317A0,0x81A7B692,0xAC3321AA,0x1C3980A5,0x8CB0AEB0,0x3EA8AEA8,
0x118E3246,0xB3A69E00,0x1C3532B1,0xC4B79CAB,0x201B46AE,0xB4982F35,0x2227C4B3,0x3C3C1420,
0x13A78F20,0x99A2998D,0x318E9DA9,0xBAB7A616,0x80A21BA0,0x983B4139,0xACB3BDB0,0x3F3C98A0,
0xBEA1303E,0xAF3118B8,0xA4282C22,0xA5C0BCAB,0x32103410,0xB2963928,0xA084AEB0,0x3F24B5A3,
0x91902645,0xB4BBB69F,0x28403B93,0xC2B59522,0x42A594A2,0xB0A02C3B,0x1012BEC1,0x333827A0,
0x92AD9B08,0x15A00D2F,0xAC852032,0xB6AA06A2,0x06AC0122,0x92194011,0xB2ADA7B8,0x42440E9A,
0xA7019434,0x29B3B7B5,0x920F303B,0xA0C4C2A8,0x29273040,0xB7B0911F,0x2A9594B4,0x35302F29,
0xAF0F8A21,0xB0A5979D,0x1A42328C,0xBDC0BA99,0x3FA1A42C,0xA69F3A3F,0x9694B8C5,0x3F44389B,
0xB4C1B224,0x23AB902D,0x9A011F2A,0x9D93B3B0,0x231B2B34,0x9E9C2D2A,0xB19CA3BD,0x473789B9,
0xAAAD062D,0xA4B4A4A1,0x982F3938,0xB8B4B4A1,0x39223026,0xC0BC3229,0xA72A28C1,0x333D1D0D,
0x329EB895,0x26A49720,0xAAA10523,0xBAB3A523,0x2CA91C20,0xA7A73C3A,0xA9B2B3B9,0x3B432CA8,
0xB382141B,0x1C8A01A3,0xA2292F2C,0x22A1C1BC,0x33863213,0xB0B42302,0x9E9CA087,0x31320121,
0x02909012,0xB8BEA821,0x89413A0A,0xC0B59694,0x3AA127B3,0x0C393D39,0xB3A0B9B1,0x38338592,
0xB1BAAA34,0xA6B2041C,0x9031329B,0x8F1FA2B3,0x1D0C25B5,0x952A2128,0xB2A2A229,0x4318B5B0,
0x8B22923F,0xC2BAAC91,0x9B254421,0xBEAB2D02,0x1E39A1C2,0xAB3B1D2C,0x170DB9B4,0x3C1E07AC,
0x02AD072E,0x9FA40A2F,0x1904111C,0xAC951E12,0xB919A2B7,0x863D3D29,0xB6B9A800,0x401FB0B7,
0x15233440,0xB1ACADA9,0x30312E8D,0xB5B0B8A0,0x2438ADAD,0x22223529,0x93B195B2,0x32220BA2,
0x1E183037,0xB8A0808A,0x3C2EA9C0,0xB7119513,0x96A2BCC0,0x3933442D,0xBABC0029,0x321BA6B5,
0xB2153A3F,0xAD2A11AE,0x01331EA6,0x97A9A69E,0x3EB1B4A8,0x2B071227,0xB7A1952D,0xABB5B2A2,
0x2E2C433D,0xB1B0A71C,0x303AA2B4,0xA0242C26,0x2AC1BFBC,0x333A1835,0x9FB0B825,0x0481AD89,
0x042C2221,0x90251A92,0x90999399,0x1F14220B,0xC0B7B194,0x3C3AAAA7,0xA7913E23,0x9EB8ABBE,
0x37413A2F,0xA0A29722,0x26938DA7,0xBAA9282D,0xBF9C0DA9,0x20912B99,0x289986A0,0x98A9AD18,
0x25302684,0x8A2B3631,0xA3BFBBA9,0x1F24393C,0xBEBDA305,0x383A22C6,0xA8382938,0x9CB8C2AB,
0x33312F0F,0x1DA0A411,0xA0ACB32B,0x8C221622,0xB2082D9C,0x1D36B2BD,0x38331930,0xBEC4A48A,
0x3E309CBF,0x92343B38,0xB1B6B5B3,0x39363214,0xB4A08929,0x3CA1C2BE,0x1581362C,0xB81397AA,
0x8E92B1B0,0x30063437,0xAA9F262B,0x20329EAA,0x1F271C20,0xABC8BCB3,0x8B3C3C31,0xBD1F0835,
0x34AABFC1,0x3B25292F,0xAF8FA220,0x252995AA,0x96B79C1A,0xC0C11232,0x04083D2B,0x2A3C32AB,
0x0986B8B3,0x3214A008,0xA5282E33,0x18AAB6BD,0x1A1D9135,0xC1BFAE22,0x284033C3,0x9A3D2E34,
0x91BABF9D,0x2E122404,0x2421130A,0xA6A2A49A,0x9A8C1A19,0xB0203520,0x3310BAB8,0x41222F81,
0xC6BF9920,0x2D35B4C0,0x26373A31,0xAFC4B4A5,0x3628252A,0xA11E1C3B,0x28C0BDBF,0xA621243E,
0xC3313436,0x120AA8C2,0x443120A4,0xB3B50038,0x0DAAB6A8,0x3538361D,0xC5C5C1A2,0x34134092,
0xB2274334,0x009BC3C0,0x3E371C2D,0xB4AB2639,0x9F90A4AF,0x8A2D9295,0xB0B22128,0x1E29B5BE,
0x3C401E0C,0xA6BCAB8A,0x29AA8FA7,0x9D314041,0xAAB5C0B3,0x312D2217,0xBBA22A26,0x34ABB2BB,
0x2334333A,0xBBADA632,0x060094A7,0x3E2B08A9,0x95AEB623,0xA3ACB292,0x1B2B3D25,0xBFBDA988,
0x362E34A6,0xB42D3A38,0x29A7C4C3,0x413C170E,0xBEB39231,0x9F822197,0x0C26322A,0xA3B1B1B0,
0x2E97C2B1,0x42361C18,0xB6B69080,0x0DA2B1B7,0x0E414546,0xB6B9AC98,0x3F3914B5,0xB7AE9434,
0xADA0C5C3,0x36404224,0xA5B422A3,0x11AAB0B2,0x34322A30,0xB29F1E35,0xA7B9B7B0,0x17443B80,
0xC5B1A11D,0x462EC0C8,0x38344144,0xBDC4BEA2,0x36382AB1,0xB68A3336,0xAD9194BB,0x152B2291,
0x2995AE21,0xBDC0B591,0x2228442A,0xB6064131,0xAFB7C6C3,0x403D452B,0xBAB61B34,0x3E2DBBB8,
0x012F263A,0xBCBB9FA0,0x3719B0B8,0x25A3A51E,0xB5C0003D,0x84B29199,0x324A422A,0xB195A8A5,
0x361B9FB4,0xAB822335,0x05C2C3B9,0x35323228,0xB71D942B,0xA51587B2,0x322E3111,0x9395912C,
0xB6BBB8A1,0x37401198,0xB59C2207,0x23B4B5C3,0x28403E48,0xBBB9AD21,0x2D2B0CBC,0x22202213,
0xB2B59731,0x8696139B,0x18332C21,0xB4B3B3A1,0x223120B5,0xB991918D,0x1A1E298E,0x0A933225,
0x21260788,0x1E0AAC91,0x2D97A112,0xBC8A3033,0x83ADBBBF,0x8F1B3638,0xABB29C90,0x27159DA5,
0x1E2A2009,0xAC9A1112,0x2726289C,0x8A030824,0xB8B9B7A9,0x41359BB9,0xB338443F,0x83B9C1C1,
0x292F383F,0xBFB9AB1C,0x2F2C37A1,0x8596A218,0x9707A5A1,0x88ABA49F,0x86263421,0xA1AAAEAF,
0x3F27961D,0x9888273C,0xA5A0A5A5,0x00242413,0xBDB6A99C,0x353D90A7,0xAE1E3B2C,0x2AAFC1C8,
0x27272740,0x0DB0B894,0x36403C1A,0xB1B7B683,0x89141BA5,0xA9992220,0x2A1A0F99,0x091A121D,
0xAFA6A687,0x1F32A3B7,0xB0A12301,0x3192A6AB,0x00202434,0x22298696,0x86A8A509,0x1BA2B5AD,
0x2302232F,0x9B2E382F,0xB292A5B7,0x1614308E,0xA0ACA882,0x2F88969C,0x96078920,0x96A8A224,
0x31262905,0xB4A9A022,0x88A8B8B3,0x19233D33,0x00212120,0xAAADB09B,0x9F87149E,0x0A849B1C,
0x2A203723,0xAAA38796,0x87010707,0x2C94A687,0xB5B7B513,0x302797AF,0xA3043234,0x341991A3,
0x11221633,0xA7B0A79A,0x160B11AC,0x153B3F0D,0xAFB4BFA4,0x3892B9A9,0xA1962017,0xB591A6B3,
0x3B3C2C24,0x9E952C35,0x11ACACAB,0xA1312002,0xB70899A8,0x898034B1,0xA5133329,0xAE068F24,
0x27ADA195,0x241A8290,0xA4919712,0xA3819A93,0x292795A4,0x15912B16,0x23C1C004,0x30282334,
0xA9B89922,0x18050F14,0x32228406,0x9D231D23,0x9D00A6AB,0x882F2482,0xAEC3B3B0,0x3710AFAE,
0x85271437,0x09A42114,0x14283412,0x01918F2A,0xADB4A99A,0xAAAC0515,0x121F3731,0x9D86108E,
0x2A06ABB1,0x049D0F8E,0x91B3B182,0x2A279535,0x8B901930,0x859594AB,0x15238BA8,0x2190A131,
0xB2B2812E,0x91939291,0x9F2C1AA0,0x218221A7,0xA41C231D,0x249E1025,0x21949596,0xA9AFB6AC,
0x251EAD8D,0x201F2C8E,0xA3959615,0x32960535,0x958F2284,0xB8181293,0x04282C9F,0x92A3870E,
0x1C97ABA8,0xB4A02A2D,0x97B1259D,0x8B811A2C,0x0707AE9D,0x941E1D20,0x09991F88,0x25111F2C,
0x9B0D9D15,0x1B8583AC,0xB2A32220,0xA3A7A9A4,0x951D2121,0x102813A5,0x1D89A598,0x03139299,
0xA7102A1B,0x96AA1980,0x3029A582,0x2426A78E,0x9E8A2A9B,0xA18C009A,0x16998925,0x05A91F26,
0xA29A9B0E,0x1931AAA1,0xA5A39BB2,0xAEAD2D8F,0x90222E31,0x32290090,0x2389A290,0x93A99505,
0xAE222614,0x1A0517A3,0x0E819C0C,0xA4B8A910,0x86A0212D,0x20191523,0x9414A2A7,0x9B978D9C,
0x9C0B2386,0x9F1A1612,0x21978890,0x26169B21,0xA020900A,0x02151F98,0x9D972087,0x99A6ACA2,
0x06131101,0xA411210A,0x98198495,0x1D041213,0x99B39F14,0x9C001F85,0x8A261814,0x9B0D10A3,
0x1A061707,0x18A01E29,0x1583A117,0x1724A195,0xA3A1919F,0x8FAFA2A9,0x90A09B28,0x1780029D,
0x122B1689,0x1C141E12,0x81051519,0x9A951887,0x83019219,0x089AA68B,0x1D0D85A1,0x96148495,
0x09079292,0x069D910D,0x0810991C,0x03808A00,0x991614A1,0xA08E8291,0x0C9DA2A2,0x15271886,
0x10251E0E,0x1E1783A2,0x0D089C18,0x99A29204,0x8693231A,0xA0891511,0xA09B9CA2,0xA49DA00B,
0x98951A8A,0x141E248B,0x1B231299,0x03201080,0x06221604,0x8C89158C,0x0494A492,0x84929310,
0xAEAB9806,0x92A0228A,0x130A0320,0x8A979FA0,0x1B00200E,0x150C1024,0x0E069C97,0x0F099990,
0x91969715,0x8FA38E9D,0x1B071621,0x0D8D0A22,0xA39B9915,0x931D179E,0x12141598,0x88089D94,
0x090B1B00,0xA2979000,0x9AA6A495,0x12988C17,0x15801420,0x819E890C,0x1124100A,0x03181580,
0x1000919D,0x8C009691,0x9A110F03,0xA3A8A095,0x16A40809,0x9E841B27,0xA5140E9A,0x1F1A169F,
0x8C1A1704,0x90939203,0x14130E89,0x8D118907,0x93A19390,0xA306269D,0x098A880E,0x968D9092,
0x10159C9E,0x2823819A,0x2203961E,0x08948923,0x8E881A92,0xA4A09C96,0xA2069FA3,0x871B2098,
0x1B1E9100,0x2084908C,0x0F0B1414,0x820E2121,0x928F9109,0x8D969BA2,0xA0A3A295,0x1907A495,
0x1D241394,0x1C20120E,0x138B9992,0x90979319,0xA09E191A,0x8C18168D,0x2020818D,0x92971016,
0x859F9392,0x0D0FA403,0x92A49A92,0x8A9D929B,0x13131425,0x13171C17,0x22211B00,0x9E8D9509,
0xA2A6A898,0x89A3989A,0x12839A8B,0x1A8B021F,0x11822323,0x86192825,0x930F929E,0x8980A299,
0x99A08E93,0x8F200799,0x08808112,0x91A81C23,0xA59E020D,0x950D9596,0x0B8D0CA0,0x22191688,
0x14242224,0x178C0E23,0x0991930B,0xACA3A3A2,0xA6A39CA9,0x988B1203,0x1413190E,0x26238700,
0x24190E20,0x9A828411,0x8C8F88A1,0x8F0D1095,0xA19E9D90,0x132411A4,0x1C10211F,0xA6A29811,
0x85039CA4,0x171A0997,0x06959609,0x231B2516,0x03222125,0xA4A6A38E,0x9299A5A4,0x941295A3,
0x1C83A0A2,0x1A81111C,0x1A1A2129,0x0A8A0115,0x95139007,0x98920B98,0xA2A0A0A6,0x12A0A097,
0x20162227,0x83111B1D,0x999A9189,0x979D908E,0x84170F81,0x10938782,0x1B181513,0x101C1C1C,
0x99A0A08A,0x99A29090,0xA4940813,0x959F9CA0,0x1F140A04,0x1F182A26,0x0A208705,0x81819A92,
0x99909096,0xA49D989D,0x810D03A2,0x1F1B2210,0x1502860E,0x1A099503,0xA6848A14,0x97A09299,
0x1C168A9E,0x1B060B23,0x0E0B121E,0x818C9383,0x99949B9C,0xA29FA4A3,0x12218299,0x22112116,
0x83131E19,0x00088410,0x85928404,0xA8A49594,0x9B8B9EA6,0x150F8797,0x0B871A20,0x0A87221A,
0x101D0509,0x93978207,0x97888D94,0x0D078E88,0x8891800E,0x948A8982,0x118D9696,0x06908E04,
0x910C8017,0x8793109B,0x08038B8C,0x131D2123,0x0305211B,0x858E9D93,0x8A9DA391,0xA0959791,
0x05849EA0,0x07191592,0x04191211,0x16018F96,0x1710131C,0x94970916,0x0D888293,0x8D879501,
0x95900981,0x962003A1,0x06A09902,0xA19B0087,0x81028891,0x1E1C1008,0x030D1215,0x09131304,
0x06918601,0x94999205,0x92978A86,0x8203A2A0,0x8F958A8F,0x1715130F,0x1115180A,0x96888481,
0x8D8A8C8B,0x11028F91,0x84979410,0x0D890320,0x0E100E8C,0x9092A18E,0x93901207,0x9080858C,
0x098C9798,0x92080584,0x11151201,0x1B068491,0x840D900C,0x89960D1A,0x0689939B,0x91010A14,
0x95871002,0x8787919A,0x038E9006,0x00908D03,0x17189193,0x848A1188,0x95868314,0x0202118A,
0x02840383,0x87838A0B,0x1304028B,0x81849687,0x8C808202,0x90101490,0x8B940292,0x92888809,
0x0501108F,0x8004040C,0x910C120F,0x0E88918A,0x8D93858C,0x96879009,0x8408138E,0x1690900E,
0x95909004,0x0810078A,0x14128997,0x919A9112,0x0B858385,0x848E9304,0x86938A03,0x8D861685,
0x080A9000,0x9E900F92,0x191D028A,0x13100382,0x97978485,0x90848689,0x13809886,0x958F978C,
0x1186160D,0x010C8F00,0x829E9612,0x88161500,0x06150B86,0x8C959F97,0x85838986,0x0F070F8B,
0x86859584,0x069C0F1B,0x930C0489,0x0C999704,0x10090780,0x02078013,0x8596918E,0x93818D83,
0x87808D8C,0x0C94908C,0x14880B17,0x94130304,0x88958802,0x83020E88,0x86810301,0x888E9890,
0x03080B81,0x0C0C858A,0x0E840B0E,0x05030B15,0x8E8F8B8D,0x939C9D95,0x8E838491,0x0C070187,
0x11858386,0x04040F1D,0x09058004,0x889A9093,0x85018312,0x8E870090,0x8391908A,0x0B141001,
0x010A0A05,0x908F9493,0x8A968A8B,0x9080928C,0x0E93918C,0x170F1616,0x8615140A,0x818B890D,
0x8B0E028C,0x908C8991,0x90919E9A,0x04890504,0x90120F83,0x028C9280,0x0D941417,0x890C8E8F,
0x85959F01,0x03151482,0x8D008581,0x828F0092,0x90078789,0x0388910B,0x889B8396,0x130F091F,
0x07110905,0x8E939088,0x01079183,0x03948A91,0x94809384,0x0D000A89,0x0D0D8184,0x918F8F86,
0x8C921012,0x05078A90,0x008E888F,0x0A058014,0x13080F08,0x8E008B86,0x958C9087,0x8F97849B,
0x96048F8B,0x130E200A,0x10050212,0x95960001,0x06889408,0x0A00828F,0x86038711,0x8C850C8E,
0x85809290,0x8B859105,0x8703178C,0x0F948310,0xA2090689,0x170B0104,0x1B040981,0x81928016,
0xA3889301,0x849599A2,0x858E9392,0x12201A03,0x14101519,0x95888706,0x8E958C96,0x0485968A,
0x05861012,0x8C050084,0x008D9393,0x8A8B040D,0x071C068D,0x85910492,0x998A830A,0x0A0C8B92,
0x1B8E098F,0x8A0A0319,0x86908506,0x9B979095,0x918E8C80,0x18028095,0x811E8281,0x06900714,
0x07839193,0x05040581,0x850E0A11,0x928E8B87,0x92979398,0x94919392,0x16810080,0x13188012,
0x82841200,0x890B9789,0x08830693,0x8410038B,0x88818505,0x93968A85,0x95969190,0x11858792,
0x02100210,0x830C1602,0x00839393,0x84828B91,0x05081218,0x85021002,0x96949C8E,0x9696929A,
0x07198896,0x18131A11,0x8F101811,0x948A850A,0x85988298,0x00019102,0x05818108,0x8697928A,
0x90939382,0x1110180C,0x12100C0F,0x8F838A06,0x92968783,0x850A9098,0x19818605,0x82820E12,
0x9D889281,0x02929BA0,0x09899291,0x0614110C,0x10128611,0x8692098F,0x90080086,0x83088C05,
0x83961187,0x9C899593,0x848D908F,0x01080C93,0x1117131A,0x82851387,0x8D8B900A,0x8D958980,
0x84000683,0x00888F81,0x84959489,0x02848509,0x10128A82,0x100A0903,0x80068683,0x948F9090,
0x868F8E01,0x8B891087,0x86818688,0x0805948C,0x05868191,0x92131102,0x060B0C00,0x8D88088D,
0x928D8F0E,0x888F0586,0x8A8A828F,0x86898588,0x0B848508,0x0E00840E,0x078E0308,0x07838B09,
0x88048D8B,0x03848481,0x90838392,0x85868C81,0x850B8393,0x8582808F,0x850F0D07,0x890B0704,
0x0A8D0A84,0x90860006,0x8B870A09,0x93968C90,0x89949190,0x08018909,0x180F8100,0x19820111,
0x8E068508,0x8C8B9284,0x00878493,0x9681848D,0x9184908E,0x88930988,0x120C070F,0x020F0405,
0x04888710,0x878D848F,0x92000603,0x85828901,0x90878E97,0x8B8F928E,0x88880D87,0x0F0F000F,
0x05081710,0x07840A0C,0x90049187,0x85928F8D,0x948E8992,0x91059792,0x10890295,0x8309140D,
0x10151719,0x8C850E0B,0x938C8501,0x938C8896,0x8A899A95,0x008A8181,0x06110B8C,0x0F860110,
0x05050916,0x82101682,0x81089088,0x95979192,0x918B8E95,0x05120098,0x81080E03,0x0606120B,
0x8C0C1200,0x89030700,0x8790030B,0x8A909186,0x949B9792,0x90108497,0x18840D01,0x04111016,
0x85020915,0x87850788,0x85800083,0x8A86878A,0x9A9A9684,0x9384098F,0x15800F81,0x09800214,
0x8701151D,0x830A0B01,0x05839495,0x99988A02,0x908C8A93,0x8996900B,0x1090030F,0x0D110D08,
0x0F120A15,0x80870711,0x8A8F8D88,0x9191998F,0x03998B86,0x0E889181,0x1903900C,0x160F0203,
0x12018216,0x85048808,0x8E87808C,0x93849899,0x07909A94,0x08129996,0x1410818A,0x14181180,
0x07110F0A,0x8E80078D,0x9B848185,0x94908D94,0x9085869B,0x86110690,0x0211180A,0x0A1A1901,
0x0282010D,0x96970380,0x96830C04,0x85939093,0x97A08514,0x8081080F,0x1A919284,0x03860E1B,
0x1A181313,0x0C908505,0x9B979303,0x91989E95,0x0897A19E,0x05069501,0x24231D81,0x1B1C141C,
0x07171617,0xA5979795,0xAEA8A5A8,0x1C1281A4,0x090B1112,0x1B252421,0x99970512,0x108D979D,
0x950E2020,0x0A0F1088,0xA4A2968C,0xA4A49F9D,0x06060F95,0x26978E15,0x111D2D33,0x16048913,
0xA0998E84,0xA2A3A2A0,0x041F0E94,0x1994A09B,0x89061019,0x25188485,0x1F1D1D1F,0xA69E8917,
0x1002A0AA,0x920B8393,0x232495A2,0xA7970111,0x9395A5B0,0x122D2F20,0x21202813,0xA4971826,
0x9BA1A2A2,0x0E100991,0xACA38A16,0x10A1A7A7,0x129CA39C,0x2F2E2F2F,0x1A263332,0xAFB0AB91,
0xB2A5A1AB,0x272220A4,0x09881326,0x9DA19C16,0x0AA0A7A8,0x33312825,0x0A191E2C,0xA99DA095,
0xA1A7AAAC,0x19210F97,0xA01B2315,0x97ACA4A7,0x070D9382,0x3431302A,0x861C302E,0xB6B4B092,
0x909FABB2,0x1E110C9D,0x1627252E,0x86A39583,0x80919F97,0x81162622,0x0D162D10,0xA7A3A916,
0x10A2A3A2,0x850B9BA8,0x23218412,0x24038D13,0x01210C8C,0x93222019,0x92931499,0xB39F9091,
0xA217A2B4,0x03A01D81,0x15142814,0x1C242533,0x83A20911,0x9FB0A20D,0x139F9126,0x1D869DA3,
0x8785B199,0x1B100186,0x22311C93,0x223198A1,0xAA9C2401,0xAB0610A5,0x12030F0D,0xA6A32013,
0xB5AB928C,0x219F1198,0x25191129,0x2F1C2032,0x0F151C1C,0xA1A7B098,0x83B0B0A7,0x891FA190,
0x1508849E,0x232A18A0,0x21302E31,0x951A2413,0x959EB2B0,0xACAC98AB,0xA41B9190,0x30861712,
0x99991A1B,0x9D100221,0x26311CA4,0x15921426,0xACA52188,0x9920A7A0,0x94AEA3A1,0xB2A60091,
0x27273288,0x2428172E,0x1F952735,0xA1872191,0xA2AAB7A3,0xADB8B2A2,0x26101209,0x3225819D,
0x1C299730,0x22233628,0x9013929E,0xA2B7B49D,0xB09B9D0E,0x239290AB,0x1690A1A4,0x1B292336,
0x32302D00,0x2790A404,0xB4988D21,0xAA95A8AC,0x8AAAA3BB,0x9922050F,0x222E3222,0x32270A8F,
0x9B0E2726,0xB017890F,0x80A49CAD,0xAEA698A8,0xAA8C8F8C,0x32278EA7,0x22203027,0x9E252A2D,
0x0D111618,0x9DA99499,0xB3ACAAA1,0x910EB2B5,0x2089249A,0x1C303223,0x2C2B2D37,0x9A9A2122,
0xB4B1AB9D,0xA28FB4B9,0x0BA59797,0x12202998,0x2C331E2C,0x17112D2B,0xB2A0181F,0x9B8DA5B3,
0x94B1B185,0x06961A9A,0x29320189,0x20141F21,0xAA991021,0x902129A7,0x9D9FB00E,0x1EAC8583,
0x882995A4,0x1F248092,0xA2921090,0x901F2C05,0x84898B17,0x8E960615,0xA011A5AC,0x9C089BA9,
0x841D2B94,0x2C2E2E26,0x9E9D2231,0xB4AD9C8B,0x90A2ACB4,0xAC00230C,0x949014A0,0x3A1E2823,
0x88193744,0x1A8AA294,0xB1C1C0AB,0xACB0881D,0x3410B2B3,0x39929332,0x2A3B363D,0x3726A39D,
0xBDAD9C18,0xAF1593B8,0x02AFC4C5,0x9C0B1D11,0x3B494108,0x23151621,0xB7813937,0xA291A1B5,
0xC1C3B4A5,0xB3012EA5,0x3D0AACAE,0x03A43442,0x363D3D37,0x2FA2B587,0xB8ADA128,0x9393BCC2,
0x9DB4C0BA,0x153B3721,0x40402FA3,0xA406353E,0xAD15351D,0xB7C1BBB0,0xC2C2A788,0x383411B5,
0x368F9136,0x11323E3E,0x322C96A2,0xBCB7A419,0xAD8FA4B4,0x12B0B5BD,0x9B27313B,0x38322C98,
0x82A39E2A,0x102A302A,0x2196C0B7,0xBEB39D9A,0x1B3B26B5,0x20A59C94,0xA21F3B39,0x342E88A3,
0xAFBCA131,0x8E06A0A3,0x27A4BCB2,0x9825322D,0x2A2285A6,0xA4B38733,0x9A19311D,0x1DAFB192,
0x929E9224,0x301CA49A,0x96212118,0x97218DA5,0xB6AD0BA2,0x0F263006,0x29A4A085,0x93861736,
0x2C17A6A6,0xA7049991,0xA51118A2,0xACA483A5,0x2B11281E,0x2B908A31,0x8986032E,0x8292B7B7,
0xA01D2592,0x942A2B9E,0xB4B7880B,0x17A40204,0x321C2534,0x24269227,0xB8A8B0A9,0x8E3125B6,
0x91961594,0xB1A73035,0x29A7AAA7,0x10050830,0x92322B86,0xAEA49BA6,0x069C09A1,0x0E922733,
0x25181720,0xA5B7BC91,0x952489AB,0x112B1EA2,0x80122C21,0x8FAF9321,0x2428282F,0x889F9E04,
0xC0A4A09D,0x9EA3A0BC,0x30233026,0x218A2F3C,0xAFAA0330,0x23A0B3B2,0xA5142728,0x101E21A2,
0xA5B4A810,0x2D11890D,0x151D1628,0xAB021680,0xACB197A4,0x1BA3908F,0x29202C35,0x2902A202,
0xB2ABA21D,0x232984B2,0x8CAD1C30,0x0B980225,0x249DB8A1,0x3126A7A3,0xA32B301F,0x9F10219C,
0x99B7B7A8,0x3322ABA2,0x24362F2A,0x1129129A,0xB0AE9387,0x14020198,0xA113A191,0x9E02A9B7,
0xB397209E,0x3235338E,0x05963038,0xA3212621,0xB0A8AAB3,0x98A5A3AE,0xA6A5252B,0x27141513,
0x09A8A521,0x91060514,0x82112E25,0x1F8E0081,0xA2B7B21C,0x260C958A,0x21258316,0x2A189590,
0xA5A49E21,0x09119CAA,0x139DA49F,0x0B101021,0x172195A0,0x3133A0AE,0xB0042E27,0xA5143211,
0xB3B6B3AE,0x1897AEAD,0x9326352C,0x182E3926,0xA2B8AC20,0x098F9780,0x95A5A995,0x1A84A1A1,
0x2AADAA08,0x3634353B,0x1825182C,0xAFA0A6A5,0xB9B9BCBC,0x323013AC,0x3632A290,0xAB20332F,
0xA1121BB0,0x851D271C,0x8CA8A399,0xBDA71011,0x879C10AD,0x312A3132,0x07980F30,0xB3B0A412,
0x3683B9BA,0x23A49630,0x182F232A,0x9D92A5AB,0x3120A5AB,0x9C202E30,0xA61D85A1,0xAFA0B3BE,
0x282C3195,0x81813033,0xA6102E2A,0xACB5BBB5,0x94A41B88,0x1A14373B,0x1A99A685,0x05B3B204,
0x20213032,0x2F1DA797,0x8518B19F,0xAD98A9B8,0x282F2E90,0x13332E24,0x9EB0AF9C,0xBDA32A85,
0x10172F95,0x27A2A60B,0xA9A20A30,0x00861194,0x2B208997,0x30A0B316,0xA7018A1C,0x1522219D,
0x2B290192,0xB5BDAB22,0xB81A308F,0x109589B3,0x2D1D1F29,0x1D828329,0xAC892127,0x2591AEB5,
0x3098B384,0xAEA10F28,0x9330318B,0x2E06A3AB,0xB1B10833,0xA680298D,0xA1A21210,0x2781B2AA,
0x23050515,0x95183033,0x3328A5A6,0x0A93B7A5,0xB5A61794,0x2229298F,0x192D2717,0x9AACAFA5,
0xB0C1A225,0x2A32282B,0x2A2EADB3,0xA6952214,0xABB2021C,0x2436258B,0x9C2726A1,0xABC1B086,
0x93AA9D20,0x3542341A,0x37289BA6,0xA5B3AC2A,0xC1B1B4B2,0x213338B1,0x2F170125,0x0BBEB132,
0x9F113235,0x2A372D8F,0x93A2B3A7,0xBAB6B3A8,0xA4262DA8,0x33433F0A,0x07013126,0xB4C6BA21,
0xA1B2AB87,0x2F29A19D,0x3D2D9109,0x8A84A316,0xB1192811,0x10343597,0x208AB0AF,0xAABFB111,
0x8BB1082F,0x2B391406,0x1C2A91A8,0xA6B39F8D,0xAEAD121A,0xA12F380C,0x238B1115,0x36B5AA2B,
0xA5A2B01C,0x9924901D,0x213D22B6,0x8F9C83AD,0xB4B51430,0xAF213020,0x91039BB4,0x3A07A79F,
0x0C0FA422,0xB1143127,0x2C362AAB,0x2596AE94,0x9CB7A523,0xA4ADB38C,0x08231098,0x342D01B4,
0x20019932,0xB4A7131D,0x24842B12,0x29280A2A,0xAAA5AFAE,0xA7A5A0AC,0xA7A80133,0x17273F87,
0x2A990B23,0x86ADBB1E,0xA31E1E0E,0xA9312EA2,0x2C2E9BBC,0xA6991B99,0xAFA12036,0x14821E91,
0x1C1A8094,0x3627B4AA,0xAD869C9B,0xBBB9141B,0x37301799,0x3F2D2007,0x92A8B530,0x12A5B287,
0xB13023AE,0x1C1B2DA2,0xA9A8AB98,0x96B58B06,0x29992F42,0x1F322C20,0x088ABABB,0x9AB4B188,
0xA022362E,0x06303F2A,0x26ABBBA7,0xADABBDB5,0x19202124,0xAE213582,0x082A30A1,0x36A18120,
0xACAAB032,0xAEB298A0,0x2A202214,0x293911AC,0xABA78527,0xADB7AA07,0x0B158AB2,0x3A39291E,
0x012F9488,0xB99697B1,0xA0B82F24,0x0C2B3522,0x049DA117,0x309CC1A7,0x912A04A1,0xAD8F3E27,
0x1583ACA1,0x81279BAD,0x32ACB113,0x07191E29,0xB0303F12,0x2F20A8A0,0xA1A9B1A2,0xB4C3A321,
0x3714801E,0x22431FA0,0x20A3002A,0xAAA2B2A8,0xA2B01BA5,0x3722303A,0x9C359420,0xA0A4ACBF,
0x12AA8F1E,0xB8892E12,0x20B01B27,0x231CB421,0x281899B7,0x2A1D2134,0xB3A70D1E,0xA5062092,
0x3C24A58B,0xB0A8A9B0,0x909F1222,0x99302A16,0xA7803183,0x90BBB315,0x20A6A398,0x331C852F,
0x98312137,0xA02727B5,0x24B3AEA2,0x9595AD13,0xA99C2F24,0xA73090AA,0x8D2130AB,0x07AC3222,
0xA1B5BA30,0x17972419,0x30342530,0x9C3889B3,0x0EB7ADB3,0xB792A122,0x912A369D,0x14892319,
0x8E26AAB3,0x10961798,0x8D8E2038,0xB9A0239F,0x3600878B,0x3931AFA3,0xB493821E,0xAEA7181C,
0x922F14B7,0x2296849E,0x0404A51C,0xA92C3896,0x93B01738,0xA48C10A4,0x18ABA7A7,0x3410B413,
0x1937322D,0xB3A83227,0xA592C1BF,0x14811CB4,0x3439202F,0xAF918311,0xACB4270F,0x122D0696,
0x231E1B9C,0x35B3B620,0xAB29A823,0x949A30B0,0x952F90A3,0x9A181AA7,0x38A7B001,0x90321D2A,
0xC3AA3914,0x2E069CB0,0x31249E8F,0x25B9AC3A,0xA114B295,0x9C2535B0,0x2630910C,0x97078FA7,
0x1DA1AEA7,0xA2A3012F,0xB0303CAA,0x2B22A594,0x18A6AE9E,0x34AF9B29,0x96322438,0xB19293B9,
0x1A2EB3BF,0x322F1302,0x95BE102E,0x9B190A32,0x94392FB2,0x268BB0A9,0xA1B2AEA3,0x2EB6133B,
0x2D269B29,0x9D3913B0,0x2422A9AD,0xA5A9A8AF,0x11B12123,0x81212B40,0xB0280DBC,0x32A4BBA5,
0x010B2B23,0x9DB81226,0x30251535,0x94341899,0x0CB1BCB0,0x2528B2B6,0xB0A4402E,0xA2831C35,
0x0231A3B8,0x28B2A504,0x198CA785,0x8884322F,0x07AA1637,0x8831B4AD,0x3D87A0B4,0xB210A314,
0xB9B32B87,0x39213232,0x01329B1B,0xB3C0B8B3,0x2A0B2391,0xB19C243E,0x27AE2F35,0x3138B5AB,
0x22A5B1B5,0xA191A72B,0xB9233C87,0x0E1123A3,0x21A1A404,0x042D93A0,0xADAD9011,0xB7AB1D1A,
0x343A4505,0x2DA4B037,0xB5BCBFAC,0x241C0716,0x8523209C,0xA6172D9B,0x2A18101F,0x0692A106,
0xA09A9C03,0xB59D2491,0x8F3925B5,0x1EB61930,0x11912531,0x979CB295,0xA2A793A8,0x29403119,
0xA4A92189,0x99C0B40B,0x1E391A1C,0x041A298E,0xA316AFA6,0xA0A1349D,0x24991031,0x8F219411,
0xB8A99BAA,0x2B3398B8,0x1A003330,0x06B1153B,0xAE30B1BA,0x0E841EA9,0x2337280E,0xB0B02D27,
0xA1C2C2AD,0x20281184,0x133C3830,0x85A10984,0x048E969B,0x9A848E97,0x99A0171D,0xB39D888C,
0x3A322D94,0x10120F09,0xB1B8B41C,0xAFB2A7A1,0x334323A8,0x23344026,0xBEC0B491,0x24A3A5AB,
0x2B363637,0xAB992C2F,0xB7A2B4BA,0x399D87A4,0x9230932E,0xAEB72C1C,0xB0A1AF9D,0x40402BA2,
0x32300028,0xBBB7B5A4,0xA7A18497,0x2B30398D,0x273C2B2C,0xB2BEBAB5,0x8FBAB99B,0x29213838,
0x90363122,0xACB3BFB7,0x372687B0,0x312D3340,0xBEA4312C,0xB7B1B3BC,0x402CA7B7,0x24212135,
0xA2A31033,0xBDAFA9B6,0x383306B0,0x302F2B2B,0xA0A30030,0xBDBDB8B3,0x283B2BB0,0x2C273D37,
0xB4A99B20,0xAFBCBAB3,0x35362798,0xA1833936,0xB0989CA2,0x22B0B8B1,0x36342F1E,0x1D8F2240,
0xBA9A0A83,0xA7B8B5BA,0x3C3282A4,0x258D223F,0xB3A71A19,0xB5AAADA6,0x373617B1,0x36291A31,
0xB4A81E87,0xB6B5B115,0x333030A7,0x2A2B1A2C,0x96B0B3B1,0xBFBAB090,0x302D311F,0x333C2E31,
0x1FA49FA1,0xACB0BDA0,0x9A9A239B,0x19373925,0x2318A0A4,0xA7ACBDB0,0x07B1A299,0x1D3D3E23,
0x98023234,0x9B9CB2B0,0x17AAB2A1,0x21292E11,0xAD803839,0xA09DA6B4,0x05A0B09B,0x2C1B8CA5,
0x981D2938,0x8CA7A4A7,0x82250F8A,0x332882AE,0x9C252736,0xB3BDAA9A,0xA21208A5,0x2E078CA8,
0x98242829,0xAAB6AA83,0x092405A2,0x2C202931,0x040F1D20,0x919EA90F,0x1F9FA9AD,0x8F248E26,
0xA5A7A0A7,0x062186A0,0x350C8C08,0x0D302A2A,0xAFAAA581,0x05161E99,0x1F030E23,0x11851593,
0xBCB3B593,0x04A002B5,0x2A34312E,0x23222D26,0xA78A9807,0x8AA7A69C,0x19202B14,0xACA39126,
0xAFA7A3B5,0x32A4B1A2,0x3229252E,0x9F102525,0x1D189498,0x17151518,0x8A9F9010,0xABAEA49B,
0x92A7AB91,0x20310CA1,0x1C120E1D,0x2089180B,0xA1112028,0x242293A0,0xA4021007,0x9FACB7B2,
0x1A032487,0x9E871625,0x9C0F1C0C,0x230682A9,0x2918102D,0xA3962130,0xA99E9A94,0xABABAFB4,
0x331D99A3,0x94212328,0x0B099015,0x18303723,0x97A3A7A2,0x9AA8A486,0x90A68989,0x8A918410,
0x858EA49E,0x1D251992,0x1E8A8220,0x2E223132,0xB3AC9724,0x2104AAB4,0x98130002,0x97A0A49F,
0xABA8A093,0x26253091,0x2A302A2A,0x220DA113,0xBCB19C0D,0x211698B1,0x22323223,0xA3A6B1A5,
0xABAEA49A,0x148A1C9D,0x1C313231,0x86900792,0xA0A09A14,0x30929A8D,0x93192632,0xB0B1B3B2,
0x0B16A3AB,0x38341D82,0x99962231,0xA08DA0A2,0xA8A59492,0x3135269E,0x96022930,0xB4AD99A2,
0xA9B1B1B1,0x3735200D,0x8F82222E,0x920C058A,0x95A1A098,0x26262097,0x921A2030,0xA5802194,
0xB0B4BDBD,0x27180285,0x222B3220,0x82190928,0x8FAE9D99,0x202F2204,0x18099121,0xA2801D17,
0xB5B2AFB2,0x2094AEAC,0x04132D27,0x8B313023,0x1EAEACA8,0x23242F2D,0x8B91832D,0x970F1B19,
0xB1B1B0B3,0x8083A29E,0x0100149A,0x06170D18,0x2493101A,0x2D252D29,0x14129423,0xA9A5A103,
0x1FA1B7BB,0xA986891A,0xA51B2A80,0x252092A4,0x2A15191A,0x16241E24,0x9DA1A4A3,0x978887AD,
0x23282318,0xA2A78118,0xA8B1B3A6,0x20208097,0x2531382E,0xA3979081,0x94ACAE8A,0x2C800198,
0x222A242C,0xB2A9AA89,0xA4A192B2,0x2D140899,0x8D1D2C32,0x11108914,0x1510A1A9,0x8E191213,
0x82181F8C,0xB1B3AA95,0x8611ADB3,0x3316211F,0x1730352F,0xA4A51220,0xADABA6A2,0x3633269B,
0x91A2AC29,0xBABB950F,0xA392A8B6,0x3B2D2516,0x0B2B2632,0x12A0A305,0x00100A11,0x86050813,
0x86A4150F,0x028FB3B4,0x0B809D19,0x9526301C,0xA5A5A0A3,0x139E9D86,0x1702272B,0x232E228B,
0x9491A413,0xA8A9800C,0x85901D82,0x231F9593,0x168E9F00,0xA298A0A3,0x0D13859E,0xA502178C,
0x881E288A,0x80111215,0x20101823,0x91181423,0xB1B0ACA4,0x919298AC,0x32332929,0x83A49A1E,
0xA6B0B4A2,0x202121A2,0x35382913,0xAEA88921,0xB9B1A2AD,0x271C2C87,0x2920222B,0xABAD952D,
0x2513B4AD,0x3117AD9E,0x9C1F0E24,0xB8A019A6,0x21281AB3,0x2814262C,0xA59A2434,0xA2B2B0AE,
0x2A2697A8,0x152B3327,0xB8A11217,0x91B6B7B5,0x2D1F1808,0x30393232,0xB2AFA888,0xA0A1A7A9,
0x323C2D92,0xA817362F,0xB2BDB8B0,0x22AEB0A5,0x37353336,0xAE822A2E,0xA9AFB7BB,0x3884A2A0,
0x31333239,0xBAAE1733,0xB1A5B0BC,0x253322A8,0x25203433,0xAEB9A920,0xA2B8B103,0x32273121,
0x8A2E1621,0x95A6B2B0,0x09179EA6,0x262A341C,0xA0A38521,0xAD9F8087,0x8A3118AA,0x262B91A2,
0xA2B6B5A1,0x8D941F24,0x2E20262A,0x15ABAA25,0x0E0BA498,0x31371C9D,0x8B2E06A7,0xB4B4AAA4,
0xAFB20B8C,0x16203427,0x96102C2E,0x14A2B2A3,0x3080AD8B,0x26262336,0x8C9DAF9E,0xA015B1B2,
0xAB333894,0xAC3237A7,0x82B3A9B3,0x28BCAC25,0x298C3042,0x9B110730,0x1825B9BF,0x28380EB3,
0xAB132524,0xBB9A0DAA,0x82A50EA5,0x2EA0303A,0xA9A02C3B,0x9E08AEB4,0x442CB9C0,0x301FA42E,
0xBE9C3230,0xBC8730AD,0x268D90A8,0x16B59635,0x22A10F35,0x3425B20A,0x2A25B4B2,0xB1919EAC,
0xBC1E3F06,0x9F393DB0,0x920886B0,0x15BCA327,0x9DAA213D,0x3228A511,0x30B1C0B2,0x22988E35,
0xAB31331F,0x0B28A1C0,0x308FAFAD,0xA9A42F3D,0xBF2B3294,0xA6A803B3,0x3210060B,0x9787273B,
0xB99314A0,0x4228B2C2,0x372BA32B,0xB9BB1630,0xB4A79897,0x45369DA9,0x9699043B,0xC6B72C27,
0x2F9EB0B9,0x45401B0C,0xAAA18435,0xC6BB8AAE,0x313696BA,0x2A3F341D,0xB9B31324,0xABB9AD98,
0x443B2B1F,0x2AA1B127,0xB2CAB92F,0x05228A98,0x34473799,0xAB8C8CA6,0xB9BCB2A5,0x30422FA3,
0x0A2F350E,0xB8C2B118,0x14B29515,0x2E3C372B,0x2999A496,0x23BDC394,0x20299E15,0x923B3923,
0xAAA1A0B0,0xB0B5B4A5,0xA9303E24,0x95233D0C,0x27AEB187,0x119CA30B,0xA134361D,0x3185A7B1,
0x2AB3C10F,0xA686A183,0x86262C03,0x292C8F98,0xAFA4A01A,0xB6233891,0x250E3389,0x22B0A82F,
0x97B6AC23,0xA2A31119,0x3D2AA6A2,0x0521B39A,0xA61F91B3,0x27333310,0x1E282E30,0xBDBDB6A7,
0xBBB12A06,0x2F2D4035,0x0994A821,0xAABFC1B2,0x2D1E2905,0x42453330,0x929EC1AC,0xB9B6A9B4,
0x26404011,0x07363517,0xC6C5C1B6,0xA5B72193,0x40384042,0x2399A82E,0xA3B2BDAD,0x32301A17,
0x34432A19,0xBB8AB7BF,0xA2B4B0C1,0x19263D30,0xB0243632,0x9BBDB2B8,0x31B48236,0x26233C4A,
0xAA13A396,0x19B0C5C1,0x191C202B,0x963D2C97,0xA726B9C5,0x13A622AE,0x932D4441,0xAC0B372C,
0x8FBFC0B7,0x399E9D30,0x8D920B41,0xBCB0B3B4,0x3320AFB8,0x3035312B,0xA03D3623,0xB89C9AC0,
0x3A8EA5B5,0x960A3342,0xBDA92B2C,0x96B5C4C7,0x40A19C34,0x2932323B,0xB09F1C2C,0x139DB5BA,
0x172C2C20,0xAC343317,0xB4B1A6BC,0x10A59EA5,0x2820042B,0x8C1F302B,0x19A2B8B1,0x2F9FA425,
0xA0253032,0x9B1187A1,0x2E06AFB4,0xA18A0A20,0xB421341B,0xB18DAAC1,0x371E230F,0xA4893032,
0x93902128,0x10B9BDB0,0x3A231C36,0x23333132,0xBDB3B7A8,0x83A3BBC6,0x31342F21,0xB0293936,
0xA22121B3,0x9AA1AAAF,0x25852D2C,0x95243D3D,0xB8BBBCB4,0x23BFBDB0,0x393B3B33,0x1981B028,
0x303594A8,0x92A4B3B2,0x272B1B05,0xAF312600,0x9F1426B0,0xBFBAA3A4,0x17093522,0x911E8E21,
0x9A9B2116,0x99B4262B,0x10119126,0x3D22B1B0,0x1C128931,0x9CB7A41E,0x0B8AB9A1,0x262598B1,
0x00270D24,0xA01B3196,0xA783A392,0x903A34AA,0xAD932A98,0xACAD1618,0x24AF9E1B,0x21A4A713,
0x0BACA620,0x25A3253A,0x331AB29B,0x292BA597,0xBCA32210,0xA0363DAA,0x2F25B4B7,0xAD0BA09A,
0xB1A309A9,0x352E2CA3,0x23A09D37,0xB1B48C2E,0xAC0722A2,0x2A283024,0x92B29727,0xABB0A721,
0x958C98A4,0x3B22A896,0x36A4B023,0x21388624,0x212CADB6,0xB6A69BA5,0x070484A1,0x14443DA2,
0xB21C99AE,0xBFB81DAD,0x0CB01015,0x39283437,0xAFB29736,0xAAC21332,0x2F8AB597,0x462F9B25,
0xA7298E2B,0xAD97B2BC,0x2798B8B8,0x333D2491,0xB22B3484,0xB08692A7,0x8393309C,0xA1992233,
0xB0892699,0x889296AE,0x829E2B36,0xA8B69625,0x3310B1A5,0x321F9915,0xA5A12836,0x9B929FA1,
0x311AA9A1,0x8D0E0913,0x9B24241A,0x23A9B3B1,0x1A13AD93,0xA22E3115,0xA92326A3,0x12B09398,
0x05948B30,0xA41D2A1E,0xA48982AA,0x19A69C91,0x18931922,0x1B342123,0xAAB7A1A0,0x92B3A787,
0x34202A35,0x1D15A31C,0x8114B6B3,0x200189A9,0x27231425,0x1D27B0AA,0xA323099B,0xB5042BAA,
0x0B0F1B9E,0x920A2123,0xB71C328A,0x9FB5009A,0x0AB9A027,0x31118238,0x341A9A22,0xA7B19F1E,
0x03A1A382,0x2E24A2A1,0x2929968E,0xA52B0D9A,0xA8198DB1,0x2A15B3B5,0x28310A9D,0xA9223424,
0xB7922997,0x8FB01C81,0xB0981730,0xB310299C,0x209421AC,0x10B3A52D,0x2E9F0A33,0x23341530,
0x10B4AFA6,0x93BAB710,0x2A320112,0x333688AE,0x9B279FAC,0xB4903018,0x8F259BB6,0x122181B0,
0xAEA22E28,0x9C033022,0x17A98720,0xA6A1AB02,0xA51A3083,0x8C052707,0x23A6A913,0x3319A322,
0x11049C18,0x83ACA79B,0x1BA2B108,0x231DA199,0x2E362083,0xA61A281B,0xA8A3859E,0x0F26A8B5,
0x022E04B4,0xAA132702,0x9FA22718,0x90A61E2B,0xACA9861D,0x11A52920,0x11A21033,0x2D90B381,
0x0302A30E,0x192492AA,0x240C9D83,0x8F8CB3A4,0xA2282395,0x032D29A7,0x9E17352A,0xB6AC8610,
0xA71890B8,0x8B8584AA,0x1B813233,0x11AB1733,0x240C9C15,0x93B3B49A,0x25A6802A,0x05088728,
0x262895A2,0xA804A2A6,0x122D3085,0x1009A8A1,0x8D19A5B1,0xAE940D95,0x232C3B1C,0xA3A02231,
0xA9AAAB9C,0xACB5A3A2,0x32292E2C,0x3291842E,0x8C95AA07,0xAFA2ABA7,0x2F2C179D,0x21278F9A,
0x9C0FA190,0x992024A9,0x92932717,0xA9A90C20,0xA6A69187,0x23978311,0x23252430,0x01A6A681,
0x112499A0,0x221C83A0,0x2723B0A6,0xABA09D97,0x1A1B13A7,0x91292D1E,0xA39F211F,0xC4B6290C,
0x199315A5,0x23172832,0x1721111E,0x099FB09C,0x351CAFB0,0x291DB186,0x8214A18C,0xA29D2A85,
0x90121320,0x9EA1211E,0xB49D1698,0x80971692,0x26162727,0x22149014,0x949EB5A0,0x262695A2,
0x80322497,0x9BA8A4A2,0xADA9840B,0x13212194,0x2F232320,0x13B3A22A,0xA0A7B117,0x0A05A5A5,
0x26302F87,0xAE9A8006,0xA516218F,0xAF103491,0x80200AA0,0x2096A5A0,0x1985A113,0x8E2E9591,
0x22312BAF,0xA2A3090F,0x90B7B017,0x199A9902,0x0C211E25,0x122B3424,0x9D8D9C9A,0x8DA9BAB1,
0x21A88D8E,0x18353130,0x1E168D08,0x138AB1B2,0x9E82081A,0xA396180E,0xADA9819C,0x981A1886,
0x201A3530,0xA1812C23,0xA5B0B292,0x81A5B1B0,0x282E271A,0x302A0312,0x12089407,0x9E01A092,
0xA6AE93A3,0x0E2492A3,0x100E241A,0xA28D250F,0x1C0F1119,0x86938A23,0xB49397A8,0x8D1A14B1,
0x31333219,0x9697902B,0xB5B4A89F,0x0207A6B2,0x3633228C,0x1C1C2130,0xA4B3A511,0x0B920A1A,
0x9C850610,0x9513B0B3,0x312B94AF,0x251D1726,0xA4951728,0x9E9B1494,0x909BA79F,0x21959F97,
0x17921222,0x9D9D2130,0x12081611,0x0208A19A,0xA4A19C9A,0xA1912284,0x1B2B2710,0x2124A09E,
0x14A6A392,0x99A68F24,0x91841915,0x171298A4,0x28949C16,0x05AB8C2E,0xA4121B21,0xA8200DAA,
0x29219FB5,0x2B0C8923,0xAEA02731,0xB29207A0,0x102C1AAB,0x311F93A1,0x1BADB219,0x91AD072F,
0xA606302C,0x9C2A2093,0x978DA9B6,0x2D10A8AB,0x31131C30,0xADA22335,0xB4A51399,0x2323A4B0,
0x32299AA3,0x13A59828,0xAAA80F26,0xA41E2397,0x15222490,0x0A93A198,0x08ADA312,0x00A50E2A,
0x9A811322,0x0F23029C,0x243214A9,0x1D13A09B,0x9DB3A412,0xADA20E1D,0x8324298A,0x23281F90,
0x1E179685,0x0EA8B1A1,0x989DA385,0x90152817,0x13222614,0x81060210,0x9EA69F8D,0x999B9E94,
0x24259EA2,0x2A2E1806,0x98041414,0xA3AA9083,0xA3AB0514,0x95891115,0x282A1687,0x2720A495,
0x94929689,0xA9A40A15,0x9D961098,0x30208B00,0x221F861A,0xA28E0C16,0xA7A3909F,0x9BA70C85,
0x889D1524,0x1924170A,0x0C2B2285,0x98828B91,0xA6959CA5,0x0E1982A5,0x20241506,0x1C0C8B02,
0x04A4A20B,0x8FA08624,0xA0950008,0x0F1A809B,0x2A32129F,0x181D0403,0x97A1A69C,0xACB39A83,
0xA5052B1E,0x8E1F2D0F,0x2725059C,0x2E9EA982,0x90B0A531,0x9289968B,0x962C17A7,0x1D230A9D,
0xA5A30784,0x8EA31319,0x10918922,0x21088906,0x220DA58B,0xA2161408,0xA42020A3,0xA28E17A0,
0x9F991707,0x08A78715,0x26088422,0x2990951B,0x919A9F1F,0x9C2282A3,0x942B22A3,0x900486A4,
0x10AEA38C,0x1CA30430,0x0E110D26,0x972D91A5,0x93278DB2,0x9C0813A3,0x10972623,0x97B38332,
0xA2A10A28,0x2F1DB0AF,0x282AA1A1,0x02200B07,0xB1A92217,0x98942609,0x23980D25,0x14A2B285,
0x3016B1A7,0x96232825,0xB417330E,0xA6A193AD,0x3119A19C,0x268F9E16,0x95188E22,0xA21B17B0,
0xAE852F0E,0xA6A32205,0x13B7AA10,0x35151835,0x231AA71D,0xA9A0A7A1,0x89311DB0,0x9F962917,
0x92AB801E,0x29ABB091,0x242C1B30,0xA22F98B0,0xA48182B1,0xA0823203,0x01B1862B,0x2C9DA32A,
0x2308AF06,0xA01E039A,0x9E2D11B2,0x9EA32119,0x08A62629,0x28A28E30,0x0C19AC91,0x0E14B7B5,
0x93202F92,0xA481310C,0x94B49E24,0x2A859029,0x2786AA18,0x04299AA9,0xA92317B0,0xB59A311D,
0x0EA81D95,0x31AB9E2B,0x2511A92B,0x1818A68D,0xA52812AB,0xAD0D04B0,0x85823317,0x15871D25,
0x13B6AF27,0x1C97A61A,0x09949C8D,0x072B8AA0,0x9E29229E,0x9D872C00,0x81AA9185,0x9CA90923,
0x23179225,0x1F9DA38F,0x92198A90,0xA21795A3,0x0C221F9C,0x8E95231D,0xA9A50D10,0x22038483,
0x97A31124,0x80071006,0x0C16A2A5,0x1C17988D,0x1E95978E,0xA21F1F20,0x131091A0,0x9B89869D,
0x011100A1,0xA102130C,0x97172491,0xA9AC1916,0x0C852191,0x1B150A10,0x87ACA52B,0x1F9F9285,
0x18320E21,0x2294A6A3,0xA8128AAA,0x1B29A584,0x108C22A1,0xAA23009C,0xA8972728,0xA18B27B2,
0x9C259820,0x18A52F19,0xABA2A38D,0x298E8421,0xA2A70783,0x03109433,0x2AA613A6,0x91279E23,
0x14A99300,0x8C17A09A,0x2C189784,0x8C158EA1,0x111C9899,0x981687A4,0x041B1312,0xA3A21007,
0x1111A58D,0x21802711,0x998C920E,0x9E8D1C93,0x1604A79E,0x9787241C,0x179DA488,0x12201281,
0x14219186,0x960A08A0,0x8B970611,0x95909296,0x25A28D1D,0x2304950A,0x93109787,0x95110D1D,
0x9508238E,0xA2AAA295,0x24231297,0x01A29E02,0x8A969101,0x981C2724,0x1E9AB08B,0x2D148FA2,
0xAE99062B,0x923001B5,0x23311AA6,0xB6A41916,0x96911EA2,0x2D272D29,0xB2B39D1B,0x91A0A19A,
0x152B362C,0x9AB8AE90,0x3014A3A0,0x16292E33,0x9BACBEA7,0x2B150C98,0x9E2A221C,0x96A2AFB4,
0x242C2695,0xB1892E30,0xA19B8FAF,0x2E22191A,0xB5B10E2A,0x8F0B10A2,0x2929251B,0xA7B29D88,
0x10819310,0x8A241E19,0x1BA1B0B1,0x181F1D25,0xA1831914,0x808FA4AC,0x2223138C,0xABA89C1E,
0x151F13A1,0x111F2019,0xAAACA28E,0x2E231899,0x840B232A,0x95A8B3A4,0x29261C8B,0xA6831523,
0x909483A9,0x171B1704,0x8299A607,0x23139780,0xA7882224,0x9F9F99A9,0x29221A14,0xAEAC9720,
0x132190A4,0x93263223,0xA4A49FAD,0x0AA0998B,0x16243317,0x9C02941C,0x269AB0A8,0x18211C18,
0xA3A89420,0x24079D8D,0xA11D9316,0x018919A9,0x11152411,0x02A7A309,0x85140A0C,0xA9A11213,
0x20128696,0x21939182,0x9F959221,0x9F93900D,0x1C2B2BA1,0x93861213,0x8DB1A796,0x1D22840E,
0xA69E1324,0x1F0285A0,0x0C1A800F,0xA08E96A6,0x0B161485,0x179D851C,0x0C1E0710,0x99938507,
0x8C979595,0x8F8F8011,0x1C032227,0xA59A001A,0x028EAAAC,0x22272484,0xA1A49719,0x1C829299,
0x101D1A10,0x9394958D,0x95948605,0x83021288,0x1384010B,0x15089986,0x061E8300,0x8B839B91,
0x13151699,0xA4988F96,0x9390098B,0x83222D22,0x1098A499,0x21089303,0x889D921E,0x151B9291,
0x94949300,0x89891192,0x97202311,0x0280A4AA,0x1711130F,0xA4AE0F22,0x10110D02,0xA28A0601,
0x1F03969E,0x08202223,0x9EA7AFA0,0x25231D91,0xA59B1023,0x058298A1,0x11242508,0x0496A389,
0x198A8F91,0x9B998F1A,0x07130997,0x16211A14,0x9493918B,0x200B9AA1,0x989D8420,0x9B950C83,
0x061A1F16,0x1B889D97,0x0B019189,0xA0A39C12,0x19050894,0x9E1A1A12,0x9291A1A8,0x24231D0A,
0xA4A79318,0x0F029198,0xA216261A,0x0F87A4AC,0x2D158E07,0xA4A58A28,0x940A1197,0x1A2C2685,
0x84A5AEA3,0x1F959E00,0xA588282D,0x84099AA7,0x30288D9A,0xA0A39F15,0x97998588,0x981C291F,
0x048FA2A6,0x271C130B,0xA59F0E26,0x918499A1,0x21251D85,0x949D9989,0x87918104,0x98102522,
0x99919B9F,0x20839F9B,0x98980519,0x9B8F878E,0x131C0697,0x8F918603,0x99979083,0x1413148D,
0x90979214,0x829E998A,0x10242119,0x92059394,0x240E8A9F,0xA2861E26,0x99A0A5A7,0x25261A05,
0xA39D1522,0x0D8A0592,0x1416090C,0x9293968A,0x0886888A,0x071A1580,0x12168684,0x9D998109,
0x08060A93,0x86949411,0x93948E91,0x1B231788,0x0C029484,0x9EA09A03,0x0208949B,0x21849997,
0x91861422,0xA2182084,0x810386A0,0x238EA992,0x1308221F,0xA3021C16,0x868E909A,0x1502A4A2,
0x20219012,0x93102B10,0xA9958286,0xA0A69AA2,0x1890A2A3,0x2B212930,0xA7831D23,0x9795AAB0,
0x129297A1,0x11160819,0x1E232613,0xA6940612,0x9CA7A3A1,0x298F9D9D,0x220A1636,0x081F2116,
0xA79DA5A3,0xA4B0AFAB,0x2C332902,0x24253332,0xA6A5A201,0xA9A7B6B0,0x2C2880B2,0x23202330,
0x9E92282E,0x93139DA7,0xA9B0A8A4,0x1D1D9AA7,0x39341716,0xB0863230,0xBAB3A2A0,0x22AFB9BF,
0x35353238,0xA7173433,0x9EAAB1B2,0x009CA48F,0x9F2991A4,0x301086A7,0x27273635,0xB3A2932E,
0xB1B8BFC1,0x3531240B,0x0C314440,0xB4B6B392,0x1CA6B2B2,0x162D1C1A,0x1B010385,0x242E3121,
0x9EA29223,0xB1B9BEB5,0x29260A94,0x37423C1D,0xADADA425,0xB3BCB3AD,0x21008D88,0x262F1D15,
0x96282C26,0x19119FA9,0xA7A7B0A9,0xA0981B9A,0x3330332A,0xAE932833,0xB7B6B9BA,0x2E208DB2,
0x1713313B,0x1632352B,0xACA68110,0xB0C1C0B2,0x2E13A7A4,0x34362725,0x21303432,0xABAC9508,
0xBCBDB9B1,0x13331FB3,0x362F3420,0x1B021E34,0xB8AB981F,0xAEABB2BA,0x2F211F92,0x32281626,
0x161B2534,0xB4A59295,0x9FBCBEB6,0x352B0F85,0x27333133,0x92818D80,0xA2A1A1A3,0x9A898F9F,
0x96989799,0x2E382B0B,0xA4871612,0xAEB1A9A6,0x07131192,0x23242117,0x22018C03,0x9EA3A214,
0x9AAFA79F,0x86212524,0x10292495,0x13870712,0xA3ACB0A0,0x2084988A,0x85132726,0x1B1F1192,
0x15169E8D,0x9D9EA497,0xA2A197A3,0x2317048C,0x2726252A,0xA59F8511,0xA293959A,0xA2A0A3A5,
0x2F2A12A1,0x222E312B,0xA69CA580,0xA3AAA3B0,0x9DA28211,0x2C160614,0x2F30332E,0xB19F8A23,
0xB7B4B1B3,0x251CA0B4,0x32332D23,0x322D232B,0xB9B3A41D,0xA3B2BAB7,0x2A2909A7,0x30313835,
0xB39F2632,0xAAB3AFB2,0x0F93ADA5,0x0C182922,0x2C333122,0x968A9A0B,0xABB8B5AB,0x820697A5,
0x3B322C23,0xA4902538,0xB1A6ADAC,0xA18A92AE,0x1C122099,0x16223030,0x85181615,0x0CA4B1AD,
0x8A99A189,0x02030E17,0x251A1203,0x018D8B21,0x9C990A19,0x9190889C,0xA9B1A99F,0x2C202422,
0x252F332D,0xA1A29D14,0xA5B4C1B5,0x0C1B20A3,0x33392B16,0x292B2B2B,0xB9B8AC0E,0xB5A4ACB9,
0x372293A7,0x35262C36,0xAF0A2A36,0xB102B0B8,0x1CA8B1BB,0x25151C26,0x932C3A39,0x909A9792,
0xA9B5B5B1,0xA5212613,0x0E253000,0x3716911B,0xA0A5B182,0xAE021B10,0x981F17AE,0x2FA1A39E,
0x9C9B0A31,0x94203834,0xA38692A4,0x91B8BCB7,0x001C2534,0x25343821,0x15300C9B,0xB9BBB4AB,
0xA1B5A995,0x3736392E,0x372E0A2D,0xB5BCB422,0xACB3B1A5,0x263219AC,0x4038198C,0xAAA6273C,
0xBDB39803,0x889BA7B8,0x361FA29D,0x1C860D32,0xA0243837,0xA004A2B4,0x0CB0BBB5,0x92A20524,
0xA50B3F3A,0x32332C84,0xA1B2B211,0xB7BAB9AA,0x24313097,0x343B3523,0x14110B1B,0xBABCB280,
0xA6A0ADB2,0x433E03B4,0x2C343137,0xB8B38D20,0xB9B1939F,0x2D19ABBC,0x3E0F9424,0x119A2C40,
0xAA9B912A,0x9C06ACB7,0x1291A2B1,0xA3A02A2B,0x0E313933,0xA4AB0003,0x03AFB3AC,0x20A5AB10,
0x18322521,0x303C3391,0xB49C8E0B,0xA8BFBEBC,0x2B1C1415,0x2E313134,0x2C20A212,0x97A5AD91,
0xB1B5B9B5,0x2E33308E,0x31323433,0x11B2B607,0xA7B3A113,0xA29F9493,0x2F3186A4,0x31302121,
0xB1BF9E29,0xA4960F15,0xAF811683,0x3124A1B0,0x312A3136,0xC2B51832,0xACA69EB2,0x8F851E96,
0x3392A89B,0x2F3A3A38,0xC4B18419,0x9DA6AAC4,0x2D30331F,0x15A59023,0x1A20202B,0xB7A5841C,
0x1810B9C4,0x343B3014,0xADACA223,0x2624210F,0xA315221F,0x22A8C3BF,0x35321415,0xAA83262D,
0x1E17259A,0xB1A30721,0x9DC0C1B5,0x3E322F30,0x90182E3C,0xA9A1A2A5,0xAB8106A3,0xA1B0A3AE,
0x372A2923,0xA3803540,0xA4ACB8B2,0x302D90A6,0xABA1A78E,0x131725A0,0x92323C32,0xA0A7A8A5,
0x219CA09B,0x80A9B483,0x2E31240C,0x152D2328,0xB2B1A3A0,0x809FADB0,0x8F942326,0x2E169280,
0x27383831,0xBFC0BBA7,0x2E228CB0,0x9A1B312F,0x1F8695A2,0x978E2026,0xA9A9A991,0x091C2297,
0x990C211E,0x27049FA5,0x911D2C33,0xA1A5ADA6,0x2884ABB0,0x178E0626,0x9B15292B,0x1B1E1699,
0x93A3A390,0x9EB3B5A1,0x26303128,0x21313023,0xAFACA9A4,0xAAA493A8,0x8E810C92,0x38342B0F,
0xA7AB9732,0x98A1ADAE,0x220A9B92,0x2481A300,0x2C282526,0xB2A60E27,0x9CADADB0,0x1C190703,
0x11130A13,0x1922220F,0x98191E11,0xB0AEA6A5,0x162518A4,0x030D1C19,0x21201503,0xA19B8320,
0xB2A6A09A,0x292383AF,0x9422302E,0x84A29897,0x14901526,0xACB6AC17,0x2F0CA4A4,0x24353331,
0xA699A193,0x1484A9B1,0xA5A41513,0x209BA095,0x272E2727,0x959C0117,0x98870792,0xA49D9A9B,
0x231294A1,0x9E213532,0xA0A79CA4,0x1782A0A0,0x1B090D1B,0x08959518,0x221D1814,0xA4A9AB03,
0x1B2487A7,0x0321170B,0x02898B96,0x988F1E18,0xA6A18E94,0x1D1E97A8,0x94122724,0x90931402,
0x1B88010D,0xA195980C,0x98A0A1A2,0x2234268F,0x94908892,0x1696A695,0x93841C20,0x898AA5A6,
0x242E2B12,0xADA99420,0x15868A9D,0x8D998D1A,0x0690A3A2,0x2622181C,0xA7851921,0x959197A9,
0x200E8497,0xA0A08E1B,0x1D111C05,0x871E2524,0xA3AFA9A2,0x12161914,0x9F920410,0x1E840305,
0x9C97031F,0x03A39C86,0x25268593,0x1A100A15,0x9208928B,0x9B8510A0,0x8E959B95,0x2218028D,
0x93181922,0x8B8D96A2,0x938D9592,0x85A2A38E,0x25191A89,0x0F1A1B27,0x9596A190,0x91068590,
0x939F8A95,0x1C100186,0x10101421,0x99918102,0x0592A69E,0x9A930608,0x10888386,0x23242D20,
0xA09E871C,0x9DA39792,0x8E0C079D,0x0C838100,0x1C232620,0xA2948813,0xA1A7A3A1,0x0088A1A2,
0x201A211B,0x1C192425,0x9686821A,0xA39AA4A9,0x09918D9E,0x16161A19,0x141F1A0B,0xA2A6950F,
0x8E9DA4A5,0x06191710,0x20211101,0x03071522,0xA8A69B92,0x019DA19E,0x29221386,0x15111526,
0x83050E12,0xABA18980,0x90A09DA7,0x221C1311,0x1A1D1C20,0x918F020F,0xA3979A94,0x928B9EA4,
0x21201888,0x181D2321,0xA0998911,0xA09B9595,0x0A96A1A1,0x2520818C,0x0C202725,0xA2968705,
0xA2A19BA2,0x87A2A39E,0x271C1617,0x20262528,0x9F949581,0xA09A96A0,0x9EA19A9A,0x271F1D0E,
0x20211B24,0xA1A49116,0x9595A1A1,0x9A92949A,0x1712158E,0x1B212526,0x9FA10315,0x989AA29A,
0x8E979698,0x1D16088B,0x1A1B1E23,0x9E970812,0x9C9FA49F,0x8492949E,0x14100083,0x2020221C,
0x978A1921,0x9EA0A5A0,0x818D8F97,0x0D080080,0x20211D19,0x99861417,0xA0A2A19E,0x0403919E,
0x11038401,0x1D1B1F1D,0x93880A1C,0x9BA19E9B,0x1B079898,0x08101217,0x111B1B0A,0x8E8D0911,
0xA0A3A39C,0x108C9796,0x09141517,0x0D160B83,0x908E070A,0x9CA19C92,0x838D8E8D,0x11131B13,
0x0D0A1012,0x8D010E0C,0x90909896,0x878E8E8C,0x0A151283,0x0B0B1110,0x00080485,0x9A999589,
0x8A949A9A,0x0F181085,0x11050E06,0x0D141014,0xA19A9083,0x8F969C9E,0x130E8086,0x1510050F,
0x10161616,0x9E928303,0xA0A1A4A3,0x1B108C98,0x1615191C,0x13161D1B,0x9F928008,0x989BA2A2,
0x0C909C9F,0x1A1D1F16,0x05151B1E,0xA0948D90,0x9DA2A19F,0x0A909799,0x27251D16,0x1A1D2324,
0xA598920A,0xA3A2A4A6,0x859098A1,0x26211911,0x191E262A,0xA19F9808,0x9FA3A6A4,0x0A0397A1,
0x221A1309,0x20222422,0xA3988A16,0xA1A4A5A8,0x1807949D,0x1B141517,0x1417181A,0x9B8D0512,
0xA5A6A5A3,0x1989949D,0x1F212120,0x1A1F1C1E,0x9E938613,0xABAEAFAA,0x1D10849B,0x201D1D21,
0x151C2121,0x94989706,0xA1A4A4A2,0x8091999C,0x1014150D,0x2F2D230E,0x9C991226,0xACAAA59C,
0x8F9AA4AA,0x2A292510,0x161A1C28,0xACA99702,0x8E0090A1,0x08849391,0x08040C05,0x21201D1B,
0x94801518,0xAAA6A497,0x8AA4ACB0,0x24282215,0x21232928,0xA1918214,0x9C9B9B9F,0x9DA0A3A1,
0x18079399,0x2A282921,0x901C2328,0xA7AAA49C,0x9FA3A8AA,0x2112008E,0x1F252217,0x070A1420,
0xA69F0707,0x999BA5A1,0x200A9098,0x1B251A1E,0x83081A1C,0xA49D9597,0x9CA4A9A8,0x21818E96,
0x2126292C,0x86172421,0xA1A6A9A1,0x92959699,0x94910485,0x05030688,0x23232111,0x8F031A25,
0xADAAA5A0,0x8987A2AB,0x2A2F2A17,0x91802026,0x99A0A2A0,0x0D038F97,0x99968A13,0x1E0F9FA2,
0x1D262A20,0xA6900519,0x9AAAADB0,0x1C181207,0x20211C1E,0x8204900A,0x8A988A92,0x9E818080,
0x989F9F9F,0x23019296,0x18212C30,0xA79E9105,0x8199A2A5,0x19111107,0xA3968514,0x05101395,
0x1E131013,0x9F948611,0x04899CA1,0x181A1812,0x960D0787,0x9293979C,0x05870100,0x01858213,
0x0A000401,0x200F0E10,0xA0949218,0xA3A397A5,0x26188994,0x11202127,0x969B9994,0x00860304,
0x8F948904,0x81849290,0x17058108,0x02130F12,0x9B060A88,0x90958795,0x8787150E,0x110C9082,
0x1519110B,0x9B939195,0x9494A39A,0x1E1A1B82,0x221B2120,0xA19B9F13,0x95978A97,0x9798140B,
0x0896AB9C,0x2127210B,0x1D202B24,0xB0A49D03,0x93A2A9A9,0x131E179B,0x01041820,0x201D0184,
0x0814121C,0xAFA99594,0x8EA1A9AB,0x32241614,0x001B292E,0x94A29E83,0x8E909AA0,0x0894A087,
0x8D9FA098,0x29292314,0x1520252D,0xB0ACA79F,0x929BA3A9,0x2B281C91,0x99141A23,0x02852012,
0x8B150789,0xA8B0AC9C,0x099799A3,0x2D2D231D,0x1013252F,0xAC909FA2,0x16909DA4,0x9D9B9895,
0x181F0C06,0x211C1F0F,0x9306211F,0xA1A8B09B,0x0EA4A4A8,0x1F25272A,0x191C1211,0x9B98948C,
0xA3020A93,0x0EA6A399,0x1F178591,0x132A2729,0x90931786,0xA6A6A595,0x1390A69C,0x14170D9E,
0x1E121221,0x1E202429,0xA291959B,0xA8AFA7A1,0x218E9391,0x2820121F,0x9615191C,0x02088783,
0x979A999F,0xA3948192,0x21888E82,0x22910423,0x86228E09,0x949099A0,0x03000993,0x10131817,
0x9B92978D,0x92A01313,0x1C109693,0x80079C92,0x80182415,0x17000704,0x9A989C82,0xAC870595,
0x1E130FA7,0x0A92091D,0x19192026,0x87158704,0xA3ADA6A2,0xA116099B,0x09042509,0x248D9314,
0x0D0B1728,0xA0969B9A,0x908C9EA0,0x04920E86,0x03171212,0x01090384,0x0F088F9B,0x8B8C1A22,
0x94A39791,0x242C9797,0xA7A01400,0x9E97148D,0x251E860B,0x22119185,0xAC8F1216,0x13949294,
0x15039695,0xA9A09615,0x272713A2,0x11292513,0xA2A2950C,0x8D94929F,0x989E9F96,0x0E181205,
0x26211708,0x830D840B,0xA793111B,0x1712A5B5,0x89848B82,0xA1A41820,0x27282515,0x8F939901,
0x9AA0A695,0x0D26208E,0x81919CA8,0x86161622,0x9892098B,0x13820F94,0x9F988125,0x801C159D,
0x1A07948A,0x8499A18E,0x98231788,0x16101198,0x9396131B,0xA4A50918,0x2C13A59C,0x9A110711,
0x9608109F,0x17202414,0x94A9A592,0x119B9F1B,0x83211E92,0x0E120304,0x9DA11420,0x140DA2A5,
0x1F0AA48F,0x9D92858E,0x842D3117,0x9DA19392,0x11909296,0xA6020B1A,0x201791B0,0x19121A25,
0xA1A6A382,0x22302592,0xA5B29B16,0x14999D90,0x92202226,0x1513A0AF,0x1E1D2423,0xA69F9302,
0x8E82969D,0x86A2A099,0x25211E13,0x921A1C29,0x111091A4,0xAC9E8A92,0x93A2A9A5,0x22232E13,
0x13841028,0x82820C1C,0xACA29596,0x1300A6AB,0x25201083,0x0A170911,0x0D161919,0xA2A39492,
0x859EA39A,0x8A090C11,0x0B161B94,0x0A11121D,0x97950702,0x0B130284,0x979BA8A1,0x1A8A0F8A,
0x980C1A26,0x19830588,0x91900A1E,0x960DA1A5,0x09121192,0x9392879B,0x151C2120,0x929A9012,
0x168E8E9E,0x97869918,0x21838D97,0x9711130C,0x90050283,0x149C0511,0x12109C91,0xA3018888,
0x0400208A,0x8C871915,0x100C9E85,0x938A8288,0x9000849E,0x01200988,0x01931A11,0x078D1114,
0x0401A590,0x94108997,0x0B9484A5,0x0B191E29,0x8592938B,0x1E11088A,0xA7A3A083,0x11120492,
0x08801610,0x20120308,0x9E95901D,0x8993959B,0x9100008F,0x18020185,0x1B1E1721,0x97888588,
0xA1A79D99,0x21919784,0x191A091F,0x1A261C84,0xA3A28008,0xA3A6A39C,0x0616168C,0x2E1A078B,
0x84171D2C,0xA59EA096,0x9F9A8BA7,0x12901015,0x20241D22,0x8A828504,0xA8A59B9C,0x2204A29C,
0x1F212122,0x9D841D17,0xA4068F9A,0x9BADADAD,0x261F271E,0x232B2929,0xA0939A09,0xB2B3ABAA,
0x16809BAD,0x332C2422,0x16273237,0xB2AFA29F,0xAFAEB2B4,0x2107929A,0x3D383026,0xA2112633,
0xB7B1A8A4,0x99AFB0B3,0x3323888A,0x2A353535,0xA791181E,0xB1B5B5B2,0x14889BA7,0x312F2720,
0x1824272C,0xB3ACA28E,0x99A6B0B6,0x2D231F1C,0x232D302E,0xA5A29804,0xAEB1B2AC,0x2115019F,
0x35343023,0xA0001C2D,0xB4B1AFA6,0x87ABAFB4,0x34312620,0x1C303537,0xAAACA594,0xB4B7B5AD,
0x2F2A87AC,0x35363631,0xA399132C,0xB6B3A8A2,0x1CA3B3B6,0x36322929,0x032A3535,0xB3AC9294,
0xA3B4BAB4,0x2C2B1998,0x31353632,0xADA01A28,0xB3B7B5B0,0x2495B0B0,0x34352F2A,0x97273633,
0xB1B2AFA5,0xAAB5B9B3,0x30282483,0x2D3B3A36,0xA7A7A011,0xB5B9B2AC,0x2219A1AE,0x36383322,
0x91932235,0xB6B3A896,0x10A5B2B5,0x32322920,0x81243234,0xB1AC9980,0x9FB3B6B7,0x31302014,
0x21293334,0xB0A78A10,0xACB2B6B4,0x2B2C1898,0x2C262E2B,0xA9961627,0xADB0B1AC,0x221A96AA,
0x23192323,0x9D00252C,0x9B99A5A5,0x0E1299A0,0x02871C08,0x96940C1A,0x008C9F97,0x1E20150F,
0x05800C05,0xA99D8512,0x809CA8A7,0x292B2085,0x82151F20,0xA3930014,0xA4AAA9AA,0x28211296,
0x20261725,0xA301201B,0xADAEA2AA,0x3008A3A1,0x13250825,0x951D311A,0xA4ACA49B,0x91A5ADA6,
0x23221B1A,0x28312D22,0xADA79983,0xA9ADA7A9,0x2908A093,0x30322921,0xA5891F2A,0xA8A9A4A5,
0x8EAAA7A5,0x302E1910,0x08242A2B,0xA3A09693,0xAAADA1A2,0x28149AA1,0x24272E2F,0x9C840C14,
0xAAA3A2A5,0x09A5A7A3,0x2D2C2620,0x0821231E,0xA4A2A000,0xA9AEA9A7,0x2325139E,0x262B2B24,
0x90978C24,0xB0A8ABA4,0x0E068EAF,0x25222020,0x170A2630,0xACA29584,0x919CABB1,0x1E0E8612,
0x231F2922,0xA2072022,0x96ACB1A3,0x16939483,0x05211795,0x1829231C,0x9BAE9A08,0x8C849098,
0x8B179C98,0x2415118B,0xA2861816,0x8B169097,0x82989092,0x10880E8A,0x97000224,0x210D919D,
0x9F0A0B8B,0x98939090,0x8095211F,0x1F949F94,0x881C8224,0x9593899B,0x0C081196,0x9A9AA090,
0x231A1C1A,0x848E0911,0x8A88A095,0xA0989F8F,0x231A199F,0x891D1A1D,0x01898D0D,0x9F9D8F91,
0x840390A5,0x16191820,0x078D120E,0x8F818A80,0xA09AA398,0x20151D85,0x97900905,0x8183001E,
0x9A931095,0x17959997,0x840C8323,0x15030697,0x060F8E82,0x9C98920E,0x1F17078F,0x97891085,
0x130B9C88,0x0A811611,0x94919390,0x13210F07,0x9AA78A03,0x18188A92,0x8D800020,0x160198A4,
0x9C182614,0x96A1ACA1,0x14062611,0xA0929310,0x26248A9A,0xABA91020,0x041591A9,0x1F161924,
0x94A29D97,0x0A222520,0xA3A7A601,0x251306A5,0x9D1A1627,0x88920F98,0x1381201F,0xA0A6B19C,
0x28231983,0x97131606,0x09929207,0x9194141B,0x979BACAE,0x2424211A,0xA0841A14,0x08A09E96,
0x89070C19,0x9B98A0A2,0x2825200E,0xA295950F,0x0EA09D9A,0x0821241D,0x939AA5A0,0x1C221908,
0x9792949E,0x1216110B,0x92051B1C,0x93A3A5A2,0x21250D80,0x09900A03,0x8E088A13,0x941F1889,
0x99AFA8A6,0x2E2B0B02,0x9C8E2326,0x9692A39E,0x86160E90,0x9B9F91A1,0x28210116,0x93962022,
0xA28B969E,0x0B8C9E8D,0x09072003,0x0A20938B,0x828A1B0D,0x97939A93,0x880C0B03,0x108B0E89,
0x11239286,0x0B971404,0x92A19A92,0x97211221,0x1E8297A8,0x10180006,0x90971C20,0x9B969082,
0x9607008F,0x20969F9E,0x03252324,0x8C960004,0x8F898C9D,0x9886920C,0x01988E9A,0x1C302287,
0x8B9A0225,0x8BA2A0AA,0x9B211315,0x8B991912,0x292297A7,0x9D93132E,0x92A092A2,0x88231A81,
0x88868D85,0x0400829D,0x0880242F,0x9FA1A0A0,0x1A1AA1A0,0x92922423,0x99118E9C,0x2E230F19,
0xAEAC140D,0x990CA5A7,0x12082220,0x87211BA3,0x18979821,0x908C2520,0xA192A6A5,0x271B928F,
0x8E0C2203,0x8595A21A,0x1D172286,0xAB979A93,0x1E02878E,0x85172622,0x9AA0A092,0x1488879A,
0x9F142327,0x0E9EA5A5,0x26298106,0xA2A4160A,0x9482A19E,0x242A2018,0xADAB8D98,0x20119F99,
0x10022722,0x9404A485,0x18131F8F,0xA7920F11,0x278DA3A0,0x801D0718,0xA2931012,0x201012A4,
0x84189F18,0x9AA6048E,0x0A211318,0x1A991706,0x9C85A798,0x10888210,0x9609208B,0x1A929309,
0x11150100,0xAB82111E,0x09A108AB,0x15149321,0x90811D11,0x0B11998B,0x1D801D00,0xA393A306,
0x2311130E,0x0C138191,0xA0A3998E,0x01171208,0x9109141B,0x141092AD,0x90991528,0xA68B0F18,
0x248699A6,0x0D1C1880,0x9EA6AC1D,0x1F19298C,0x1711900C,0xA19F9A9E,0x0622121B,0x859B2206,
0x0815A9A7,0x9B852620,0x9A101305,0x2795959A,0x950E0417,0x9BA59F19,0x122820A4,0x2499970F,
0xA4860E10,0x88178915,0x84941BA6,0x210AAE92,0x9F93241E,0x94288297,0x22A39097,0x958E860A,
0x84928722,0x092216A1,0x2196901E,0xA0961110,0x8913988A,0x118716A2,0x8D85A513,0x1F08211E,
0x84241394,0x9DABA796,0x03928792,0x8A241423,0x251613A1,0x96988012,0xA9A3A013,0x231990AC,
0x1F292317,0x93A69924,0x888D0198,0x9414A19C,0x188C91A3,0x22182327,0xA7030C23,0x1291A2B0,
0x8C8F8E8C,0x93121316,0x201C0D87,0x9C021E03,0x98A6A38D,0x8200098D,0x11131C17,0x8102928C,
0x148C0F22,0xA29C8600,0x009EA8AA,0x231F1121,0x141D2018,0x93899191,0xA3958683,0x83A6A7A3,
0x1C201590,0x1B2A292E,0x99A89495,0x9C9FA89C,0x8E899896,0x27131483,0x24312E28,0xAEA5A60C,
0xA2ACA8B1,0x15201E89,0x19241019,0x24202A1D,0xB0A0031C,0xA4B1B3B0,0x2826128C,0x1C16281C,
0x0D089424,0x9091160C,0xA7A8B0A9,0x1F1701A0,0x2120282D,0xA18C1407,0x0385A099,0xA1A2998D,
0x178F919E,0x24332521,0x009B0A10,0xA4A0A79C,0x8F151291,0x0994A092,0x25222887,0x97051831,
0xACAE94A1,0x24179DA4,0x96029321,0x1B8D1F92,0x882A221F,0x989FA2A0,0x849DA4AA,0x89222424,
0x138A0090,0x1C160281,0xA5A39318,0x9BA99896,0x2B2E0982,0x859C171B,0x95099410,0x93002085,
0xA38AA5A5,0x250195A0,0x8018322C,0x8A0C9F83,0x168B949E,0xA1A09E86,0x0B9D9883,0x24302C11,
0x96A19B1C,0x99998899,0x9E80030E,0x86968CA1,0x24271391,0x99921B32,0x979596AD,0x101C9995,
0x07A29200,0x07168E88,0x1E262C25,0xA1A7A89E,0x829B9191,0x9B821111,0x1109840C,0x281B2389,
0xAC989D25,0x029985A8,0x84238A89,0x129D838C,0x051A128E,0x00111727,0x97A4A3A9,0x1A0A911A,
0x93991687,0x81159C14,0x24092187,0xAA9A9F12,0x0A810E9F,0x8C1E8701,0x0C93118C,0x011A1088,
0x948C1322,0x839BA1A8,0x1A888A15,0x90080804,0x17138E13,0x100A2083,0xA2A2A681,0x9105129E,
0x12130F18,0x05901291,0x05219016,0xA1A31607,0x0B85A2A0,0x1E041181,0x96198A18,0x15910689,
0x8F030701,0x989CA190,0x071B0A91,0x13842115,0x9690948C,0x03128910,0x9C991290,0x1C899A8D,
0x0C1B1202,0x97848914,0x8096129E,0x080E9415,0x91939295,0x12138012,0x118A220E,0x9387A68F,
0x04890A83,0x99060B02,0x20948D00,0x87201400,0x9F989511,0x039208A4,0x1218851D,0x9492129A,
0x09169511,0x00981980,0x969BA694,0x1B131B10,0x90138385,0x089B900C,0x97151390,0x95998C0A,
0x181702A4,0x90120321,0x01951B02,0x01089993,0x87938704,0x94959790,0x181F1C1E,0x1E91018B,
0xA6939709,0x88000E91,0x85058494,0x211C9590,0x9194211D,0xA3160992,0x12A1A2A0,0x81820710,
0x8B00091A,0x18202208,0x90A0A194,0xA5A39910,0x1A1B1593,0x1A201086,0x0B848F14,0xA4A1171D,
0x8A0F9AA6,0x168D9B99,0x18102122,0x8D081B22,0x05819D97,0x96A8A5A0,0x98081408,0x2A231B16,
0x10141511,0xA6A4A385,0x9B908EA2,0x20138EA1,0x20211C23,0x8B051B1D,0xAAA49B8E,0x9296A2AC,
0x2010120D,0x20222327,0x9D0D1317,0xA0A8A3A4,0x98A2A4A0,0x2B211915,0x14202127,0x98811181,
0xA4ABA9A2,0x878F9A9F,0x2828200A,0x24252121,0xABAA9F11,0xA6A29FA0,0x251299A7,0x2124292B,
0x9B0A2221,0xA79DA5A1,0x05A0A2AB,0x1F222520,0x1B1D1121,0xA3A49481,0x88929EA1,0x11180D90,
0x0B84121E,0x95040500,0x0282919B,0x93968A8C,0x93071317,0x1B091586,0x87899108,0x9F9F9A0C,
0x108A8799,0x22171317,0x800E0F20,0xA7A49985,0x0190A7AF,0x29252316,0x16212629,0xABA6A100,
0x96A9ABB1,0x20211512,0x282E302A,0xA4A2980F,0xA8AAABA7,0x1F1E05A2,0x30292120,0xA2A08D24,
0xA69A8698,0x180EA0A8,0x110B1016,0x93082018,0x1119858B,0x96A5A09A,0x9C88110B,0x111D1183,
0x13061203,0x9E98041B,0x9984909A,0x17949DA2,0x1B1D2322,0x95811720,0xA2A5A4A0,0x0A929398,
0x1A2B2712,0x09100717,0xABAC9881,0x8E9699A5,0x2B281510,0x11182129,0xB4A70C8B,0x0196ADB0,
0x29130008,0x19242A2D,0xA68E130D,0xA5A9AFAE,0x11990186,0x272F2821,0x8B0E161E,0xACAAA7A5,
0x819B9F9B,0x27212312,0x8A181A29,0x9E9B999F,0x969AA4A4,0x19202104,0x060B1F22,0x9595968F,
0x9BA4A495,0x1B222103,0x0B161520,0x939B9396,0x99A1A499,0x1C1F1E0B,0x12101521,0x96988E8A,
0x9792979B,0x20009285,0x18141614,0x97880317,0x92998900,0x0C8C929E,0x8C15840E,0x20801103,
0x8E150913,0x929B8302,0x9F98A3A1,0x2816858D,0x101C2923,0x950A8F11,0xA4ACABA8,0x21129898,
0x24222A24,0x931F1A1F,0xB0B3A89D,0x1B0C97AE,0x2B252728,0x8A142027,0xB3ADAC98,0x1C09A1B2,
0x2B282729,0x0A122724,0xB1ADAB9A,0x189AA8AE,0x252B2923,0x10262829,0xAFB2A595,0x04A1ACAE,
0x292C2220,0x122A2A28,0xAEAF9B94,0x939CAEAB,0x2D15150E,0x23292121,0xA29E9818,0xA7979FAB,
0x06928A9B,0x211A2722,0x90980D2E,0x8897A1A3,0x969EA785,0x23191596,0x9320261D,0x10810A09,
0xAEB0A382,0x22199DA3,0x1E272D21,0x10120A1F,0xAEABA198,0x110AB0B3,0x2C272D20,0x111C2B2D,
0xB6AF9B10,0x85A6B6B9,0x3430231C,0x182D322F,0xB1A79C04,0xA6B7B9B7,0x2A302785,0x34343131,
0xACA9A521,0xB4B6B6B5,0x262911A7,0x322E3332,0xABA01D2D,0xA2B0B4A5,0x1B91ACAD,0x26302917,
0x911D302E,0xA8AD9695,0xA3A8AA98,0x291E8EA7,0x2B302F2B,0xA1908022,0xB0AAA3A5,0x08A4AFB3,
0x353B332B,0x8C02272F,0xB6B3A494,0x8BB0B8B5,0x3734311E,0x16303036,0xB1A9A1A1,0xB2B7B7B6,
0x342A228E,0x30343A39,0xADA49E1D,0xB7B7B7B3,0x302301B2,0x302A3336,0x9A062732,0xB2B0ADAA,
0x0CA9B4B3,0x31251E23,0x303A372D,0xB6A9A015,0xB3B3B1B5,0x2D1298AF,0x3E36323A,0xAE9B2133,
0xB3B0B6B6,0x92A0B0B5,0x32343B2A,0x05303235,0xB1B8B5A7,0xA7B4AFAB,0x3C351892,0x262D3034,
0xB1AD9C14,0xAB99AEB3,0x2F84A4AE,0x172B3437,0x91172922,0xACAEA6A3,0xA4AEB1AE,0x2E33311D,
0x302B2F27,0xAEB2A824,0xB3B3B3B0,0x313005AD,0x35363229,0xA7930B34,0xB8B7B3B3,0x159AA6B5,
0x38333430,0x11303134,0xB8B6B5AB,0xA4AEB1B5,0x352E2B13,0x24383332,0xB1AFA182,0xA4A9B1B5,
0x201D9399,0x28333424,0xAC922225,0xA6B2AAA8,0x108BA3A1,0x2F301B02,0x0417272E,0xA9A5A29A,
0xA49BA1A5,0x2F08009F,0x2025242C,0xA0A00D23,0x9A85A6AC,0x0A9EB0AB,0x22303320,0x80232121,
0x98B1ACA2,0xA2A9A591,0x33371E96,0x98132126,0xA8A88C80,0xA0999BA7,0x3092A59A,0x08223135,
0x94058782,0xA1A8ABA8,0x1397A2A2,0x2130372B,0xA0898E13,0xA9B2AB9E,0x07959891,0x35352E19,
0x8A979025,0xB0A7A395,0x9488A0B1,0x322B1290,0x941D3134,0xAEA69790,0x9FAEB2B3,0x2A131182,
0x28323737,0x9C97A386,0xAEB7B7AB,0x8A9381A2,0x393A321A,0x1915032D,0xB9B29D12,0xA3A5B1B5,
0x322495A0,0x21313735,0x9F192424,0xB1B8B5B1,0x90A7AEAC,0x3233311E,0x282D2E30,0xAFB1A712,
0xA9AEB2B0,0x292703AA,0x302B252B,0xA901202F,0xACA0A2AF,0x15A6A5A6,0x12141D25,0x161B2217,
0x8199A5A0,0x99000809,0x110D220C,0x918C940E,0xA1A1A39C,0x20221198,0x24211D1D,0x9D122119,
0xB1AE9A03,0x95A3A4A8,0x2C1E8301,0x2F292D26,0xA3071927,0xA9B4AFA9,0x99A1A7A8,0x302A2001,
0x232F332E,0xAA9E0E20,0xB0B1A9A7,0x049AA3A6,0x2E28191A,0x222C2131,0xA09C0D18,0xA3A7ACAA,
0x8D9EA3AD,0x1726248B,0x1E20272A,0x9D8A1B17,0x9A9EA49A,0x90A6A894,0x05159014,0x26171802,
0x1D101513,0xA4091A1B,0xA68388A4,0x9AA89DA3,0x198A0C86,0x2B29272A,0x04129020,0xABA39D81,
0xA0A19EB2,0x21849293,0x20242229,0x0C262926,0x90A4989E,0xA5ADB0A5,0x94859298,0x2A2F2111,
0x2624232D,0xB2A41D1C,0xA8ACABA6,0x17A4AAA7,0x2B2A1511,0x2A2E3421,0xA8939624,0xB1B09AA2,
0x9F97AAAD,0x331D2108,0x19312331,0x8C811B19,0xB0AAA1A5,0x8AABA9A8,0x1C270112,0x2A232523,
0x8212231F,0xA1AAA38C,0xA18B9DA3,0x1C079882,0x1F212092,0x0B232325,0x9B978493,0x87A79983,
0xA2969298,0x0F139193,0x20151D14,0x1E071E24,0xA202970A,0xA4A8A4A5,0x098D99A2,0x25231B13,
0x2132281D,0x92A11620,0xA9ADAEA5,0x0A93A1A1,0x1E231706,0x22232921,0xA21B011F,0xA9ABA3A3,
0x909C95A5,0x24041B15,0x292C2028,0x90940710,0x99A3A19B,0x9997A191,0x261B929A,0x0C242413,
0x888E090C,0x8F969903,0x80819B8C,0x82178B8F,0x1A05040B,0x03841280,0x92080682,0x9E9796A2,
0x14941308,0x8F1F9283,0x840A0993,0x8D071A18,0x02968E07,0x92819118,0x10980C97,0x20049002,
0x0B058316,0x160C058E,0x96028A88,0xA095A191,0x211A8394,0x10121012,0x05172315,0x81081818,
0x979EA2A0,0x0907959D,0x810C1702,0x16162116,0xA10D8080,0x96929698,0x9B9D9190,0x1C919889,
0x161D1D23,0x89902007,0x0B039606,0x8FA09880,0x1510829B,0x821C1417,0x958C8511,0x021495A0,
0x968E9494,0x08190A90,0x21851F0B,0x8C009794,0x87141487,0xA3939290,0x100F170D,0x15180B22,
0x07850B92,0x9902088D,0x94A19B97,0x81870E94,0x061D060B,0x0E0D0814,0x8D921008,0x8A8C9987,
0x0D891911,0x89920590,0x0E149012,0x93950414,0x0A800A88,0x8708811C,0x10A19CA1,0x81119597,
0x91059009,0x1C061682,0x9317120B,0x8A8E9182,0x809A8685,0x85849293,0x23279112,0x048B2092,
0x9D899592,0x9A86868F,0x91010E9E,0x821C211A,0x859B9221,0x0A929399,0xA0008791,0x20070F03,
0x200E2822,0x9E87A08A,0x8A93A49C,0x909A0386,0x1E200E14,0x0C191925,0x8BA18790,0x89899EA2,
0x83909F87,0x1D251C90,0x02801A11,0xA0A09117,0x81090594,0x9A888BA0,0x0B112115,0x140F8214,
0x889F9D0A,0xA1810A06,0x23949290,0x0E1B110B,0x89878617,0x8B8D909D,0x91928480,0x0C23158F,
0x0D11111C,0x9CA29593,0x040C838D,0x108F8E9C,0x0319141A,0x9D0E1F12,0x018FA0A3,0x93988214,
0x06221701,0x17121B8C,0xA7A59506,0x04100C8D,0x1C8C948E,0x038D061C,0x9E121D1C,0x0995A2A7,
0x8799920D,0x14201614,0x2322198E,0xA0A6A000,0x9406828D,0x1F1691A1,0x0D050A1B,0xA0831D21,
0x0696A0A2,0x8C998A83,0x021C241B,0x1C020E10,0xA2A3A488,0x94908E90,0x26180286,0x1C142021,
0xA89A8A16,0x869FA3A6,0x878C9282,0x19222015,0x1B1C2020,0xA1A9A597,0x9200A0A4,0x1B16059E,
0x24242121,0x9B030D22,0x99A3A4A5,0x91978493,0x1C1E1309,0x1C22231D,0xA3A29D8D,0x90919E9A,
0x0B8B8084,0x1D1E211C,0x9D831E21,0x00A3A9A0,0x8402978F,0x101D1A04,0x181D1910,0xA9A49105,
0x9093909C,0x22100486,0x1C080D17,0xA1111520,0x96A2A4A7,0x07138689,0x11191E10,0x20211F16,
0xAEA8920B,0x9691A3A7,0x20130996,0x211F1821,0x90142227,0xA9AAA5A2,0x939D9BA6,0x2221118B,
0x2C2A2422,0xA7921523,0xA5A4A2A4,0x909B9FA6,0x22151706,0x22282A28,0xA09B8C18,0xA4A09FA0,
0x87A09FA0,0x251B0708,0x031D2326,0x0C089102,0x969B8B90,0x918AA1A1,0x111A1988,0x908F8911,
0x1513100B,0x8A8E011B,0x0499898D,0x9D8A0312,0x9295A5A8,0x23211C84,0x171D2124,0x030A1314,
0xAEA8A08B,0x99A6A8AE,0x23201685,0x292A2C29,0x12161D28,0xB1B2AB95,0xA0A7AFB2,0x251A0596,
0x30312C2D,0x0B1D2730,0xAFADACA3,0xA9ABAFB3,0x24168AA3,0x32312E30,0x96162B31,0xA79F9E9E,
0xA7AFB0AD,0x1A878DA4,0x282E2C27,0x810B1716,0xA101010D,0x99A09EA0,0x1086938F,0x979C1419,
0x150B869B,0x1A10091B,0x0823211E,0x96128304,0xACB3B0AE,0x889293A1,0x33312C17,0x1E262B33,
0xB3AC9D1A,0xAAB1B1B3,0x2190A4A8,0x2D2F3027,0x0A263430,0xAEB1A88B,0xA2ABADA2,0x210A949A,
0x2D281C20,0x98002124,0x990B04A0,0xA3A2A4A0,0x0B141D0E,0x1A202324,0xA0AAA8A0,0x949A9591,
0x2B292488,0x23241B26,0xB0A99C18,0xAAA5A8AD,0x301892A7,0x30302F30,0xA21F302E,0xB5B3B4AE,
0x9DAFB2B4,0x31312F1D,0x32343534,0xB2ADA50E,0xB5B6B5B2,0x272282AD,0x36363330,0x93132733,
0xB6B3B0A8,0xA5ADB1B4,0x2F272001,0x2C303231,0xA69A8921,0xAAAEAEAC,0x201387A2,0x22212728,
0x9C091821,0x98A2A4A1,0x899197A1,0x1D1B1B13,0x04091512,0x98929D8A,0x099B9B97,0x1A1A8215,
0x03202511,0x9B959CA1,0x109B9E98,0x821C1914,0x16122420,0x9F829292,0x9CA9A99F,0x8A8583A1,
0x2E241920,0x1C1F1A20,0xA4910820,0xA1A7A8B1,0x039AA79A,0x19262D1B,0x29342B24,0xA2AC9A06,
0xB2AAA4A2,0x1F0C9CAC,0x2F221013,0x86172A35,0xA5939398,0x97A9B1B0,0x10890905,0x27343423,
0x89008611,0xB1B0A795,0x8F0C96A6,0x31210E91,0x8E112831,0xA7980713,0x8BA3AFB1,0x0C9C9A08,
0x212F3428,0x83140009,0xA9B3AC9A,0x9D8A95A1,0x352E1894,0x071A2530,0xAEA0801D,0x9DA5ADB3,
0x1A97A18B,0x252D3428,0x071D0F20,0xACB2ABA2,0x9C92A0A5,0x332D218B,0x0B14212C,0xADA69115,
0x9FA2A8B1,0x260C9393,0x242B3432,0x94038017,0xAFB3B1A9,0x9492A0AA,0x35322512,0x101F2A32,
0xB0AA9F09,0xA3ADB0B3,0x2410989B,0x2D323630,0x9C0D1624,0xB0B2B0A9,0x9997A2AE,0x332D2314,
0x16202B31,0xAAA39714,0xA2ADB2B2,0x1E028C92,0x2C33332A,0x8C86801D,0xB2B2A89F,0x8484A0AA,
0x3329188C,0x09202B34,0xA9A18300,0xA0A7B3B3,0x168D858A,0x2A333024,0x02011221,0xB3AEA69D,
0x8799A3A8,0x30240D91,0x1C252E32,0xA4901211,0xA6AEB3AE,0x8494889A,0x3031271C,0x13122127,
0xB2A8A005,0x92A3A8B0,0x23129599,0x2529312F,0x8F18171F,0xA9AEABA0,0x999CA1A8,0x312C1B85,
0x1526282F,0xAAA28C0D,0xA8A8ACAF,0x099A9FA3,0x2D312E23,0x191D252A,0xAFADA38E,0x9FA4A8AA,
0x251A0198,0x28292A29,0x980B1F23,0xAAACACA6,0x9AA3A5A7,0x251F118F,0x262B292A,0xA0910214,
0xA9A8A6A0,0x809399A6,0x27241E18,0x19212929,0xA3978F0F,0xA4A9AAA9,0x098C989E,0x23252317,
0x121A2324,0xA3A29704,0x9A9CA0A4,0x1B029093,0x20222320,0x02151921,0x99A1A095,0x9A9B9A96,
0x0A0A8496,0x17161411,0x86000611,0x9294938B,0x8891928F,0x06050502,0x0B12130D,0x0D080409,
0x91939487,0x978A8587,0x098A909B,0x130F0D13,0x04111617,0x868D928C,0x969B9B92,0x0505018F,
0x1A1A110D,0x80060F15,0x9B958F89,0x8B929BA0,0x13068080,0x13181E1D,0x830D0B0F,0x9DA09D96,
0x93949C9C,0x1C150D88,0x1114181C,0x92801012,0x9B989999,0x82959BA0,0x17100B0E,0x151B201D,
0x89820811,0xA09E9D96,0x9094999E,0x1E120788,0x14131620,0x90031316,0x9A969A9B,0x88949796,
0x12120D06,0x15131816,0x928E8010,0x94939394,0x0F818C90,0x10008608,0x040E1517,0x80058884,
0x91959290,0x85828484,0x130A0485,0x0383830C,0x8F860307,0x84858D94,0x81908D82,0x83050304,
0x05040581,0x90919101,0x95908487,0x02028290,0x15120705,0x10060510,0x82890513,0x918F8981,
0x8904068A,0x05080681,0x0E038683,0x85000C0E,0x86848482,0x80048B90,0x060A0789,0x03060402,
0x96978D82,0x8D840888,0x0C0D0D02,0x090F0603,0x9190958A,0x938B9298,0x06868990,0x190B0610,
0x09110616,0x93910182,0x9496958E,0x068B9293,0x161B1911,0x110E1A1E,0x96929388,0x858D9796,
0x01858592,0x161A0B0C,0x01131E0E,0x98988E0B,0x90A09C95,0x05059192,0x1D131210,0x021D1415,
0x97998388,0x979F9D9B,0x02919480,0x1710078A,0x1C19131F,0xA2920181,0x9A9E9E9B,0x03938995,
0x191A030E,0x140B1A17,0x90080015,0x9B960595,0x8A8F9693,0x20048200,0x1519141A,0x96008209,
0xA3958F9E,0x858E0795,0x14098707,0x1B0D0515,0x810F0810,0x9890908B,0x97929298,0x108A9090,
0x0E128606,0x81038686,0x83880383,0x92980D14,0x04069387,0x1B0E8490,0x01130003,0x93920807,
0x92958602,0x03808992,0x10129392,0x110A130D,0x83890E14,0x8696930E,0x06869C96,0x10110684,
0x03140B02,0x928B1007,0x9F958487,0x86929997,0x19138F91,0x0F1B1705,0x04021216,0x90968902,
0x90A1A191,0x12999B82,0x07128C84,0x0914150C,0x8B8D0E06,0x0E869506,0x0102018C,0x00119006,
0x9108089A,0x01120A8B,0x8D9A0211,0x91150389,0x98881B86,0x97028294,0x02858589,0x02171887,
0x02060C15,0x99060592,0x8F928492,0x9C958B90,0x05918380,0x050B0A80,0x8C031715,0x00001208,
0x09828A82,0x94038189,0x8D958301,0x0A8A0600,0x89028211,0x030A2200,0x8F919A83,0xA0988304,
0x8B900E8C,0x111D0387,0x85171E11,0x8C010A85,0x99989094,0x8E939490,0x00050980,0x02111E12,
0x86910D1F,0x9994908E,0x91939095,0x100C0E04,0x11131518,0x9101210E,0x9796930C,0x91919299,
0x0F810680,0x0E1D1207,0x92050F08,0x94988484,0x92919793,0x09878791,0x120E1615,0x1407111B,
0x9893800F,0x95A29490,0x8690998F,0x0C171702,0x121B180E,0x88051011,0x989D9487,0x909D9A91,
0x8A01888E,0x15151B13,0x0F151F20,0x95888902,0x919A9A9A,0x06919885,0x120B858B,0x15151516,
0x00870D14,0xA09B8F80,0x8994939A,0x08160389,0x08080C86,0x0B021315,0x8B8E880C,0x8A91868A,
0x0D089990,0x01140499,0x00820B11,0x8C8B0180,0x8D898202,0x85858E8B,0x9283008A,0x82000800,
0x12121206,0x8F810512,0x81009391,0x8C939192,0x13909384,0x04068309,0x03030E11,0x9108018E,
0x98968C86,0x92050094,0x0B121901,0x020E1213,0x84808A00,0x898B9091,0x86889292,0x81051106,
0x12060207,0x92890106,0x99958B85,0x038D8490,0x11140202,0x12120F0C,0x87088304,0x91918A8F,
0x888C9193,0x850D0786,0x0D070A87,0x0B810713,0x91929487,0x8B928A8D,0x09828103,0x12171208,
0x0F0C090A,0x908E8802,0x94949490,0x82858C98,0x080C1310,0x150D1814,0x87880417,0x8F919B98,
0x968F8992,0x14058792,0x151C1713,0x09100F0F,0x95969384,0x96969597,0x85868B92,0x16121503,
0x18161218,0x918C8310,0x9F9C999A,0x9090919A,0x1A151202,0x13181C16,0x8D880913,0x9B9F9887,
0x92979695,0x0D10058B,0x211A1013,0x11181619,0x9E939002,0x9F9E9FA0,0x0401929E,0x1D16150E,
0x18171F21,0x98968A09,0x9A99A0A0,0x01959596,0x1E150D0F,0x00171E1B,0x8F090804,0x9A9C9B99,
0x9391989A,0x04040301,0x1F201B11,0x090F0715,0x97939588,0x95A09A9C,0x0A07858F,0x1C121311,
0x040D171C,0x96938E86,0x8F90959B,0x8D91868F,0x010F1314,0x0114180F,0x00110B07,0x96918C8C,
0x8C969B96,0x0A048C8F,0x2211820C,0x17140D19,0x97938804,0x9C9C9094,0x8C948593,0x050F0E02,
0x07111710,0x0710130E,0x8981030B,0x93909A95,0x87929F98,0x1A019691,0x201C191E,0x91061019,
0x9F96888F,0x9A999CA1,0x10090C8E,0x16141111,0x06121614,0x8E929484,0x84949894,0x00959B87,
0x00021012,0x121A120B,0x00130609,0xA2A0929A,0x9F829399,0x221702A0,0x181D1C1E,0x83070E13,
0x9EA19794,0x8A9CA09E,0x10940E18,0x08131E22,0x938C820C,0x88951108,0x8F01A198,0x08818E92,
0x0C158E96,0x1C110B0D,0x0C0C181D,0x99840009,0xA1A49C99,0x989099A0,0x1D11148F,0x192A221E,
0x8212170B,0x97A4A49D,0x9292948C,0x8090140F,0x19100111,0x8C852022,0x98938008,0x818E9392,
0x8B969D98,0x17869480,0x1F1C0E05,0x200A811A,0x00868A10,0x9C93958E,0x8792929C,0x110F938C,
0x9B881280,0x191597A0,0x17151211,0x09151711,0x9D9F9507,0x0D02A2A2,0x00040207,0x1A1F0293,
0x82161311,0x86010791,0x95939584,0x92919D9E,0x8A820D8C,0x191E0596,0x19201B14,0x0D18150B,
0x9D9A9A92,0x819EA3A0,0x89018185,0x16148686,0x14130912,0x01141303,0x9C968F8E,0x0E91939C,
0x9998970C,0x0F051184,0x191D110E,0x201A191A,0xA19A9414,0x90849FA2,0x9499A0A5,0x19068C02,
0x1A262216,0x0D1E2116,0xA5A39600,0x998994A0,0x92A19199,0x100E0713,0x1414231F,0x0D121819,
0xA3A39F00,0x1B0A939E,0x8C9AA002,0x0D109289,0x150F0184,0x18210781,0x9F9A8010,0x84151390,
0x9C918984,0x9085919B,0x83070396,0x20241706,0x90840C0E,0x8612018D,0xA0871692,0x87959699,
0x95899594,0x1715250A,0x01171B21,0x938B0E05,0x8F959C96,0x8297A5A1,0x1285880B,0x04202218,
0x0E10201B,0x9C940004,0xA3A49E9B,0x88040298,0x21128592,0x12111B22,0x1092040D,0x8B908019,
0x98A49F8F,0x95989B99,0x15131B0C,0x1E231511,0x170F8787,0x1C979E12,0x999DA293,0x8695A09F,
0x1F039B96,0x1429291C,0x141A150F,0x03118590,0xA2A0A3A0,0x908B9A9F,0x150A939C,0x1E221414,
0x11171D19,0x9989131A,0xA9938998,0x949F8CA0,0x00029193,0x11101712,0x26221E1A,0x90939015,
0xA2A38F07,0x85A2A195,0x0983938A,0x14020D20,0x13161610,0x12178F03,0x969B9890,0x07859995,
0x90089AA0,0x1D0F020C,0x10090F10,0x8F128204,0x8B910C06,0x9E928489,0x91A38B90,0x88058F13,
0x18161685,0x170B070E,0x8082861D,0x9797908E,0x8D07A0A0,0x8F8080A2,0x0E17040D,0x170A1A0C,
0x82161B18,0x9C888008,0x92A7A1A3,0x0907A492,0x1E120787,0x211F1C0F,0x85161121,0x93020893,
0x9BA3A3A3,0x0B92A48A,0x11020F95,0x1F208010,0x18171016,0x87800788,0x959E9F90,0x84959C8B,
0x89880B91,0x1D208A84,0x13141010,0x95828191,0x848C8D88,0x94849094,0x808A0E81,0x0A179091,
0x0901028C,0x818D810A,0x85810308,0x00060D84,0x90928F81,0x93811788,0x958F8306,0x04818091,
0x1514120D,0x07110C14,0x95A09588,0x959A9685,0x8401868D,0x1213100C,0x0F1E1E11,0x928B000A,
0x069FA79F,0x969B9407,0x0405808C,0x1C221682,0x0E0E1D1B,0x9E93870B,0x9494989E,0x899D9A98,
0x0C13020A,0x1E21271A,0x0A16000E,0x9EA39E90,0x90969090,0x88859593,0x22140483,0x840B1321,
0x8F091300,0x02849A9A,0x94908587,0x89820689,0x19150388,0x08918E0F,0x968E0008,0x82040B8C,
0x0B868E86,0x02030801,0x850C1715,0x85899396,0x099A9682,0x05838A13,0x14150B83,0x8307010F,
0x878A8B8B,0x9B988F8C,0x84070490,0x06000203,0x0C0C0E0A,0x8003850B,0x00898E86,0x80919C94,
0x0A058880,0x16180B88,0x01080810,0x86848202,0x92949697,0x04838D91,0x060A0609,0x11121300,
0x8A02050F,0x98989389,0x89919698,0x10130F03,0x0E181B18,0x05908D0B,0x85898F86,0x9F9D9890,
0x060A0393,0x16161384,0x13131219,0x97958110,0x9D999499,0x10038F98,0x0F0B040A,0x01091D17,
0x958D8681,0x0D079092,0x9795928A,0x00070690,0x11131111,0x02868B84,0x908D0106,0x95830382,
0x02888C98,0x1710040E,0x02091117,0x90810285,0x91949695,0x9190888B,0x141B1905,0x12100407,
0x919B9104,0x9D928888,0x0A0D0197,0x0D8C948D,0x1310191A,0x8B131213,0x8E92999A,0x949C9D98,
0x828D9089,0x22242213,0x07141821,0xA09E9990,0xA1A1989A,0x10078693,0x22211205,0x1817181C,
0xA297840F,0x9E9D9AA0,0x04959D9F,0x211C120F,0x1921211E,0x85830111,0xA5A19D98,0x8E909BA3,
0x1D100384,0x2020191C,0x880B171B,0x9F939797,0x99979EA1,0x0C018694,0x1A1C211C,0x878B0E1B,
0x8B91998F,0x8C999D98,0x12088282,0x101C221A,0x8E86090E,0x95989894,0x95999595,0x10090887,
0x1D232118,0x8F8C0A14,0x9B9C9E99,0x979B9997,0x05090A87,0x20222115,0x8A0C0E17,0x979E9F96,
0xA09C9392,0x0B170599,0x1C201800,0x04870E1D,0x9C96080D,0x988D969C,0x1380939A,0x151A0100,
0x0F151B15,0x9E8A0606,0x99969498,0x1092949A,0x210C8D15,0x0F1A1213,0x900E0382,0x9187919D,
0x94969899,0x0B941011,0x1A121421,0x15118610,0x8B8FA195,0x9A969996,0x9911149A,0x15152211,
0x1288111B,0x829EA00D,0x8C989981,0x0C189A9D,0x0D24169B,0x9509180F,0x99952013,0x9B950084,
0x149DA196,0x2102A205,0x1B221610,0x98201A03,0xA08F8699,0x9EA296A0,0x12A08115,0x1D181223,
0x1E168914,0x81829998,0xA4939897,0xA286119F,0x14122003,0x16021F1F,0x8096951F,0x95A19C82,
0x0310A2A3,0x14230BA1,0x041E2017,0x98971D15,0xA29C8A8C,0x10A2A191,0x2310A103,0x1C201B17,
0x921F1081,0x9D8C8C96,0xA0A39AA4,0x0F9F0816,0x20191422,0x2017021D,0x88879697,0xA599A198,
0xA0840EA2,0x19142209,0x18052022,0x89989221,0x96A3A08C,0x020CA4A4,0x0E24149D,0x00202416,
0x95902118,0xA39E8A87,0x079FA295,0x200DA293,0x21221714,0x9621200F,0xA0878395,0xA3AAA2A6,
0x159B030F,0x221C1624,0x1F1F0B1D,0x8F949F9A,0xA495A2A1,0x9C001A9A,0x16081E10,0x1F801621,
0x03919321,0x949B9B85,0x9381A3A7,0x1024189D,0x101A1D11,0x96941C20,0xA3A2898B,0x1693A699,
0x21149A91,0x13211D18,0x98152008,0xA2938393,0x94A59D9E,0x1B948D0B,0x17171924,0x1A1F0207,
0x84819495,0xA59D9EA0,0x9D91138F,0x1F191F0D,0x2006121F,0x9097901E,0xA09DA091,0x8B0796A6,
0x15231F8C,0x81831D1E,0x96961720,0x95A08B03,0x0D8CA9A0,0x1D159B97,0x16211D13,0x9414271A,
0xA19A9591,0x8FA8A4A2,0x26949912,0x1C201624,0x0A22160D,0x94919FA0,0xA3A2A0A2,0x8A91110C,
0x1707201F,0x20121621,0x84989F17,0xA29DA3A0,0x898E8B9D,0x14222304,0x1316201F,0x93A2821D,
0xA1A19982,0x0E009BA2,0x181B0085,0x11211F13,0x96081F0E,0xA5A3928B,0x92A29A9D,0x230F0310,
0x24230F18,0x99170805,0xA18D809E,0xA2A096A2,0x09961210,0x27140A21,0x1C1A8D18,0x9885938C,
0xA8929CA5,0x8E0F1CA0,0x20122118,0x06850F25,0x8F958906,0x9191A095,0x0D1B91A5,0x15131286,
0x840F1721,0x91021388,0x969D9788,0x1092A19B,0x18138C83,0x191A1F1C,0x961B108E,0x9DA39796,
0x929E9D9A,0x20020915,0x1B1C1B1D,0x0E159701,0x9994959B,0x9A91949A,0x0C011701,0x1814181C,
0x1B848418,0x938E960F,0x9A95A0A1,0x0105839A,0x1D181F1A,0x0A86111A,0x909C9716,0x9194A1A0,
0x1212949A,0x13132416,0x8809101E,0x009C8208,0x9497A28F,0x08069296,0x88181F8A,0x84850F1B,
0x8D931002,0x8F999D03,0x0D869998,0x87261B8E,0x88812313,0x9D910C05,0x00A1940A,0x1B8E9C91,
0x1528830F,0x96101C9B,0x9C04078D,0x91A10E02,0x0C949307,0x24179A11,0x901D0D95,0x8F100286,
0xA3990D9B,0x82958F82,0x21858712,0x8F198C05,0x058D8795,0x9B058292,0x82900982,0x1D8D0013,
0x84148F0F,0x88000891,0x908A898D,0x898F9191,0x208C0614,0x051F8913,0x850A8798,0x9791058D,
0x03968705,0x12980112,0x1011A107,0x091089A2,0x91110282,0x888F200A,0x08971121,0x14919F10,
0x9792A7A0,0x8F05079D,0x89151687,0x210C251F,0x8D918524,0x969FA3A0,0x958FA19A,0x8C801095,
0x16071B19,0x1605801F,0x14118903,0x9A07038C,0x9D960688,0x968E1393,0x0D94990A,0x0C8F9C94,
0x1A1B1114,0x1B24231F,0x94951310,0xA2A8A305,0x9DA9ACA8,0x22039198,0x232A2524,0x22242D23,
0xA08D8A20,0xA7B0B0AC,0xA5A1A1A7,0x1F128A97,0x2628291F,0x120E1C2D,0x91928A00,0xA399A1A1,
0x959A9EA0,0x84090B8E,0x02001C11,0x15038612,0x15131719,0x030B1119,0x99949998,0xA3939097,
0x93A4A6A6,0x211D0C87,0x24272A2A,0x2122201E,0xB0A7A282,0xACAAACB0,0x8AA2A0A7,0x28221210,
0x2B2D3233,0x02131722,0xAFADABA1,0xA6A8A6AA,0x808F97A1,0x25201E12,0x2023252E,0x05989680,
0x98949785,0x9188939D,0x05899299,0x91939111,0x10060B84,0x21121012,0x16161320,0x03190913,
0xA7A5A3A2,0xA9A9ABAC,0x1B121D89,0x2E241D1A,0x23262530,0xA29B8816,0xB0ACB1B1,0x9BA4A3A7,
0x28251893,0x26262927,0x940A1F29,0xA0A49D99,0xA0A3A7A1,0x0F05939C,0x20241D0C,0x9C86141E,
0x03820895,0x02838B0B,0x0F0D120E,0x85018587,0xA1A5A493,0x908B93A1,0x25200F8C,0x1F212827,
0x8B122023,0xAAB0ACA0,0x9BA7A9AB,0x1B168895,0x2B272626,0x0A1B2528,0xA09FA297,0xA8ABA7A3,
0x048B99A1,0x232A2013,0x100C1C19,0x9A948A11,0x849C968D,0x1011968C,0x84121501,0x93868B90,
0x9EA09795,0x130A0F02,0x24272211,0x8B842326,0xA79EA194,0x95A1ABAB,0x87898591,0x252B2B13,
0x2312172B,0xA79B8810,0xA4A3ADAC,0x91A4A3A6,0x26222725,0x1C241017,0x989D8B0F,0x93828598,
0x0DA1A29A,0x08191122,0x0A1F1C92,0x98A1A398,0x95940A81,0x2F208C8A,0x931F1A23,0x9C8D1488,
0x9BA1A3A9,0x99A29C8A,0x2B291788,0x17202421,0xA1891825,0xA0A8A6AB,0x959FA9A2,0x10211B8A,
0x211F2518,0x96811221,0x95A09591,0x969DA5A2,0x131C1593,0x14092125,0x928A8A80,0x8F94A193,
0x92810396,0x1719210B,0x14930321,0x9E978813,0x9291A8AA,0x898A8490,0x24242E1F,0x19028B21,
0xA6A49811,0xA1029FA9,0x0C9EA1A3,0x20172A28,0x2622071D,0xA5A29D0B,0xA28A92A6,0x11868DA0,
0x23881522,0x1423171E,0x9A9D9E8D,0xA295939E,0x138B8393,0x231C2021,0x070F8F14,0xA59D918A,
0x959499A3,0x11880385,0x241C2126,0x161D0711,0xA7A7A795,0x980101A0,0x0D909099,0x21112029,
0x141D1015,0x9BA0A396,0xA49A9BA2,0x1B0A128B,0x18151D21,0x17100820,0x9F939F9B,0x9B95949B,
0x8C958F97,0x261D2622,0x09028D20,0x9F9B9C91,0x8F0B92A4,0x89918B8A,0x09052218,0x24121121,
0xA39DA006,0x8A8194A3,0x0411869F,0x04072420,0x819E821A,0x0B849008,0x9691A095,0x8E838B9E,
0x10252483,0x0A981A22,0xA1AAA112,0x2016989D,0x99899286,0x09221499,0x100E1E0F,0x949D0924,
0x9DA5A396,0x20119896,0x0C1C1512,0x030F8590,0x98081C11,0x8690120B,0x9BA4A08F,0x24039691,
0x11251A21,0x9B8C909F,0x99861A86,0x1081008D,0x87A29B0B,0x0F038411,0x1D230A88,0xA2908D84,
0x8884869F,0x83979388,0x07032221,0x1588930B,0x06819C90,0x85100188,0xA3948A97,0x100F1889,
0x1B8A1720,0x8F938023,0x0F90A8A6,0x8D0C898D,0x8A1C1C8C,0x8293038C,0x808C1E23,0x088C9210,
0x93A0A698,0x1B200592,0x931E1B0E,0x9D8A1692,0x0286008D,0x08968B12,0x869A9C02,0x20148D8A,
0x0F241D13,0xA49A8993,0x8491919B,0x06970512,0x1204101D,0x12019987,0x85110702,0x8B140D95,
0xA0A19693,0x88081909,0x17850B0D,0x1405821B,0x8288948D,0x9281908E,0x93088096,0x0D01098A,
0x85091D1A,0x07908905,0x92939106,0x10039694,0x8A078983,0x10130F8D,0x840F1507,0x94940B10,
0x92A29E91,0x190A8580,0x1C138111,0x8E088202,0x8B0D0792,0xA09C8B90,0x02828291,0x18040A0F,
0x0F0B1923,0x0486998C,0x948D9995,0x8E018896,0x020D0293,0x14192116,0x848B0D18,0x9DA09780,
0x80919E9F,0x170B0001,0x191B0F12,0x81120D08,0x9E900583,0x9AA09999,0x1084878B,0x1B141417,
0x10070E1B,0x02068F82,0x9C949493,0x908A939D,0x1611068B,0x091C231F,0x8A930411,0x949F9A88,
0x06889994,0x0C0A8187,0x1717100A,0x87111510,0x98938488,0x979C9797,0x09048188,0x160F1110,
0x0908161D,0x05808D02,0x9D989D96,0x8388929C,0x17181004,0x0D171918,0x92850803,0x979B9490,
0x90979693,0x13070083,0x1C131619,0x0F0F0419,0x9A899292,0x9A9596A0,0x01008493,0x1016180E,
0x10101A18,0x92968414,0x91979B94,0x818E9996,0x15110702,0x18161214,0x85040712,0x9A8F8E91,
0x9796949A,0x0E020387,0x10101415,0x070D1614,0x92958F06,0x8C949A95,0x04829394,0x1212150F,
0x0F0E0910,0x87040003,0x97918A91,0x91959092,0x11110186,0x02101511,0x8005120F,0x8C959000,
0x8A8D918C,0x06869392,0x11100D0C,0x1311030A,0x92810004,0x8D828A96,0x94938B8E,0x09090586,
0x090B0D07,0x860F1712,0x8C968984,0x87929281,0x07839390,0x090B0801,0x130E0C0E,0x8305800D,
0x94888B90,0x93908E96,0x0E810182,0x0E10070F,0x0513110A,0x928E8484,0x90928A89,0x83909591,
0x040E0E03,0x1105100D,0x00830614,0x8887908B,0x92919291,0x04838691,0x1406050F,0x0F120710,
0x88018585,0x948B8790,0x898E888F,0x05088083,0x030D1004,0x01021110,0x868D8802,0x888D9189,
0x00808D8E,0x04090C01,0x06010D0F,0x8885030A,0x818B8B86,0x878C8E86,0x09018083,0x11070009,
0x05090208,0x86818587,0x8C888C8D,0x86810187,0x08010080,0x080D0607,0x00050082,0x91878083,
0x8788828A,0x00898104,0x0E078106,0x02068200,0x84050600,0x8A858489,0x84870183,0x03828001,
0x05058102,0x82030282,0x85000500,0x85828285,0x85880081,0x80848201,0x04018482,0x00060082,
0x87810480,0x83840280,0x01838202,0x80818581,0x01028385,0x81030181,0x82020380,0x83810382,
0x82840302,0x81858300,0x02838783,0x03018480,0x01070281,0x80020282,0x84810000,0x85838284,
0x82868485,0x04818300,0x06068001,0x82050300,0x86010085,0x87868185,0x81868381,0x03820004,
0x08038104,0x01808003,0x80808200,0x86828486,0x86838287,0x00000500,0x05800809,0x8183010A,
0x81848884,0x80808A89,0x03060183,0x82040903,0x89830702,0x84898380,0x03878982,0x06008006,
0x00040507,0x8A010282,0x8B80808B,0x82828088,0x03800302,0x02010408,0x80058081,0x0101888C,
0x03818B87,0x82838481,0x83040481,0x01080B01,0x03818180,0x808A8D80,0x028A8A80,0x82010002,
0x02060481,0x01090500,0x01018284,0x83858A86,0x80858484,0x82830304,0x00030605,0x05050300,
0x03808500,0x00838A85,0x80868782,0x87010400,0x81050880,0x01040600,0x05818003,0x80858C82,
0x80898983,0x82000001,0x04080500,0x00080580,0x02028184,0x84898A84,0x81898782,0x81000303,
0x02060804,0x00050280,0x04828884,0x00818A85,0x81838482,0x85010700,0x83040901,0x82020381,
0x05828583,0x03818781,0x00808500,0x85000381,0x82040400,0x82030385,0x80808382,0x01020083,
0x01018180,0x85850101,0x83828000,0x00828182,0x80030200,0x01050400,0x82000083,0x83868480,
0x80828181,0x00000001,0x00820405,0x80000102,0x00818200,0x82008183,0x01818382,0x04018281,
0x05038200,0x01008002,0x84800080,0x83828182,0x83820083,0x81030280,0x04010300,0x81018000,
0x82808282,0x83818085,0x80828000,0x05828002,0x00808003,0x82800102,0x84820181,0x83810080,
0x01020081,0x04028082,0x02808301,0x03818201,0x82808080,0x82818080,0x00810281,0x81800003,
0x80800080,0x80000181,0x82000100,0x00808182,0x03018383,0x02018200,0x80818000,0x81820001,
0x82810001,0x82810180,0x81000180,0x02000000,0x00008180,0x00008100,0x01008181,0x00018080,
0x01818180,0x00008180,0x00000000,0x82810000,0x82800181,0x00020080,0x80008082,0x00808181,
0x01808000,0x80818001,0x80818000,0x81010180,0x80000080,0x80808181,0x00008000,0x00008080,
0x00818100,0x80818001,0x80808000,0x80808080,0x81800080,0x01000080,0x01018180,0x00008180,
0x81808081,0x80800081,0x80800000,0x80000000,0x00010080,0x80808080,0x81818000,0x80808000,
0x80000080,0x80010000,0x00010080,0x00008080,0x80808080,0x80800000,0x80800000,0x80000000,
0x00000080,0x00008080,0x00818100,0x80808080,0x80000000,0x80800000,0x80000000,0x00008000,
0x00808080,0x00808000,0x00008080,0x80000080,0x80000000,0x00000080,0x00808080,0x00808000,
0x00008000,0x80800000,0x00000000,0x00000000,0x00808000,0x00800000,0x00000000,0x00000000,
0x00000000,
};
| 89.611842 | 89 | 0.88865 |
97d22cfa4d2c779f4392e9567e15715f18ec83b1 | 2,136 | cpp | C++ | user_models/src/coding/galois.cpp | uclanrl/dt-icansim | 3d4288145abe4cafbbd75af2b0bc697c0bebe4e8 | [
"bzip2-1.0.6"
] | null | null | null | user_models/src/coding/galois.cpp | uclanrl/dt-icansim | 3d4288145abe4cafbbd75af2b0bc697c0bebe4e8 | [
"bzip2-1.0.6"
] | null | null | null | user_models/src/coding/galois.cpp | uclanrl/dt-icansim | 3d4288145abe4cafbbd75af2b0bc697c0bebe4e8 | [
"bzip2-1.0.6"
] | null | null | null | /*
* Copyright (c) 2006-2013, University of California, Los Angeles
* Coded by Joe Yeh/Uichin Lee
* Modified and extended by Seunghoon Lee/Sung Chul Choi
* 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 University of California, Los Angeles 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 "galois.h"
/*
unsigned char Galois::Mul(unsigned char a, unsigned char b, int ff)
{
if( a == 0 || b == 0 )
return 0;
else
//return ALog[(Log[a]+Log[b])%(GF-1)]; w/o optimization
return ALog[Log[a]+Log[b]];
}
unsigned char Galois::Div(unsigned char a, unsigned char b, int ff)
{
if( a == 0 || b == 0 )
return 0;
else
//return ALog[(Log[a]-Log[b]+GF-1)%(GF-1)]; w/o optimization
return ALog[Log[a]-Log[b]+GF-1];
}
*/
| 49.674419 | 188 | 0.740637 |
97d2306696381fd1499a05a90e0469bdcb40987b | 1,978 | cpp | C++ | CPP/WebDev/bbws/WebFramework/Items/Request.cpp | michaelg29/Programming | 2544a742393c6d94e93879f70246ce17d0997011 | [
"MIT"
] | 2 | 2021-04-05T20:44:54.000Z | 2022-01-13T05:25:11.000Z | CPP/WebDev/bbws/WebFramework/Items/Request.cpp | michaelg29/Programming | 2544a742393c6d94e93879f70246ce17d0997011 | [
"MIT"
] | 12 | 2020-02-17T05:19:01.000Z | 2022-03-17T14:56:38.000Z | CPP/WebDev/bbws/WebFramework/Items/Request.cpp | michaelg29/Programming | 2544a742393c6d94e93879f70246ce17d0997011 | [
"MIT"
] | 1 | 2022-01-25T16:48:21.000Z | 2022-01-25T16:48:21.000Z | #include "Request.h"
#include <istream>
#include <sstream>
#include <fstream>
#include <vector>
#include <iterator>
std::string Request::parse() {
std::istringstream iss(m_request);
std::vector<std::string> parsed((std::istream_iterator<std::string>(iss)), std::istream_iterator<std::string>());
method = Global::stoMethod[parsed[0]];
route = Global::getFilePath(parsed[1]);
protocol = parsed[3];
host = parsed[7];
std::string params = parsed[parsed.size() - 1];
if (params.find('=') < params.length() && params.find('=') > -1) {
std::string key = "", val = "";
bool addingToKey = true;
for (std::string::size_type i = 0; i < params.size(); ++i) {
char c = params[i];
if (c == '=') {
addingToKey = false;
continue;
}
else if (c == '&' || i == params.size() - 1) {
addingToKey = true;
data[key] = val + c;
key = "";
val = "";
continue;
}
if (addingToKey)
key += c;
else
val += c;
}
}
int code = 404;
std::string content = "";
// Read file
// Open the document in the local file system
std::ifstream f(route);
// Check if it opened and if it did, grab the entire contents
if (f.good())
{
std::string str((std::istreambuf_iterator<char>(f)), std::istreambuf_iterator<char>());
for (std::pair<std::string, std::string> pair : sendingClient.context) {
std::replace_all(str, "{{ " + pair.first + " }}", pair.second);
}
content = str;
code = 200;
if (route == Global::contextRoute + "/" + Global::errorFile)
code = 404;
}
f.close();
return sendBack(code, content);
}
std::string Request::sendBack(int code, std::string content) {
// write the document back to the client
std::ostringstream oss;
oss << "HTTP/1.1 " << code << " OK\r\n";
oss << "Cache-Control: no-cache, private\r\n";
oss << "Content-Type: text/html\r\n";
oss << "Content-Length: " << content.size() << "\r\n";
oss << "\r\n";
oss << content;
std::string output = oss.str();
return output;
} | 23.270588 | 114 | 0.602629 |
97d25f3120d7c58bf0ce3edfff4aea1bb1ae8ec7 | 501 | cpp | C++ | common/tests/StringToIntMapTest.cpp | alexandru-andronache/adventofcode | ee41d82bae8b705818fda5bd43e9962bb0686fec | [
"Apache-2.0"
] | 3 | 2021-07-01T14:31:06.000Z | 2022-03-29T20:41:21.000Z | common/tests/StringToIntMapTest.cpp | alexandru-andronache/adventofcode | ee41d82bae8b705818fda5bd43e9962bb0686fec | [
"Apache-2.0"
] | null | null | null | common/tests/StringToIntMapTest.cpp | alexandru-andronache/adventofcode | ee41d82bae8b705818fda5bd43e9962bb0686fec | [
"Apache-2.0"
] | null | null | null | #include "StringToIntMapTest.h"
#include <StringToIntMap.h>
using namespace stringtointmap;
TEST_F(StringToIntMapTest, add_string_test_get_index)
{
StringToIntMap t;
t.addString("aaa");
t.addString("bbb");
ASSERT_EQ(t.getIndex("aaa"), 0);
ASSERT_EQ(t.getIndex("ccc"), -1);
}
TEST_F(StringToIntMapTest, add_string_test_get_string)
{
StringToIntMap t;
t.addString("aaa");
t.addString("bbb");
ASSERT_EQ(t.getString(1), "bbb");
ASSERT_EQ(t.getString(2), "");
} | 20.875 | 54 | 0.686627 |
97d327047291fe0f38d38e90a1c8411abf3f7bd4 | 105,063 | cc | C++ | frontend/src/frontend.cc | robert-mijakovic/readex-ptf | 5514b0545721ef27de0426a7fa0116d2e0bb5eef | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | frontend/src/frontend.cc | robert-mijakovic/readex-ptf | 5514b0545721ef27de0426a7fa0116d2e0bb5eef | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | frontend/src/frontend.cc | robert-mijakovic/readex-ptf | 5514b0545721ef27de0426a7fa0116d2e0bb5eef | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | /**
@file frontend.cc
@ingroup Frontend
@brief Front-end agent
@author Karl Fuerlinger
@verbatim
Revision: $Revision$
Revision date: $Date$
Committed by: $Author$
This file is part of the Periscope Tuning Framework.
See http://www.lrr.in.tum.de/periscope for details.
Copyright (c) 2005-2014, Technische Universitaet Muenchen, Germany
See the COPYING file in the base directory of the package for details.
@endverbatim
*/
#include <string>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include "config.h"
#include "psc_config.h"
#include "stringutil.h"
#include "timing.h"
#include "frontend.h"
#define PSC_AUTOTUNE_GLOBALS
#include "IPlugin.h"
#include "autotune_services.h"
#include "frontend_accl_handler.h"
#include "frontend_statemachine.h"
#include <ctime>
#include <cmath>
#include <map>
#include "MetaProperty.h"
#include "PropertyID.h"
#include "application.h"
#include "global.h"
#include "selective_debug.h"
#include "TuningParameter.h"
#include <boost/lexical_cast.hpp>
using namespace std;
using namespace frontend_statemachine;
extern IPlugin* plugin;
extern bool search_done;
bool restart_requested_for_no_tuning;
int agent_pid = -1;
int application_pid;
char user_specified_environment[ 5000 ] = "\0";
PeriscopeFrontend::PeriscopeFrontend( ACE_Reactor* r ) :
PeriscopeAgent( r ),
plugin_context( new DriverContext() ),
fe_context( new DriverContext() ),
frontend_pool_set( new ScenarioPoolSet() ) {
automatic_mode = true;
need_restart = false;
shutdown_allowed = true;
interval = 0;
quit_fe = false;
badRegionsRemoved = false;
allRegionsCommented = false;
ACE_Event_Handler::reactor( r );
RequiredRegions.erase();
requiredRegionsListLastRun.clear();
timer_action = STARTUP;
*masteragent_cmd_string = 0;
*app_name_string = 0;
*app_cmd_line_string = 0;
*master_host_string = 0;
outfilename_string = " ";
*psc_reg_host = 0;
psc_reg_port = 0;
ompnumthreads_val = 1;
iter_count = 1; //sss
ompfinalthreads_val = 1; //sss
mpinumprocs_val = 1;
maxcluster_val = 3;
ranks_started = 0;
total_agents_number = 0;
started_agents_count = 0;
agent_hierarchy_started = false;
}
void PeriscopeFrontend::terminate_autotune() {
/*
* TODO do proper termination here
*
* 1. Call plugin terminate
* 2. Destroy shared pools
* 3. Destroy other frontend structures
* 4. Kill agent hierarchy
* - etc...
*/
if( plugin ) {
plugin->terminate();
delete plugin;
}
fe_context->unloadPlugins();
}
// #define HYBRID__MPI_PROC_ON_PROCESSOR
int PeriscopeFrontend::register_self() {
if( !regsrv_ ) {
psc_errmsg( "PeriscopeFrontend::register_self(): registry not set\n" );
return -1;
}
int pid, port;
pid = getpid();
port = get_local_port();
char hostname[ 200 ];
gethostname( hostname, 200 );
EntryData data;
data.id = -1;
data.app = fe->get_appname();
data.site = sitename();
data.mach = machinename();
data.node = hostname;
data.port = port;
data.pid = pid;
data.comp = "PeriscopeFrontend";
data.tag = get_local_tag();
regid_ = regsrv_->add_entry( data );
char buf[ 200 ];
sprintf( buf, "%s[%d]", data.tag.c_str(), regid_ );
data.tag = buf;
regsrv_->change_entry( data, regid_ );
return regid_;
}
void PeriscopeFrontend::register_master_agent( char* ma_cmd_string ) {
sprintf( masteragent_cmd_string, "%s", ma_cmd_string );
}
void PeriscopeFrontend::register_app_name( char* aname_string ) {
sprintf( app_name_string, "%s", aname_string );
}
void PeriscopeFrontend::register_app_cmd_line( char* acmdline_string ) {
sprintf( app_cmd_line_string, "%s", acmdline_string );
}
void PeriscopeFrontend::register_master_host( char* mhost_string ) {
sprintf( master_host_string, "%s", mhost_string );
}
void PeriscopeFrontend::register_reg_host( char* rhost_string ) {
sprintf( psc_reg_host, "%s", rhost_string );
}
void PeriscopeFrontend::register_reg_port( int reg_port ) {
psc_reg_port = reg_port;
}
void PeriscopeFrontend::set_outfilename( const std::string& outfn_string ) {
outfilename_string = outfn_string;
}
void PeriscopeFrontend::set_ompnumthreads( int ompnt_val ) {
ompnumthreads_val = ompnt_val;
}
void PeriscopeFrontend::set_ompfinalthreads( int ompfinal_val ) {
ompfinalthreads_val = ompfinal_val;
}
void PeriscopeFrontend::set_maxiterations( int iter_val ) {
iter_count = iter_val;
}
void PeriscopeFrontend::set_mpinumprocs( int mpinp_val ) {
mpinumprocs_val = mpinp_val;
}
void PeriscopeFrontend::set_maxcluster( int mcluster_val ) {
maxcluster_val = mcluster_val;
}
ACCL_Handler* PeriscopeFrontend::create_protocol_handler( ACE_SOCK_Stream& peer ) {
#ifdef __p575
sleep( 1 );
#endif
return new ACCL_Frontend_Handler( this, peer );
}
void PeriscopeFrontend::run() {
ranks_started = 0;
started_agents_count = 0;
if( opts.has_scalability_OMP ) {
sleep( 30 );
}
int cores_per_processor = 4;
char senvbuf[ 512 ];
ACE_Reactor* reactor = ACE_Event_Handler::reactor();
if( !reactor ) {
psc_errmsg( "Error: Reactor could not start.\n" );
exit( 0 );
}
// We branch here to start the autotune state machine
if( opts.has_strategy && !strcmp( opts.strategy, "tune" ) ) {
run_tuning_plugin( reactor );
}
else {
run_analysis( reactor );
}
}
/**
* @brief Drives tuning plugins execution
*
*/
void PeriscopeFrontend::run_tuning_plugin( ACE_Reactor* reactor ) {
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( FrontendStateMachines ),
"Autotuning application with %s processes...\n",
opts.mpinumprocs_string );
autotune_statemachine atmsm;
atmsm.start();
this->plugin_context->tuning_step = 0;
this->plugin_context->search_step = 0;
this->plugin_context->experiment_count = 0;
bool scenarios_executed = true;
try{
// starting to pass events to the state machine
atmsm.process_event( initialize_plugin( this, reactor, starter ) );
do {
atmsm.process_event( start_tuning_step() );
do {
StrategyRequest* strategy_request = NULL;
if( plugin->analysisRequired( &strategy_request ) ) {
if( strategy_request == NULL ) {
psc_abort( "Pre-analysis requested by plugin, with an invalid strategy request\n" );
}
// TODO find out why the strategy name needs to be set regardless of what is passed to perform analysis
strcpy( opts.strategy, strategy_request->getGeneralInfo()->strategy_name.c_str() );
atmsm.process_event( perform_analysis( strategy_request, this, reactor, starter,
this->plugin_context->tuning_step ) );
strcpy( opts.strategy, "tune" );
}
atmsm.process_event( create_scenarios( this ) );
while( !frontend_pool_set->csp->empty() ) {
atmsm.process_event( prepare_scenarios() );
do {
atmsm.process_event( define_experiment() );
atmsm.process_event( consider_restart( this, reactor, starter,
this->plugin_context->search_step ) );
do {
atmsm.process_event( run_phase_experiments( this, reactor, starter,
this->plugin_context->search_step,
&scenarios_executed,
this->plugin_context->experiment_count ) );
if( scenarios_executed ) {
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( FrontendStateMachines ),
"Scenarios executed\n" );
}
else {
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( FrontendStateMachines ),
"Scenarios NOT executed\n" );
}
}
while( !scenarios_executed );
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( FrontendStateMachines ),
"Prepared scenario pool empty = %d\n",
frontend_pool_set->psp->empty() );
if( !frontend_pool_set->psp->empty() ) {
psc_infomsg( "Prepared scenario pool not empty, still searching...\n" );
}
this->plugin_context->experiment_count++;
}
while( !frontend_pool_set->psp->empty() );
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( FrontendStateMachines ),
"Scenario pool empty = %d\n",
frontend_pool_set->csp->empty() );
if( !frontend_pool_set->csp->empty() ) {
psc_infomsg( "Scenario pool not empty, still searching...\n" );
}
}
this->plugin_context->search_step++;
}
while( !plugin->searchFinished() );
atmsm.process_event( finish_tuning_step() );
this->plugin_context->tuning_step++;
}
while( !plugin->tuningFinished() );
atmsm.process_event( create_tuning_advice() );
atmsm.process_event( finalize_autotuning( this ) );
}
catch( std::exception& ex ) {
psc_errmsg( "Exception caught from the Autotune State Machine: %s\n", ex.what() );
terminate_autotune();
abort();
}
}
void PeriscopeFrontend::run_analysis( ACE_Reactor* reactor ) {
set_shutdown_allowed( false );
psc_infomsg( "Starting application %s using %s MPI procs and %s OpenMP threads...\n",
opts.app_run_string,
( strlen( opts.mpinumprocs_string ) ? opts.mpinumprocs_string : "0" ),
( strlen( opts.ompnumthreads_string ) ? opts.ompnumthreads_string : "0" ) );
// TODO invert the order here, when in fast mode
if( get_fastmode() ) {
psc_infomsg( "Starting agents network...\n" );
starter->runAgents();
// TODO need to wait for the agents here first; this prevents connection retries that exhaust file descriptors
starter->runApplication();
psc_dbgmsg( 1, "Application started after %5.1f seconds\n", psc_wall_time() );
}
else {
starter->runApplication();
psc_dbgmsg( 1, "Application started after %5.1f seconds\n", psc_wall_time() );
psc_infomsg( "Starting agents network...\n" );
starter->runAgents();
}
init_analysis_strategy_requests();
print_StrategyRequestGeneralInfoQueue();
if( opts.has_scalability_OMP ) {
sleep( 30 ); //sss
}
reactor->reset_event_loop();
reactor->register_handler( 0, this, ACE_Event_Handler::READ_MASK );
reactor->register_handler( SIGINT, this );
//psc_dbgmsg(1, "STARTUP: run reactor\n");
#ifndef _BGP_PORT_HEARTBEAT_V1
set_timer( 2, 1, timeout_delta(), PeriscopeFrontend::STARTUP );
#endif
reactor->run_event_loop();
int max_runs = 40;
for( int runs = 1; need_restart && runs < max_runs && !quit_fe && restart_requested_for_no_tuning; runs++ ) {
fe->increment_global_timeout();
psc_dbgmsg( FRONTEND_GENERAL_DEBUG_LEVEL, "Restarting application\n" );
set_shutdown_allowed( runs == max_runs - 1 ); //Needrestart msg will be ignored
std::map<std::string, AgentInfo>::iterator it;
for( it = fe->get_child_agents()->begin(); it != fe->get_child_agents()->end(); it++ ) {
AgentInfo& ag = it->second;
if( ag.status != AgentInfo::CONNECTED && fe->connect_to_child( &ag ) == -1 ) {
psc_errmsg( "Error FE not connected to child\n" );
exit( 1 );
}
else {
ag.appl_terminated = false;
ag.handler->terminate();
}
}
psc_dbgmsg( FRONTEND_GENERAL_DEBUG_LEVEL, "RESTART_ACTION: waiting for application to terminate\n" );
reactor->reset_event_loop();
//evt.reactor->register_handler(0, evt.fe, ACE_Event_Handler::READ_MASK);
//evt.reactor->register_handler(SIGINT, evt.fe);
set_timer( 2, 1, timeout_delta(), PeriscopeFrontend::APPLICATION_TERMINATION );
reactor->run_event_loop();
psc_dbgmsg( FRONTEND_GENERAL_DEBUG_LEVEL, "RESTART_ACTION: application terminated.\n" );
starter->rerunApplication();
ACE_Reactor* reactor = ACE_Event_Handler::reactor();
if( !reactor ) {
psc_errmsg( "Error: Reactor could not start.\n" );
exit( 0 );
}
reactor->reset_event_loop();
//psc_dbgmsg(1, "register reactor\n");
reactor->register_handler( 0, this, ACE_Event_Handler::READ_MASK );
reactor->register_handler( SIGINT, this );
//psc_dbgmsg(1, "REINIT: run reactor\n");
set_timer( 2, 1, timeout_delta(), PeriscopeFrontend::STARTUP_REINIT );
reactor->run_event_loop();
//psc_dbgmsg(1, "finished reactor\n");
}
}
void PeriscopeFrontend::stop() {
ACE_Reactor* reactor = ACE_Event_Handler::reactor();
if( !get_fastmode() ) {
if( reactor ) {
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( HierarchySetup ), "Stopping the ACE Reactor (NOT fast mode)\n" );
reactor->end_event_loop();
}
}
#ifdef __p575
if( !get_fastmode() ) {
regsrv_->delete_entry( regid_ );
}
#endif
}
int PeriscopeFrontend::handle_input( ACE_HANDLE hdle ) {
int cnt;
const int bufsize = 200;
char buf[ bufsize ];
buf[ 0 ] = '\0';
buf[ 1 ] = '\0';
if( !read_line( hdle, buf, bufsize ) ) {
return -1;
}
handle_command( buf );
return 0;
}
int PeriscopeFrontend::handle_signal( int signum,
siginfo_t*,
ucontext_t* ) {
ACE_Reactor* reactor = ACE_Event_Handler::reactor();
if( reactor ) {
reactor->end_event_loop();
}
quit();
return 0;
}
void PeriscopeFrontend::handle_command( const std::string& line ) {
string cmd;
ssize_t pos;
pos = strskip_ws( line, 0 );
pos = get_token( line, pos, "\t \n", cmd );
if( cmd.compare( "graph" ) == 0 ) {
graph();
prompt();
return;
}
if( cmd.compare( "start" ) == 0 ) {
start();
return;
}
if( cmd.compare( "check" ) == 0 ) {
check();
prompt();
return;
}
if( cmd.compare( "help" ) == 0 ) {
help();
return;
}
if( cmd.compare( "quit" ) == 0 ) {
quit();
return;
}
if( cmd.compare( "properties" ) == 0 ) {
properties();
return;
}
fprintf( stdout, "Unknown command: '%s'\n", cmd.c_str() );
prompt();
}
// adds a started agent without tracking the processes it handles; there is no need to track the controlled processes here in fast mode, since the
// processes are specified before the launch explicitly
void PeriscopeFrontend::add_started_agent() {
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( HierarchySetup ),
"Entering add_started_agent(); started: %d; total %d; ready: %s;\n",
started_agents_count, total_agents_number,
agent_hierarchy_started ? "true" : "false" );
started_agents_count++;
if( !agent_hierarchy_started ) {
if( started_agents_count == total_agents_number ) {
agent_hierarchy_started = true;
}
}
}
// increases the number of started agents and if it equals to the total amount issues start command
// this version is used in the BGP style launchers
void PeriscopeFrontend::add_started_agent( int num_procs ) {
started_agents_count++;
ranks_started += num_procs;
if( num_procs != 0 ) {
psc_dbgmsg( 0, "Heartbeat received: (%d mpi processes out of %d ready for analysis)\n", ranks_started, get_mpinumprocs() );
}
if( ranks_started == get_mpinumprocs() ) {
psc_dbgmsg( 1, "Agent network UP and RUNNING. Starting search.\n\n" );
psc_dbgmsg( 1, "Agent network started in %5.1f seconds\n", psc_wall_time() );
if( !agent_hierarchy_started ) {
agent_hierarchy_started = true;
fe->set_startup_time( psc_wall_time() );
}
if( automatic_mode ) {
start();
}
else {
prompt();
}
}
}
void PeriscopeFrontend::remove_started_agent() { // increases the number of started agents and if it equals to the total amount issues start command
started_agents_count--;
total_agents_number--;
psc_dbgmsg( FRONTEND_HIGH_DEBUG_LEVEL, "One agent was dismissed\n" );
}
int PeriscopeFrontend::handle_timeout( const ACE_Time_Value& time,
const void* arg ) {
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( ACECommunication ),
"PeriscopeFrontend::handle_timeout() called\n" );
return handle_step( timer_action );
}
int PeriscopeFrontend::handle_step( TimerAction timer_action ) {
std::map<std::string, AgentInfo>::iterator it;
bool done;
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( ACECommunication ),
"PeriscopeFrontend::handle_step()\n" );
switch( timer_action ) {
case STARTUP:
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( ACECommunication ),
"PeriscopeFrontend::handle_step() STARTUP\n" );
done = true;
for( it = child_agents_.begin(); it != child_agents_.end(); it++ ) {
if( it->second.status != AgentInfo::STARTED ) {
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( HierarchySetup ),
"Child agent %s at (%s:%d) not started, still waiting...\n",
it->first.c_str(), it->second.hostname.c_str(), it->second.port );
done = false;
}
}
if( done ) {
if( !agent_hierarchy_started ) {
agent_hierarchy_started = true;
psc_dbgmsg( 1, "Agent network UP and RUNNING. Starting search.\n\n" );
psc_dbgmsg( 1, "Agent network started in %5.1f seconds\n", psc_wall_time() );
fe->set_startup_time( psc_wall_time() );
}
ACE_Reactor* reactor = ACE_Event_Handler::reactor();
reactor->cancel_timer( this );
if( automatic_mode ) {
// TODO in fast mode, the call to start() needs to occur after the application is launched with the starter
if( get_fastmode() ) {
search_done = true; // exit the comm phase in fast mode
}
else {
start();
}
}
else {
prompt();
}
}
else {
if( this->timed_out() ) {
psc_errmsg( "Timed out waiting for child agent(s)\n" );
quit();
}
}
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( ACECommunication ),
"PeriscopeFrontend::handle_step() STARTUP done!\n" );
break;
case STARTUP_REINIT:
// TODO check this are for the restart bug
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( ACECommunication ),
"PeriscopeFrontend::handle_step() STARTUP_REINIT\n" );
done = true;
for( it = child_agents_.begin(); it != child_agents_.end(); it++ ) {
if( it->second.status_reinit != AgentInfo::STARTED ) {
done = false;
}
}
if( done ) {
psc_dbgmsg( 0, "Analysis agents connected to new processes and ready for search.\n" );
ACE_Reactor* reactor = ACE_Event_Handler::reactor();
reactor->cancel_timer( this );
for( it = child_agents_.begin(); it != child_agents_.end(); it++ ) {
AgentInfo& ai = it->second;
if( fe->connect_to_child( &ai ) == -1 ) {
psc_errmsg( "Error connecting to child at %s:%d\n", ai.hostname.c_str(), ai.port );
}
else {
ai.search_status = AgentInfo::UNDEFINED;
ai.handler->startexperiment();
ai.properties_sent = false;
}
}
}
else { // Agent network still not running
// TODO verify why this is empty -IC
}
break;
case AGENT_STARTUP:
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( ACECommunication ),
"PeriscopeFrontend::handle_step() AGENT_STARTUP\n" );
done = true;
for( it = child_agents_.begin(); it != child_agents_.end(); it++ ) {
if( it->second.status != AgentInfo::STARTED ) {
done = false;
}
}
if( done ) {
//psc_dbgmsg(1,"....Done.....\n\n");
if( !agent_hierarchy_started ) {
agent_hierarchy_started = true;
psc_dbgmsg( 1, "Agent network UP and RUNNING. Starting search.\n\n" );
psc_dbgmsg( 1, "Agent network started in %5.1f seconds\n", psc_wall_time() );
fe->set_startup_time( psc_wall_time() );
}
ACE_Reactor* reactor = ACE_Event_Handler::reactor();
reactor->cancel_timer( this );
stop();
}
else {
if( this->timed_out() ) {
psc_errmsg( "Timed out waiting for child agent(s)\n" );
quit();
}
}
break;
case APPLICATION_TERMINATION:
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( ACECommunication ),
"PeriscopeFrontend::handle_step() APPLICATION_TERMINATION\n" );
done = true;
for( it = child_agents_.begin(); it != child_agents_.end(); it++ ) {
if( !it->second.appl_terminated ) {
done = false;
}
}
if( done ) {
RegistryService* regsrv = fe->get_registry();
EntryData query;
std::list< EntryData > rresult;
query.app = fe->get_appname();
query.comp = "MRIMONITOR";
query.tag = "none";
if( !fe->get_fastmode() ) {
rresult.clear();
if( regsrv->query_entries( rresult, query, false ) == -1 ) {
psc_errmsg( "Error querying registry for application\n" );
exit( 1 );
}
if( rresult.size() > 0 ) {
psc_dbgmsg( FRONTEND_GENERAL_DEBUG_LEVEL,
"%d processes of application %s still registered\n",
rresult.size(), fe->get_appname() );
}
else {
//psc_dbgmsg(1,"....All application processes terminated.....\n\n");
ACE_Reactor* reactor = ACE_Event_Handler::reactor();
reactor->cancel_timer( this );
stop();
}
}
// force elimination from registry
// if( !startup_finished ) {
// std::list<EntryData>::iterator entryit;
//
// for( entryit = rresult.begin(); entryit != rresult.end(); entryit++) {
// regsrv->delete_entry( ( *entryit ).id );
// }
}
else {
if( this->timed_out() ) {
psc_errmsg( "Timed out waiting for child agent(s)\n" );
quit();
}
}
break;
case CHECK:
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( ACECommunication ),
"PeriscopeFrontend::handle_step() CHECK\n" );
this->check();
break;
case SHUTDOWN:
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( ACECommunication ),
"PeriscopeFrontend::handle_step() SHUTDOWN\n" );
psc_dbgmsg( 1, "PERISCOPE shutdown requested [%d], restart needed [%d]\n",
shutdown_allowed, need_restart );
ACE_Reactor* reactor = ACE_Event_Handler::reactor();
reactor->cancel_timer( this );
if( shutdown_allowed || !need_restart ) {
// shutdown the agent hierarchy
quit();
}
else {
// only exit the reactor event loop
stop();
}
break;
}
return 0;
}
void PeriscopeFrontend::graph() {
char command_string[ 200 ];
RegistryService* regsrv = fe->get_registry();
EntryData query;
std::list<EntryData> result;
std::list<EntryData>::iterator entryit;
query.app = appname();
if( regsrv->query_entries( result, query ) == -1 ) {
psc_errmsg( "Error querying registry for application\n" );
exit( 1 );
}
char buf[ 200 ];
char* tmp, * last, * t, * parent;
FILE* graph;
graph = fopen( "/tmp/test.dot", "w" );
fprintf( graph, "digraph test {\n" );
std::map<std::string, std::list<std::string> > children;
std::map<std::string, std::string> label;
for( entryit = result.begin(); entryit != result.end(); entryit++ ) {
sprintf( buf, "fe[%d]", regid_ );
if( ( entryit->tag ).find( buf ) == std::string::npos ) {
continue;
}
if( entryit->comp == "Periscope Frontend" ) {
sprintf( buf,
"Frontend\\n%s:%d", entryit->node.c_str(), entryit->port );
}
if( entryit->comp == "Periscope HL Agent" ) {
sprintf( buf,
"HL-Agent\\n%s:%d", entryit->node.c_str(), entryit->port );
}
if( entryit->comp == "Periscope Node-Agent" ) {
sprintf( buf,
"Node-Agent\\n%s:%d", entryit->node.c_str(), entryit->port );
}
if( entryit->comp == "Monlib" ) {
sprintf( buf, "Monlib\\n%s %s",
entryit->app.c_str(), entryit->node.c_str() );
}
label[ entryit->tag ] = buf;
strcpy( buf, entryit->tag.c_str() );
tmp = strtok( buf, ":" );
last = tmp;
while( tmp != 0 ) {
last = tmp;
tmp = strtok( 0, ":" );
}
t = buf;
if( buf != last ) {
while( t != ( last - 1 ) ) {
if( *t == '\0' ) {
*t = ':';
}
t++;
}
parent = buf;
}
else {
parent = 0;
}
if( parent ) {
children[ parent ].push_back( entryit->tag );
}
}
std::map<std::string, std::list<std::string> >::iterator it1;
std::list<std::string>::iterator it2;
std::map<std::string, std::string>::iterator it3;
for( it1 = children.begin(); it1 != children.end(); it1++ ) {
for( it2 = it1->second.begin(); it2 != it1->second.end(); it2++ ) {
fprintf( graph, " \"%s\" -> \"%s\" ;\n", ( *it1 ).first.c_str(),
( *it2 ).c_str() );
}
}
for( it3 = label.begin(); it3 != label.end(); it3++ ) {
if( ( *it3 ).second.find( "Frontend" ) != string::npos ) {
fprintf( graph,
" \"%s\" [shape=\"ellipse\" style=\"filled\" fillcolor=yellow label =\"%s\"]\n",
( *it3 ).first.c_str(), ( *it3 ).second.c_str() );
}
if( ( *it3 ).second.find( "Node-Agent" ) != string::npos ) {
fprintf( graph,
" \"%s\" [shape=\"rect\" style=\"filled\" fillcolor=grey label =\"%s\"]\n",
( *it3 ).first.c_str(), ( *it3 ).second.c_str() );
}
if( ( *it3 ).second.find( "HL-Agent" ) != string::npos ) {
fprintf( graph, " \"%s\" [shape=\"octagon\" label =\"%s\"]\n",
( *it3 ).first.c_str(), ( *it3 ).second.c_str() );
}
if( ( *it3 ).second.find( "Monlib" ) != string::npos ) {
fprintf( graph, " \"%s\" [shape=\"rect\" label =\"%s\"]\n",
( *it3 ).first.c_str(), ( *it3 ).second.c_str() );
}
}
fprintf( graph, "}\n" );
fclose( graph );
sprintf( command_string, "%s",
"dot /tmp/test.dot -Tpng > /tmp/test.png 2> /dev/null ;"
"qiv /tmp/test.png &" );
psc_dbgmsg( FRONTEND_MEDIUM_DEBUG_LEVEL, "Going to execute: '%s'\n", command_string );
int retVal = system( command_string );
}
void PeriscopeFrontend::prompt() {
// TODO verify what is the purpose of this operation and why it is empty -IC
}
void PeriscopeFrontend::help() {
fprintf( stdout, " Periscope commands:\n" );
fprintf( stdout, " help -- show this help\n" );
fprintf( stdout, " start -- start target application\n" );
fprintf( stdout, " quit -- quit Periscope\n" );
fprintf( stdout, " graph -- show the agent network graph\n" );
fprintf( stdout, " check -- check properties\n" );
fflush( stdout );
prompt();
}
void PeriscopeFrontend::push_StrategyRequestGeneralInfo2Queue( const std::string& strategy_name,
bool pedantic,
int analysis_duration,
int delay_phases,
int delay_seconds ) {
StrategyRequestGeneralInfo* strategyRequestGeneralInfo = new StrategyRequestGeneralInfo;
strategyRequestGeneralInfo->strategy_name = strategy_name;
strategyRequestGeneralInfo->pedantic = pedantic;
strategyRequestGeneralInfo->delay_phases = delay_phases;
strategyRequestGeneralInfo->delay_seconds = delay_seconds;
strategyRequestGeneralInfo->analysis_duration = analysis_duration;
push_StrategyRequestGeneralInfo2Queue( strategyRequestGeneralInfo );
}
void PeriscopeFrontend::print_StrategyRequestQueue() {
psc_dbgmsg( 1, "Requested strategy request:\n\n" );
for( std::list<StrategyRequest*>::iterator sr_it = strategy_request_queue.begin();
sr_it != strategy_request_queue.end(); sr_it++ ) {
StrategyRequestGeneralInfo* srgi;
srgi = ( *sr_it )->getGeneralInfo();
psc_dbgmsg( 1, "Strategy name: %s, analysis duration %d, analysis delay %d/%d\n (phases/seconds)",
srgi->strategy_name.c_str(), srgi->analysis_duration,
srgi->delay_phases, srgi->delay_seconds );
if( ( *sr_it )->getTypeOfConfiguration() == strategy_configuration_type( TUNE ) ) {
std::list<Scenario*>* sc_list;
sc_list = ( *sr_it )->getConfiguration().configuration_union.TuneScenario_list;
for( std::list<Scenario*>::iterator sc_it = sc_list->begin(); sc_it != sc_list->end(); sc_it++ ) {
( *sc_it )->print();
}
}
else if( ( *sr_it )->getTypeOfConfiguration() == strategy_configuration_type( PERSYST ) ) {
std::list<int>* propID_list;
propID_list = ( *sr_it )->getConfiguration().configuration_union.PersystPropertyID_list;
psc_dbgmsg( 1, "Initial candidate properties:\n" );
for( std::list<int>::iterator propID_it = propID_list->begin(); propID_it != propID_list->end(); propID_it++ ) {
psc_dbgmsg( 1, "\t - %d", ( *propID_it ) );
}
}
}
}
void PeriscopeFrontend::init_analysis_strategy_requests() {
StrategyRequestGeneralInfo* strategyRequestGeneralInfo = new StrategyRequestGeneralInfo;
std::string sname = opts.strategy;
if( sname.compare( "tune" ) ) {
std::list<int> empty_list;
int delay_phases = 0;
if( opts.has_delay ) {
delay_phases = atoi( opts.delay_string );
}
int duration = 1;
if( opts.has_duration ) {
duration = atoi( opts.duration_string );
}
strategyRequestGeneralInfo->strategy_name = opts.strategy;
strategyRequestGeneralInfo->pedantic = opts.has_pedantic;
strategyRequestGeneralInfo->delay_phases = delay_phases;
strategyRequestGeneralInfo->delay_seconds = 0;
strategyRequestGeneralInfo->analysis_duration = duration;
StrategyRequest* strategy_request = new StrategyRequest( &empty_list, strategyRequestGeneralInfo );
serializeStrategyRequests( strategy_request );
}
}
void PeriscopeFrontend::start() {
std::vector<char> serializedStrategyRequest;
std::map<std::string, AgentInfo>::iterator it;
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( ACECommunication ), "PeriscopeFrontend::start() called\n" );
serializedStrategyRequest = get_SerializedStrategyRequestBuffer();
//RM: Should be cleaned up here and moved into run handle for both analysis and tuning.
if( serializedStrategyRequest.size() == 0 ) {
psc_dbgmsg( 1, "Search finished.\n" );
fe->stop();
return;
}
psc_dbgmsg( PSC_AUTOTUNE_ALL_DEBUG, "Start with next strategy request: time: %5.1f seconds\n", psc_wall_time() );
psc_dbgmsg( FRONTEND_HIGH_DEBUG_LEVEL, "Sending START with strategy request buffer size %d...\n",
serializedStrategyRequest.size() );
for( it = child_agents_.begin(); it != child_agents_.end(); it++ ) {
AgentInfo& ag = it->second;
if( ag.status != AgentInfo::CONNECTED ) {
if( connect_to_child( &ag ) == -1 ) {
psc_errmsg( "Error connecting to child\n" );
abort();
}
else {
ag.handler->start( serializedStrategyRequest.size(), ( unsigned char* )&serializedStrategyRequest[ 0 ] );
}
ag.properties_sent = false;
}
}
strategyRequestBuffer.clear();
}
/**
* @brief Terminates the frontend and all agents.
*
* This method is executed just before the frontend terminates.
* It stops all child agents, stops the communication routines,
* and exports the found properties to a file.
*
*/
void PeriscopeFrontend::quit() {
std::map<std::string, AgentInfo>::iterator it;
psc_dbgmsg( 5, "Frontend on quit!\n" );
quit_fe = true;
//Do scalability analysis only at the final run and export only the scalability-based properties
if( opts.has_scalability_OMP && fe->get_ompnumthreads() == fe->get_ompfinalthreads() ) {
do_pre_analysis();
export_scalability_properties();
}
else if( opts.has_scalability_OMP ) {
;
}
else {
export_properties();
if( psc_get_debug_level() >= 1 ) {
properties();
}
}
for( it = child_agents_.begin(); it != child_agents_.end(); it++ ) {
AgentInfo& ag = it->second;
if( connect_to_child( &ag ) == -1 ) {
psc_errmsg( "Error connecting to child\n" );
abort();
}
else {
psc_dbgmsg( 5, "Sending QUIT command...\n" );
ag.handler->quit();
//psc_dbgmsg(1, "Sending QUIT command...OK\n");
}
}
if( !get_fastmode() ) {
RegistryService* regsrv = fe->get_registry();
EntryData query;
std::list< EntryData > rresult;
std::list< EntryData >::iterator entry;
bool shutdown_finished = false;
double start_time, current_time;
PSC_WTIME( start_time );
while( !shutdown_finished && ( current_time - start_time ) < 60.0 ) {
sleep( 1 );
query.app = fe->get_appname();
query.comp = "MRIMONITOR";
query.tag = "none";
rresult.clear();
if( regsrv->query_entries( rresult, query, false ) == -1 ) {
psc_errmsg( "Error querying registry for application\n" );
exit( 1 );
}
if( rresult.size() > 0 ) {
psc_dbgmsg( 1, "%d processes of %s still registered\n", rresult.size(), query.app.c_str() );
}
shutdown_finished = ( rresult.size() == 0 );
PSC_WTIME( current_time );
}
if( !shutdown_finished ) {
psc_errmsg( "Not all application processes terminated on time! Cleaning registry.\n" );
for( entry = rresult.begin(); entry != rresult.end(); entry++ ) {
regsrv->delete_entry( ( *entry ).id );
}
}
else {
psc_dbgmsg( 1, "All application processes terminated.\n" );
}
}
psc_dbgmsg( FRONTEND_HIGH_DEBUG_LEVEL, "Sending STOP command...\n" );
stop();
}
void PeriscopeFrontend::terminate_agent_hierarchy() {
std::map<std::string, AgentInfo>::iterator it;
for( it = child_agents_.begin(); it != child_agents_.end(); it++ ) {
AgentInfo& ag = it->second;
if( connect_to_child( &ag ) == -1 ) {
psc_errmsg( "Error connecting to child\n" );
abort();
}
else {
psc_dbgmsg( 5, "Sending QUIT command...\n" );
ag.handler->quit();
}
}
double start_time, current_time;
int status;
PSC_WTIME( start_time );
psc_dbgmsg( 2, "size of child agents: %d\n", child_agents_.size() );
child_agents_.erase( child_agents_.begin(), child_agents_.end() );
if( get_fastmode() ) { // check for starters that work in fast mode
// TODO need to terminate the application and agents in fast mode -IC
// need a way to verify that the agents and MPI application terminated, before continuing
// instead of waiting, we can simply use new ports and execute asynchronously
if( agent_pid > 0 ) { // in interactive runs, this variable holds the PID of the current forked AA -IC
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( HierarchySetup ), "This is an interactive run.\n" );
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( HierarchySetup ), "Waiting for id of the Agent: %d\n\n", agent_pid );
waitpid( agent_pid, &status, 0 );
}
else { // agents in a distributed memory run
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( HierarchySetup ), "Running on a distributed system.\n" );
psc_errmsg( "Waiting for agents on distributed systems not yet implemented. "
"Throwing an exception at PeriscopeFrontend::terminate_agent_hierarchy()" );
throw 0;
// TODO need to verify the termination of agents in distributed systems
}
}
else {
RegistryService* regsrv = fe->get_registry();
EntryData query;
std::list< EntryData > rresult;
std::list< EntryData >::iterator entry;
bool shutdown_finished = false;
while( !shutdown_finished && ( current_time - start_time ) < 60.0 ) {
query.app = fe->get_appname();
query.comp = "MRIMONITOR";
query.tag = "none";
rresult.clear();
if( regsrv->query_entries( rresult, query, false ) == -1 ) {
psc_errmsg( "Error querying registry for application\n" );
exit( 1 );
}
if( rresult.size() > 0 ) {
psc_dbgmsg( 1, "%d processes of %s still registered\n", rresult.size(), query.app.c_str() );
}
shutdown_finished = ( rresult.size() == 0 );
PSC_WTIME( current_time );
}
if( !shutdown_finished ) {
psc_errmsg( "Not all application processes terminated on time! Cleaning registry.\n" );
for( entry = rresult.begin(); entry != rresult.end(); entry++ ) {
regsrv->delete_entry( ( *entry ).id );
}
//exit(1);
}
else {
psc_dbgmsg( 1, "All application processes terminated.\n" );
}
}
// the frontend will hold the PID of the MPI application (more accurately, the mpiexec/launcher's PID)
// the reason is that we fork a child that becomes an mpiexec process; this process terminates with the parallel
// job, regardless of whether it is running locally or on a distributed system -IC
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( HierarchySetup ), "Waiting for id of the MPI application: %d\n\n", application_pid );
waitpid( application_pid, &status, 0 );
psc_dbgmsg( PSC_SELECTIVE_DEBUG_LEVEL( HierarchySetup ), "Termination of the application and agents done (fast mode).\n" );
psc_dbgmsg( FRONTEND_HIGH_DEBUG_LEVEL, "Sending STOP command...\n" );
psc_dbgmsg( 2, "stopping the agents...\n" );
stop();
fe->set_agent_hierarchy_started( false );
}
/**
* @brief Pre-analysis for scalability tests in OpenMP codes
*
* Does speedup analysis, scalability tests, and inserts the appropriate properties
*
*/
void PeriscopeFrontend::do_pre_analysis() {
//initializations
properties_.clear();
property.clear();
property_threads.clear();
p_threads.clear();
PhaseTime_user.clear();
std::list<PropertyInfo>::iterator prop_it;
//Get the properties information
//for( int i = 0; std::list<MetaProperty>::iterator it = metaproperties_.begin(); it != metaproperties_.end(); it++ ){
for( int i = 0; i < metaproperties_.size(); i++ ) {
get_prop_info( metaproperties_[ i ] );
}
//Copy list of properties starting from thread no. 2
copy_properties_for_analysis();
//This function finds the existing properties for all runs
find_existing_properties();
//Determine if the user_region scales or not / Meantime find the deviation time, execution time for user region
bool user_flag = false;
for( prop_it = properties_.begin(); prop_it != properties_.end(); ++prop_it ) {
long double seq_user_time = 0.0;
if( ( *prop_it ).maxThreads == 1 ) {
if( ( *prop_it ).region == "USER_REGION" ) {
string phase_user_Region = "USER_REGION";
seq_user_time = find_sequential_time( *prop_it );
do_speedup_analysis( *prop_it, seq_user_time, phase_user_Region );
user_flag = true;
}
else {
;
}
}
else if( ( *prop_it ).maxThreads > 1 ) {
break;
}
else {
;
}
}
//If there is no user_region, then depend on main region, so..
if( !user_flag ) {
for( prop_it = properties_.begin(); prop_it != properties_.end(); ++prop_it ) {
long double seq_main_time = 0.0;
if( ( *prop_it ).maxThreads == 1 ) {
if( ( *prop_it ).region == "MAIN_REGION" ) {
string phase_main_Region = "MAIN_REGION";
seq_main_time = find_sequential_time( *prop_it );
do_speedup_analysis( *prop_it, seq_main_time, phase_main_Region );
}
else {
;
}
}
else if( ( *prop_it ).maxThreads > 1 ) {
break;
}
else {
;
}
}
}
//Find speedup for OpenMP regions
std::list<long double> RFL_history;
RFL_history.clear();
for( prop_it = properties_.begin(); prop_it != properties_.end(); ++prop_it ) {
long double seq_time = 0.0;
bool RFL_check = false;
RFL_history.push_back( ( *prop_it ).RFL );
if( ( *prop_it ).maxThreads == 1 ) {
if( ( int )count( RFL_history.begin(), RFL_history.end(), ( *prop_it ).RFL ) > 1 ) {
RFL_check = true;
}
if( ( ( *prop_it ).region == "PARALLEL_REGION" || ( *prop_it ).region == "WORKSHARE_DO" ||
( *prop_it ).region == "DO_REGION" || ( *prop_it ).region == "CALL_REGION"
|| ( *prop_it ).region == "SUB_REGION" ) && !RFL_check ) {
string phaseRegion = ( *prop_it ).region;
seq_time = find_sequential_time( *prop_it );
do_speedup_analysis( *prop_it, seq_time, phaseRegion );
}
else {
;
}
}
else if( ( *prop_it ).maxThreads > 1 ) {
break;
}
else {
;
}
}
//This function calculates the total deviation among the regions;
//it finds the maximum among them; it shows the region with its severity value.
for( int i = 1; i <= fe->get_ompfinalthreads(); i += i ) {
Check_severity_among_parallel_regions( i );
}
}
/**
* @brief Export scalability based found properties to a file
*
* Exports scalability based found properties to a file in XML format.
*
*/
void PeriscopeFrontend::export_scalability_properties() {
//initialization
std::list<PropertyInfo>::iterator prop_it, prop_itr, s_it, e_it, sc_it, sp_it, d_it, p_it;
double threshold_for_foundproperties = 0.0; //threshold above which the properties are displayed
std::string propfilename = fe->get_outfilename();
std::ofstream xmlfile( propfilename.c_str() );
if( ( !xmlfile ) && opts.has_propfile ) {
std::cout << "Cannot open xmlfile. \n";
exit( 1 );
}
if( xmlfile && fe->get_ompnumthreads() == fe->get_ompfinalthreads() ) {
psc_infomsg( "Exporting results to %s\n", propfilename.c_str() );
time_t rawtime;
tm* timeinfo;
time( &rawtime );
timeinfo = localtime( &rawtime );
xmlfile << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl;
xmlfile << "<Experiment xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
"xmlns=\"http://www.lrr.in.tum.de/Periscope\" "
"xsi:schemaLocation=\"http://www.lrr.in.tum.de/Periscope psc_properties.xsd \">"
<< std::endl << std::endl;
xmlfile << std::setfill( '0' );
xmlfile << " <date>" << std::setw( 4 ) << ( timeinfo->tm_year + 1900 )
<< "-" << std::setw( 2 ) << timeinfo->tm_mon + 1 << "-" << std::setw( 2 )
<< timeinfo->tm_mday << "</date>" << std::endl;
xmlfile << " <time>" << std::setw( 2 ) << timeinfo->tm_hour << ":"
<< std::setw( 2 ) << timeinfo->tm_min << ":" << std::setw( 2 )
<< timeinfo->tm_sec << "</time>" << std::endl;
// Wording directory for the experiment: can be used to find the data file(s)
char* cwd = getenv( "PWD" );
xmlfile << " <dir>" << cwd << "</dir>" << std::endl;
// Source revision
if( opts.has_srcrev ) {
// Source revision
xmlfile << " <rev>" << opts.srcrev << "</rev>" << std::endl;
}
// Empty line before the properties
xmlfile << std::endl;
/*
//The following lines should be removed sss
std::list<std::string>::iterator it;
//sss here we have to process the required properties.
for( it = xmlproperties_.begin(); it != xmlproperties_.end(); it++ ){
xmlfile << *it;
}
*/
}
if( xmlfile && fe->get_ompnumthreads() == fe->get_ompfinalthreads() ) {
// std::cout << std::endl;
//Export all properties other than exectime::::: properties to .psc file
for( p_it = properties_.begin(); p_it != properties_.end(); ++p_it ) {
string::size_type p_loc = ( ( *p_it ).name ).find( ":::::", 0 );
if( false && p_loc != string::npos ) {
;
}
else {
if( ( *p_it ).severity > threshold_for_foundproperties ) {
xmlfile << "<property cluster=\"" << ( *p_it ).cluster
<< "\" ID=\"" << ( *p_it ).ID << "\" >\n "
<< "\t<name>" << ( *p_it ).name << "</name>\n "
<< "\t<context FileID=\"" << ( *p_it ).fileid
<< "\" FileName=\"" << ( *p_it ).filename
<< "\" RFL=\"" << ( *p_it ).RFL << "\" Config=\""
<< ( *p_it ).maxProcs << "x" << ( *p_it ).maxThreads
<< "\" Region=\"" << ( *p_it ).region
<< "\" RegionId=\"" << ( *p_it ).RegionId
<< "\">\n " << "\t\t<execObj process=\""
<< ( *p_it ).process << "\" thread=\""
<< ( *p_it ).numthreads << "\"/>\n "
<< "\t</context>\n \t<severity>"
<< double( ( *p_it ).severity ) << "</severity>\n "
<< "\t<confidence>" << double( ( *p_it ).confidence )
<< "</confidence>\n \t<addInfo>\n " << "\t\t";
xmlfile << ( *p_it ).addInfo;
string::size_type p_loc = ( ( *p_it ).name ).find( ":::::", 0 );
if( p_loc != string::npos ) {
xmlfile << "\t<exectime>" << ( p_it->execTime / NANOSEC_PER_SEC_DOUBLE ) << "s </exectime> ";
}
xmlfile << "\n\t</addInfo>\n </property>\n";
}
}
}
// std::cout << std::endl;
//Export speedup based newly developed property to properties.psc file
for( sp_it = speedup_based_properties.begin(); sp_it != speedup_based_properties.end(); ++sp_it ) {
// std::cout << " speedup_based_properties " << " size = "
// << speedup_based_properties.size() << " config= "
// << ( *sp_it ).maxThreads << " RFL = " << ( *sp_it ).RFL
// << " " << ( *sp_it ).filename << " region = "
// << ( *sp_it ).region << " process = "
// << ( *sp_it ).process << " severity = "
// << double( ( *sp_it ).severity ) << " cluster = "
// << ( *sp_it ).cluster << " ID = " << ( *sp_it ).ID << " "
// << ( *sp_it ).name << " fileid = " << ( *sp_it ).fileid
// << std::endl;
if( ( *sp_it ).severity > threshold_for_foundproperties ) {
xmlfile << "<property cluster=\"" << ( *sp_it ).cluster
<< "\" ID=\""<< ( *sp_it ).ID << "\" >\n "
<< "\t<name>" << ( *sp_it ).name << "</name>\n "
<< "\t<context FileID=\"" << ( *sp_it ).fileid
<< "\" FileName=\"" << ( *sp_it ).filename
<< "\" RFL=\"" << ( *sp_it ).RFL << "\" Config=\""
<< ( *sp_it ).maxProcs << "x" << ( *sp_it ).maxThreads
<< "\" Region=\"" << ( *sp_it ).region
<< "\" RegionId=\"" << ( *sp_it ).RegionId << "\">\n "
<< "\t\t<execObj process=\"" << ( *sp_it ).process
<< "\" thread=\"" << ( *sp_it ).numthreads << "\"/>\n "
<< "\t</context>\n \t<severity>"
<< double( ( *sp_it ).severity ) << "</severity>\n "
<< "\t<confidence>" << double( ( *sp_it ).confidence )
<< "</confidence>\n \t<addInfo>\n " << "\t\t";
if( ( *sp_it ).addInfo == "" ) {
;
}
else {
xmlfile << ( *sp_it ).addInfo;
}
xmlfile << "\n\t</addInfo>\n </property>\n";
}
else {
;
}
}
// std::cout << std::endl;
//Export PropertyInfo from existing property list to properties.psc file
//Different approach for printing properties
for( prop_it = existing_properties.begin(); prop_it != existing_properties.end(); ++prop_it ) {
string::size_type e_loc = ( ( *prop_it ).name ).find( ":::::", 0 );
if( e_loc != string::npos ) {
;
}
else {
// std::cout << " existing_properties " << " size = "
// << existing_properties.size() << " exec = "
// << ( *prop_it ).execTime << " config= "
// << ( *prop_it ).maxThreads << " RFL = "
// << ( *prop_it ).RFL << " " << ( *prop_it ).filename
// << " region = " << ( *prop_it ).region
// << " process = " << ( *prop_it ).process
// << " severity = " << double( ( *prop_it ).severity )
// << " cluster = " << ( *prop_it ).cluster << " ID = "
// << ( *prop_it ).ID << " " << ( *prop_it ).name
// << " fileid = " << ( *prop_it ).fileid << std::endl;
string addinfo_name = ( *prop_it ).name; //get the property name which stays for all the configurations here
int id = Property_occurring_in_all_configurations_id();
string id_s = convertInt( id );
if( ( *prop_it ).severity > threshold_for_foundproperties ) {
xmlfile << "<property cluster=\"" << ( *prop_it ).cluster << "\" ID=\"" << id_s << "\" >\n "
<< "\t<name>" << " SCA -- Property occurring in all configurations " << "</name>\n "
<< "\t<context FileID=\"" << ( *prop_it ).fileid << "\" FileName=\"" << ( *prop_it ).filename
<< "\" RFL=\"" << ( *prop_it ).RFL << "\" Config=\"" << ( *prop_it ).maxProcs << "x" << ( *prop_it ).maxThreads
<< "\" Region=\"" << ( *prop_it ).region << "\" RegionId=\"" << ( *prop_it ).RegionId << "\">\n "
<< "\t\t<execObj process=\"" << ( *prop_it ).process << "\" thread=\"" << ( *prop_it ).numthreads
<< "\"/>\n " << "\t</context>\n \t<severity>" << double( ( *prop_it ).severity ) << "</severity>\n "
<< "\t<confidence>" << double( ( *prop_it ).confidence ) << "</confidence>\n \t<addInfo>\n "
<< "\t\t";
if( addinfo_name == "" ) {
;
}
else {
xmlfile << "<Property_Name>" << addinfo_name << "</Property_Name>";
}
xmlfile << "\n\t</addInfo>\n </property>\n";
}
else {
;
}
}
}
// std::cout << std::endl;
//Export severity based newly developed property to properties.psc file
for( s_it = severity_based_properties.begin(); s_it != severity_based_properties.end(); ++s_it ) {
// std::cout << " severity_based_properties " << " size = "
// << severity_based_properties.size() << " exec = "
// << ( *s_it ).execTime << " config= "
// << ( *s_it ).maxThreads << " RFL = " << ( *s_it ).RFL
// << " " << ( *s_it ).filename << " region = "
// << ( *s_it ).region << " process = "
// << ( *s_it ).process << " severity = "
// << double( ( *s_it ).severity ) << " cluster = "
// << ( *s_it ).cluster << " ID = " << ( *s_it ).ID << " "
// << ( *s_it ).name << " fileid = " << ( *s_it ).fileid
// << std::endl;
if( ( *s_it ).severity > threshold_for_foundproperties ) {
xmlfile << "<property cluster=\"" << ( *s_it ).cluster << "\" ID=\"" << ( *s_it ).ID << "\" >\n "
<< "\t<name>" << ( *s_it ).name << "</name>\n "
<< "\t<context FileID=\"" << ( *s_it ).fileid << "\" FileName=\"" << ( *s_it ).filename
<< "\" RFL=\"" << ( *s_it ).RFL << "\" Config=\"" << ( *s_it ).maxProcs << "x" << ( *s_it ).maxThreads
<< "\" Region=\"" << ( *s_it ).region << "\" RegionId=\"" << ( *s_it ).RegionId << "\">\n "
<< "\t\t<execObj process=\"" << ( *s_it ).process << "\" thread=\"" << ( *s_it ).numthreads
<< "\"/>\n " << "\t</context>\n \t<severity>" << double( ( *s_it ).severity ) << "</severity>\n "
<< "\t<confidence>" << double( ( *s_it ).confidence ) << "</confidence>\n \t<addInfo>\n "
<< "\t\t";
if( ( *s_it ).addInfo == "" ) {
;
}
else {
xmlfile << ( *s_it ).addInfo;
}
xmlfile << "\n\t</addInfo>\n </property>\n";
}
else {
;
}
}
// std::cout << std::endl;
for( d_it = DeviationProperties.begin(); d_it != DeviationProperties.end(); ++d_it ) {
// std::cout << " DeviationProperties " << " size = "
// << DeviationProperties.size() << " config= "
// << ( *d_it ).maxThreads << " RFL = "
// << ( *d_it ).RFL << " " << ( *d_it ).filename
// << " region = " << ( *d_it ).region
// << " process = " << ( *d_it ).process << " severity = "
// << double( ( *d_it ).severity ) << " cluster = "
// << ( *d_it ).cluster << " ID = " << ( *d_it ).ID << " "
// << ( *d_it ).name << " fileid = " << ( *d_it ).fileid
// << std::endl;
if( ( *d_it ).severity > threshold_for_foundproperties ) {
xmlfile << "<property cluster=\"" << ( *d_it ).cluster << "\" ID=\"" << ( *d_it ).ID << "\" >\n "
<< "\t<name>" << ( *d_it ).name << "</name>\n "
<< "\t<context FileID=\"" << ( *d_it ).fileid << "\" FileName=\"" << ( *d_it ).filename
<< "\" RFL=\"" << ( *d_it ).RFL << "\" Config=\"" << ( *d_it ).maxProcs << "x" << ( *d_it ).maxThreads
<< "\" Region=\"" << ( *d_it ).region << "\" RegionId=\"" << ( *d_it ).RegionId << "\">\n "
<< "\t\t<execObj process=\"" << ( *d_it ).process << "\" thread=\"" << ( *d_it ).numthreads
<< "\"/>\n " << "\t</context>\n \t<severity>" << double( ( *d_it ).severity ) << "</severity>\n "
<< "\t<confidence>" << double( ( *d_it ).confidence ) << "</confidence>\n \t<addInfo>\n "
<< "\t\t";
if( ( *d_it ).addInfo == "" ) {
;
}
else {
xmlfile << ( *d_it ).addInfo;
}
xmlfile << "\n\t</addInfo>\n </property>\n";
}
else {
;
}
}
xmlfile << "</Experiment>" << std::endl;
}
xmlfile.close();
}
//This function calculates the total deviation among the regions;
//it finds the maximum among them; it shows the region with its severity value.
void PeriscopeFrontend::Check_severity_among_parallel_regions( int config ) {
std::list<PropertyInfo>::iterator prop_it, ex_it, p_it;
std::list<PropertyInfo> prop_threadbased;
std::list<long double> RFL_history;
long double total_deviation_time = 0.0;
long double phaseTime = 0.0;
long double parallelTime = 0.0;
bool severity_check = false;
string userregion_filename;
int userregion_fileid;
string userregion_cluster;
string userregion_ID;
string userregion_context;
string userregion_region;
string userregion_RegionId;
double userregion_RFL = 0.0;
int userregion_maxThreads = 0;
int userregion_maxProcs = 0;
int userregion_numthreads = 0;
int userregion_process = 0;
double userregion_confidence = 0.0;
prop_threadbased.clear();
RFL_history.clear();
//Finds the right config based properties and add them in a list;
//calculates the sequential time for parallel regions in the program
for( p_it = properties_.begin(); p_it != properties_.end(); ++p_it ) {
//it should be restricted to only
if( ( *p_it ).maxThreads == config ) {
prop_threadbased.push_back( *p_it );
}
else {
;
}
if( ( ( *p_it ).maxThreads == 1 ) && ( ( *p_it ).region == "PARALLEL_REGION" ||
( *p_it ).region == "DO_REGION" ||
( *p_it ).region == "WORKSHARE_REGION" ) ) {
parallelTime += ( *p_it ).execTime;
}
else {
;
}
}
int config_thread_count = prop_threadbased.size();
//Finds the total deviation time among all the regions
for( ex_it = ExecAndDeviaProperties.begin(); ex_it != ExecAndDeviaProperties.end(); ++ex_it ) {
//convert config to equivalent array.
int config_equiv = 0;
int count = 0;
for( int i = 1; i <= fe->get_ompfinalthreads(); i += i ) {
if( i == config ) {
config_equiv = count;
}
count++;
}
//Get the phasetime for this configuration
if( ( *ex_it ).region == "USER_REGION" ) {
phaseTime = ( *ex_it ).exec_regions[ config_equiv ];
userregion_filename = ( *ex_it ).filename;
userregion_region = ( *ex_it ).region;
userregion_fileid = ( *ex_it ).fileid;
userregion_cluster = ( *ex_it ).cluster;
userregion_RFL = ( *ex_it ).RFL;
userregion_ID = ( *ex_it ).ID;
userregion_context = ( *ex_it ).context;
userregion_maxThreads = ( *ex_it ).maxThreads;
userregion_maxProcs = ( *ex_it ).maxProcs;
userregion_numthreads = ( *ex_it ).numthreads;
userregion_process = ( *ex_it ).process;
userregion_confidence = ( *ex_it ).confidence;
userregion_RegionId = ( *ex_it ).RegionId;
}
else if( ( *ex_it ).region == "MAIN_REGION" ) {
phaseTime = ( *ex_it ).exec_regions[ config_equiv ];
userregion_region = ( *ex_it ).region;
userregion_filename = ( *ex_it ).filename;
userregion_fileid = ( *ex_it ).fileid;
userregion_cluster = ( *ex_it ).cluster;
userregion_RFL = ( *ex_it ).RFL;
userregion_ID = ( *ex_it ).ID;
userregion_context = ( *ex_it ).context;
userregion_maxThreads = ( *ex_it ).maxThreads;
userregion_maxProcs = ( *ex_it ).maxProcs;
userregion_numthreads = ( *ex_it ).numthreads;
userregion_process = ( *ex_it ).process;
userregion_confidence = ( *ex_it ).confidence;
userregion_RegionId = ( *ex_it ).RegionId;
}
else {
;
}
total_deviation_time += ( *ex_it ).devia_regions[ config_equiv ];
}
long double max_deviation_time = 0.0;
PropertyInfo max_info;
for( prop_it = prop_threadbased.begin(); prop_it != prop_threadbased.end(); ++prop_it ) {
//First find for main_region / user_region
config_thread_count--;
bool RFL_check = false;
//Ensure that the RFL is unique
RFL_history.push_back( ( *prop_it ).RFL );
if( ( int )count( RFL_history.begin(), RFL_history.end(), ( *prop_it ).RFL ) > 1 ) {
RFL_check = true;
}
//if((*prop_it).region == "USER_REGION" || (*prop_it).region == "MAIN_REGION" ||
if( ( ( *prop_it ).region == "PARALLEL_REGION" ||
( *prop_it ).region == "WORKSHARE_DO" ||
( *prop_it ).region == "DO_REGION" ||
( *prop_it ).region == "CALL_REGION" ||
( *prop_it ).region == "SUB_REGION" ) && !RFL_check ) {
//check if it matches with devia_properties
string temp_region = ( *prop_it ).region;
double temp_process = ( *prop_it ).process;
int temp_maxThreads = ( *prop_it ).maxThreads;
double temp_RFL = ( *prop_it ).RFL;
int temp_fileid = ( *prop_it ).fileid;
for( ex_it = ExecAndDeviaProperties.begin(); ex_it != ExecAndDeviaProperties.end(); ++ex_it ) {
if( temp_process == ( *ex_it ).process && temp_RFL == ( *ex_it ).RFL
&& ( *ex_it ).fileid == temp_fileid && ( *ex_it ).region == temp_region ) {
//here we have to find the maximal deviation based region
int count = 0;
int config_equiv = 0;
long double devia_time_region = 0.0;
for( int i = 1; i <= fe->get_ompfinalthreads(); i += i ) {
if( i == config ) {
config_equiv = count;
}
count++;
}
devia_time_region = ( *ex_it ).devia_regions[ config_equiv ];
if( devia_time_region > max_deviation_time ) {
max_deviation_time = devia_time_region;
//store the maximal region and its context
max_info.filename = ( *prop_it ).filename;
max_info.context = ( *prop_it ).context;
max_info.region = ( *prop_it ).region;
max_info.cluster = ( *prop_it ).cluster;
int id = Code_region_with_the_lowest_speedup_in_the_run_id();
max_info.ID = convertInt( id );
max_info.fileid = ( *prop_it ).fileid;
max_info.RFL = ( *prop_it ).RFL;
max_info.confidence = ( double )( *prop_it ).confidence;
max_info.maxThreads = config; //config val
max_info.process = ( *prop_it ).process;
max_info.numthreads = ( *prop_it ).numthreads;
max_info.maxProcs = ( *prop_it ).maxProcs;
max_info.RegionId = ( *prop_it ).RegionId;
//here include the property saying that the region had maximal deviation with
//the severity calculated
double severity = 0.0;
double condition = 0.0;
if( config == 1 ) {
max_info.severity = 0.0; //because the deviation is always zero for config 1
}
else {
condition = ( devia_time_region / total_deviation_time ) * 100;
severity = ( devia_time_region / phaseTime ) * 100;
max_info.severity = severity;
}
max_info.name = " SCA -- Code region with the lowest speedup in the run ";
if( condition > 5 ) {
severity_check = true;
}
else {
severity_check = false;
}
}
else {
;
}
break;
}
else {
;
}
}
}
else {
; //for region checks
}
//We need to add in the list which has the maximal deviation
if( severity_check && config_thread_count == 0 ) { //ensure that we are in the final region check process
DeviationProperties.push_back( max_info );
}
}
//Add another property for finding the percentage of the parallelized code
if( config == 1 ) {
PropertyInfo s_info;
s_info.filename = userregion_filename;
s_info.context = userregion_context;
s_info.region = userregion_region;
s_info.cluster = userregion_cluster;
// char buf[ 5 ];
// itoa( Sequential_Computation_id(), buf, 10 );
int id = Sequential_Computation_id();
s_info.ID = convertInt( id );
// std::cout << " SEQUENTIALCOMPUTATION " << id << " s_info " << s_info.ID << std::endl;
s_info.fileid = userregion_fileid;
s_info.RFL = userregion_RFL;
s_info.confidence = userregion_confidence;
s_info.process = userregion_process;
s_info.numthreads = userregion_numthreads;
s_info.maxThreads = userregion_maxThreads;
s_info.maxProcs = userregion_maxProcs;
s_info.severity = ( ( phaseTime - parallelTime ) / phaseTime ) * 100;
s_info.RegionId = userregion_RegionId;
s_info.name = " SCA -- Sequential Computation ";
DeviationProperties.push_back( s_info );
}
else {
;
}
}
//This function find the sequential time for the forwarded existing property
long double PeriscopeFrontend::find_sequential_time( PropertyInfo prop_info ) {
std::list<PropertyInfo>::iterator seq_it;
string region_t = prop_info.region;
string ID_t = prop_info.ID;
string name_t = prop_info.name;
double process_t = prop_info.process;
double RFL_t = prop_info.RFL;
int fileid_t = prop_info.fileid;
//Check all the properties and if it identifies the same property, return its execution time.
for( seq_it = properties_.begin(); seq_it != properties_.end(); ++seq_it ) {
if( region_t == ( *seq_it ).region && process_t == ( *seq_it ).process
&& RFL_t == ( *seq_it ).RFL && fileid_t == ( *seq_it ).fileid
&& ID_t == ( *seq_it ).ID && name_t == ( *seq_it ).name ) {
return ( *seq_it ).execTime;
}
else {
;
}
}
return 0.0;
}
//This function copies properties from thread 2
void PeriscopeFrontend::copy_properties_for_analysis() {
std::list<PropertyInfo>::iterator copy_it;
//Check all the properties and add in the list if the threads are above 2
//Required because the OpenMP properties show up only after thread no. 2
for( copy_it = properties_.begin(); copy_it != properties_.end(); ++copy_it ) {
if( ( *copy_it ).maxThreads > 1 ) {
property_threads.push_back( *copy_it );
p_threads.push_back( *copy_it );
}
else {
;
}
}
}
//This function identifies the existing_properties among threads
void PeriscopeFrontend::find_existing_properties() {
std::list<PropertyInfo>::iterator prop_it, prop_itr;
existing_properties.clear();
int initial_thread = 2;
std::cout << std::endl;
long int count = 0;
for( prop_it = property_threads.begin(); prop_it != property_threads.end(); ++prop_it ) {
//surf within property infos...
//fixing on one propertyInfo, check if we have to include in the list of properties or not.
count++;
if( ( *prop_it ).maxThreads == initial_thread ) {
string temp_region = ( *prop_it ).region;
string temp_name = ( *prop_it ).name;
double temp_severity = double( ( *prop_it ).severity );
double temp_process = ( *prop_it ).process;
int temp_maxThreads = ( *prop_it ).maxThreads;
double temp_RFL = ( *prop_it ).RFL;
int temp_fileid = ( *prop_it ).fileid;
long int count_scaled = 0;
for( int th_number = initial_thread; th_number <= fe->get_ompfinalthreads(); th_number += th_number ) {
long int count_in = 0;
for( prop_itr = p_threads.begin(); prop_itr != p_threads.end(); ++prop_itr ) {
//after storing details, go through all the properties from the point of comparison to compare
//and determine whether that property should be in the list of scalable properties
count_in++; //
if( temp_name == ( *prop_itr ).name && temp_process == ( *prop_itr ).process
&& temp_RFL == ( *prop_itr ).RFL && count_in >= count && temp_fileid == ( *prop_itr ).fileid &&
( *prop_itr ).maxThreads == th_number && ( *prop_itr ).maxThreads != 1 ) {
//For existing_properties checks process here
count_scaled++;
if( ( count_scaled + 1 ) >= fe->get_maxiterations() ) {
string::size_type loc = ( ( *prop_it ).name ).find( ":::::", 0 );
if( loc != string::npos ) {
;
}
else {
existing_properties.push_back( *prop_it );
}
}
break; //need not check for other properties in that thread number
}
else {
;
}
}
}
}
else {
break;
} //not from initial thread
}
}
////Function that converts integer to string
//std::string PeriscopeFrontend::convertInt( int number )
//{
// if( number == 0 ) {
// return "0";
// }
// string temp = "";
// string returnvalue = "";
// while(number > 0) {
// temp += number % 10 + 48;
// number /= 10;
// }
// for( int i = 0; i < temp.length(); i++ ) {
// returnvalue += temp[ temp.length() - i - 1 ];
// }
// return returnvalue;
//}
//Function that converts integer to string
std::string PeriscopeFrontend::convertInt( int number ) {
stringstream ss; //create a stringstream
ss << number; //add number to the stream
return ss.str(); //return a string with the contents of the stream
}
//This function does speedup analysis for every parallel regions
void PeriscopeFrontend::do_speedup_analysis( PropertyInfo prop,
long double seq_time,
const std::string& phase_region ) {
std::list<PropertyInfo>::iterator prop_itr;
std::list<long double>::iterator rt_it;
std::list<long double> temp_PhaseTime;
temp_PhaseTime.clear();
string temp_region = prop.region;
string temp_name = prop.name;
double temp_severity = double( prop.severity );
double temp_process = prop.process;
int temp_maxThreads = prop.maxThreads;
double temp_RFL = prop.RFL;
double severity_for_initialthread = 0.0;
long double PhaseTime = 0.0;
int temp_fileid = prop.fileid;
string temp_ID = prop.ID;
int count_scaled = 0;
int count_execTime = 0;
int count_speedup = 0;
int count_severity = 0;
bool stop_speedup_check = false;
bool stop_tspeedup_check = false;
bool stop_severity_check = false;
bool need_not_list = false;
double t_execTime = 0.0;
double t_severity = 0.0;
int initial_thread = 2;
long double initial_execTime = seq_time;
double speedup_prop = 0.0;
double t_speedup = 0.0;
std::string string_name = " ";
//First initialization
int Max = 10000;
long double* execTime_regions = new long double[ Max ];
long double* deviationTime = new long double[ Max ];
execTime_regions[ 1 ] = initial_execTime;
deviationTime[ 1 ] = 0.0;
if( phase_region == "MAIN_REGION" || phase_region == "USER_REGION" ) {
PhaseTime_user.push_back( initial_execTime );
}
//make a temp list of phaseTime and remove the first one
else if( ( phase_region != "MAIN_REGION" || phase_region != "USER_REGION" )
&& PhaseTime_user.size() > 0 ) {
temp_PhaseTime.assign( PhaseTime_user.begin(), PhaseTime_user.end() );
temp_PhaseTime.pop_front();
}
else {
;
}
for( int th_number = initial_thread; th_number <= fe->get_ompfinalthreads(); th_number += th_number ) {
execTime_regions[ th_number ] = 0.0;
deviationTime[ th_number ] = 0.0;
//For each thread number, we have to calculate the phaseTime
PhaseTime = 0.0;
if( temp_PhaseTime.size() > 0 && PhaseTime_user.size() > 0 ) {
PhaseTime = temp_PhaseTime.front();
temp_PhaseTime.pop_front();
}
else {
;
}
for( prop_itr = property_threads.begin(); prop_itr != property_threads.end(); ++prop_itr ) {
need_not_list = false;
if( temp_process == ( *prop_itr ).process && temp_fileid == ( *prop_itr ).fileid
&& temp_RFL == ( *prop_itr ).RFL && ( *prop_itr ).maxThreads == th_number
&& ( *prop_itr ).maxThreads != 1 && temp_name == ( *prop_itr ).name
&& ( *prop_itr ).ID == temp_ID ) {
//We don't need to add the property relating to execTime
string p_name = ( *prop_itr ).name;
string::size_type loc = p_name.find( ":::::", 0 );
if( loc != string::npos ) {
need_not_list = true;
}
else {
;
}
//we need to get the severity for initial run
if( th_number == initial_thread ) {
severity_for_initialthread = ( *prop_itr ).severity;
}
else {
;
}
count_scaled++;
//the following property should be checked again
//here we have to check if the severity is increasing or not.
if( ( *prop_itr ).severity >= t_severity && stop_severity_check == false ) {
count_severity++;
if( ( count_severity + 1 ) >= fe->get_maxiterations() ) {
//if the severity has continuously increased
PropertyInfo s_info;
s_info.name = " SCA -- Property with increasing severity across configurations ";
s_info.filename = prop.filename;
s_info.context = prop.context;
s_info.region = prop.region;
s_info.cluster = prop.cluster;
int id = Property_with_increasing_severity_across_configurations_id();
s_info.ID = convertInt( id );
s_info.fileid = prop.fileid;
s_info.numthreads = prop.numthreads;
s_info.maxProcs = prop.maxProcs;
s_info.RegionId = prop.RegionId;
//make a definition here
//severity is defined based on how much it increased for this particular property for various threads
s_info.severity = ( prop.severity - severity_for_initialthread );
s_info.RFL = prop.RFL;
s_info.confidence = ( double )prop.confidence;
s_info.maxThreads = th_number; //the property increased till this thread number
string_name = "<prop_name>";
string string_name_end = "</prop_name>";
s_info.addInfo = string_name + prop.name + string_name_end;
s_info.process = prop.process;
if( !need_not_list ) {
severity_based_properties.push_back( s_info );
}
else {
;
}
}
t_severity = ( *prop_itr ).severity;
}
else {
;
}
//Speedup property requirements
speedup_prop = ( long double )initial_execTime / ( double )( *prop_itr ).execTime;
int rounded_speedup = speedup_prop;
double decimal_val = ( double )speedup_prop - rounded_speedup;
if( decimal_val > 0.5 ) {
rounded_speedup++;
}
else {
;
}
//Store the execution time & deviation time for regions
execTime_regions[ th_number ] = ( *prop_itr ).execTime;
if( phase_region == "MAIN_REGION" || phase_region == "USER_REGION" ) {
PhaseTime_user.push_back( ( *prop_itr ).execTime );
}
else {
;
}
if( ( ( *prop_itr ).execTime ) - ( initial_execTime / th_number ) > 0 ) {
deviationTime[ th_number ] = ( ( *prop_itr ).execTime ) - ( initial_execTime / th_number );
}
else {
deviationTime[ th_number ] = 0.0;
}
//Converting double to string
std::ostringstream sstream;
sstream << speedup_prop;
std::string speedup_str = sstream.str();
speedup_str += "";
string speedup_start = "<speedup>";
string speedup_end = "</speedup>";
//Check if this satisfies the linear speedup/superlinear speedup condition (RARELY OCCURS)
if( rounded_speedup == th_number ||
rounded_speedup > th_number &&
stop_speedup_check == false ) {
count_speedup++;
PropertyInfo s_info;
s_info.filename = prop.filename;
s_info.context = prop.context;
s_info.region = prop.region;
s_info.cluster = prop.cluster;
s_info.fileid = prop.fileid;
s_info.severity = 0.0; //severity should be 0.0
s_info.RFL = prop.RFL;
s_info.confidence = ( double )prop.confidence;
s_info.maxThreads = th_number;
s_info.addInfo = speedup_start + speedup_str + speedup_end;
s_info.process = prop.process;
s_info.numthreads = prop.numthreads;
s_info.maxProcs = prop.maxProcs;
s_info.RegionId = prop.RegionId;
if( rounded_speedup > th_number ) {
s_info.name = " SCA -- SuperLinear Speedup for all configurations ";
int id = SuperLinear_Speedup_for_all_configurations_id();
s_info.ID = convertInt( id );
speedup_based_properties.push_back( s_info );
}
else {
;
}
if( ( count_speedup + 1 ) >= fe->get_maxiterations() ) {
//now we shall include a new property saying that the speedup satisfied for all threads
// in the particular RFL
s_info.name = " SCA -- Linear Speedup for all configurations ";
int id = Linear_Speedup_for_all_configurations_id();
s_info.ID = convertInt( id );
speedup_based_properties.push_back( s_info );
}
}
else if( !stop_speedup_check ) {
//speedup fails in linear speedup condition once from the previous runs
stop_speedup_check = true;
//now we shall include a new property saying that the speedup is not satisfied due to these properties
// in the particular RFL
PropertyInfo s_info;
s_info.name = " SCA -- Linear speedup failed for the first time ";
s_info.filename = prop.filename;
s_info.context = prop.context;
s_info.region = prop.region;
s_info.cluster = prop.cluster;
int id = Linear_speedup_failed_for_the_first_time_id();
s_info.ID = convertInt( id );
s_info.fileid = prop.fileid;
if( s_info.region == "MAIN_REGION" || s_info.region == "USER_REGION" ) {
s_info.severity = ( deviationTime[ th_number ] / ( *prop_itr ).execTime ) * 100;
}
else {
s_info.severity = ( deviationTime[ th_number ] / PhaseTime ) * 100;
}
s_info.RFL = prop.RFL;
s_info.confidence = ( double )prop.confidence;
s_info.maxThreads = th_number;
s_info.addInfo = speedup_start + speedup_str + speedup_end;
s_info.process = prop.process;
s_info.numthreads = prop.numthreads;
s_info.maxProcs = prop.maxProcs;
s_info.RegionId = prop.RegionId;
speedup_based_properties.push_back( s_info );
}
else {
;
}
//We shall include a property that reports the low speedup considering every regions
PropertyInfo l_info;
long double l_condition = 0.0;
l_condition = ( deviationTime[ th_number ] / PhaseTime ) * 100;
if( l_condition > 0 ) { //Threshold set to zero (Increase later)
l_info.name = " SCA -- Low Speedup ";
l_info.filename = prop.filename;
l_info.context = prop.context;
l_info.region = prop.region;
l_info.cluster = prop.cluster;
int id = Low_Speedup_id();
l_info.ID = convertInt( id );
l_info.fileid = prop.fileid;
if( l_info.region == "MAIN_REGION" || l_info.region == "USER_REGION" ) {
l_info.severity = ( deviationTime[ th_number ] / ( *prop_itr ).execTime ) * 100;
}
else {
l_info.severity = ( deviationTime[ th_number ] / PhaseTime ) * 100;
}
l_info.RFL = prop.RFL;
l_info.confidence = ( double )prop.confidence;
l_info.maxThreads = th_number;
l_info.addInfo = speedup_start + speedup_str + speedup_end;
l_info.process = prop.process;
l_info.numthreads = prop.numthreads;
l_info.maxProcs = prop.maxProcs;
l_info.RegionId = prop.RegionId;
speedup_based_properties.push_back( l_info );
}
else {
;
}
//Find the thread when the speedup decreased
//if(rounded_speedup < t_speedup && th_number != initial_thread && !stop_tspeedup_check){
if( rounded_speedup < t_speedup && !stop_tspeedup_check ) {
//now we shall include a new property saying that the highest speedup reached until this threadno.
// in the particular RFL
stop_tspeedup_check = true;
PropertyInfo s_info;
s_info.name = " SCA -- Speedup Decreasing ";
s_info.filename = prop.filename;
s_info.context = prop.context;
s_info.region = prop.region;
s_info.cluster = prop.cluster;
int id = Speedup_Decreasing_id();
s_info.ID = convertInt( id );
s_info.fileid = prop.fileid;
if( s_info.region == "MAIN_REGION" || s_info.region == "USER_REGION" ) {
s_info.severity = 0.0;
}
else {
s_info.severity = ( deviationTime[ th_number ] / PhaseTime ) * 100;
}
s_info.RFL = prop.RFL;
s_info.confidence = ( double )prop.confidence;
s_info.maxThreads = th_number;
s_info.addInfo = speedup_start + speedup_str + speedup_end;
s_info.process = prop.process;
s_info.numthreads = prop.numthreads;
s_info.maxProcs = prop.maxProcs;
s_info.RegionId = prop.RegionId;
speedup_based_properties.push_back( s_info );
}
else {
t_speedup = rounded_speedup;
}
break; //need not check for other properties in that thread number
} //if(th_number==)
else {
;
}
} //for all properties_
} //for all threads
PropertyInfo d_info;
d_info.name = " ";
d_info.filename = prop.filename;
d_info.context = prop.context;
d_info.region = prop.region;
d_info.cluster = prop.cluster;
d_info.ID = prop.ID;
d_info.fileid = prop.fileid;
d_info.severity = 0.0;
d_info.RFL = prop.RFL;
d_info.confidence = ( double )prop.confidence;
d_info.maxThreads = prop.maxThreads;
d_info.addInfo = " ";
d_info.execTime = prop.execTime;
d_info.process = prop.process;
d_info.numthreads = prop.numthreads;
d_info.maxProcs = prop.maxProcs;
d_info.RegionId = prop.RegionId;
int count_exec = 0;
long double temp_execTime[ 30 ];
long double temp_deviaTime[ 30 ];
for( int i = 1; i <= fe->get_ompfinalthreads(); i += i ) {
temp_execTime[ count_exec ] = execTime_regions[ i ];
temp_deviaTime[ count_exec ] = deviationTime[ i ];
count_exec++;
}
for( int i = 0; i < count_exec; i++ ) {
d_info.exec_regions[ i ] = temp_execTime[ i ];
d_info.devia_regions[ i ] = temp_deviaTime[ i ];
}
ExecAndDeviaProperties.push_back( d_info );
delete[] execTime_regions;
delete[] deviationTime;
}
PropertyID PeriscopeFrontend::Property_with_increasing_severity_across_configurations_id() {
return PROPERTYWITHINCREASINGSEVERITYACROSSCONFIGURATIONS;
}
PropertyID PeriscopeFrontend::SuperLinear_Speedup_for_all_configurations_id() {
return SUPERLINEARSPEEDUPFORALLCONFIGURATIONS;
}
PropertyID PeriscopeFrontend::Linear_Speedup_for_all_configurations_id() {
return LINEARSPEEDUPFORALLCONFIGURATIONS;
}
PropertyID PeriscopeFrontend::Linear_speedup_failed_for_the_first_time_id() {
return LINEARSPEEDUPFAILEDFORTHEFIRSTTIME;
}
PropertyID PeriscopeFrontend::Low_Speedup_id() {
return LOWSPEEDUP;
}
PropertyID PeriscopeFrontend::Speedup_Decreasing_id() {
return SPEEDUPDECREASING;
}
PropertyID PeriscopeFrontend::Sequential_Computation_id() {
return SEQUENTIALCOMPUTATION;
}
PropertyID PeriscopeFrontend::Code_region_with_the_lowest_speedup_in_the_run_id() {
return CODEREGIONWITHTHELOWESTSPEEDUPINTHERUN;
}
PropertyID PeriscopeFrontend::Property_occurring_in_all_configurations_id() {
return PROPERTYOCCURRINGINALLCONFIGURATIONS;
}
/*
* This function returns the property info as a list using MetaProperty.cc
*/
void PeriscopeFrontend::get_prop_info( MetaProperty& prop ) {
PropertyInfo info;
info.filename = prop.getFileName();
info.name = prop.getName();
info.region = prop.getRegionType();
if( prop.getCluster() ) {
info.cluster = "true";
}
else {
info.cluster = "false";
}
info.ID = prop.getId();
info.RegionId = prop.getRegionId();
info.Config = prop.getConfiguration();
info.fileid = prop.getFileId();
info.RFL = prop.getStartPosition();
info.process = prop.getProcess();
info.numthreads = prop.getThread();
info.severity = prop.getSeverity();
info.confidence = prop.getConfidence();
info.maxThreads = prop.getMaxThreads();
info.maxProcs = prop.getMaxProcs();
info.purpose = prop.getPurpose();
//To find info.execTime
addInfoType addInfo = prop.getExtraInfo();
addInfoType::const_iterator it = addInfo.find( "ExecTime" );
string addInfo_ExecTime = it->second;
info.execTime = atof( addInfo_ExecTime.c_str() );
//To find info.addInfo
string addInfo_str;
for( addInfoType::const_iterator it = addInfo.begin(); it != addInfo.end(); ++it ) {
addInfo_str = "\t\t<";
addInfo_str += it->first;
addInfo_str += ">";
addInfo_str += it->second;
addInfo_str += "</";
addInfo_str += it->first;
addInfo_str += ">\n";
}
//Add in the list of properties
if( info.execTime == 0 && ( info.region == "SUB_REGION" || info.region == "CALL_REGION" ) ) {
;
}
else {
property.push_back( info );
properties_.push_back( info );
}
}
void PeriscopeFrontend::reinit( int map_len,
int map_from[ 8192 ],
int map_to[ 8192 ] ) {
std::map<std::string, AgentInfo>::iterator it;
for( it = child_agents_.begin(); it != child_agents_.end(); it++ ) {
AgentInfo& ag = it->second;
if( ag.status != AgentInfo::CONNECTED ) {
if( connect_to_child( &ag ) == -1 ) {
psc_errmsg( "Error connecting to child\n" );
abort();
}
else {
psc_dbgmsg( 5, "Sending REINIT command...\n" );
ag.handler->reinit( map_len, map_from, map_to );
psc_dbgmsg( 5, "Sending REINIT command...OK\n" );
}
}
}
}
std::ostream& operator<<( std::ostream& os,
const PropertyInfo& info ) {
os << endl;
os << "Property '" << info.name << "'" << endl;
os << " holds for '" << info.context << "'" << endl;
os << " on '" << info.host << "'" << endl;
os << " severity " << setprecision( 5 ) << info.severity << ", confidence " << info.confidence;
return os;
}
bool sevComparator( MetaProperty p1,
MetaProperty p2 ) {
return p1.getSeverity() > p2.getSeverity();
}
/**
* @brief Prints all found properties
*
*/
void PeriscopeFrontend::properties() {
int limitProps = 50;
if( opts.has_nrprops ) {
limitProps = opts.nrprops;
}
if( limitProps > 0 ) {
std::cout << std::endl << "ALL FOUND PROPERTIES" << std::endl;
std::cout << "-------------------------------------------------------------------------------\n";
// std::cout << std::setw(7) << "Procs\t" << std::setw(7) << "Threads\t"
// << std::setw(13) << "Region\t" << std::setw(12) << "Location\t"
// << std::setw(10) << "Severity\t" << "Description" << std::endl;
std::cout << std::setw(7) << "Procs\t" << std::setw(13) << "Region\t"
<< std::setw(12) << "Location\t" << std::setw(10)
<< "Severity\t" << "Description" << std::endl;
std::cout << "-------------------------------------------------------------------------------\n";
//metaproperties_.sort(sevComparator);
std::sort( metaproperties_.begin(), metaproperties_.end(), sevComparator );
//for(std::list<MetaProperty>::iterator it = metaproperties_.begin(); ( it != metaproperties_.end() && limitProps > 0) ; it++, limitProps-- ){
for( int i = 0; i < metaproperties_.size() && limitProps > 0; i++, limitProps-- ) {
string prop_string = ( metaproperties_[ i ] ).toString();
string::size_type p_loc = prop_string.find( ":::::", 0 );
// Exclude internal properties used to calculate the execution time for the scalability analysis
if( p_loc != string::npos ) {
;
}
else {
std::cout << prop_string << std::endl;
}
}
//prompt();
}
}
/**
* @brief Export all found properties to a file
*
* Exports all found properties to a file in XML format.
* The filename can be specified using the --propfile command argument.
*/
void PeriscopeFrontend::export_properties() {
std::string propfilename = fe->get_outfilename();
std::ofstream xmlfile( propfilename.c_str() );
if( !xmlfile && opts.has_propfile ) {
std::cout << "Cannot open xmlfile. \n";
exit( 1 );
}
if( xmlfile ) {
psc_infomsg( "Exporting results to %s\n", propfilename.c_str() );
time_t rawtime;
tm* timeinfo;
time( &rawtime );
timeinfo = localtime( &rawtime );
xmlfile << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl;
xmlfile << "<Experiment xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
"xmlns=\"http://www.lrr.in.tum.de/Periscope\" "
"xsi:schemaLocation=\"http://www.lrr.in.tum.de/Periscope psc_properties.xsd \">"
<< std::endl << std::endl;
xmlfile << std::setfill( '0' );
xmlfile << " <date>" << std::setw( 4 ) << ( timeinfo->tm_year + 1900 )
<< "-" << std::setw( 2 ) << timeinfo->tm_mon + 1 << "-" << std::setw( 2 )
<< timeinfo->tm_mday << "</date>" << std::endl;
xmlfile << " <time>" << std::setw( 2 ) << timeinfo->tm_hour << ":"
<< std::setw( 2 ) << timeinfo->tm_min << ":" << std::setw( 2 )
<< timeinfo->tm_sec << "</time>" << std::endl;
xmlfile << " <numProcs>" << opts.mpinumprocs_string << "</numProcs>" << std::endl;
xmlfile << " <numThreads>" << opts.ompnumthreads_string << "</numThreads>" << std::endl;
// Wording directory for the experiment: can be used to find the data file(s)
char* cwd = getenv( "PWD" );
xmlfile << " <dir>" << cwd << "</dir>" << std::endl;
// Source revision
if( opts.has_srcrev ) {
// Source revision
xmlfile << " <rev>" << opts.srcrev << "</rev>" << std::endl;
}
// Empty line before the properties
xmlfile << std::endl;
for( int i = 0; i < metaproperties_.size(); i++ ) {
string prop_string = ( metaproperties_[ i ] ).toString();
string::size_type p_loc = prop_string.find( ":::::", 0 );
// Exclude internal properties used to calculate the execution time for the scalability analysis
if( p_loc != string::npos ) {
;
}
else {
xmlfile << ( metaproperties_[ i ] ).toXML();
}
}
xmlfile << "</Experiment>" << std::endl;
}
xmlfile.close();
}
/**
* @brief Checks all child agents for new properties
*
* Triggers connection to all lower level agents and
* checks if new properties are available.
*/
void PeriscopeFrontend::check() {
std::map<std::string, AgentInfo>::iterator it;
for( it = child_agents_.begin(); it != child_agents_.end(); it++ ) {
AgentInfo& ag = it->second;
if( ag.status != AgentInfo::CONNECTED ) {
if( connect_to_child( &ag ) == -1 ) {
psc_errmsg( "Error connecting to child\n" );
abort();
}
else {
psc_dbgmsg( 1, "Checking properties...\n" );
ag.handler->check();
}
}
}
}
int PeriscopeFrontend::read_line( ACE_HANDLE hdle,
char* buf,
int len ) {
int eoln = 0;
while( !eoln && ( len > 0 ) && ( ACE::recv( hdle, buf, 1 ) == 1 ) ) {
eoln = ( *buf == '\n' );
buf++;
len--;
}
return eoln;
}
/**
* @deprecated Properties are transmitted/processed using XML
* @brief Prints the found performance property
*
* This method is called whenever a new performance property is found
*
* @param prop performance property to print
*/
void PeriscopeFrontend::found_property( PropertyInfo& prop ) {
std::cout << prop.name << "\t" << prop.context << "\t" << prop.host << "\t"
<< prop.severity << std::endl;
prompt();
}
/**
* @brief Processes the found performance property
*
* This method is called whenever a new performance property is found.
* This new property is added to a list containing all properties.
*
* @param propData performance property (as string)
*/
void PeriscopeFrontend::found_property( std::string& propData ) {
metaproperties_.push_back( MetaProperty::fromXML( propData ) );
}
void PeriscopeFrontend::set_timer( int init,
int inter,
int max,
TimerAction ta ) {
ACE_Reactor* reactor = ACE_Event_Handler::reactor();
ACE_Time_Value initial( init );
ACE_Time_Value interval( inter );
reactor->schedule_timer( this, 0, initial, interval );
ACE_Time_Value timeout = ACE_OS::gettimeofday();
timeout += max;
set_timeout( timeout );
timer_action = ta;
}
std::string region2string( int fid, int rfl ) {
std::stringstream info;
std::string str;
info << ":" << fid << ":" << rfl << ":";
str = info.str();
return str;
}
bool applUninstrumented() {
if( opts.has_uninstrumented ) {
return true;
}
if( psc_config_open() ) {
if( psc_config_uninstrumented() ) {
return true;
}
psc_config_close();
}
if( getenv( "PSC_UNINSTRUMENTED" ) ) {
return true;
}
return false;
}
| 39.63146 | 150 | 0.513987 |
97d3a473e807c175f2b8a7b3a177cf074cb02032 | 734 | cpp | C++ | qpropgen/templates/template.cpp | agateau/qpropgen | 2eaf65b3b75f63ab97560f86820542f5c17f8c31 | [
"Apache-2.0"
] | 12 | 2018-11-12T17:03:55.000Z | 2020-10-04T22:07:30.000Z | qpropgen/templates/template.cpp | agateau/qpropgen | 2eaf65b3b75f63ab97560f86820542f5c17f8c31 | [
"Apache-2.0"
] | 2 | 2021-03-25T21:40:45.000Z | 2021-04-05T15:09:49.000Z | qpropgen/templates/template.cpp | agateau/qpropgen | 2eaf65b3b75f63ab97560f86820542f5c17f8c31 | [
"Apache-2.0"
] | 1 | 2018-11-12T17:03:55.000Z | 2018-11-12T17:03:55.000Z | // {{ autogenerated_disclaimer }}
#include <{{ header }}>
{{ className }}::{{ className }}(QObject* parent)
: {{ baseClassName }}(parent) {
}
{% for property in properties if not property.impl == 'pure' %}
{{ property.type }} {{ className }}::{{ property.name }}() const {
return {{ property.varName }};
}
{%- if property.mutability != 'constant' %}
void {{ className }}::{{ property.setterName }}({{ property.argType }} value) {
{% if property.type == 'qreal' %}
if (qFuzzyCompare({{ property.varName }}, value)) {
{% else %}
if ({{ property.varName }} == value) {
{% endif %}
return;
}
{{ property.varName }} = value;
{{ property.name }}Changed(value);
}
{%- endif %}
{% endfor %}
| 27.185185 | 79 | 0.565395 |
97d7efd77beeeeec4732ac4a9bf9bca300083188 | 448,316 | cc | C++ | src/cuda-11.0/sparse_main.cc | dgSPARSE/dgSPARSE-Wrapper | d1aa92db1598487a13099388251f522b51cee0f0 | [
"Apache-2.0"
] | 7 | 2021-07-01T13:22:12.000Z | 2021-07-06T06:44:37.000Z | src/cuda-11.0/sparse_main.cc | dgSPARSE/dgSPARSE-Wrapper | d1aa92db1598487a13099388251f522b51cee0f0 | [
"Apache-2.0"
] | null | null | null | src/cuda-11.0/sparse_main.cc | dgSPARSE/dgSPARSE-Wrapper | d1aa92db1598487a13099388251f522b51cee0f0 | [
"Apache-2.0"
] | null | null | null | #include <string.h>
#include "cuda-11.0/cusparse_v2.h"
#include "dgsparse/dgsparse.h"
#include "symbol_helper_cusparse.h"
#pragma GCC diagnostic ignored "-Wpointer-arith"
#define DGSPARSE
using namespace sparse_wrapper;
cusparseStatus_t CUSPARSEAPI
cusparseCreate(cusparseHandle_t *handle) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreate);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroy(cusparseHandle_t handle) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroy);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle);
}
cusparseStatus_t CUSPARSEAPI
cusparseGetVersion(cusparseHandle_t handle,
int *version) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseGetVersion);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
version);
}
cusparseStatus_t CUSPARSEAPI
cusparseGetProperty(libraryPropertyType type,
int *value) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseGetProperty);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(type, value);
}
const char *CUSPARSEAPI
cusparseGetErrorName(cusparseStatus_t status) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseGetErrorName);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(status);
}
const char *CUSPARSEAPI
cusparseGetErrorString(cusparseStatus_t status) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseGetErrorString);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(status);
}
cusparseStatus_t CUSPARSEAPI
cusparseSetStream(cusparseHandle_t handle,
cudaStream_t streamId) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSetStream);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
streamId);
}
cusparseStatus_t CUSPARSEAPI
cusparseGetStream(cusparseHandle_t handle,
cudaStream_t *streamId) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseGetStream);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
streamId);
}
cusparseStatus_t CUSPARSEAPI
cusparseGetPointerMode(cusparseHandle_t handle,
cusparsePointerMode_t *mode) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseGetPointerMode);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
mode);
}
cusparseStatus_t CUSPARSEAPI
cusparseSetPointerMode(cusparseHandle_t handle,
cusparsePointerMode_t mode) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSetPointerMode);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
mode);
}
//##############################################################################
//# HELPER ROUTINES
//##############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseCreateMatDescr(cusparseMatDescr_t *descrA) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateMatDescr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(descrA);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroyMatDescr(cusparseMatDescr_t descrA) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroyMatDescr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(descrA);
}
cusparseStatus_t CUSPARSEAPI
cusparseCopyMatDescr(cusparseMatDescr_t dest,
const cusparseMatDescr_t src) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCopyMatDescr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(dest,
src);
}
cusparseStatus_t CUSPARSEAPI
cusparseSetMatType(cusparseMatDescr_t descrA,
cusparseMatrixType_t type) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSetMatType);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(descrA,
type);
}
cusparseMatrixType_t CUSPARSEAPI
cusparseGetMatType(const cusparseMatDescr_t descrA) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseGetMatType);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(descrA);
}
cusparseStatus_t CUSPARSEAPI
cusparseSetMatFillMode(cusparseMatDescr_t descrA,
cusparseFillMode_t fillMode) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSetMatFillMode);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(descrA,
fillMode);
}
cusparseFillMode_t CUSPARSEAPI
cusparseGetMatFillMode(const cusparseMatDescr_t descrA) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseGetMatFillMode);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(descrA);
}
cusparseStatus_t CUSPARSEAPI
cusparseSetMatDiagType(cusparseMatDescr_t descrA,
cusparseDiagType_t diagType) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSetMatDiagType);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(descrA,
diagType);
}
cusparseDiagType_t CUSPARSEAPI
cusparseGetMatDiagType(const cusparseMatDescr_t descrA) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseGetMatDiagType);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(descrA);
}
cusparseStatus_t CUSPARSEAPI
cusparseSetMatIndexBase(cusparseMatDescr_t descrA,
cusparseIndexBase_t base) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSetMatIndexBase);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(descrA,
base);
}
cusparseIndexBase_t CUSPARSEAPI
cusparseGetMatIndexBase(const cusparseMatDescr_t descrA) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseGetMatIndexBase);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(descrA);
}
cusparseStatus_t CUSPARSEAPI
cusparseCreateCsrsv2Info(csrsv2Info_t *info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateCsrsv2Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroyCsrsv2Info(csrsv2Info_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroyCsrsv2Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseCreateCsric02Info(csric02Info_t *info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateCsric02Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroyCsric02Info(csric02Info_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroyCsric02Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseCreateBsric02Info(bsric02Info_t *info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateBsric02Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroyBsric02Info(bsric02Info_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroyBsric02Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseCreateCsrilu02Info(csrilu02Info_t *info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateCsrilu02Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroyCsrilu02Info(csrilu02Info_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroyCsrilu02Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseCreateBsrilu02Info(bsrilu02Info_t *info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateBsrilu02Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroyBsrilu02Info(bsrilu02Info_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroyBsrilu02Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseCreateBsrsv2Info(bsrsv2Info_t *info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateBsrsv2Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroyBsrsv2Info(bsrsv2Info_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroyBsrsv2Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseCreateBsrsm2Info(bsrsm2Info_t *info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateBsrsm2Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroyBsrsm2Info(bsrsm2Info_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroyBsrsm2Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseCreateCsru2csrInfo(csru2csrInfo_t *info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateCsru2csrInfo);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroyCsru2csrInfo(csru2csrInfo_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroyCsru2csrInfo);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseCreateColorInfo(cusparseColorInfo_t *info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateColorInfo);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroyColorInfo(cusparseColorInfo_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroyColorInfo);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseSetColorAlgs(cusparseColorInfo_t info,
cusparseColorAlg_t alg) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSetColorAlgs);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info, alg);
}
cusparseStatus_t CUSPARSEAPI
cusparseGetColorAlgs(cusparseColorInfo_t info,
cusparseColorAlg_t *alg) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseGetColorAlgs);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info, alg);
}
cusparseStatus_t CUSPARSEAPI
cusparseCreatePruneInfo(pruneInfo_t *info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreatePruneInfo);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroyPruneInfo(pruneInfo_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroyPruneInfo);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
//##############################################################################
//# SPARSE LEVEL 1 ROUTINES
//##############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseSaxpyi(cusparseHandle_t handle,
int nnz,
const float *alpha,
const float *xVal,
const int *xInd,
float *y,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSaxpyi);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
alpha,
xVal,
xInd,
y,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseDaxpyi(cusparseHandle_t handle,
int nnz,
const double *alpha,
const double *xVal,
const int *xInd,
double *y,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDaxpyi);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
alpha,
xVal,
xInd,
y,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseCaxpyi(cusparseHandle_t handle,
int nnz,
const cuComplex *alpha,
const cuComplex *xVal,
const int *xInd,
cuComplex *y,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCaxpyi);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
alpha,
xVal,
xInd,
y,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseZaxpyi(cusparseHandle_t handle,
int nnz,
const cuDoubleComplex *alpha,
const cuDoubleComplex *xVal,
const int *xInd,
cuDoubleComplex *y,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZaxpyi);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
alpha,
xVal,
xInd,
y,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgthr(cusparseHandle_t handle,
int nnz,
const float *y,
float *xVal,
const int *xInd,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgthr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
y,
xVal,
xInd,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgthr(cusparseHandle_t handle,
int nnz,
const double *y,
double *xVal,
const int *xInd,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgthr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
y,
xVal,
xInd,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgthr(cusparseHandle_t handle,
int nnz,
const cuComplex *y,
cuComplex *xVal,
const int *xInd,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgthr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
y,
xVal,
xInd,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgthr(cusparseHandle_t handle,
int nnz,
const cuDoubleComplex *y,
cuDoubleComplex *xVal,
const int *xInd,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgthr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
y,
xVal,
xInd,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgthrz(cusparseHandle_t handle,
int nnz,
float *y,
float *xVal,
const int *xInd,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgthrz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
y,
xVal,
xInd,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgthrz(cusparseHandle_t handle,
int nnz,
double *y,
double *xVal,
const int *xInd,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgthrz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
y,
xVal,
xInd,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgthrz(cusparseHandle_t handle,
int nnz,
cuComplex *y,
cuComplex *xVal,
const int *xInd,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgthrz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
y,
xVal,
xInd,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgthrz(cusparseHandle_t handle,
int nnz,
cuDoubleComplex *y,
cuDoubleComplex *xVal,
const int *xInd,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgthrz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
y,
xVal,
xInd,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseSsctr(cusparseHandle_t handle,
int nnz,
const float *xVal,
const int *xInd,
float *y,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSsctr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
xVal,
xInd,
y,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseDsctr(cusparseHandle_t handle,
int nnz,
const double *xVal,
const int *xInd,
double *y,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDsctr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
xVal,
xInd,
y,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseCsctr(cusparseHandle_t handle,
int nnz,
const cuComplex *xVal,
const int *xInd,
cuComplex *y,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCsctr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
xVal,
xInd,
y,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseZsctr(cusparseHandle_t handle,
int nnz,
const cuDoubleComplex *xVal,
const int *xInd,
cuDoubleComplex *y,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZsctr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
xVal,
xInd,
y,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseSroti(cusparseHandle_t handle,
int nnz,
float *xVal,
const int *xInd,
float *y,
const float *c,
const float *s,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSroti);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
xVal,
xInd,
y,
c,
s,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseDroti(cusparseHandle_t handle,
int nnz,
double *xVal,
const int *xInd,
double *y,
const double *c,
const double *s,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDroti);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
nnz,
xVal,
xInd,
y,
c,
s,
idxBase);
}
//##############################################################################
//# SPARSE LEVEL 2 ROUTINES
//##############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseSgemvi(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int n,
const float *alpha,
const float *A,
int lda,
int nnz,
const float *xVal,
const int *xInd,
const float *beta,
float *y,
cusparseIndexBase_t idxBase,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgemvi);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
n,
alpha,
A,
lda,
nnz,
xVal,
xInd,
beta,
y,
idxBase,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgemvi_bufferSize(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int n,
int nnz,
int *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgemvi_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
n,
nnz,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgemvi(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int n,
const double *alpha,
const double *A,
int lda,
int nnz,
const double *xVal,
const int *xInd,
const double *beta,
double *y,
cusparseIndexBase_t idxBase,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgemvi);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
n,
alpha,
A,
lda,
nnz,
xVal,
xInd,
beta,
y,
idxBase,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgemvi_bufferSize(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int n,
int nnz,
int *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgemvi_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
n,
nnz,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgemvi(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int n,
const cuComplex *alpha,
const cuComplex *A,
int lda,
int nnz,
const cuComplex *xVal,
const int *xInd,
const cuComplex *beta,
cuComplex *y,
cusparseIndexBase_t idxBase,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgemvi);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
n,
alpha,
A,
lda,
nnz,
xVal,
xInd,
beta,
y,
idxBase,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgemvi_bufferSize(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int n,
int nnz,
int *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgemvi_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
n,
nnz,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgemvi(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int n,
const cuDoubleComplex *alpha,
const cuDoubleComplex *A,
int lda,
int nnz,
const cuDoubleComplex *xVal,
const int *xInd,
const cuDoubleComplex *beta,
cuDoubleComplex *y,
cusparseIndexBase_t idxBase,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgemvi);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
n,
alpha,
A,
lda,
nnz,
xVal,
xInd,
beta,
y,
idxBase,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgemvi_bufferSize(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int n,
int nnz,
int *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgemvi_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
n,
nnz,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseCsrmvEx_bufferSize(cusparseHandle_t handle,
cusparseAlgMode_t alg,
cusparseOperation_t transA,
int m,
int n,
int nnz,
const void *alpha,
cudaDataType alphatype,
const cusparseMatDescr_t descrA,
const void *csrValA,
cudaDataType csrValAtype,
const int *csrRowPtrA,
const int *csrColIndA,
const void *x,
cudaDataType xtype,
const void *beta,
cudaDataType betatype,
void *y,
cudaDataType ytype,
cudaDataType executiontype,
size_t *bufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCsrmvEx_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
alg,
transA,
m,
n,
nnz,
alpha,
alphatype,
descrA,
csrValA,
csrValAtype,
csrRowPtrA,
csrColIndA,
x,
xtype,
beta,
betatype,
y,
ytype,
executiontype,
bufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCsrmvEx(cusparseHandle_t handle,
cusparseAlgMode_t alg,
cusparseOperation_t transA,
int m,
int n,
int nnz,
const void *alpha,
cudaDataType alphatype,
const cusparseMatDescr_t descrA,
const void *csrValA,
cudaDataType csrValAtype,
const int *csrRowPtrA,
const int *csrColIndA,
const void *x,
cudaDataType xtype,
const void *beta,
cudaDataType betatype,
void *y,
cudaDataType ytype,
cudaDataType executiontype,
void *buffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCsrmvEx);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
alg,
transA,
m,
n,
nnz,
alpha,
alphatype,
descrA,
csrValA,
csrValAtype,
csrRowPtrA,
csrColIndA,
x,
xtype,
beta,
betatype,
y,
ytype,
executiontype,
buffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsrmv(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nb,
int nnzb,
const float *alpha,
const cusparseMatDescr_t descrA,
const float *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
const float *x,
const float *beta,
float *y) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrmv);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
x,
beta,
y);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrmv(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nb,
int nnzb,
const double *alpha,
const cusparseMatDescr_t descrA,
const double *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
const double *x,
const double *beta,
double *y) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrmv);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
x,
beta,
y);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrmv(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nb,
int nnzb,
const cuComplex *alpha,
const cusparseMatDescr_t descrA,
const cuComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
const cuComplex *x,
const cuComplex *beta,
cuComplex *y) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrmv);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
x,
beta,
y);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrmv(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nb,
int nnzb,
const cuDoubleComplex *alpha,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
const cuDoubleComplex *x,
const cuDoubleComplex *beta,
cuDoubleComplex *y) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrmv);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
x,
beta,
y);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsrxmv(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int sizeOfMask,
int mb,
int nb,
int nnzb,
const float *alpha,
const cusparseMatDescr_t descrA,
const float *bsrSortedValA,
const int *bsrSortedMaskPtrA,
const int *bsrSortedRowPtrA,
const int *bsrSortedEndPtrA,
const int *bsrSortedColIndA,
int blockDim,
const float *x,
const float *beta,
float *y) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrxmv);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
sizeOfMask,
mb,
nb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedMaskPtrA,
bsrSortedRowPtrA,
bsrSortedEndPtrA,
bsrSortedColIndA,
blockDim,
x,
beta,
y);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrxmv(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int sizeOfMask,
int mb,
int nb,
int nnzb,
const double *alpha,
const cusparseMatDescr_t descrA,
const double *bsrSortedValA,
const int *bsrSortedMaskPtrA,
const int *bsrSortedRowPtrA,
const int *bsrSortedEndPtrA,
const int *bsrSortedColIndA,
int blockDim,
const double *x,
const double *beta,
double *y) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrxmv);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
sizeOfMask,
mb,
nb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedMaskPtrA,
bsrSortedRowPtrA,
bsrSortedEndPtrA,
bsrSortedColIndA,
blockDim,
x,
beta,
y);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrxmv(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int sizeOfMask,
int mb,
int nb,
int nnzb,
const cuComplex *alpha,
const cusparseMatDescr_t descrA,
const cuComplex *bsrSortedValA,
const int *bsrSortedMaskPtrA,
const int *bsrSortedRowPtrA,
const int *bsrSortedEndPtrA,
const int *bsrSortedColIndA,
int blockDim,
const cuComplex *x,
const cuComplex *beta,
cuComplex *y) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrxmv);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
sizeOfMask,
mb,
nb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedMaskPtrA,
bsrSortedRowPtrA,
bsrSortedEndPtrA,
bsrSortedColIndA,
blockDim,
x,
beta,
y);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrxmv(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int sizeOfMask,
int mb,
int nb,
int nnzb,
const cuDoubleComplex *alpha,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *bsrSortedValA,
const int *bsrSortedMaskPtrA,
const int *bsrSortedRowPtrA,
const int *bsrSortedEndPtrA,
const int *bsrSortedColIndA,
int blockDim,
const cuDoubleComplex *x,
const cuDoubleComplex *beta,
cuDoubleComplex *y) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrxmv);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
sizeOfMask,
mb,
nb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedMaskPtrA,
bsrSortedRowPtrA,
bsrSortedEndPtrA,
bsrSortedColIndA,
blockDim,
x,
beta,
y);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcsrsv2_zeroPivot(cusparseHandle_t handle,
csrsv2Info_t info,
int *position) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcsrsv2_zeroPivot);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
position);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsrsv2_bufferSize(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const cusparseMatDescr_t descrA,
float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrsv2_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrsv2_bufferSize(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const cusparseMatDescr_t descrA,
double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrsv2_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrsv2_bufferSize(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrsv2_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrsv2_bufferSize(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrsv2_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsrsv2_bufferSizeExt(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const cusparseMatDescr_t descrA,
float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrsv2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrsv2_bufferSizeExt(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const cusparseMatDescr_t descrA,
double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrsv2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrsv2_bufferSizeExt(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrsv2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrsv2_bufferSizeExt(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrsv2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsrsv2_analysis(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrsv2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrsv2_analysis(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrsv2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrsv2_analysis(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrsv2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrsv2_analysis(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrsv2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsrsv2_solve(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const float *alpha,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
const float *f,
float *x,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrsv2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
f,
x,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrsv2_solve(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const double *alpha,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
const double *f,
double *x,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrsv2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
f,
x,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrsv2_solve(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const cuComplex *alpha,
const cusparseMatDescr_t descrA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
const cuComplex *f,
cuComplex *x,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrsv2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
f,
x,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrsv2_solve(cusparseHandle_t handle,
cusparseOperation_t transA,
int m,
int nnz,
const cuDoubleComplex *alpha,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrsv2Info_t info,
const cuDoubleComplex *f,
cuDoubleComplex *x,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrsv2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
transA,
m,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
f,
x,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseXbsrsv2_zeroPivot(cusparseHandle_t handle,
bsrsv2Info_t info,
int *position) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXbsrsv2_zeroPivot);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
position);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsrsv2_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
float *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
bsrsv2Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrsv2_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrsv2_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
double *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
bsrsv2Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrsv2_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrsv2_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
bsrsv2Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrsv2_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrsv2_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuDoubleComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
bsrsv2Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrsv2_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsrsv2_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
float *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockSize,
bsrsv2Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrsv2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrsv2_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
double *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockSize,
bsrsv2Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrsv2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrsv2_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockSize,
bsrsv2Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrsv2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrsv2_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuDoubleComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockSize,
bsrsv2Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrsv2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsrsv2_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
const float *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
bsrsv2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrsv2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrsv2_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
const double *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
bsrsv2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrsv2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrsv2_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
const cuComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
bsrsv2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrsv2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrsv2_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
bsrsv2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrsv2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsrsv2_solve(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const float *alpha,
const cusparseMatDescr_t descrA,
const float *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
bsrsv2Info_t info,
const float *f,
float *x,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrsv2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
info,
f,
x,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrsv2_solve(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const double *alpha,
const cusparseMatDescr_t descrA,
const double *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
bsrsv2Info_t info,
const double *f,
double *x,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrsv2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
info,
f,
x,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrsv2_solve(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const cuComplex *alpha,
const cusparseMatDescr_t descrA,
const cuComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
bsrsv2Info_t info,
const cuComplex *f,
cuComplex *x,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrsv2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
info,
f,
x,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrsv2_solve(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
int mb,
int nnzb,
const cuDoubleComplex *alpha,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
bsrsv2Info_t info,
const cuDoubleComplex *f,
cuDoubleComplex *x,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrsv2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
mb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
info,
f,
x,
policy,
pBuffer);
}
//##############################################################################
//# SPARSE LEVEL 3 ROUTINES
//##############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseSbsrmm(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transB,
int mb,
int n,
int kb,
int nnzb,
const float *alpha,
const cusparseMatDescr_t descrA,
const float *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
const int blockSize,
const float *B,
const int ldb,
const float *beta,
float *C,
int ldc) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrmm);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transB,
mb,
n,
kb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockSize,
B,
ldb,
beta,
C,
ldc);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrmm(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transB,
int mb,
int n,
int kb,
int nnzb,
const double *alpha,
const cusparseMatDescr_t descrA,
const double *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
const int blockSize,
const double *B,
const int ldb,
const double *beta,
double *C,
int ldc) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrmm);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transB,
mb,
n,
kb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockSize,
B,
ldb,
beta,
C,
ldc);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrmm(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transB,
int mb,
int n,
int kb,
int nnzb,
const cuComplex *alpha,
const cusparseMatDescr_t descrA,
const cuComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
const int blockSize,
const cuComplex *B,
const int ldb,
const cuComplex *beta,
cuComplex *C,
int ldc) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrmm);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transB,
mb,
n,
kb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockSize,
B,
ldb,
beta,
C,
ldc);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrmm(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transB,
int mb,
int n,
int kb,
int nnzb,
const cuDoubleComplex *alpha,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
const int blockSize,
const cuDoubleComplex *B,
const int ldb,
const cuDoubleComplex *beta,
cuDoubleComplex *C,
int ldc) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrmm);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transB,
mb,
n,
kb,
nnzb,
alpha,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockSize,
B,
ldb,
beta,
C,
ldc);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgemmi(cusparseHandle_t handle,
int m,
int n,
int k,
int nnz,
const float *alpha,
const float *A,
int lda,
const float *cscValB,
const int *cscColPtrB,
const int *cscRowIndB,
const float *beta,
float *C,
int ldc) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgemmi);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
k,
nnz,
alpha,
A,
lda,
cscValB,
cscColPtrB,
cscRowIndB,
beta,
C,
ldc);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgemmi(cusparseHandle_t handle,
int m,
int n,
int k,
int nnz,
const double *alpha,
const double *A,
int lda,
const double *cscValB,
const int *cscColPtrB,
const int *cscRowIndB,
const double *beta,
double *C,
int ldc) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgemmi);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
k,
nnz,
alpha,
A,
lda,
cscValB,
cscColPtrB,
cscRowIndB,
beta,
C,
ldc);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgemmi(cusparseHandle_t handle,
int m,
int n,
int k,
int nnz,
const cuComplex *alpha,
const cuComplex *A,
int lda,
const cuComplex *cscValB,
const int *cscColPtrB,
const int *cscRowIndB,
const cuComplex *beta,
cuComplex *C,
int ldc) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgemmi);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
k,
nnz,
alpha,
A,
lda,
cscValB,
cscColPtrB,
cscRowIndB,
beta,
C,
ldc);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgemmi(cusparseHandle_t handle,
int m,
int n,
int k,
int nnz,
const cuDoubleComplex *alpha,
const cuDoubleComplex *A,
int lda,
const cuDoubleComplex *cscValB,
const int *cscColPtrB,
const int *cscRowIndB,
const cuDoubleComplex *beta,
cuDoubleComplex *C,
int ldc) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgemmi);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
k,
nnz,
alpha,
A,
lda,
cscValB,
cscColPtrB,
cscRowIndB,
beta,
C,
ldc);
}
cusparseStatus_t CUSPARSEAPI
cusparseCreateCsrsm2Info(csrsm2Info_t *info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateCsrsm2Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroyCsrsm2Info(csrsm2Info_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroyCsrsm2Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcsrsm2_zeroPivot(cusparseHandle_t handle,
csrsm2Info_t info,
int *position) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcsrsm2_zeroPivot);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
position);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsrsm2_bufferSizeExt(cusparseHandle_t handle,
int algo,
cusparseOperation_t transA,
cusparseOperation_t transB,
int m,
int nrhs,
int nnz,
const float *alpha,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const float *B,
int ldb,
csrsm2Info_t info,
cusparseSolvePolicy_t policy,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrsm2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
transA,
transB,
m,
nrhs,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
B,
ldb,
info,
policy,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrsm2_bufferSizeExt(cusparseHandle_t handle,
int algo,
cusparseOperation_t transA,
cusparseOperation_t transB,
int m,
int nrhs,
int nnz,
const double *alpha,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const double *B,
int ldb,
csrsm2Info_t info,
cusparseSolvePolicy_t policy,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrsm2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
transA,
transB,
m,
nrhs,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
B,
ldb,
info,
policy,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrsm2_bufferSizeExt(cusparseHandle_t handle,
int algo,
cusparseOperation_t transA,
cusparseOperation_t transB,
int m,
int nrhs,
int nnz,
const cuComplex *alpha,
const cusparseMatDescr_t descrA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cuComplex *B,
int ldb,
csrsm2Info_t info,
cusparseSolvePolicy_t policy,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrsm2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
transA,
transB,
m,
nrhs,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
B,
ldb,
info,
policy,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrsm2_bufferSizeExt(cusparseHandle_t handle,
int algo,
cusparseOperation_t transA,
cusparseOperation_t transB,
int m,
int nrhs,
int nnz,
const cuDoubleComplex *alpha,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cuDoubleComplex *B,
int ldb,
csrsm2Info_t info,
cusparseSolvePolicy_t policy,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrsm2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
transA,
transB,
m,
nrhs,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
B,
ldb,
info,
policy,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsrsm2_analysis(cusparseHandle_t handle,
int algo,
cusparseOperation_t transA,
cusparseOperation_t transB,
int m,
int nrhs,
int nnz,
const float *alpha,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const float *B,
int ldb,
csrsm2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrsm2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
transA,
transB,
m,
nrhs,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
B,
ldb,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrsm2_analysis(cusparseHandle_t handle,
int algo,
cusparseOperation_t transA,
cusparseOperation_t transB,
int m,
int nrhs,
int nnz,
const double *alpha,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const double *B,
int ldb,
csrsm2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrsm2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
transA,
transB,
m,
nrhs,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
B,
ldb,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrsm2_analysis(cusparseHandle_t handle,
int algo,
cusparseOperation_t transA,
cusparseOperation_t transB,
int m,
int nrhs,
int nnz,
const cuComplex *alpha,
const cusparseMatDescr_t descrA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cuComplex *B,
int ldb,
csrsm2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrsm2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
transA,
transB,
m,
nrhs,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
B,
ldb,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrsm2_analysis(cusparseHandle_t handle,
int algo,
cusparseOperation_t transA,
cusparseOperation_t transB,
int m,
int nrhs,
int nnz,
const cuDoubleComplex *alpha,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cuDoubleComplex *B,
int ldb,
csrsm2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrsm2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
transA,
transB,
m,
nrhs,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
B,
ldb,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsrsm2_solve(cusparseHandle_t handle,
int algo,
cusparseOperation_t transA,
cusparseOperation_t transB,
int m,
int nrhs,
int nnz,
const float *alpha,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
float *B,
int ldb,
csrsm2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrsm2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
transA,
transB,
m,
nrhs,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
B,
ldb,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrsm2_solve(cusparseHandle_t handle,
int algo,
cusparseOperation_t transA,
cusparseOperation_t transB,
int m,
int nrhs,
int nnz,
const double *alpha,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
double *B,
int ldb,
csrsm2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrsm2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
transA,
transB,
m,
nrhs,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
B,
ldb,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrsm2_solve(cusparseHandle_t handle,
int algo,
cusparseOperation_t transA,
cusparseOperation_t transB,
int m,
int nrhs,
int nnz,
const cuComplex *alpha,
const cusparseMatDescr_t descrA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
cuComplex *B,
int ldb,
csrsm2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrsm2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
transA,
transB,
m,
nrhs,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
B,
ldb,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrsm2_solve(cusparseHandle_t handle,
int algo,
cusparseOperation_t transA,
cusparseOperation_t transB,
int m,
int nrhs,
int nnz,
const cuDoubleComplex *alpha,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
cuDoubleComplex *B,
int ldb,
csrsm2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrsm2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
transA,
transB,
m,
nrhs,
nnz,
alpha,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
B,
ldb,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseXbsrsm2_zeroPivot(cusparseHandle_t handle,
bsrsm2Info_t info,
int *position) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXbsrsm2_zeroPivot);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
position);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsrsm2_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transXY,
int mb,
int n,
int nnzb,
const cusparseMatDescr_t descrA,
float *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrsm2_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transXY,
mb,
n,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrsm2_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transXY,
int mb,
int n,
int nnzb,
const cusparseMatDescr_t descrA,
double *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrsm2_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transXY,
mb,
n,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrsm2_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transXY,
int mb,
int n,
int nnzb,
const cusparseMatDescr_t descrA,
cuComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrsm2_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transXY,
mb,
n,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrsm2_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transXY,
int mb,
int n,
int nnzb,
const cusparseMatDescr_t descrA,
cuDoubleComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrsm2_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transXY,
mb,
n,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsrsm2_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transB,
int mb,
int n,
int nnzb,
const cusparseMatDescr_t descrA,
float *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrsm2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transB,
mb,
n,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrsm2_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transB,
int mb,
int n,
int nnzb,
const cusparseMatDescr_t descrA,
double *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrsm2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transB,
mb,
n,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrsm2_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transB,
int mb,
int n,
int nnzb,
const cusparseMatDescr_t descrA,
cuComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrsm2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transB,
mb,
n,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrsm2_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transB,
int mb,
int n,
int nnzb,
const cusparseMatDescr_t descrA,
cuDoubleComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrsm2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transB,
mb,
n,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsrsm2_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transXY,
int mb,
int n,
int nnzb,
const cusparseMatDescr_t descrA,
const float *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrsm2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transXY,
mb,
n,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrsm2_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transXY,
int mb,
int n,
int nnzb,
const cusparseMatDescr_t descrA,
const double *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrsm2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transXY,
mb,
n,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrsm2_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transXY,
int mb,
int n,
int nnzb,
const cusparseMatDescr_t descrA,
const cuComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrsm2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transXY,
mb,
n,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrsm2_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transXY,
int mb,
int n,
int nnzb,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrsm2_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transXY,
mb,
n,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsrsm2_solve(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transXY,
int mb,
int n,
int nnzb,
const float *alpha,
const cusparseMatDescr_t descrA,
const float *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
const float *B,
int ldb,
float *X,
int ldx,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrsm2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transXY,
mb,
n,
nnzb,
alpha,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
B,
ldb,
X,
ldx,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrsm2_solve(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transXY,
int mb,
int n,
int nnzb,
const double *alpha,
const cusparseMatDescr_t descrA,
const double *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
const double *B,
int ldb,
double *X,
int ldx,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrsm2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transXY,
mb,
n,
nnzb,
alpha,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
B,
ldb,
X,
ldx,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrsm2_solve(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transXY,
int mb,
int n,
int nnzb,
const cuComplex *alpha,
const cusparseMatDescr_t descrA,
const cuComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
const cuComplex *B,
int ldb,
cuComplex *X,
int ldx,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrsm2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transXY,
mb,
n,
nnzb,
alpha,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
B,
ldb,
X,
ldx,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrsm2_solve(cusparseHandle_t handle,
cusparseDirection_t dirA,
cusparseOperation_t transA,
cusparseOperation_t transXY,
int mb,
int n,
int nnzb,
const cuDoubleComplex *alpha,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrsm2Info_t info,
const cuDoubleComplex *B,
int ldb,
cuDoubleComplex *X,
int ldx,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrsm2_solve);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
transA,
transXY,
mb,
n,
nnzb,
alpha,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
B,
ldb,
X,
ldx,
policy,
pBuffer);
}
//##############################################################################
//# PRECONDITIONERS
//##############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseScsrilu02_numericBoost(cusparseHandle_t handle,
csrilu02Info_t info,
int enable_boost,
double *tol,
float *boost_val) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrilu02_numericBoost);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
enable_boost,
tol,
boost_val);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrilu02_numericBoost(cusparseHandle_t handle,
csrilu02Info_t info,
int enable_boost,
double *tol,
double *boost_val) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrilu02_numericBoost);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
enable_boost,
tol,
boost_val);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrilu02_numericBoost(cusparseHandle_t handle,
csrilu02Info_t info,
int enable_boost,
double *tol,
cuComplex *boost_val) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrilu02_numericBoost);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
enable_boost,
tol,
boost_val);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrilu02_numericBoost(cusparseHandle_t handle,
csrilu02Info_t info,
int enable_boost,
double *tol,
cuDoubleComplex *boost_val) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrilu02_numericBoost);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
enable_boost,
tol,
boost_val);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcsrilu02_zeroPivot(cusparseHandle_t handle,
csrilu02Info_t info,
int *position) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcsrilu02_zeroPivot);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
position);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsrilu02_bufferSize(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrilu02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrilu02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrilu02_bufferSize(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrilu02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrilu02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrilu02_bufferSize(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrilu02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrilu02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrilu02_bufferSize(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrilu02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrilu02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsrilu02_bufferSizeExt(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
float *csrSortedVal,
const int *csrSortedRowPtr,
const int *csrSortedColInd,
csrilu02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrilu02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedVal,
csrSortedRowPtr,
csrSortedColInd,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrilu02_bufferSizeExt(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
double *csrSortedVal,
const int *csrSortedRowPtr,
const int *csrSortedColInd,
csrilu02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrilu02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedVal,
csrSortedRowPtr,
csrSortedColInd,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrilu02_bufferSizeExt(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuComplex *csrSortedVal,
const int *csrSortedRowPtr,
const int *csrSortedColInd,
csrilu02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrilu02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedVal,
csrSortedRowPtr,
csrSortedColInd,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrilu02_bufferSizeExt(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuDoubleComplex *csrSortedVal,
const int *csrSortedRowPtr,
const int *csrSortedColInd,
csrilu02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrilu02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedVal,
csrSortedRowPtr,
csrSortedColInd,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsrilu02_analysis(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrilu02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrilu02_analysis(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrilu02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrilu02_analysis(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrilu02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrilu02_analysis(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrilu02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsrilu02(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
float *csrSortedValA_valM,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrilu02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA_valM,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrilu02(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
double *csrSortedValA_valM,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrilu02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA_valM,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrilu02(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuComplex *csrSortedValA_valM,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrilu02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA_valM,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrilu02(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuDoubleComplex *csrSortedValA_valM,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrilu02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA_valM,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsrilu02_numericBoost(cusparseHandle_t handle,
bsrilu02Info_t info,
int enable_boost,
double *tol,
float *boost_val) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrilu02_numericBoost);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
enable_boost,
tol,
boost_val);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrilu02_numericBoost(cusparseHandle_t handle,
bsrilu02Info_t info,
int enable_boost,
double *tol,
double *boost_val) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrilu02_numericBoost);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
enable_boost,
tol,
boost_val);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrilu02_numericBoost(cusparseHandle_t handle,
bsrilu02Info_t info,
int enable_boost,
double *tol,
cuComplex *boost_val) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrilu02_numericBoost);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
enable_boost,
tol,
boost_val);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrilu02_numericBoost(cusparseHandle_t handle,
bsrilu02Info_t info,
int enable_boost,
double *tol,
cuDoubleComplex *boost_val) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrilu02_numericBoost);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
enable_boost,
tol,
boost_val);
}
cusparseStatus_t CUSPARSEAPI
cusparseXbsrilu02_zeroPivot(cusparseHandle_t handle,
bsrilu02Info_t info,
int *position) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXbsrilu02_zeroPivot);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
position);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsrilu02_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
float *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsrilu02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrilu02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrilu02_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
double *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsrilu02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrilu02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrilu02_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsrilu02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrilu02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrilu02_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuDoubleComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsrilu02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrilu02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsrilu02_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
float *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrilu02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrilu02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrilu02_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
double *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrilu02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrilu02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrilu02_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrilu02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrilu02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrilu02_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuDoubleComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsrilu02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrilu02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsrilu02_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
float *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrilu02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrilu02_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
double *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrilu02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrilu02_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrilu02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrilu02_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuDoubleComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrilu02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsrilu02(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
float *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsrilu02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsrilu02(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
double *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsrilu02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsrilu02(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsrilu02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsrilu02(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuDoubleComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsrilu02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsrilu02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcsric02_zeroPivot(cusparseHandle_t handle,
csric02Info_t info,
int *position) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcsric02_zeroPivot);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
position);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsric02_bufferSize(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csric02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsric02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsric02_bufferSize(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csric02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsric02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsric02_bufferSize(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csric02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsric02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsric02_bufferSize(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csric02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsric02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsric02_bufferSizeExt(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
float *csrSortedVal,
const int *csrSortedRowPtr,
const int *csrSortedColInd,
csric02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsric02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedVal,
csrSortedRowPtr,
csrSortedColInd,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsric02_bufferSizeExt(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
double *csrSortedVal,
const int *csrSortedRowPtr,
const int *csrSortedColInd,
csric02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsric02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedVal,
csrSortedRowPtr,
csrSortedColInd,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsric02_bufferSizeExt(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuComplex *csrSortedVal,
const int *csrSortedRowPtr,
const int *csrSortedColInd,
csric02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsric02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedVal,
csrSortedRowPtr,
csrSortedColInd,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsric02_bufferSizeExt(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuDoubleComplex *csrSortedVal,
const int *csrSortedRowPtr,
const int *csrSortedColInd,
csric02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsric02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedVal,
csrSortedRowPtr,
csrSortedColInd,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsric02_analysis(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csric02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsric02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsric02_analysis(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csric02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsric02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsric02_analysis(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csric02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsric02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsric02_analysis(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csric02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsric02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsric02(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
float *csrSortedValA_valM,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csric02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsric02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA_valM,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsric02(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
double *csrSortedValA_valM,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csric02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsric02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA_valM,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsric02(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuComplex *csrSortedValA_valM,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csric02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsric02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA_valM,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsric02(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
cuDoubleComplex *csrSortedValA_valM,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
csric02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsric02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA_valM,
csrSortedRowPtrA,
csrSortedColIndA,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseXbsric02_zeroPivot(cusparseHandle_t handle,
bsric02Info_t info,
int *position) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXbsric02_zeroPivot);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
info,
position);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsric02_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
float *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsric02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsric02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsric02_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
double *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsric02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsric02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsric02_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsric02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsric02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsric02_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuDoubleComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsric02Info_t info,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsric02_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsric02_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
float *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsric02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsric02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsric02_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
double *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsric02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsric02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsric02_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsric02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsric02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsric02_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuDoubleComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockSize,
bsric02Info_t info,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsric02_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockSize,
info,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsric02_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
const float *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsric02Info_t info,
cusparseSolvePolicy_t policy,
void *pInputBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsric02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pInputBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsric02_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
const double *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsric02Info_t info,
cusparseSolvePolicy_t policy,
void *pInputBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsric02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pInputBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsric02_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
const cuComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsric02Info_t info,
cusparseSolvePolicy_t policy,
void *pInputBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsric02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pInputBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsric02_analysis(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsric02Info_t info,
cusparseSolvePolicy_t policy,
void *pInputBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsric02_analysis);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pInputBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsric02(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
float *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsric02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsric02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsric02(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
double *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsric02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsric02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsric02(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *
bsrSortedColInd,
int blockDim,
bsric02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsric02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsric02(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nnzb,
const cusparseMatDescr_t descrA,
cuDoubleComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int blockDim,
bsric02Info_t info,
cusparseSolvePolicy_t policy,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsric02);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nnzb,
descrA,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
blockDim,
info,
policy,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgtsv2_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
const float *dl,
const float *d,
const float *du,
const float *B,
int ldb,
size_t *bufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgtsv2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
bufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgtsv2_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
const double *dl,
const double *d,
const double *du,
const double *B,
int ldb,
size_t *bufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgtsv2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
bufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgtsv2_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
const cuComplex *dl,
const cuComplex *d,
const cuComplex *du,
const cuComplex *B,
int ldb,
size_t *bufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgtsv2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
bufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgtsv2_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
const cuDoubleComplex *dl,
const cuDoubleComplex *d,
const cuDoubleComplex *du,
const cuDoubleComplex *B,
int ldb,
size_t *bufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgtsv2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
bufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgtsv2(cusparseHandle_t handle,
int m,
int n,
const float *dl,
const float *d,
const float *du,
float *B,
int ldb,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgtsv2);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgtsv2(cusparseHandle_t handle,
int m,
int n,
const double *dl,
const double *d,
const double *du,
double *B,
int ldb,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgtsv2);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgtsv2(cusparseHandle_t handle,
int m,
int n,
const cuComplex *dl,
const cuComplex *d,
const cuComplex *du,
cuComplex *B,
int ldb,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgtsv2);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgtsv2(cusparseHandle_t handle,
int m,
int n,
const cuDoubleComplex *dl,
const cuDoubleComplex *d,
const cuDoubleComplex *du,
cuDoubleComplex *B,
int ldb,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgtsv2);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgtsv2_nopivot_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
const float *dl,
const float *d,
const float *du,
const float *B,
int ldb,
size_t *bufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgtsv2_nopivot_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
bufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgtsv2_nopivot_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
const double *dl,
const double *d,
const double *du,
const double *B,
int ldb,
size_t *bufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgtsv2_nopivot_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
bufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgtsv2_nopivot_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
const cuComplex *dl,
const cuComplex *d,
const cuComplex *du,
const cuComplex *B,
int ldb,
size_t *bufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgtsv2_nopivot_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
bufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgtsv2_nopivot_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
const cuDoubleComplex *dl,
const cuDoubleComplex *d,
const cuDoubleComplex *du,
const cuDoubleComplex *B,
int ldb,
size_t *bufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgtsv2_nopivot_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
bufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgtsv2_nopivot(cusparseHandle_t handle,
int m,
int n,
const float *dl,
const float *d,
const float *du,
float *B,
int ldb,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgtsv2_nopivot);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgtsv2_nopivot(cusparseHandle_t handle,
int m,
int n,
const double *dl,
const double *d,
const double *du,
double *B,
int ldb,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgtsv2_nopivot);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgtsv2_nopivot(cusparseHandle_t handle,
int m,
int n,
const cuComplex *dl,
const cuComplex *d,
const cuComplex *du,
cuComplex *B,
int ldb,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgtsv2_nopivot);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgtsv2_nopivot(cusparseHandle_t handle,
int m,
int n,
const cuDoubleComplex *dl,
const cuDoubleComplex *d,
const cuDoubleComplex *du,
cuDoubleComplex *B,
int ldb,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgtsv2_nopivot);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
dl,
d,
du,
B,
ldb,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgtsv2StridedBatch_bufferSizeExt(cusparseHandle_t handle,
int m,
const float *dl,
const float *d,
const float *du,
const float *x,
int batchCount,
int batchStride,
size_t *bufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgtsv2StridedBatch_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
dl,
d,
du,
x,
batchCount,
batchStride,
bufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgtsv2StridedBatch_bufferSizeExt(cusparseHandle_t handle,
int m,
const double *dl,
const double *d,
const double *du,
const double *x,
int batchCount,
int batchStride,
size_t *bufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgtsv2StridedBatch_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
dl,
d,
du,
x,
batchCount,
batchStride,
bufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgtsv2StridedBatch_bufferSizeExt(cusparseHandle_t handle,
int m,
const cuComplex *dl,
const cuComplex *d,
const cuComplex *du,
const cuComplex *x,
int batchCount,
int batchStride,
size_t *bufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgtsv2StridedBatch_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
dl,
d,
du,
x,
batchCount,
batchStride,
bufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgtsv2StridedBatch_bufferSizeExt(cusparseHandle_t handle,
int m,
const cuDoubleComplex *dl,
const cuDoubleComplex *d,
const cuDoubleComplex *du,
const cuDoubleComplex *x,
int batchCount,
int batchStride,
size_t *bufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgtsv2StridedBatch_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
dl,
d,
du,
x,
batchCount,
batchStride,
bufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgtsv2StridedBatch(cusparseHandle_t handle,
int m,
const float *dl,
const float *d,
const float *du,
float *x,
int batchCount,
int batchStride,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgtsv2StridedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
dl,
d,
du,
x,
batchCount,
batchStride,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgtsv2StridedBatch(cusparseHandle_t handle,
int m,
const double *dl,
const double *d,
const double *du,
double *x,
int batchCount,
int batchStride,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgtsv2StridedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
dl,
d,
du,
x,
batchCount,
batchStride,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgtsv2StridedBatch(cusparseHandle_t handle,
int m,
const cuComplex *dl,
const cuComplex *d,
const cuComplex *du,
cuComplex *x,
int batchCount,
int batchStride,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgtsv2StridedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
dl,
d,
du,
x,
batchCount,
batchStride,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgtsv2StridedBatch(cusparseHandle_t handle,
int m,
const cuDoubleComplex *dl,
const cuDoubleComplex *d,
const cuDoubleComplex *du,
cuDoubleComplex *x,
int batchCount,
int batchStride,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgtsv2StridedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
dl,
d,
du,
x,
batchCount,
batchStride,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgtsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle,
int algo,
int m,
const float *dl,
const float *d,
const float *du,
const float *x,
int batchCount,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgtsvInterleavedBatch_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
dl,
d,
du,
x,
batchCount,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgtsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle,
int algo,
int m,
const double *dl,
const double *d,
const double *du,
const double *x,
int batchCount,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgtsvInterleavedBatch_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
dl,
d,
du,
x,
batchCount,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgtsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle,
int algo,
int m,
const cuComplex *dl,
const cuComplex *d,
const cuComplex *du,
const cuComplex *x,
int batchCount,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgtsvInterleavedBatch_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
dl,
d,
du,
x,
batchCount,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgtsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle,
int algo,
int m,
const cuDoubleComplex *dl,
const cuDoubleComplex *d,
const cuDoubleComplex *du,
const cuDoubleComplex *x,
int batchCount,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgtsvInterleavedBatch_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
dl,
d,
du,
x,
batchCount,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgtsvInterleavedBatch(cusparseHandle_t handle,
int algo,
int m,
float *dl,
float *d,
float *du,
float *x,
int batchCount,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgtsvInterleavedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
dl,
d,
du,
x,
batchCount,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgtsvInterleavedBatch(cusparseHandle_t handle,
int algo,
int m,
double *dl,
double *d,
double *du,
double *x,
int batchCount,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgtsvInterleavedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
dl,
d,
du,
x,
batchCount,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgtsvInterleavedBatch(cusparseHandle_t handle,
int algo,
int m,
cuComplex *dl,
cuComplex *d,
cuComplex *du,
cuComplex *x,
int batchCount,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgtsvInterleavedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
dl,
d,
du,
x,
batchCount,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgtsvInterleavedBatch(cusparseHandle_t handle,
int algo,
int m,
cuDoubleComplex *dl,
cuDoubleComplex *d,
cuDoubleComplex *du,
cuDoubleComplex *x,
int batchCount,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgtsvInterleavedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
dl,
d,
du,
x,
batchCount,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgpsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle,
int algo,
int m,
const float *ds,
const float *dl,
const float *d,
const float *du,
const float *dw,
const float *x,
int batchCount,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgpsvInterleavedBatch_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
ds,
dl,
d,
du,
dw,
x,
batchCount,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgpsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle,
int algo,
int m,
const double *ds,
const double *dl,
const double *d,
const double *du,
const double *dw,
const double *x,
int batchCount,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgpsvInterleavedBatch_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
ds,
dl,
d,
du,
dw,
x,
batchCount,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgpsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle,
int algo,
int m,
const cuComplex *ds,
const cuComplex *dl,
const cuComplex *d,
const cuComplex *du,
const cuComplex *dw,
const cuComplex *x,
int batchCount,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgpsvInterleavedBatch_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
ds,
dl,
d,
du,
dw,
x,
batchCount,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgpsvInterleavedBatch_bufferSizeExt(cusparseHandle_t handle,
int algo,
int m,
const cuDoubleComplex *ds,
const cuDoubleComplex *dl,
const cuDoubleComplex *d,
const cuDoubleComplex *du,
const cuDoubleComplex *dw,
const cuDoubleComplex *x,
int batchCount,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgpsvInterleavedBatch_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
ds,
dl,
d,
du,
dw,
x,
batchCount,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgpsvInterleavedBatch(cusparseHandle_t handle,
int algo,
int m,
float *ds,
float *dl,
float *d,
float *du,
float *dw,
float *x,
int batchCount,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgpsvInterleavedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
ds,
dl,
d,
du,
dw,
x,
batchCount,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgpsvInterleavedBatch(cusparseHandle_t handle,
int algo,
int m,
double *ds,
double *dl,
double *d,
double *du,
double *dw,
double *x,
int batchCount,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgpsvInterleavedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
ds,
dl,
d,
du,
dw,
x,
batchCount,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgpsvInterleavedBatch(cusparseHandle_t handle,
int algo,
int m,
cuComplex *ds,
cuComplex *dl,
cuComplex *d,
cuComplex *du,
cuComplex *dw,
cuComplex *x,
int batchCount,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgpsvInterleavedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
ds,
dl,
d,
du,
dw,
x,
batchCount,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgpsvInterleavedBatch(cusparseHandle_t handle,
int algo,
int m,
cuDoubleComplex *ds,
cuDoubleComplex *dl,
cuDoubleComplex *d,
cuDoubleComplex *du,
cuDoubleComplex *dw,
cuDoubleComplex *x,
int batchCount,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgpsvInterleavedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
algo,
m,
ds,
dl,
d,
du,
dw,
x,
batchCount,
pBuffer);
}
//##############################################################################
//# EXTRA ROUTINES
//##############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseCreateCsrgemm2Info(csrgemm2Info_t *info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateCsrgemm2Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroyCsrgemm2Info(csrgemm2Info_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroyCsrgemm2Info);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(info);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsrgemm2_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
int k,
const float *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cusparseMatDescr_t descrB,
int nnzB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const float *beta,
const cusparseMatDescr_t descrD,
int nnzD,
const int *csrSortedRowPtrD,
const int *csrSortedColIndD,
csrgemm2Info_t info,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrgemm2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
k,
alpha,
descrA,
nnzA,
csrSortedRowPtrA,
csrSortedColIndA,
descrB,
nnzB,
csrSortedRowPtrB,
csrSortedColIndB,
beta,
descrD,
nnzD,
csrSortedRowPtrD,
csrSortedColIndD,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrgemm2_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
int k,
const double *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cusparseMatDescr_t descrB,
int nnzB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const double *beta,
const cusparseMatDescr_t descrD,
int nnzD,
const int *csrSortedRowPtrD,
const int *csrSortedColIndD,
csrgemm2Info_t info,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrgemm2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
k,
alpha,
descrA,
nnzA,
csrSortedRowPtrA,
csrSortedColIndA,
descrB,
nnzB,
csrSortedRowPtrB,
csrSortedColIndB,
beta,
descrD,
nnzD,
csrSortedRowPtrD,
csrSortedColIndD,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrgemm2_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
int k,
const cuComplex *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cusparseMatDescr_t descrB,
int nnzB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const cuComplex *beta,
const cusparseMatDescr_t descrD,
int nnzD,
const int *csrSortedRowPtrD,
const int *csrSortedColIndD,
csrgemm2Info_t info,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrgemm2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
k,
alpha,
descrA,
nnzA,
csrSortedRowPtrA,
csrSortedColIndA,
descrB,
nnzB,
csrSortedRowPtrB,
csrSortedColIndB,
beta,
descrD,
nnzD,
csrSortedRowPtrD,
csrSortedColIndD,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrgemm2_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
int k,
const cuDoubleComplex *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cusparseMatDescr_t descrB,
int nnzB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const cuDoubleComplex *beta,
const cusparseMatDescr_t descrD,
int nnzD,
const int *csrSortedRowPtrD,
const int *csrSortedColIndD,
csrgemm2Info_t info,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrgemm2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
k,
alpha,
descrA,
nnzA,
csrSortedRowPtrA,
csrSortedColIndA,
descrB,
nnzB,
csrSortedRowPtrB,
csrSortedColIndB,
beta,
descrD,
nnzD,
csrSortedRowPtrD,
csrSortedColIndD,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcsrgemm2Nnz(cusparseHandle_t handle,
int m,
int n,
int k,
const cusparseMatDescr_t descrA,
int nnzA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cusparseMatDescr_t descrB,
int nnzB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const cusparseMatDescr_t descrD,
int nnzD,
const int *csrSortedRowPtrD,
const int *csrSortedColIndD,
const cusparseMatDescr_t descrC,
int *csrSortedRowPtrC,
int *nnzTotalDevHostPtr,
const csrgemm2Info_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcsrgemm2Nnz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
k,
descrA,
nnzA,
csrSortedRowPtrA,
csrSortedColIndA,
descrB,
nnzB,
csrSortedRowPtrB,
csrSortedColIndB,
descrD,
nnzD,
csrSortedRowPtrD,
csrSortedColIndD,
descrC,
csrSortedRowPtrC,
nnzTotalDevHostPtr,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsrgemm2(cusparseHandle_t handle,
int m,
int n,
int k,
const float *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cusparseMatDescr_t descrB,
int nnzB,
const float *csrSortedValB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const float *beta,
const cusparseMatDescr_t descrD,
int nnzD,
const float *csrSortedValD,
const int *csrSortedRowPtrD,
const int *csrSortedColIndD,
const cusparseMatDescr_t descrC,
float *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
const csrgemm2Info_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrgemm2);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
k,
alpha,
descrA,
nnzA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
descrB,
nnzB,
csrSortedValB,
csrSortedRowPtrB,
csrSortedColIndB,
beta,
descrD,
nnzD,
csrSortedValD,
csrSortedRowPtrD,
csrSortedColIndD,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrgemm2(cusparseHandle_t handle,
int m,
int n,
int k,
const double *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cusparseMatDescr_t descrB,
int nnzB,
const double *csrSortedValB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const double *beta,
const cusparseMatDescr_t descrD,
int nnzD,
const double *csrSortedValD,
const int *csrSortedRowPtrD,
const int *csrSortedColIndD,
const cusparseMatDescr_t descrC,
double *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
const csrgemm2Info_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrgemm2);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
k,
alpha,
descrA,
nnzA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
descrB,
nnzB,
csrSortedValB,
csrSortedRowPtrB,
csrSortedColIndB,
beta,
descrD,
nnzD,
csrSortedValD,
csrSortedRowPtrD,
csrSortedColIndD,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrgemm2(cusparseHandle_t handle,
int m,
int n,
int k,
const cuComplex *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cusparseMatDescr_t descrB,
int nnzB,
const cuComplex *csrSortedValB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const cuComplex *beta,
const cusparseMatDescr_t descrD,
int nnzD,
const cuComplex *csrSortedValD,
const int *csrSortedRowPtrD,
const int *csrSortedColIndD,
const cusparseMatDescr_t descrC,
cuComplex *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
const csrgemm2Info_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrgemm2);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
k,
alpha,
descrA,
nnzA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
descrB,
nnzB,
csrSortedValB,
csrSortedRowPtrB,
csrSortedColIndB,
beta,
descrD,
nnzD,
csrSortedValD,
csrSortedRowPtrD,
csrSortedColIndD,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrgemm2(cusparseHandle_t handle,
int m,
int n,
int k,
const cuDoubleComplex *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cusparseMatDescr_t descrB,
int nnzB,
const cuDoubleComplex *csrSortedValB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const cuDoubleComplex *beta,
const cusparseMatDescr_t descrD,
int nnzD,
const cuDoubleComplex *csrSortedValD,
const int *csrSortedRowPtrD,
const int *csrSortedColIndD,
const cusparseMatDescr_t descrC,
cuDoubleComplex *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
const csrgemm2Info_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrgemm2);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
k,
alpha,
descrA,
nnzA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
descrB,
nnzB,
csrSortedValB,
csrSortedRowPtrB,
csrSortedColIndB,
beta,
descrD,
nnzD,
csrSortedValD,
csrSortedRowPtrD,
csrSortedColIndD,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsrgeam2_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
const float *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const float *beta,
const cusparseMatDescr_t descrB,
int nnzB,
const float *csrSortedValB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const cusparseMatDescr_t descrC,
const float *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrgeam2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
alpha,
descrA,
nnzA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
beta,
descrB,
nnzB,
csrSortedValB,
csrSortedRowPtrB,
csrSortedColIndB,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrgeam2_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
const double *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const double *beta,
const cusparseMatDescr_t descrB,
int nnzB,
const double *csrSortedValB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const cusparseMatDescr_t descrC,
const double *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
size_t *pBufferSizeInBytes);
cusparseStatus_t CUSPARSEAPI
cusparseCcsrgeam2_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
const cuComplex *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cuComplex *beta,
const cusparseMatDescr_t descrB,
int nnzB,
const cuComplex *csrSortedValB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const cusparseMatDescr_t descrC,
const cuComplex *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrgeam2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
alpha,
descrA,
nnzA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
beta,
descrB,
nnzB,
csrSortedValB,
csrSortedRowPtrB,
csrSortedColIndB,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrgeam2_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
const cuDoubleComplex *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cuDoubleComplex *beta,
const cusparseMatDescr_t descrB,
int nnzB,
const cuDoubleComplex *csrSortedValB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const cusparseMatDescr_t descrC,
const cuDoubleComplex *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrgeam2_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
alpha,
descrA,
nnzA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
beta,
descrB,
nnzB,
csrSortedValB,
csrSortedRowPtrB,
csrSortedColIndB,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcsrgeam2Nnz(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
int nnzA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cusparseMatDescr_t descrB,
int nnzB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const cusparseMatDescr_t descrC,
int *csrSortedRowPtrC,
int *nnzTotalDevHostPtr,
void *workspace) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcsrgeam2Nnz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
nnzA,
csrSortedRowPtrA,
csrSortedColIndA,
descrB,
nnzB,
csrSortedRowPtrB,
csrSortedColIndB,
descrC,
csrSortedRowPtrC,
nnzTotalDevHostPtr,
workspace);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsrgeam2(cusparseHandle_t handle,
int m,
int n,
const float *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const float *beta,
const cusparseMatDescr_t descrB,
int nnzB,
const float *csrSortedValB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const cusparseMatDescr_t descrC,
float *csrSortedValC,
int *csrSortedRowPtrC,
int *csrSortedColIndC,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrgeam2);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
alpha,
descrA,
nnzA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
beta,
descrB,
nnzB,
csrSortedValB,
csrSortedRowPtrB,
csrSortedColIndB,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrgeam2(cusparseHandle_t handle,
int m,
int n,
const double *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const double *beta,
const cusparseMatDescr_t descrB,
int nnzB,
const double *csrSortedValB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const cusparseMatDescr_t descrC,
double *csrSortedValC,
int *csrSortedRowPtrC,
int *csrSortedColIndC,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrgeam2);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
alpha,
descrA,
nnzA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
beta,
descrB,
nnzB,
csrSortedValB,
csrSortedRowPtrB,
csrSortedColIndB,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrgeam2(cusparseHandle_t handle,
int m,
int n,
const cuComplex *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cuComplex *beta,
const cusparseMatDescr_t descrB,
int nnzB,
const cuComplex *csrSortedValB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const cusparseMatDescr_t descrC,
cuComplex *csrSortedValC,
int *csrSortedRowPtrC,
int *csrSortedColIndC,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrgeam2);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
alpha,
descrA,
nnzA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
beta,
descrB,
nnzB,
csrSortedValB,
csrSortedRowPtrB,
csrSortedColIndB,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrgeam2(cusparseHandle_t handle,
int m,
int n,
const cuDoubleComplex *alpha,
const cusparseMatDescr_t descrA,
int nnzA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cuDoubleComplex *beta,
const cusparseMatDescr_t descrB,
int nnzB,
const cuDoubleComplex *csrSortedValB,
const int *csrSortedRowPtrB,
const int *csrSortedColIndB,
const cusparseMatDescr_t descrC,
cuDoubleComplex *csrSortedValC,
int *csrSortedRowPtrC,
int *csrSortedColIndC,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrgeam2);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
alpha,
descrA,
nnzA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
beta,
descrB,
nnzB,
csrSortedValB,
csrSortedRowPtrB,
csrSortedColIndB,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBuffer);
}
//##############################################################################
//# SPARSE MATRIX REORDERING
//##############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseScsrcolor(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const float *fractionToColor,
int *ncolors,
int *coloring,
int *reordering,
const cusparseColorInfo_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsrcolor);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
fractionToColor,
ncolors,
coloring,
reordering,
info);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsrcolor(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const double *fractionToColor,
int *ncolors,
int *coloring,
int *reordering,
const cusparseColorInfo_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsrcolor);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
fractionToColor,
ncolors,
coloring,
reordering,
info);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsrcolor(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const float *fractionToColor,
int *ncolors,
int *coloring,
int *reordering,
const cusparseColorInfo_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsrcolor);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
fractionToColor,
ncolors,
coloring,
reordering,
info);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsrcolor(cusparseHandle_t handle,
int m,
int nnz,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const double *fractionToColor,
int *ncolors,
int *coloring,
int *reordering,
const cusparseColorInfo_t info) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsrcolor);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
nnz,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
fractionToColor,
ncolors,
coloring,
reordering,
info);
}
//##############################################################################
//# SPARSE FORMAT CONVERSION
//##############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseSnnz(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const float *A,
int lda,
int *nnzPerRowCol,
int *nnzTotalDevHostPtr) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSnnz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
A,
lda,
nnzPerRowCol,
nnzTotalDevHostPtr);
}
cusparseStatus_t CUSPARSEAPI
cusparseDnnz(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const double *A,
int lda,
int *nnzPerRowCol,
int *nnzTotalDevHostPtr) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDnnz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
A,
lda,
nnzPerRowCol,
nnzTotalDevHostPtr);
}
cusparseStatus_t CUSPARSEAPI
cusparseCnnz(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuComplex *A,
int lda,
int *nnzPerRowCol,
int *nnzTotalDevHostPtr) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCnnz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
A,
lda,
nnzPerRowCol,
nnzTotalDevHostPtr);
}
cusparseStatus_t CUSPARSEAPI
cusparseZnnz(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *A,
int lda,
int *nnzPerRowCol,
int *nnzTotalDevHostPtr) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZnnz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
A,
lda,
nnzPerRowCol,
nnzTotalDevHostPtr);
}
//##############################################################################
//# SPARSE FORMAT CONVERSION #
//##############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseSnnz_compress(cusparseHandle_t handle,
int m,
const cusparseMatDescr_t descr,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
int *nnzPerRow,
int *nnzC,
float tol) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSnnz_compress);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
descr,
csrSortedValA,
csrSortedRowPtrA,
nnzPerRow,
nnzC,
tol);
}
cusparseStatus_t CUSPARSEAPI
cusparseDnnz_compress(cusparseHandle_t handle,
int m,
const cusparseMatDescr_t descr,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
int *nnzPerRow,
int *nnzC,
double tol) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDnnz_compress);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
descr,
csrSortedValA,
csrSortedRowPtrA,
nnzPerRow,
nnzC,
tol);
}
cusparseStatus_t CUSPARSEAPI
cusparseCnnz_compress(cusparseHandle_t handle,
int m,
const cusparseMatDescr_t descr,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
int *nnzPerRow,
int *nnzC,
cuComplex tol) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCnnz_compress);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
descr,
csrSortedValA,
csrSortedRowPtrA,
nnzPerRow,
nnzC,
tol);
}
cusparseStatus_t CUSPARSEAPI
cusparseZnnz_compress(cusparseHandle_t handle,
int m,
const cusparseMatDescr_t descr,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
int *nnzPerRow,
int *nnzC,
cuDoubleComplex tol) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZnnz_compress);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
descr,
csrSortedValA,
csrSortedRowPtrA,
nnzPerRow,
nnzC,
tol);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsr2csr_compress(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedColIndA,
const int *csrSortedRowPtrA,
int nnzA,
const int *nnzPerRow,
float *csrSortedValC,
int *csrSortedColIndC,
int *csrSortedRowPtrC,
float tol) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsr2csr_compress);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
csrSortedValA,
csrSortedColIndA,
csrSortedRowPtrA,
nnzA,
nnzPerRow,
csrSortedValC,
csrSortedColIndC,
csrSortedRowPtrC,
tol);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsr2csr_compress(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedColIndA,
const int *csrSortedRowPtrA,
int nnzA,
const int *nnzPerRow,
double *csrSortedValC,
int *csrSortedColIndC,
int *csrSortedRowPtrC,
double tol) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsr2csr_compress);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
csrSortedValA,
csrSortedColIndA,
csrSortedRowPtrA,
nnzA,
nnzPerRow,
csrSortedValC,
csrSortedColIndC,
csrSortedRowPtrC,
tol);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsr2csr_compress(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuComplex *csrSortedValA,
const int *csrSortedColIndA,
const int *csrSortedRowPtrA,
int nnzA,
const int *nnzPerRow,
cuComplex *csrSortedValC,
int *csrSortedColIndC,
int *csrSortedRowPtrC,
cuComplex tol) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsr2csr_compress);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
csrSortedValA,
csrSortedColIndA,
csrSortedRowPtrA,
nnzA,
nnzPerRow,
csrSortedValC,
csrSortedColIndC,
csrSortedRowPtrC,
tol);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsr2csr_compress(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedColIndA,
const int *csrSortedRowPtrA,
int nnzA,
const int *nnzPerRow,
cuDoubleComplex *csrSortedValC,
int *csrSortedColIndC,
int *csrSortedRowPtrC,
cuDoubleComplex tol) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsr2csr_compress);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
csrSortedValA,
csrSortedColIndA,
csrSortedRowPtrA,
nnzA,
nnzPerRow,
csrSortedValC,
csrSortedColIndC,
csrSortedRowPtrC,
tol);
}
cusparseStatus_t CUSPARSEAPI
cusparseSdense2csr(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const float *A,
int lda,
const int *nnzPerRow,
float *csrSortedValA,
int *csrSortedRowPtrA,
int *csrSortedColIndA) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSdense2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
A,
lda,
nnzPerRow,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA);
}
cusparseStatus_t CUSPARSEAPI
cusparseDdense2csr(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const double *A,
int lda,
const int *nnzPerRow,
double *csrSortedValA,
int *csrSortedRowPtrA,
int *csrSortedColIndA) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDdense2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
A,
lda,
nnzPerRow,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA);
}
cusparseStatus_t CUSPARSEAPI
cusparseCdense2csr(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuComplex *A,
int lda,
const int *nnzPerRow,
cuComplex *csrSortedValA,
int *csrSortedRowPtrA,
int *csrSortedColIndA) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCdense2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
A,
lda,
nnzPerRow,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA);
}
cusparseStatus_t CUSPARSEAPI
cusparseZdense2csr(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *A,
int lda,
const int *nnzPerRow,
cuDoubleComplex *csrSortedValA,
int *csrSortedRowPtrA,
int *csrSortedColIndA) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZdense2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
A,
lda,
nnzPerRow,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsr2dense(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
float *A,
int lda) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsr2dense);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
A,
lda);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsr2dense(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
double *A,
int lda) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsr2dense);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
A,
lda);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsr2dense(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
cuComplex *A,
int lda) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsr2dense);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
A,
lda);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsr2dense(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
cuDoubleComplex *A,
int lda) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsr2dense);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
A,
lda);
}
cusparseStatus_t CUSPARSEAPI
cusparseSdense2csc(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const float *A,
int lda,
const int *nnzPerCol,
float *cscSortedValA,
int *cscSortedRowIndA,
int *cscSortedColPtrA) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSdense2csc);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
A,
lda,
nnzPerCol,
cscSortedValA,
cscSortedRowIndA,
cscSortedColPtrA);
}
cusparseStatus_t CUSPARSEAPI
cusparseDdense2csc(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const double *A,
int lda,
const int *nnzPerCol,
double *cscSortedValA,
int *cscSortedRowIndA,
int *cscSortedColPtrA) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDdense2csc);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
A,
lda,
nnzPerCol,
cscSortedValA,
cscSortedRowIndA,
cscSortedColPtrA);
}
cusparseStatus_t CUSPARSEAPI
cusparseCdense2csc(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuComplex *A,
int lda,
const int *nnzPerCol,
cuComplex *cscSortedValA,
int *cscSortedRowIndA,
int *cscSortedColPtrA) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCdense2csc);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
A,
lda,
nnzPerCol,
cscSortedValA,
cscSortedRowIndA,
cscSortedColPtrA);
}
cusparseStatus_t CUSPARSEAPI
cusparseZdense2csc(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *A,
int lda,
const int *nnzPerCol,
cuDoubleComplex *cscSortedValA,
int *cscSortedRowIndA,
int *cscSortedColPtrA) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZdense2csc);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
A,
lda,
nnzPerCol,
cscSortedValA,
cscSortedRowIndA,
cscSortedColPtrA);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsc2dense(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const float *cscSortedValA,
const int *cscSortedRowIndA,
const int *cscSortedColPtrA,
float *A,
int lda) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsc2dense);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
cscSortedValA,
cscSortedRowIndA,
cscSortedColPtrA,
A,
lda);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsc2dense(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const double *cscSortedValA,
const int *cscSortedRowIndA,
const int *cscSortedColPtrA,
double *A,
int lda) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsc2dense);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
cscSortedValA,
cscSortedRowIndA,
cscSortedColPtrA,
A,
lda);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsc2dense(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuComplex *cscSortedValA,
const int *cscSortedRowIndA,
const int *cscSortedColPtrA,
cuComplex *A,
int lda) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsc2dense);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
cscSortedValA,
cscSortedRowIndA,
cscSortedColPtrA,
A,
lda);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsc2dense(cusparseHandle_t handle,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *cscSortedValA,
const int *cscSortedRowIndA,
const int *cscSortedColPtrA,
cuDoubleComplex *A,
int lda) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsc2dense);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
descrA,
cscSortedValA,
cscSortedRowIndA,
cscSortedColPtrA,
A,
lda);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcoo2csr(cusparseHandle_t handle,
const int *cooRowInd,
int nnz,
int m,
int *csrSortedRowPtr,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcoo2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
cooRowInd,
nnz,
m,
csrSortedRowPtr,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcsr2coo(cusparseHandle_t handle,
const int *csrSortedRowPtr,
int nnz,
int m,
int *cooRowInd,
cusparseIndexBase_t idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcsr2coo);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
cooRowInd,
nnz,
m,
cooRowInd,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcsr2bsrNnz(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
int blockDim,
const cusparseMatDescr_t descrC,
int *bsrSortedRowPtrC,
int *nnzTotalDevHostPtr) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcsr2bsrNnz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedRowPtrA,
csrSortedColIndA,
blockDim,
descrC,
bsrSortedRowPtrC,
nnzTotalDevHostPtr);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsr2bsr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
int blockDim,
const cusparseMatDescr_t descrC,
float *bsrSortedValC,
int *bsrSortedRowPtrC,
int *bsrSortedColIndC) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsr2bsr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
blockDim,
descrC,
bsrSortedValC,
bsrSortedRowPtrC,
bsrSortedColIndC);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsr2bsr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
int blockDim,
const cusparseMatDescr_t descrC,
double *bsrSortedValC,
int *bsrSortedRowPtrC,
int *bsrSortedColIndC) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsr2bsr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
blockDim,
descrC,
bsrSortedValC,
bsrSortedRowPtrC,
bsrSortedColIndC);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsr2bsr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
int blockDim,
const cusparseMatDescr_t descrC,
cuComplex *bsrSortedValC,
int *bsrSortedRowPtrC,
int *bsrSortedColIndC) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsr2bsr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
blockDim,
descrC,
bsrSortedValC,
bsrSortedRowPtrC,
bsrSortedColIndC);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsr2bsr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
int blockDim,
const cusparseMatDescr_t descrC,
cuDoubleComplex *bsrSortedValC,
int *bsrSortedRowPtrC,
int *bsrSortedColIndC) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsr2bsr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
blockDim,
descrC,
bsrSortedValC,
bsrSortedRowPtrC,
bsrSortedColIndC);
}
cusparseStatus_t CUSPARSEAPI
cusparseSbsr2csr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
const cusparseMatDescr_t descrA,
const float *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
const cusparseMatDescr_t descrC,
float *csrSortedValC,
int *csrSortedRowPtrC,
int *csrSortedColIndC) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSbsr2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC);
}
cusparseStatus_t CUSPARSEAPI
cusparseDbsr2csr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
const cusparseMatDescr_t descrA,
const double *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
const cusparseMatDescr_t descrC,
double *csrSortedValC,
int *csrSortedRowPtrC,
int *csrSortedColIndC) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDbsr2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC);
}
cusparseStatus_t CUSPARSEAPI
cusparseCbsr2csr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
const cusparseMatDescr_t descrA,
const cuComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
const cusparseMatDescr_t descrC,
cuComplex *csrSortedValC,
int *csrSortedRowPtrC,
int *csrSortedColIndC) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCbsr2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC);
}
cusparseStatus_t CUSPARSEAPI
cusparseZbsr2csr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int blockDim,
const cusparseMatDescr_t descrC,
cuDoubleComplex *csrSortedValC,
int *csrSortedRowPtrC,
int *csrSortedColIndC) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZbsr2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
blockDim,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgebsr2gebsc_bufferSize(cusparseHandle_t handle,
int mb,
int nb,
int nnzb,
const float *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int rowBlockDim,
int colBlockDim,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgebsr2gebsc_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
mb,
nb,
nnzb,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
rowBlockDim,
colBlockDim,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgebsr2gebsc_bufferSize(cusparseHandle_t handle,
int mb,
int nb,
int nnzb,
const double *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int rowBlockDim,
int colBlockDim,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgebsr2gebsc_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
mb,
nb,
nnzb,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
rowBlockDim,
colBlockDim,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgebsr2gebsc_bufferSize(cusparseHandle_t handle,
int mb,
int nb,
int nnzb,
const cuComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int rowBlockDim,
int colBlockDim,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgebsr2gebsc_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
mb,
nb,
nnzb,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
rowBlockDim,
colBlockDim,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgebsr2gebsc_bufferSize(cusparseHandle_t handle,
int mb,
int nb,
int nnzb,
const cuDoubleComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int rowBlockDim,
int colBlockDim,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgebsr2gebsc_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
mb,
nb,
nnzb,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
rowBlockDim,
colBlockDim,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgebsr2gebsc_bufferSizeExt(cusparseHandle_t handle,
int mb,
int nb,
int nnzb,
const float *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int rowBlockDim,
int colBlockDim,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgebsr2gebsc_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
mb,
nb,
nnzb,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
rowBlockDim,
colBlockDim,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgebsr2gebsc_bufferSizeExt(cusparseHandle_t handle,
int mb,
int nb,
int nnzb,
const double *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int rowBlockDim,
int colBlockDim,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgebsr2gebsc_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
mb,
nb,
nnzb,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
rowBlockDim,
colBlockDim,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgebsr2gebsc_bufferSizeExt(cusparseHandle_t handle,
int mb,
int nb,
int nnzb,
const cuComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int rowBlockDim,
int colBlockDim,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgebsr2gebsc_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
mb,
nb,
nnzb,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
rowBlockDim,
colBlockDim,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgebsr2gebsc_bufferSizeExt(cusparseHandle_t handle,
int mb,
int nb,
int nnzb,
const cuDoubleComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int rowBlockDim,
int colBlockDim,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgebsr2gebsc_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
mb,
nb,
nnzb,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
rowBlockDim,
colBlockDim,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgebsr2gebsc(cusparseHandle_t handle,
int mb,
int nb,
int nnzb,
const float *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int rowBlockDim,
int colBlockDim,
float *bscVal,
int *bscRowInd,
int *bscColPtr,
cusparseAction_t copyValues,
cusparseIndexBase_t idxBase,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgebsr2gebsc);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
mb,
nb,
nnzb,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
rowBlockDim,
colBlockDim,
bscVal,
bscRowInd,
bscColPtr,
copyValues,
idxBase,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgebsr2gebsc(cusparseHandle_t handle,
int mb,
int nb,
int nnzb,
const double *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int rowBlockDim,
int colBlockDim,
double *bscVal,
int *bscRowInd,
int *bscColPtr,
cusparseAction_t copyValues,
cusparseIndexBase_t idxBase,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgebsr2gebsc);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
mb,
nb,
nnzb,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
rowBlockDim,
colBlockDim,
bscVal,
bscRowInd,
bscColPtr,
copyValues,
idxBase,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgebsr2gebsc(cusparseHandle_t handle,
int mb,
int nb,
int nnzb,
const cuComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int rowBlockDim,
int colBlockDim,
cuComplex *bscVal,
int *bscRowInd,
int *bscColPtr,
cusparseAction_t copyValues,
cusparseIndexBase_t idxBase,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgebsr2gebsc);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
mb,
nb,
nnzb,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
rowBlockDim,
colBlockDim,
bscVal,
bscRowInd,
bscColPtr,
copyValues,
idxBase,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgebsr2gebsc(cusparseHandle_t handle,
int mb,
int nb,
int nnzb,
const cuDoubleComplex *bsrSortedVal,
const int *bsrSortedRowPtr,
const int *bsrSortedColInd,
int rowBlockDim,
int colBlockDim,
cuDoubleComplex *bscVal,
int *bscRowInd,
int *bscColPtr,
cusparseAction_t copyValues,
cusparseIndexBase_t idxBase,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgebsr2gebsc);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
mb,
nb,
nnzb,
bsrSortedVal,
bsrSortedRowPtr,
bsrSortedColInd,
rowBlockDim,
colBlockDim,
bscVal,
bscRowInd,
bscColPtr,
copyValues,
idxBase,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseXgebsr2csr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
const cusparseMatDescr_t descrA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDim,
int colBlockDim,
const cusparseMatDescr_t descrC,
int *csrSortedRowPtrC,
int *csrSortedColIndC) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXgebsr2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
descrA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDim,
colBlockDim,
descrC,
csrSortedRowPtrC,
csrSortedColIndC);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgebsr2csr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
const cusparseMatDescr_t descrA,
const float *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDim,
int colBlockDim,
const cusparseMatDescr_t descrC,
float *csrSortedValC,
int *csrSortedRowPtrC,
int *csrSortedColIndC) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgebsr2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDim,
colBlockDim,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgebsr2csr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
const cusparseMatDescr_t descrA,
const double *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDim,
int colBlockDim,
const cusparseMatDescr_t descrC,
double *csrSortedValC,
int *csrSortedRowPtrC,
int *csrSortedColIndC) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgebsr2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDim,
colBlockDim,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgebsr2csr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
const cusparseMatDescr_t descrA,
const cuComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDim,
int colBlockDim,
const cusparseMatDescr_t descrC,
cuComplex *csrSortedValC,
int *csrSortedRowPtrC,
int *csrSortedColIndC) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgebsr2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDim,
colBlockDim,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgebsr2csr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDim,
int colBlockDim,
const cusparseMatDescr_t descrC,
cuDoubleComplex *csrSortedValC,
int *csrSortedRowPtrC,
int *csrSortedColIndC) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgebsr2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDim,
colBlockDim,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsr2gebsr_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
int rowBlockDim,
int colBlockDim,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsr2gebsr_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
rowBlockDim,
colBlockDim,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsr2gebsr_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
int rowBlockDim,
int colBlockDim,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsr2gebsr_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
rowBlockDim,
colBlockDim,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsr2gebsr_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
int rowBlockDim,
int colBlockDim,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsr2gebsr_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
rowBlockDim,
colBlockDim,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsr2gebsr_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
int rowBlockDim,
int colBlockDim,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsr2gebsr_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
rowBlockDim,
colBlockDim,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsr2gebsr_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
int rowBlockDim,
int colBlockDim,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsr2gebsr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
rowBlockDim,
colBlockDim,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsr2gebsr_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
int rowBlockDim,
int colBlockDim,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsr2gebsr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
rowBlockDim,
colBlockDim,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsr2gebsr_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
int rowBlockDim,
int colBlockDim,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsr2gebsr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
rowBlockDim,
colBlockDim,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsr2gebsr_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
int rowBlockDim,
int colBlockDim,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsr2gebsr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
rowBlockDim,
colBlockDim,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcsr2gebsrNnz(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cusparseMatDescr_t descrC,
int *bsrSortedRowPtrC,
int rowBlockDim,
int colBlockDim,
int *nnzTotalDevHostPtr,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcsr2gebsrNnz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedRowPtrA,
csrSortedColIndA,
descrC,
bsrSortedRowPtrC,
rowBlockDim,
colBlockDim,
nnzTotalDevHostPtr,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsr2gebsr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cusparseMatDescr_t descrC,
float *bsrSortedValC,
int *bsrSortedRowPtrC,
int *bsrSortedColIndC,
int rowBlockDim,
int colBlockDim,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsr2gebsr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
descrC,
bsrSortedValC,
bsrSortedRowPtrC,
bsrSortedColIndC,
rowBlockDim,
colBlockDim,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsr2gebsr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cusparseMatDescr_t descrC,
double *bsrSortedValC,
int *bsrSortedRowPtrC,
int *bsrSortedColIndC,
int rowBlockDim,
int colBlockDim,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsr2gebsr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
descrC,
bsrSortedValC,
bsrSortedRowPtrC,
bsrSortedColIndC,
rowBlockDim,
colBlockDim,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsr2gebsr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cusparseMatDescr_t descrC,
cuComplex *bsrSortedValC,
int *bsrSortedRowPtrC,
int *bsrSortedColIndC,
int rowBlockDim,
int colBlockDim,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsr2gebsr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
descrC,
bsrSortedValC,
bsrSortedRowPtrC,
bsrSortedColIndC,
rowBlockDim,
colBlockDim,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsr2gebsr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int m,
int n,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const cusparseMatDescr_t descrC,
cuDoubleComplex *bsrSortedValC,
int *bsrSortedRowPtrC,
int *bsrSortedColIndC,
int rowBlockDim,
int colBlockDim,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsr2gebsr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
m,
n,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
descrC,
bsrSortedValC,
bsrSortedRowPtrC,
bsrSortedColIndC,
rowBlockDim,
colBlockDim,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgebsr2gebsr_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
int nnzb,
const cusparseMatDescr_t descrA,
const float *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDimA,
int colBlockDimA,
int rowBlockDimC,
int colBlockDimC,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgebsr2gebsr_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDimA,
colBlockDimA,
rowBlockDimC,
colBlockDimC,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgebsr2gebsr_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
int nnzb,
const cusparseMatDescr_t descrA,
const double *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDimA,
int colBlockDimA,
int rowBlockDimC,
int colBlockDimC,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgebsr2gebsr_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDimA,
colBlockDimA,
rowBlockDimC,
colBlockDimC,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgebsr2gebsr_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
int nnzb,
const cusparseMatDescr_t descrA,
const cuComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDimA,
int colBlockDimA,
int rowBlockDimC,
int colBlockDimC,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgebsr2gebsr_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDimA,
colBlockDimA,
rowBlockDimC,
colBlockDimC,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgebsr2gebsr_bufferSize(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
int nnzb,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDimA,
int colBlockDimA,
int rowBlockDimC,
int colBlockDimC,
int *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgebsr2gebsr_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDimA,
colBlockDimA,
rowBlockDimC,
colBlockDimC,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgebsr2gebsr_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
int nnzb,
const cusparseMatDescr_t descrA,
const float *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDimA,
int colBlockDimA,
int rowBlockDimC,
int colBlockDimC,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgebsr2gebsr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDimA,
colBlockDimA,
rowBlockDimC,
colBlockDimC,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgebsr2gebsr_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
int nnzb,
const cusparseMatDescr_t descrA,
const double *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDimA,
int colBlockDimA,
int rowBlockDimC,
int colBlockDimC,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgebsr2gebsr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDimA,
colBlockDimA,
rowBlockDimC,
colBlockDimC,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgebsr2gebsr_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
int nnzb,
const cusparseMatDescr_t descrA,
const cuComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDimA,
int colBlockDimA,
int rowBlockDimC,
int colBlockDimC,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgebsr2gebsr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDimA,
colBlockDimA,
rowBlockDimC,
colBlockDimC,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgebsr2gebsr_bufferSizeExt(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
int nnzb,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDimA,
int colBlockDimA,
int rowBlockDimC,
int colBlockDimC,
size_t *pBufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgebsr2gebsr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDimA,
colBlockDimA,
rowBlockDimC,
colBlockDimC,
pBufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseXgebsr2gebsrNnz(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
int nnzb,
const cusparseMatDescr_t descrA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDimA,
int colBlockDimA,
const cusparseMatDescr_t descrC,
int *bsrSortedRowPtrC,
int rowBlockDimC,
int colBlockDimC,
int *nnzTotalDevHostPtr,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXgebsr2gebsrNnz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
nnzb,
descrA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDimA,
colBlockDimA,
descrC,
bsrSortedRowPtrC,
rowBlockDimC,
colBlockDimC,
nnzTotalDevHostPtr,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseSgebsr2gebsr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
int nnzb,
const cusparseMatDescr_t descrA,
const float *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDimA,
int colBlockDimA,
const cusparseMatDescr_t descrC,
float *bsrSortedValC,
int *bsrSortedRowPtrC,
int *bsrSortedColIndC,
int rowBlockDimC,
int colBlockDimC,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSgebsr2gebsr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDimA,
colBlockDimA,
descrC,
bsrSortedValC,
bsrSortedRowPtrC,
bsrSortedColIndC,
rowBlockDimC,
colBlockDimC,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDgebsr2gebsr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
int nnzb,
const cusparseMatDescr_t descrA,
const double *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDimA,
int colBlockDimA,
const cusparseMatDescr_t descrC,
double *bsrSortedValC,
int *bsrSortedRowPtrC,
int *bsrSortedColIndC,
int rowBlockDimC,
int colBlockDimC,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDgebsr2gebsr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDimA,
colBlockDimA,
descrC,
bsrSortedValC,
bsrSortedRowPtrC,
bsrSortedColIndC,
rowBlockDimC,
colBlockDimC,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCgebsr2gebsr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
int nnzb,
const cusparseMatDescr_t descrA,
const cuComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDimA,
int colBlockDimA,
const cusparseMatDescr_t descrC,
cuComplex *bsrSortedValC,
int *bsrSortedRowPtrC,
int *bsrSortedColIndC,
int rowBlockDimC,
int colBlockDimC,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCgebsr2gebsr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDimA,
colBlockDimA,
descrC,
bsrSortedValC,
bsrSortedRowPtrC,
bsrSortedColIndC,
rowBlockDimC,
colBlockDimC,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZgebsr2gebsr(cusparseHandle_t handle,
cusparseDirection_t dirA,
int mb,
int nb,
int nnzb,
const cusparseMatDescr_t descrA,
const cuDoubleComplex *bsrSortedValA,
const int *bsrSortedRowPtrA,
const int *bsrSortedColIndA,
int rowBlockDimA,
int colBlockDimA,
const cusparseMatDescr_t descrC,
cuDoubleComplex *bsrSortedValC,
int *bsrSortedRowPtrC,
int *bsrSortedColIndC,
int rowBlockDimC,
int colBlockDimC,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZgebsr2gebsr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
dirA,
mb,
nb,
nnzb,
descrA,
bsrSortedValA,
bsrSortedRowPtrA,
bsrSortedColIndA,
rowBlockDimA,
colBlockDimA,
descrC,
bsrSortedValC,
bsrSortedRowPtrC,
bsrSortedColIndC,
rowBlockDimC,
colBlockDimC,
pBuffer);
}
//##############################################################################
//# SPARSE MATRIX SORTING
//##############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseCreateIdentityPermutation(cusparseHandle_t handle,
int n,
int *p) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateIdentityPermutation);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
n,
p);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcoosort_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
int nnz,
const int *cooRowsA,
const int *cooColsA,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcoosort_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
cooRowsA,
cooColsA,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcoosortByRow(cusparseHandle_t handle,
int m,
int n,
int nnz,
int *cooRowsA,
int *cooColsA,
int *P,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcoosortByRow);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
cooRowsA,
cooColsA,
P,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcoosortByColumn(cusparseHandle_t handle,
int m,
int n,
int nnz,
int *cooRowsA,
int *cooColsA,
int *P,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcoosortByColumn);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
cooRowsA,
cooColsA,
P,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcsrsort_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
int nnz,
const int *csrRowPtrA,
const int *csrColIndA,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcsrsort_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
csrRowPtrA,
csrColIndA,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcsrsort(cusparseHandle_t handle,
int m,
int n,
int nnz,
const cusparseMatDescr_t descrA,
const int *csrRowPtrA,
int *csrColIndA,
int *P,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcsrsort);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
descrA,
csrRowPtrA,
csrColIndA,
P,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcscsort_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
int nnz,
const int *cscColPtrA,
const int *cscRowIndA,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcscsort_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
cscColPtrA,
cscRowIndA,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseXcscsort(cusparseHandle_t handle,
int m,
int n,
int nnz,
const cusparseMatDescr_t descrA,
const int *cscColPtrA,
int *cscRowIndA,
int *P,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseXcscsort);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
descrA,
cscColPtrA,
cscRowIndA,
P,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsru2csr_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
int nnz,
float *csrVal,
const int *csrRowPtr,
int *csrColInd,
csru2csrInfo_t info,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsru2csr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
csrVal,
csrRowPtr,
csrColInd,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsru2csr_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
int nnz,
double *csrVal,
const int *csrRowPtr,
int *csrColInd,
csru2csrInfo_t info,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsru2csr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
csrVal,
csrRowPtr,
csrColInd,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsru2csr_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
int nnz,
cuComplex *csrVal,
const int *csrRowPtr,
int *csrColInd,
csru2csrInfo_t info,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsru2csr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
csrVal,
csrRowPtr,
csrColInd,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsru2csr_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
int nnz,
cuDoubleComplex *csrVal,
const int *csrRowPtr,
int *csrColInd,
csru2csrInfo_t info,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsru2csr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
csrVal,
csrRowPtr,
csrColInd,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsru2csr(cusparseHandle_t handle,
int m,
int n,
int nnz,
const cusparseMatDescr_t descrA,
float *csrVal,
const int *csrRowPtr,
int *csrColInd,
csru2csrInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsru2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
descrA,
csrVal,
csrRowPtr,
csrColInd,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsru2csr(cusparseHandle_t handle,
int m,
int n,
int nnz,
const cusparseMatDescr_t descrA,
double *csrVal,
const int *csrRowPtr,
int *csrColInd,
csru2csrInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsru2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
descrA,
csrVal,
csrRowPtr,
csrColInd,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsru2csr(cusparseHandle_t handle,
int m,
int n,
int nnz,
const cusparseMatDescr_t descrA,
cuComplex *csrVal,
const int *csrRowPtr,
int *csrColInd,
csru2csrInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsru2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
descrA,
csrVal,
csrRowPtr,
csrColInd,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsru2csr(cusparseHandle_t handle,
int m,
int n,
int nnz,
const cusparseMatDescr_t descrA,
cuDoubleComplex *csrVal,
const int *csrRowPtr,
int *csrColInd,
csru2csrInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsru2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
descrA,
csrVal,
csrRowPtr,
csrColInd,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseScsr2csru(cusparseHandle_t handle,
int m,
int n,
int nnz,
const cusparseMatDescr_t descrA,
float *csrVal,
const int *csrRowPtr,
int *csrColInd,
csru2csrInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScsr2csru);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
descrA,
csrVal,
csrRowPtr,
csrColInd,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDcsr2csru(cusparseHandle_t handle,
int m,
int n,
int nnz,
const cusparseMatDescr_t descrA,
double *csrVal,
const int *csrRowPtr,
int *csrColInd,
csru2csrInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDcsr2csru);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
descrA,
csrVal,
csrRowPtr,
csrColInd,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCcsr2csru(cusparseHandle_t handle,
int m,
int n,
int nnz,
const cusparseMatDescr_t descrA,
cuComplex *csrVal,
const int *csrRowPtr,
int *csrColInd,
csru2csrInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCcsr2csru);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
descrA,
csrVal,
csrRowPtr,
csrColInd,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseZcsr2csru(cusparseHandle_t handle,
int m,
int n,
int nnz,
const cusparseMatDescr_t descrA,
cuDoubleComplex *csrVal,
const int *csrRowPtr,
int *csrColInd,
csru2csrInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseZcsr2csru);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
descrA,
csrVal,
csrRowPtr,
csrColInd,
info,
pBuffer);
}
#if defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseHpruneDense2csr_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
const __half *A,
int lda,
const __half *threshold,
const cusparseMatDescr_t descrC,
const __half *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseHpruneDense2csr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
threshold,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBufferSizeInBytes);
}
#endif // defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseSpruneDense2csr_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
const float *A,
int lda,
const float *threshold,
const cusparseMatDescr_t descrC,
const float *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpruneDense2csr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
threshold,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDpruneDense2csr_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
const double *A,
int lda,
const double *threshold,
const cusparseMatDescr_t descrC,
const double *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDpruneDense2csr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
threshold,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBufferSizeInBytes);
}
#if defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseHpruneDense2csrNnz(cusparseHandle_t handle,
int m,
int n,
const __half *A,
int lda,
const __half *threshold,
const cusparseMatDescr_t descrC,
int *csrRowPtrC,
int *nnzTotalDevHostPtr,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseHpruneDense2csrNnz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
threshold,
descrC,
csrRowPtrC,
nnzTotalDevHostPtr,
pBuffer);
}
#endif // defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseSpruneDense2csrNnz(cusparseHandle_t handle,
int m,
int n,
const float *A,
int lda,
const float *threshold,
const cusparseMatDescr_t descrC,
int *csrRowPtrC,
int *nnzTotalDevHostPtr,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpruneDense2csrNnz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
threshold,
descrC,
csrRowPtrC,
nnzTotalDevHostPtr,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDpruneDense2csrNnz(cusparseHandle_t handle,
int m,
int n,
const double *A,
int lda,
const double *threshold,
const cusparseMatDescr_t descrC,
int *csrSortedRowPtrC,
int *nnzTotalDevHostPtr,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDpruneDense2csrNnz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
threshold,
descrC,
csrSortedRowPtrC,
nnzTotalDevHostPtr,
pBuffer);
}
#if defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseHpruneDense2csr(cusparseHandle_t handle,
int m,
int n,
const __half *A,
int lda,
const __half *threshold,
const cusparseMatDescr_t descrC,
__half *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseHpruneDense2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
threshold,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBuffer);
}
#endif // defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseSpruneDense2csr(cusparseHandle_t handle,
int m,
int n,
const float *A,
int lda,
const float *threshold,
const cusparseMatDescr_t descrC,
float *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpruneDense2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
threshold,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDpruneDense2csr(cusparseHandle_t handle,
int m,
int n,
const double *A,
int lda,
const double *threshold,
const cusparseMatDescr_t descrC,
double *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDpruneDense2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
threshold,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBuffer);
}
#if defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseHpruneCsr2csr_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const __half *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const __half *threshold,
const cusparseMatDescr_t descrC,
const __half *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseHpruneCsr2csr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
threshold,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBufferSizeInBytes);
}
#endif // defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseSpruneCsr2csr_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const float *threshold,
const cusparseMatDescr_t descrC,
const float *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpruneCsr2csr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
threshold,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDpruneCsr2csr_bufferSizeExt(cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const double *threshold,
const cusparseMatDescr_t descrC,
const double *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDpruneCsr2csr_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
threshold,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBufferSizeInBytes);
}
#if defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseHpruneCsr2csrNnz(cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const __half *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const __half *threshold,
const cusparseMatDescr_t descrC,
int *csrSortedRowPtrC,
int *nnzTotalDevHostPtr,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseHpruneCsr2csrNnz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
threshold,
descrC,
csrSortedRowPtrC,
nnzTotalDevHostPtr,
pBuffer);
}
#endif // defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseSpruneCsr2csrNnz(cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const float *threshold,
const cusparseMatDescr_t descrC,
int *csrSortedRowPtrC,
int *nnzTotalDevHostPtr,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpruneCsr2csrNnz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
threshold,
descrC,
csrSortedRowPtrC,
nnzTotalDevHostPtr,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDpruneCsr2csrNnz(cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const double *threshold,
const cusparseMatDescr_t descrC,
int *csrSortedRowPtrC,
int *nnzTotalDevHostPtr,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDpruneCsr2csrNnz);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
threshold,
descrC,
csrSortedRowPtrC,
nnzTotalDevHostPtr,
pBuffer);
}
#if defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseHpruneCsr2csr(cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const __half *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const __half *threshold,
const cusparseMatDescr_t descrC,
__half *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseHpruneCsr2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
threshold,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBuffer);
}
#endif // defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseSpruneCsr2csr(cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const float *threshold,
const cusparseMatDescr_t descrC,
float *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpruneCsr2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
threshold,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDpruneCsr2csr(cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
const double *threshold,
const cusparseMatDescr_t descrC,
double *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDpruneCsr2csr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
threshold,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
pBuffer);
}
#if defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseHpruneDense2csrByPercentage_bufferSizeExt(
cusparseHandle_t handle,
int m,
int n,
const __half *A,
int lda,
float percentage,
const cusparseMatDescr_t descrC,
const __half *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
pruneInfo_t info,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseHpruneDense2csrByPercentage_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
percentage,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBufferSizeInBytes);
}
#endif // defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseSpruneDense2csrByPercentage_bufferSizeExt(
cusparseHandle_t handle,
int m,
int n,
const float *A,
int lda,
float percentage,
const cusparseMatDescr_t descrC,
const float *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
pruneInfo_t info,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpruneDense2csrByPercentage_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
percentage,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDpruneDense2csrByPercentage_bufferSizeExt(
cusparseHandle_t handle,
int m,
int n,
const double *A,
int lda,
float percentage,
const cusparseMatDescr_t descrC,
const double *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
pruneInfo_t info,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDpruneDense2csrByPercentage_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
percentage,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBufferSizeInBytes);
}
#if defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseHpruneDense2csrNnzByPercentage(
cusparseHandle_t handle,
int m,
int n,
const __half *A,
int lda,
float percentage,
const cusparseMatDescr_t descrC,
int *csrRowPtrC,
int *nnzTotalDevHostPtr,
pruneInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseHpruneDense2csrNnzByPercentage);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
percentage,
descrC,
csrRowPtrC,
nnzTotalDevHostPtr,
info,
pBuffer);
}
#endif // defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseSpruneDense2csrNnzByPercentage(
cusparseHandle_t handle,
int m,
int n,
const float *A,
int lda,
float percentage,
const cusparseMatDescr_t descrC,
int *csrRowPtrC,
int *nnzTotalDevHostPtr,
pruneInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpruneDense2csrNnzByPercentage);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
percentage,
descrC,
csrRowPtrC,
nnzTotalDevHostPtr,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDpruneDense2csrNnzByPercentage(
cusparseHandle_t handle,
int m,
int n,
const double *A,
int lda,
float percentage,
const cusparseMatDescr_t descrC,
int *csrRowPtrC,
int *nnzTotalDevHostPtr,
pruneInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDpruneDense2csrNnzByPercentage);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
percentage,
descrC,
csrRowPtrC,
nnzTotalDevHostPtr,
info,
pBuffer);
}
#if defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseHpruneDense2csrByPercentage(cusparseHandle_t handle,
int m,
int n,
const __half *A,
int lda,
float percentage,
const cusparseMatDescr_t descrC,
__half *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
pruneInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseHpruneDense2csrByPercentage);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
percentage,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBuffer);
}
#endif // defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseSpruneDense2csrByPercentage(cusparseHandle_t handle,
int m,
int n,
const float *A,
int lda,
float percentage,
const cusparseMatDescr_t descrC,
float *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
pruneInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpruneDense2csrByPercentage);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
percentage,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDpruneDense2csrByPercentage(cusparseHandle_t handle,
int m,
int n,
const double *A,
int lda,
float percentage,
const cusparseMatDescr_t descrC,
double *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
pruneInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDpruneDense2csrByPercentage);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
A,
lda,
percentage,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBuffer);
}
#if defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseHpruneCsr2csrByPercentage_bufferSizeExt(
cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const __half *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
float percentage,
const cusparseMatDescr_t descrC,
const __half *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
pruneInfo_t info,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseHpruneCsr2csrByPercentage_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
percentage,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBufferSizeInBytes);
}
#endif // defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseSpruneCsr2csrByPercentage_bufferSizeExt(
cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
float percentage,
const cusparseMatDescr_t descrC,
const float *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
pruneInfo_t info,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpruneCsr2csrByPercentage_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
percentage,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBufferSizeInBytes);
}
cusparseStatus_t CUSPARSEAPI
cusparseDpruneCsr2csrByPercentage_bufferSizeExt(
cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
float percentage,
const cusparseMatDescr_t descrC,
const double *csrSortedValC,
const int *csrSortedRowPtrC,
const int *csrSortedColIndC,
pruneInfo_t info,
size_t *pBufferSizeInBytes) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDpruneCsr2csrByPercentage_bufferSizeExt);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
percentage,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBufferSizeInBytes);
}
#if defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseHpruneCsr2csrNnzByPercentage(
cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const __half *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
float percentage,
const cusparseMatDescr_t descrC,
int *csrSortedRowPtrC,
int *nnzTotalDevHostPtr,
pruneInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseHpruneCsr2csrNnzByPercentage);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
percentage,
descrC,
csrSortedRowPtrC,
nnzTotalDevHostPtr,
info,
pBuffer);
}
#endif // defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseSpruneCsr2csrNnzByPercentage(
cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
float percentage,
const cusparseMatDescr_t descrC,
int *csrSortedRowPtrC,
int *nnzTotalDevHostPtr,
pruneInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpruneCsr2csrNnzByPercentage);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
percentage,
descrC,
csrSortedRowPtrC,
nnzTotalDevHostPtr,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDpruneCsr2csrNnzByPercentage(
cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
float percentage,
const cusparseMatDescr_t descrC,
int *csrSortedRowPtrC,
int *nnzTotalDevHostPtr,
pruneInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDpruneCsr2csrNnzByPercentage);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
percentage,
descrC,
csrSortedRowPtrC,
nnzTotalDevHostPtr,
info,
pBuffer);
}
#if defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseHpruneCsr2csrByPercentage(cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const __half *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
float percentage, /* between 0 to 100 */
const cusparseMatDescr_t descrC,
__half *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
pruneInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseHpruneCsr2csrByPercentage);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
percentage,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBuffer);
}
#endif // defined(__cplusplus)
cusparseStatus_t CUSPARSEAPI
cusparseSpruneCsr2csrByPercentage(cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const float *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
float percentage,
const cusparseMatDescr_t descrC,
float *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
pruneInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpruneCsr2csrByPercentage);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
percentage,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseDpruneCsr2csrByPercentage(cusparseHandle_t handle,
int m,
int n,
int nnzA,
const cusparseMatDescr_t descrA,
const double *csrSortedValA,
const int *csrSortedRowPtrA,
const int *csrSortedColIndA,
float percentage,
const cusparseMatDescr_t descrC,
double *csrSortedValC,
const int *csrSortedRowPtrC,
int *csrSortedColIndC,
pruneInfo_t info,
void *pBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDpruneCsr2csrByPercentage);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnzA,
descrA,
csrSortedValA,
csrSortedRowPtrA,
csrSortedColIndA,
percentage,
descrC,
csrSortedValC,
csrSortedRowPtrC,
csrSortedColIndC,
info,
pBuffer);
}
//##############################################################################
//# CSR2CSC
//##############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseCsr2cscEx2(cusparseHandle_t handle,
int m,
int n,
int nnz,
const void *csrVal,
const int *csrRowPtr,
const int *csrColInd,
void *cscVal,
int *cscColPtr,
int *cscRowInd,
cudaDataType valType,
cusparseAction_t copyValues,
cusparseIndexBase_t idxBase,
cusparseCsr2CscAlg_t alg,
void *buffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCsr2cscEx2);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
csrVal,
csrRowPtr,
csrColInd,
cscVal,
cscColPtr,
cscRowInd,
valType,
copyValues,
idxBase,
alg,
buffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseCsr2cscEx2_bufferSize(cusparseHandle_t handle,
int m,
int n,
int nnz,
const void *csrVal,
const int *csrRowPtr,
const int *csrColInd,
void *cscVal,
int *cscColPtr,
int *cscRowInd,
cudaDataType valType,
cusparseAction_t copyValues,
cusparseIndexBase_t idxBase,
cusparseCsr2CscAlg_t alg,
size_t *bufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCsr2cscEx2_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
m,
n,
nnz,
csrVal,
csrRowPtr,
csrColInd,
cscVal,
cscColPtr,
cscRowInd,
valType,
copyValues,
idxBase,
alg,
bufferSize);
}
// #############################################################################
// # SPARSE VECTOR DESCRIPTOR
// #############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseCreateSpVec(cusparseSpVecDescr_t *spVecDescr,
int64_t size,
int64_t nnz,
void *indices,
void *values,
cusparseIndexType_t idxType,
cusparseIndexBase_t idxBase,
cudaDataType valueType) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateSpVec);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spVecDescr,
size,
nnz,
indices,
values,
idxType,
idxBase,
valueType);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroySpVec(cusparseSpVecDescr_t spVecDescr) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroySpVec);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spVecDescr);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpVecGet(cusparseSpVecDescr_t spVecDescr,
int64_t *size,
int64_t *nnz,
void **indices,
void **values,
cusparseIndexType_t *idxType,
cusparseIndexBase_t *idxBase,
cudaDataType *valueType) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpVecGet);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spVecDescr,
size,
nnz,
indices,
values,
idxType,
idxBase,
valueType);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpVecGetIndexBase(cusparseSpVecDescr_t spVecDescr,
cusparseIndexBase_t *idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpVecGetIndexBase);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spVecDescr,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpVecGetValues(cusparseSpVecDescr_t spVecDescr,
void **values) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpVecGetValues);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spVecDescr,
values);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpVecSetValues(cusparseSpVecDescr_t spVecDescr,
void *values) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpVecSetValues);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spVecDescr,
values);
}
// #############################################################################
// # DENSE VECTOR DESCRIPTOR
// #############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseCreateDnVec(cusparseDnVecDescr_t *dnVecDescr,
int64_t size,
void *values,
cudaDataType valueType) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateDnVec);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(dnVecDescr,
size,
values,
valueType);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroyDnVec(cusparseDnVecDescr_t dnVecDescr) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroyDnVec);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(dnVecDescr);
}
cusparseStatus_t CUSPARSEAPI
cusparseDnVecGet(cusparseDnVecDescr_t dnVecDescr,
int64_t *size,
void **values,
cudaDataType *valueType) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDnVecGet);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(dnVecDescr,
size,
values,
valueType);
}
cusparseStatus_t CUSPARSEAPI
cusparseDnVecGetValues(cusparseDnVecDescr_t dnVecDescr,
void **values) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDnVecGetValues);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(dnVecDescr,
values);
}
cusparseStatus_t CUSPARSEAPI
cusparseDnVecSetValues(cusparseDnVecDescr_t dnVecDescr,
void *values) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDnVecSetValues);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(dnVecDescr,
values);
}
// #############################################################################
// # SPARSE MATRIX DESCRIPTOR
// #############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseDestroySpMat(cusparseSpMatDescr_t spMatDescr) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroySpMat);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpMatGetFormat(cusparseSpMatDescr_t spMatDescr,
cusparseFormat_t *format) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpMatGetFormat);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
format);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpMatGetIndexBase(cusparseSpMatDescr_t spMatDescr,
cusparseIndexBase_t *idxBase) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpMatGetIndexBase);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
idxBase);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpMatGetValues(cusparseSpMatDescr_t spMatDescr,
void **values) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpMatGetValues);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
values);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpMatSetValues(cusparseSpMatDescr_t spMatDescr,
void *values) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpMatSetValues);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
values);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpMatGetSize(cusparseSpMatDescr_t spMatDescr,
int64_t *rows,
int64_t *cols,
int64_t *nnz) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpMatGetSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
rows,
cols,
nnz);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpMatSetStridedBatch(cusparseSpMatDescr_t spMatDescr,
int batchCount) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpMatSetStridedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
batchCount);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpMatGetStridedBatch(cusparseSpMatDescr_t spMatDescr,
int *batchCount) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpMatGetStridedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
batchCount);
}
cusparseStatus_t CUSPARSEAPI
cusparseCooSetStridedBatch(cusparseSpMatDescr_t spMatDescr,
int batchCount,
int64_t batchStride) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCooSetStridedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
batchCount,
batchStride);
}
cusparseStatus_t CUSPARSEAPI
cusparseCsrSetStridedBatch(cusparseSpMatDescr_t spMatDescr,
int batchCount,
int64_t offsetsBatchStride,
int64_t columnsValuesBatchStride) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCsrSetStridedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
batchCount,
offsetsBatchStride,
columnsValuesBatchStride);
}
//------------------------------------------------------------------------------
// ### CSR ###
cusparseStatus_t CUSPARSEAPI
cusparseCreateCsr(cusparseSpMatDescr_t *spMatDescr,
int64_t rows,
int64_t cols,
int64_t nnz,
void *csrRowOffsets,
void *csrColInd,
void *csrValues,
cusparseIndexType_t csrRowOffsetsType,
cusparseIndexType_t csrColIndType,
cusparseIndexBase_t idxBase,
cudaDataType valueType) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateCsr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
rows,
cols,
nnz,
csrRowOffsets,
csrColInd,
csrValues,
csrRowOffsetsType,
csrColIndType,
idxBase,
valueType);
}
cusparseStatus_t CUSPARSEAPI
cusparseCsrGet(cusparseSpMatDescr_t spMatDescr,
int64_t *rows,
int64_t *cols,
int64_t *nnz,
void **csrRowOffsets,
void **csrColInd,
void **csrValues,
cusparseIndexType_t *csrRowOffsetsType,
cusparseIndexType_t *csrColIndType,
cusparseIndexBase_t *idxBase,
cudaDataType *valueType) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCsrGet);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
rows,
cols,
nnz,
csrRowOffsets,
csrColInd,
csrValues,
csrRowOffsetsType,
csrColIndType,
idxBase,
valueType);
}
cusparseStatus_t CUSPARSEAPI
cusparseCsrSetPointers(cusparseSpMatDescr_t spMatDescr,
void *csrRowOffsets,
void *csrColInd,
void *csrValues) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCsrSetPointers);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
csrRowOffsets,
csrColInd,
csrValues);
}
//------------------------------------------------------------------------------
// ### COO ###
cusparseStatus_t CUSPARSEAPI
cusparseCreateCoo(cusparseSpMatDescr_t *spMatDescr,
int64_t rows,
int64_t cols,
int64_t nnz,
void *cooRowInd,
void *cooColInd,
void *cooValues,
cusparseIndexType_t cooIdxType,
cusparseIndexBase_t idxBase,
cudaDataType valueType) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateCoo);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
rows,
cols,
nnz,
cooRowInd,
cooColInd,
cooValues,
cooIdxType,
idxBase,
valueType);
}
cusparseStatus_t CUSPARSEAPI
cusparseCreateCooAoS(cusparseSpMatDescr_t *spMatDescr,
int64_t rows,
int64_t cols,
int64_t nnz,
void *cooInd,
void *cooValues,
cusparseIndexType_t cooIdxType,
cusparseIndexBase_t idxBase,
cudaDataType valueType) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateCooAoS);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
rows,
cols,
nnz,
cooInd,
cooValues,
cooIdxType,
idxBase,
valueType);
}
cusparseStatus_t CUSPARSEAPI
cusparseCooGet(cusparseSpMatDescr_t spMatDescr,
int64_t *rows,
int64_t *cols,
int64_t *nnz,
void **cooRowInd, // COO row indices
void **cooColInd, // COO column indices
void **cooValues, // COO values
cusparseIndexType_t *idxType,
cusparseIndexBase_t *idxBase,
cudaDataType *valueType) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCooGet);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
rows,
cols,
nnz,
cooRowInd,
cooColInd,
cooValues,
idxType,
idxBase,
valueType);
}
cusparseStatus_t CUSPARSEAPI
cusparseCooAoSGet(cusparseSpMatDescr_t spMatDescr,
int64_t *rows,
int64_t *cols,
int64_t *nnz,
void **cooInd, // COO indices
void **cooValues, // COO values
cusparseIndexType_t *idxType,
cusparseIndexBase_t *idxBase,
cudaDataType *valueType) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCooAoSGet);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(spMatDescr,
rows,
cols,
nnz,
cooInd,
cooValues,
idxType,
idxBase,
valueType);
}
// #############################################################################
// # DENSE MATRIX DESCRIPTOR
// #############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseCreateDnMat(cusparseDnMatDescr_t *dnMatDescr,
int64_t rows,
int64_t cols,
int64_t ld,
void *values,
cudaDataType valueType,
cusparseOrder_t order) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseCreateDnMat);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(dnMatDescr,
rows,
cols,
ld,
values,
valueType,
order);
}
cusparseStatus_t CUSPARSEAPI
cusparseDestroyDnMat(cusparseDnMatDescr_t dnMatDescr) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDestroyDnMat);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(dnMatDescr);
}
cusparseStatus_t CUSPARSEAPI
cusparseDnMatGet(cusparseDnMatDescr_t dnMatDescr,
int64_t *rows,
int64_t *cols,
int64_t *ld,
void **values,
cudaDataType *type,
cusparseOrder_t *order) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDnMatGet);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(dnMatDescr,
rows,
cols,
ld,
values,
type,
order);
}
cusparseStatus_t CUSPARSEAPI
cusparseDnMatGetValues(cusparseDnMatDescr_t dnMatDescr,
void **values) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDnMatGetValues);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(dnMatDescr,
values);
}
cusparseStatus_t CUSPARSEAPI
cusparseDnMatSetValues(cusparseDnMatDescr_t dnMatDescr,
void *values) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDnMatSetValues);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(dnMatDescr,
values);
}
cusparseStatus_t CUSPARSEAPI
cusparseDnMatSetStridedBatch(cusparseDnMatDescr_t dnMatDescr,
int batchCount,
int64_t batchStride) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDnMatSetStridedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(dnMatDescr,
batchCount,
batchStride);
}
cusparseStatus_t CUSPARSEAPI
cusparseDnMatGetStridedBatch(cusparseDnMatDescr_t dnMatDescr,
int *batchCount,
int64_t *batchStride) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseDnMatGetStridedBatch);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(dnMatDescr,
batchCount,
batchStride);
}
// #############################################################################
// # VECTOR-VECTOR OPERATIONS
// #############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseAxpby(cusparseHandle_t handle,
const void *alpha,
cusparseSpVecDescr_t vecX,
const void *beta,
cusparseDnVecDescr_t vecY) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseAxpby);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
alpha,
vecX,
beta,
vecY);
}
cusparseStatus_t CUSPARSEAPI
cusparseGather(cusparseHandle_t handle,
cusparseDnVecDescr_t vecY,
cusparseSpVecDescr_t vecX) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseGather);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
vecY,
vecX);
}
cusparseStatus_t CUSPARSEAPI
cusparseScatter(cusparseHandle_t handle,
cusparseSpVecDescr_t vecX,
cusparseDnVecDescr_t vecY) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseScatter);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
vecX,
vecY);
}
cusparseStatus_t CUSPARSEAPI
cusparseRot(cusparseHandle_t handle,
const void *c_coeff,
const void *s_coeff,
cusparseSpVecDescr_t vecX,
cusparseDnVecDescr_t vecY) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseRot);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
c_coeff,
s_coeff,
vecX,
vecY);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpVV_bufferSize(cusparseHandle_t handle,
cusparseOperation_t opX,
cusparseSpVecDescr_t vecX,
cusparseDnVecDescr_t vecY,
const void *result,
cudaDataType computeType,
size_t *bufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpVV_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
opX,
vecX,
vecY,
result,
computeType,
bufferSize);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpVV(cusparseHandle_t handle,
cusparseOperation_t opX,
cusparseSpVecDescr_t vecX,
cusparseDnVecDescr_t vecY,
void *result,
cudaDataType computeType,
void *externalBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpVV);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
opX,
vecX,
vecY,
result,
computeType,
externalBuffer);
}
// #############################################################################
// # SPARSE MATRIX-VECTOR MULTIPLICATION
// #############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseSpMV(cusparseHandle_t handle,
cusparseOperation_t opA,
const void *alpha,
cusparseSpMatDescr_t matA,
cusparseDnVecDescr_t vecX,
const void *beta,
cusparseDnVecDescr_t vecY,
cudaDataType computeType,
cusparseSpMVAlg_t alg,
void *externalBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpMV);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
opA,
alpha,
matA,
vecX,
beta,
vecY,
computeType,
alg,
externalBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpMV_bufferSize(cusparseHandle_t handle,
cusparseOperation_t opA,
const void *alpha,
cusparseSpMatDescr_t matA,
cusparseDnVecDescr_t vecX,
const void *beta,
cusparseDnVecDescr_t vecY,
cudaDataType computeType,
cusparseSpMVAlg_t alg,
size_t *bufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpMV_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
opA,
alpha,
matA,
vecX,
beta,
vecY,
computeType,
alg,
bufferSize);
}
// #############################################################################
// # SPARSE MATRIX-MATRIX MULTIPLICATION
// #############################################################################
#ifndef DGSPARSE
cusparseStatus_t CUSPARSEAPI
cusparseSpMM(cusparseHandle_t handle,
cusparseOperation_t opA,
cusparseOperation_t opB,
const void *alpha,
cusparseSpMatDescr_t matA,
cusparseDnMatDescr_t matB,
const void *beta,
cusparseDnMatDescr_t matC,
cudaDataType computeType,
cusparseSpMMAlg_t alg,
void *externalBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpMM);
// LOG(INFO, "Enter %s()", __FUNCTION__);
return _real_sym(handle, opA, opB, alpha, matA, matB, beta, matC, computeType, alg, externalBuffer);
}
#endif
#ifdef DGSPARSE
cusparseStatus_t CUSPARSEAPI
cusparseSpMM(cusparseHandle_t handle,
cusparseOperation_t opA,
cusparseOperation_t opB,
const void *alpha,
cusparseSpMatDescr_t matA,
cusparseDnMatDescr_t matB,
const void *beta,
cusparseDnMatDescr_t matC,
cudaDataType computeType,
cusparseSpMMAlg_t alg,
void *externalBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(DGSPARSE_LIB, spmm_cuda);
// LOG(INFO, "Enter %s() our dgsparse", __FUNCTION__);
int64_t rows;
int64_t cols;
int64_t Brows;
int64_t Bcols;
int64_t ld;
int64_t nnz;
void *csrRowOffsets = nullptr;
void *csrColInd = nullptr;
void *csrValues = nullptr;
void *matBValues = nullptr;
void *matCValues = nullptr;
cusparseIndexType_t csrRowOffsetsType;
cusparseIndexType_t csrColIndType;
cusparseIndexBase_t idxBase;
cudaDataType valueType;
cudaDataType BType;
cusparseOrder_t order;
cusparseCsrGet(matA, &rows, &cols, &nnz, &csrRowOffsets, &csrColInd,
&csrValues, &csrRowOffsetsType, &csrColIndType, &idxBase, &valueType);
cusparseDnMatGet(matB,
&Brows,
&Bcols,
&ld,
&matBValues,
&BType,
&order);
cusparseDnMatGetValues(matC, &matCValues);
_real_sym((int)rows, (int)Bcols, reinterpret_cast<int *>(csrRowOffsets), reinterpret_cast<int *>(csrColInd),
reinterpret_cast<float *>(csrValues), reinterpret_cast<float *>(matBValues), reinterpret_cast<float *>(matCValues));
return CUSPARSE_STATUS_SUCCESS;
}
#endif
cusparseStatus_t CUSPARSEAPI
cusparseSpMM_bufferSize(cusparseHandle_t handle,
cusparseOperation_t opA,
cusparseOperation_t opB,
const void *alpha,
cusparseSpMatDescr_t matA,
cusparseDnMatDescr_t matB,
const void *beta,
cusparseDnMatDescr_t matC,
cudaDataType computeType,
cusparseSpMMAlg_t alg,
size_t *bufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpMM_bufferSize);
// LOG(INFO, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
opA,
opB,
alpha,
matA,
matB,
beta,
matC,
computeType,
alg,
bufferSize);
// return CUSPARSE_STATUS_SUCCESS;
}
// #############################################################################
// # SPARSE MATRIX - SPARSE MATRIX MULTIPLICATION (SpGEMM)
// #############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseSpGEMM_createDescr(cusparseSpGEMMDescr_t *descr) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpGEMM_createDescr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(descr);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpGEMM_destroyDescr(cusparseSpGEMMDescr_t descr) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpGEMM_destroyDescr);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(descr);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpGEMM_workEstimation(cusparseHandle_t handle,
cusparseOperation_t opA,
cusparseOperation_t opB,
const void *alpha,
cusparseSpMatDescr_t matA,
cusparseSpMatDescr_t matB,
const void *beta,
cusparseSpMatDescr_t matC,
cudaDataType computeType,
cusparseSpGEMMAlg_t alg,
cusparseSpGEMMDescr_t spgemmDescr,
size_t *bufferSize1,
void *externalBuffer1) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpGEMM_workEstimation);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
opA,
opB,
alpha,
matA,
matB,
beta,
matC,
computeType,
alg,
spgemmDescr,
bufferSize1,
externalBuffer1);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpGEMM_compute(cusparseHandle_t handle,
cusparseOperation_t opA,
cusparseOperation_t opB,
const void *alpha,
cusparseSpMatDescr_t matA,
cusparseSpMatDescr_t matB,
const void *beta,
cusparseSpMatDescr_t matC,
cudaDataType computeType,
cusparseSpGEMMAlg_t alg,
cusparseSpGEMMDescr_t spgemmDescr,
size_t *bufferSize2,
void *externalBuffer2) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpGEMM_compute);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
opA,
opB,
alpha,
matA,
matB,
beta,
matC,
computeType,
alg,
spgemmDescr,
bufferSize2,
externalBuffer2);
}
cusparseStatus_t CUSPARSEAPI
cusparseSpGEMM_copy(cusparseHandle_t handle,
cusparseOperation_t opA,
cusparseOperation_t opB,
const void *alpha,
cusparseSpMatDescr_t matA,
cusparseSpMatDescr_t matB,
const void *beta,
cusparseSpMatDescr_t matC,
cudaDataType computeType,
cusparseSpGEMMAlg_t alg,
cusparseSpGEMMDescr_t spgemmDescr) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseSpGEMM_copy);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
opA,
opB,
alpha,
matA,
matB,
beta,
matC,
computeType,
alg,
spgemmDescr);
}
// #############################################################################
// # GENERAL MATRIX-MATRIX PATTERN-CONSTRAINED MULTIPLICATION
// #############################################################################
cusparseStatus_t CUSPARSEAPI
cusparseConstrainedGeMM(cusparseHandle_t handle,
cusparseOperation_t opA,
cusparseOperation_t opB,
const void *alpha,
cusparseDnMatDescr_t matA,
cusparseDnMatDescr_t matB,
const void *beta,
cusparseSpMatDescr_t matC,
cudaDataType computeType,
void *externalBuffer) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseConstrainedGeMM);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
opA,
opB,
alpha,
matA,
matB,
beta,
matC,
computeType,
externalBuffer);
}
cusparseStatus_t CUSPARSEAPI
cusparseConstrainedGeMM_bufferSize(cusparseHandle_t handle,
cusparseOperation_t opA,
cusparseOperation_t opB,
const void *alpha,
cusparseDnMatDescr_t matA,
cusparseDnMatDescr_t matB,
const void *beta,
cusparseSpMatDescr_t matC,
cudaDataType computeType,
size_t *bufferSize) {
LOAD_SPARSE_SYMBOL_FOR_ONCE(CUSPARSE_LIB_11_0, cusparseConstrainedGeMM_bufferSize);
LOG(TRACE, "Enter %s()", __FUNCTION__);
return _real_sym(handle,
opA,
opB,
alpha,
matA,
matB,
beta,
matC,
computeType,
bufferSize);
} | 36.451419 | 130 | 0.445269 |
97d8d86a5d670d77b6f886800afe52610252c49c | 3,455 | cpp | C++ | tc 160+/StonesGame.cpp | ibudiselic/contest-problem-solutions | 88082981b4d87da843472e3ca9ed5f4c42b3f0aa | [
"BSD-2-Clause"
] | 3 | 2015-05-25T06:24:37.000Z | 2016-09-10T07:58:00.000Z | tc 160+/StonesGame.cpp | ibudiselic/contest-problem-solutions | 88082981b4d87da843472e3ca9ed5f4c42b3f0aa | [
"BSD-2-Clause"
] | null | null | null | tc 160+/StonesGame.cpp | ibudiselic/contest-problem-solutions | 88082981b4d87da843472e3ca9ed5f4c42b3f0aa | [
"BSD-2-Clause"
] | 5 | 2015-05-25T06:24:40.000Z | 2021-08-19T19:22:29.000Z | #include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstring>
using namespace std;
void bounds(int N, int M, int K, int &l, int &r) {
int rpoint = max(K, M);
int inpoint = M - rpoint + K;
l = M - 2*(inpoint-(K+1)/2) + (K+1)%2;
int lpoint = min(N-K+1, M);
inpoint = M - lpoint + 1;
r = M - 2*(inpoint-(K+1)/2) + (K+1)%2;
}
class StonesGame {
public:
string winner(int N, int M, int K, int L) {
int l, r, ll, rr;
bounds(N, M, K, l, r);
bounds(N, L, K, ll, rr);
if (K & 1) {
if ((L&1) != (M&1)) {
return "Draw";
}
if (l<=L && L<=r) {
return "Romeo";
}
if (ll<=l && r<=rr) {
return "Strangelet";
} else {
return "Draw";
}
} else {
if ((L&1) == (M&1)) {
if (ll<=l && r<=rr) {
return "Strangelet";
} else {
return "Draw";
}
} else {
if (l<=L && L<=r) {
return "Romeo";
} else {
return "Draw";
}
}
}
}
// BEGIN CUT HERE
public:
void run_test(int Case) { if ((Case == -1) || (Case == 0)) test_case_0(); if ((Case == -1) || (Case == 1)) test_case_1(); if ((Case == -1) || (Case == 2)) test_case_2(); if ((Case == -1) || (Case == 3)) test_case_3(); if ((Case == -1) || (Case == 4)) test_case_4(); if ((Case == -1) || (Case == 5)) test_case_5(); }
private:
template <typename T> string print_array(const vector<T> &V) { ostringstream os; os << "{ "; for (typename vector<T>::const_iterator iter = V.begin(); iter != V.end(); ++iter) os << '\"' << *iter << "\","; os << " }"; return os.str(); }
void verify_case(int Case, const string &Expected, const string &Received) { cerr << "Test Case #" << Case << "..."; if (Expected == Received) cerr << "PASSED" << endl; else { cerr << "FAILED" << endl; cerr << "\tExpected: \"" << Expected << '\"' << endl; cerr << "\tReceived: \"" << Received << '\"' << endl; } }
void test_case_0() { int Arg0 = 3; int Arg1 = 1; int Arg2 = 1; int Arg3 = 2; string Arg4 = "Draw"; verify_case(0, Arg4, winner(Arg0, Arg1, Arg2, Arg3)); }
void test_case_1() { int Arg0 = 5; int Arg1 = 1; int Arg2 = 2; int Arg3 = 2; string Arg4 = "Romeo"; verify_case(1, Arg4, winner(Arg0, Arg1, Arg2, Arg3)); }
void test_case_2() { int Arg0 = 5; int Arg1 = 5; int Arg2 = 2; int Arg3 = 3; string Arg4 = "Strangelet"; verify_case(2, Arg4, winner(Arg0, Arg1, Arg2, Arg3)); }
void test_case_3() { int Arg0 = 5; int Arg1 = 5; int Arg2 = 2; int Arg3 = 2; string Arg4 = "Draw"; verify_case(3, Arg4, winner(Arg0, Arg1, Arg2, Arg3)); }
void test_case_4() { int Arg0 = 1000000; int Arg1 = 804588; int Arg2 = 705444; int Arg3 = 292263; string Arg4 = "Romeo"; verify_case(4, Arg4, winner(Arg0, Arg1, Arg2, Arg3)); }
void test_case_5() { int Arg0 = 1000000; int Arg1 = 100000; int Arg2 = 500000; int Arg3 = 600000; string Arg4 = "Strangelet"; verify_case(5, Arg4, winner(Arg0, Arg1, Arg2, Arg3)); }
// END CUT HERE
};
// BEGIN CUT HERE
int main()
{
StonesGame ___test;
___test.run_test(-1);
}
// END CUT HERE
| 39.712644 | 317 | 0.495224 |
97da2f72108d65d88e60fdf55eb84c7142c85449 | 17,713 | cpp | C++ | imdexp/src/viewer/viewer.cpp | olivierchatry/iri3d | cae98c61d9257546d0fc81e69709297d04a17a14 | [
"MIT"
] | 2 | 2022-01-02T08:12:29.000Z | 2022-02-12T22:15:11.000Z | imdexp/src/viewer/viewer.cpp | olivierchatry/iri3d | cae98c61d9257546d0fc81e69709297d04a17a14 | [
"MIT"
] | null | null | null | imdexp/src/viewer/viewer.cpp | olivierchatry/iri3d | cae98c61d9257546d0fc81e69709297d04a17a14 | [
"MIT"
] | 1 | 2022-01-02T08:09:51.000Z | 2022-01-02T08:09:51.000Z |
#include <stdafx.h>
const int grid_size = 80; // draw a 10x10 grid.
const int grid_primitive_count = grid_size * grid_size * 4; // eache sqaure take 4 lines.
const float grid_increment = 20.0f;
Viewer::Viewer() : _loger(0), _d3d_device(0), _d3d_object(0),
_d3d_backbuffer(0), _d3d_depthbuffer(0), _wnd(0),
_list_element(0), _list_material(0), _texture(0), _viewer_timer_event(0),
_capture_movement(false), _angle_x(0), _angle_y(0), _angle_z(0), _zoom(10),
_at(0.0f, 0.0f, 0.0f), _up(0.0f, 0.0f, 1.0f), _position(0.0f, -2.0f, 0.0f),
_thread_handle(0), _end_thread(false), _can_free(false)
{
}
//////////////////////////////////////////////////////////////////////////
// generate a vertex buffer containt line list for drawing a grid.
// !!!!!!! not efficient !!!!!!!!!
//////////////////////////////////////////////////////////////////////////
void Viewer::GenerateGrid(int size, float increment)
{
float middle = (float)size / 2.0f;
float inc_middle = increment / 2.0f;
_vb_grid.Allocate(_d3d_device, size * size * 8, D3DPT_LINELIST);
vertex3d_t *v = _vb_grid.Lock();
for (float x = -middle; x < middle; ++x)
{
for (float y = -middle; y < middle; ++y)
{
v->_color = 0xffffffff;
v->_pos = D3DXVECTOR3((x * increment) - inc_middle, (y * increment) - inc_middle, 0.0f);
v++;
v->_color = 0xffffffff;
v->_pos = D3DXVECTOR3((x * increment) - inc_middle, (y * increment) + inc_middle, 0.0f);
v++;
v->_color = 0xffffffff;
v->_pos = D3DXVECTOR3((x * increment) - inc_middle, (y * increment) + inc_middle, 0.0f);
v++;
v->_color = 0xffffffff;
v->_pos = D3DXVECTOR3((x * increment) + inc_middle, (y * increment) + inc_middle, 0.0f);
v++;
v->_color = 0xffffffff;
v->_pos = D3DXVECTOR3((x * increment) + inc_middle, (y * increment) + inc_middle, 0.0f);
v++;
v->_color = 0xffffffff;
v->_pos = D3DXVECTOR3((x * increment) + inc_middle, (y * increment) - inc_middle, 0.0f);
v++;
v->_color = 0xffffffff;
v->_pos = D3DXVECTOR3((x * increment) + inc_middle, (y * increment) - inc_middle, 0.0f);
v++;
v->_color = 0xffffffff;
v->_pos = D3DXVECTOR3((x * increment) - inc_middle, (y * increment) - inc_middle, 0.0f);
v++;
}
}
_vb_grid.Unlock();
}
void Viewer::StartD3DThread()
{
_thread_handle = CreateThread(NULL,
0,
(LPTHREAD_START_ROUTINE)D3DThread,
this,
0,
(LPDWORD)&_thread_id);
_can_free = false;
SetThreadPriority(_thread_handle, THREAD_PRIORITY_IDLE);
}
INT_PTR CALLBACK Viewer::WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
static POINT old_mouse_pos = {0};
switch (msg)
{
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDOK:
Viewer::Get().Destroy();
EndDialog(hWnd, 1);
break;
}
break;
case WM_KEYDOWN:
if (wParam == VK_UP)
Viewer::Get().GoUp();
if (wParam == VK_DOWN)
Viewer::Get().GoDown();
if (wParam == VK_LEFT)
Viewer::Get().StrafeLeft();
if (wParam == VK_RIGHT)
Viewer::Get().StrafeRight();
break;
case WM_LBUTTONDOWN:
if (Viewer::Get()._capture_movement == false)
{
RECT rect;
ShowCursor(FALSE);
GetClientRect(hWnd, &rect);
Viewer::Get().SetWindowSize(&rect);
GetCursorPos(&Viewer::Get()._old_pos);
SetCursorPos(Viewer::Get()._wnd_middle_x,
Viewer::Get()._wnd_middle_y);
Viewer::Get()._capture_movement = true;
}
else
{
Viewer::Get()._capture_movement = false;
ShowCursor(TRUE);
SetCursorPos(Viewer::Get()._old_pos.x,
Viewer::Get()._old_pos.y);
}
break;
case WM_LBUTTONUP:
break;
case WM_MOUSEMOVE:
if (Viewer::Get()._capture_movement)
{
POINT new_pos;
GetCursorPos(&new_pos);
if ((new_pos.x == Viewer::Get()._wnd_middle_x) && (new_pos.y == Viewer::Get()._wnd_middle_y))
break;
int offset_y = Viewer::Get()._wnd_middle_x - new_pos.x;
int offset_z = Viewer::Get()._wnd_middle_y - new_pos.y;
SetCursorPos(Viewer::Get()._wnd_middle_x,
Viewer::Get()._wnd_middle_y);
if (offset_y != 0 || offset_z != 0)
{
Viewer::Get().SetCameraAngle(offset_y / 1000.0f, offset_z / 1000.0f);
}
}
break;
case WM_CLOSE:
case WM_QUIT:
case WM_DESTROY:
Viewer::Get().Destroy();
EndDialog(hWnd, 0);
break;
default:
return FALSE;
}
return TRUE;
}
Viewer::~Viewer()
{
Destroy();
}
void Viewer::DestroyTextures()
{
if (_texture)
{
for (uint i = 0; i < _texture_count; ++i)
if (_texture[i])
_texture[i]->Release();
delete[] _texture;
_texture = 0;
}
}
void Viewer::PrintIluError()
{
ILenum error;
while ((error = ilGetError()))
Debugf("+ ilu error: %s", iluErrorString(error));
}
typedef LPDIRECT3D8(__stdcall *DIRECT3DCREATE8)(uint);
bool Viewer::InitDirect3D(HWND hwnd, bool fullscreen, int size_x, int size_y)
{
// loading d3d8.dll
_d3d_object = Direct3DCreate8(D3D_SDK_VERSION);
ASSERT_VIEWER(_d3d_object != 0, "!!! Cannot create d3d object");
D3DCAPS8 dev_caps;
HRESULT hres;
// look for hardware card, if no exit.
hres = _d3d_object->GetDeviceCaps(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &dev_caps);
ASSERT_VIEWER(SUCCEEDED(hres), "No 3d hardware");
D3DPRESENT_PARAMETERS pp = {0};
pp.BackBufferWidth = size_x;
pp.BackBufferHeight = size_y;
pp.BackBufferCount = 1;
// no faa
pp.MultiSampleType = D3DMULTISAMPLE_NONE; // no aa
pp.hDeviceWindow = hwnd;
pp.Windowed = !fullscreen;
// stencil for shadow
pp.EnableAutoDepthStencil = true;
pp.AutoDepthStencilFormat = D3DFMT_D16;
pp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
pp.SwapEffect = D3DSWAPEFFECT_DISCARD;
pp.FullScreen_PresentationInterval = fullscreen ? D3DPRESENT_INTERVAL_IMMEDIATE : D3DPRESENT_INTERVAL_DEFAULT;
if (!fullscreen)
{
// FIX ME : don't like voodoo card so ... don't really need this
ASSERT_VIEWER((dev_caps.Caps2 & D3DCAPS2_CANRENDERWINDOWED), "cannot render on windows");
D3DDISPLAYMODE current_displaye_mode;
hres = _d3d_object->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, ¤t_displaye_mode);
ASSERT_VIEWER(SUCCEEDED(hres), "get display mode");
pp.BackBufferFormat = current_displaye_mode.Format;
}
else
{
int mode_count = _d3d_object->GetAdapterModeCount(D3DADAPTER_DEFAULT);
ASSERT_VIEWER(mode_count != 0, "no display mode");
D3DDISPLAYMODE new_mode, best_mode;
bool found = false;
do
{
hres = _d3d_object->EnumAdapterModes(D3DADAPTER_DEFAULT, mode_count - 1, &new_mode);
ASSERT_VIEWER(SUCCEEDED(hres), "adaptator enumeration");
if (new_mode.Height == size_y && new_mode.Width == size_x)
if ((found && (new_mode.Format < new_mode.Format)) || !found)
best_mode = new_mode, found = true;
} while (--mode_count);
ASSERT_VIEWER(found, "cannot find a suitable display mode");
pp.BackBufferFormat = best_mode.Format;
}
// look for hardware vertex proecesind
int flags = D3DCREATE_SOFTWARE_VERTEXPROCESSING;
if (dev_caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT)
flags = (dev_caps.DevCaps & D3DDEVCAPS_PUREDEVICE) ? D3DCREATE_HARDWARE_VERTEXPROCESSING : D3DCREATE_MIXED_VERTEXPROCESSING;
hres = _d3d_object->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, _wnd, flags | D3DCREATE_MULTITHREADED, &pp, &_d3d_device);
ASSERT_VIEWER(SUCCEEDED(hres), "device creation");
hres = _d3d_device->GetRenderTarget(&_d3d_backbuffer);
ASSERT_VIEWER(SUCCEEDED(hres), "set backbuffer");
hres = _d3d_device->GetDepthStencilSurface(&_d3d_depthbuffer);
ASSERT_VIEWER(SUCCEEDED(hres), "set stencil buffer");
return true;
}
void Viewer::SetImportedElements(ImdExp::element_list_t *list_element)
{
_list_element = list_element;
}
void Viewer::LoadTextures()
{
bool il_error = false;
DestroyTextures();
if (_list_material == 0)
return;
_texture_count = _list_material->_material_data.size();
_texture = new IDirect3DTexture8 *[_texture_count];
for (uint i = 0; i < _texture_count; ++i)
{
MaterialData *material = _list_material->_material_data[i];
ILuint il_id;
material->_data = 0;
if (material->_diffuse_map == 0)
continue;
ilGenImages(1, &il_id);
ilBindImage(il_id);
_texture[i] = 0;
if (ilLoadImage(material->_diffuse_map) == IL_TRUE)
{
if (ilConvertImage(IL_RGBA, IL_UNSIGNED_BYTE) == IL_TRUE)
{
ilutSetInteger(ILUT_D3D_POOL, D3DPOOL_MANAGED);
_texture[i] = ilutD3D8Texture(_d3d_device);
material->_data = (void *)(_texture[i]);
}
else
il_error = true;
}
else
il_error = true;
if (il_error)
{
PrintIluError();
}
ilDeleteImages(1, &il_id);
}
}
void Viewer::Debug(char *str)
{
Loger::Get().Print(str);
}
void Viewer::Debugf(char *str, ...)
{
va_list args;
TCHAR buffer[1024]; // FIXMEEE
va_start(args, str);
vsprintf(buffer, str, args);
Debug(buffer);
va_end(args);
}
void Viewer::UpdateCamera()
{
D3DXVECTOR3 axis, sub;
D3DXVec3Subtract(&_direction, &_at, &_position);
D3DXVec3Cross(&_inv_strafe_left, &_up, &_direction);
D3DXVec3Normalize(&_inv_strafe_left, &_inv_strafe_left);
RotateAt(_angle_z, &_inv_strafe_left);
RotateAt(_angle_y, &D3DXVECTOR3(0.0f, 0.0f, 1.0f));
D3DXVec3Normalize(&_direction, &_direction);
_inv_direction = -_direction;
_strafe_left = -_inv_strafe_left;
D3DXMATRIX view_matrix;
D3DXMatrixLookAtLH(&view_matrix,
&_position,
&_at,
&_up);
_angle_z = _angle_y = 0;
_d3d_device->SetTransform(D3DTS_VIEW, &view_matrix);
}
void Viewer::RotateAt(float angle, D3DXVECTOR3 *axis)
{
D3DXVECTOR3 tmp;
D3DXVECTOR3 direction;
D3DXVec3Subtract(&direction, &_at, &_position);
float c = cosf(angle);
float s = sinf(angle);
tmp.x = (c + (1 - c) * axis->x) * direction.x;
tmp.x += ((1 - c) * axis->x * axis->y - axis->z * s) * direction.y;
tmp.x += ((1 - c) * axis->x * axis->z + axis->y * s) * direction.z;
tmp.y = ((1 - c) * axis->x * axis->y + axis->z * s) * direction.x;
tmp.y += (c + (1 - c) * axis->y) * direction.y;
tmp.y += ((1 - c) * axis->y * axis->z - axis->x * s) * direction.z;
tmp.z = ((1 - c) * axis->x * axis->z - axis->y * s) * direction.x;
tmp.z += ((1 - c) * axis->y * axis->z + axis->x * s) * direction.y;
tmp.z += (c + (1 - c) * axis->z) * direction.z;
D3DXVec3Add(&_at, &_position, &tmp);
}
void Viewer::Render()
{
if (_d3d_device)
{
_d3d_device->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_ARGB(0x00, 0x0, 0x0, 0x0), 1, 0);
_d3d_device->BeginScene();
_d3d_device->SetTexture(0, 0);
_d3d_device->SetTextureStageState(0, D3DTSS_MAGFILTER, D3DTEXF_LINEAR);
_d3d_device->SetTextureStageState(0, D3DTSS_MINFILTER, D3DTEXF_LINEAR);
_d3d_device->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
_d3d_device->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
_d3d_device->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
_d3d_device->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
_vb_grid.Draw(_d3d_device, grid_primitive_count);
for (uint mesh = 0; mesh < _vb.size(); ++mesh)
{
_d3d_device->SetTexture(0, (IDirect3DBaseTexture8 *)_texture_list[mesh]);
_vb[mesh].DrawIndexed(_d3d_device, D3DPT_TRIANGLESTRIP);
}
_d3d_device->EndScene();
_d3d_device->Present(NULL, NULL, NULL, NULL);
}
}
void Viewer::Destroy()
{
DestroyThread();
if (_loger)
_loger = 0;
_d3d_device = 0;
_d3d_object = 0;
_wnd = 0;
}
void Viewer::DestroyThread()
{
if (_thread_handle)
{
Viewer::_end_thread = true;
WaitForSingleObject(_thread_handle, 2000);
CloseHandle(_thread_handle);
_thread_handle = 0;
Viewer::_end_thread = false;
}
}
bool Viewer::Create(HINSTANCE hinstance)
{
if (_wnd)
SendMessage(_wnd, WM_QUIT, 0, 0); // destroy our windows.
RECT rect;
_wnd = CreateDialog(hinstance, MAKEINTRESOURCE(IDD_DIALOGVIEWER), 0, WndProc);
ASSERT_VIEWER(_wnd != 0, "Cannot create window !!!");
GetClientRect(_wnd, &rect);
_wnd_height = rect.bottom - rect.top;
_wnd_width = rect.right - rect.left;
_wnd_middle_x = _wnd_width >> 1;
_wnd_middle_y = _wnd_height >> 1;
Loger::Get().Printf("Client window is %d %d", _wnd_width, _wnd_height);
ShowWindow(_wnd, SW_SHOW);
return true;
}
void Viewer::D3DThread(Viewer *viewer)
{
ilInit();
iluInit();
ilutInit();
if (ilGetInteger(IL_VERSION_NUM) < IL_VERSION ||
iluGetInteger(ILU_VERSION_NUM) < ILU_VERSION)
viewer->Debug("DevIL header version is different from lib version !!!!");
viewer->InitDirect3D(viewer->_wnd, false, viewer->_wnd_width, viewer->_wnd_height);
viewer->GenerateGrid(grid_size, grid_increment);
viewer->LoadTextures();
viewer->CreateD3dBuffer();
// default setting.
D3DXMATRIX projection_matrix;
D3DXMatrixPerspectiveFovLH(&projection_matrix, D3DX_PI / 3, (float)viewer->_wnd_width / (float)viewer->_wnd_height, 1.0f, 1000.0f);
viewer->_d3d_device->SetTransform(D3DTS_PROJECTION, &projection_matrix);
D3DMATERIAL8 material;
material.Ambient.a = 0;
material.Ambient.r = material.Ambient.g = material.Ambient.b = 0.0f;
material.Diffuse.r = material.Diffuse.g = material.Diffuse.b = 0.1f;
material.Specular.r = material.Specular.g = material.Specular.b = 0.1f;
material.Power = 0.0f;
viewer->_d3d_device->SetMaterial(&material);
// no lighting
viewer->_d3d_device->SetRenderState(D3DRS_LIGHTING, 0);
// no culling
viewer->_d3d_device->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
// set default material
viewer->_can_free = true;
while (!viewer->_end_thread)
{
viewer->UpdateCamera();
viewer->Render();
}
viewer->DestroyTextures();
for (uint i = 0; i < viewer->_vb.size(); ++i)
viewer->_vb[i].Deallocate();
viewer->_vb_grid.Deallocate();
if (viewer->_d3d_device)
viewer->_d3d_device->Release();
if (viewer->_d3d_object)
viewer->_d3d_object->Release();
}
//////////////////////////////////////////////////////////////////////////
// Create Vertex Buffer from imported element
//////////////////////////////////////////////////////////////////////////
void Viewer::CreateD3dBuffer()
{
// get number of vertex in totla mesh.
ImdExp::element_list_it_t it;
size_t num_indices_total = 0;
size_t num_vertex_total = 0;
size_t num_mesh = 0;
size_t num_strip = 0;
for (it = _list_element->begin(); it != _list_element->end(); ++it)
{
if ((*it)->_type == mesh_element)
{
ImportedMesh *mesh = (ImportedMesh *)(*it);
for (uint i = 0; i < mesh->_strip.size(); ++i)
num_indices_total += mesh->_strip[i]._face_index.size();
num_vertex_total += mesh->_mesh_data[0]._vertex.size();
num_strip += mesh->_strip.size();
num_mesh++;
}
}
// create our vertex buffer.
_vb.resize(num_mesh);
_texture_list.resize(num_mesh);
num_mesh = 0;
// fill our vertex buffer
for (it = _list_element->begin(); it != _list_element->end(); ++it)
{
if ((*it)->_type == mesh_element)
{
ImportedMesh *mesh = (ImportedMesh *)(*it);
MeshData *data = &(mesh->_mesh_data[0]);
MeshColorMapping *mapping_color = &(mesh->_mesh_color_mapping);
bool have_color = mapping_color->_color.size() > 0;
if (mesh->_material)
_texture_list[num_mesh] = mesh->_material->_data;
else
_texture_list[num_mesh] = 0;
_vb[num_mesh].Allocate(_d3d_device, (uint)data->_vertex.size(), D3DPT_TRIANGLESTRIP);
//////////////////////////////////////////////////////////////////////////
// fill our vertex buffer
vertex3d_t *v = _vb[num_mesh].Lock();
for (uint i = 0; i < data->_vertex.size(); ++i)
{
v->_pos.x = data->_vertex[i].x;
v->_pos.y = data->_vertex[i].y;
v->_pos.z = data->_vertex[i].z;
v->_norm.x = data->_normal[i].x;
v->_norm.y = data->_normal[i].y;
v->_norm.z = data->_normal[i].z;
v->_u = mapping_color->_mapping[i]._uv.x;
v->_v = 1.0f - mapping_color->_mapping[i]._uv.y;
uint r = (uint)(mapping_color->_color[i].x * 255) & 0xff;
uint g = (uint)(mapping_color->_color[i].y * 255) & 0xff;
uint b = (uint)(mapping_color->_color[i].z * 255) & 0xff;
v->_color = have_color ? (r << 16 | g << 8 | b) : 0;
v++;
}
_vb[num_mesh].Unlock();
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
// fill our index buffer;
_vb[num_mesh].PrealocateIBList((uint)mesh->_strip.size());
for (i = 0; i < mesh->_strip.size(); ++i)
{
uword_list_t &indices = mesh->_strip[i]._face_index;
_vb[num_mesh].CreateIB(_d3d_device, i, (uint)indices.size(), (uint)indices.size() - 2);
WORD *ib = _vb[num_mesh]._ib[i].Lock();
for (uint f = 0; f < indices.size(); ++f)
{
*ib = indices[f];
ib++;
}
_vb[num_mesh]._ib[i].Unlock();
}
//////////////////////////////////////////////////////////////////////////
num_mesh++;
}
}
}
void Viewer::SetImportedMaterial(ImportedMaterial *list_material)
{
_list_material = list_material;
}
| 32.923792 | 133 | 0.616666 |
97ded0faefa2f15836eacf1033fdbb91b50abc48 | 1,356 | cpp | C++ | algorithms/RANGETREELAZY.cpp | chinoxyz/guiafuentes | 753d026d91ddcbabcccee7947a2ee6c581eb94eb | [
"MIT"
] | null | null | null | algorithms/RANGETREELAZY.cpp | chinoxyz/guiafuentes | 753d026d91ddcbabcccee7947a2ee6c581eb94eb | [
"MIT"
] | null | null | null | algorithms/RANGETREELAZY.cpp | chinoxyz/guiafuentes | 753d026d91ddcbabcccee7947a2ee6c581eb94eb | [
"MIT"
] | null | null | null | #define MAXN 100000
#define T int
#define neutro 0
// entrada, arbol, acumulado(propagacion) elemento 0 se desperdicia
T input[MAXN]; T tree[MAXN*17]; T acum[MAXN*17];
T f(T a, T b) { return a + b; } // Funcion que mantiene el segment tree
// init(1,1,n)
void init(int node, int b, int e) {
acum[node] = 0;
if(b == e) tree[node] = input[b];
else {
int m = (b + e) >> 1, lt = node << 1, rt = lt | 1;
init(lt, b, m);
init(rt, m+1, e);
tree[node] = f(tree[lt], tree[rt]);
}
}
// query(1,1,N,i,j)
T query(int node, int b, int e, int i, int j) {
int m = (b + e) >> 1, lt = node << 1, rt = lt | 1;
tree[node] += acum[node] * (e - b + 1);
acum[lt] += acum[node];
acum[rt] += acum[node];
acum[node] = 0;
if(i > e || j < b) return neutro;
if (i <= b && e <= j) return tree[node];
else return f(query(lt, b, m, i, j), query(rt, m+1, e, i, j));
}
// modify(1,1,N,i,j,val)
void modify(int node, int b, int e, int i, int j, int v) {
int m = (b + e) >> 1, lt = node << 1, rt = lt | 1;
tree[node] += acum[node] * (e - b + 1);
acum[lt] += acum[node];
acum[rt] += acum[node];
acum[node] = 0;
if(i > e || j < b) return;
if (i <= b && e <= j) {
tree[node] += v * (e - b + 1);
acum[lt] += v;
acum[rt] += v;
return;
}
modify(lt, b, m, i, j, v);
modify(rt, m+1, e, i, j, v);
tree[node] = f(tree[lt], tree[rt]);
}
| 27.673469 | 71 | 0.514749 |
97dfc4c86bb06a5524073a57fa567a120bd0c5e7 | 602 | cc | C++ | examples/channels.cc | kjdv/kthread | d606c2455e9db52c731f58b8b30ad37a55e956d6 | [
"MIT"
] | 1 | 2021-05-09T16:12:56.000Z | 2021-05-09T16:12:56.000Z | examples/channels.cc | kjdv/kthread | d606c2455e9db52c731f58b8b30ad37a55e956d6 | [
"MIT"
] | null | null | null | examples/channels.cc | kjdv/kthread | d606c2455e9db52c731f58b8b30ad37a55e956d6 | [
"MIT"
] | 1 | 2021-05-09T16:12:57.000Z | 2021-05-09T16:12:57.000Z | #include <channel.hh>
#include <threadpool.hh>
#include <iostream>
namespace {
using namespace std;
using namespace kthread;
void consume(receiver<int> tx)
{
while(tx.receive()
.map([](auto&& item) {
cout << "consuming " << item << '\n';
return 0;
})
.is_some())
;
}
void produce(int n, sender<int> tx)
{
for(int i = 0; i < n; ++i)
tx.send(i);
tx.close();
}
}
int main()
{
threadpool pool;
auto c = make_channel<int>();
pool.post([=] { produce(10, c.tx); });
pool.post([=] { consume(c.rx); });
return 0;
}
| 15.05 | 51 | 0.523256 |
97e04a1132734684d8e4d05439fcae771b5c05c3 | 8,906 | cpp | C++ | tests/type_check_test.cpp | claremacrae/eml | d10eb7fcfc51abb277c1edbec8f15a7ed806ceb1 | [
"MIT"
] | 3 | 2020-11-03T19:22:11.000Z | 2021-05-05T13:16:15.000Z | tests/type_check_test.cpp | claremacrae/eml | d10eb7fcfc51abb277c1edbec8f15a7ed806ceb1 | [
"MIT"
] | 2 | 2020-04-01T12:57:24.000Z | 2021-02-19T10:17:30.000Z | tests/type_check_test.cpp | claremacrae/eml | d10eb7fcfc51abb277c1edbec8f15a7ed806ceb1 | [
"MIT"
] | 2 | 2020-10-15T18:28:18.000Z | 2020-10-25T16:44:17.000Z | #include "ast.hpp"
#include "compiler.hpp"
#include <catch2/catch.hpp>
auto parse_and_type_check(eml::Compiler& compiler, std::string_view s,
eml::GarbageCollector& gc)
{
return eml::parse(s, gc).and_then(
[&compiler](auto&& ast) { return compiler.type_check(ast); });
}
TEST_CASE("Type check on unary expressions")
{
eml::GarbageCollector gc{};
eml::Compiler compiler{gc};
GIVEN("- 2")
{
WHEN("Type check")
{
const auto checked_ast = parse_and_type_check(compiler, "-2", gc);
THEN("Passes the type check")
{
REQUIRE(checked_ast.has_value());
THEN("Gets `Number` as its type")
{
const auto& expr = dynamic_cast<eml::Expr&>(**checked_ast);
REQUIRE(eml::match(expr.type(), eml::NumberType{}));
}
}
}
}
GIVEN("(! 2)")
{
WHEN("Type check")
{
const auto checked_ast = parse_and_type_check(compiler, "!2", gc);
THEN("Failed the type check")
{
REQUIRE(!checked_ast.has_value());
}
}
}
}
TEST_CASE("Type check on binary arithmatic expressions")
{
eml::GarbageCollector gc{};
eml::Compiler compiler{gc};
GIVEN("(+ 1 1)")
{
WHEN("Type check")
{
const auto checked_ast = parse_and_type_check(compiler, "1 + 1", gc);
THEN("Passes the type check")
{
REQUIRE(checked_ast.has_value());
THEN("Gets `Number` as its type")
{
const auto& expr = dynamic_cast<eml::Expr&>(**checked_ast);
REQUIRE(eml::match(expr.type(), eml::NumberType{}));
}
}
}
}
GIVEN("(+ 1 true)")
{
WHEN("Type check")
{
const auto checked_ast = parse_and_type_check(compiler, "1 + true", gc);
THEN("Failed the type check")
{
REQUIRE(!checked_ast.has_value());
}
}
}
GIVEN("(* 1 1)")
{
WHEN("Type check")
{
const auto checked_ast = parse_and_type_check(compiler, "1 * 1", gc);
THEN("Passes the type check")
{
REQUIRE(checked_ast.has_value());
THEN("Gets `Number` as its type")
{
const auto& expr = dynamic_cast<eml::Expr&>(**checked_ast);
REQUIRE(eml::match(expr.type(), eml::NumberType{}));
}
}
}
}
GIVEN("(/ true 3)")
{
WHEN("Type check")
{
const auto checked_ast = parse_and_type_check(compiler, "true / 3", gc);
THEN("Failed the type check")
{
REQUIRE(!checked_ast.has_value());
}
}
}
}
TEST_CASE("Type check on binary comparison expressions")
{
eml::GarbageCollector gc{};
eml::Compiler compiler{gc};
GIVEN("(== 1 1)")
{
WHEN("Type check")
{
const auto checked_ast = parse_and_type_check(compiler, "1 == 1", gc);
THEN("Passes the type check")
{
REQUIRE(checked_ast.has_value());
THEN("Gets `Bool` as its type")
{
const auto& expr = dynamic_cast<eml::Expr&>(**checked_ast);
REQUIRE(eml::match(expr.type(), eml::BoolType{}));
}
}
}
}
GIVEN("(== true false)")
{
WHEN("Type check")
{
const auto checked_ast =
parse_and_type_check(compiler, "true == false", gc);
THEN("Passes the type check")
{
REQUIRE(checked_ast.has_value());
THEN("Gets `Bool` as its type")
{
const auto& expr = dynamic_cast<eml::Expr&>(**checked_ast);
REQUIRE(eml::match(expr.type(), eml::BoolType{}));
}
}
}
}
GIVEN("(== 1 true)")
{
WHEN("Type check")
{
const auto checked_ast = parse_and_type_check(compiler, "1 == true", gc);
THEN("Failed the type check")
{
REQUIRE(!checked_ast.has_value());
}
}
}
GIVEN("(!= 1 1)")
{
WHEN("Type check")
{
const auto checked_ast = parse_and_type_check(compiler, "1 != 1", gc);
THEN("Passes the type check")
{
REQUIRE(checked_ast.has_value());
THEN("Gets `Bool` as its type")
{
const auto& expr = dynamic_cast<eml::Expr&>(**checked_ast);
REQUIRE(eml::match(expr.type(), eml::BoolType{}));
}
}
}
}
GIVEN("(!= 1 true)")
{
WHEN("Type check")
{
const auto checked_ast = parse_and_type_check(compiler, "1 != true", gc);
THEN("Failed the type check")
{
REQUIRE(!checked_ast.has_value());
}
}
}
GIVEN("(< 1 1)")
{
WHEN("Type check")
{
const auto checked_ast = parse_and_type_check(compiler, "1 < 1", gc);
THEN("Passes the type check")
{
REQUIRE(checked_ast.has_value());
THEN("Gets `Bool` as its type")
{
const auto& expr = dynamic_cast<eml::Expr&>(**checked_ast);
REQUIRE(eml::match(expr.type(), eml::BoolType{}));
}
}
}
}
GIVEN("(< true true)")
{
WHEN("Type check")
{
const auto checked_ast =
parse_and_type_check(compiler, "true < true", gc);
THEN("Failed the type check")
{
REQUIRE(!checked_ast.has_value());
}
}
}
GIVEN("(<= 1 1)")
{
WHEN("Type check")
{
const auto checked_ast = parse_and_type_check(compiler, "1 <= 1", gc);
THEN("Passes the type check")
{
REQUIRE(checked_ast.has_value());
THEN("Gets `Bool` as its type")
{
const auto& expr = dynamic_cast<eml::Expr&>(**checked_ast);
REQUIRE(eml::match(expr.type(), eml::BoolType{}));
}
}
}
}
GIVEN("(<= true true)")
{
WHEN("Type check")
{
const auto checked_ast =
parse_and_type_check(compiler, "true <= true", gc);
THEN("Failed the type check")
{
REQUIRE(!checked_ast.has_value());
}
}
}
GIVEN("(> 1 1)")
{
WHEN("Type check")
{
const auto checked_ast = parse_and_type_check(compiler, "1 > 1", gc);
THEN("Passes the type check")
{
REQUIRE(checked_ast.has_value());
THEN("Gets `Bool` as its type")
{
const auto& expr = dynamic_cast<eml::Expr&>(**checked_ast);
REQUIRE(eml::match(expr.type(), eml::BoolType{}));
}
}
}
}
GIVEN("(>= 1 1)")
{
WHEN("Type check")
{
const auto checked_ast = parse_and_type_check(compiler, "1 >= 1", gc);
THEN("Passes the type check")
{
REQUIRE(checked_ast.has_value());
THEN("Gets `Bool` as its type")
{
const auto& expr = dynamic_cast<eml::Expr&>(**checked_ast);
REQUIRE(eml::match(expr.type(), eml::BoolType{}));
}
}
}
}
GIVEN("(>= true true)")
{
WHEN("Type check")
{
const auto checked_ast =
parse_and_type_check(compiler, "true >= true", gc);
THEN("Failed the type check")
{
REQUIRE(!checked_ast.has_value());
}
}
}
}
TEST_CASE("Correctly type infer the let declerations and identifiers")
{
constexpr auto s1 = "let x = true";
GIVEN(s1)
{
eml::GarbageCollector gc{};
eml::Compiler compiler{gc};
THEN("Type check should resolve the right hand side to type Bool")
{
const auto result = parse_and_type_check(compiler, s1, gc);
REQUIRE(result);
const auto bind_type =
dynamic_cast<eml::Definition&>(**result).binding_type();
REQUIRE(bind_type.has_value());
REQUIRE(eml::match(*bind_type, eml::BoolType{}));
const auto result2 = parse_and_type_check(compiler, "x", gc);
REQUIRE(result2.has_value());
const auto& id = dynamic_cast<eml::IdentifierExpr&>(**result2);
REQUIRE(id.has_type());
REQUIRE(eml::match(id.type(), eml::BoolType{}));
}
}
}
TEST_CASE("Type check for branches")
{
eml::GarbageCollector gc{};
eml::Compiler compiler{gc};
GIVEN("An if expression")
{
WHEN("Type check")
{
const auto checked_ast =
parse_and_type_check(compiler, "if (true) { 2 } else {3}", gc);
THEN("Resolve to the type of the branches")
{
REQUIRE(checked_ast.has_value());
const auto& if_expr = dynamic_cast<eml::IfExpr&>(**checked_ast);
REQUIRE(eml::match(if_expr.type(), if_expr.If().type()));
REQUIRE(eml::match(if_expr.type(), if_expr.Else().type()));
}
}
}
GIVEN("A mistyped if expression condition")
{
WHEN("Type check")
{
const auto checked_ast =
parse_and_type_check(compiler, "if (1) { 2 } else {3}", gc);
THEN("Failed the type check")
{
REQUIRE(!checked_ast.has_value());
}
}
}
GIVEN("Mismatched if expression branches")
{
WHEN("Type check")
{
const auto checked_ast =
parse_and_type_check(compiler, "if (1) { 2 } else {()}", gc);
THEN("Failed the type check")
{
REQUIRE(!checked_ast.has_value());
}
}
}
}
| 23.072539 | 79 | 0.548843 |
97e1c0d2ca46cba6f6ecf90c346799e491ee1772 | 8,913 | cpp | C++ | main.cpp | 3xi0/Mandelbrot-set-plotter | 2a86ced1ee13edbb96dde092330d0a6896f839ef | [
"MIT"
] | 1 | 2020-03-07T00:01:14.000Z | 2020-03-07T00:01:14.000Z | main.cpp | 3xi0/Mandelbrot-set-plotter | 2a86ced1ee13edbb96dde092330d0a6896f839ef | [
"MIT"
] | null | null | null | main.cpp | 3xi0/Mandelbrot-set-plotter | 2a86ced1ee13edbb96dde092330d0a6896f839ef | [
"MIT"
] | null | null | null | #include <SFML/Graphics.hpp>
#include <stdio.h>
#include <vector>
#include <cmath>
#include <iostream>
#include <chrono>
#define IWIDTH 800
#define IHEIGHT 600
#define ZOOMS 0.9
#define ITERATIONS 100
#define CX -1
#define CY 0
#define CW 4
#define CH 3
/* #define ITERATIONS 5000
#define CX -0.743643887037151
#define CY 0.131825904205330
#define CW 0.000000000051299
#define CH 0.00000000003847425*/
template<typename T> T lerp( T, T, T );
void mandelbrot( sf::VertexArray&, long double, long double, long double, int, int, int, bool );
int main() {
int width = IWIDTH, height = IHEIGHT;
sf::RenderWindow window( sf::VideoMode( width, height ), "Mandelbrot Plotter" );
sf::VertexArray graph( sf::Points, width * height );
#pragma omp parallel for simd
for ( int x = 0; x < width; x++ ) {
for ( int y = 0; y < height; y++ )
graph[x * height + y].position = sf::Vector2<float>( x, y );
}
long double zoom = 1;
long double o_r = CX, o_i = CY;
int iterations = ITERATIONS;
bool left = false, right = false, up = false, down = false, zooming = false, unzooming = false, smooth = true, reload = true;
sf::Clock frame_c;
while ( window.isOpen() ) {
sf::Event event;
while ( window.pollEvent( event ) ) {
if ( event.type == sf::Event::Closed )
window.close();
else {
if ( event.type == sf::Event::Resized ) {
width = event.size.width;
height = event.size.height;
window.setView( sf::View( sf::FloatRect( 0, 0, width, height ) ) );
graph = sf::VertexArray( sf::Points, width * height );
#pragma omp parallel for simd
for ( int x = 0; x < width; x++ ) {
for ( int y = 0; y < height; y++ )
graph[x * height + y].position = sf::Vector2<float>( x, y );
}
reload = true;
}
if ( event.type == sf::Event::KeyPressed ) {
if ( event.key.code == sf::Keyboard::Left )
left = true;
if ( event.key.code == sf::Keyboard::Up )
up = true;
if ( event.key.code == sf::Keyboard::Right )
right = true;
if ( event.key.code == sf::Keyboard::Down )
down = true;
if ( event.key.code == sf::Keyboard::Z )
zooming = true;
if ( event.key.code == sf::Keyboard::X )
unzooming = true;
}
if ( event.type == sf::Event::KeyReleased ) {
if ( event.key.code == sf::Keyboard::Left )
left = false;
if ( event.key.code == sf::Keyboard::Up )
up = false;
if ( event.key.code == sf::Keyboard::Right )
right = false;
if ( event.key.code == sf::Keyboard::Down )
down = false;
if ( event.key.code == sf::Keyboard::Z )
zooming = false;
if ( event.key.code == sf::Keyboard::X )
unzooming = false;
if ( event.key.code == sf::Keyboard::S ) {
smooth = !smooth;
reload = true;
}
}
if ( event.type == sf::Event::MouseWheelScrolled ) {
if ( event.mouseWheelScroll.wheel == sf::Mouse::VerticalWheel ) {
long double new_r, new_i, m_x = sf::Mouse::getPosition( window ).x, m_y = sf::Mouse::getPosition( window ).y;
if ( event.mouseWheelScroll.delta > 0 ) {
new_r = lerp( o_r, o_r + CW * ( ( ( long double )m_x / ( long double )width ) - 1.0 / 2.0 ) / zoom, ( long double )1.0 - ZOOMS );
new_i = lerp( o_i, o_i + CH * ( ( ( long double )m_y / ( long double )height ) - 1.0 / 2.0 ) / zoom, ( long double )1.0 - ZOOMS );
zoom /= ZOOMS;
}
else { /*if(zoom*ZOOMS >= 1.0)*/
new_r = lerp( o_r, o_r + CW * ( ( ( long double )m_x / ( long double )width ) - 1.0 / 2.0 ) / zoom, ( long double )1.0 - 1.0 / ZOOMS );
new_i = lerp( o_i, o_i + CH * ( ( ( long double )m_y / ( long double )height ) - 1.0 / 2.0 ) / zoom, ( long double )1.0 - 1.0 / ZOOMS );
zoom *= ZOOMS;
}
o_r = new_r;
o_i = new_i;
reload = true;
}
}
}
}
float delta_t = ( ( float )frame_c.restart().asMilliseconds() / 1000.0f );
if ( zooming ) {
zoom /= ZOOMS;
reload = true;
}
if ( unzooming ) {
//zoom = std::max(( long double )1.0, zoom*ZOOMS);
zoom *= ZOOMS;
reload = true;
}
if ( left ) {
o_r -= ( CW / ( 2 * zoom ) ) * 1.0 / ZOOMS * delta_t;
reload = true;
}
if ( up ) {
o_i -= ( CH / ( 2 * zoom ) ) * 1.0 / ZOOMS * delta_t;
reload = true;
}
if ( right ) {
o_r += ( CW / ( 2 * zoom ) ) * 1.0 / ZOOMS * delta_t;
reload = true;
}
if ( down ) {
o_i += ( CH / ( 2 * zoom ) ) * 1.0 / ZOOMS * delta_t;
reload = true;
}
if ( reload ) {
auto start = std::chrono::high_resolution_clock::now();
mandelbrot( graph, o_r, o_i, zoom, width, height, iterations, smooth );
auto stop = std::chrono::high_resolution_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::microseconds>( stop - start );
std::cout << "Time taken by function: " << duration.count() / 1000000.0 << " seconds" << std::endl;
reload = false;
}
window.clear();
window.draw( graph );
window.display();
}
return EXIT_SUCCESS;
}
void mandelbrot( sf::VertexArray& graph, long double o_r, long double o_i, long double zoom, int width, int height, int iterations, bool smooth ) {
#define COLORS 16
sf::Color colors[COLORS];
colors[0] = sf::Color( 66, 30, 15 );
colors[1] = sf::Color( 25, 7, 26 );
colors[2] = sf::Color( 9, 1, 47 );
colors[3] = sf::Color( 4, 4, 73 );
colors[4] = sf::Color( 0, 7, 100 );
colors[5] = sf::Color( 12, 44, 138 );
colors[6] = sf::Color( 24, 82, 177 );
colors[7] = sf::Color( 57, 125, 209 );
colors[8] = sf::Color( 134, 181, 229 );
colors[9] = sf::Color( 211, 236, 248 );
colors[10] = sf::Color( 241, 233, 191 );
colors[11] = sf::Color( 248, 201, 95 );
colors[12] = sf::Color( 255, 170, 0 );
colors[13] = sf::Color( 204, 128, 0 );
colors[14] = sf::Color( 153, 87, 0 );
colors[15] = sf::Color( 106, 52, 3 );
#pragma omp parallel for schedule(dynamic)
for ( int x = 0; x < width; x++ ) {
for ( int y = 0; y < height; y++ ) {
long double pos_r = o_r + CW * ( ( ( long double )x / ( long double )width ) - 1.0 / 2.0 ) / zoom,
pos_i = o_i + CH * ( ( ( long double )y / ( long double )height ) - 1.0 / 2.0 ) / zoom,
z_r = 0, z_i = 0, z2_r = z_r * z_r, z2_i = z_i * z_i;
int i = 0;
for ( ; z2_r + z2_i <= 4 && i < iterations; i++ ) {
z_i = 2 * z_r * z_i + pos_i;
z_r = z2_r - z2_i + pos_r;
z2_r = z_r * z_r;
z2_i = z_i * z_i;
}
if ( smooth ) {
double mu = 1.0 + i - log( ( log( z2_r + z2_i ) / 2.0 ) / log( 2.0 ) ) / log( 2.0 );
int color1 = ( int )mu, color2 = color1 + 1;
double t2 = mu - color1, t1 = 1 - t2;
graph[x * height + y].color = sf::Color( colors[color1 % COLORS].r * t1, colors[color1 % COLORS].g * t1, colors[color1 % COLORS].b * t1 ) + sf::Color( colors[color2 % COLORS].r * t2, colors[color2 % COLORS].g * t2, colors[color2 % COLORS].b * t2 );
}
else
graph[x * height + y].color = colors[( int )( COLORS * ( ( double )i / iterations ) )];
}
}
}
template<typename T> T lerp( T a, T b, T v ) {
return a + v * ( b - a );
}
| 43.26699 | 265 | 0.440929 |
97e2a9ee82142776598131c22d6f79ad122e0f03 | 1,063 | cpp | C++ | solved/o-q/phone-list/uva/phone.cpp | abuasifkhan/pc-code | 77ce51d692acf6edcb9e47aeb7b7f06bf56e4e90 | [
"Unlicense"
] | 13 | 2015-09-30T19:18:04.000Z | 2021-06-26T21:11:30.000Z | solved/o-q/phone-list/uva/phone.cpp | sbmaruf/pc-code | 77ce51d692acf6edcb9e47aeb7b7f06bf56e4e90 | [
"Unlicense"
] | null | null | null | solved/o-q/phone-list/uva/phone.cpp | sbmaruf/pc-code | 77ce51d692acf6edcb9e47aeb7b7f06bf56e4e90 | [
"Unlicense"
] | 13 | 2015-01-04T09:49:54.000Z | 2021-06-03T13:18:44.000Z | #include <cstdio>
#include <cstring>
#define ALPHABET 10
#define WORDS 10000
#define WORDLEN 10
#define Zero(v) memset(v, 0, sizeof(v))
#define NonZero(v) (memcmp(v, _zero, sizeof(_zero)) != 0)
static const int _zero[ALPHABET] = {0};
struct Trie {
struct Node {
int children[ALPHABET];
bool end;
};
int nxt;
Node nodes[WORDS * WORDLEN];
void init() { Zero(nodes); nxt = 1; }
void insert(const char *s, bool &c) {
int cur = 0;
while (*s) {
if (nodes[cur].end) { c = false; return; }
int idx = *s - '0';
if (! nodes[cur].children[idx])
nodes[cur].children[idx] = nxt++;
cur = nodes[cur].children[idx];
++s;
}
if (NonZero(nodes[cur].children)) { c = false; return; }
nodes[cur].end = true;
}
};
Trie t;
char num[WORDLEN + 1];
int main()
{
int T;
scanf("%d", &T);
while (T--) {
int n;
scanf("%d", &n);
t.init();
bool consistent = true;
while (n--) {
scanf("%s", num);
if (consistent)
t.insert(num, consistent);
}
if (consistent) puts("YES");
else puts("NO");
}
return 0;
}
| 15.185714 | 58 | 0.573848 |
97e3bb6c7ff45308e577587f3a2c2f82ec39c4c1 | 1,472 | cpp | C++ | Code/ecrireMemoire/ecirreMemoire.cpp | joabda/Robot | ce27e2e615cb87480c05f9e0ce32124648f9baff | [
"MIT"
] | 1 | 2020-01-26T15:36:07.000Z | 2020-01-26T15:36:07.000Z | Code/ecrireMemoire/ecirreMemoire.cpp | joabda/Robot | ce27e2e615cb87480c05f9e0ce32124648f9baff | [
"MIT"
] | null | null | null | Code/ecrireMemoire/ecirreMemoire.cpp | joabda/Robot | ce27e2e615cb87480c05f9e0ce32124648f9baff | [
"MIT"
] | null | null | null | /*
* Code permettant d'ecrire sur la mémoire externe
* du microcontroleur ATMega16 de Atmel.
*
* Ecole Polytechnique de Montreal
* Departement de genie informatique
* Cours inf1900
*
* Joe Abdo, Mathurin Critin, Teo Quiquempoix et Philippe Babin,
* 2019
*
* Code qui n'est sous aucune license.
*
*/
#include "libCommune.h"
uint16_t getSizeFichier(Uart& uart)
{
uint16_t octet16 = ( uart.reception() << 8) | uart.reception();
return octet16; // Concatenantion des deux octet pour trouver la taille du fichiers transmit
}
void test(Memoire24CXXX memoire1, uint8_t adresse, Uart& uart)
// Avec serieViaUSB -l va recevoir le contenu de la memoire qui devrait etre le meme que ce qui a ete transmis
{
unsigned char donee[] = {0};
for(uint8_t i = 0; i <= adresse; i++)
{
memoire1.lecture(i, &donee[0],1);
uart.transmission(&donee[0]);
}
}
int main()
{
Uart uart1;
LED led1(A,ledRouge,0,1);
Memoire24CXXX memoire1;
uint16_t sizeFichier = getSizeFichier(uart1);
if(sizeFichier == 106)
led1.activer();
uint16_t adresse = 0;
for (; adresse != sizeFichier - 2; adresse++) // -2 car on lit les 2 premiers octets qui donnent la taille (on ne veut pas les ecrire )
{
unsigned char doneeRecue[] = {uart1.reception()};
memoire1.ecriture(adresse, &doneeRecue[0], 1);
}
test(memoire1, adresse, uart1); //Decommenter cette ligne pour tester le code
} | 29.44 | 140 | 0.661005 |
97e7691f6689308ea11c838e4f93a9ed034a0db2 | 2,168 | cpp | C++ | parrot/src/parrot/renderer/Shader.cpp | MiloHX/Parrot | 159f583b2e43396dcc42dc3456a9c5d3fb043133 | [
"Apache-2.0"
] | null | null | null | parrot/src/parrot/renderer/Shader.cpp | MiloHX/Parrot | 159f583b2e43396dcc42dc3456a9c5d3fb043133 | [
"Apache-2.0"
] | null | null | null | parrot/src/parrot/renderer/Shader.cpp | MiloHX/Parrot | 159f583b2e43396dcc42dc3456a9c5d3fb043133 | [
"Apache-2.0"
] | null | null | null | #include "prpch.h"
#include "parrot/renderer/Shader.h"
#include "parrot/renderer/Renderer.h"
#include "platform/OpenGL/OpenGLShader.h"
namespace parrot {
Ref<Shader> Shader::create(const std::string& file_path) {
switch (Renderer::getAPI()) {
case RendererAPI::API::None:
PR_CORE_ASSERT(false, "RendererAPI::None is not supported");
return nullptr;
case RendererAPI::API::OpenGL:
return createRef<OpenGLShader>(file_path);
}
PR_CORE_ASSERT(false, "Unknown RendererAPI when creating shader");
return nullptr;
}
Ref<Shader> Shader::create(const std::string& name, const std::string& vertex_source, const std::string& fragment_source) {
switch (Renderer::getAPI()) {
case RendererAPI::API::None:
PR_CORE_ASSERT(false, "RendererAPI::None is not supported");
return nullptr;
case RendererAPI::API::OpenGL:
return createRef<OpenGLShader>(name, vertex_source, fragment_source);
}
PR_CORE_ASSERT(false, "Unknown RendererAPI when creating shader");
return nullptr;
}
void ShaderLibrary::add(const Ref<Shader>& shader) {
auto& name = shader->getName();
add(name, shader);
}
void ShaderLibrary::add(const std::string& name, const Ref<Shader>& shader) {
PR_CORE_ASSERT(!exists(name), "Shader already exists")
m_shader_map[name] = shader;
}
Ref<Shader> ShaderLibrary::load(const std::string& file_path) {
auto shader = Shader::create(file_path);
add(shader);
return shader;
}
Ref<Shader> ShaderLibrary::load(const std::string& name, const std::string& file_path) {
auto shader = Shader::create(file_path);
add(name, shader);
return shader;
}
Ref<Shader> ShaderLibrary::get(const std::string& name) {
PR_CORE_ASSERT(exists(name), "Shader not found!")
return m_shader_map[name];
}
bool ShaderLibrary::exists(const std::string& name) const {
return m_shader_map.find(name) != m_shader_map.end();
}
} | 34.967742 | 127 | 0.625 |
97e987f22301e3c4da2ea659edd61b2616906de1 | 4,525 | cpp | C++ | uppsrc/CtrlLib/DropTree.cpp | dreamsxin/ultimatepp | 41d295d999f9ff1339b34b43c99ce279b9b3991c | [
"BSD-2-Clause"
] | 2 | 2016-04-07T07:54:26.000Z | 2020-04-14T12:37:34.000Z | uppsrc/CtrlLib/DropTree.cpp | dreamsxin/ultimatepp | 41d295d999f9ff1339b34b43c99ce279b9b3991c | [
"BSD-2-Clause"
] | 1 | 2021-04-06T21:57:39.000Z | 2021-04-06T21:57:39.000Z | uppsrc/CtrlLib/DropTree.cpp | dreamsxin/ultimatepp | 41d295d999f9ff1339b34b43c99ce279b9b3991c | [
"BSD-2-Clause"
] | 3 | 2017-08-26T12:06:05.000Z | 2019-11-22T16:57:47.000Z | #include "CtrlLib.h"
namespace Upp {
CH_VALUE(TreeDropEdge, ChBorder(BlackBorder()));
CtrlFrame& TreeDropFrame()
{
static LookFrame m(TreeDropEdge);
return m;
}
PopUpTree::PopUpTree() {
SetFrame(TreeDropFrame());
Accel();
MouseMoveCursor();
NoPopUpEx();
SetDropLines(16);
open = autosize = false;
showpos = Null;
WhenOpen = WhenClose = THISBACK(OpenClose);
}
PopUpTree::~PopUpTree() {}
void PopUpTree::CancelMode() {
if(open) {
DoClose();
WhenCancel();
}
TreeCtrl::CancelMode();
}
void PopUpTree::DoClose() {
open = false;
Ctrl::Close();
}
void PopUpTree::Deactivate() {
if(open) {
DoClose();
IgnoreMouseClick();
WhenCancel();
}
}
void PopUpTree::Select() {
if(IsCursor() && !GetData().IsVoid()) {
DoClose();
WhenSelect();
}
}
bool PopUpTree::Key(dword key, int n) {
switch(key) {
case K_ENTER:
case K_ALT_DOWN:
DoClose();
WhenSelect();
return true;
case K_ESCAPE:
DoClose();
WhenCancel();
return true;
}
return TreeCtrl::Key(key, n);
}
void PopUpTree::PopUp(Ctrl *owner, int x, int top, int bottom, int width) {
DoClose();
Rect area = Ctrl::GetWorkArea();
int mh = min(maxheight, area.bottom - bottom);
int h = AddFrameSize(width, maxheight).cy;
showpos.x = x;
showpos.y = bottom;
showwidth = width;
up = false;
if(showpos.y + h > area.bottom) {
up = true;
showpos.y = top;
}
open = false;
int ht = AddFrameSize(width, min(mh, autosize ? GetTreeSize().cy : INT_MAX)).cy;
Rect rt = RectC(showpos.x, showpos.y - (up ? ht : 0), showwidth, ht);
if(GUI_PopUpEffect()) {
bool vis = sb.x.IsShown();
bool ah = sb.x.IsAutoHide();
sb.AutoHide(false);
sb.Hide();
sPaintRedirectCtrl pb;
pb.ctrl = this;
if(up) {
SetRect(Rect(rt.left, rt.bottom - 1, rt.right, rt.bottom));
Ctrl::Add(pb.TopPos(0, rt.Height()).LeftPos(0, rt.Width()));
}
else {
SetRect(Rect(rt.left, rt.top, rt.right, rt.top + 1));
Ctrl::Add(pb.BottomPos(0, rt.Height()).LeftPos(0, rt.Width()));
}
CenterCursor();
Ctrl::PopUp(owner, true, true, GUI_DropShadows());
SetFocus();
Ctrl::ProcessEvents();
Animate(*this, rt, GUIEFFECT_SLIDE);
Ctrl::Remove();
sb.Show(vis);
sb.AutoHide(ah);
pb.Remove();
open = true;
}
CenterCursor();
SetRect(rt);
if(!open)
Ctrl::PopUp(owner, true, true, GUI_DropShadows());
SetFocus();
open = true;
}
void PopUpTree::OpenClose(int)
{
if(autosize) {
SyncTree();
Rect area = Ctrl::GetWorkArea();
int mh = min(maxheight, area.bottom - showpos.y);
int ht = AddFrameSize(showwidth, min(mh, GetTreeSize().cy)).cy;
SetRect(RectC(showpos.x, showpos.y - (up ? ht : 0), showwidth, ht));
}
}
void PopUpTree::PopUp(Ctrl *owner, int width)
{
Rect r = owner->GetScreenRect();
r.right = r.left + width;
PopUp(owner, r.left, r.top, r.bottom, width);
if(IsNull(showpos))
showpos = r.TopLeft();
OpenClose(0);
}
void PopUpTree::PopUp(Ctrl *owner)
{
Rect r = owner->GetScreenRect();
PopUp(owner, r.left, r.top, r.bottom, r.Width());
}
void DropTree::Sync() {
Image icon;
if(tree.IsCursor())
icon = tree.GetNode(tree.GetCursor()).image;
icond.Set(valuedisplay ? *valuedisplay : tree.GetDisplay(tree.GetCursor()), icon);
MultiButton::SetDisplay(icond);
Set(tree.GetValue());
}
bool DropTree::Key(dword k, int) {
if(IsReadOnly()) return false;
if(k == K_ALT_DOWN) {
Drop();
return true;
}
return false;
}
void DropTree::Drop() {
if(IsReadOnly()) return;
if(dropfocus)
SetFocus();
WhenDrop();
tree.PopUp(this, GetRect().GetWidth());
}
void DropTree::Select() {
if(dropfocus)
SetFocus();
Sync();
UpdateAction();
}
void DropTree::Cancel() {
if(dropfocus)
SetFocus();
Sync();
}
void DropTree::Clear() {
tree.Clear();
tree <<= Null;
Sync();
Update();
}
void DropTree::SetData(const Value& data)
{
if(tree.Get() != data) {
tree <<= data;
Update();
Sync();
}
}
Value DropTree::GetData() const
{
return notnull && IsNull(tree.Get()) ? NotNullError() : tree.Get();
}
DropTree& DropTree::ValueDisplay(const Display& d)
{
valuedisplay = &d;
Sync();
return *this;
}
DropTree::DropTree()
{
displayall = false;
valuedisplay = NULL;
dropfocus = false;
notnull = false;
AddButton().Main().WhenPush = THISBACK(Drop);
NoInitFocus();
tree.WhenSelect = THISBACK(Select);
tree.WhenCancel = THISBACK(Cancel);
dropwidth = 0;
}
};
| 19.759825 | 84 | 0.615691 |
97ea9746475e69d636022c161a72c557f296e6d9 | 2,318 | cpp | C++ | unittest/splitter/splitter.cpp | relick/tls | a9ef85384e0b6394d94daf7798891f8ee4aa31ac | [
"MIT"
] | null | null | null | unittest/splitter/splitter.cpp | relick/tls | a9ef85384e0b6394d94daf7798891f8ee4aa31ac | [
"MIT"
] | null | null | null | unittest/splitter/splitter.cpp | relick/tls | a9ef85384e0b6394d94daf7798891f8ee4aa31ac | [
"MIT"
] | null | null | null | #include <execution>
#include <tls/splitter.h>
#include "../catch.hpp"
TEST_CASE("tls::splitter<> specification") {
SECTION("new instances are default initialized") {
struct test {
int x = 4;
};
REQUIRE(tls::splitter<int>().local() == int{});
REQUIRE(tls::splitter<double>().local() == double{});
REQUIRE(tls::splitter<test>().local().x == test{}.x);
}
SECTION("does not cause data races") {
std::vector<int> vec(1024 * 1024, 1);
tls::splitter<int> acc;
std::for_each(std::execution::par, vec.begin(), vec.end(), [&acc](int const& i) { acc.local() += i; });
int result = std::reduce(acc.begin(), acc.end());
REQUIRE(result == 1024 * 1024);
}
SECTION("clearing after use cleans up properly") {
std::vector<int> vec(1024, 1);
tls::splitter<int> acc;
std::for_each(std::execution::par, vec.begin(), vec.end(), [&acc](int const& i) { acc.local() += i; });
acc.clear();
int result = std::reduce(acc.begin(), acc.end());
REQUIRE(result == 0);
}
SECTION("multiple instances points to the same data") {
tls::splitter<int> s1, s2, s3;
s1.local() = 1;
s2.local() = 2;
s3.local() = 3;
CHECK(s1.local() == 3);
CHECK(s2.local() == 3);
CHECK(s3.local() == 3);
tls::splitter<int, bool> s4;
tls::splitter<int, char> s5;
tls::splitter<int, short> s6;
tls::splitter<int, void> s7; // same as splitter<int> s1,s2,s3
s4.local() = 1;
s5.local() = 2;
s6.local() = 3;
CHECK(s4.local() == 1);
CHECK(s5.local() == 2);
CHECK(s6.local() == 3);
CHECK(s7.local() == 3);
}
SECTION("tls::splitter<> variables can be copied") {
std::vector<int> vec(1024 * 1024, 1);
tls::splitter<int> acc;
std::for_each(std::execution::par, vec.begin(), vec.end(), [&acc](int const& i) { acc.local() += i; });
tls::splitter<int> const acc_copy = acc;
int const result = std::reduce(acc.begin(), acc.end());
acc.clear();
CHECK(result == 1024 * 1024);
int const result_copy = std::reduce(acc_copy.begin(), acc_copy.end());
CHECK(result == result_copy);
}
}
| 31.324324 | 111 | 0.52761 |
97ebafe714b489aff42b63d3d3702660ca97c4c9 | 3,165 | cxx | C++ | bpkg/types-parsers.cxx | build2/bpkg | bd939839b44d90d027517e447537dd52539269ff | [
"MIT"
] | 19 | 2018-05-30T12:01:25.000Z | 2022-01-29T21:37:23.000Z | bpkg/types-parsers.cxx | build2/bpkg | bd939839b44d90d027517e447537dd52539269ff | [
"MIT"
] | 2 | 2019-03-18T22:31:45.000Z | 2020-07-28T06:44:03.000Z | bpkg/types-parsers.cxx | build2/bpkg | bd939839b44d90d027517e447537dd52539269ff | [
"MIT"
] | 1 | 2019-02-04T02:58:14.000Z | 2019-02-04T02:58:14.000Z | // file : bpkg/types-parsers.cxx -*- C++ -*-
// license : MIT; see accompanying LICENSE file
#include <bpkg/types-parsers.hxx>
namespace bpkg
{
namespace cli
{
void parser<url>::
parse (url& x, bool& xs, scanner& s)
{
const char* o (s.next ());
if (!s.more ())
throw missing_value (o);
const char* v (s.next ());
try
{
x = url (v);
}
catch (const invalid_argument& e)
{
throw invalid_value (o, v, e.what ());
}
xs = true;
}
template <typename T>
static void
parse_path (T& x, scanner& s)
{
const char* o (s.next ());
if (!s.more ())
throw missing_value (o);
const char* v (s.next ());
try
{
x = T (v);
if (x.empty ())
throw invalid_value (o, v);
}
catch (const invalid_path&)
{
throw invalid_value (o, v);
}
}
void parser<path>::
parse (path& x, bool& xs, scanner& s)
{
xs = true;
parse_path (x, s);
}
void parser<dir_path>::
parse (dir_path& x, bool& xs, scanner& s)
{
xs = true;
parse_path (x, s);
}
void parser<uuid>::
parse (uuid& x, bool& xs, scanner& s)
{
xs = true;
const char* o (s.next ());
if (!s.more ())
throw missing_value (o);
const char* v (s.next ());
try
{
x = uuid (v);
if (x.nil ())
throw invalid_value (o, v);
}
catch (const invalid_argument&)
{
throw invalid_value (o, v);
}
}
void parser<butl::standard_version>::
parse (butl::standard_version& x, bool& xs, scanner& s)
{
using butl::standard_version;
xs = true;
const char* o (s.next ());
if (!s.more ())
throw missing_value (o);
const char* v (s.next ());
try
{
// Note that we allow all kinds of versions, so that the caller can
// restrict them as they wish after the parsing.
//
x = standard_version (v,
standard_version::allow_earliest |
standard_version::allow_stub);
}
catch (const invalid_argument& e)
{
throw invalid_value (o, v, e.what ());
}
}
void parser<auth>::
parse (auth& x, bool& xs, scanner& s)
{
xs = true;
const char* o (s.next ());
if (!s.more ())
throw missing_value (o);
const string v (s.next ());
if (v == "none")
x = auth::none;
else if (v == "remote")
x = auth::remote;
else if (v == "all")
x = auth::all;
else
throw invalid_value (o, v);
}
void parser<repository_type>::
parse (repository_type& x, bool& xs, scanner& s)
{
xs = true;
const char* o (s.next ());
if (!s.more ())
throw missing_value (o);
const string v (s.next ());
try
{
x = to_repository_type (v);
}
catch (const invalid_argument&)
{
throw invalid_value (o, v);
}
}
}
}
| 19.066265 | 75 | 0.473934 |
97ecdd04a7d87b1c52a06075aa9abd8c6990c1b2 | 770 | cc | C++ | base/containers/flag_set_test.cc | mayah/base | aec046929938d2aaebaadce5c5abb58b5cf342b4 | [
"MIT"
] | null | null | null | base/containers/flag_set_test.cc | mayah/base | aec046929938d2aaebaadce5c5abb58b5cf342b4 | [
"MIT"
] | null | null | null | base/containers/flag_set_test.cc | mayah/base | aec046929938d2aaebaadce5c5abb58b5cf342b4 | [
"MIT"
] | null | null | null | #include "base/containers/flag_set.h"
#include <gtest/gtest.h>
TEST(FlagSetTest, basic)
{
base::FlagSet s;
EXPECT_TRUE(s.empty());
EXPECT_EQ(0, s.size());
s.set(0);
s.set(1);
s.set(5);
s.set(8);
s.set(16);
s.set(31);
s.set(31);
s.set(63);
EXPECT_EQ(7, s.size());
s.unset(8);
EXPECT_EQ(6, s.size());
EXPECT_EQ(0, s.smallest());
s.remove_smallest();
EXPECT_EQ(1, s.smallest());
s.remove_smallest();
EXPECT_EQ(5, s.smallest());
s.remove_smallest();
EXPECT_EQ(16, s.smallest());
s.remove_smallest();
EXPECT_EQ(31, s.smallest());
s.remove_smallest();
EXPECT_EQ(63, s.smallest());
s.remove_smallest();
EXPECT_TRUE(s.empty());
EXPECT_EQ(0, s.size());
}
| 16.73913 | 37 | 0.568831 |
97f349dfc87fcba4188322e893a6f26fd9c42b84 | 1,516 | cpp | C++ | core/vulkan/vk_memory_tracker_layer/cc/layer_helpers.cpp | isabella232/gapid | bee6c18117577f871a4737a6be77af04c6f11577 | [
"Apache-2.0"
] | 2,100 | 2017-03-06T02:39:43.000Z | 2022-03-30T07:49:26.000Z | core/vulkan/vk_memory_tracker_layer/cc/layer_helpers.cpp | isabella232/gapid | bee6c18117577f871a4737a6be77af04c6f11577 | [
"Apache-2.0"
] | 1,994 | 2017-03-06T02:15:02.000Z | 2022-03-29T22:06:12.000Z | core/vulkan/vk_memory_tracker_layer/cc/layer_helpers.cpp | isabella232/gapid | bee6c18117577f871a4737a6be77af04c6f11577 | [
"Apache-2.0"
] | 351 | 2017-03-06T06:43:35.000Z | 2022-03-30T01:14:27.000Z | /*
* Copyright (C) 2019 Google 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 "core/cc/log.h"
#include "core/cc/target.h"
extern "C" {
__attribute__((constructor)) void _layer_dummy_func__();
}
#if (TARGET_OS == GAPID_OS_WINDOWS) || (TARGET_OS == GAPID_OS_OSX)
class dummy_struct {};
#else
#include <dlfcn.h>
#include <cstdint>
#include <cstdio>
class dummy_struct {
public:
dummy_struct();
};
dummy_struct::dummy_struct() {
GAPID_ERROR("Loading dummy struct");
Dl_info info;
if (dladdr((void*)&_layer_dummy_func__, &info)) {
dlopen(info.dli_fname, RTLD_NODELETE);
}
}
#endif
extern "C" {
// _layer_dummy_func__ is marked __attribute__((constructor))
// this means on .so open, it will be called. Once that happens,
// we create a dummy struct, which on Android and Linux,
// Forces the layer to never be unloaded. There is some global
// state in perfetto producers that does not like being unloaded.
void _layer_dummy_func__() {
dummy_struct d;
(void)d;
}
}
| 28.074074 | 75 | 0.723615 |
97fa2a64a9aba5feceda8a56215f77ef3f95c38c | 10,789 | cpp | C++ | CommonWalkingControlModules/csrc/ActiveSetQP/QP.cpp | wxmerkt/ihmc-open-robotics-software | 2c47c9a9bd999e7811038e99c3888683f9973a2a | [
"Apache-2.0"
] | 170 | 2016-02-01T18:58:50.000Z | 2022-03-17T05:28:01.000Z | CommonWalkingControlModules/csrc/ActiveSetQP/QP.cpp | wxmerkt/ihmc-open-robotics-software | 2c47c9a9bd999e7811038e99c3888683f9973a2a | [
"Apache-2.0"
] | 162 | 2016-01-29T17:04:29.000Z | 2022-02-10T16:25:37.000Z | CommonWalkingControlModules/csrc/ActiveSetQP/QP.cpp | wxmerkt/ihmc-open-robotics-software | 2c47c9a9bd999e7811038e99c3888683f9973a2a | [
"Apache-2.0"
] | 83 | 2016-01-28T22:49:01.000Z | 2022-03-28T03:11:24.000Z | #include <math.h>
#include <iostream>
#include <Eigen/Cholesky>
#include <Eigen/LU>
#include <Eigen/SVD>
#include "fastQP.h"
#define _USE_MATH_DEFINES
extern "C"
{
int MAX_ITER = -1; // default: #equality constraints
}
using namespace Eigen;
using namespace std;
//template <typename tA, typename tB, typename tC, typename tD, typename tE, typename tF, typename tG>
//int fastQPThatTakesQinv(vector< MatrixBase<tA>* > QinvblkDiag, const MatrixBase<tB>& f, const MatrixBase<tC>& Aeq, const MatrixBase<tD>& beq, const MatrixBase<tE>& Ain, const MatrixBase<tF>& bin, set<int>& active, MatrixBase<tG>& x)
int fastQPThatTakesQinv(vector< MatrixXd* > QinvblkDiag, const VectorXd& f, const MatrixXd& Aeq, const VectorXd& beq, const MatrixXd& Ain, const VectorXd& bin, set<int>& active, VectorXd& x)
{
int max_iter = (MAX_ITER<0? (Aeq.rows()+Ain.rows()): MAX_ITER);
int i,d;
int iterCnt = 0;
int M_in = bin.size();
int M = Aeq.rows();
int N = Aeq.cols();
if (f.rows() != N) { cerr << "size of f (" << f.rows() << " by " << f.cols() << ") doesn't match cols of Aeq (" << Aeq.rows() << " by " << Aeq.cols() << ")" << endl; return -4; }
if (beq.rows() !=M) { cerr << "size of beq doesn't match rows of Aeq" << endl; return -4; }
if (Ain.cols() !=N) { cerr << "cols of Ain doesn't match cols of Aeq" << endl; return -4; };
if (bin.rows() != Ain.rows()) { cerr << "bin rows doesn't match Ain rows" << endl; return -4; };
if (x.rows() != N) { cerr << "x doesn't match Aeq" << endl; return -4; }
int n_active = active.size();
MatrixXd Aact = MatrixXd(n_active, N);
VectorXd bact = VectorXd(n_active);
MatrixXd QinvAteq(N,M);
VectorXd minusQinvf(N);
// calculate a bunch of stuff that is constant during each iteration
int startrow=0;
// for (typename vector< MatrixBase<tA>* >::iterator iterQinv=QinvblkDiag.begin(); iterQinv!=QinvblkDiag.end(); iterQinv++) {
// MatrixBase<tA> *thisQinv = *iterQinv;
for (vector< MatrixXd* >::iterator iterQinv=QinvblkDiag.begin(); iterQinv!=QinvblkDiag.end(); iterQinv++) {
MatrixXd *thisQinv = *iterQinv;
int numRow = thisQinv->rows();
int numCol = thisQinv->cols();
if (numRow == 1 || numCol == 1) { // it's a vector
d = numRow*numCol;
if (M>0) QinvAteq.block(startrow,0,d,M)= thisQinv->asDiagonal()*Aeq.block(0,startrow,M,d).transpose(); // Aeq.transpoODse().block(startrow,0,d,N)
minusQinvf.segment(startrow,d) = -thisQinv->cwiseProduct(f.segment(startrow,d));
startrow=startrow+d;
} else { // potentially dense matrix
d = numRow;
if (numRow!=numCol) {
cerr << "Q is not square! " << numRow << "x" << numCol << "\n";
return -2;
}
if (M>0)
QinvAteq.block(startrow,0,d,M) = thisQinv->operator*(Aeq.block(0,startrow,M,d).transpose()); // Aeq.transpose().block(startrow,0,d,N)
minusQinvf.segment(startrow,d) = -thisQinv->operator*(f.segment(startrow,d));
startrow=startrow+d;
}
if (startrow>N) {
cerr << "Q is too big!" << endl;
return -2;
}
}
if (startrow!=N) { cerr << "Q is the wrong size. Got " << startrow << "by" << startrow << " but needed " << N << "by" << N << endl; return -2; }
MatrixXd A;
VectorXd b;
MatrixXd QinvAt;
VectorXd lam, lamIneq;
VectorXd violated(M_in);
VectorXd violation;
while(1) {
iterCnt++;
n_active = active.size();
Aact.resize(n_active,N);
bact.resize(n_active);
i=0;
for (set<int>::iterator iter=active.begin(); iter!=active.end(); iter++) {
if (*iter<0 || *iter>=Ain.rows()) {
return -3; // active set is invalid. exit quietly, because this is expected behavior in normal operation (e.g. it means I should immediately kick out to gurobi)
}
Aact.row(i) = Ain.row(*iter);
bact(i++) = bin(*iter);
}
A.resize(Aeq.rows() + Aact.rows(),N);
b.resize(beq.size() + bact.size());
A << Aeq,Aact;
b << beq,bact;
if (A.rows() > 0) {
//Solve H * [x;lam] = [-f;b] using Schur complements, H = [Q,At';A,0];
QinvAt.resize(QinvAteq.rows(), QinvAteq.cols() + Aact.rows());
if (n_active>0) {
int startrow=0;
for (vector< MatrixXd* >::iterator iterQinv=QinvblkDiag.begin(); iterQinv!=QinvblkDiag.end(); iterQinv++) {
MatrixXd* thisQinv = (*iterQinv);
d = thisQinv->rows();
int numCol = thisQinv->cols();
if (numCol == 1) { // it's a vector
QinvAt.block(startrow,0,d,M+n_active) << QinvAteq.block(startrow,0,d,M), thisQinv->asDiagonal()*Aact.block(0,startrow,n_active,d).transpose();
} else { // it's a matrix
QinvAt.block(startrow,0,d,M+n_active) << QinvAteq.block(startrow,0,d,M), thisQinv->operator*(Aact.block(0,startrow,n_active,d).transpose());
}
startrow=startrow+d;
}
} else {
QinvAt = QinvAteq;
}
lam.resize(QinvAt.cols());
#if 1
lam = -(A*QinvAt).ldlt().solve(b + (f.transpose()*QinvAt).transpose());
//lam = -(A*QinvAt + MatrixXd::Identity(A.rows(),A.rows())*1e-4).ldlt().solve(b + (f.transpose()*QinvAt).transpose());
#else
JacobiSVD<MatrixXd> svd(A*QinvAt , ComputeThinU | ComputeThinV);
lam = -svd.solve(b + (f.transpose()*QinvAt).transpose());
SingularValueType sigmas=svd.singularValues();
#endif
x = minusQinvf - QinvAt*lam;
lamIneq = lam.tail(lam.size() - M);
} else {
x = minusQinvf;
lamIneq.resize(0);
}
if(Ain.rows() == 0) {
active.clear();
break;
}
set<int> new_active;
violation = Ain*x - bin;
for (i=0; i<M_in; i++)
if (violation(i) >= 1e-6)
new_active.insert(i);
bool all_pos_mults = true;
for (i=0; i<n_active; i++) {
if (lamIneq(i)<0) {
all_pos_mults = false;
break;
}
}
if (new_active.empty() && all_pos_mults) {
// existing active was AOK
break;
}
i=0;
set<int>::iterator iter=active.begin(), tmp;
while (iter!=active.end()) { // to accomodating inloop erase
tmp = iter++;
if (lamIneq(i++)<0) {
active.erase(tmp);
}
}
active.insert(new_active.begin(),new_active.end());
if (iterCnt > max_iter) {
return -1;
}
}
return iterCnt;
}
//template <typename tA, typename tB, typename tC, typename tD, typename tE, typename tF, typename tG>
//int fastQP(vector< MatrixBase<tA>* > QblkDiag, const MatrixBase<tB>& f, const MatrixBase<tC>& Aeq, const MatrixBase<tD>& beq, const MatrixBase<tE>& Ain, const MatrixBase<tF>& bin, set<int>& active, MatrixBase<tG>& x)
int fastQP(vector< MatrixXd* > QblkDiag, const VectorXd& f, const MatrixXd& Aeq, const VectorXd& beq, const MatrixXd& Ain, const VectorXd& bin, set<int>& active, VectorXd& x)
{
/* min 1/2 * x'QblkDiag'x + f'x s.t A x = b, Ain x <= bin
* using active set method. Iterative solve a linearly constrained
* quadratic minimization problem where linear constraints include
* Ain(active,:)x == bin(active). Quit if all dual variables associated
* with these equations are positive (i.e. they satisfy KKT conditions).
*
* Note:
* fails if QP is infeasible.
* active == initial rows of Ain to treat as equations.
* Frank Permenter - June 6th 2013
*
* @retval if feasible then iterCnt, else -1 for infeasible, -2 for input error
*/
int N = f.rows();
MatrixXd* Qinv = new MatrixXd[QblkDiag.size()];
vector< MatrixXd* > Qinvmap;
#define REG 0.0
// calculate a bunch of stuff that is constant during each iteration
int startrow=0;
//typedef typename vector< MatrixBase<tA> >::iterator Qiterator;
int i=0;
for (vector< MatrixXd* >::iterator iterQ=QblkDiag.begin(); iterQ!=QblkDiag.end(); iterQ++) {
MatrixXd* thisQ = *iterQ;
int numRow = thisQ->rows();
int numCol = thisQ->cols();
if (numCol == 1) { // it's a vector
VectorXd Qdiag_mod = thisQ->operator+(VectorXd::Constant(numRow,REG)); // regularize
Qinv[i] = Qdiag_mod.cwiseInverse();
Qinvmap.push_back( &Qinv[i] );
startrow=startrow+numRow;
}
else
{ // potentially dense matrix
if (numRow!=numCol) {
if (numRow==1)
cerr << "diagonal Q's must be set as column vectors" << endl;
else
cerr << "Q is not square! " << numRow << "x" << numCol << endl;
return -2;
}
MatrixXd Q_mod = thisQ->operator+(REG*MatrixXd::Identity(numRow,numRow));
Qinv[i] = Q_mod.inverse();
Qinvmap.push_back( &Qinv[i] );
startrow=startrow+numRow;
}
// cout << "Qinv{" << i << "} = " << Qinv[i] << endl;
if (startrow>N) {
cerr << "Q is too big!" << endl;
return -2;
}
i++;
}
if (startrow!=N) { cerr << "Q is the wrong size. Got " << startrow << "by" << startrow << " but needed " << N << "by" << N << endl; return -2; }
int info = fastQPThatTakesQinv(Qinvmap,f,Aeq,beq,Ain,bin,active,x);
delete[] Qinv;
return info;
}
/* Example call (allocate inequality matrix, call function, resize inequalites:
VectorXd binBnd = VectorXd(2*N);
AinBnd.setZero();
int numIneq = boundToIneq(ub,lb,AinBnd,binBnd);
AinBnd.resize(numIneq,N);
binBnd.resize(numIneq);
*/
/*
int boundToIneq(const VectorXd& uB,const VectorXd& lB, MatrixXd& Ain, VectorXd& bin)
{
int rCnt = 0;
int cCnt = 0;
if (uB.rows()+lB.rows() > A.rows() ) {
cerr << "not enough memory allocated";
}
if (uB.rows()+lB.rows() > b.rows() ) {
cerr << "not enough memory allocated";
}
for (int i = 0; i < lB.rows(); i++ ) {
if (!isinf(lB(i))) {
cout << lB(i);
cout << i;
Ain(rCnt,cCnt++) = -1;//lB(i);
bin(rCnt++) = -lB(i);
}
}
cCnt = 0;
for (int i = 0; i < uB.rows(); i++ ) {
if (!isinf(uB(i))) {
Ain(rCnt,cCnt++) = 1;//uB(i);
bin(rCnt++) = uB(i);
}
}
//resizing inside function all causes exception (why??)
//A.resize(rCnt,uB.rows());
return rCnt;
}
*/
/*
template int fastQP(vector< MatrixBase<MatrixXd>* > QblkDiag, const MatrixBase< Map<VectorXd> >&, const MatrixBase< Map<MatrixXd> >&, const MatrixBase< Map<VectorXd> >&, const MatrixBase< Map<MatrixXd> >&, const MatrixBase< Map<VectorXd> >&, set<int>&, MatrixBase< Map<VectorXd> >&);
template GRBmodel* gurobiQP(GRBenv *env, vector< MatrixBase<MatrixXd>* > QblkDiag, VectorXd& f, const MatrixBase< Map<MatrixXd> >& Aeq, const MatrixBase< Map<VectorXd> >& beq, const MatrixBase< Map<MatrixXd> >& Ain, const MatrixBase< Map<VectorXd> >&bin, VectorXd& lb, VectorXd& ub, set<int>&, VectorXd&);
template GRBmodel* gurobiQP(GRBenv *env, vector< MatrixBase<MatrixXd>* > QblkDiag, VectorXd& f, const MatrixBase< MatrixXd >& Aeq, const MatrixBase< VectorXd >& beq, const MatrixBase< MatrixXd >& Ain, const MatrixBase< VectorXd >&bin, VectorXd&lb, VectorXd&ub, set<int>&, VectorXd&);
*/
/*
template int fastQP(vector< MatrixBase< VectorXd > >, const MatrixBase< VectorXd >&, const MatrixBase< Matrix<double,-1,-1,RowMajor,1000,-1> >&, const MatrixBase< Matrix<double,-1,1,0,1000,1> >&, const MatrixBase< Matrix<double,-1,-1,RowMajor,1000,-1> >&, const MatrixBase< Matrix<double,-1,1,0,1000,1> >&, set<int>&, MatrixBase< VectorXd >&);
*/
| 33.927673 | 346 | 0.634721 |
97fcf84aeade82751ece864173c2ab4e874befb6 | 1,415 | hpp | C++ | include/synthizer/downsampler.hpp | wiresong/synthizer | d6fb7a5f9eb0c5760411eee29b12a10fdd7ad420 | [
"Unlicense"
] | 25 | 2020-09-05T18:21:21.000Z | 2021-12-05T02:47:42.000Z | include/synthizer/downsampler.hpp | wiresong/synthizer | d6fb7a5f9eb0c5760411eee29b12a10fdd7ad420 | [
"Unlicense"
] | 77 | 2020-07-08T23:33:46.000Z | 2022-03-19T05:34:26.000Z | include/synthizer/downsampler.hpp | wiresong/synthizer | d6fb7a5f9eb0c5760411eee29b12a10fdd7ad420 | [
"Unlicense"
] | 9 | 2020-07-08T18:16:53.000Z | 2022-03-02T21:35:28.000Z | #pragma once
#include <algorithm>
#include <cstddef>
#include <type_traits>
#include "synthizer/filter_design.hpp"
#include "synthizer/iir_filter.hpp"
#include "synthizer/types.hpp"
namespace synthizer {
/*
* A downsampler. Requires that the size be a power of 2 for the time being.
*
* We use this for efficient delays, so that the delay lines themselves never have to deal with fractional values:
* we can filter once at the end of processing instead.
*
* For instance 44100 oversampled by a factor of 4 (for HRTF) gives delays of 2 microseconds,
*
* The tick method consumes AMOUNT frames from the input, and produces 1 frame in the output.
* */
template <std::size_t LANES, std::size_t AMOUNT, typename enabled = void> class Downsampler;
template <std::size_t LANES, std::size_t AMOUNT>
class Downsampler<LANES, AMOUNT, All<void, PowerOfTwo<AMOUNT>, std::enable_if_t<AMOUNT != 1>>> {
private:
IIRFilter<LANES, 81, 3> filter;
public:
Downsampler() {
// 0.6 is a rough approximation of a magic constant from WDL's resampler.
// We want to pull the filter down so that frequencies just above nyquist don't alias.
filter.setParameters(designSincLowpass<9>(1.0 / AMOUNT / 2));
}
void tick(float *in, float *out) {
float tmp[LANES];
filter.tick(in, out);
for (int i = 1; i < AMOUNT; i++) {
filter.tick(in + LANES * i, tmp);
}
}
};
} // namespace synthizer
| 30.106383 | 114 | 0.7053 |
3f04111f28a3d39e7ce023190444b2213013ce6f | 492 | cpp | C++ | openMP/helloMPCpp.cpp | melanj/my-spare-time-work | c063fb49662309688bfd4821f10f3a8a6b424897 | [
"Apache-2.0"
] | null | null | null | openMP/helloMPCpp.cpp | melanj/my-spare-time-work | c063fb49662309688bfd4821f10f3a8a6b424897 | [
"Apache-2.0"
] | null | null | null | openMP/helloMPCpp.cpp | melanj/my-spare-time-work | c063fb49662309688bfd4821f10f3a8a6b424897 | [
"Apache-2.0"
] | null | null | null | #include <iostream>
using namespace std;
#include <omp.h>
int main(int argc, char *argv[])
{
int th_id, nthreads;
#pragma omp parallel private(th_id) shared(nthreads)
{
th_id = omp_get_thread_num();
#pragma omp critical
{
cout << "Hello World from thread " << th_id << '\n';
}
#pragma omp barrier
#pragma omp master
{
nthreads = omp_get_num_threads();
cout << "There are " << nthreads << " threads" << '\n';
}
}
return 0;
}
| 18.222222 | 61 | 0.583333 |
3f05727f9a934649f20584837066023f36e7ee0f | 1,075 | hpp | C++ | src/Core/CCubeMap.hpp | Sebajuste/Omeglond3D | 28a3910b47490ec837a29e40e132369f957aedc7 | [
"MIT"
] | 1 | 2019-06-14T08:24:17.000Z | 2019-06-14T08:24:17.000Z | src/Core/CCubeMap.hpp | Sebajuste/Omeglond3D | 28a3910b47490ec837a29e40e132369f957aedc7 | [
"MIT"
] | null | null | null | src/Core/CCubeMap.hpp | Sebajuste/Omeglond3D | 28a3910b47490ec837a29e40e132369f957aedc7 | [
"MIT"
] | null | null | null | #ifndef _DEF_OMEGLOND3D_CCUBEMAP_HPP
#define _DEF_OMEGLOND3D_CCUBEMAP_HPP
#include "ICubeMap.hpp"
namespace OMGL3D
{
namespace CORE
{
class CCubeMap : public ICubeMap
{
public:
CCubeMap(const std::string &name);
virtual ~CCubeMap();
unsigned int GetBpp() const;
unsigned int GetWidth() const;
unsigned int GetHeight() const;
void SetTexture(const CubeMapOrientation & orient, const std::string & picture_name) const;
virtual void SetTexture(const CubeMapOrientation &orient, const CPicture &picture) const=0;
virtual void Enable(unsigned int position=0, const TextureEnvironement &texEnv=OMGL_TEXENV_STANDART) const=0;
virtual void Disable(unsigned int position=0) const=0;
virtual void GenerateTexCoord(unsigned int position, const TexCoordPlane *planes, std::size_t size)=0;
private:
unsigned int _bpp, _width, _height;
};
}
}
#endif
| 25 | 122 | 0.623256 |
3f11246a167c23fd060e7de0f6bf050152a33e8a | 2,665 | cc | C++ | linux/tch_common_widgets_plugin.cc | tomaschyly/tch_common_widgets | c14b4a5890d914bf399740850149bcbb4adcf982 | [
"MIT"
] | 1 | 2021-08-04T04:32:52.000Z | 2021-08-04T04:32:52.000Z | linux/tch_common_widgets_plugin.cc | tomaschyly/tch_common_widgets | c14b4a5890d914bf399740850149bcbb4adcf982 | [
"MIT"
] | 1 | 2021-08-04T04:32:46.000Z | 2021-08-06T10:23:22.000Z | linux/tch_common_widgets_plugin.cc | tomaschyly/tch_common_widgets | c14b4a5890d914bf399740850149bcbb4adcf982 | [
"MIT"
] | null | null | null | #include "include/tch_common_widgets/tch_common_widgets_plugin.h"
#include <flutter_linux/flutter_linux.h>
#include <gtk/gtk.h>
#include <sys/utsname.h>
#include <cstring>
#define TCH_COMMON_WIDGETS_PLUGIN(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), tch_common_widgets_plugin_get_type(), \
TchCommonWidgetsPlugin))
struct _TchCommonWidgetsPlugin {
GObject parent_instance;
};
G_DEFINE_TYPE(TchCommonWidgetsPlugin, tch_common_widgets_plugin, g_object_get_type())
// Called when a method call is received from Flutter.
static void tch_common_widgets_plugin_handle_method_call(
TchCommonWidgetsPlugin* self,
FlMethodCall* method_call) {
g_autoptr(FlMethodResponse) response = nullptr;
const gchar* method = fl_method_call_get_name(method_call);
if (strcmp(method, "getPlatformVersion") == 0) {
struct utsname uname_data = {};
uname(&uname_data);
g_autofree gchar *version = g_strdup_printf("Linux %s", uname_data.version);
g_autoptr(FlValue) result = fl_value_new_string(version);
response = FL_METHOD_RESPONSE(fl_method_success_response_new(result));
} else {
response = FL_METHOD_RESPONSE(fl_method_not_implemented_response_new());
}
fl_method_call_respond(method_call, response, nullptr);
}
static void tch_common_widgets_plugin_dispose(GObject* object) {
G_OBJECT_CLASS(tch_common_widgets_plugin_parent_class)->dispose(object);
}
static void tch_common_widgets_plugin_class_init(TchCommonWidgetsPluginClass* klass) {
G_OBJECT_CLASS(klass)->dispose = tch_common_widgets_plugin_dispose;
}
static void tch_common_widgets_plugin_init(TchCommonWidgetsPlugin* self) {}
static void method_call_cb(FlMethodChannel* channel, FlMethodCall* method_call,
gpointer user_data) {
TchCommonWidgetsPlugin* plugin = TCH_COMMON_WIDGETS_PLUGIN(user_data);
tch_common_widgets_plugin_handle_method_call(plugin, method_call);
}
void tch_common_widgets_plugin_register_with_registrar(FlPluginRegistrar* registrar) {
TchCommonWidgetsPlugin* plugin = TCH_COMMON_WIDGETS_PLUGIN(
g_object_new(tch_common_widgets_plugin_get_type(), nullptr));
g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
g_autoptr(FlMethodChannel) channel =
fl_method_channel_new(fl_plugin_registrar_get_messenger(registrar),
"tch_common_widgets",
FL_METHOD_CODEC(codec));
fl_method_channel_set_method_call_handler(channel, method_call_cb,
g_object_ref(plugin),
g_object_unref);
g_object_unref(plugin);
}
| 37.535211 | 86 | 0.75197 |
3f134aa5421e484b68023bceb8870003b3d9790d | 568 | cpp | C++ | references/zeoslib/packages/cbuilder6/ZTestPerformance.cpp | athiffau/alcinoe | 4e59270f6a9258beed02676c698829e83e636b51 | [
"Apache-2.0"
] | 851 | 2018-02-05T09:54:56.000Z | 2022-03-24T23:13:10.000Z | references/zeoslib/packages/cbuilder6/ZTestPerformance.cpp | azrael11/alcinoe | 98e92421321ef5df4be876f8d818dbfdfdca6757 | [
"Apache-2.0"
] | 200 | 2018-02-06T18:52:39.000Z | 2022-03-24T19:59:14.000Z | references/zeoslib/packages/cbuilder6/ZTestPerformance.cpp | azrael11/alcinoe | 98e92421321ef5df4be876f8d818dbfdfdca6757 | [
"Apache-2.0"
] | 197 | 2018-03-20T20:49:55.000Z | 2022-03-21T17:38:14.000Z | //---------------------------------------------------------------------------
#include <vcl.h>
#include <TextTestRunner.hpp>
#include <ZPerformanceTestCase.hpp>
#pragma hdrstop
//---------------------------------------------------------------------------
#pragma argsused
int main(int argc, char* argv[])
{
Texttestrunner::RunRegisteredTests(rxbContinue);
PerformanceResultProcessor->ProcessResults();
PerformanceResultProcessor->PrintResults();
return 0;
}
//---------------------------------------------------------------------------
| 28.4 | 78 | 0.426056 |
3f184503a333acb1e5d6fb22f8b0b6f53a10a2d7 | 7,738 | cpp | C++ | Gazer/Gazer.cpp | emoacht/DiskGazer | 6d3ee83ef23a638ffafdb413687b264c6a161343 | [
"BSD-2-Clause",
"MIT"
] | 5 | 2015-03-10T12:49:56.000Z | 2019-12-18T20:26:44.000Z | Gazer/Gazer.cpp | emoacht/DiskGazer | 6d3ee83ef23a638ffafdb413687b264c6a161343 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | Gazer/Gazer.cpp | emoacht/DiskGazer | 6d3ee83ef23a638ffafdb413687b264c6a161343 | [
"BSD-2-Clause",
"MIT"
] | 4 | 2018-01-17T02:13:10.000Z | 2020-04-28T19:13:15.000Z | // Entry point of console application
#include "stdafx.h"
#include <windows.h>
#include <tchar.h>
#include <iostream>
#include <string>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int physicalDrive = 0; // Index number in PhysicalDrive
int blockSize = 1024; // Block size (KiB)
int blockOffset = 0; // Block offset (KiB)
int areaSize = 1024; // Area size (MiB)
int areaLocation = 0; // Area location (MiB)
int areaRatioInner = 16; // Area ratio inner (numerator)
int areaRatioOuter = 16; // Area ratio outer (denominator)
// ----------------
// Check arguments.
// ----------------
switch (argc) // argv[0] is always empty.
{
case 2:
if (_tcscmp(argv[1], _T("/?")) == 0)
{
cout << "Gazer syntax:" << endl;
cout << "gazer [physical drive] [block size] [block offset] [area size] [area location]" << endl;
cout << "- Unit of block size and block offset is KiB." << endl;
cout << "- Unit of area size and area location is MiB." << endl;
cout << "- Block size must be a power of 2 and no more than 1024." << endl;
cout << "- Block offset must be no more than 1024." << endl;
cout << "- Gazer requires administrator privilege." << endl;
}
return 0;
break;
case 6:
physicalDrive = _tcstol(argv[1], NULL, 10);
blockSize = _tcstol(argv[2], NULL, 10);
blockOffset = _tcstol(argv[3], NULL, 10);
areaSize = _tcstol(argv[4], NULL, 10);
areaLocation = _tcstol(argv[5], NULL, 10);
cout << "physical drive : " << physicalDrive << endl;
cout << "block size : " << blockSize << endl;
cout << "block offset : " << blockOffset << endl;
cout << "area size : " << areaSize << endl;
cout << "area location : " << areaLocation << endl;
break;
case 8:
physicalDrive = _tcstol(argv[1], NULL, 10);
blockSize = _tcstol(argv[2], NULL, 10);
blockOffset = _tcstol(argv[3], NULL, 10);
areaSize = _tcstol(argv[4], NULL, 10);
areaLocation = _tcstol(argv[5], NULL, 10);
areaRatioInner = _tcstol(argv[6], NULL, 10);
areaRatioOuter = _tcstol(argv[7], NULL, 10);
cout << "physical drive : " << physicalDrive << endl;
cout << "block size : " << blockSize << endl;
cout << "block offset : " << blockOffset << endl;
cout << "area size : " << areaSize << endl;
cout << "area location : " << areaLocation << endl;
cout << "area ratio inner : " << areaRatioInner << endl;
cout << "area ratio outer : " << areaRatioOuter << endl;
break;
}
string message = "";
// Check physical drive.
if (physicalDrive < 0)
{
message += "Invalid physical drive. ";
}
// Check block size.
if ((blockSize <= 0) |
(1024 < blockSize) |
(1024 % blockSize != 0))
{
message += "Invalid block size. ";
}
// Check block offset.
if ((blockOffset < 0) |
(1024 < blockOffset))
{
message += "Invalid block offset. ";
}
// Check area size.
if (areaSize <= 0)
{
message += "Invalid area size. ";
}
// Check area location.
if (areaLocation < 0)
{
message += "Invalid area location. ";
}
// Check area ratio.
if ((areaRatioInner < 0) || (areaRatioOuter < 0) || (areaRatioInner > areaRatioOuter))
{
message += "Invalid area ratio. ";
}
if (!message.empty())
{
cout << message << endl;
return 1;
}
// ----------
// Read disk.
// ----------
// This section is based on sequential read test of CrystalDiskMark (3.0.2)
// created by hiyohiyo (http://crystalmark.info/).
// Get handle to disk.
TCHAR physicalDrivePath[32];
_stprintf_s(physicalDrivePath, _T("\\\\.\\PhysicalDrive%d"), physicalDrive);
HANDLE hFile = ::CreateFile(
physicalDrivePath,
GENERIC_READ, // Administrative privilege is required.
0,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING | FILE_FLAG_SEQUENTIAL_SCAN,
NULL);
if (hFile == INVALID_HANDLE_VALUE)
{
_tprintf_s(_T("Failed to get handle to disk (Code: %d)."), ::GetLastError());
return 1;
}
// Prepare parameters.
int areaSizeActual = areaSize; // Area size for actual reading
if (0 < blockOffset)
{
areaSizeActual -= 1; // 1 is for the last MiB of area. If offset, it may exceed disk size.
}
long readNum = (areaSizeActual * 1024) / blockSize; // The number of reads
int loopOuter = 1; // The number of outer loops
int loopInner = readNum; // The number of inner loops
if (areaRatioInner < areaRatioOuter)
{
loopOuter = (areaSizeActual * 1024) / (blockSize * areaRatioOuter);
loopInner = areaRatioInner;
readNum = loopInner * loopOuter;
}
LARGE_INTEGER areaLocationBytes; // Bytes
areaLocationBytes.QuadPart = areaLocation;
areaLocationBytes.QuadPart *= 1024;
areaLocationBytes.QuadPart *= 1024;
LARGE_INTEGER blockOffsetBytes; // Bytes
blockOffsetBytes.QuadPart = blockOffset;
blockOffsetBytes.QuadPart *= 1024;
LARGE_INTEGER jumpBytes; // Bytes
jumpBytes.QuadPart = blockSize;
jumpBytes.QuadPart *= areaRatioOuter;
jumpBytes.QuadPart *= 1024;
areaLocationBytes.QuadPart += blockOffsetBytes.QuadPart;
int bufSize = blockSize * 1024; // Buffer size (Bytes)
char* buf = (char*) VirtualAlloc(NULL, bufSize, MEM_COMMIT, PAGE_READWRITE); // Buffer
DWORD readSize;
// Check high-resolution performance counter.
LARGE_INTEGER frq;
if (!QueryPerformanceFrequency(&frq))
{
_tprintf_s(_T("Can not use high-resolution performance counter."));
return 1;
}
LARGE_INTEGER* lapTime;
lapTime = new LARGE_INTEGER[readNum + 1]; // 1 is for starting time.
QueryPerformanceCounter(&lapTime[0]); // Starting time
for (int i = 0; i < loopOuter; i++)
{
if (0 < i)
{
areaLocationBytes.QuadPart += jumpBytes.QuadPart;
}
// Move pointer.
BOOL result1 = ::SetFilePointerEx(
hFile,
areaLocationBytes,
NULL,
FILE_BEGIN);
if (result1 == false)
{
_tprintf_s(_T("Failed to move pointer (Code: %d)."), ::GetLastError());
return 1;
}
// Measure disk transfer rate (sequential read).
for (int j = 1; j <= loopInner; j++)
{
BOOL result2 = ::ReadFile(
hFile,
buf,
bufSize,
&readSize,
NULL);
if (result2 == false)
{
_tprintf_s(_T("Failed to measure disk transfer rate (Code: %d)."), ::GetLastError());
return 1;
}
QueryPerformanceCounter(&lapTime[i * loopInner + j]);
}
}
VirtualFree(buf, bufSize, MEM_DECOMMIT);
buf = NULL;
CloseHandle(hFile);
// ----------------
// Process results.
// ----------------
// Calculate each transfer rate.
double* data;
data = new double[readNum];
for (int i = 1; i <= readNum; i++)
{
double timeEach = (double)(lapTime[i].QuadPart - lapTime[i - 1].QuadPart) / frq.QuadPart; // Second
double scoreEach = floor(bufSize / timeEach) / 1000000.0; // MB/s
data[i - 1] = scoreEach;
}
// Calculate total transfer rate (just for reference).
double totalTime = (double)(lapTime[readNum].QuadPart - lapTime[0].QuadPart) / frq.QuadPart; // Second
double totalRead = (double)blockSize * (double)readNum * 1024.0; // Bytes
double totalScore = floor(totalRead / totalTime) / 1000000.0; // MB/s
delete[] lapTime;
lapTime = NULL;
// Show outcome.
_tprintf_s(_T("[Start data]\n"));
int k = 0;
for (int i = 0; i < readNum; i++)
{
_tprintf_s(_T("%0.6f "), data[i]); // Data have 6 decimal places.
k++;
if ((k == 6) |
(i == readNum - 1))
{
k = 0;
_tprintf_s(_T("\n"));
}
}
_tprintf_s(_T("[End data]\n"));
_tprintf_s(_T("Total %0.6f MB/s"), totalScore);
delete[] data;
data = NULL;
return 0;
} | 26.591065 | 104 | 0.609331 |
3f1ab60a81464b8c1978ae75ddbec6c47fb91e20 | 557 | cpp | C++ | exam2/passFunction.cpp | WeiChienHsu/CS165 | 65e95efc90415c8acc707e2d544eb384d3982e18 | [
"MIT"
] | 1 | 2019-01-06T22:36:01.000Z | 2019-01-06T22:36:01.000Z | exam2/passFunction.cpp | WeiChienHsu/CS165 | 65e95efc90415c8acc707e2d544eb384d3982e18 | [
"MIT"
] | null | null | null | exam2/passFunction.cpp | WeiChienHsu/CS165 | 65e95efc90415c8acc707e2d544eb384d3982e18 | [
"MIT"
] | null | null | null | #include <iostream>
int compare(int a, int b) {
if(a > b) return -1;
else return 1;
}
void bubbleSort(int *arr, int size, int (*compare)(int, int)) {
for(int i = 0; i < size; i++) {
for(int j = 0; j < size - 1; j++) {
if(compare(arr[j], arr[j+1]) > 0) {
int temp = arr[j];
arr[j] = arr[j+1];
arr[j+1] = temp;
}
}
}
}
int main() {
const int SIZE = 5;
int arr[SIZE] = {1, 5, 3, 4, 2};
bubbleSort(arr, SIZE, compare);
for(int i = 0; i <SIZE; i++) {
std::cout << arr[i] << std::endl;
}
return 0;
} | 19.892857 | 63 | 0.490126 |
3f1f01df324be4a85eb5e2553fc4dd56bb914c35 | 40,024 | cpp | C++ | Sources/Elastos/Frameworks/Droid/Base/Core/src/elastos/droid/view/KeyEvent.cpp | jingcao80/Elastos | d0f39852356bdaf3a1234743b86364493a0441bc | [
"Apache-2.0"
] | 7 | 2017-07-13T10:34:54.000Z | 2021-04-16T05:40:35.000Z | Sources/Elastos/Frameworks/Droid/Base/Core/src/elastos/droid/view/KeyEvent.cpp | jingcao80/Elastos | d0f39852356bdaf3a1234743b86364493a0441bc | [
"Apache-2.0"
] | null | null | null | Sources/Elastos/Frameworks/Droid/Base/Core/src/elastos/droid/view/KeyEvent.cpp | jingcao80/Elastos | d0f39852356bdaf3a1234743b86364493a0441bc | [
"Apache-2.0"
] | 9 | 2017-07-13T12:33:20.000Z | 2021-06-19T02:46:48.000Z | //=========================================================================
// Copyright (C) 2012 The Elastos Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//=========================================================================
#include "Elastos.Droid.Accounts.h"
#include "Elastos.Droid.App.h"
#include "Elastos.Droid.Content.h"
#include "Elastos.Droid.Location.h"
#include "Elastos.Droid.Os.h"
#include "Elastos.Droid.Text.h"
#include "Elastos.Droid.Widget.h"
#include "elastos/droid/view/KeyEvent.h"
#include "elastos/droid/view/CKeyEvent.h"
#include "elastos/droid/view/KeyCharacterMap.h"
#include "elastos/droid/utility/CSparseInt32Array.h"
#include <input/Input.h>
#include <elastos/core/StringBuilder.h>
#include <elastos/utility/logging/Logger.h>
#include <elastos/core/StringUtils.h>
#include <elastos/core/AutoLock.h>
using Elastos::Core::AutoLock;
using Elastos::Droid::Text::Method::IMetaKeyKeyListener;
using Elastos::Droid::Utility::CSparseInt32Array;
using Elastos::Core::StringUtils;
using Elastos::Core::StringBuilder;
using Elastos::Utility::Logging::Logger;
namespace Elastos {
namespace Droid {
namespace View {
const Boolean KeyEvent::DEBUG = FALSE;
const String KeyEvent::TAG("KeyEvent");
const Int32 KeyEvent::LAST_KEYCODE = IKeyEvent::KEYCODE_HELP;
const String KeyEvent::META_SYMBOLIC_NAMES[] = {
String("META_SHIFT_ON"),
String("META_ALT_ON"),
String("META_SYM_ON"),
String("META_FUNCTION_ON"),
String("META_ALT_LEFT_ON"),
String("META_ALT_RIGHT_ON"),
String("META_SHIFT_LEFT_ON"),
String("META_SHIFT_RIGHT_ON"),
String("META_CAP_LOCKED"),
String("META_ALT_LOCKED"),
String("META_SYM_LOCKED"),
String("0x00000800"),
String("META_CTRL_ON"),
String("META_CTRL_LEFT_ON"),
String("META_CTRL_RIGHT_ON"),
String("0x00008000"),
String("META_META_ON"),
String("META_META_LEFT_ON"),
String("META_META_RIGHT_ON"),
String("0x00080000"),
String("META_CAPS_LOCK_ON"),
String("META_NUM_LOCK_ON"),
String("META_SCROLL_LOCK_ON"),
String("0x00800000"),
String("0x01000000"),
String("0x02000000"),
String("0x04000000"),
String("0x08000000"),
String("0x10000000"),
String("0x20000000"),
String("0x40000000"),
String("0x80000000"),
};
const String KeyEvent::LABEL_PREFIX("KEYCODE_");
const Int32 KeyEvent::META_MODIFIER_MASK =
META_SHIFT_ON | META_SHIFT_LEFT_ON | META_SHIFT_RIGHT_ON
| META_ALT_ON | META_ALT_LEFT_ON | META_ALT_RIGHT_ON
| META_CTRL_ON | META_CTRL_LEFT_ON | META_CTRL_RIGHT_ON
| META_META_ON | META_META_LEFT_ON | META_META_RIGHT_ON
| META_SYM_ON | META_FUNCTION_ON;
const Int32 KeyEvent::META_LOCK_MASK =
META_CAPS_LOCK_ON | META_NUM_LOCK_ON | META_SCROLL_LOCK_ON;
const Int32 KeyEvent::META_ALL_MASK = META_MODIFIER_MASK | META_LOCK_MASK;
const Int32 KeyEvent::META_SYNTHETIC_MASK =
META_CAP_LOCKED | META_ALT_LOCKED | META_SYM_LOCKED | META_SELECTING;
const Int32 KeyEvent::META_INVALID_MODIFIER_MASK = META_LOCK_MASK | META_SYNTHETIC_MASK;
const Int32 KeyEvent::MAX_RECYCLED = 10;
Object KeyEvent::gRecyclerLock;
Int32 KeyEvent::gRecyclerUsed;
AutoPtr<IKeyEvent> KeyEvent::gRecyclerTop;
/* KeyEvent::DispatcherState */
CAR_INTERFACE_IMPL(KeyEvent::DispatcherState, Object, IDispatcherState);
KeyEvent::DispatcherState::DispatcherState()
: mDownKeyCode(0)
{
CSparseInt32Array::New((ISparseInt32Array**)&mActiveLongPresses);
}
KeyEvent::DispatcherState::~DispatcherState()
{
}
ECode KeyEvent::DispatcherState::constructor()
{
return NOERROR;
}
ECode KeyEvent::DispatcherState::Reset()
{
if (DEBUG)
Logger::D(KeyEvent::TAG, "Reset: %p", this);
mDownKeyCode = 0;
mDownTarget = NULL;
mActiveLongPresses->Clear();
return NOERROR;
}
ECode KeyEvent::DispatcherState::Reset(
/* [in] */ IInterface* target)
{
if (mDownTarget.Get() == target) {
if (DEBUG)
Logger::D(TAG, "Reset in %p, %p", target, this);
mDownKeyCode = 0;
mDownTarget = NULL;
}
return NOERROR;
}
ECode KeyEvent::DispatcherState::StartTracking(
/* [in] */ IKeyEvent* event,
/* [in] */ IInterface* target)
{
Int32 action;
event->GetAction(&action);
if (action != IKeyEvent::ACTION_DOWN) {
Logger::E(
KeyEvent::TAG, "Can only start tracking on a down event");
return E_ILLEGAL_ARGUMENT_EXCEPTION;
}
if (DEBUG)
Logger::D(KeyEvent::TAG, "Start trackingt in %p : %p", target, this);
event->GetKeyCode(&mDownKeyCode);
mDownTarget = target;
return NOERROR;
}
ECode KeyEvent::DispatcherState::IsTracking(
/* [in] */ IKeyEvent* event,
/* [out] */ Boolean* isTracking)
{
if (isTracking == NULL) {
return E_INVALID_ARGUMENT;
}
assert(event);
Int32 keyCode;
event->GetKeyCode(&keyCode);
*isTracking = mDownKeyCode == keyCode;
return NOERROR;
}
ECode KeyEvent::DispatcherState::PerformedLongPress(
/* [in] */ IKeyEvent* event)
{
assert(event);
Int32 keyCode;
event->GetKeyCode(&keyCode);
mActiveLongPresses->Put(keyCode, 1);
return NOERROR;
}
ECode KeyEvent::DispatcherState::HandleUpEvent(
/* [in] */ IKeyEvent* event)
{
Int32 keyCode;
event->GetKeyCode(&keyCode);
if (KeyEvent::DEBUG) {
Logger::V(KeyEvent::TAG, "Handle key up :%p", event);
}
Int32 index;
mActiveLongPresses->IndexOfKey(keyCode, &index);
if (index >= 0) {
if (KeyEvent::DEBUG) {
Logger::V(KeyEvent::TAG, " Index: %d ", index);
}
((KeyEvent*)event)->mFlags |=
IKeyEvent::FLAG_CANCELED | IKeyEvent::FLAG_CANCELED_LONG_PRESS;
mActiveLongPresses->RemoveAt(index);
}
if (mDownKeyCode == keyCode) {
if (KeyEvent::DEBUG) {
Logger::V(KeyEvent::TAG, " Tracking!");
}
((KeyEvent*)event)->mFlags |= IKeyEvent::FLAG_TRACKING;
mDownKeyCode = 0;
mDownTarget = NULL;
}
return NOERROR;
}
/* KeyEvent */
CAR_INTERFACE_IMPL(KeyEvent, InputEvent, IKeyEvent);
KeyEvent::KeyEvent()
: mDeviceId(0)
, mSource(0)
, mMetaState(0)
, mAction(0)
, mKeyCode(0)
, mScanCode(0)
, mRepeatCount(0)
, mFlags(0)
, mDownTime(0ll)
, mEventTime(0ll)
, mCharacters(NULL)
{}
KeyEvent::~KeyEvent()
{}
ECode KeyEvent::constructor()
{
return NOERROR;
}
ECode KeyEvent::constructor(
/* [in] */ Int32 action,
/* [in] */ Int32 code)
{
mAction = action;
mKeyCode = code;
mRepeatCount = 0;
mDeviceId = IKeyCharacterMap::VIRTUAL_KEYBOARD;
return NOERROR;
}
ECode KeyEvent::constructor(
/* [in] */ Int64 downTime,
/* [in] */ Int64 eventTime,
/* [in] */ Int32 action,
/* [in] */ Int32 code,
/* [in] */ Int32 repeat)
{
mDownTime = downTime;
mEventTime = eventTime;
mAction = action;
mKeyCode = code;
mRepeatCount = repeat;
mDeviceId = IKeyCharacterMap::VIRTUAL_KEYBOARD;
return NOERROR;
}
ECode KeyEvent::constructor(
/* [in] */ Int64 downTime,
/* [in] */ Int64 eventTime,
/* [in] */ Int32 action,
/* [in] */ Int32 code,
/* [in] */ Int32 repeat,
/* [in] */ Int32 metaState)
{
mDownTime = downTime;
mEventTime = eventTime;
mAction = action;
mKeyCode = code;
mRepeatCount = repeat;
mMetaState = metaState;
mDeviceId = IKeyCharacterMap::VIRTUAL_KEYBOARD;
return NOERROR;
}
ECode KeyEvent::constructor(
/* [in] */ Int64 downTime,
/* [in] */ Int64 eventTime,
/* [in] */ Int32 action,
/* [in] */ Int32 code,
/* [in] */ Int32 repeat,
/* [in] */ Int32 metaState,
/* [in] */ Int32 deviceId,
/* [in] */ Int32 scancode)
{
mDownTime = downTime;
mEventTime = eventTime;
mAction = action;
mKeyCode = code;
mRepeatCount = repeat;
mMetaState = metaState;
mDeviceId = deviceId;
mScanCode = scancode;
return NOERROR;
}
ECode KeyEvent::constructor(
/* [in] */ Int64 downTime,
/* [in] */ Int64 eventTime,
/* [in] */ Int32 action,
/* [in] */ Int32 code,
/* [in] */ Int32 repeat,
/* [in] */ Int32 metaState,
/* [in] */ Int32 deviceId,
/* [in] */ Int32 scancode,
/* [in] */ Int32 flags)
{
mDownTime = downTime;
mEventTime = eventTime;
mAction = action;
mKeyCode = code;
mRepeatCount = repeat;
mMetaState = metaState;
mDeviceId = deviceId;
mScanCode = scancode;
mFlags = flags;
return NOERROR;
}
ECode KeyEvent::constructor(
/* [in] */ Int64 downTime,
/* [in] */ Int64 eventTime,
/* [in] */ Int32 action,
/* [in] */ Int32 code,
/* [in] */ Int32 repeat,
/* [in] */ Int32 metaState,
/* [in] */ Int32 deviceId,
/* [in] */ Int32 scancode,
/* [in] */ Int32 flags,
/* [in] */ Int32 source)
{
mDownTime = downTime;
mEventTime = eventTime;
mAction = action;
mKeyCode = code;
mRepeatCount = repeat;
mMetaState = metaState;
mDeviceId = deviceId;
mScanCode = scancode;
mFlags = flags;
mSource = source;
return NOERROR;
}
ECode KeyEvent::constructor(
/* [in] */ Int64 time,
/* [in] */ const String& characters,
/* [in] */ Int32 deviceId,
/* [in] */ Int32 flags)
{
mDownTime = time;
mEventTime = time;
mCharacters = characters;
mAction = ACTION_MULTIPLE;
mKeyCode = KEYCODE_UNKNOWN;
mRepeatCount = 0;
mDeviceId = deviceId;
mFlags = flags;
mSource = IInputDevice::SOURCE_KEYBOARD;
return NOERROR;
}
ECode KeyEvent::constructor(
/* [in] */ IKeyEvent* origEvent)
{
if (origEvent == NULL) {
return E_INVALID_ARGUMENT;
}
AutoPtr<KeyEvent> event = (KeyEvent*)origEvent;
mDownTime = event->mDownTime;
mEventTime = event->mEventTime;
mAction = event->mAction;
mKeyCode = event->mKeyCode;
mRepeatCount = event->mRepeatCount;
mMetaState = event->mMetaState;
mDeviceId = event->mDeviceId;
mSource = event->mSource;
mScanCode = event->mScanCode;
mFlags = event->mFlags;
mCharacters = event->mCharacters;
return NOERROR;
}
ECode KeyEvent::constructor(
/* [in] */ IKeyEvent* origEvent,
/* [in] */ Int64 eventTime,
/* [in] */ Int32 newRepeat)
{
if (origEvent == NULL) {
return E_INVALID_ARGUMENT;
}
AutoPtr<KeyEvent> event = (KeyEvent*)origEvent;
mDownTime = event->mDownTime;
mEventTime = eventTime;
mAction = event->mAction;
mKeyCode = event->mKeyCode;
mRepeatCount = newRepeat;
mMetaState = event->mMetaState;
mDeviceId = event->mDeviceId;
mSource = event->mSource;
mScanCode = event->mScanCode;
mFlags = event->mFlags;
mCharacters = event->mCharacters;
return NOERROR;
}
ECode KeyEvent::constructor(
/* [in] */ IKeyEvent* origEvent,
/* [in] */ Int32 action)
{
if (origEvent == NULL) {
return E_INVALID_ARGUMENT;
}
AutoPtr<KeyEvent> event = (KeyEvent*)origEvent;
mDownTime = event->mDownTime;
mEventTime = event->mEventTime;
mAction = action;
mKeyCode = event->mKeyCode;
mRepeatCount = event->mRepeatCount;
mMetaState = event->mMetaState;
mDeviceId = event->mDeviceId;
mSource = event->mSource;
mScanCode = event->mScanCode;
mFlags = event->mFlags;
// Don't copy mCharacters, since one way or the other we'll lose it
// when changing the action.
return NOERROR;
}
AutoPtr<IKeyEvent> KeyEvent::Obtain()
{
AutoPtr<IKeyEvent> ev;
{ AutoLock syncLock(gRecyclerLock);
ev = gRecyclerTop;
if (ev == NULL) {
CKeyEvent::New((IKeyEvent**)&ev);
return ev;
}
AutoPtr<KeyEvent> _event = (KeyEvent*)ev.Get();
gRecyclerTop = _event->mNext;
gRecyclerUsed -= 1;
}
AutoPtr<KeyEvent> _event = (KeyEvent*)ev.Get();
_event->mNext = NULL;
_event->PrepareForReuse();
return ev;
}
Int32 KeyEvent::GetMaxKeyCode()
{
return LAST_KEYCODE;
}
Int32 KeyEvent::GetDeadChar(
/* [in] */ Int32 accent,
/* [in] */ Int32 c)
{
return KeyCharacterMap::GetDeadChar(accent, c);
}
AutoPtr<IKeyEvent> KeyEvent::Obtain(
/* [in] */ Int64 downTime,
/* [in] */ Int64 eventTime,
/* [in] */ Int32 action,
/* [in] */ Int32 code,
/* [in] */ Int32 repeat,
/* [in] */ Int32 metaState,
/* [in] */ Int32 deviceId,
/* [in] */ Int32 scancode,
/* [in] */ Int32 flags,
/* [in] */ Int32 source,
/* [in] */ const String& characters)
{
AutoPtr<IKeyEvent> ev = Obtain();
AutoPtr<KeyEvent> _ev = (KeyEvent*)ev.Get();
_ev->mDownTime = downTime;
_ev->mEventTime = eventTime;
_ev->mAction = action;
_ev->mKeyCode = code;
_ev->mRepeatCount = repeat;
_ev->mMetaState = metaState;
_ev->mDeviceId = deviceId;
_ev->mScanCode = scancode;
_ev->mFlags = flags;
_ev->mSource = source;
_ev->mCharacters = characters;
return ev;
}
AutoPtr<IKeyEvent> KeyEvent::Obtain(
/* [in] */ IKeyEvent* otherEvent)
{
AutoPtr<KeyEvent> other = (KeyEvent*)otherEvent;
AutoPtr<IKeyEvent> ev = Obtain();
AutoPtr<KeyEvent> _ev = (KeyEvent*)ev.Get();
_ev->mDownTime = other->mDownTime;
_ev->mEventTime = other->mEventTime;
_ev->mAction = other->mAction;
_ev->mKeyCode = other->mKeyCode;
_ev->mRepeatCount = other->mRepeatCount;
_ev->mMetaState = other->mMetaState;
_ev->mDeviceId = other->mDeviceId;
_ev->mScanCode = other->mScanCode;
_ev->mFlags = other->mFlags;
_ev->mSource = other->mSource;
_ev->mCharacters = other->mCharacters;
return ev;
}
ECode KeyEvent::Copy(
/* [out] */ IInputEvent** event)
{
VALIDATE_NOT_NULL(event);
AutoPtr<IInputEvent> temp = IInputEvent::Probe(Obtain(this));
*event = temp;
REFCOUNT_ADD(*event);
return NOERROR;
}
ECode KeyEvent::Recycle()
{
InputEvent::Recycle();
mCharacters = NULL;
{ AutoLock syncLock(gRecyclerLock);
if (gRecyclerUsed < MAX_RECYCLED) {
gRecyclerUsed++;
mNext = gRecyclerTop;
gRecyclerTop = this;
}
}
return NOERROR;
}
ECode KeyEvent::RecycleIfNeededAfterDispatch()
{
// Do nothing.
return NOERROR;
}
ECode KeyEvent::ChangeTimeRepeat(
/* [in] */ IKeyEvent* event,
/* [in] */ Int64 eventTime,
/* [in] */ Int32 newRepeat,
/* [out] */ IKeyEvent** newEvent)
{
VALIDATE_NOT_NULL(newEvent);
return CKeyEvent::New(event, eventTime, newRepeat, newEvent);
}
ECode KeyEvent::ChangeTimeRepeat(
/* [in] */ IKeyEvent* event,
/* [in] */ Int64 eventTime,
/* [in] */ Int32 newRepeat,
/* [in] */ Int32 newFlags,
/* [out] */ IKeyEvent** newEvent)
{
VALIDATE_NOT_NULL(newEvent);
AutoPtr<IKeyEvent> ret;
ECode ec = CKeyEvent::New(event, eventTime, newRepeat, (IKeyEvent**)&ret);
if (FAILED(ec)) {
return ec;
}
AutoPtr<KeyEvent> _ret = (KeyEvent*)ret.Get();
_ret->mEventTime = eventTime;
_ret->mRepeatCount = newRepeat;
_ret->mFlags = newFlags;
*newEvent = ret;
REFCOUNT_ADD(*newEvent);
return NOERROR;
}
ECode KeyEvent::ChangeAction(
/* [in] */ IKeyEvent* event,
/* [in] */ Int32 action,
/* [out] */ IKeyEvent** newEvent)
{
VALIDATE_NOT_NULL(newEvent);
return CKeyEvent::New(event, action, newEvent);
}
ECode KeyEvent::ChangeFlags(
/* [in] */ IKeyEvent* event,
/* [in] */ Int32 flags,
/* [out] */ IKeyEvent** newEvent)
{
VALIDATE_NOT_NULL(newEvent);
ECode ec = CKeyEvent::New(event, newEvent);
if (FAILED(ec)) {
return ec;
}
((KeyEvent*)*newEvent)->mFlags = flags;
return NOERROR;
}
ECode KeyEvent::IsTainted(
/* [out] */ Boolean* isTainted)
{
VALIDATE_NOT_NULL(isTainted);
*isTainted = (mFlags & FLAG_TAINTED) != 0;
return NOERROR;
}
ECode KeyEvent::SetTainted(
/* [in] */ Boolean tainted)
{
mFlags = tainted ? mFlags | FLAG_TAINTED : mFlags & ~FLAG_TAINTED;
return NOERROR;
}
ECode KeyEvent::IsDown(
/* [out] */ Boolean* isDown)
{
VALIDATE_NOT_NULL(isDown);
*isDown = (mAction == ACTION_DOWN);
return NOERROR;
}
ECode KeyEvent::IsSystem(
/* [out] */ Boolean* isSystem)
{
VALIDATE_NOT_NULL(isSystem);
*isSystem = IsSystemKey(mKeyCode);
return NOERROR;
}
ECode KeyEvent::IsWakeKey(
/* [out] */ Boolean* wakeKey)
{
VALIDATE_NOT_NULL(wakeKey);
*wakeKey = IsWakeKey(mKeyCode);
return NOERROR;
}
Boolean KeyEvent::IsGamepadButton(
/* [in] */ Int32 keyCode)
{
switch (keyCode) {
case IKeyEvent::KEYCODE_BUTTON_A:
case IKeyEvent::KEYCODE_BUTTON_B:
case IKeyEvent::KEYCODE_BUTTON_C:
case IKeyEvent::KEYCODE_BUTTON_X:
case IKeyEvent::KEYCODE_BUTTON_Y:
case IKeyEvent::KEYCODE_BUTTON_Z:
case IKeyEvent::KEYCODE_BUTTON_L1:
case IKeyEvent::KEYCODE_BUTTON_R1:
case IKeyEvent::KEYCODE_BUTTON_L2:
case IKeyEvent::KEYCODE_BUTTON_R2:
case IKeyEvent::KEYCODE_BUTTON_THUMBL:
case IKeyEvent::KEYCODE_BUTTON_THUMBR:
case IKeyEvent::KEYCODE_BUTTON_START:
case IKeyEvent::KEYCODE_BUTTON_SELECT:
case IKeyEvent::KEYCODE_BUTTON_MODE:
case IKeyEvent::KEYCODE_BUTTON_1:
case IKeyEvent::KEYCODE_BUTTON_2:
case IKeyEvent::KEYCODE_BUTTON_3:
case IKeyEvent::KEYCODE_BUTTON_4:
case IKeyEvent::KEYCODE_BUTTON_5:
case IKeyEvent::KEYCODE_BUTTON_6:
case IKeyEvent::KEYCODE_BUTTON_7:
case IKeyEvent::KEYCODE_BUTTON_8:
case IKeyEvent::KEYCODE_BUTTON_9:
case IKeyEvent::KEYCODE_BUTTON_10:
case IKeyEvent::KEYCODE_BUTTON_11:
case IKeyEvent::KEYCODE_BUTTON_12:
case IKeyEvent::KEYCODE_BUTTON_13:
case IKeyEvent::KEYCODE_BUTTON_14:
case IKeyEvent::KEYCODE_BUTTON_15:
case IKeyEvent::KEYCODE_BUTTON_16:
return TRUE;
default:
return FALSE;
}
}
Boolean KeyEvent::IsConfirmKey(
/* [in] */ Int32 keyCode)
{
switch (keyCode) {
case IKeyEvent::KEYCODE_DPAD_CENTER:
case IKeyEvent::KEYCODE_ENTER:
return TRUE;
default:
return FALSE;
}
}
Boolean KeyEvent::IsMediaKey(
/* [in] */ Int32 keyCode)
{
switch (keyCode) {
case IKeyEvent::KEYCODE_MEDIA_PLAY:
case IKeyEvent::KEYCODE_MEDIA_PAUSE:
case IKeyEvent::KEYCODE_MEDIA_PLAY_PAUSE:
case IKeyEvent::KEYCODE_MUTE:
case IKeyEvent::KEYCODE_HEADSETHOOK:
case IKeyEvent::KEYCODE_MEDIA_STOP:
case IKeyEvent::KEYCODE_MEDIA_NEXT:
case IKeyEvent::KEYCODE_MEDIA_PREVIOUS:
case IKeyEvent::KEYCODE_MEDIA_REWIND:
case IKeyEvent::KEYCODE_MEDIA_RECORD:
case IKeyEvent::KEYCODE_MEDIA_FAST_FORWARD:
return TRUE;
}
return FALSE;
}
Boolean KeyEvent::IsSystemKey(
/* [in] */ Int32 keyCode)
{
switch (keyCode) {
case IKeyEvent::KEYCODE_MENU:
case IKeyEvent::KEYCODE_SOFT_RIGHT:
case IKeyEvent::KEYCODE_HOME:
case IKeyEvent::KEYCODE_BACK:
case IKeyEvent::KEYCODE_CALL:
case IKeyEvent::KEYCODE_ENDCALL:
case IKeyEvent::KEYCODE_VOLUME_UP:
case IKeyEvent::KEYCODE_VOLUME_DOWN:
case IKeyEvent::KEYCODE_VOLUME_MUTE:
case IKeyEvent::KEYCODE_MUTE:
case IKeyEvent::KEYCODE_POWER:
case IKeyEvent::KEYCODE_HEADSETHOOK:
case IKeyEvent::KEYCODE_MEDIA_PLAY:
case IKeyEvent::KEYCODE_MEDIA_PAUSE:
case IKeyEvent::KEYCODE_MEDIA_PLAY_PAUSE:
case IKeyEvent::KEYCODE_MEDIA_STOP:
case IKeyEvent::KEYCODE_MEDIA_NEXT:
case IKeyEvent::KEYCODE_MEDIA_PREVIOUS:
case IKeyEvent::KEYCODE_MEDIA_REWIND:
case IKeyEvent::KEYCODE_MEDIA_RECORD:
case IKeyEvent::KEYCODE_MEDIA_FAST_FORWARD:
case IKeyEvent::KEYCODE_CAMERA:
case IKeyEvent::KEYCODE_FOCUS:
case IKeyEvent::KEYCODE_SEARCH:
case IKeyEvent::KEYCODE_BRIGHTNESS_DOWN:
case IKeyEvent::KEYCODE_BRIGHTNESS_UP:
case IKeyEvent::KEYCODE_MEDIA_AUDIO_TRACK:
return TRUE;
}
return FALSE;
}
Boolean KeyEvent::IsWakeKey(
/* [in] */ Int32 keyCode)
{
switch (keyCode) {
case IKeyEvent::KEYCODE_BACK:
case IKeyEvent::KEYCODE_POWER:
case IKeyEvent::KEYCODE_MENU:
case IKeyEvent::KEYCODE_SLEEP:
case IKeyEvent::KEYCODE_WAKEUP:
case IKeyEvent::KEYCODE_PAIRING:
case IKeyEvent::KEYCODE_VOLUME_UP:
case IKeyEvent::KEYCODE_VOLUME_DOWN:
case IKeyEvent::KEYCODE_VOLUME_MUTE:
return TRUE;
}
return FALSE;
}
Boolean KeyEvent::IsMetaKey(
/* [in] */ Int32 keyCode)
{
return keyCode == IKeyEvent::KEYCODE_META_LEFT || keyCode == IKeyEvent::KEYCODE_META_RIGHT;
}
ECode KeyEvent::GetDeviceId(
/* [out] */ Int32* deviceId)
{
VALIDATE_NOT_NULL(deviceId);
*deviceId = mDeviceId;
return NOERROR;
}
ECode KeyEvent::GetDevice(
/* [out] */ IInputDevice** device)
{
VALIDATE_NOT_NULL(device);
return InputEvent::GetDevice(device);
}
ECode KeyEvent::GetSource(
/* [out] */ Int32* source)
{
VALIDATE_NOT_NULL(source);
*source = mSource;
return NOERROR;
}
ECode KeyEvent::SetSource(
/* [in] */ Int32 source)
{
mSource = source;
return NOERROR;
}
ECode KeyEvent::GetMetaState(
/* [out] */ Int32* metaState)
{
VALIDATE_NOT_NULL(metaState);
*metaState = mMetaState;
return NOERROR;
}
ECode KeyEvent::GetModifiers(
/* [out] */ Int32* modifiers)
{
VALIDATE_NOT_NULL(modifiers);
*modifiers = NormalizeMetaState(mMetaState) & META_MODIFIER_MASK;
return NOERROR;
}
ECode KeyEvent::GetFlags(
/* [out] */ Int32* flags)
{
VALIDATE_NOT_NULL(flags);
*flags = mFlags;
return NOERROR;
}
Int32 KeyEvent::GetModifierMetaStateMask()
{
return META_MODIFIER_MASK;
}
Boolean KeyEvent::IsModifierKey(
/* [in] */ Int32 keyCode)
{
switch (keyCode) {
case KEYCODE_SHIFT_LEFT:
case KEYCODE_SHIFT_RIGHT:
case KEYCODE_ALT_LEFT:
case KEYCODE_ALT_RIGHT:
case KEYCODE_CTRL_LEFT:
case KEYCODE_CTRL_RIGHT:
case KEYCODE_META_LEFT:
case KEYCODE_META_RIGHT:
case KEYCODE_SYM:
case KEYCODE_NUM:
case KEYCODE_FUNCTION:
return TRUE;
default:
return FALSE;
}
}
Int32 KeyEvent::NormalizeMetaState(
/* [in] */ Int32 metaState)
{
if ((metaState & (META_SHIFT_LEFT_ON | META_SHIFT_RIGHT_ON)) != 0) {
metaState |= META_SHIFT_ON;
}
if ((metaState & (META_ALT_LEFT_ON | META_ALT_RIGHT_ON)) != 0) {
metaState |= META_ALT_ON;
}
if ((metaState & (META_CTRL_LEFT_ON | META_CTRL_RIGHT_ON)) != 0) {
metaState |= META_CTRL_ON;
}
if ((metaState & (META_META_LEFT_ON | META_META_RIGHT_ON)) != 0) {
metaState |= META_META_ON;
}
if ((metaState & IMetaKeyKeyListener::META_CAP_LOCKED) != 0) {
metaState |= META_CAPS_LOCK_ON;
}
if ((metaState & IMetaKeyKeyListener::META_ALT_LOCKED) != 0) {
metaState |= META_ALT_ON;
}
if ((metaState & IMetaKeyKeyListener::META_SYM_LOCKED) != 0) {
metaState |= META_SYM_ON;
}
return metaState & META_ALL_MASK;
}
Boolean KeyEvent::MetaStateHasNoModifiers(
/* [in] */ Int32 metaState)
{
return (NormalizeMetaState(metaState) & META_MODIFIER_MASK) == 0;
}
ECode KeyEvent::MetaStateHasModifiers(
/* [in] */ Int32 metaState,
/* [in] */ Int32 modifiers,
/* [out] */ Boolean* res)
{
VALIDATE_NOT_NULL(res);
// Note: For forward compatibility, we allow the parameter to contain meta states
// that we do not recognize but we explicitly disallow meta states that
// are not valid modifiers.
if ((modifiers & META_INVALID_MODIFIER_MASK) != 0) {
Logger::E(TAG, String("modifiers must not contain ")
+ "META_CAPS_LOCK_ON, META_NUM_LOCK_ON, META_SCROLL_LOCK_ON, "
+ "META_CAP_LOCKED, META_ALT_LOCKED, META_SYM_LOCKED, "
+ "or META_SELECTING");
return E_ILLEGAL_ARGUMENT_EXCEPTION ;
}
metaState = NormalizeMetaState(metaState) & META_MODIFIER_MASK;
FAIL_RETURN(MetaStateFilterDirectionalModifiers(metaState, modifiers,
META_SHIFT_ON, META_SHIFT_LEFT_ON, META_SHIFT_RIGHT_ON, &metaState));
FAIL_RETURN(MetaStateFilterDirectionalModifiers(metaState, modifiers,
META_ALT_ON, META_ALT_LEFT_ON, META_ALT_RIGHT_ON, &metaState));
FAIL_RETURN(MetaStateFilterDirectionalModifiers(metaState, modifiers,
META_CTRL_ON, META_CTRL_LEFT_ON, META_CTRL_RIGHT_ON, &metaState));
FAIL_RETURN(MetaStateFilterDirectionalModifiers(metaState, modifiers,
META_META_ON, META_META_LEFT_ON, META_META_RIGHT_ON, &metaState));
*res = metaState == modifiers;
return NOERROR;
}
ECode KeyEvent::MetaStateFilterDirectionalModifiers(
/* [in] */ Int32 metaState,
/* [in] */ Int32 modifiers,
/* [in] */ Int32 basic,
/* [in] */ Int32 left,
/* [in] */ Int32 right,
/* [out] */ Int32* ret)
{
VALIDATE_NOT_NULL(ret);
Boolean wantBasic = (modifiers & basic) != 0;
Int32 directional = left | right;
Boolean wantLeftOrRight = (modifiers & directional) != 0;
if (wantBasic) {
if (wantLeftOrRight) {
Logger::E(TAG, String("modifiers must not contain ")
+ MetaStateToString(basic) + " combined with "
+ MetaStateToString(left) + " or " + MetaStateToString(right));
return E_ILLEGAL_ARGUMENT_EXCEPTION;
}
*ret = metaState & ~directional;
}
else if (wantLeftOrRight) {
*ret = metaState & ~basic;
}
else {
*ret = metaState;
}
return NOERROR;
}
ECode KeyEvent::HasNoModifiers(
/* [out] */ Boolean* res)
{
VALIDATE_NOT_NULL(res);
*res = MetaStateHasNoModifiers(mMetaState);
return NOERROR;
}
ECode KeyEvent::HasModifiers(
/* [in] */ Int32 modifiers,
/* [out] */ Boolean* res)
{
VALIDATE_NOT_NULL(res);
return MetaStateHasModifiers(mMetaState, modifiers, res);
}
ECode KeyEvent::IsAltPressed(
/* [out] */ Boolean* isAltPressed)
{
VALIDATE_NOT_NULL(isAltPressed);
*isAltPressed = (mMetaState & META_ALT_ON) != 0;
return NOERROR;
}
ECode KeyEvent::IsShiftPressed(
/* [out] */ Boolean* isShiftPressed)
{
VALIDATE_NOT_NULL(isShiftPressed);
*isShiftPressed = (mMetaState & META_SHIFT_ON) != 0;
return NOERROR;
}
ECode KeyEvent::IsSymPressed(
/* [out] */ Boolean* isSymPressed)
{
VALIDATE_NOT_NULL(isSymPressed);
*isSymPressed = (mMetaState & META_SYM_ON) != 0;
return NOERROR;
}
ECode KeyEvent::IsCtrlPressed(
/* [out] */ Boolean* res)
{
VALIDATE_NOT_NULL(res);
*res = (mMetaState & META_CTRL_ON) != 0;
return NOERROR;
}
ECode KeyEvent::IsMetaPressed(
/* [out] */ Boolean* res)
{
VALIDATE_NOT_NULL(res);
*res = (mMetaState & META_META_ON) != 0;
return NOERROR;
}
ECode KeyEvent::IsFunctionPressed(
/* [out] */ Boolean* res)
{
VALIDATE_NOT_NULL(res);
*res = (mMetaState & META_FUNCTION_ON) != 0;
return NOERROR;
}
ECode KeyEvent::IsCapsLockOn(
/* [out] */ Boolean* res)
{
VALIDATE_NOT_NULL(res);
*res = (mMetaState & META_CAPS_LOCK_ON) != 0;
return NOERROR;
}
ECode KeyEvent::IsNumLockOn(
/* [out] */ Boolean* res)
{
VALIDATE_NOT_NULL(res);
*res = (mMetaState & META_NUM_LOCK_ON) != 0;
return NOERROR;
}
ECode KeyEvent::IsScrollLockOn(
/* [out] */ Boolean* res)
{
VALIDATE_NOT_NULL(res);
*res = (mMetaState & META_SCROLL_LOCK_ON) != 0;
return NOERROR;
}
ECode KeyEvent::GetAction(
/* [out] */ Int32* action)
{
VALIDATE_NOT_NULL(action);
*action = mAction;
return NOERROR;
}
ECode KeyEvent::IsCanceled(
/* [out] */ Boolean* isCanceled)
{
VALIDATE_NOT_NULL(isCanceled);
*isCanceled = (mFlags&FLAG_CANCELED) != 0;
return NOERROR;
}
ECode KeyEvent::StartTracking()
{
mFlags |= FLAG_START_TRACKING;
return NOERROR;
}
ECode KeyEvent::IsTracking(
/* [out] */ Boolean* isTracking)
{
VALIDATE_NOT_NULL(isTracking);
*isTracking = (mFlags&FLAG_TRACKING) != 0;
return NOERROR;
}
ECode KeyEvent::IsLongPress(
/* [out] */ Boolean* isLongPress)
{
VALIDATE_NOT_NULL(isLongPress);
*isLongPress = (mFlags&FLAG_LONG_PRESS) != 0;
return NOERROR;
}
ECode KeyEvent::GetKeyCode(
/* [out] */ Int32* keyCode)
{
VALIDATE_NOT_NULL(keyCode);
*keyCode = mKeyCode;
return NOERROR;
}
ECode KeyEvent::GetCharacters(
/* [out] */ String* characters)
{
VALIDATE_NOT_NULL(characters);
*characters = mCharacters;
return NOERROR;
}
ECode KeyEvent::GetScanCode(
/* [out] */ Int32* scanCode)
{
VALIDATE_NOT_NULL(scanCode);
*scanCode = mScanCode;
return NOERROR;
}
ECode KeyEvent::GetRepeatCount(
/* [out] */ Int32* repeatCount)
{
VALIDATE_NOT_NULL(repeatCount);
*repeatCount = mRepeatCount;
return NOERROR;
}
ECode KeyEvent::GetDownTime(
/* [out] */ Int64* downTime)
{
VALIDATE_NOT_NULL(downTime);
*downTime = mDownTime;
return NOERROR;
}
ECode KeyEvent::GetEventTime(
/* [out] */ Int64* eventTime)
{
VALIDATE_NOT_NULL(eventTime);
*eventTime = mEventTime;
return NOERROR;
}
ECode KeyEvent::GetEventTimeNano(
/* [out] */ Int64* eventTimeNano)
{
VALIDATE_NOT_NULL(eventTimeNano);
*eventTimeNano = mEventTime * 1000000L;
return NOERROR;
}
ECode KeyEvent::GetSequenceNumber(
/* [out] */ Int32* seq)
{
VALIDATE_NOT_NULL(seq);
return InputEvent::GetSequenceNumber(seq);
}
ECode KeyEvent::GetKeyboardDevice(
/* [out] */ Int32* deviceId)
{
VALIDATE_NOT_NULL(deviceId);
*deviceId = mDeviceId;
return NOERROR;
}
ECode KeyEvent::GetKeyCharacterMap(
/* [out] */ IKeyCharacterMap** kcm)
{
return KeyCharacterMap::Load(mDeviceId, kcm);
}
ECode KeyEvent::GetDisplayLabel(
/* [out] */ Char32* displayLabel)
{
VALIDATE_NOT_NULL(displayLabel);
AutoPtr<IKeyCharacterMap> kcm;
FAIL_RETURN(GetKeyCharacterMap((IKeyCharacterMap**)&kcm));
return kcm->GetDisplayLabel(mKeyCode, displayLabel);
}
ECode KeyEvent::GetUnicodeChar(
/* [out] */ Int32* unicodeChar)
{
return GetUnicodeChar(mMetaState, unicodeChar);
}
ECode KeyEvent::GetUnicodeChar(
/* [in] */ Int32 metaState,
/* [out] */ Int32* unicodeChar)
{
VALIDATE_NOT_NULL(unicodeChar);
AutoPtr<IKeyCharacterMap> kcm;
FAIL_RETURN(GetKeyCharacterMap((IKeyCharacterMap**)&kcm));
return kcm->Get(mKeyCode, metaState, unicodeChar);
}
ECode KeyEvent::GetKeyData(
/* [in] */ IKeyData* keyData,
/* [out] */ Boolean* res)
{
VALIDATE_NOT_NULL(res);
AutoPtr<IKeyCharacterMap> kcm;
FAIL_RETURN(GetKeyCharacterMap((IKeyCharacterMap**)&kcm));
return kcm->GetKeyData(mKeyCode, keyData, res);
}
ECode KeyEvent::GetMatch(
/* [in] */ ArrayOf<Char32>* chars,
/* [out] */ Char32* match)
{
return GetMatch(chars, 0, match);
}
ECode KeyEvent::GetMatch(
/* [in] */ ArrayOf<Char32>* chars,
/* [in] */ Int32 modifiers,
/* [out] */ Char32* match)
{
VALIDATE_NOT_NULL(match);
AutoPtr<IKeyCharacterMap> kcm;
FAIL_RETURN(GetKeyCharacterMap((IKeyCharacterMap**)&kcm));
return kcm->GetMatch(mKeyCode, chars, modifiers, match);
}
ECode KeyEvent::GetNumber(
/* [out] */ Char32* ch)
{
VALIDATE_NOT_NULL(ch);
AutoPtr<IKeyCharacterMap> kcm;
FAIL_RETURN(GetKeyCharacterMap((IKeyCharacterMap**)&kcm));
return kcm->GetNumber(mKeyCode, ch);
}
ECode KeyEvent::IsPrintingKey(
/* [out] */ Boolean* res)
{
VALIDATE_NOT_NULL(res);
AutoPtr<IKeyCharacterMap> kcm;
FAIL_RETURN(GetKeyCharacterMap((IKeyCharacterMap**)&kcm));
return kcm->IsPrintingKey(mKeyCode, res);
}
ECode KeyEvent::Dispatch(
/* [in] */ IKeyEventCallback* receiver,
/* [out] */ Boolean* res)
{
return Dispatch(receiver, NULL, NULL, res);
}
ECode KeyEvent::Dispatch(
/* [in] */ IKeyEventCallback* receiver,
/* [in] */ IDispatcherState* state,
/* [in] */ IInterface* target,
/* [out] */ Boolean* result)
{
VALIDATE_NOT_NULL(result);
if (DEBUG) {
Logger::D(TAG, "Key down to %p in %p, mAction:%d", target, state, mAction);
}
Boolean res = FALSE;
switch (mAction) {
case ACTION_DOWN: {
mFlags &= ~FLAG_START_TRACKING;
receiver->OnKeyDown(mKeyCode, this, &res);
if (state != NULL) {
Boolean isLongPress;
Boolean isTracking;
if (res && mRepeatCount == 0
&& (mFlags & FLAG_START_TRACKING) != 0) {
if (DEBUG)
Logger::D(TAG, " Start tracking!");
state->StartTracking(this, target);
}
else if ((IsLongPress(&isLongPress), isLongPress)
&& (state->IsTracking(this, &isTracking), isTracking)) {
receiver->OnKeyLongPress(mKeyCode, this, &res);
if (res) {
if (DEBUG) {
Logger::D(TAG, " Clear from Int64 press!");
}
state->PerformedLongPress(this);
}
}
}
}
break;
case ACTION_UP: {
if (state != NULL) {
state->HandleUpEvent(this);
}
FAIL_RETURN(receiver->OnKeyUp(mKeyCode, this, &res));
}
break;
case ACTION_MULTIPLE: {
Int32 count = mRepeatCount;
Int32 code = mKeyCode;
receiver->OnKeyMultiple(code, count, this, &res);
if (res) {
break;
}
if (code != KEYCODE_UNKNOWN) {
mAction = ACTION_DOWN;
mRepeatCount = 0;
Boolean handled = FALSE;
receiver->OnKeyDown(code, this, &handled);
if (handled) {
mAction = ACTION_UP;
receiver->OnKeyUp(code, this, &res);
}
mAction = ACTION_MULTIPLE;
mRepeatCount = count;
res = handled;
}
}
break;
default:
break;
}
*result = res;
return NOERROR;
}
ECode KeyEvent::ToString(
/* [out] */ String* info)
{
VALIDATE_NOT_NULL(info)
StringBuilder msg;
msg.Append("KeyEvent { action=");
msg.Append(ActionToString(mAction));
msg.Append(", keyCode=");
msg.Append(KeyCodeToString(mKeyCode));
msg.Append(", scanCode=");
msg.Append(mScanCode);
if (!mCharacters.IsNull()) {
msg.Append(", characters=\"");
msg.Append(mCharacters);
msg.Append("\"");
}
msg.Append(", metaState=");
msg.Append(MetaStateToString(mMetaState));
msg.Append(", flags=0x");
msg.Append(StringUtils::ToHexString(mFlags));
msg.Append(", repeatCount=");
msg.Append(mRepeatCount);
msg.Append(", eventTime=");
msg.Append(mEventTime);
msg.Append(", downTime=");
msg.Append(mDownTime);
msg.Append(", deviceId=");
msg.Append(mDeviceId);
msg.Append(", source=0x");
msg.Append(StringUtils::ToHexString(mSource));
msg.Append(" }");
*info = msg.ToString();
return NOERROR;
}
String KeyEvent::ActionToString(
/* [in] */ Int32 action)
{
switch (action) {
case ACTION_DOWN:
return String("ACTION_DOWN");
case ACTION_UP:
return String("ACTION_UP");
case ACTION_MULTIPLE:
return String("ACTION_MULTIPLE");
default:
return StringUtils::ToString(action);
}
}
String KeyEvent::KeyCodeToString(
/* [in] */ Int32 keyCode)
{
String symbolicName = NativeKeyCodeToString(keyCode);
return symbolicName.IsNull() ? StringUtils::ToString(keyCode) : LABEL_PREFIX + symbolicName;
}
ECode KeyEvent::KeyCodeFromString(
/* [in] */ const String& symbolicName,
/* [out] */ Int32* keyCode)
{
VALIDATE_NOT_NULL(keyCode);
String name(symbolicName);
if (name.StartWith(LABEL_PREFIX)) {
name = symbolicName.Substring(LABEL_PREFIX.GetLength());
Int32 data = NativeKeyCodeFromString(name);
if (data > 0) {
*keyCode = data;
return NOERROR;
}
}
*keyCode = StringUtils::ParseInt32(name, 10);
return NOERROR;
// try {
// return Integer.parseInt(symbolicName, 10);
// } catch (NumberFormatException ex) {
// return KEYCODE_UNKNOWN;
// }
}
String KeyEvent::MetaStateToString(
/* [in] */ Int32 metaState)
{
if (metaState == 0) {
return String("0");
}
AutoPtr<StringBuilder> result;
Int32 i = 0;
while (metaState != 0) {
Boolean isSet = (metaState & 1) != 0;
metaState = ((UInt32)metaState) >> 1; // unsigned shift!
if (isSet) {
String name = META_SYMBOLIC_NAMES[i];
if (result == NULL) {
if (metaState == 0) {
return name;
}
result = new StringBuilder(name);
}
else {
result->AppendChar('|');
result->Append(name);
}
}
i += 1;
}
return result->ToString();
}
ECode KeyEvent::CreateFromParcelBody(
/* [in] */ IParcel* in,
/* [out] */ IKeyEvent** newEvent)
{
VALIDATE_NOT_NULL(newEvent)
AutoPtr<CKeyEvent> event;
CKeyEvent::NewByFriend((CKeyEvent**)&event);
event->ReadFromParcel(in);
*newEvent = (IKeyEvent*)event.Get();
REFCOUNT_ADD(*newEvent);
return NOERROR;
}
ECode KeyEvent::ReadFromParcel(
/* [in] */ IParcel *source)
{
VALIDATE_NOT_NULL(source);
Int32 token;
FAIL_RETURN(source->ReadInt32(&token));
FAIL_RETURN(source->ReadInt32(&mDeviceId));
FAIL_RETURN(source->ReadInt32(&mSource));
FAIL_RETURN(source->ReadInt32(&mAction));
FAIL_RETURN(source->ReadInt32(&mKeyCode));
FAIL_RETURN(source->ReadInt32(&mRepeatCount));
FAIL_RETURN(source->ReadInt32(&mMetaState));
FAIL_RETURN(source->ReadInt32(&mScanCode));
FAIL_RETURN(source->ReadInt32(&mFlags));
FAIL_RETURN(source->ReadInt64(&mDownTime));
FAIL_RETURN(source->ReadInt64(&mEventTime));
return NOERROR;
}
ECode KeyEvent::WriteToParcel(
/* [in] */ IParcel* dest)
{
VALIDATE_NOT_NULL(dest);
FAIL_RETURN(dest->WriteInt32(PARCEL_TOKEN_KEY_EVENT));
FAIL_RETURN(dest->WriteInt32(mDeviceId));
FAIL_RETURN(dest->WriteInt32(mSource));
FAIL_RETURN(dest->WriteInt32(mAction));
FAIL_RETURN(dest->WriteInt32(mKeyCode));
FAIL_RETURN(dest->WriteInt32(mRepeatCount));
FAIL_RETURN(dest->WriteInt32(mMetaState));
FAIL_RETURN(dest->WriteInt32(mScanCode));
FAIL_RETURN(dest->WriteInt32(mFlags));
FAIL_RETURN(dest->WriteInt64(mDownTime));
FAIL_RETURN(dest->WriteInt64(mEventTime));
return NOERROR;
}
String KeyEvent::NativeKeyCodeToString(
/* [in] */ Int32 keyCode)
{
return String(android::KeyEvent::getLabel(keyCode));
}
Int32 KeyEvent::NativeKeyCodeFromString(
/* [in] */ const String& keyCode)
{
return android::KeyEvent::getKeyCodeFromLabel(keyCode.string());
}
} //namespace View
} //namespace Droid
} //namespace Elastos
| 25.235813 | 96 | 0.628273 |
3f287ae5781c2e83cdbfb3b931b466c1bbf094b0 | 1,120 | cpp | C++ | platform/qt/test/headless_backend_qt.cpp | followtherider/mapbox-gl-native | 62b56b799a7d4fcd1a8f151eed878054b862da5b | [
"BSL-1.0",
"Apache-2.0"
] | null | null | null | platform/qt/test/headless_backend_qt.cpp | followtherider/mapbox-gl-native | 62b56b799a7d4fcd1a8f151eed878054b862da5b | [
"BSL-1.0",
"Apache-2.0"
] | null | null | null | platform/qt/test/headless_backend_qt.cpp | followtherider/mapbox-gl-native | 62b56b799a7d4fcd1a8f151eed878054b862da5b | [
"BSL-1.0",
"Apache-2.0"
] | null | null | null | #include <mbgl/platform/default/headless_backend.hpp>
#include <mbgl/platform/default/headless_display.hpp>
#include <QApplication>
#include <QGLContext>
#include <QGLWidget>
#if QT_VERSION >= 0x050000
#include <QOpenGLContext>
#endif
namespace mbgl {
gl::glProc HeadlessBackend::initializeExtension(const char* name) {
#if QT_VERSION >= 0x050000
QOpenGLContext* thisContext = QOpenGLContext::currentContext();
return thisContext->getProcAddress(name);
#else
const QGLContext* thisContext = QGLContext::currentContext();
return reinterpret_cast<mbgl::gl::glProc>(thisContext->getProcAddress(name));
#endif
}
void HeadlessBackend::createContext() {
static const char* argv[] = { "mbgl" };
static int argc = 1;
static auto* app = new QApplication(argc, const_cast<char**>(argv));
Q_UNUSED(app);
glContext = new QGLWidget;
}
void HeadlessBackend::destroyContext() {
delete glContext;
}
void HeadlessBackend::activateContext() {
glContext->makeCurrent();
}
void HeadlessBackend::deactivateContext() {
glContext->doneCurrent();
}
} // namespace mbgl
| 23.829787 | 85 | 0.721429 |
3f293f21d797a9eb2e8670cba5b2222d05fb82cc | 954 | cpp | C++ | Codechef/Compete/Long Challenge/November Challenge 2020/Restore sequence.cpp | mohitkhedkar/Competitive-programming | 85d08791002363c6a1104b6b51bf049489fd5257 | [
"MIT"
] | 2 | 2020-10-22T15:37:14.000Z | 2020-12-11T06:45:02.000Z | Codechef/Compete/Long Challenge/November Challenge 2020/Restore sequence.cpp | mohitkhedkar/Competitive-programming | 85d08791002363c6a1104b6b51bf049489fd5257 | [
"MIT"
] | null | null | null | Codechef/Compete/Long Challenge/November Challenge 2020/Restore sequence.cpp | mohitkhedkar/Competitive-programming | 85d08791002363c6a1104b6b51bf049489fd5257 | [
"MIT"
] | null | null | null | #include<bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--) {
int n,j=1;
cin>>n;
int b[100000];
for(int i=1;i<=n;i++) {
cin>>b[i];
}
int a[100000];
int status = 1, num = 2, count, c;
if (n>= 1) {
a[1]=2;
}
for (count = 1; count <=n; ) {
for (c = 2; c <= (int)sqrt(num); c++) {
if (num%c == 0) {
status = 0;
break;
}
}
if (status != 0) {
a[j]=num;
count++;
j++;
}
status = 1;
num++;
}
int arr[10];
for(int i=1;i<=n;i++) {
if(i==b[i]) {
arr[i]=a[i];
}else {
arr[i]=a[b[i]];
}
cout<<arr[i]<<" ";
}
cout<<endl;
}
return 0;
}
| 17.666667 | 49 | 0.301887 |
3f2c1ac046105797fe34a37395d66b2f99694bc9 | 7,704 | cc | C++ | onnxruntime/core/optimizer/gemm_sum_fusion.cc | lchang20/onnxruntime | 97b8f6f394ae02c73ed775f456fd85639c91ced1 | [
"MIT"
] | 669 | 2018-12-03T22:00:31.000Z | 2019-05-06T19:42:49.000Z | onnxruntime/core/optimizer/gemm_sum_fusion.cc | lchang20/onnxruntime | 97b8f6f394ae02c73ed775f456fd85639c91ced1 | [
"MIT"
] | 440 | 2018-12-03T21:09:56.000Z | 2019-05-06T20:47:23.000Z | onnxruntime/core/optimizer/gemm_sum_fusion.cc | lchang20/onnxruntime | 97b8f6f394ae02c73ed775f456fd85639c91ced1 | [
"MIT"
] | 140 | 2018-12-03T21:15:28.000Z | 2019-05-06T18:02:36.000Z | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/optimizer/gemm_sum_fusion.h"
#include "core/graph/graph_utils.h"
#include "core/optimizer/initializer.h"
#include "core/optimizer/utils.h"
using namespace ONNX_NAMESPACE;
using namespace onnxruntime::common;
namespace onnxruntime {
Status GemmSumFusion::Apply(Graph& graph, Node& gemm_node, RewriteRuleEffect& modified, const logging::Logger&) const {
// Get currently set attributes of Gemm. Beta will become 1.0.
const bool transA = static_cast<bool>(gemm_node.GetAttributes().at("transA").i());
const bool transB = static_cast<bool>(gemm_node.GetAttributes().at("transB").i());
const float alpha = gemm_node.GetAttributes().at("alpha").f();
constexpr float beta = 1.0f;
Node& sum_node = *graph.GetNode(gemm_node.OutputEdgesBegin()->GetNode().Index());
// The first two input defs for our new gemm (aka tensor A and tensor B in GemmSumFusion's
// documentation) are exactly the same as the old gemm's input defs.
std::vector<NodeArg*> new_gemm_input_defs = gemm_node.MutableInputDefs();
// The other new gemm's input def is the old sum's other input def (aka tensor C in
// GemmSumFusion's documentation).
if (sum_node.InputDefs()[0]->Name() == gemm_node.OutputDefs()[0]->Name()) {
new_gemm_input_defs.push_back(sum_node.MutableInputDefs()[1]);
} else {
new_gemm_input_defs.push_back(sum_node.MutableInputDefs()[0]);
}
ORT_ENFORCE(new_gemm_input_defs.size() == 3);
std::vector<NodeArg*> new_gemm_output_defs = sum_node.MutableOutputDefs();
ORT_ENFORCE(new_gemm_output_defs.size() == 1);
Node& new_gemm_node = graph.AddNode(graph.GenerateNodeName(gemm_node.Name() + "_sum_transformed"),
gemm_node.OpType(),
"Fused Gemm with Sum",
new_gemm_input_defs,
new_gemm_output_defs,
{},
gemm_node.Domain());
new_gemm_node.AddAttribute("transA", static_cast<int64_t>(transA));
new_gemm_node.AddAttribute("transB", static_cast<int64_t>(transB));
new_gemm_node.AddAttribute("alpha", alpha);
new_gemm_node.AddAttribute("beta", beta);
// Move both input edges from original gemm to new gemm.
for (auto gemm_input_edge : graph_utils::GraphEdge::GetNodeInputEdges(gemm_node)) {
ORT_ENFORCE(gemm_input_edge.src_arg_index < 2);
graph.AddEdge(gemm_input_edge.src_node, new_gemm_node.Index(), gemm_input_edge.src_arg_index, gemm_input_edge.dst_arg_index);
graph.RemoveEdge(gemm_input_edge.src_node, gemm_input_edge.dst_node, gemm_input_edge.src_arg_index, gemm_input_edge.dst_arg_index);
}
// Move all output edges from sum to new gemm.
for (auto sum_output_edge : graph_utils::GraphEdge::GetNodeOutputEdges(sum_node)) {
ORT_ENFORCE(sum_output_edge.src_arg_index == 0);
graph.AddEdge(new_gemm_node.Index(), sum_output_edge.dst_node, sum_output_edge.src_arg_index, sum_output_edge.dst_arg_index);
graph.RemoveEdge(sum_output_edge.src_node, sum_output_edge.dst_node, sum_output_edge.src_arg_index, sum_output_edge.dst_arg_index);
}
// Finally, move the other sum input edge to "C" for the new gemm node.
// If The other sum input def is a a graph input, there is no edge to move.
bool sum_input_moved = false;
for (auto sum_input_edge : graph_utils::GraphEdge::GetNodeInputEdges(sum_node)) {
// The C tensor in GemmSumFusion's documentation is the sum output which does not come from
// the fused gemm. The following condition will be true when seeing the input of C to sum.
if (sum_input_edge.src_node != gemm_node.Index()) {
ORT_ENFORCE(!sum_input_moved);
graph.AddEdge(sum_input_edge.src_node, new_gemm_node.Index(), sum_input_edge.src_arg_index, 2);
graph.RemoveEdge(sum_input_edge.src_node, sum_input_edge.dst_node, sum_input_edge.src_arg_index, sum_input_edge.dst_arg_index);
sum_input_moved = true;
}
}
// Old gemm node output is no longer needed. It was previously fed into the
// sum node which is now also handled by the new gemm. Remove this output edge
// to allow the node to be removed from the graph.
graph_utils::RemoveNodeOutputEdges(graph, gemm_node);
ORT_ENFORCE(graph.RemoveNode(gemm_node.Index()));
// All output edges of the sum node should have been removed already, so we can
// remove it from the graph.
ORT_ENFORCE(sum_node.GetOutputEdgesCount() == 0);
ORT_ENFORCE(graph.RemoveNode(sum_node.Index()));
modified = RewriteRuleEffect::kRemovedCurrentNode;
return Status::OK();
}
bool GemmSumFusion::SatisfyCondition(const Graph& graph, const Node& node, const logging::Logger&) const {
// Perform a series of checks. If any fail, fusion may not be performed.
// Original gemm's C must be missing for this fusion pattern to be valid.
// Supported for Opset >=11 as earlier opsets have C as a required input
if (!graph_utils::IsSupportedOptypeVersionAndDomain(node, "Gemm", {11, 13}) ||
graph.NodeProducesGraphOutput(node) ||
// 2 inputs means that the gemm has A and B present, but not C.
node.InputDefs().size() != 2) {
return false;
}
// This gemm node must have exactly one output for this fusion pattern to be valid. We have already
// verified that this node does not produce any graph outputs, so we can check output edges.
if (node.GetOutputEdgesCount() != 1) {
return false;
}
const NodeArg* node_output = node.OutputDefs()[0];
const Node& output_node = node.OutputEdgesBegin()->GetNode();
// Fusion can be applied if the only output node is a Sum with exactly two inputs.
if (
!graph_utils::IsSupportedOptypeVersionAndDomain(output_node, "Sum", {1, 6, 8, 13}) ||
output_node.InputDefs().size() != 2 ||
// Make sure the two nodes do not span execution providers.
output_node.GetExecutionProviderType() != node.GetExecutionProviderType()) {
return false;
}
// Sum must have the same input types, data types do not need to be checked.
// Get the other sum input.
const NodeArg* other_sum_input = nullptr;
if (output_node.InputDefs()[0]->Name() == node_output->Name()) {
other_sum_input = output_node.InputDefs()[1];
} else {
other_sum_input = output_node.InputDefs()[0];
}
ORT_ENFORCE(other_sum_input != nullptr);
// valid bias_shapes are (N) or (1, N) or (M, 1) or (M, N) as
// GEMM only supports unidirectional broadcast on the bias input C
//
// TODO: verify if scalar shape works here together with matmul_add_fusion.
if (!other_sum_input->Shape()) {
return false;
}
if (!node_output->Shape() || node_output->Shape()->dim_size() != 2) {
return false;
}
const auto& bias_shape = *other_sum_input->Shape();
const auto& matmul_output_shape = *node_output->Shape();
const auto& M = matmul_output_shape.dim()[0];
const auto& N = matmul_output_shape.dim()[1];
auto dim_has_value_1 = [](const TensorShapeProto_Dimension& dim) {
return dim.has_dim_value() && dim.dim_value() == 1;
};
const bool valid = ((bias_shape.dim_size() == 1 && bias_shape.dim()[0] == N) ||
(bias_shape.dim_size() == 2 && dim_has_value_1(bias_shape.dim()[0]) && bias_shape.dim()[1] == N) ||
(bias_shape.dim_size() == 2 && bias_shape.dim()[0] == M &&
(dim_has_value_1(bias_shape.dim()[1]) || bias_shape.dim()[1] == N)));
if (!valid) {
return false;
}
// If none of the above checks specify render this fusion invalid, fusion is valid.
return true;
}
} // namespace onnxruntime
| 45.857143 | 135 | 0.697819 |
3f2d6500f38024628daad9287e1fb6cc9e21d5b0 | 12,101 | cpp | C++ | thirdparty/geogram/src/lib/exploragram/hexdom/mesh_inspector.cpp | AmericaMakes/OASIS-marcwang | 7aa10040251d7a1b807a773a45d123e1a52faac5 | [
"BSD-2-Clause"
] | 1 | 2021-03-07T14:47:09.000Z | 2021-03-07T14:47:09.000Z | thirdparty/geogram/src/lib/exploragram/hexdom/mesh_inspector.cpp | AmericaMakes/OASIS-marcwang | 7aa10040251d7a1b807a773a45d123e1a52faac5 | [
"BSD-2-Clause"
] | null | null | null | thirdparty/geogram/src/lib/exploragram/hexdom/mesh_inspector.cpp | AmericaMakes/OASIS-marcwang | 7aa10040251d7a1b807a773a45d123e1a52faac5 | [
"BSD-2-Clause"
] | 1 | 2021-03-07T00:24:57.000Z | 2021-03-07T00:24:57.000Z | /*
* OGF/Graphite: Geometry and Graphics Programming Library + Utilities
* Copyright (C) 2000-2015 INRIA - Project ALICE
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* If you modify this software, you should include a notice giving the
* name of the person performing the modification, the date of modification,
* and the reason for such modification.
*
* Contact for Graphite: Bruno Levy - Bruno.Levy@inria.fr
* Contact for this Plugin: Nicolas Ray - nicolas.ray@inria.fr
*
* Project ALICE
* LORIA, INRIA Lorraine,
* Campus Scientifique, BP 239
* 54506 VANDOEUVRE LES NANCY CEDEX
* FRANCE
*
* Note that the GNU General Public License does not permit incorporating
* the Software into proprietary programs.
*
* As an exception to the GPL, Graphite can be linked with the following
* (non-GPL) libraries:
* Qt, tetgen, SuperLU, WildMagic and CGAL
*/
#include <exploragram/hexdom/mesh_inspector.h>
#include <exploragram/hexdom/basic.h>
#include <exploragram/hexdom/extra_connectivity.h>
#include <geogram/mesh/mesh_tetrahedralize.h>
#include <geogram/delaunay/delaunay.h>
namespace GEO {
bool volume_boundary_is_manifold(Mesh* m, std::string& msg) {
m->cells.compute_borders();
if (!surface_is_manifold(m, msg)) {
return false;
}
m->facets.clear();
return true;
}
bool have_negative_tet_volume(Mesh*m) {
FOR(c, m->cells.nb()) {
vec3 A = X(m)[m->cells.vertex(c, 0)];
vec3 B = X(m)[m->cells.vertex(c, 1)];
vec3 C = X(m)[m->cells.vertex(c, 2)];
vec3 D = X(m)[m->cells.vertex(c, 3)];
double vol = dot(cross(B - A, C - A), D - A);
if (vol < 0) {
Attribute<double> signed_volume(m->cells.attributes(), "signed_volume");
signed_volume[c] = vol;
return true;
}
}
return false;
}
bool surface_is_tetgenifiable(Mesh* m) {
Mesh copy;
copy.copy(*m);
create_non_manifold_facet_adjacence(©);
copy.facets.triangulate();
try {
mesh_tetrahedralize(copy, false, false, 1.);
}
catch (const GEO::Delaunay::InvalidInput& error_report) {
FOR(i, error_report.invalid_facets.size()) {
plop(error_report.invalid_facets[i]);
}
return false;
}
return true;
}
bool volume_is_tetgenifiable(Mesh* m) {
Mesh copy;
copy.copy(*m);
copy.edges.clear();
copy.cells.compute_borders();
copy.cells.clear();
return surface_is_tetgenifiable(©);
}
bool surface_is_manifold(Mesh* m, std::string& msg) {
if (m->facets.nb() == 0) return true;
{
// check for duplicated corners around a face
FOR(f, m->facets.nb()) FOR(fc, m->facets.nb_corners(f))
if (m->facets.vertex(f, fc) == m->facets.vertex(f, next_mod(fc, m->facets.nb_corners(f)))) {
msg = "duplicated corner detected on (face = " + String::to_string(f) + " , local corner = " + String::to_string(fc) + " , vertex = " +
String::to_string(m->facets.vertex(f, fc));
return false;
}
// output the type of surface
index_t nb_edges_par_facets = m->facets.nb_corners(0);
FOR(f, m->facets.nb()) if (m->facets.nb_corners(f) != nb_edges_par_facets) nb_edges_par_facets = index_t(-1);
if (nb_edges_par_facets != index_t(-1)) plop(nb_edges_par_facets);
// check if the mesh is manifold
Attribute<int> nb_opp(m->facet_corners.attributes(), "nb_opp");
Attribute<int> nb_occ(m->facet_corners.attributes(), "nb_occ");
FOR(h, m->facet_corners.nb()) { nb_opp[h] = 0; nb_occ[h] = 0; }
// edge connectivity
FacetsExtraConnectivity fec(m);
int nb_0_opp = 0;
int nb_1_opp = 0;
int nb_multiple_opp = 0;
int nb_duplicated_edge = 0;
FOR(h, m->facet_corners.nb()) {
index_t cir = h;
index_t result = NOT_AN_ID; // not found
do {
index_t candidate = fec.prev(cir);
if ((fec.org(candidate) == fec.dest(h)) && (fec.dest(candidate) == fec.org(h))) {
nb_opp[h]++;
if (result == NOT_AN_ID) result = candidate;
else nb_multiple_opp++;
}
if (cir != h && fec.dest(h) == fec.dest(cir)) {
nb_duplicated_edge++;
nb_occ[h]++;
}
cir = fec.c2c[cir];
} while (cir != h);
if (result == NOT_AN_ID)nb_0_opp++;
else nb_1_opp++;
}
if (nb_0_opp > 0) {
msg = "surface have halfedges without opposite, nb= " + String::to_string(nb_0_opp);
return false;
}
if (nb_multiple_opp > 0) {
msg = "surface have halfedge with more than 2 opposites, nb= " + String::to_string(nb_multiple_opp);
return false;
}
if (nb_duplicated_edge > 0) {
msg = "halfedge appears in more than one facet, nb= " + String::to_string(nb_duplicated_edge);
return false;
}
// check for non manifold vertices
Attribute<bool> nonmanifold(m->vertices.attributes(), "nonmanifold");
FOR(v, m->vertices.nb()) nonmanifold[v] = false;
FOR(h, m->facet_corners.nb()) {
if (nb_opp[h] != 1 || nb_occ[h] != 0)
nonmanifold[fec.org(h)] = true;
}
vector<int> val(m->vertices.nb(), 0);
FOR(f, m->facets.nb()) FOR(lc, m->facets.nb_vertices(f)) val[m->facets.vertex(f, lc)]++;
FOR(h, m->facet_corners.nb()) {
int nb = 0;
index_t cir = h;
do {
nb++;
cir = fec.next_around_vertex(cir);// fec.c2c[cir];
} while (cir != h);
if (nb != val[fec.org(h)]) {
msg = "Vertex " + String::to_string(fec.org(h)) + " is non manifold ";
return false;
}
}
}
m->vertices.attributes().delete_attribute_store("nonmanifold");
m->facet_corners.attributes().delete_attribute_store("nb_opp");
m->facet_corners.attributes().delete_attribute_store("nb_occ");
return true;
}
void get_facet_stats(Mesh* m, const char * msg, bool export_attribs) {
geo_argused(export_attribs);
GEO::Logger::out("HexDom") << "-----------------------------------------" << std::endl;
GEO::Logger::out("HexDom") << "get_facet_stats " << msg << std::endl;
GEO::Logger::out("HexDom") << "-----------------------------------------" << std::endl;
{
Attribute<int> nb_opp(m->facet_corners.attributes(), "nb_opp");
Attribute<int> nb_occ(m->facet_corners.attributes(), "nb_occ");
FOR(h, m->facet_corners.nb()) nb_opp[h] = 0;
// edge connectivity
FacetsExtraConnectivity fec(m);
int nb_0_opp = 0;
int nb_1_opp = 0;
int nb_multiple_opp = 0;
int nb_duplicated_edge = 0;
FOR(h, m->facet_corners.nb()) {
index_t cir = h;
index_t result = NOT_AN_ID; // not found
do {
index_t candidate = fec.prev(cir);
if ((fec.org(candidate) == fec.dest(h)) && (fec.dest(candidate) == fec.org(h))) {
nb_opp[h]++;
if (result == NOT_AN_ID) result = candidate;
else nb_multiple_opp++;
}
if (cir != h && fec.dest(h) == fec.dest(cir)) {
nb_duplicated_edge++;
nb_occ[h]++;
}
cir = fec.c2c[cir];
} while (cir != h);
if (result == NOT_AN_ID)nb_1_opp++;
else nb_0_opp++;
}
FOR(f, m->facets.nb()) FOR(fc, m->facets.nb_corners(f))
if (m->facets.vertex(f, fc) == m->facets.vertex(f, next_mod(fc, m->facets.nb_corners(f))))
GEO::Logger::out("HexDom") << "Duplicated vertex found at facet #" << f << ", local corner= " << fc << " and vertex is " << m->facets.vertex(f, fc) << std::endl;
plop(nb_0_opp);
plop(nb_1_opp);
plop(nb_multiple_opp);
plop(nb_duplicated_edge);
// check for non manifold vertices
Attribute<bool> nonmanifold(m->vertices.attributes(), "nonmanifold");
FOR(v, m->vertices.nb()) nonmanifold[v] = false;
FOR(h, m->facet_corners.nb()) {
if (nb_opp[h] != 1 || nb_occ[h] != 0)
nonmanifold[fec.org(h)] = true;
}
vector<int> val(m->vertices.nb(), 0);
FOR(f, m->facets.nb()) FOR(lc, m->facets.nb_vertices(f)) val[m->facets.vertex(f, lc)]++;
FOR(h, m->facet_corners.nb()) {
int nb = 0;
index_t cir = h;
do {
nb++;
cir = fec.c2c[cir];
} while (cir != h);
if (nb != val[fec.org(h)]) {
GEO::Logger::out("HexDom") << "Vertex " << fec.org(h) << " is non-manifold !!" << std::endl;
nonmanifold[fec.org(h)] = true;
}
}
}
m->vertices.attributes().delete_attribute_store("nonmanifold");
m->facet_corners.attributes().delete_attribute_store("nb_opp");
m->facet_corners.attributes().delete_attribute_store("nb_occ");
}
double tet_vol(vec3 A, vec3 B, vec3 C, vec3 D) {
B = B - A;
C = C - A;
D = D - A;
return (1. / 6.)*dot(D, cross(B, C));
}
void get_hex_proportion(Mesh*m, double &nb_hex_prop, double &vol_hex_prop) {
int nb_tets = 0;
int nb_hexs = 0;
double vol_tets = 0;
double vol_hexs = 0;
FOR(c, m->cells.nb()) if (m->cells.nb_facets(c) == 4) {
vol_tets += tet_vol(X(m)[m->cells.vertex(c, 0)], X(m)[m->cells.vertex(c, 1)], X(m)[m->cells.vertex(c, 2)], X(m)[m->cells.vertex(c, 3)]);
nb_tets++;
}
FOR(c, m->cells.nb()) if (m->cells.nb_facets(c) == 6) {
vector<vec3> P(8);
FOR(cv, 8) P[cv] = X(m)[m->cells.vertex(c, cv)];
vol_hexs += tet_vol(P[0], P[3], P[2], P[6]);
vol_hexs += tet_vol(P[0], P[7], P[3], P[6]);
vol_hexs += tet_vol(P[0], P[7], P[6], P[4]);
vol_hexs += tet_vol(P[0], P[1], P[3], P[7]);
vol_hexs += tet_vol(P[0], P[1], P[7], P[5]);
vol_hexs += tet_vol(P[0], P[5], P[7], P[4]);
nb_hexs++;
}
if (nb_hexs + nb_tets>0) nb_hex_prop = double(nb_hexs) / double(nb_hexs + nb_tets);
if (nb_hexs + nb_tets>0) vol_hex_prop = double(vol_hexs) / double(vol_hexs + vol_tets);
}
}
| 40.471572 | 184 | 0.514338 |
3f3428b521990d6815e3af30a408b9e17e03bd96 | 4,464 | cpp | C++ | sources/cpp/omp/omp003.cpp | xunilrj/sandbox | f92c12f83433cac01a885585e41c02bb5826a01f | [
"Apache-2.0"
] | 7 | 2017-04-01T17:18:35.000Z | 2022-01-12T05:23:23.000Z | sources/cpp/omp/omp003.cpp | xunilrj/sandbox | f92c12f83433cac01a885585e41c02bb5826a01f | [
"Apache-2.0"
] | 6 | 2020-05-24T13:36:50.000Z | 2022-02-15T06:44:20.000Z | sources/cpp/omp/omp003.cpp | xunilrj/sandbox | f92c12f83433cac01a885585e41c02bb5826a01f | [
"Apache-2.0"
] | 2 | 2018-09-20T01:07:39.000Z | 2019-02-22T14:55:38.000Z | #include <iostream>
#include <sstream>
#include <omp.h>
#include <atomic>
void runIncrement()
{
const int LOOPSIZE = 1000000;
int A = 0;
int B = 0;
int C = 0;
std::atomic<int> D {0}; //https://stackoverflow.com/questions/21554099/can-stdatomic-be-safely-used-with-openmp
std::cout << "Increment ------------------------------" << std::endl;
#pragma omp parallel for shared(A,B,C,D)
for (int i = 0;i < LOOPSIZE; ++i)
{
++A;
#pragma omp critical
{
++B;
}
#pragma omp atomic
++C;
++D;
}
std::cout << "correct: " << LOOPSIZE << std::endl;
std::cout << "A: " << A << " [" << (A == LOOPSIZE) << "]" << std::endl;
std::cout << "B: " << B << " [" << (B == LOOPSIZE) << "]" << std::endl;
std::cout << "C: " << C << " [" << (C == LOOPSIZE) << "]" << std::endl;
std::cout << "D: " << D << " [" << (D == LOOPSIZE) << "]" << std::endl;
}
void runBinaryOperatorEqual()
{
const int LOOPSIZE = 1000000;
srand(time(NULL));
int step = rand() % 9 + 1;
int A = 0;
int B = 0;
int C = 0;
std::atomic<int> D {0}; //https://stackoverflow.com/questions/21554099/can-stdatomic-be-safely-used-with-openmp
std::cout << "BinaryOperatorEqual ------------------------------" << std::endl;
#pragma omp parallel for shared(A,B,C,D)
for (int i = 0;i < LOOPSIZE; ++i)
{
A+=step;
#pragma omp critical
{
B+=step;
}
#pragma omp atomic
C+=step;
D+=step;
}
std::cout << "correct: " << LOOPSIZE*step << std::endl;
std::cout << "A: " << A << " [" << (A == LOOPSIZE*step) << "]" << std::endl;
std::cout << "B: " << B << " [" << (B == LOOPSIZE*step) << "]" << std::endl;
std::cout << "C: " << C << " [" << (C == LOOPSIZE*step) << "]" << std::endl;
std::cout << "D: " << D << " [" << (D == LOOPSIZE*step) << "]" << std::endl;
}
void runReadModifyWrite()
{
const int LOOPSIZE = 1000000;
srand(time(NULL));
int step = rand() % 9 + 1;
int A = 0;
int B = 0;
int C = 0;
std::atomic<int> D {0}; //https://stackoverflow.com/questions/21554099/can-stdatomic-be-safely-used-with-openmp
std::atomic<int> E {0};
std::atomic<int> ECount {0};
std::cout << "ReadModifyWrite ------------------------------" << std::endl;
#pragma omp parallel for shared(A,B,C,D)
for (int i = 0;i < LOOPSIZE; ++i)
{
A = A + step + 10;
#pragma omp critical
{
B = B + step + 10;
}
//omp003.cpp:99:24: error: the statement for 'atomic' must be an
//expression statement of form '++x;', '--x;', 'x++;', 'x--;',
//'x binop= expr;', 'x = x binop expr' or 'x = expr binop x',
// where x is an l-value expression with scalar type
//#pragma omp atomic
//C = (C + step) * 2;
// Incorrect use of atomic in this case
// others are fine.
// See correcy way below.
D = D + step + 10;
//https://stackoverflow.com/questions/25199838/understanding-stdatomiccompare-exchange-weak-in-c11
//https://preshing.com/20150402/you-can-do-any-kind-of-atomic-read-modify-write-operation/
int oldE = E.load();
int newE;
do
{
++ECount; // <- measure how many times compare_exchange_weak will fail
newE = oldE + step + 10; // <- what we really want to do
} while(!E.compare_exchange_weak(oldE, newE));
}
std::cout << "correct: " << LOOPSIZE*(step+10) << std::endl;
std::cout << "A: " << A << " [" << (A == LOOPSIZE*(step+10)) << "]" << std::endl;
std::cout << "B: " << B << " [" << (B == LOOPSIZE*(step+10)) << "]" << std::endl;
std::cout << "C: " << C << " [" << (C == LOOPSIZE*(step+10)) << "]" << std::endl;
std::cout << "D: " << D << " [" << (D == LOOPSIZE*(step+10)) << "]" << std::endl;
std::cout << "E: " << E << " [" << (E == LOOPSIZE*(step+10)) << "]" << std::endl;
std::cout << "E conflicts: " << ECount - LOOPSIZE << "(" << (ECount - LOOPSIZE) * 100.0 / LOOPSIZE << "%)" << std::endl;
}
int main(int argc, char** argv)
{
if(argc > 1)
{
std::stringstream ss;
ss << argv[1];
int numThreads;
ss >> numThreads;
omp_set_num_threads(numThreads);
}
runIncrement();
runBinaryOperatorEqual();
runReadModifyWrite();
} | 30.367347 | 126 | 0.482751 |
27862f8f6280f51ab208695ec87fcc1b07641033 | 2,059 | hh | C++ | libsrc/spatialdata/spatialdb/TimeHistoryIO.hh | jedbrown/spatialdata | f18d34d92253986e8018f393201bf901e9667c2a | [
"MIT"
] | null | null | null | libsrc/spatialdata/spatialdb/TimeHistoryIO.hh | jedbrown/spatialdata | f18d34d92253986e8018f393201bf901e9667c2a | [
"MIT"
] | null | null | null | libsrc/spatialdata/spatialdb/TimeHistoryIO.hh | jedbrown/spatialdata | f18d34d92253986e8018f393201bf901e9667c2a | [
"MIT"
] | null | null | null | // -*- C++ -*-
//
// ----------------------------------------------------------------------
//
// Brad T. Aagaard, U.S. Geological Survey
//
// This code was developed as part of the Computational Infrastructure
// for Geodynamics (http://geodynamics.org).
//
// Copyright (c) 2010-2017 University of California, Davis
//
// See COPYING for license information.
//
// ----------------------------------------------------------------------
//
/** @file libsrc/spatialdb/TimeHistoryIO.h
*
* @brief C++ object for reading/writing time history files.
*/
#if !defined(spatialdata_spatialdb_timehistoryio_hh)
#define spatialdata_spatialdb_timehistoryio_hh
#include "spatialdbfwd.hh"
/// C++ object for reading/writing time history files.
class spatialdata::spatialdb::TimeHistoryIO
{ // class TimeHistoryIO
public :
// PUBLIC METHODS /////////////////////////////////////////////////////
/** Read time history file.
*
* @param time Time stamps.
* @param amplitude Amplitude values in time history.
* @param npts Number of points in time history.
* @param filename Filename for time history.
*/
static
void read(double** time,
double** amplitude,
int* npts,
const char* filename);
/** Read time history file. Number of time history points given by
* nptsT must equal nptsA.
*
* @param time Time stamps.
* @param nptsT Number of points in time history.
* @param amplitude Amplitude values in time history.
* @param nptsA Number of points in time history.
* @param timeUnits Units associated with time stamps.
* @param filename Filename for time history.
*/
static
void write(const double* time,
const int nptsT,
const double* amplitude,
const int nptsA,
const char* timeUnits,
const char* filename);
private :
// PRIVATE MEMBERS ////////////////////////////////////////////////////
static const char* HEADER; ///< Header for time history files.
}; // class TimeHistoryIO
#endif // spatialdata_spatialdb_timehistoryio_hh
// End of file
| 27.092105 | 73 | 0.605634 |
278b96e92f4373c89dc965d0fbee66db9fe66e19 | 1,067 | hpp | C++ | src/demo/fly_sorter/identity_tracker.hpp | hhhHanqing/bias | ac409978ac0bfc6bc4cf8570bf7ce7509e81a219 | [
"Apache-2.0"
] | 5 | 2020-07-23T18:59:08.000Z | 2021-12-14T02:56:12.000Z | src/demo/fly_sorter/identity_tracker.hpp | hhhHanqing/bias | ac409978ac0bfc6bc4cf8570bf7ce7509e81a219 | [
"Apache-2.0"
] | 4 | 2020-08-30T13:55:22.000Z | 2022-03-24T21:14:15.000Z | src/demo/fly_sorter/identity_tracker.hpp | hhhHanqing/bias | ac409978ac0bfc6bc4cf8570bf7ce7509e81a219 | [
"Apache-2.0"
] | 3 | 2020-10-04T17:53:15.000Z | 2022-02-24T05:55:53.000Z | #ifndef IDENTITY_TRACKKER_HPP
#define IDENTITY_TRACKKER_HPP
#include "parameters.hpp"
#include "blob_finder.hpp"
#include <vector>
#include <memory>
#include <map>
class IdentityTracker
{
public:
IdentityTracker();
IdentityTracker(IdentityTrackerParam param);
void setParam(IdentityTrackerParam param);
void update(BlobFinderData &blodFinderData);
private:
bool isFirst_;
long idCounter_;
IdentityTrackerParam param_;
BlobFinderData blobFinderDataPrev_;
void assignBlobsGreedy(BlobFinderData &blobfinderData);
std::vector<std::vector<float>> getCostMatrix(BlobFinderData &blobFinderData);
float getCost(BlobData blobCurr, BlobData blobPrev);
std::map<int,BlobDataList::iterator> getIndexToBlobDataMap(
BlobFinderData &blobFinderData
);
};
int getNumberOkItems(BlobDataList blobDataList);
void printMatrix(std::vector<std::vector<float>> matrix);
#endif // ifndef IDENTITY_TRACKER_HPP
| 27.358974 | 87 | 0.686036 |
278ed8f8742fd69407d3c303a6a78863e35ff914 | 8,207 | cpp | C++ | NLoader/loadermain.cpp | NellaR1/NEPS | f8ea7181449a858bf660f58ef7c40c11d04b8bf1 | [
"BSD-2-Clause"
] | null | null | null | NLoader/loadermain.cpp | NellaR1/NEPS | f8ea7181449a858bf660f58ef7c40c11d04b8bf1 | [
"BSD-2-Clause"
] | null | null | null | NLoader/loadermain.cpp | NellaR1/NEPS | f8ea7181449a858bf660f58ef7c40c11d04b8bf1 | [
"BSD-2-Clause"
] | null | null | null | #include <iostream>
#include <Windows.h>
#include <TlHelp32.h>
#ifdef REQ_NET
#include "curl/curl.h"
#endif // REQ_NET
#include "resource.h"
#include "version.hpp"
using namespace std;
typedef HMODULE(__stdcall *PLOADLIBRARY)(LPCSTR);
typedef FARPROC(__stdcall *PGETPROCADDRESS)(HMODULE, LPCSTR);
typedef BOOL(__stdcall *DLLMAIN)(HMODULE, DWORD, LPVOID);
struct LOADERDATA
{
LPVOID ImageBase;
PIMAGE_NT_HEADERS NtHeaders;
PIMAGE_BASE_RELOCATION BaseReloc;
PIMAGE_IMPORT_DESCRIPTOR ImportDirectory;
PLOADLIBRARY fnLoadLibraryA;
PGETPROCADDRESS fnGetProcAddress;
};
static DWORD FindPID(wstring processName)
{
PROCESSENTRY32 processInfo;
processInfo.dwSize = sizeof(processInfo);
HANDLE processSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
if (processSnapshot == INVALID_HANDLE_VALUE)
return 0;
Process32First(processSnapshot, &processInfo);
if (!processName.compare(processInfo.szExeFile))
{
CloseHandle(processSnapshot);
return processInfo.th32ProcessID;
}
while (Process32Next(processSnapshot, &processInfo))
{
if (!processName.compare(processInfo.szExeFile))
{
CloseHandle(processSnapshot);
return processInfo.th32ProcessID;
}
}
CloseHandle(processSnapshot);
return 0;
}
#ifdef REQ_NET
static BOOL RequestBinary(LPVOID out)
{
auto curl = curl_easy_init();
if (curl)
{
curl_easy_setopt(curl, CURLOPT_URL, "");
curl_easy_cleanup(curl);
}
}
#endif // REQ_NET
BOOL __stdcall LibraryLoader(LPVOID memory)
{
LOADERDATA *LoaderParams = (LOADERDATA *)memory;
// Call TLS callbacks
#ifdef CALL_TLS
IMAGE_DATA_DIRECTORY pIDD = LoaderParams->NtHeaders->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_TLS];
if (pIDD.VirtualAddress)
{
PIMAGE_TLS_DIRECTORY pITD = (PIMAGE_TLS_DIRECTORY)((LPBYTE)LoaderParams->ImageBase + pIDD.VirtualAddress);
if (pITD)
{
PIMAGE_TLS_CALLBACK *pITC = (PIMAGE_TLS_CALLBACK *)pITD->AddressOfCallBacks;
if (pITC)
{
while (*pITC)
{
(*pITC)((LPVOID)LoaderParams->ImageBase, DLL_PROCESS_ATTACH, NULL);
pITC++;
}
}
}
}
#endif // CALL_TLS
// ???1
PIMAGE_BASE_RELOCATION pIBR = LoaderParams->BaseReloc;
// Calculate the delta
DWORD delta = (DWORD)((LPBYTE)LoaderParams->ImageBase - LoaderParams->NtHeaders->OptionalHeader.ImageBase);
// ???1
while (pIBR->VirtualAddress)
{
if (pIBR->SizeOfBlock >= sizeof(IMAGE_BASE_RELOCATION))
{
int count = (pIBR->SizeOfBlock - sizeof(IMAGE_BASE_RELOCATION)) / sizeof(WORD);
PWORD list = (PWORD)(pIBR + 1);
for (int i = 0; i < count; i++)
{
if (list[i])
{
PDWORD ptr = (PDWORD)((LPBYTE)LoaderParams->ImageBase + (pIBR->VirtualAddress + (list[i] & 0xFFF)));
*ptr += delta;
}
}
}
pIBR = (PIMAGE_BASE_RELOCATION)((LPBYTE)pIBR + pIBR->SizeOfBlock);
}
// Resolve DLL imports
PIMAGE_IMPORT_DESCRIPTOR pIID = LoaderParams->ImportDirectory;
while (pIID->Characteristics)
{
PIMAGE_THUNK_DATA OrigFirstThunk = (PIMAGE_THUNK_DATA)((LPBYTE)LoaderParams->ImageBase + pIID->OriginalFirstThunk);
PIMAGE_THUNK_DATA FirstThunk = (PIMAGE_THUNK_DATA)((LPBYTE)LoaderParams->ImageBase + pIID->FirstThunk);
HMODULE hModule = LoaderParams->fnLoadLibraryA((LPCSTR)LoaderParams->ImageBase + pIID->Name);
if (!hModule)
return FALSE;
while (OrigFirstThunk->u1.AddressOfData)
{
if (OrigFirstThunk->u1.Ordinal & IMAGE_ORDINAL_FLAG)
{
// Import by ordinal
DWORD Function = (DWORD)LoaderParams->fnGetProcAddress(hModule,
(LPCSTR)(OrigFirstThunk->u1.Ordinal & 0xFFFF));
if (!Function)
return FALSE;
FirstThunk->u1.Function = Function;
} else
{
// Import by name
PIMAGE_IMPORT_BY_NAME pIBN = (PIMAGE_IMPORT_BY_NAME)((LPBYTE)LoaderParams->ImageBase + OrigFirstThunk->u1.AddressOfData);
DWORD Function = (DWORD)LoaderParams->fnGetProcAddress(hModule, (LPCSTR)pIBN->Name);
if (!Function)
return FALSE;
FirstThunk->u1.Function = Function;
}
OrigFirstThunk++;
FirstThunk++;
}
pIID++;
}
// Call the entry point if it exists
if (LoaderParams->NtHeaders->OptionalHeader.AddressOfEntryPoint)
{
DLLMAIN EntryPoint = (DLLMAIN)((LPBYTE)LoaderParams->ImageBase + LoaderParams->NtHeaders->OptionalHeader.AddressOfEntryPoint);
// Call the entry point with exclusive parameters
return EntryPoint((HMODULE)LoaderParams->ImageBase, DLL_PROCESS_ATTACH | SIGNATURE, NULL);
}
return FALSE;
}
DWORD __stdcall Stub()
{
return 0;
}
BOOL APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR cmdLine, int cmdShow)
{
// Find CS:GO
DWORD ProcessID = FindPID(L"csgo.exe");
if (!ProcessID)
{
MessageBoxA(NULL, "Falied to load NEPS.\nYou need to run CS:GO before running the loader.", "NEPS", MB_OK | MB_ICONERROR);
return FALSE;
}
LOADERDATA LoaderParams;
HMODULE hModule = GetModuleHandleA(NULL);
HRSRC hResource = FindResourceA(hModule, MAKEINTRESOURCEA(IDR_BIN1), "BIN");
HGLOBAL hResData = LoadResource(hModule, hResource);
PVOID Buffer = LockResource(hResData);
// Target DLL's DOS Header
PIMAGE_DOS_HEADER pDosHeader = (PIMAGE_DOS_HEADER)Buffer;
// Target DLL's NT Headers
PIMAGE_NT_HEADERS pNtHeaders = (PIMAGE_NT_HEADERS)((LPBYTE)Buffer + pDosHeader->e_lfanew);
// Opening target process.
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProcessID);
// Allocating memory for the DLL
PVOID ExecutableImage = VirtualAllocEx(hProcess, NULL, pNtHeaders->OptionalHeader.SizeOfImage,
MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
// Copy the headers to target process
WriteProcessMemory(hProcess, ExecutableImage, Buffer,
pNtHeaders->OptionalHeader.SizeOfHeaders, NULL);
// Target DLL's Section Header
PIMAGE_SECTION_HEADER pSectHeader = (PIMAGE_SECTION_HEADER)(pNtHeaders + 1);
// Copying sections of the dll to the target process
for (int i = 0; i < pNtHeaders->FileHeader.NumberOfSections; i++)
{
WriteProcessMemory(hProcess, (PVOID)((LPBYTE)ExecutableImage + pSectHeader[i].VirtualAddress),
(PVOID)((LPBYTE)Buffer + pSectHeader[i].PointerToRawData), pSectHeader[i].SizeOfRawData, NULL);
}
// Allocate memory for the loader code.
PVOID LoaderMemory = VirtualAllocEx(hProcess, NULL, 4096, MEM_COMMIT | MEM_RESERVE,
PAGE_EXECUTE_READWRITE);
LoaderParams.ImageBase = ExecutableImage;
LoaderParams.NtHeaders = (PIMAGE_NT_HEADERS)((LPBYTE)ExecutableImage + pDosHeader->e_lfanew);
LoaderParams.BaseReloc = (PIMAGE_BASE_RELOCATION)((LPBYTE)ExecutableImage
+ pNtHeaders->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress);
LoaderParams.ImportDirectory = (PIMAGE_IMPORT_DESCRIPTOR)((LPBYTE)ExecutableImage
+ pNtHeaders->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress);
LoaderParams.fnLoadLibraryA = LoadLibraryA;
LoaderParams.fnGetProcAddress = GetProcAddress;
// Write the loader information to target process
WriteProcessMemory(hProcess, LoaderMemory, &LoaderParams, sizeof(LOADERDATA),
NULL);
// Write the loader code to target process
WriteProcessMemory(hProcess, (PVOID)((LOADERDATA *)LoaderMemory + 1), LibraryLoader,
(DWORD)Stub - (DWORD)LibraryLoader, NULL);
// Create a remote thread to execute the loader code
HANDLE hThread = CreateRemoteThread(hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)((LOADERDATA *)LoaderMemory + 1),
LoaderMemory, 0, NULL);
// Wait for the loader to finish executing
WaitForSingleObject(hThread, INFINITE);
// Get loader's return value to determine DllMain's return value
DWORD dwReturnValue = 0;
GetExitCodeThread(hThread, &dwReturnValue);
// Inform user about errors
if (!dwReturnValue) MessageBoxA(NULL, "Falied to load NEPS.\nTry running the loader with administrator privileges.", "NEPS", MB_OK | MB_ICONERROR);
else MessageBoxA(NULL, "Success! NEPS is now loaded.", "NEPS", MB_OK | MB_ICONINFORMATION);
// Free the allocated loader code
VirtualFreeEx(hProcess, LoaderMemory, 0, MEM_RELEASE);
FreeResource(hResData);
return TRUE;
}
| 30.623134 | 149 | 0.7256 |
2793ae74e55517111e854a55bf1617dc3554c5a7 | 1,383 | cpp | C++ | lib/socket_server.cpp | itsPG/asiod | 29b56947ed1021f6d45a1275ef7b23fde7b94511 | [
"MIT"
] | 2 | 2019-01-29T08:17:19.000Z | 2019-01-29T08:52:20.000Z | lib/socket_server.cpp | itsPG/asiod | 29b56947ed1021f6d45a1275ef7b23fde7b94511 | [
"MIT"
] | null | null | null | lib/socket_server.cpp | itsPG/asiod | 29b56947ed1021f6d45a1275ef7b23fde7b94511 | [
"MIT"
] | null | null | null | // by PG, MIT license.
// this repo is for practicing boost::asio, not well tested, use it at your own risk.
#include "socket_server.h"
#include <cstdio>
#include "packet.h"
#include "session.h"
namespace PG {
socket_server::socket_server(asio::io_context::strand& strand, string path)
: strand_{strand}
, path_{std::move(path)}
{
std::remove(path_.c_str());
listen();
}
socket_server::~socket_server()
{
std::remove(path_.c_str());
}
void socket_server::listen()
{
cout << "socket_server::listen()" << endl;
asio::spawn(strand_, [&](asio::yield_context yield) {
asio::local::stream_protocol::acceptor acceptor{strand_.context(),
asio::local::stream_protocol::endpoint{path_}};
asio::local::stream_protocol::socket socket{strand_.context()};
while (true) {
boost::system::error_code error;
acceptor.async_accept(socket, yield[error]);
if (error) {
cout << "accept error" << endl;
} else {
cout << "accept one connection" << endl;
start_session(std::move(socket));
}
}
});
}
void socket_server::start_session(asio::local::stream_protocol::socket socket)
{
std::make_shared<session>(strand_, std::move(socket))->start();
}
} // namespace PG
| 25.611111 | 103 | 0.591468 |
2793c2a77cf4a5ac7aee8652fb62a6f3c0de1315 | 512 | cpp | C++ | PD/PD_HW3_1.cpp | A2Zntu/DSPA | 955202438ef2e0c963f98a0666cb6e7e30aa3e7a | [
"MIT"
] | null | null | null | PD/PD_HW3_1.cpp | A2Zntu/DSPA | 955202438ef2e0c963f98a0666cb6e7e30aa3e7a | [
"MIT"
] | null | null | null | PD/PD_HW3_1.cpp | A2Zntu/DSPA | 955202438ef2e0c963f98a0666cb6e7e30aa3e7a | [
"MIT"
] | null | null | null | #include <iostream>
using namespace std;
int main(){
int totalLen = 0, maxStop = 0, startStop = 0, endStop = 0;
cin >> totalLen >> maxStop >> startStop >> endStop;
int** array = new int*[totalLen-1];
for(int i = 0; i < totalLen-1; ++i)
array[i] = new int[totalLen-1];
for(int j = 0; j <= i; j++ ){
cin >> array[i][j];
}
}
cout << endl;
for(int i = 0; i < totalLen-1; i++){
for(int j = 0; j <= i; j++ ){
cout << array[i][j];
}
cout << endl;
}
cout << endl;
return 0;
}
| 21.333333 | 59 | 0.521484 |
27968bd02dbc519b7804b0cfac104f9ae9e73ca1 | 438 | hpp | C++ | graphics-library/include/scene/scene_shape.hpp | thetorine/opengl3-library | 3904d857fd1085ba2c57c4289eb0e0d123f11a14 | [
"MIT"
] | null | null | null | graphics-library/include/scene/scene_shape.hpp | thetorine/opengl3-library | 3904d857fd1085ba2c57c4289eb0e0d123f11a14 | [
"MIT"
] | null | null | null | graphics-library/include/scene/scene_shape.hpp | thetorine/opengl3-library | 3904d857fd1085ba2c57c4289eb0e0d123f11a14 | [
"MIT"
] | null | null | null | #pragma once
#include "geometry/shape.hpp"
#include "scene/scene_object.hpp"
namespace gl::scene {
class SceneShape : public SceneObject {
public:
static std::shared_ptr<SceneShape> create(const std::shared_ptr<geometry::Shape> &shape);
void drawSelf() const;
private:
std::shared_ptr<geometry::Shape> m_shape;
SceneShape(const std::shared_ptr<geometry::Shape> &shape);
};
} | 29.2 | 98 | 0.657534 |
27970b29072df60fbd329ebebae747b073c353d1 | 102,344 | cpp | C++ | net/config/netoc/netoc.cpp | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | net/config/netoc/netoc.cpp | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | net/config/netoc/netoc.cpp | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | //+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1997.
//
// File: N E T O C . C P P
//
// Contents: Functions for handling installation and removal of optional
// networking components.
//
// Notes:
//
// Author: danielwe 28 Apr 1997
//
//----------------------------------------------------------------------------
#include "pch.h"
#pragma hdrstop
#include "lancmn.h"
#include "ncatlui.h"
#include "nccm.h"
#include "ncdhcps.h"
#include "ncias.h"
#include "ncmisc.h"
#include "ncmsz.h"
#include "ncnetcfg.h"
#include "ncnetcon.h"
#include "ncoc.h"
#include "ncperms.h"
#include "ncreg.h"
#include "ncsetup.h"
#include "ncsfm.h"
#include "ncstring.h"
#include "ncsvc.h"
#include "ncxbase.h"
#include "netcfgn.h"
#include "netcon.h"
#include "netoc.h"
#include "netocp.h"
#include "netocx.h"
#include "resource.h"
#include "netocmsg.h"
//
// External component install functions.
// Add an entry in this table for each component that requires additional,
// non-common installation support.
//
// NOTE: The component name should match the section name in the INF.
//
#pragma BEGIN_CONST_SECTION
static const OCEXTPROCS c_aocepMap[] =
{
{ L"MacSrv", HrOcExtSFM },
{ L"DHCPServer", HrOcExtDHCPServer },
{ L"NetCMAK", HrOcExtCMAK },
{ L"NetCPS", HrOcExtCPS },
{ L"WINS", HrOcExtWINS },
{ L"DNS", HrOcExtDNS },
{ L"SNMP", HrOcExtSNMP },
{ L"IAS", HrOcExtIAS },
};
#pragma END_CONST_SECTION
static const INT c_cocepMap = celems(c_aocepMap);
// generic strings
static const WCHAR c_szUninstall[] = L"Uninstall";
static const WCHAR c_szServices[] = L"StartServices";
static const WCHAR c_szDependOnComp[] = L"DependOnComponents";
static const WCHAR c_szVersionSection[] = L"Version";
static const WCHAR c_szProvider[] = L"Provider";
static const WCHAR c_szDefManu[] = L"Unknown";
static const WCHAR c_szInfRef[] = L"SubCompInf";
static const WCHAR c_szDesc[] = L"OptionDesc";
static const WCHAR c_szNoDepends[] = L"NoDepends";
// static-IP verification
static const WCHAR c_szTcpipInterfacesPath[] =
L"System\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces";
static const WCHAR c_szEnableDHCP[] = L"EnableDHCP";
extern const WCHAR c_szOcMainSection[];
static const DWORD c_dwUpgradeMask = SETUPOP_WIN31UPGRADE |
SETUPOP_WIN95UPGRADE |
SETUPOP_NTUPGRADE;
OCM_DATA g_ocmData;
typedef list<NETOCDATA*> ListOcData;
ListOcData g_listOcData;
//+---------------------------------------------------------------------------
//
// Function: PnocdFindComponent
//
// Purpose: Looks for the given component name in the list of known
// components.
//
// Arguments:
// pszComponent [in] Name of component to lookup.
//
// Returns: Pointer to component's data.
//
// Author: danielwe 23 Feb 1998
//
// Notes:
//
NETOCDATA *PnocdFindComponent(PCWSTR pszComponent)
{
ListOcData::iterator iterList;
for (iterList = g_listOcData.begin();
iterList != g_listOcData.end();
iterList++)
{
NETOCDATA * pnocd;
pnocd = *iterList;
if (!lstrcmpiW(pnocd->pszComponentId, pszComponent))
{
return pnocd;
}
}
return NULL;
}
//+---------------------------------------------------------------------------
//
// Function: DeleteAllComponents
//
// Purpose: Removes all components from our list and frees all associated
// data.
//
// Arguments:
// (none)
//
// Returns: Nothing.
//
// Author: danielwe 23 Feb 1998
//
// Notes:
//
VOID DeleteAllComponents()
{
ListOcData::iterator iterList;
for (iterList = g_listOcData.begin();
iterList != g_listOcData.end();
iterList++)
{
NETOCDATA * pnocd;
pnocd = (*iterList);
if (pnocd->hinfFile)
{
SetupCloseInfFile(pnocd->hinfFile);
}
delete pnocd;
}
g_listOcData.erase(g_listOcData.begin(), g_listOcData.end());
}
//+---------------------------------------------------------------------------
//
// Function: AddComponent
//
// Purpose: Adds a component to our list.
//
// Arguments:
// pszComponent [in] Name of component to add.
// pnocd [in] Data to associate with component.
//
// Returns: S_OK if success, failure HRESULT otherwise
//
// Author: danielwe 23 Feb 1998
//
// Notes:
//
HRESULT AddComponent(PCWSTR pszComponent, NETOCDATA *pnocd)
{
HRESULT hr = S_OK;
Assert(pszComponent);
Assert(pnocd);
pnocd->pszComponentId = SzDupSz(pszComponent);
if (pnocd->pszComponentId)
{
try
{
g_listOcData.push_back(pnocd);
}
catch (bad_alloc)
{
MemFree(pnocd->pszComponentId);
hr = E_OUTOFMEMORY;
}
}
else
{
hr = E_OUTOFMEMORY;
}
TraceError("AddComponent", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: ParseAdditionalArguments
//
// Purpose: Parse additional commands following the /z option
// of sysocmgr.
//
// Arguments: Nothing.
//
// Returns: Nothing.
//
// Author: roelfc 19 Jul 2001
//
// Notes:
//
VOID ParseAdditionalArguments()
{
LPTSTR lpCmdLine = GetCommandLine();
TCHAR szTokens[] = TEXT("-/");
LPCTSTR lpszToken = NULL;
if (lpCmdLine)
{
// Search for additional parameters
lpszToken = wcspbrk(lpCmdLine, szTokens);
while (lpszToken != NULL)
{
// Check the correct option
switch (lpszToken[1])
{
case TEXT('z'):
case TEXT('Z'):
if ((lpszToken[2] == TEXT(':')) &&
(_wcsnicmp(&lpszToken[3],
SHOW_UNATTENDED_MESSAGES,
wcslen(SHOW_UNATTENDED_MESSAGES)) == 0) &&
(!iswgraph(lpszToken[3 + wcslen(SHOW_UNATTENDED_MESSAGES)])))
{
// Set the show unattended messages flag
g_ocmData.fShowUnattendedMessages = TRUE;
TraceTag(ttidNetOc, "Flag set to show messages in unattended mode");
}
break;
default:
break;
}
// Skip the last token found to find the next one
lpszToken = wcspbrk(&lpszToken[1], szTokens);
}
}
}
//+---------------------------------------------------------------------------
//
// Function: RegisterNetEventSource
//
// Purpose: Add netoc source name to the registry for
// event reporting.
//
// Arguments: Nothing.
//
// Returns: TRUE if success, FALSE otherwise
//
// Author: roelfc 21 May 2001
//
// Notes:
//
BOOL RegisterNetEventSource()
{
HKEY hk;
BOOL fSuccess = TRUE;
// Check if the key already exists
if (ERROR_SUCCESS != RegOpenKey(HKEY_LOCAL_MACHINE,
NETOC_REGISTRY_NAME NETOC_SERVICE_NAME,
&hk))
{
DWORD dwData;
WCHAR szBuf[80];
// Create the key as a subkey under the Application
// key in the EventLog registry key.
if (RegCreateKey(HKEY_LOCAL_MACHINE,
NETOC_REGISTRY_NAME NETOC_SERVICE_NAME,
&hk))
{
TraceTag(ttidNetOc, "RegisterEventSource: Could not create the registry key.");
return FALSE;
}
// Set the name of the message file.
lstrcpyW(szBuf, NETOC_DLL_NAME);
// Add the name to the EventMessageFile subkey.
if (RegSetValueEx(hk, // subkey handle
L"EventMessageFile", // value name
0, // must be zero
REG_EXPAND_SZ, // value type
(LPBYTE) szBuf, // pointer to value data
(2 * lstrlenW(szBuf)) + 1)) // length of value data
{
TraceTag(ttidNetOc, "RegisterEventSource: Could not set the event message file.");
fSuccess = FALSE;
goto RegisterExit;
}
// Set the supported event types in the TypesSupported subkey.
dwData = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE |
EVENTLOG_INFORMATION_TYPE;
if (RegSetValueEx(hk, // subkey handle
L"TypesSupported", // value name
0, // must be zero
REG_DWORD, // value type
(LPBYTE) &dwData, // pointer to value data
sizeof(DWORD))) // length of value data
{
TraceTag(ttidNetOc, "RegisterEventSource: Could not set the supported types.");
fSuccess = FALSE;
}
}
RegisterExit:
RegCloseKey(hk);
// Return result
return fSuccess;
}
//+---------------------------------------------------------------------------
//
// Function: NetOcSetupProcHelper
//
// Purpose: Main entry point for optional component installs
//
// Arguments:
// pvComponentId [in] Component Id (string)
// pvSubcomponentId [in] Sub component Id (string)
// uFunction [in] Function being performed
// uParam1 [in] First param to function
// pvParam2 [in, out] Second param to function
//
// Returns: Win32 error if failure
//
// Author: danielwe 17 Dec 1997
//
// Notes:
//
DWORD NetOcSetupProcHelper(LPCVOID pvComponentId, LPCVOID pvSubcomponentId,
UINT uFunction, UINT uParam1, LPVOID pvParam2)
{
TraceFileFunc(ttidNetOc);
HRESULT hr = S_OK;
UINT uiFlags;
switch (uFunction)
{
case OC_PREINITIALIZE:
return HrOnPreInitializeComponent(uParam1);
case OC_QUERY_CHANGE_SEL_STATE:
TraceTag(ttidNetOc, "OC_QUERY_CHANGE_SEL_STATE: %S, %ld, 0x%08X.",
pvSubcomponentId ? pvSubcomponentId : L"null", uParam1,
pvParam2);
if (FHasPermission(NCPERM_AddRemoveComponents))
{
uiFlags = PtrToUlong(pvParam2);
hr = HrOnQueryChangeSelState(reinterpret_cast<PCWSTR>(pvSubcomponentId),
uParam1, uiFlags);
if (S_OK == hr)
{
return TRUE;
}
}
else
{
ReportErrorHr(hr,
IDS_OC_NO_PERMS,
g_ocmData.hwnd,
SzLoadIds(IDS_OC_GENERIC_COMP));
}
return FALSE;
case OC_QUERY_SKIP_PAGE:
TraceTag(ttidNetOc, "OC_QUERY_SKIP_PAGE: %ld", uParam1);
return FOnQuerySkipPage(static_cast<OcManagerPage>(uParam1));
case OC_WIZARD_CREATED:
TraceTag(ttidNetOc, "OC_WIZARD_CREATED: 0x%08X", pvParam2);
OnWizardCreated(reinterpret_cast<HWND>(pvParam2));
break;
case OC_INIT_COMPONENT:
TraceTag(ttidNetOc, "OC_INIT_COMPONENT: %S", pvSubcomponentId ?
pvSubcomponentId : L"null");
hr = HrOnInitComponent(reinterpret_cast<PSETUP_INIT_COMPONENT>(pvParam2));
break;
case OC_ABOUT_TO_COMMIT_QUEUE:
TraceTag(ttidNetOc, "OC_ABOUT_TO_COMMIT_QUEUE: %S", pvSubcomponentId ?
pvSubcomponentId : L"null");
hr = HrOnPreCommitFileQueue(reinterpret_cast<PCWSTR>(pvSubcomponentId));
break;
case OC_CALC_DISK_SPACE:
// Ignore return value for now. This is not fatal anyway.
(VOID) HrOnCalcDiskSpace(reinterpret_cast<PCWSTR>(pvSubcomponentId),
uParam1, reinterpret_cast<HDSKSPC>(pvParam2));
break;
case OC_QUERY_STATE:
return DwOnQueryState(reinterpret_cast<PCWSTR>(pvSubcomponentId),
uParam1 == OCSELSTATETYPE_FINAL);
case OC_QUEUE_FILE_OPS:
TraceTag(ttidNetOc, "OC_QUEUE_FILE_OPS: %S, 0x%08X", pvSubcomponentId ?
pvSubcomponentId : L"null",
pvParam2);
hr = HrOnQueueFileOps(reinterpret_cast<PCWSTR>(pvSubcomponentId),
reinterpret_cast<HSPFILEQ>(pvParam2));
break;
case OC_COMPLETE_INSTALLATION:
TraceTag(ttidNetOc, "OC_COMPLETE_INSTALLATION: %S, %S", pvComponentId ?
pvComponentId : L"null",
pvSubcomponentId ? pvSubcomponentId : L"null");
hr = HrOnCompleteInstallation(reinterpret_cast<PCWSTR>(pvComponentId),
reinterpret_cast<PCWSTR>(pvSubcomponentId));
break;
case OC_QUERY_STEP_COUNT:
return DwOnQueryStepCount(reinterpret_cast<PCWSTR>(pvSubcomponentId));
case OC_CLEANUP:
OnCleanup();
break;
default:
break;
}
if (g_ocmData.sic.HelperRoutines.SetReboot && (NETCFG_S_REBOOT == hr))
{
// Request a reboot. Note we don't return the warning as the OCM call
// below handles it. Fall through and return NO_ERROR.
//
g_ocmData.sic.HelperRoutines.SetReboot(
g_ocmData.sic.HelperRoutines.OcManagerContext,
FALSE);
}
else if (FAILED(hr))
{
if (!g_ocmData.fErrorReported)
{
PCWSTR pszSubComponentId = reinterpret_cast<PCWSTR>(pvSubcomponentId);
TraceError("NetOcSetupProcHelper", hr);
if (pszSubComponentId)
{
NETOCDATA * pnocd;
pnocd = PnocdFindComponent(pszSubComponentId);
if (HRESULT_FROM_WIN32(ERROR_CANCELLED) != hr)
{
ReportErrorHr(hr,
UiOcErrorFromHr(hr),
g_ocmData.hwnd,
(pnocd)?(pnocd->strDesc.c_str()):
(SzLoadIds(IDS_OC_GENERIC_COMP)));
}
}
}
TraceError("NetOcSetupProcHelper", hr);
return DwWin32ErrorFromHr(hr);
}
return NO_ERROR;
}
//+---------------------------------------------------------------------------
//
// Function: HrOnPreInitializeComponent
//
// Purpose: Handles the OC_PREINITIALIZE function message.
//
// Arguments:
// uModesSupported [in] Modes supported by OCM (see OCManager spec)
//
// Returns: Flag indicating mode supported by netoc
//
// Author: roelfc 19 Jul 2001
//
// Notes:
//
DWORD HrOnPreInitializeComponent (UINT uModesSupported)
{
RegisterNetEventSource();
// Parse the additional command line arguments specific for netoc
ParseAdditionalArguments();
return OCFLAG_UNICODE;
}
//+---------------------------------------------------------------------------
//
// Function: HrOnInitComponent
//
// Purpose: Handles the OC_INIT_COMPONENT function message.
//
// Arguments:
// psic [in] Setup data. (see OCManager spec)
//
// Returns: S_OK if success, Win32 error otherwise
//
// Author: danielwe 23 Feb 1998
//
// Notes:
//
HRESULT HrOnInitComponent (PSETUP_INIT_COMPONENT psic)
{
HRESULT hr = S_OK;
if (OCMANAGER_VERSION <= psic->OCManagerVersion)
{
psic->ComponentVersion = OCMANAGER_VERSION;
CopyMemory(&g_ocmData.sic, (LPVOID)psic, sizeof(SETUP_INIT_COMPONENT));
}
else
{
hr = HRESULT_FROM_WIN32(ERROR_CALL_NOT_IMPLEMENTED);
}
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: OnWizardCreated
//
// Purpose: Handles the OC_WIZARD_CREATED function message.
//
// Arguments:
// hwnd [in] HWND of wizard (may not be NULL)
//
// Returns: Nothing.
//
// Author: danielwe 23 Feb 1998
//
// Notes:
//
VOID OnWizardCreated(HWND hwnd)
{
g_ocmData.hwnd = hwnd;
AssertSz(g_ocmData.hwnd, "Parent HWND is NULL!");
}
//+---------------------------------------------------------------------------
//
// Function: HrOnCalcDiskSpace
//
// Purpose: Handles the OC_CALC_DISK_SPACE function message.
//
// Arguments:
// pszSubComponentId [in] Name of component.
// fAdd [in] TRUE if disk space should be added to total
// FALSE if removed from total.
// hdskspc [in] Handle to diskspace struct.
//
// Returns: S_OK if success, Win32 error otherwise
//
// Author: danielwe 23 Feb 1998
//
// Notes:
//
HRESULT HrOnCalcDiskSpace(PCWSTR pszSubComponentId, BOOL fAdd,
HDSKSPC hdskspc)
{
HRESULT hr = S_OK;
DWORD dwErr;
NETOCDATA * pnocd;
pnocd = PnocdFindComponent(pszSubComponentId);
if (!pnocd)
{
hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
}
if (SUCCEEDED(hr))
{
TraceTag(ttidNetOc, "Calculating disk space for %S...",
pszSubComponentId);
hr = HrEnsureInfFileIsOpen(pszSubComponentId, *pnocd);
if (SUCCEEDED(hr))
{
if (fAdd)
{
dwErr = SetupAddInstallSectionToDiskSpaceList(hdskspc,
pnocd->hinfFile,
NULL,
pszSubComponentId,
0, 0);
}
else
{
dwErr = SetupRemoveInstallSectionFromDiskSpaceList(hdskspc,
pnocd->hinfFile,
NULL,
pszSubComponentId,
0, 0);
}
if (!dwErr)
{
hr = HrFromLastWin32Error();
}
}
}
TraceError("HrOnCalcDiskSpace", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: DwOnQueryState
//
// Purpose: Handles the OC_QUERY_STATE function message.
//
// Arguments:
// pszSubComponentId [in] Name of component.
// fFinal [in] TRUE if this is the final state query, FALSE
// if not
//
// Returns: SubcompOn - component should be checked "on"
// SubcompUseOcManagerDefault - use whatever OCManage thinks is
// the default
//
// Author: danielwe 23 Feb 1998
//
// Notes:
//
DWORD DwOnQueryState(PCWSTR pszSubComponentId, BOOL fFinal)
{
HRESULT hr = S_OK;
if (pszSubComponentId)
{
NETOCDATA * pnocd;
EINSTALL_TYPE eit;
pnocd = PnocdFindComponent(pszSubComponentId);
if (!pnocd)
{
pnocd = new NETOCDATA;
if(pnocd)
{
hr = AddComponent(pszSubComponentId, pnocd);
if (FAILED(hr))
{
TraceTag(ttidNetOc, "OC_QUERY_STATE: Failed to add component %s.",
pszSubComponentId);
delete pnocd;
pnocd = NULL;
}
}
}
if(pnocd)
{
if (fFinal)
{
if (pnocd->fFailedToInstall)
{
TraceTag(ttidNetOc, "OC_QUERY_STATE: %S failed to install so "
"we are turning it off", pszSubComponentId);
return SubcompOff;
}
}
else
{
hr = HrGetInstallType(pszSubComponentId, *pnocd, &eit);
if (SUCCEEDED(hr))
{
pnocd->eit = eit;
if ((eit == IT_INSTALL) || (eit == IT_UPGRADE))
{
TraceTag(ttidNetOc, "OC_QUERY_STATE: %S is ON",
pszSubComponentId);
return SubcompOn;
}
else if (eit == IT_REMOVE)
{
TraceTag(ttidNetOc, "OC_QUERY_STATE: %S is OFF",
pszSubComponentId);
return SubcompOff;
}
}
}
}
}
TraceTag(ttidNetOc, "OC_QUERY_STATE: %S is using default",
pszSubComponentId);
return SubcompUseOcManagerDefault;
}
//+---------------------------------------------------------------------------
//
// Function: HrEnsureInfFileIsOpen
//
// Purpose: Ensures that the INF file for the given component is open.
//
// Arguments:
// pszSubComponentId [in] Name of component.
// nocd [in, ref] Data associated with component.
//
// Returns: S_OK if success, Win32 error otherwise
//
// Author: danielwe 23 Feb 1998
//
// Notes:
//
HRESULT HrEnsureInfFileIsOpen(PCWSTR pszSubComponentId, NETOCDATA &nocd)
{
HRESULT hr = S_OK;
tstring strInf;
if (!nocd.hinfFile)
{
// Get component INF file name
hr = HrSetupGetFirstString(g_ocmData.sic.ComponentInfHandle,
pszSubComponentId, c_szInfRef,
&strInf);
if (SUCCEEDED(hr))
{
TraceTag(ttidNetOc, "Opening INF file %S...", strInf.c_str());
hr = HrSetupOpenInfFile(strInf.c_str(), NULL,
INF_STYLE_WIN4, NULL, &nocd.hinfFile);
if (SUCCEEDED(hr))
{
// Append in the layout.inf file
(VOID) SetupOpenAppendInfFile(NULL, nocd.hinfFile, NULL);
}
}
// This is a good time to cache away the component description as
// well.
(VOID) HrSetupGetFirstString(g_ocmData.sic.ComponentInfHandle,
pszSubComponentId, c_szDesc,
&nocd.strDesc);
}
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrOnPreCommitFileQueue
//
// Purpose: Handles the OC_ABOUT_TO_COMMIT_QUEUE function message.
//
// Arguments:
// pszSubComponentId [in] Name of component.
//
// Returns: S_OK if success, Win32 error otherwise
//
// Author: danielwe 9 Dec 1998
//
// Notes:
//
HRESULT HrOnPreCommitFileQueue(PCWSTR pszSubComponentId)
{
HRESULT hr = S_OK;
NETOCDATA * pnocd;
if (pszSubComponentId)
{
EINSTALL_TYPE eit;
pnocd = PnocdFindComponent(pszSubComponentId);
if (!pnocd)
{
hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
}
if (SUCCEEDED(hr))
{
hr = HrGetInstallType(pszSubComponentId, *pnocd, &eit);
if (SUCCEEDED(hr))
{
pnocd->eit = eit;
if (pnocd->eit == IT_REMOVE)
{
// Always use main install section
hr = HrStartOrStopAnyServices(pnocd->hinfFile,
pszSubComponentId, FALSE);
if (FAILED(hr))
{
// Don't report errors for non-existent services
if (HRESULT_FROM_WIN32(ERROR_SERVICE_DOES_NOT_EXIST) != hr)
{
// Don't bail removal if services couldn't be stopped.
if (!g_ocmData.fErrorReported)
{
// Report an error and continue the removal.
ReportErrorHr(hr,
IDS_OC_STOP_SERVICE_FAILURE,
g_ocmData.hwnd,
pnocd->strDesc.c_str());
}
}
hr = S_OK;
}
// We need to unregister DLLs before they get commited to the
// queue, otherwise we try to unregister a non-existent DLL.
if (SUCCEEDED(hr))
{
tstring strUninstall;
// Get the name of the uninstall section first
hr = HrSetupGetFirstString(pnocd->hinfFile,
pszSubComponentId,
c_szUninstall, &strUninstall);
if (SUCCEEDED(hr))
{
PCWSTR pszInstallSection;
pszInstallSection = strUninstall.c_str();
// Run the INF but only call the unregister function
//
hr = HrSetupInstallFromInfSection(g_ocmData.hwnd,
pnocd->hinfFile,
pszInstallSection,
SPINST_UNREGSVR,
NULL, NULL, 0, NULL,
NULL, NULL, NULL);
}
else
{
// Uninstall may not be present
hr = S_OK;
}
}
}
}
}
}
TraceError("HrOnPreCommitFileQueue", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrOnQueueFileOps
//
// Purpose: Handles the OC_QUEUE_FILE_OPS function message.
//
// Arguments:
// pszSubComponentId [in] Name of component.
// hfq [in] Handle to file queue struct.
//
// Returns: S_OK if success, Win32 error otherwise
//
// Author: danielwe 23 Feb 1998
//
// Notes:
//
HRESULT HrOnQueueFileOps(PCWSTR pszSubComponentId, HSPFILEQ hfq)
{
HRESULT hr = S_OK;
NETOCDATA * pnocd;
if (pszSubComponentId)
{
EINSTALL_TYPE eit;
pnocd = PnocdFindComponent(pszSubComponentId);
if (!pnocd)
{
hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
}
if (SUCCEEDED(hr))
{
hr = HrGetInstallType(pszSubComponentId, *pnocd, &eit);
if (SUCCEEDED(hr))
{
pnocd->eit = eit;
if ((pnocd->eit == IT_INSTALL) || (pnocd->eit == IT_UPGRADE) ||
(pnocd->eit == IT_REMOVE))
{
BOOL fSuccess = TRUE;
PCWSTR pszInstallSection;
tstring strUninstall;
AssertSz(hfq, "No file queue?");
hr = HrEnsureInfFileIsOpen(pszSubComponentId, *pnocd);
if (SUCCEEDED(hr))
{
if (pnocd->eit == IT_REMOVE)
{
// Get the name of the uninstall section first
hr = HrSetupGetFirstString(pnocd->hinfFile,
pszSubComponentId,
c_szUninstall,
&strUninstall);
if (SUCCEEDED(hr))
{
pszInstallSection = strUninstall.c_str();
}
else
{
if (hr == HRESULT_FROM_SETUPAPI(ERROR_LINE_NOT_FOUND))
{
// Uninstall section is not required.
hr = S_OK;
fSuccess = FALSE;
}
}
}
else
{
pszInstallSection = pszSubComponentId;
}
}
if (SUCCEEDED(hr) && fSuccess)
{
hr = HrCallExternalProc(pnocd, NETOCM_QUEUE_FILES,
(WPARAM)hfq, 0);
}
if (SUCCEEDED(hr))
{
TraceTag(ttidNetOc, "Queueing files for %S...",
pszSubComponentId);
hr = HrSetupInstallFilesFromInfSection(pnocd->hinfFile,
NULL, hfq,
pszInstallSection,
NULL, 0);
}
}
}
}
}
TraceError("HrOnQueueFileOps", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrOnCompleteInstallation
//
// Purpose: Handles the OC_COMPLETE_INSTALLATION function message.
//
// Arguments:
// pszComponentId [in] Top-level component name (will always be
// "NetOC" or NULL.
// pszSubComponentId [in] Name of component.
//
// Returns: S_OK if success, Win32 error otherwise
//
// Author: danielwe 23 Feb 1998
// omiller 28 March 2000 Added code to move the progress
// bar one tick for every component
// installed or removed.
//
// Notes:
//
HRESULT HrOnCompleteInstallation(PCWSTR pszComponentId,
PCWSTR pszSubComponentId)
{
HRESULT hr = S_OK;
// Make sure they're different. If not, it's the top level item and
// we don't want to do anything
if (pszSubComponentId && lstrcmpiW(pszSubComponentId, pszComponentId))
{
NETOCDATA * pnocd;
pnocd = PnocdFindComponent(pszSubComponentId);
if (!pnocd)
{
hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
}
if (SUCCEEDED(hr))
{
pnocd->fCleanup = FALSE;
if (pnocd->eit == IT_INSTALL || pnocd->eit == IT_REMOVE ||
pnocd->eit == IT_UPGRADE)
{
pnocd->pszSection = pszSubComponentId;
// Get component description
#if DBG
if (pnocd->eit == IT_INSTALL)
{
TraceTag(ttidNetOc, "Installing network OC %S...",
pszSubComponentId);
}
else if (pnocd->eit == IT_UPGRADE)
{
TraceTag(ttidNetOc, "Upgrading network OC %S...",
pszSubComponentId);
}
else if (pnocd->eit == IT_REMOVE)
{
TraceTag(ttidNetOc, "Removing network OC %S...",
pszSubComponentId);
}
#endif
hr = HrDoOCInstallOrUninstall(pnocd);
if (FAILED(hr) && pnocd->eit == IT_INSTALL)
{
// A failure during install means we have to clean up by doing
// an uninstall now. Report the appropriate error and do the
// remove. Note - Don't report the error if it's ERROR_CANCELLED,
// because they KNOW that they cancelled, and it's not really
// an error.
//
if (HRESULT_FROM_WIN32(ERROR_CANCELLED) != hr)
{
// Don't report the error a second time if the component
// has already put up error UI (and set this flag)
//
if (!g_ocmData.fErrorReported)
{
ReportErrorHr(hr,
UiOcErrorFromHr(hr),
g_ocmData.hwnd,
pnocd->strDesc.c_str());
}
}
g_ocmData.fErrorReported = TRUE;
// Now we're removing
pnocd->eit = IT_REMOVE;
pnocd->fCleanup = TRUE;
pnocd->fFailedToInstall = TRUE;
// eat the error. Haven't we troubled them enough? :(
(VOID) HrDoOCInstallOrUninstall(pnocd);
}
else
{
// Every time a component is installed,upgraded or removed, the progress
// bar is advanced by one tick. For every component that is being
// installed/removed/upgraded the OC manager asked netoc for how many ticks
// that component counts (OC_QUERY_STEP_COUNT). From this information
// the OC manger knows the relationship between tick and progress bar
// advancement.
g_ocmData.sic.HelperRoutines.TickGauge(g_ocmData.sic.HelperRoutines.OcManagerContext);
}
}
}
}
TraceError("HrOnCompleteInstallation", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: DwOnQueryStepCount
//
// Purpose: Handles the OC_QUERY_STEP_COUNT message.
// The OC manager is asking us how many ticks a component is worth.
// The number of ticks determines the distance the progress bar gets
// moved. For netoc all components installed/removed are one tick and
// all components that are unchanged are 0 ticks.
//
// Arguments:
// pszSubComponentId [in] Name of component.
//
// Returns: Number of ticks for progress bar to move
//
// Author: omiller 28 March 2000
//
//
DWORD DwOnQueryStepCount(PCWSTR pvSubcomponentId)
{
NETOCDATA * pnocd;
// Get the component
pnocd = PnocdFindComponent(reinterpret_cast<PCWSTR>(pvSubcomponentId));
if( pnocd )
{
// Check if the status of the component has changed.
if (pnocd->eit == IT_INSTALL || pnocd->eit == IT_REMOVE ||
pnocd->eit == IT_UPGRADE)
{
// Status of component has changed. For this component the OC manager
// will move the status bar by one tick.
return 1;
}
}
// The component has not changed. The progress bar will not move for this component.
return 0;
}
//+---------------------------------------------------------------------------
//
// Function: HrOnQueryChangeSelState
//
// Purpose: Handles the OC_QUERY_CHANGE_SEL_STATE function message.
// Enables and disables the next button. If no changes has
// been made to the selections the next button is disabled.
//
// Arguments:
// pszSubComponentId [in] Name of component.
// fSelected [in] TRUE if component was checked "on", FALSE if
// checked "off"
// uiFlags [in] Flags defined in ocmgr.doc
//
// Returns: S_OK if success, Win32 error otherwise
//
// Author: danielwe 23 Feb 1998
//
// Notes:
//
HRESULT HrOnQueryChangeSelState(PCWSTR pszSubComponentId, BOOL fSelected,
UINT uiFlags)
{
HRESULT hr = S_OK;
static int nItemsChanged=0;
NETOCDATA * pnocd;
if (fSelected && pszSubComponentId)
{
pnocd = PnocdFindComponent(pszSubComponentId);
if (pnocd)
{
// "NetOc" may be a subcomponent and we don't want to call this
// for it.
hr = HrCallExternalProc(pnocd, NETOCM_QUERY_CHANGE_SEL_STATE,
(WPARAM)(!!(uiFlags & OCQ_ACTUAL_SELECTION)),
0);
}
}
TraceError("HrOnQueryChangeSelState", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: FOnQuerySkipPage
//
// Purpose: Handles the OC_QUERY_SKIP_PAGE function message.
//
// Arguments:
// ocmPage [in] Which page we are asked to possibly skip.
//
// Returns: TRUE if component list page should be skipped, FALSE if not.
//
// Author: danielwe 23 Feb 1998
//
// Notes:
//
BOOL FOnQuerySkipPage(OcManagerPage ocmPage)
{
BOOL fUnattended;
BOOL fGuiSetup;
BOOL fWorkstation;
fUnattended = !!(g_ocmData.sic.SetupData.OperationFlags & SETUPOP_BATCH);
fGuiSetup = !(g_ocmData.sic.SetupData.OperationFlags & SETUPOP_STANDALONE);
fWorkstation = g_ocmData.sic.SetupData.ProductType == PRODUCT_WORKSTATION;
if ((fUnattended || fWorkstation) && fGuiSetup)
{
// We're in GUI mode setup and... we're unattended -OR- this is
// a workstation install
if (ocmPage == OcPageComponentHierarchy)
{
TraceTag(ttidNetOc, "NETOC: Skipping component list page "
"during GUI mode setup...");
TraceTag(ttidNetOc, "fUnattended = %s, fGuiSetup = %s, "
"fWorkstation = %s",
fUnattended ? "yes" : "no",
fGuiSetup ? "yes" : "no",
fWorkstation ? "yes" : "no");
// Make sure we never show the component list page during setup
return TRUE;
}
}
TraceTag(ttidNetOc, "Using component list page.");
TraceTag(ttidNetOc, "fUnattended = %s, fGuiSetup = %s, "
"fWorkstation = %s",
fUnattended ? "yes" : "no",
fGuiSetup ? "yes" : "no",
fWorkstation ? "yes" : "no");
return FALSE;
}
//+---------------------------------------------------------------------------
//
// Function: OnCleanup
//
// Purpose: Handles the OC_CLEANUP function message.
//
// Arguments:
// (none)
//
// Returns: Nothing
//
// Author: danielwe 23 Feb 1998
//
// Notes:
//
VOID OnCleanup()
{
TraceTag(ttidNetOc, "Cleaning up");
if (g_ocmData.hinfAnswerFile)
{
SetupCloseInfFile(g_ocmData.hinfAnswerFile);
TraceTag(ttidNetOc, "Closed answer file");
}
DeleteAllComponents();
}
//+---------------------------------------------------------------------------
//
// Function: HrGetSelectionState
//
// Purpose:
//
// Arguments:
// pszSubComponentId [in] Name of subcomponent
// uStateType [in] In OCManager doc.
//
// Returns: S_OK if component is selected, S_FALSE if not, or Win32 error
// otheriwse
//
// Author: danielwe 17 Dec 1997
//
// Notes:
//
HRESULT HrGetSelectionState(PCWSTR pszSubComponentId, UINT uStateType)
{
HRESULT hr = S_OK;
BOOL fInstall;
fInstall = g_ocmData.sic.HelperRoutines.
QuerySelectionState(g_ocmData.sic.HelperRoutines.OcManagerContext,
pszSubComponentId, uStateType);
if (!fInstall)
{
// Still not sure of the state
hr = HrFromLastWin32Error();
if (SUCCEEDED(hr))
{
// Ok now we know
hr = S_FALSE;
}
}
else
{
hr = S_OK;
}
TraceError("HrGetSelectionState", (S_FALSE == hr) ? S_OK : hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrGetInstallType
//
// Purpose: Determines whether the given component is being installed or
// removed and stores the result in the given structure.
//
// Arguments:
// pszSubComponentId [in] Component being queried
// nocd [in, ref] Net OC Data.
// peit [out] Returns the install type
//
// Returns: S_OK if success, Win32 error otherwise
//
// Author: danielwe 16 Dec 1997
//
// Notes: If the function fails, the eit member is unreliable
//
HRESULT HrGetInstallType(PCWSTR pszSubComponentId, NETOCDATA &nocd,
EINSTALL_TYPE *peit)
{
HRESULT hr = S_OK;
Assert(peit);
Assert(pszSubComponentId);
*peit = IT_UNKNOWN;
if (g_ocmData.sic.SetupData.OperationFlags & SETUPOP_BATCH)
{
// In batch mode (upgrade or unattended install), install flag is
// determined from answer file not from selection state.
// assume no change
*peit = IT_NO_CHANGE;
if (!g_ocmData.hinfAnswerFile)
{
// Open the answer file
hr = HrSetupOpenInfFile(g_ocmData.sic.SetupData.UnattendFile, NULL,
INF_STYLE_OLDNT | INF_STYLE_WIN4, NULL,
&g_ocmData.hinfAnswerFile);
}
if (SUCCEEDED(hr))
{
DWORD dwValue = 0;
// First query for a special value called "NoDepends" which, if
// present, means that the DependOnComponents line will be IGNORED
// for ALL network optional components for this install. This is
// because NetCfg may invoke the OC Manager to install an optional
// component and if that component has DependOnComponents, it will
// turn around and try to instantiate another INetCfg and that
// will fail because one instance is already running. This case
// is rare, though.
//
hr = HrSetupGetFirstDword(g_ocmData.hinfAnswerFile,
c_szOcMainSection, c_szNoDepends,
&dwValue);
if (SUCCEEDED(hr) && dwValue)
{
TraceTag(ttidNetOc, "Found the special 'NoDepends'"
" keyword in the answer file. DependOnComponents "
"will be ignored from now on");
g_ocmData.fNoDepends = TRUE;
}
else
{
TraceTag(ttidNetOc, "Didn't find the special 'NoDepends'"
" keyword in the answer file");
hr = S_OK;
}
hr = HrSetupGetFirstDword(g_ocmData.hinfAnswerFile,
c_szOcMainSection, pszSubComponentId,
&dwValue);
if (SUCCEEDED(hr))
{
// This component was installed before, so we should
// return that this component should be checked on
if (dwValue)
{
TraceTag(ttidNetOc, "Optional component %S was "
"previously installed or is being added thru"
" unattended install.", pszSubComponentId);
if (g_ocmData.sic.SetupData.OperationFlags & SETUPOP_NTUPGRADE)
{
// If we're upgrading NT, then this optional component
// does exist but it needs to be upgraded
*peit = IT_UPGRADE;
}
else
{
// Otherwise (even if Win3.1 or Win95 upgrade) it's like
// we're fresh installing the optional component
*peit = IT_INSTALL;
}
}
else
{
// Answer file contains something like WINS=0
hr = HrGetSelectionState(pszSubComponentId,
OCSELSTATETYPE_ORIGINAL);
if (S_OK == hr)
{
// Only set state to remove if the component was
// previously installed.
//
*peit = IT_REMOVE;
}
}
}
}
hr = S_OK;
// If the answer file was opened successfully and if the
// a section was found for the pszSubComponentId, *peit
// will be either IT_INSTALL, IT_UPGRADE or IT_REMOVE.
// Nothing needs to be done for any of these *peit values.
// However, if the answerfile could not be opened or if
// no section existed in the answer file for the pszSubComponentId
// *peit will have the value IT_NO_CHANGE. For this scenario,
// if the corresponding subComponent is currently installed,
// we should upgrade it. The following if addresses this scenario.
if (*peit == IT_NO_CHANGE)
{
// Still not going to install, because this is an upgrade
hr = HrGetSelectionState(pszSubComponentId,
OCSELSTATETYPE_ORIGINAL);
if (S_OK == hr)
{
// If originally selected and not in answer file, this is an
// upgrade of this component
*peit = IT_UPGRADE;
}
}
}
else // This is standalone (post-setup) mode
{
hr = HrGetSelectionState(pszSubComponentId, OCSELSTATETYPE_ORIGINAL);
if (SUCCEEDED(hr))
{
HRESULT hrT;
hrT = HrGetSelectionState(pszSubComponentId,
OCSELSTATETYPE_CURRENT);
if (SUCCEEDED(hrT))
{
if (hrT != hr)
{
// wasn't originally installed so...
*peit = (hrT == S_OK) ? IT_INSTALL : IT_REMOVE;
}
else
{
// was originally checked
*peit = IT_NO_CHANGE;
}
}
else
{
hr = hrT;
}
}
}
AssertSz(FImplies(SUCCEEDED(hr), *peit != IT_UNKNOWN), "Succeeded "
"but we never found out the install type!");
if (SUCCEEDED(hr))
{
hr = S_OK;
#if DBG
const CHAR *szInstallType;
switch (*peit)
{
case IT_NO_CHANGE:
szInstallType = "no change";
break;
case IT_INSTALL:
szInstallType = "install";
break;
case IT_UPGRADE:
szInstallType = "upgrade";
break;
case IT_REMOVE:
szInstallType = "remove";
break;
default:
AssertSz(FALSE, "Unknown install type!");
break;
}
TraceTag(ttidNetOc, "Install type of %S is %s.", pszSubComponentId,
szInstallType);
#endif
}
TraceError("HrGetInstallType", hr);
return hr;
}
#if DBG
PCWSTR SzFromOcUmsg(UINT uMsg)
{
switch (uMsg)
{
case NETOCM_PRE_INF:
return L"NETOCM_PRE_INF";
case NETOCM_POST_INSTALL:
return L"NETOCM_POST_INSTALL";
case NETOCM_QUERY_CHANGE_SEL_STATE:
return L"NETOCM_QUERY_CHANGE_SEL_STATE";
case NETOCM_QUEUE_FILES:
return L"NETOCM_QUEUE_FILES";
default:
return L"**unknown**";
}
}
#else
#define SzFromOcUmsg(x) (VOID)0
#endif
//+---------------------------------------------------------------------------
//
// Function: HrCallExternalProc
//
// Purpose: Calls a component's external function as defined by
// the table at the top of this file. This enables a component
// to perform additional installation tasks that are not common
// to other components.
//
// Arguments:
// pnocd [in] Pointer to Net OC Data
//
// Returns: S_OK if successful, Win32 error code otherwise.
//
// Author: danielwe 5 May 1997
//
// Notes:
//
HRESULT HrCallExternalProc(PNETOCDATA pnocd, UINT uMsg, WPARAM wParam,
LPARAM lParam)
{
HRESULT hr = S_OK;
INT iaocep;
BOOL fFound = FALSE;
AssertSz(pnocd, "Bad pnocd in HrCallExternalProc");
for (iaocep = 0; iaocep < c_cocepMap; iaocep++)
{
if (!lstrcmpiW(c_aocepMap[iaocep].pszComponentName,
pnocd->pszComponentId))
{
TraceTag(ttidNetOc, "Calling external procedure for %S. uMsg = %S"
" wParam = %08X,"
" lParam = %08X", c_aocepMap[iaocep].pszComponentName,
SzFromOcUmsg(uMsg), wParam, lParam);
// This component has an external proc. Call it now.
hr = c_aocepMap[iaocep].pfnHrOcExtProc(pnocd, uMsg,
wParam, lParam);
fFound = TRUE;
// Don't try to call any other functions
break;
}
}
if (FALSE == fFound)
{
TraceTag(ttidNetOc, "HrCallExternalProc - did not find a matching Proc for %S",
pnocd->pszComponentId);
}
TraceError("HrCallExternalProc", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrInstallOrRemoveNetCfgComponent
//
// Purpose: Utility function for use by optional components that wish to
// install a NetCfg component from within their own install.
//
// Arguments:
// pnocd [in] Pointer to NETOC data
// pszComponentId [in] Component ID of NetCfg component to install.
// This can be found in the netinfid.cpp file.
// pszManufacturer [in] Manufacturer name of component doing the
// installing (*this* component). Should always
// be "Microsoft".
// pszProduct [in] Short name of product for this component.
// Should be something like "MacSrv".
// pszDisplayName [in] Display name of this product. Should be
// something like "Services For Macintosh".
// rguid [in] class GUID of the component being installed
//
// Returns: S_OK if successful, Win32 error code otherwise.
//
// Author: danielwe 6 May 1997
//
// Notes:
//
HRESULT HrInstallOrRemoveNetCfgComponent(PNETOCDATA pnocd,
PCWSTR pszComponentId,
PCWSTR pszManufacturer,
PCWSTR pszProduct,
PCWSTR pszDisplayName,
const GUID& rguid)
{
HRESULT hr = S_OK;
INetCfg * pnc;
NETWORK_INSTALL_PARAMS nip = {0};
BOOL fReboot = FALSE;
nip.dwSetupFlags = FInSystemSetup() ? NSF_PRIMARYINSTALL :
NSF_POSTSYSINSTALL;
hr = HrOcGetINetCfg(pnocd, TRUE, &pnc);
if (SUCCEEDED(hr))
{
if (pnocd->eit == IT_INSTALL || pnocd->eit == IT_UPGRADE)
{
if (*pszComponentId == L'*')
{
// Advance past the *
pszComponentId++;
// Install OBO user instead
TraceTag(ttidNetOc, "Installing %S on behalf of the user",
pszComponentId);
hr = HrInstallComponentOboUser(pnc, &nip, rguid,
pszComponentId, NULL);
}
else
{
TraceTag(ttidNetOc, "Installing %S on behalf of %S",
pszComponentId, pnocd->pszSection);
hr = HrInstallComponentOboSoftware(pnc, &nip,
rguid,
pszComponentId,
pszManufacturer,
pszProduct,
pszDisplayName,
NULL);
}
}
else
{
AssertSz(pnocd->eit == IT_REMOVE, "Invalid install action!");
TraceTag(ttidNetOc, "Removing %S on behalf of %S",
pszComponentId, pnocd->pszSection);
hr = HrRemoveComponentOboSoftware(pnc,
rguid,
pszComponentId,
pszManufacturer,
pszProduct,
pszDisplayName);
if (NETCFG_S_REBOOT == hr)
{
// Save off the fact that we need to reboot
fReboot = TRUE;
}
// Don't care about the return value here. If we can't remove a
// dependent component, we can't do anything about it so we should
// still continue the removal of the OC.
//
else if (FAILED(hr))
{
TraceTag(ttidError, "Failed to remove %S on behalf of %S!! "
"Error is 0x%08X",
pszComponentId, pnocd->pszSection, hr);
hr = S_OK;
}
}
if (SUCCEEDED(hr))
{
hr = pnc->Apply();
}
(VOID) HrUninitializeAndReleaseINetCfg(TRUE, pnc, TRUE);
}
if (SUCCEEDED(hr) && fReboot)
{
// If all went well and we needed to reboot, set hr back.
hr = NETCFG_S_REBOOT;
}
TraceError("HrInstallOrRemoveNetCfgComponent", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrInstallOrRemoveServices
//
// Purpose: Given an install section, installs (or removes) NT services
// from the section.
//
// Arguments:
// hinf [in] Handle to INF file.
// pszSectionName [in] Name of section to use.
//
// Returns: S_OK if successful, WIN32 HRESULT if not.
//
// Author: danielwe 23 Apr 1997
//
// Notes:
//
HRESULT HrInstallOrRemoveServices(HINF hinf, PCWSTR pszSectionName)
{
static const WCHAR c_szDotServices[] = L"."INFSTR_SUBKEY_SERVICES;
HRESULT hr = S_OK;
PWSTR pszServicesSection;
const DWORD c_cchServices = celems(c_szDotServices);
DWORD cchName;
// Look for <szSectionName>.Services to install any NT
// services if they exist.
cchName = c_cchServices + lstrlenW(pszSectionName);
pszServicesSection = new WCHAR [cchName];
if(pszServicesSection)
{
lstrcpyW(pszServicesSection, pszSectionName);
lstrcatW(pszServicesSection, c_szDotServices);
if (!SetupInstallServicesFromInfSection(hinf, pszServicesSection, 0))
{
hr = HrFromLastWin32Error();
if (hr == HRESULT_FROM_SETUPAPI(ERROR_SECTION_NOT_FOUND))
{
// No problem if section was not found
hr = S_OK;
}
}
delete [] pszServicesSection;
}
else
{
hr = E_OUTOFMEMORY;
}
TraceError("HrInstallOrRemoveServices", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrHandleOCExtensions
//
// Purpose: Handles support for all optional component extensions to the
// INF file format.
//
// Arguments:
// hinfFile [in] handle to INF to process
// pszInstallSection [in] Install section to process
//
// Returns: S_OK if success, setup API HRESULT otherwise
//
// Author: danielwe 28 Apr 1997
//
// Notes:
//
HRESULT HrHandleOCExtensions(HINF hinfFile, PCWSTR pszInstallSection)
{
HRESULT hr = S_OK;
// There's now common code to do this, so simply make a call to that code.
//
hr = HrProcessAllINFExtensions(hinfFile, pszInstallSection);
TraceError("HrHandleOCExtensions", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrInstallOrRemoveDependOnComponents
//
// Purpose: Handles installation or removal of any NetCfg components that
// the optional component being installed is dependent upon.
//
// Arguments:
// pnocd [in] Pointer to NETOC data
// hinf [in] Handle to INF file to process.
// pszInstallSection [in] Section name to install from.
// pszDisplayName [in] Display name of component being installed.
//
// Returns: S_OK if success, setup API HRESULT otherwise
//
// Author: danielwe 17 Jun 1997
//
// Notes:
//
HRESULT HrInstallOrRemoveDependOnComponents(PNETOCDATA pnocd,
HINF hinf,
PCWSTR pszInstallSection,
PCWSTR pszDisplayName)
{
HRESULT hr = S_OK;
PWSTR mszDepends;
tstring strManufacturer;
PCWSTR pszManufacturer;
Assert(pnocd);
hr = HrSetupGetFirstString(hinf, c_szVersionSection, c_szProvider,
&strManufacturer);
if (S_OK == hr)
{
pszManufacturer = strManufacturer.c_str();
}
else
{
// No provider found, use default
hr = S_OK;
pszManufacturer = c_szDefManu;
}
hr = HrSetupGetFirstMultiSzFieldWithAlloc(hinf, pszInstallSection,
c_szDependOnComp,
&mszDepends);
if (S_OK == hr)
{
PCWSTR pszComponent;
pszComponent = mszDepends;
while (SUCCEEDED(hr) && *pszComponent)
{
const GUID * pguidClass;
PCWSTR pszComponentActual = pszComponent;
if (*pszComponent == L'*')
{
pszComponentActual = pszComponent + 1;
}
if (FClassGuidFromComponentId(pszComponentActual, &pguidClass))
{
hr = HrInstallOrRemoveNetCfgComponent(pnocd,
pszComponent,
pszManufacturer,
pszInstallSection,
pszDisplayName,
*pguidClass);
}
#ifdef DBG
else
{
TraceTag(ttidNetOc, "Error in INF, Component %S not found!",
pszComponent);
}
#endif
pszComponent += lstrlenW(pszComponent) + 1;
}
delete mszDepends;
}
else if (hr == HRESULT_FROM_SETUPAPI(ERROR_LINE_NOT_FOUND))
{
// Section is not required.
hr = S_OK;
}
TraceError("HrInstallOrRemoveDependOnComponents", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrRunInfSection
//
// Purpose: Runs the given INF section, but doesn't copy files
//
// Arguments:
// hinf [in] Handle to INF to run
// pnocd [in] NetOC Data
// pszInstallSection [in] Install section to run
// dwFlags [in] Install flags (SPINST_*)
//
// Returns: S_OK if success, SetupAPI or Win32 error otherwise
//
// Author: danielwe 16 Dec 1997
//
// Notes:
//
HRESULT HrRunInfSection(HINF hinf, PNETOCDATA pnocd,
PCWSTR pszInstallSection, DWORD dwFlags)
{
HRESULT hr;
// Now we run all sections but CopyFiles and UnregisterDlls because we
// did that earlier
//
hr = HrSetupInstallFromInfSection(g_ocmData.hwnd, hinf,
pszInstallSection,
dwFlags & ~SPINST_FILES & ~SPINST_UNREGSVR,
NULL, NULL, 0, NULL,
NULL, NULL, NULL);
TraceError("HrRunInfSection", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrStartOrStopAnyServices
//
// Purpose: Starts or stops any services the INF has requested via the
// Services value in the main install section.
//
// Arguments:
// hinf [in] handle to INF to process
// pszSection [in] Install section to process
// fStart [in] TRUE to start, FALSE to stop.
//
// Returns: S_OK or Win32 error code.
//
// Author: danielwe 17 Jun 1997
//
// Notes: Services are stopped in the same order they are started.
//
HRESULT HrStartOrStopAnyServices(HINF hinf, PCWSTR pszSection, BOOL fStart)
{
HRESULT hr;
PWSTR mszServices;
hr = HrSetupGetFirstMultiSzFieldWithAlloc(hinf, pszSection,
c_szServices, &mszServices);
if (SUCCEEDED(hr))
{
// Build an array of pointers to strings that point at the
// strings of the multi-sz. This is needed because the API to
// stop and start services takes an array of pointers to strings.
//
UINT cServices;
PCWSTR* apszServices;
hr = HrCreateArrayOfStringPointersIntoMultiSz(
mszServices,
&cServices,
&apszServices);
if (SUCCEEDED(hr))
{
CServiceManager scm;
if (fStart)
{
hr = scm.HrStartServicesAndWait(cServices, apszServices);
}
else
{
hr = scm.HrStopServicesAndWait(cServices, apszServices);
}
MemFree (apszServices);
}
delete mszServices;
}
else if (hr == HRESULT_FROM_SETUPAPI(ERROR_LINE_NOT_FOUND))
{
// this is a totally optional thing
hr = S_OK;
}
TraceError("HrStartOrStopAnyServices", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrDoActualInstallOrUninstall
//
// Purpose: Handles main portion of install or uninstall for an optional
// network component.
//
// Arguments:
// hinf [in] handle to INF to process
// pnocd [in] Pointer to NETOC data (hwnd, poc)
// pszInstallSection [in] Install section to process
//
// Returns: S_OK if success, setup API HRESULT otherwise
//
// Author: danielwe 17 Jun 1997
//
// Notes:
//
HRESULT HrDoActualInstallOrUninstall(HINF hinf,
PNETOCDATA pnocd,
PCWSTR pszInstallSection)
{
HRESULT hr = S_OK;
BOOL fReboot = FALSE;
AssertSz(pszInstallSection, "Install section is NULL!");
AssertSz(pnocd, "Bad pnocd in HrDoActualInstallOrUninstall");
//AssertSz(g_ocmData.hwnd, "Bad g_ocmData.hwnd in HrDoActualInstallOrUninstall");
if (pnocd->eit == IT_REMOVE)
{
hr = HrCallExternalProc(pnocd, NETOCM_PRE_INF, 0, 0);
if (SUCCEEDED(hr))
{
// Now process the component's INF file
//
TraceTag(ttidNetOc, "Running INF section %S", pszInstallSection);
hr = HrRunInfSection(hinf, pnocd, pszInstallSection, SPINST_ALL);
}
}
else
{
hr = HrCallExternalProc(pnocd, NETOCM_PRE_INF, 0, 0);
if (SUCCEEDED(hr))
{
// Process the component's INF file
//
TraceTag(ttidNetOc, "Running INF section %S", pszInstallSection);
hr = HrRunInfSection(hinf, pnocd, pszInstallSection,
SPINST_ALL & ~SPINST_REGSVR);
}
}
if (SUCCEEDED(hr))
{
// Must install or remove services first
TraceTag(ttidNetOc, "Running HrInstallOrRemoveServices for %S",
pszInstallSection);
hr = HrInstallOrRemoveServices(hinf, pszInstallSection);
if (SUCCEEDED(hr))
{
// Bug #383239: Wait till services are installed before
// running the RegisterDlls section
//
hr = HrRunInfSection(hinf, pnocd, pszInstallSection,
SPINST_REGSVR);
}
if (SUCCEEDED(hr))
{
TraceTag(ttidNetOc, "Running HrHandleOCExtensions for %S",
pszInstallSection);
hr = HrHandleOCExtensions(hinf, pszInstallSection);
if (SUCCEEDED(hr))
{
if (!g_ocmData.fNoDepends)
{
// Now install or remove any NetCfg components that this
// component requires
TraceTag(ttidNetOc, "Running "
"HrInstallOrRemoveDependOnComponents for %S",
pnocd->pszSection);
hr = HrInstallOrRemoveDependOnComponents(pnocd,
hinf,
pnocd->pszSection,
pnocd->strDesc.c_str());
if (NETCFG_S_REBOOT == hr)
{
fReboot = TRUE;
}
}
else
{
AssertSz(g_ocmData.sic.SetupData.OperationFlags &
SETUPOP_BATCH, "How can NoDepends be set??");
TraceTag(ttidNetOc, "NOT Running "
"HrInstallOrRemoveDependOnComponents for %S "
"because NoDepends was set in the answer file.",
pnocd->pszSection);
}
if (SUCCEEDED(hr))
{
// Now call any external installation support...
hr = HrCallExternalProc(pnocd, NETOCM_POST_INSTALL,
0, 0);
if (SUCCEEDED(hr))
{
if (pnocd->eit == IT_INSTALL && !FInSystemSetup())
{
// ... and finally, start any services they've
// requested
hr = HrStartOrStopAnyServices(hinf,
pszInstallSection, TRUE);
{
if (FAILED(hr))
{
UINT ids = IDS_OC_START_SERVICE_FAILURE;
if (HRESULT_FROM_WIN32(ERROR_TIMEOUT) == hr)
{
ids = IDS_OC_START_TOOK_TOO_LONG;
}
// Don't bail installation if service
// couldn't be started. Report an error
// and continue the install.
ReportErrorHr(hr, ids, g_ocmData.hwnd,
pnocd->strDesc.c_str());
hr = S_OK;
}
}
}
}
}
}
}
}
if ((S_OK == hr) && (fReboot))
{
hr = NETCFG_S_REBOOT;
}
TraceError("HrDoActualInstallOrUninstall", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrOCInstallOrUninstallFromINF
//
// Purpose: Handles installation of an Optional Component from its INF
// file.
//
// Arguments:
// pnocd [in] Pointer to NETOC data.
//
// Returns: S_OK if success, setup API HRESULT otherwise
//
// Author: danielwe 6 May 1997
//
// Notes:
//
HRESULT HrOCInstallOrUninstallFromINF(PNETOCDATA pnocd)
{
HRESULT hr = S_OK;
tstring strUninstall;
PCWSTR pszInstallSection = NULL;
BOOL fSuccess = TRUE;
Assert(pnocd);
if (pnocd->eit == IT_REMOVE)
{
// Get the name of the uninstall section first
hr = HrSetupGetFirstString(pnocd->hinfFile, pnocd->pszSection,
c_szUninstall, &strUninstall);
if (SUCCEEDED(hr))
{
pszInstallSection = strUninstall.c_str();
}
else
{
if (hr == HRESULT_FROM_SETUPAPI(ERROR_LINE_NOT_FOUND))
{
// Uninstall section is not required.
hr = S_OK;
}
fSuccess = FALSE;
}
}
else
{
pszInstallSection = pnocd->pszSection;
}
if (fSuccess)
{
hr = HrDoActualInstallOrUninstall(pnocd->hinfFile,
pnocd,
pszInstallSection);
}
TraceError("HrOCInstallOrUninstallFromINF", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrDoOCInstallOrUninstall
//
// Purpose: Installs or removes an optional networking component.
//
// Arguments:
// pnocd [in] Pointer to NETOC data
//
// Returns: S_OK for success, SetupAPI HRESULT error code otherwise.
//
// Author: danielwe 6 May 1997
//
// Notes:
//
HRESULT HrDoOCInstallOrUninstall(PNETOCDATA pnocd)
{
HRESULT hr = S_OK;
hr = HrOCInstallOrUninstallFromINF(pnocd);
TraceError("HrDoOCInstallOrUninstall", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: UiOcErrorFromHr
//
// Purpose: Maps a Win32 error code into an understandable error string.
//
// Arguments:
// hr [in] HRESULT to convert
//
// Returns: The resource ID of the string.
//
// Author: danielwe 9 Feb 1998
//
// Notes:
//
UINT UiOcErrorFromHr(HRESULT hr)
{
UINT uid;
AssertSz(FAILED(hr), "Don't call UiOcErrorFromHr if Hr didn't fail!");
switch (hr)
{
case HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND):
case HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND):
uid = IDS_OC_REGISTER_PROBLEM;
break;
case HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND):
uid = IDS_OC_FILE_PROBLEM;
break;
case NETCFG_E_NEED_REBOOT:
case HRESULT_FROM_WIN32(ERROR_SERVICE_MARKED_FOR_DELETE):
uid = IDS_OC_NEEDS_REBOOT;
break;
case HRESULT_FROM_WIN32(ERROR_CANCELLED):
uid = IDS_OC_USER_CANCELLED;
break;
case HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED):
uid = IDS_OC_NO_PERMISSION;
break;
default:
uid = IDS_OC_ERROR;
break;
}
return uid;
}
//+---------------------------------------------------------------------------
//
// Function: SzErrorToString
//
// Purpose: Converts an HRESULT into a displayable string.
//
// Arguments:
// hr [in] HRESULT value to convert.
//
// Returns: LPWSTR a dynamically allocated string to be freed with LocalFree
//
// Author: mbend 3 Apr 2000
//
// Notes: Attempts to use FormatMessage to convert the HRESULT to a string.
// If that fails, just convert the HRESULT to a hex string.
//
LPWSTR SzErrorToString(HRESULT hr)
{
LPWSTR pszErrorText = NULL;
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL, hr,
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),
(WCHAR*)&pszErrorText, 0, NULL);
if (pszErrorText)
{
// Strip off newline characters.
//
LPWSTR pchText = pszErrorText;
while (*pchText && (*pchText != L'\r') && (*pchText != L'\n'))
{
pchText++;
}
*pchText = 0;
return pszErrorText;
}
// We did't find anything so format the hex value
WCHAR szBuf[128];
wsprintfW(szBuf, L"0x%08x", hr);
WCHAR * szRet = reinterpret_cast<WCHAR*>(LocalAlloc(LMEM_FIXED, (lstrlenW(szBuf) + 1) * sizeof(WCHAR)));
if(szRet)
{
lstrcpyW(szRet, szBuf);
}
return szRet;
}
//+---------------------------------------------------------------------------
//
// Function: NcMsgBoxMc
//
// Purpose: Displays a message box using resource strings from
// the message resource file and using replaceable
// parameters.
//
// Arguments:
// hwnd [in] parent window handle
// unIdCaption [in] resource id of caption string
// (from .RC file)
// unIdFormat [in] resource id of text string (with %1, %2, etc.)
// (from .MC file)
// unStyle [in] standard message box styles
// ... [in] replaceable parameters (optional)
// (these must be PCWSTRs as that is all
// FormatMessage handles.)
//
// Returns: The return value of MessageBox()
//
// Author: roelfc 7 June 2001
//
// Notes: FormatMessage is used to do the parameter substitution.
// The unIdFormat resource id MUST be specified in the
// .MC resource file with a severity of either informational,
// warning or error.
//
NOTHROW
int
WINAPIV
NcMsgBoxMc(HWND hwnd,
UINT unIdCaption,
UINT unIdFormat,
UINT unStyle,
...)
{
PCWSTR pszCaption = SzLoadIds(unIdCaption);
// We report only valid message resources to prevent event log failures
AssertSz(STATUS_SEVERITY_VALUE(unIdFormat) != STATUS_SEVERITY_SUCCESS,
"Either the severity code is not set (information, warning or error),"
" or you passed a .RC resource id instead of a .MC resource id.");
PWSTR pszText = NULL;
va_list val;
va_start (val, unStyle);
FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_HMODULE,
_Module.GetResourceInstance(), unIdFormat, 0, (PWSTR)&pszText, 0, &val);
va_end (val);
if(!pszText)
{
// This is what MessageBox returns if it fails.
return 0;
}
INT nRet = MessageBox (hwnd, pszText, pszCaption, unStyle);
LocalFree (pszText);
return nRet;
}
//+---------------------------------------------------------------------------
//
// Function: ReportEventHrString
//
// Purpose: Reports an error, warning or informative message
// to the event log from an error description string.
//
// Arguments:
// pszErr [in] Error description string.
// ids [in] Resource ID of string to display.
// pszDesc [in] Description of component involved.
//
// Returns: S_OK, or valid Win32 error code.
//
// Author: roelfc 18 May 2001
//
// Notes: This function works slow since it calls the open and close
// eventlog source everytime. This should not have an effect
// since it only happens during errors.
// The string resource in ids must contain a %1 and %2 where %1
// is the name of the component, and %2 is the error code.
// The resource ID of the string to display MUST be defined
// in the .MC file, with a severity of either informational,
// warning or error. The Assert below prevents the incorrect
// use of .RC strings which will fail during event logging.
//
HRESULT ReportEventHrString(PCWSTR pszErr, INT ids, PCWSTR pszDesc)
{
HANDLE hEventLog;
WORD elt;
HRESULT hr = S_OK;
PCWSTR plpszSubStrings[2];
plpszSubStrings[0] = pszDesc;
plpszSubStrings[1] = pszErr;
// We report only valid message resources to prevent event log failures
AssertSz(STATUS_SEVERITY_VALUE(ids) != STATUS_SEVERITY_SUCCESS,
"Either the severity code is not set (information, warning or error),"
" or you passed a .RC resource id instead of a .MC resource id.");
// Determine the event log type
switch (STATUS_SEVERITY_VALUE(ids))
{
case STATUS_SEVERITY_WARNING:
elt = EVENTLOG_WARNING_TYPE;
break;
case STATUS_SEVERITY_ERROR:
elt = EVENTLOG_ERROR_TYPE;
break;
default:
// Default to informational
elt = EVENTLOG_INFORMATION_TYPE;
break;
}
hEventLog = RegisterEventSource(NULL, NETOC_SERVICE_NAME);
Assert(hEventLog);
if (hEventLog)
{
if (!ReportEvent(hEventLog,
elt,
0, // Event category
ids, // Message file full id
NULL,
sizeof(plpszSubStrings) / sizeof(plpszSubStrings[0]),
0,
plpszSubStrings,
NULL))
{
hr = HRESULT_FROM_WIN32(GetLastError());
}
DeregisterEventSource(hEventLog);
}
else
{
hr = HRESULT_FROM_WIN32(GetLastError());
}
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: ReportEventHrResult
//
// Purpose: Reports an error, warning or informative message
// to the event log from a result value.
//
// Arguments:
// hrv [in] HRESULT value to report.
// ids [in] Resource ID of string to display.
// pszDesc [in] Description of component involved.
//
// Returns: S_OK, or valid Win32 error code.
//
// Author: roelfc 18 May 2001
//
// Notes:
//
HRESULT ReportEventHrResult(HRESULT hrv, INT ids, PCWSTR pszDesc)
{
HRESULT hr = S_OK;
BOOL bCleanup = TRUE;
WCHAR * szText = SzErrorToString(hrv);
if(!szText)
{
szText = L"Out of memory!";
bCleanup = FALSE;
}
hr = ReportEventHrString(szText, ids, pszDesc);
if(bCleanup)
{
LocalFree(szText);
}
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: ReportErrorHr
//
// Purpose: Reports an error, warning or informative message
// to the user or event log.
//
// Arguments:
// hrv [in] HRESULT value to report.
// ids [in] Resource ID of string to display.
// hwnd [in] HWND of parent window.
// pszDesc [in] Description of component involved.
//
// Returns: S_OK, or valid Win32 error code.
//
// Author: danielwe 28 Apr 1997
//
// Notes: The string resource in ids must contain a %1 and %2 where %1
// is the name of the component, and %2 is the error code.
// The resource ID of the string to display MUST be defined
// in the .MC file, with a severity of either informational,
// warning or error. The Assert below prevents the incorrect
// use of .RC strings which will fail during event logging.
//
HRESULT ReportErrorHr(HRESULT hrv, INT ids, HWND hwnd, PCWSTR pszDesc)
{
DWORD dwRt;
HRESULT hr = S_OK;
// We report only valid message resources to prevent event log failures
AssertSz(STATUS_SEVERITY_VALUE(ids) != STATUS_SEVERITY_SUCCESS,
"Either the severity code is not set (information, warning or error),"
" or you passed a .RC resource id instead of a .MC resource id.");
// We can only display a message box in "attended" setup mode
// or when the caller overide with the /z:netoc_show_unattended_messages option,
// else we log the problem to the event log.
if ((g_ocmData.sic.SetupData.OperationFlags & SETUPOP_BATCH) &&
(!g_ocmData.fShowUnattendedMessages))
{
// In batch mode ("unattended") we need to report the error in the event log
hr = ReportEventHrResult(hrv, ids, pszDesc);
}
else
{
BOOL bCleanup = TRUE;
WCHAR * szText = SzErrorToString(hrv);
if(!szText)
{
szText = L"Out of memory!";
bCleanup = FALSE;
}
// Get the right icon from the type of message
switch (STATUS_SEVERITY_VALUE(ids))
{
case STATUS_SEVERITY_WARNING:
dwRt = MB_ICONWARNING;
break;
case STATUS_SEVERITY_ERROR:
dwRt = MB_ICONERROR;
break;
default:
// Default to informational
dwRt = MB_ICONINFORMATION;
break;
}
// We can display the error to the user
NcMsgBoxMc(hwnd, IDS_OC_CAPTION, ids, dwRt | MB_OK, pszDesc, szText);
if(bCleanup)
{
LocalFree(szText);
}
}
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrVerifyStaticIPPresent
//
// Purpose: Verify that at least one adapter has a static IP address.
// Both DHCP Server and WINS need to know this, as they need
// to bring up UI if this isn't the case. This function is, of
// course, a complete hack until we can get a properties
// interface hanging off of the components.
//
// Arguments:
// pnc [in] INetCfg interface to use
//
// Returns: S_OK, or valid Win32 error code.
//
// Author: jeffspr 19 Jun 1997
//
// Notes:
//
HRESULT HrVerifyStaticIPPresent(INetCfg *pnc)
{
HRESULT hr = S_OK;
HKEY hkeyInterfaces = NULL;
HKEY hkeyEnum = NULL;
INetCfgComponent* pncc = NULL;
HKEY hkeyTcpipAdapter = NULL;
PWSTR pszBindName = NULL;
Assert(pnc);
// Iterate the adapters in the system looking for non-virtual adapters
//
CIterNetCfgComponent nccIter(pnc, &GUID_DEVCLASS_NET);
while (S_OK == (hr = nccIter.HrNext(&pncc)))
{
DWORD dwFlags = 0;
// Get the adapter characteristics
//
hr = pncc->GetCharacteristics(&dwFlags);
if (SUCCEEDED(hr))
{
DWORD dwEnableValue = 0;
// If we're NOT a virtual adapter, THEN test for
// tcp/ip static IP
if (!(dwFlags & NCF_VIRTUAL))
{
WCHAR szRegPath[MAX_PATH+1];
// Get the component bind name
//
hr = pncc->GetBindName(&pszBindName);
if (FAILED(hr))
{
TraceTag(ttidError,
"Error getting bind name from component "
"in HrVerifyStaticIPPresent()");
goto Exit;
}
// Build the path to the TCP/IP instance key for his adapter
//
wsprintfW(szRegPath, L"%s\\%s",
c_szTcpipInterfacesPath, pszBindName);
// Open the key for this adapter.
//
hr = HrRegOpenKeyEx(HKEY_LOCAL_MACHINE,
szRegPath,
KEY_READ, &hkeyTcpipAdapter);
if (SUCCEEDED(hr))
{
// Read the EnableDHCP value.
//
hr = HrRegQueryDword(hkeyTcpipAdapter, c_szEnableDHCP,
&dwEnableValue);
if (FAILED(hr))
{
TraceTag(ttidError,
"Error reading the EnableDHCP value from "
"the enumerated key in "
"HrVerifyStaticIPPresent()");
goto Exit;
}
// If we've found a non-DHCP-enabled adapter.
//
if (0 == dwEnableValue)
{
// We have our man. Take a hike, and return S_OK,
// meaning that we had at least one good adapter.
// The enumerated key will get cleaned up at exit.
hr = S_OK;
goto Exit;
}
RegSafeCloseKey(hkeyTcpipAdapter);
hkeyTcpipAdapter = NULL;
}
else
{
// If the key wasn't found, we just don't have a
// binding to TCP/IP. This is fine, but we don't need
// to continue plodding down this path.
//
if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND))
{
hr = S_OK;
}
else
{
TraceTag(ttidError,
"Error opening adapter key in "
"HrVerifyStaticIPPresent()");
goto Exit;
}
}
}
}
if (pszBindName)
{
CoTaskMemFree(pszBindName);
pszBindName = NULL;
}
ReleaseObj (pncc);
pncc = NULL;
}
// If we haven't found an adapter, we'll have an S_FALSE returned from
// the HrNext. This is fine, because if we haven't found an adapter
// with a static IP address, this is exactly what we want to return.
// If we'd found one, we'd have set hr = S_OK, and dropped out of the
// loop.
Exit:
RegSafeCloseKey(hkeyTcpipAdapter);
if (pszBindName)
{
CoTaskMemFree(pszBindName);
pszBindName = NULL;
}
ReleaseObj(pncc);
TraceError("HrVerifyStaticIPPresent()", (hr == S_FALSE) ? S_OK : hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrCountConnections
//
// Purpose: Determines the number of LAN connections present and returns
// a pointer to an INetConnection object if only one connection
// is present.
//
// Arguments:
// ppconn [out] If only one connection is present, this returns it
//
// Returns: S_OK if no errors were found and at least one connection
// exists, S_FALSE if no connections exist, or a Win32 or OLE
// error code otherwise
//
// Author: danielwe 28 Jul 1998
//
// Notes:
//
HRESULT HrCountConnections(INetConnection **ppconn)
{
HRESULT hr = S_OK;
INetConnectionManager * pconMan;
Assert(ppconn);
*ppconn = NULL;
// Iterate all LAN connections
//
hr = HrCreateInstance(
CLSID_LanConnectionManager,
CLSCTX_SERVER | CLSCTX_NO_CODE_DOWNLOAD,
&pconMan);
TraceHr(ttidError, FAL, hr, FALSE, "HrCreateInstance");
if (SUCCEEDED(hr))
{
CIterNetCon ncIter(pconMan, NCME_DEFAULT);
INetConnection * pconn = NULL;
INetConnection * pconnCur = NULL;
INT cconn = 0;
while (SUCCEEDED(hr) && (S_OK == (ncIter.HrNext(&pconn))))
{
ReleaseObj(pconnCur);
cconn++;
AddRefObj(pconnCur = pconn);
ReleaseObj(pconn);
}
if (cconn > 1)
{
// if more than one connection found, release last one we had
ReleaseObj(pconnCur);
hr = S_OK;
}
else if (cconn == 0)
{
ReleaseObj(pconnCur);
hr = S_FALSE;
}
else // conn == 1
{
*ppconn = pconnCur;
hr = S_OK;
}
ReleaseObj(pconMan);
}
TraceError("HrCountConnections", (hr == S_FALSE) ? S_OK : hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrHandleStaticIpDependency
//
// Purpose: Handles the need that some components have that requires
// at least one adapter using a static IP address before they
// can be installed properly.
//
// Arguments:
// pnocd [in] Pointer to NETOC data
//
// Returns: S_OK if success, Win32 HRESULT error code otherwise.
//
// Author: danielwe 19 Jun 1997
//
// Notes:
//
HRESULT HrHandleStaticIpDependency(PNETOCDATA pnocd)
{
HRESULT hr = S_OK;
static BOOL fFirstInvocation = TRUE;
// bug 25841. This function is called during installation of DNS, DHCP,
// and WINS. If all three are being installed togetther then this ends
// up showing the same error message thrice when one would suffice.
if( fFirstInvocation )
{
fFirstInvocation = FALSE;
}
else
{
return hr;
}
// We handle "attended" and "unattended" setup mode through ReportErrorHr
{
BOOL fChangesApplied = FALSE;
INetCfg * pnc = NULL;
Assert(pnocd);
//Assert(g_ocmData.hwnd);
hr = HrOcGetINetCfg(pnocd, FALSE, &pnc);
if (SUCCEEDED(hr))
{
hr = HrVerifyStaticIPPresent(pnc);
if (hr == S_FALSE)
{
INetConnectionCommonUi * pcommUi;
INetConnection * pconn = NULL;
hr = HrCountConnections(&pconn);
if (S_OK == hr)
{
// One or more connections found
// Report message to user indicating that she has to
// configure at least one adapter with a static IP address
// before we can continue.
ReportErrorHr(hr,
IDS_OC_NEED_STATIC_IP,
g_ocmData.hwnd,
pnocd->strDesc.c_str());
// Try to fix it if we are in "attended" mode or
// we have the /z:netoc_show_unattended_messages options flag set.
if ((!(g_ocmData.sic.SetupData.OperationFlags & SETUPOP_BATCH)) ||
(g_ocmData.fShowUnattendedMessages))
{
hr = CoCreateInstance(CLSID_ConnectionCommonUi, NULL,
CLSCTX_INPROC | CLSCTX_NO_CODE_DOWNLOAD,
IID_INetConnectionCommonUi,
reinterpret_cast<LPVOID *>(&pcommUi));
TraceHr(ttidError, FAL, hr, FALSE, "CoCreateInstance");
if (SUCCEEDED(hr))
{
if (pconn)
{
// Exactly one connection found
hr = pcommUi->ShowConnectionProperties(g_ocmData.hwnd,
pconn);
if (S_OK == hr)
{
fChangesApplied = TRUE;
}
else if (FAILED(hr))
{
// Eat the error since we can't do anything about it
// anyway.
TraceError("HrHandleStaticIpDependency - "
"ShowConnectionProperties", hr);
hr = S_OK;
}
}
else
{
// More than one connection found
if (SUCCEEDED(hr))
{
NETCON_CHOOSECONN chooseCon = {0};
chooseCon.lStructSize = sizeof(NETCON_CHOOSECONN);
chooseCon.hwndParent = g_ocmData.hwnd;
chooseCon.dwTypeMask = NCCHT_LAN;
chooseCon.dwFlags = NCCHF_DISABLENEW;
hr = pcommUi->ChooseConnection(&chooseCon, NULL);
if (SUCCEEDED(hr))
{
fChangesApplied = TRUE;
}
else
{
// Eat the error since we can't do anything about it
// anyway.
TraceError("HrHandleStaticIpDependency - "
"ChooseConnection", hr);
hr = S_OK;
}
}
}
ReleaseObj(pcommUi);
}
ReleaseObj(pconn);
if (SUCCEEDED(hr))
{
// Don't bother checking again if they never
// made any changes
if (!fChangesApplied ||
(S_FALSE == (hr = HrVerifyStaticIPPresent(pnc))))
{
// Geez, still no static IP address available.
// Report another message scolding the user for
// not following directions.
ReportErrorHr(hr,
IDS_OC_STILL_NO_STATIC_IP,
g_ocmData.hwnd,
pnocd->strDesc.c_str());
hr = S_OK;
}
}
}
else
{
// Just report the error as would have happened when the
// user did not correct it.
ReportErrorHr(hr,
IDS_OC_STILL_NO_STATIC_IP,
g_ocmData.hwnd,
pnocd->strDesc.c_str());
TraceTag(ttidNetOc, "Not handling static IP dependency for %S "
"because we're in unattended mode", pnocd->strDesc.c_str());
}
}
}
hr = HrUninitializeAndReleaseINetCfg(TRUE, pnc, FALSE);
}
}
TraceError("HrHandleStaticIpDependency", hr);
return hr;
}
//+---------------------------------------------------------------------------
//
// Function: HrOcGetINetCfg
//
// Purpose: Obtains an INetCfg to work with
//
// Arguments:
// pnocd [in] OC Data
// fWriteLock [in] TRUE if write lock should be acquired, FALSE if
// not.
// ppnc [out] Returns INetCfg pointer
//
// Returns: S_OK if success, OLE or Win32 error if failed. ERROR_CANCELLED
// is returned if INetCfg is locked and the users cancels.
//
// Author: danielwe 18 Dec 1997
//
// Notes:
//
HRESULT HrOcGetINetCfg(PNETOCDATA pnocd, BOOL fWriteLock, INetCfg **ppnc)
{
HRESULT hr = S_OK;
PWSTR pszDesc;
BOOL fInitCom = TRUE;
Assert(ppnc);
*ppnc = NULL;
top:
AssertSz(!*ppnc, "Can't have valid INetCfg here!");
hr = HrCreateAndInitializeINetCfg(&fInitCom, ppnc, fWriteLock, 0,
SzLoadIds(IDS_OC_CAPTION), &pszDesc);
if ((hr == NETCFG_E_NO_WRITE_LOCK) && !pnocd->fCleanup)
{
// See if we are in "attended" mode or
// we have the /z:netoc_show_unattended_messages options flag set.
if ((g_ocmData.sic.SetupData.OperationFlags & SETUPOP_BATCH) &&
(!g_ocmData.fShowUnattendedMessages))
{
// "Unattended" mode, just report error
ReportEventHrString(pnocd->strDesc.c_str(),
IDS_OC_CANT_GET_LOCK,
pszDesc ? pszDesc : SzLoadIds(IDS_OC_GENERIC_COMP));
CoTaskMemFree(pszDesc);
hr = HRESULT_FROM_WIN32(ERROR_CANCELLED);
}
else
{
// "Attended mode", so interact with user
int nRet;
nRet = NcMsgBoxMc(g_ocmData.hwnd, IDS_OC_CAPTION, IDS_OC_CANT_GET_LOCK,
MB_RETRYCANCEL | MB_DEFBUTTON1 | MB_ICONWARNING,
pnocd->strDesc.c_str(),
pszDesc ? pszDesc : SzLoadIds(IDS_OC_GENERIC_COMP));
CoTaskMemFree(pszDesc);
if (IDRETRY == nRet)
{
goto top;
}
else
{
hr = HRESULT_FROM_WIN32(ERROR_CANCELLED);
}
}
}
TraceError("HrOcGetINetCfg", hr);
return hr;
}
| 32.844673 | 109 | 0.471791 |
279721dbb14936e37a675ff91a72024cb1022ce2 | 11,669 | cpp | C++ | source/Plugins/Generic/CastorGui/CtrlListBox.cpp | Mu-L/Castor3D | 7b9c6e7be6f7373ad60c0811d136c0004e50e76b | [
"MIT"
] | 245 | 2015-10-29T14:31:45.000Z | 2022-03-31T13:04:45.000Z | source/Plugins/Generic/CastorGui/CtrlListBox.cpp | Mu-L/Castor3D | 7b9c6e7be6f7373ad60c0811d136c0004e50e76b | [
"MIT"
] | 64 | 2016-03-11T19:45:05.000Z | 2022-03-31T23:58:33.000Z | source/Plugins/Generic/CastorGui/CtrlListBox.cpp | Mu-L/Castor3D | 7b9c6e7be6f7373ad60c0811d136c0004e50e76b | [
"MIT"
] | 11 | 2018-05-24T09:07:43.000Z | 2022-03-21T21:05:20.000Z | #include "CastorGui/CtrlListBox.hpp"
#include "CastorGui/ControlsManager.hpp"
#include "CastorGui/CtrlStatic.hpp"
#include <Castor3D/Engine.hpp>
#include <Castor3D/Cache/MaterialCache.hpp>
#include <Castor3D/Event/Frame/GpuFunctorEvent.hpp>
#include <Castor3D/Material/Material.hpp>
#include <Castor3D/Material/Pass/Pass.hpp>
#include <Castor3D/Material/Texture/TextureUnit.hpp>
#include <Castor3D/Overlay/BorderPanelOverlay.hpp>
#include <Castor3D/Overlay/Overlay.hpp>
#include <Castor3D/Overlay/PanelOverlay.hpp>
#include <Castor3D/Overlay/TextOverlay.hpp>
#include <CastorUtils/Graphics/Font.hpp>
using namespace castor;
using namespace castor3d;
namespace CastorGui
{
ListBoxCtrl::ListBoxCtrl( String const & p_name
, Engine & engine
, ControlRPtr p_parent
, uint32_t p_id )
: ListBoxCtrl( p_name
, engine
, p_parent
, p_id
, StringArray()
, -1
, Position()
, Size()
, 0
, true )
{
}
ListBoxCtrl::ListBoxCtrl( String const & p_name
, Engine & engine
, ControlRPtr p_parent
, uint32_t p_id
, StringArray const & p_values
, int p_selected
, Position const & p_position
, Size const & p_size
, uint32_t p_style
, bool p_visible )
: Control( ControlType::eListBox
, p_name
, engine
, p_parent
, p_id
, p_position
, p_size
, p_style
, p_visible )
, m_initialValues( p_values )
, m_values( p_values )
, m_selected( p_selected )
{
}
void ListBoxCtrl::setTextMaterial( MaterialRPtr p_material )
{
m_textMaterial = p_material;
}
void ListBoxCtrl::setSelectedItemBackgroundMaterial( MaterialRPtr p_value )
{
m_selectedItemBackgroundMaterial = p_value;
int i = 0;
for ( auto item : m_items )
{
if ( i++ == m_selected )
{
item->setBackgroundMaterial( p_value );
}
}
}
void ListBoxCtrl::setSelectedItemForegroundMaterial( MaterialRPtr p_value )
{
m_selectedItemForegroundMaterial = p_value;
int i = 0;
for ( auto item : m_items )
{
if ( i++ == m_selected )
{
item->setForegroundMaterial( p_value );
}
}
}
void ListBoxCtrl::appendItem( String const & p_value )
{
m_values.push_back( p_value );
if ( getControlsManager() )
{
StaticCtrlSPtr item = doCreateItemCtrl( p_value
, uint32_t( m_values.size() - 1u ) );
getEngine().postEvent( makeGpuFunctorEvent( EventType::ePreRender
, [this, item]( RenderDevice const & device
, QueueData const & queueData )
{
getControlsManager()->create( item );
} ) );
doUpdateItems();
}
else
{
m_initialValues.push_back( p_value );
}
}
void ListBoxCtrl::removeItem( int p_value )
{
if ( uint32_t( p_value ) < m_values.size() && p_value >= 0 )
{
m_values.erase( m_values.begin() + p_value );
if ( uint32_t( p_value ) < m_items.size() )
{
if ( p_value < m_selected )
{
setSelected( m_selected - 1 );
}
else if ( p_value == m_selected )
{
m_selectedItem.reset();
m_selected = -1;
}
auto it = m_items.begin() + p_value;
if ( getControlsManager() )
{
ControlSPtr control = *it;
getEngine().postEvent( makeGpuFunctorEvent( EventType::ePreRender
, [this, control]( RenderDevice const & device
, QueueData const & queueData )
{
getControlsManager()->destroy( control );
} ) );
}
m_items.erase( it );
doUpdateItems();
}
}
}
void ListBoxCtrl::setItemText( int p_index, String const & p_text )
{
auto index = uint32_t( p_index );
if ( index < m_values.size() && p_index >= 0 )
{
m_values[index] = p_text;
if ( index < m_items.size() )
{
StaticCtrlSPtr item = m_items[index];
if ( item )
{
item->setCaption( p_text );
}
}
}
}
String ListBoxCtrl::getItemText( int p_index )
{
auto index = uint32_t( p_index );
String result;
if ( index < m_values.size() )
{
result = m_values[index];
}
return result;
}
void ListBoxCtrl::clear()
{
m_values.clear();
m_items.clear();
m_selectedItem.reset();
m_selected = -1;
}
void ListBoxCtrl::setSelected( int p_value )
{
auto selected = uint32_t( m_selected );
if ( m_selected >= 0 && selected < m_items.size() )
{
StaticCtrlSPtr item = m_items[selected];
if ( item )
{
item->setBackgroundMaterial( getItemBackgroundMaterial() );
item->setForegroundMaterial( getForegroundMaterial() );
m_selectedItem.reset();
}
}
m_selected = p_value;
if ( m_selected >= 0 && selected < m_items.size() )
{
StaticCtrlSPtr item = m_items[selected];
if ( item )
{
item->setBackgroundMaterial( getSelectedItemBackgroundMaterial() );
item->setForegroundMaterial( getSelectedItemForegroundMaterial() );
m_selectedItem = item;
}
}
}
void ListBoxCtrl::setFont( castor::String const & p_font )
{
m_fontName = p_font;
for ( auto item : m_items )
{
item->setFont( m_fontName );
}
}
void ListBoxCtrl::doUpdateItems()
{
Position position;
for ( auto item : m_items )
{
item->setPosition( position );
item->setSize( Size( getSize().getWidth(), DEFAULT_HEIGHT ) );
position.y() += DEFAULT_HEIGHT;
}
BorderPanelOverlaySPtr background = getBackground();
if ( background )
{
background->setPixelSize( Size( getSize().getWidth(), uint32_t( m_items.size() * DEFAULT_HEIGHT ) ) );
}
}
StaticCtrlSPtr ListBoxCtrl::doCreateItemCtrl( String const & p_value
, uint32_t itemIndex )
{
StaticCtrlSPtr item = std::make_shared< StaticCtrl >( getName() + cuT( "_Item" ) + string::toString( itemIndex )
, getEngine()
, this
, p_value
, Position()
, Size( getSize().getWidth(), DEFAULT_HEIGHT ), uint32_t( StaticStyle::eVAlignCenter ) );
item->setCatchesMouseEvents( true );
item->connectNC( MouseEventType::eEnter, [this]( ControlSPtr p_control, MouseEvent const & p_event )
{
onItemMouseEnter( p_control, p_event );
} );
item->connectNC( MouseEventType::eLeave, [this]( ControlSPtr p_control, MouseEvent const & p_event )
{
onItemMouseLeave( p_control, p_event );
} );
item->connectNC( MouseEventType::eReleased, [this]( ControlSPtr p_control, MouseEvent const & p_event )
{
onItemMouseLButtonUp( p_control, p_event );
} );
item->connectNC( KeyboardEventType::ePushed, [this]( ControlSPtr p_control, KeyboardEvent const & p_event )
{
onItemKeyDown( p_control, p_event );
} );
if ( m_fontName.empty() )
{
item->setFont( getControlsManager()->getDefaultFont().lock()->getName() );
}
else
{
item->setFont( m_fontName );
}
m_items.push_back( item );
return item;
}
void ListBoxCtrl::doCreateItem( String const & p_value
, uint32_t itemIndex )
{
StaticCtrlSPtr item = doCreateItemCtrl( p_value, itemIndex );
getControlsManager()->create( item );
item->setBackgroundMaterial( getItemBackgroundMaterial() );
item->setForegroundMaterial( getForegroundMaterial() );
item->setTextMaterial( getTextMaterial() );
item->setVisible( doIsVisible() );
}
void ListBoxCtrl::doCreate()
{
auto material = getTextMaterial();
if ( !material )
{
m_textMaterial = getForegroundMaterial();
}
material = getSelectedItemBackgroundMaterial();
if ( !material )
{
setSelectedItemBackgroundMaterial( getEngine().getMaterialCache().find( cuT( "DarkBlue" ) ).lock().get() );
}
material = getSelectedItemForegroundMaterial();
if ( !material )
{
setSelectedItemForegroundMaterial( getEngine().getMaterialCache().find( cuT( "White" ) ).lock().get() );
}
material = getHighlightedItemBackgroundMaterial();
if ( !material )
{
RgbColour colour = getMaterialColour( *getBackgroundMaterial()->getPass( 0u ) );
colour.red() = std::min( 1.0f, float( colour.red() ) / 2.0f );
colour.green() = std::min( 1.0f, float( colour.green() ) / 2.0f );
colour.blue() = std::min( 1.0f, float( colour.blue() ) / 2.0f );
setHighlightedItemBackgroundMaterial( createMaterial( getEngine(), getBackgroundMaterial()->getName() + cuT( "_Highlight" ), colour ) );
}
setBackgroundBorders( castor::Rectangle( 1, 1, 1, 1 ) );
setSize( Size( getSize().getWidth(), uint32_t( m_values.size() * DEFAULT_HEIGHT ) ) );
EventHandler::connect( KeyboardEventType::ePushed, [this]( KeyboardEvent const & p_event )
{
onKeyDown( p_event );
} );
uint32_t index = 0u;
for ( auto value : m_initialValues )
{
doCreateItem( value, index );
++index;
}
m_initialValues.clear();
doUpdateItems();
setSelected( m_selected );
getControlsManager()->connectEvents( *this );
}
void ListBoxCtrl::doDestroy()
{
CU_Require( getControlsManager() );
auto & manager = *getControlsManager();
manager.disconnectEvents( *this );
for ( auto item : m_items )
{
manager.destroy( item );
}
m_items.clear();
m_selectedItem.reset();
}
void ListBoxCtrl::doSetPosition( Position const & p_value )
{
doUpdateItems();
}
void ListBoxCtrl::doSetSize( Size const & p_value )
{
doUpdateItems();
}
void ListBoxCtrl::doSetBackgroundMaterial( MaterialRPtr p_material )
{
int i = 0;
RgbColour colour = getMaterialColour( *p_material->getPass( 0u ) );
setItemBackgroundMaterial( p_material );
colour.red() = std::min( 1.0f, colour.red() / 2.0f );
colour.green() = std::min( 1.0f, colour.green() / 2.0f );
colour.blue() = std::min( 1.0f, colour.blue() / 2.0f );
setHighlightedItemBackgroundMaterial( createMaterial( getEngine(), getBackgroundMaterial()->getName() + cuT( "_Highlight" ), colour ) );
setMaterialColour( *p_material->getPass( 0u ), colour );
for ( auto item : m_items )
{
if ( i++ != m_selected )
{
item->setBackgroundMaterial( p_material );
}
}
}
void ListBoxCtrl::doSetForegroundMaterial( MaterialRPtr p_material )
{
int i = 0;
for ( auto item : m_items )
{
if ( i++ != m_selected )
{
item->setForegroundMaterial( p_material );
}
}
}
void ListBoxCtrl::doSetVisible( bool p_visible )
{
for ( auto item : m_items )
{
item->setVisible( p_visible );
}
}
void ListBoxCtrl::onItemMouseEnter( ControlSPtr p_control, MouseEvent const & p_event )
{
p_control->setBackgroundMaterial( getHighlightedItemBackgroundMaterial() );
}
void ListBoxCtrl::onItemMouseLeave( ControlSPtr p_control, MouseEvent const & p_event )
{
if ( m_selectedItem.lock() == p_control )
{
p_control->setBackgroundMaterial( getSelectedItemBackgroundMaterial() );
}
else
{
p_control->setBackgroundMaterial( getItemBackgroundMaterial() );
}
}
void ListBoxCtrl::onItemMouseLButtonUp( ControlSPtr p_control, MouseEvent const & p_event )
{
if ( p_event.getButton() == MouseButton::eLeft )
{
if ( m_selectedItem.lock() != p_control )
{
int index = -1;
auto it = m_items.begin();
int i = 0;
while ( index == -1 && it != m_items.end() )
{
if ( *it == p_control )
{
index = i;
}
++it;
++i;
}
setSelected( index );
m_signals[size_t( ListBoxEvent::eSelected )]( m_selected );
}
}
}
void ListBoxCtrl::onKeyDown( KeyboardEvent const & p_event )
{
if ( m_selected != -1 )
{
bool changed = false;
int index = m_selected;
if ( p_event.getKey() == KeyboardKey::eUp )
{
index--;
changed = true;
}
else if ( p_event.getKey() == KeyboardKey::edown )
{
index++;
changed = true;
}
if ( changed )
{
index = std::max( 0, std::min( index, int( m_items.size() - 1 ) ) );
setSelected( index );
m_signals[size_t( ListBoxEvent::eSelected )]( index );
}
}
}
void ListBoxCtrl::onItemKeyDown( ControlSPtr p_control, KeyboardEvent const & p_event )
{
onKeyDown( p_event );
}
}
| 22.880392 | 139 | 0.657554 |
2797ce9a09a948dafc437fab640be2fc0b982248 | 686 | cpp | C++ | src/main.cpp | pigatron-industries/arduino_eurorack_template | 24cf48f14720ee03d5d652802421cb9dcf5fa6d0 | [
"Unlicense"
] | null | null | null | src/main.cpp | pigatron-industries/arduino_eurorack_template | 24cf48f14720ee03d5d652802421cb9dcf5fa6d0 | [
"Unlicense"
] | null | null | null | src/main.cpp | pigatron-industries/arduino_eurorack_template | 24cf48f14720ee03d5d652802421cb9dcf5fa6d0 | [
"Unlicense"
] | null | null | null | #include <Arduino.h>
#include "hwconfig.h"
#include "Config.h"
#include "Hardware.h"
#include "MainController.h"
#include "controllers/TestController.h"
TestController testController = TestController();
MainController mainController = MainController();
void setup() {
Serial.begin(SERIAL_BAUD);
delay(100);
Serial.println();
Serial.println("===============================");
Serial.println("* Pigatron Industries *");
Serial.println("===============================");
Serial.println();
Hardware::hw.init();
mainController.registerController(testController);
mainController.init();
}
void loop() {
mainController.process();
}
| 22.129032 | 54 | 0.625364 |