blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 264 | content_id stringlengths 40 40 | detected_licenses listlengths 0 85 | license_type stringclasses 2
values | repo_name stringlengths 5 140 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 905
values | visit_date timestamp[us]date 2015-08-09 11:21:18 2023-09-06 10:45:07 | revision_date timestamp[us]date 1997-09-14 05:04:47 2023-09-17 19:19:19 | committer_date timestamp[us]date 1997-09-14 05:04:47 2023-09-06 06:22:19 | github_id int64 3.89k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-07 00:51:45 2023-09-14 21:58:39 ⌀ | gha_created_at timestamp[us]date 2008-03-27 23:40:48 2023-08-21 23:17:38 ⌀ | gha_language stringclasses 141
values | src_encoding stringclasses 34
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 3 10.4M | extension stringclasses 115
values | content stringlengths 3 10.4M | authors listlengths 1 1 | author_id stringlengths 0 158 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5120aac19fe7b4e860e84d62875e9e579eba262e | f12c1ea10008863a801773857c1425e4dbb4f685 | /game/public/app.cpp | c994aee4b14104484b549d5d04f455e58260ba45 | [] | no_license | alterhz/WalkingGridGame | c09caa4b50fc8401155192da4bbbee36dfd82a60 | fb56f65184ee174119aeeb433aadaa0edb3cc1f5 | refs/heads/master | 2021-05-30T04:27:05.900721 | 2015-10-30T12:44:22 | 2015-10-30T12:44:22 | 38,820,181 | 1 | 0 | null | null | null | null | GB18030 | C++ | false | false | 3,329 | cpp | #include "app.h"
#include "debug.h"
#include "clientmanager.h"
#include "testclient.h"
#include "configread.h"
#include "memoryleak.h"
#include "memoryleakinfo.h"
#include "country.h"
CApp::CApp()
: m_pNetService(nullptr)
, m_pNetAcceptor(nullptr)
, m_pTimerManager(nullptr)
, m_pEventManager(nullptr)
, m_nRunTimerId(0)
{
m_pNetService = CreateNetService();
}
CApp::~CApp()
{
DestoryNetService(m_pNetService);
m_pNetService = nullptr;
}
bool CApp::Run()
{
return CreateThread(*this);
}
bool CApp::PostAsyncEvent(IAsyncEvent *pAsyncEvent)
{
if (m_pEventManager)
{
return m_pEventManager->PostAsyncEvent(pAsyncEvent);
}
return false;
}
int CApp::SetTimer(ITimerEvent *pTimerEvent, int nInterval)
{
if (m_pTimerManager)
{
return m_pTimerManager->SetTimer(pTimerEvent, nInterval);
}
return INVALID_TIMER_ID;
}
void CApp::KillTimer(int nTimerId)
{
if (m_pTimerManager)
{
return m_pTimerManager->KillTimer(nTimerId);
}
}
bool CApp::InitNet()
{
if (nullptr == m_pNetService)
{
return false;
}
m_pTimerManager = m_pNetService->CreateTimerManager();
if (nullptr == m_pTimerManager)
{
return false;
}
m_nRunTimerId = m_pTimerManager->SetTimer(this, 5000);
m_pNetAcceptor = m_pNetService->CreateListener();
if (nullptr == m_pNetAcceptor)
{
return false;
}
// 初始化协议
CClientManager::getMe().InitProto();
unsigned short wPort = 8000;
m_pNetAcceptor->Listen(CClientManager::instance(), wPort);
LOGPrint("正在网络监听" + wPort + "端口。");
{
// Test客户端连接
CTestClientManager::getMe().Init(m_pNetService);
}
return true;
}
bool CApp::InitDb()
{
if (nullptr == m_pNetService)
{
return false;
}
IEventManager *pEventManager = m_pNetService->CreateEventManager(6);
if (nullptr == pEventManager)
{
return false;
}
m_pEventManager = pEventManager;
return true;
}
bool CApp::OnInit()
{
new char[333];
CConfigReadManager::getMe().LoadConfigData();
InitDb();
InitNet();
return true;
}
bool CApp::OnThreadRun()
{
if (nullptr == m_pNetService)
{
return true;
}
if (!OnInit())
{
return false;
}
m_pNetService->Run();
LOGPrint("主逻辑线程停止。");
exit(0);
return true;
}
bool CApp::OnTimerEvent(int nTimerId)
{
if (nTimerId == m_nRunTimerId)
{
LOGPrint("\n------------------- 内存泄露信息 ---------------------");
// 打印内存泄露情况
VtMemoryLeak vtMemoryLeak = GetMemoryLeak();
for (InfoMemoryLeak infoMemoryLeak : vtMemoryLeak)
{
LOGPrint("onlyIndex:" + infoMemoryLeak.nOnlyIndex + ",leakmemory:" + infoMemoryLeak.nLeakMemory
+ "[" + infoMemoryLeak.strFileName.c_str() + "-" + infoMemoryLeak.nFileLine + "]");
}
LOGPrint("-----------------------------------------------------\n");
}
return true;
}
void CApp::Stop()
{
delete m_pNetAcceptor;
m_pNetAcceptor = nullptr;
delete m_pTimerManager;
m_pTimerManager = nullptr;
if (m_pEventManager)
{
m_pEventManager->Stop();
}
delete m_pEventManager;
m_pEventManager = nullptr;
if (m_pNetService)
{
m_pNetService->Stop();
}
Release();
}
void CApp::Release()
{
CCountryManager::delMe();
}
| [
"550360139@qq.com"
] | 550360139@qq.com |
fd6033f4b1487e3ba4aeb20259af87ee3c555865 | b6bd098572c6ee433b4398924989a41c1ee77a40 | /src/oxtra/codegen/instructions/string/lods.h | 12122fb4290251e4e11d91d5b4c0e7155e465977 | [
"BSD-3-Clause"
] | permissive | wenzhuw/oxtra | 6a1b3315c123195b789917d86b8e2c8b26d9e211 | cd538062869bfe68fc8552604c22334589d7380c | refs/heads/master | 2023-03-17T14:51:00.591053 | 2020-11-16T20:06:29 | 2020-11-16T20:06:29 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 325 | h | #ifndef OXTRA_LODS_H
#define OXTRA_LODS_H
#include "oxtra/codegen/instructions/string/repeatable.h"
namespace codegen {
class Lods : public Repeatable {
public:
explicit Lods(const fadec::Instruction& inst)
: Repeatable{inst} {}
void execute_operation(CodeBatch& batch) const final;
};
}
#endif //OXTRA_LODS_H
| [
"justus.polzin@tum.de"
] | justus.polzin@tum.de |
ed059a13c5b6a269a14870546a413e1890fdaf4b | 24f26275ffcd9324998d7570ea9fda82578eeb9e | /extensions/browser/api/declarative_net_request/composite_matcher.cc | 8a8a62def6309dd95f92a78e35c626906dc251fd | [
"BSD-3-Clause"
] | permissive | Vizionnation/chromenohistory | 70a51193c8538d7b995000a1b2a654e70603040f | 146feeb85985a6835f4b8826ad67be9195455402 | refs/heads/master | 2022-12-15T07:02:54.461083 | 2019-10-25T15:07:06 | 2019-10-25T15:07:06 | 217,557,501 | 2 | 1 | BSD-3-Clause | 2022-11-19T06:53:07 | 2019-10-25T14:58:54 | null | UTF-8 | C++ | false | false | 6,812 | cc | // Copyright 2019 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 "extensions/browser/api/declarative_net_request/composite_matcher.h"
#include <algorithm>
#include <set>
#include <utility>
#include "base/metrics/histogram_macros.h"
#include "extensions/browser/api/declarative_net_request/flat/extension_ruleset_generated.h"
#include "extensions/browser/api/declarative_net_request/request_action.h"
#include "extensions/browser/api/declarative_net_request/utils.h"
namespace extensions {
namespace declarative_net_request {
namespace flat_rule = url_pattern_index::flat;
using PageAccess = PermissionsData::PageAccess;
using RedirectActionInfo = CompositeMatcher::RedirectActionInfo;
namespace {
bool AreIDsUnique(const CompositeMatcher::MatcherList& matchers) {
std::set<size_t> ids;
for (const auto& matcher : matchers) {
bool did_insert = ids.insert(matcher->id()).second;
if (!did_insert)
return false;
}
return true;
}
bool AreSortedPrioritiesUnique(const CompositeMatcher::MatcherList& matchers) {
base::Optional<size_t> previous_priority;
for (const auto& matcher : matchers) {
if (matcher->priority() == previous_priority)
return false;
previous_priority = matcher->priority();
}
return true;
}
bool HasMatchingAllowRule(const RulesetMatcher* matcher,
const RequestParams& params) {
if (!params.allow_rule_cache.contains(matcher))
params.allow_rule_cache[matcher] = matcher->HasMatchingAllowRule(params);
return params.allow_rule_cache[matcher];
}
} // namespace
RedirectActionInfo::RedirectActionInfo(base::Optional<RequestAction> action,
bool notify_request_withheld)
: action(std::move(action)),
notify_request_withheld(notify_request_withheld) {
if (action)
DCHECK_EQ(RequestAction::Type::REDIRECT, action->type);
}
RedirectActionInfo::~RedirectActionInfo() = default;
RedirectActionInfo::RedirectActionInfo(RedirectActionInfo&&) = default;
RedirectActionInfo& RedirectActionInfo::operator=(RedirectActionInfo&& other) =
default;
CompositeMatcher::CompositeMatcher(MatcherList matchers)
: matchers_(std::move(matchers)) {
SortMatchersByPriority();
DCHECK(AreIDsUnique(matchers_));
}
CompositeMatcher::~CompositeMatcher() = default;
void CompositeMatcher::AddOrUpdateRuleset(
std::unique_ptr<RulesetMatcher> new_matcher) {
// A linear search is ok since the number of rulesets per extension is
// expected to be quite small.
auto it = std::find_if(
matchers_.begin(), matchers_.end(),
[&new_matcher](const std::unique_ptr<RulesetMatcher>& matcher) {
return new_matcher->id() == matcher->id();
});
if (it == matchers_.end()) {
matchers_.push_back(std::move(new_matcher));
SortMatchersByPriority();
} else {
// Update the matcher. The priority for a given ID should remain the same.
DCHECK_EQ(new_matcher->priority(), (*it)->priority());
*it = std::move(new_matcher);
}
// Clear the renderers' cache so that they take the updated rules into
// account.
ClearRendererCacheOnNavigation();
has_any_extra_headers_matcher_.reset();
}
base::Optional<RequestAction> CompositeMatcher::GetBlockOrCollapseAction(
const RequestParams& params) const {
// TODO(karandeepb): change this to report time in micro-seconds.
SCOPED_UMA_HISTOGRAM_TIMER(
"Extensions.DeclarativeNetRequest.ShouldBlockRequestTime."
"SingleExtension");
for (const auto& matcher : matchers_) {
if (HasMatchingAllowRule(matcher.get(), params))
return base::nullopt;
base::Optional<RequestAction> action =
matcher->GetBlockOrCollapseAction(params);
if (action)
return action;
}
return base::nullopt;
}
RedirectActionInfo CompositeMatcher::GetRedirectAction(
const RequestParams& params,
PageAccess page_access) const {
// TODO(karandeepb): change this to report time in micro-seconds.
SCOPED_UMA_HISTOGRAM_TIMER(
"Extensions.DeclarativeNetRequest.ShouldRedirectRequestTime."
"SingleExtension");
bool notify_request_withheld = false;
for (const auto& matcher : matchers_) {
if (HasMatchingAllowRule(matcher.get(), params)) {
return RedirectActionInfo(base::nullopt /* action */,
false /* notify_request_withheld */);
}
if (page_access == PageAccess::kAllowed) {
base::Optional<RequestAction> action =
matcher->GetRedirectOrUpgradeActionByPriority(params);
if (!action)
continue;
return RedirectActionInfo(std::move(action),
false /* notify_request_withheld */);
}
// If the extension has no host permissions for the request, it can still
// upgrade the request.
base::Optional<RequestAction> upgrade_action =
matcher->GetUpgradeAction(params);
if (upgrade_action) {
return RedirectActionInfo(std::move(upgrade_action),
false /* notify_request_withheld */);
}
notify_request_withheld |= (page_access == PageAccess::kWithheld &&
matcher->GetRedirectAction(params));
}
return RedirectActionInfo(base::nullopt /* action */,
notify_request_withheld);
}
uint8_t CompositeMatcher::GetRemoveHeadersMask(
const RequestParams& params,
uint8_t ignored_mask,
std::vector<RequestAction>* remove_headers_actions) const {
uint8_t mask = 0;
for (const auto& matcher : matchers_) {
// The allow rule will override lower priority remove header rules.
if (HasMatchingAllowRule(matcher.get(), params))
return mask;
mask |= matcher->GetRemoveHeadersMask(params, mask | ignored_mask,
remove_headers_actions);
}
DCHECK(!(mask & ignored_mask));
return mask;
}
bool CompositeMatcher::HasAnyExtraHeadersMatcher() const {
if (!has_any_extra_headers_matcher_.has_value())
has_any_extra_headers_matcher_ = ComputeHasAnyExtraHeadersMatcher();
return has_any_extra_headers_matcher_.value();
}
bool CompositeMatcher::ComputeHasAnyExtraHeadersMatcher() const {
for (const auto& matcher : matchers_) {
if (matcher->IsExtraHeadersMatcher())
return true;
}
return false;
}
void CompositeMatcher::SortMatchersByPriority() {
std::sort(matchers_.begin(), matchers_.end(),
[](const std::unique_ptr<RulesetMatcher>& a,
const std::unique_ptr<RulesetMatcher>& b) {
return a->priority() > b->priority();
});
DCHECK(AreSortedPrioritiesUnique(matchers_));
}
} // namespace declarative_net_request
} // namespace extensions
| [
"rjkroege@chromium.org"
] | rjkroege@chromium.org |
452d698a4b2cc280fc5ece2cfc1b158ef0c75c6f | 6ee132962fb45703b90973575b1866e7472b98a3 | /Intro/String/mail.cpp | c2a56c43e7ac9c4de937bd05feadb1f69f928ad1 | [] | no_license | Linarz11/OOP_CPP | c77718f38238390bd84a89a9a32003b1ea166565 | 40636abdb2d03ff6d6484c7d538047427b0847ac | refs/heads/master | 2023-04-22T13:57:53.164867 | 2021-04-26T15:57:26 | 2021-04-26T15:57:26 | 348,740,562 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,295 | cpp | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
using namespace std;
#define delimeter "\n-----------------------------\n"
class String;
String operator+(const String& left, const String& right);
class String
{
char* str; //Указатель на строку в динамической памяти
int size; //Размер строки
public:
const char* get_str()const
{
return str;
}
char* get_str()
{
return str;
}
int get_size() const
{
return size;
}
// Constructors
explicit String(int size = 80)
{
this->size = size;
this->str = new char[size] {};
cout << (size==80? "DEfault" :"Size")<< "_Constructor:\t" << this << endl;
}
String(const char* str)
{
this->size = strlen(str) + 1;
this->str = new char[size] {};
strcpy(this->str, str); //String copy
cout << "Constructor:\t" << this << endl;
}
String(const String& other)
{
this->size = other.size;
this->str = new char[size] {};
strcpy(this->str, other.str);
cout << "CopyConstructor:\t" << this << endl;
}
String(String&& other)
{
this->size = other.size;
this->str = other.str;
other.str = nullptr;
cout << "MoveConstructor: \t" << this << endl;
}
~String()
{
delete[] this->str;
cout << "Destructor:\t\t" << this << endl;
}
//Operators
String& operator=(const String& other)
{
// 0)ПРоверить не является ли другой объект ЭТИМ объектом:
if (this == &other)return *this;
delete[] this->str; // 1) В первую очередь удаляем старое значение объекта,
// и только после этого присваиваем ему новое значение
this->size = other.size;
this->str = new char[size] {};
strcpy(this->str, other.str);
cout << "CopyAssignment:\t\t" << this << endl;
return *this;
}
String& operator=(String&& other)
{
delete[] this->str;
this->size = other.size;
this->str = other.str;
other.str=nullptr;
cout << "MoveAssignment:\t\t" << this << endl;
return *this;
}
String& operator+=(String& other)
{
return *this = *this + other;
/*char* result = new char[this->size + other.size];
strcpy(result, this->str);
strcat(result, other.str);
delete[] str;
this->str = result;
return *this;*/
}
char& operator[](int i)const
{
return this->str[i];
}
char& operator[](int i)
{
return this->str[i];
}
// Methods
void print() const
{
cout << "str:\t" << str << endl;
cout << "size:\t" << size << endl;
}
};
String operator+(const String& left, const String& right)
{
String result(left.get_size() + right.get_size() - 1);
/*for (int i = 0; i < left.get_size(); i++)
{
//result.get_str()[i] = left.get_str()[i];
result[i] = left[i];
}
for (int i = 0; i < right.get_size(); i++)
{
//result.get_str()[i+left.get_size()-1] = right.get_str()[i];
result [i + left.get_size() - 1] = right[i];
}*/
strcpy(result.get_str(), left.get_str());//strcpy - выполняет копирование строки left в строку result
strcat(result.get_str(), right.get_str());//выполняет конкатенацию строки right в строку result
return result;
}
ostream& operator<<(ostream& os, const String& obj)
{
return os << obj.get_str();
}
//#define CONSTRUCTORS_CHECK
//#define ASSIGNMENT_CHECK
void main()
{
setlocale(LC_ALL, "");
#ifdef CONSTRUCTOR_CHECK
String str;
str.print();
//String str2 = 5; //
String str2(5);
str2.print();
cout << typeid("Hello").name() << endl;
String str3 = "Hello";
str3.print();
cout << str3 << endl;
String str4 = str3;//Copy Constructor
cout << "Str4: - " << str3 << endl;
String str5;
str5 = str4;
cout << "Str 5 - " << str5 << endl;
#endif // CONSTRUCTOR_CHECK
#ifdef ASSIGNMENT_CHECK
String str1 = "Hello";
String str2;
str1 = str1;
cout << str1 << endl;
cout << str2 << endl;
#endif // ASSIGNMENT_CHECK
String str1 = "Hello, " ;
String str2 = "World!" ;
cout << delimeter << endl;
String str3;
str3= str1 + str2;// Оператор + будет выполнять конкатенацию (слияние) строк
cout << delimeter << endl;
cout << str3<< endl;
//cout << delimeter;
//str1 += str2;
//cout << str1 << endl;
}
| [
"linarz@bk.ru"
] | linarz@bk.ru |
15ce5d3472e2ddef6aacb5c326fdae034cc30f31 | 2bc835b044f306fca1affd1c61b8650b06751756 | /mshtml/src/f3/htmlpad/thread.hxx | 64de583d38f0f1bdafea8129924ba987f2426605 | [] | no_license | KernelPanic-OpenSource/Win2K3_NT_inetcore | bbb2354d95a51a75ce2dfd67b18cfb6b21c94939 | 75f614d008bfce1ea71e4a727205f46b0de8e1c3 | refs/heads/master | 2023-04-04T02:55:25.139618 | 2021-04-14T05:25:01 | 2021-04-14T05:25:01 | 357,780,123 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,488 | hxx | //+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1992 - 1993.
//
// File: thread.hxx
//
// Contents: Helper functions for thread management
//
//----------------------------------------------------------------------------
#ifndef _HXX_THREAD
#define _HXX_THREAD
//+----------------------------------------------------------------------------
//
// Class: CGlobalLock
//
// Synopsis: Smart object to lock/unlock access to all global variables
// Declare an instance of this class within the scope that needs
// guarded access. Class instances may be nested.
//
// Usage: Lock variables by using the LOCK_GLOBALS marco
// Simply include this macro within the appropriate scope (as
// small as possible) to protect access. For example:
//
//-----------------------------------------------------------------------------
class CGlobalLock // tag: glock
{
public:
CGlobalLock()
{
Assert(g_fInit);
EnterCriticalSection(&g_cs);
#if DBG==1
if (!g_cNesting)
g_dwThreadID = GetCurrentThreadId();
else
Assert(g_dwThreadID == GetCurrentThreadId());
Assert(++g_cNesting > 0);
#endif
}
~CGlobalLock()
{
#if DBG==1
Assert(g_fInit);
Assert(g_dwThreadID == GetCurrentThreadId());
Assert(--g_cNesting >= 0);
#endif
LeaveCriticalSection(&g_cs);
}
#if DBG==1
static BOOL IsThreadLocked()
{
return (g_dwThreadID == GetCurrentThreadId());
}
#endif
// Process attach/detach routines
static HRESULT Init()
{
HRESULT hr = HrInitializeCriticalSection(&g_cs);
if (hr == S_OK)
g_fInit = TRUE;
RRETURN(hr);
}
static void Deinit()
{
#if DBG==1
if (g_cNesting)
{
TraceTag((tagError, "Global lock count > 0, Count=%0d", g_cNesting));
}
#endif
if (g_fInit)
{
DeleteCriticalSection(&g_cs);
g_fInit = FALSE;
}
}
private:
static CRITICAL_SECTION g_cs;
static BOOL g_fInit;
#if DBG==1
static DWORD g_dwThreadID;
static LONG g_cNesting;
#endif
};
#define LOCK_GLOBALS CGlobalLock glock
void IncrementObjectCount();
void DecrementObjectCount();
#endif // #ifndef _HXX_THREAD
| [
"polarisdp@gmail.com"
] | polarisdp@gmail.com |
09f95586d1119cbf0700a1a0aacdddc8f39188ff | f10a602239af68f852b7a6cc7cbe80fe95926baf | /source/ei_classifier_porting.cpp | 75841df28e530841d91508fe59109cb629d82d1f | [
"MIT"
] | permissive | SimonaChiurato/inferencing-pico | 8e44267d13f347e2f102b01191a290c384513834 | 99c935589e03819e8a2577682eff6f0d58a26c96 | refs/heads/main | 2023-09-04T10:57:24.100506 | 2023-09-02T17:23:33 | 2023-09-02T17:23:33 | 685,969,280 | 0 | 0 | null | 2023-09-01T12:29:07 | 2023-09-01T12:29:06 | null | UTF-8 | C++ | false | false | 2,367 | cpp | /* Edge Impulse inferencing library
* Copyright (c) 2021 EdgeImpulse Inc.
*
* 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 "porting/ei_classifier_porting.h"
#include "pico/stdlib.h"
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#define EI_WEAK_FN __attribute__((weak))
EI_WEAK_FN EI_IMPULSE_ERROR ei_run_impulse_check_canceled() {
return EI_IMPULSE_OK;
}
EI_WEAK_FN EI_IMPULSE_ERROR ei_sleep(int32_t time_ms) {
sleep_ms(time_ms);
return EI_IMPULSE_OK;
}
/**
* Printf function uses vsnprintf and output using Arduino Serial
*/
__attribute__((weak)) void ei_printf(const char *format, ...) {
static char print_buf[1024] = { 0 };
va_list args;
va_start(args, format);
int r = vsnprintf(print_buf, sizeof(print_buf), format, args);
va_end(args);
if (r > 0) {
printf(print_buf);
}
}
__attribute__((weak)) void ei_printf_float(float f) {
ei_printf("%f", f);
}
__attribute__((weak)) void *ei_malloc(size_t size) {
return malloc(size);
}
__attribute__((weak)) void *ei_calloc(size_t nitems, size_t size) {
return calloc(nitems, size);
}
__attribute__((weak)) void ei_free(void *ptr) {
free(ptr);
}
#if defined(__cplusplus) && EI_C_LINKAGE == 1
extern "C"
#endif
__attribute__((weak)) void DebugLog(const char* s) {
ei_printf("%s", s);
}
| [
"dmitrywat@gmail.com"
] | dmitrywat@gmail.com |
20421697a7bee5e5bd793b22b18a735e5cd0d01a | 511d7cd374cf8ecdc6a9d72223bed16a32d83c78 | /dsui/dsui/timer.h | 3a5055094f0f51c0d2357e4988215d8c473f9299 | [] | no_license | mynick777/msdk | 1818c718a181de772b9a3e2dd6d7b9a66296dc86 | 4ee669c60148ad72e1d8af9bea05e05019af79e6 | refs/heads/master | 2020-05-18T00:56:37.308774 | 2019-05-01T16:19:13 | 2019-05-01T16:19:13 | 184,075,465 | 0 | 0 | null | 2019-04-29T13:22:32 | 2019-04-29T13:22:32 | null | UTF-8 | C++ | false | false | 1,461 | h | /************************************************************************/
/*
Author:
lourking. All rights reserved.
Create Time:
2,27th,2014
Module Name:
timer.h
Abstract:
*/
/************************************************************************/
#ifndef __DSTIMER_H__
#define __DSTIMER_H__
#include <mmsystem.h> //head file
#pragma comment(lib,"winmm.lib") //lib file
class dsTimer{
public:
UINT m_uTimerID;
BOOL m_bRun;
int m_nPeriod;
LPARAM m_lParam;
dsTimer():m_uTimerID(0),m_bRun(FALSE),m_nPeriod(0)
{}
public://work
UINT CreateTimer(int nDelay = 2, int nPeriod = 1, DWORD_PTR dwUserData = 0, LPTIMECALLBACK procTime = NULL)
{
if(!m_uTimerID)
{
timeBeginPeriod(nPeriod);
m_uTimerID = timeSetEvent(
nDelay,
nPeriod,
procTime?procTime:TimerProc,
dwUserData?dwUserData:(DWORD)this,
TIME_PERIODIC);
m_nPeriod = nPeriod;
m_bRun = TRUE;
}
return m_uTimerID;
}
void DestroyTimer()
{
if ( m_bRun )
{
timeKillEvent(m_uTimerID);
timeEndPeriod(m_nPeriod);
m_bRun = FALSE;
m_uTimerID = 0;
}
}
static void CALLBACK TimerProc(UINT id, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2)
{
dsTimer* pThis = (dsTimer*)dwUser;
ATLTRACE("be in timerproc\n");
}
public://param
BOOL SetParam(LPARAM lParam)
{
if(m_bRun)
return FALSE;
m_lParam = lParam;
return TRUE;
}
inline LPARAM GetParam(){
return m_lParam;
}
};
#endif /*__DSTIMER_H__*/ | [
"maguojun123@126.com"
] | maguojun123@126.com |
f41b4f10b345dc40769dfebf0adb4f8b71832a08 | 31d65730c038c45c1b231a43c41d3654f88ea8d9 | /15658/solve.cpp | 4e91f766c8c56773d308c6e2f71619d5213b2b90 | [] | no_license | wizleysw/backjoon | 383ae80ad3bd5d95cafd4cb1326e9dd5e7ffeba6 | 6672d9a23171ffeff35d32ca0bd0811e866e6385 | refs/heads/master | 2021-07-06T15:50:00.290024 | 2021-04-24T08:46:18 | 2021-04-24T08:46:18 | 230,577,840 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,701 | cpp | // https://www.acmicpc.net/problem/15658
// 연산자 끼워넣기 (2)
// Written in C++ langs
// 2020. 09. 28.
// Wizley
#include <iostream>
#include <algorithm>
#include <vector>
#include <limits.h>
using namespace std;
int MAXV = INT_MIN;
int MINV = INT_MAX;
int T;
vector<int> numbers;
int expression[4] = {0,};
void backtracking(int sum, int pos, int used[4]){
if(pos == numbers.size()){
MAXV = max(MAXV, sum);
MINV = min(MINV, sum);
return;
}
for(int i=0; i<4; i++){
if(used[i]<expression[i]){
auto tmp = sum;
used[i] += 1;
switch(i){
case 0:
sum += numbers[pos];
backtracking(sum, pos+1, used);
break;
case 1:
sum -= numbers[pos];
backtracking(sum, pos+1, used);
break;
case 2:
sum *= numbers[pos];
backtracking(sum, pos+1, used);
break;
case 3:
sum /= numbers[pos];
backtracking(sum, pos+1, used);
break;
}
used[i] -= 1;
sum = tmp;
}
}
}
int main(){
ios_base :: sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin >> T;
numbers.resize(T);
for(int i=0; i<T; i++){
cin >> numbers[i];
}
for(int i=0; i<4; i++){
cin >> expression[i];
}
int used[4] = {0,};
backtracking(numbers[0], 1, used);
cout << MAXV << "\n" << MINV << "\n";
return 0;
}
| [
"wizley@kakao.com"
] | wizley@kakao.com |
b523511f96df92a0ad0ef1249812ac85b0c1e187 | fd08095bdd919c82a045d143da4c077f24021e46 | /RTTI/main.cpp | 26467f64afb8cc295b7468b724f8b3e879d22337 | [] | no_license | piscenco/vonNeumann | 5dba8b1c097e74d92da5f6006abc68780787fae7 | 6c2a57579bd76c95edf0a9ce7d3906f2b0ccb867 | refs/heads/main | 2023-04-12T20:00:19.624479 | 2021-05-11T18:53:06 | 2021-05-11T18:53:06 | 352,388,008 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,539 | cpp | #include <iostream>
#include <map>
#include <string>
#include <functional>
using namespace std;
//map<string, function<void()>> vtable;
// ID = ParentsID ||MyID
class ParentClass1{
public:
static const int ID = 1;
string name = "ParentClass1";
ParentClass1()= default;
};
class ParentClass2{
public:
static const int ID = 2;
string name = "ParentClass2";
ParentClass2()= default;
};
class ChildClass1{
public:
static const int ID = 13;
string name = "ChildClass1";
ChildClass1()= default;
// constructor from parent class, because static_cast won't work otherwise
ChildClass1(ParentClass1 p) {}
};
class ChildClass2{
public:
static const int ID = 124;
string name = "ChildClass2";
ChildClass2()= default;
ChildClass2(ParentClass1 p) {};
ChildClass2(ParentClass2 p) {};
};
// casts for defined classes
#define MY_CLASSES_CASTS(C_id, from_obj) {\
if(C_id = 1) \
return static_cast<ParentClass1>(from_obj);\
if(C_id = 13)\
return static_cast<ChildClass1>(from_obj); \
}
// down cast implementation
template <typename P, typename C>
C DYNAMIC_DOWN_CAST(int C_id, P from_obj){
bool is_parent = false;
int my_full_id = from_obj.ID;
int other_id = C_id % 10;
// check if type of @from_obj is parent to C type
while(my_full_id > 0) {
if(my_full_id % 10 == other_id) {
is_parent = true;
break;
}
my_full_id = my_full_id / 10;
}
if(is_parent)
MY_CLASSES_CASTS(C_id, from_obj)
//return static_cast<ChildClass1>(from_obj);//static_cast<C>(static_cast<ChildClass1>(from_obj));
}
/*Implementation of std::type_info
* based on //https://en.cppreference.com/w/cpp/types/type_info */
template <typename T>
class type_info {
public:
bool operator=(T obj) = delete; // can not be copy-assigned
bool operator==(T obj) {return true;};
int hash_code(T obj) {return obj.type_id;} // returns a value which is identical for the same types
string name(T obj) {return obj.name;} // implementation defined name of the type
};
int main() {
std::cout << "Create obj of classes"<< std::endl;
ParentClass1 P1 =ParentClass1();
ChildClass1 C1 = ChildClass1();
std::cout << "Down Cast"<< std::endl;
//down cast
ChildClass1 P1_to_C1 = DYNAMIC_DOWN_CAST<ParentClass1, ChildClass1>(C1.ID, P1);
std::cout << P1.name<<std::endl;
std::cout << C1.name<<std::endl;
std::cout << P1_to_C1.name<<std::endl;
} | [
"32290501+piscenco@users.noreply.github.com"
] | 32290501+piscenco@users.noreply.github.com |
c6b4a65a538511c277cde6ce5328fc7e2360a361 | 6f90cd7f5368df417dc4d9bb424583a4aa788ac3 | /Yassine S/statistiquea.h | acdc2d909fdd43d5d02c2a493638ad5cfa4705c5 | [] | no_license | axelessimi12/LaFerme | 6c6e38863e0a3ba6f39951bb80e969dbf4c64f6e | 7069e0c4c3ccbee05ec2e10d6b111b2f60826333 | refs/heads/main | 2023-05-03T22:23:31.455815 | 2021-05-23T21:02:41 | 2021-05-23T21:02:41 | 370,152,793 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 351 | h | #ifndef STATISTIQUEA_H
#define STATISTIQUEA_H
#include <QtCharts>
#include <QPieSeries>
#include <QPieSlice>
#include <QBarSeries>
#include <QSqlQuery>
#include <QString>
QT_CHARTS_USE_NAMESPACE
class Statistiquea
{
QChart *chart;
QChartView *chartView;
public:
Statistiquea();
QChartView * Preparechart(QString);
};
#endif // STAT_H
| [
"axelwilfried.etoundiessimi@esprit.tn"
] | axelwilfried.etoundiessimi@esprit.tn |
e1117f2fc507a1be27e84e76c8bd1596e61fd7ea | 4c5d17bf6c0d4901f972e88aac459088a270b301 | /test/mock/mock_btif_co_bta_dm_co.cc | e244296c5a55534e789bc3461d9de0a427e10cc9 | [
"Apache-2.0"
] | permissive | LineageOS/android_system_bt | 87e40748871e6aa6911cd691f98d957251d01919 | 7d057c89ab62916a31934f6e9a6f527fe7fc87fb | refs/heads/lineage-19.1 | 2023-08-31T13:31:22.112619 | 2023-03-28T18:40:51 | 2023-07-07T13:02:57 | 75,635,542 | 22 | 245 | NOASSERTION | 2022-10-02T20:22:16 | 2016-12-05T14:59:35 | C++ | UTF-8 | C++ | false | false | 1,306 | cc | /*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Generated mock file from original source file
*/
#include <cstdint>
#include "bta/include/bta_api.h"
#include "bta/sys/bta_sys.h"
#include "internal_include/bte_appl.h"
#include "osi/include/osi.h" // UNUSED_ATTR
#include "stack/include/btm_api_types.h"
tBTE_APPL_CFG bte_appl_cfg = {
BTA_LE_AUTH_REQ_SC_MITM_BOND, // Authentication requirements
BTM_IO_CAP_UNKNOWN, BTM_BLE_INITIATOR_KEY_SIZE, BTM_BLE_RESPONDER_KEY_SIZE,
BTM_BLE_MAX_KEY_SIZE};
bool bta_dm_co_get_compress_memory(UNUSED_ATTR tBTA_SYS_ID id,
UNUSED_ATTR uint8_t** memory_p,
UNUSED_ATTR uint32_t* memory_size) {
return true;
}
| [
"cmanton@google.com"
] | cmanton@google.com |
a9cdf39776779c4bc1ac2c2dd840d3fbdc128eba | 8a80b79470fdb7179bce9c3a38c008200c33360d | /QT_Init/build-helloQT2-Desktop_Qt_5_12_6_GCC_64bit-Debug/moc_widget.cpp | 122089ac9c1f58c12288a220577fea0ef4a37e5a | [] | no_license | nanenchanga53/QTCreatorTutorials_MDS | 8d1dfe76a076a78f3cdcf920e7d2ccccf0c15a30 | 0435380cdfb0539df810955585eeedf4d1be1485 | refs/heads/master | 2020-12-23T09:02:40.441432 | 2020-02-14T08:08:46 | 2020-02-14T08:08:46 | 237,105,442 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,290 | cpp | /****************************************************************************
** Meta object code from reading C++ file 'widget.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.6)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../helloQT2/widget.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'widget.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.12.6. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_Widget_t {
QByteArrayData data[3];
char stringdata0[17];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_Widget_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_Widget_t qt_meta_stringdata_Widget = {
{
QT_MOC_LITERAL(0, 0, 6), // "Widget"
QT_MOC_LITERAL(1, 7, 8), // "slotEixt"
QT_MOC_LITERAL(2, 16, 0) // ""
},
"Widget\0slotEixt\0"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_Widget[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
1, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: name, argc, parameters, tag, flags
1, 0, 19, 2, 0x0a /* Public */,
// slots: parameters
QMetaType::Void,
0 // eod
};
void Widget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<Widget *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->slotEixt(); break;
default: ;
}
}
Q_UNUSED(_a);
}
QT_INIT_METAOBJECT const QMetaObject Widget::staticMetaObject = { {
&QWidget::staticMetaObject,
qt_meta_stringdata_Widget.data,
qt_meta_data_Widget,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *Widget::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *Widget::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_Widget.stringdata0))
return static_cast<void*>(this);
return QWidget::qt_metacast(_clname);
}
int Widget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 1)
qt_static_metacall(this, _c, _id, _a);
_id -= 1;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 1)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 1;
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE
| [
"nanenchanga53@gmail.com"
] | nanenchanga53@gmail.com |
68821014fb6f8932b1548e2c2adcf2aa4c2ab292 | e10026b536f18157f743835b4ec45248b0a88c17 | /code/src/nsga2.cpp | 83e9badcdeb38fc0ca150155998726af24eb68e4 | [] | no_license | ca-cao/jssp | 9ff4642e37933ec5fd17fc558ecd031a8f3ef175 | c8ab1441d8cc3fd6f7f7efb7d01d4bce6d9fa9a1 | refs/heads/master | 2023-09-03T07:49:17.292403 | 2021-11-12T04:26:44 | 2021-11-12T04:26:44 | 294,012,577 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,887 | cpp | #include "individuo.hpp"
#include <algorithm>
#include <iostream>
#include <fstream>
#include <numeric>
#include "jsp.hpp"
#include <random>
#include <string>
#include <chrono>
#include <time.h>
#define INF INT_MAX
#define EPS 1.0e-14
using namespace std;
bool lex_vec_cmpr(const individuo& i1, const individuo& i2){
auto v1 = i1.obj;
auto v2 = i2.obj;
if(v1.size()!=v2.size())
cout<<"dim error\n"<<"v1.size=: "<<v1.size()<<"\tv2.size: "<<v2.size();
return (v1[0]<v2[0]) or (v1[0]==v2[0] and (v1[1]<v2[1]));
for(int i = 0;i<v1.size();i++){
if(v1[i]<v2[i])
return true;
if(v1[i]>v2[i])
return false;
}
return false;
}
vector<individuo> initpop(int popsize,instance req){
vector<individuo> pop(popsize);
for(int i=0;i<popsize;i++){
pop[i].create_rand(req);
pop[i].eval(req);
}
return pop;
}
// Evalua la poblacion
void eval(vector<individuo>& pop,instance req){
for(int i=0;i<pop.size();i++){
// evaluar
pop[i].eval(req);
}
}
// hace el nondominated sorting
void ndsort(vector<individuo>& pop){
// ordenamiento lexicografico
sort(pop.begin(),pop.end(),lex_vec_cmpr);
// asignar frentes
// se fija cual de los anteriores lo domina
pop[0].front = 0;
vector<double>ymin;
ymin.push_back(pop[0].obj[1]);
bool found;
for(int i=1;i<pop.size();i++){
found = false;
// encontrar el primer frente que no lo domine
for(int j =0;j<ymin.size();j++){
if(pop[i].obj[1]<ymin[j]){
pop[i].front = j;
ymin[j] = pop[i].obj[1];
found = true;
break;
}
}
// no encontro ninguno
// asigna un nuevo frente
if(!found){
pop[i].front = ymin.size();
ymin.push_back(pop[i].obj[1]);
}
}
// los ordena conforme a su frente
sort(pop.begin(),pop.end(),[](const individuo& left,const individuo& right)
{return left.front<right.front;});
}
// recibe la poblacion y el objetvo por el cual ordenar
// regresa el orden de los indices que lo ordenan del indice start al end
vector<int> argsort(const vector<individuo>& pop,int start,int end,int kobj){
vector<int> idx(end-start+1);
// crea el vector de indices
iota(idx.begin(), idx.end(),start);
sort(idx.begin(),idx.end(),[&pop,kobj](int left,int right)->bool{
return pop[left].obj[kobj]<pop[right].obj[kobj];});
return idx;
}
// asume que ya estan ordenados en frentes
// asigna los numeros de crowding
void crowdsort(vector<individuo>& pop){
vector<int> sorted_idx;
int idx,idxp,idxm,start,end;
double imax,imin;
// encontrar los indices de los frentes
vector<int> fridx;
fridx.push_back(0);
for(int i=1;i<pop.size();i++){
if(pop[i].front!=pop[i-1].front)
fridx.push_back(i);
}
fridx.push_back(pop.size());
for(int k=1;k<fridx.size();k++){
start = fridx[k-1];
end = fridx[k]-1;
for(int i=0;i<pop[0].obj.size();i++){
// ordenar respecto al i-esimo objetivo
sorted_idx = argsort(pop,start,end,i);
// hallar el rango de los valores para normalizar
imax = pop[sorted_idx.back()].obj[i];
imin = pop[sorted_idx.front()].obj[i];
// ya que estan ordenados asignar la crowddist
for(int j=0;j<sorted_idx.size();j++){
idx = sorted_idx[j];
// a los extremos les pone una distancia grande
if(j == 0 or j ==sorted_idx.size()-1){
pop[idx].crowddist = 1e10;
continue;
}
idxp =sorted_idx[j+1];
idxm =sorted_idx[j-1];
pop[idx].crowddist += (pop[idxp].obj[i]-pop[idxm].obj[i])/(imax-imin);
}
}
}//for fridx
}
// regresa un numero aleatorio entre 0 y 1
double randomperc(){
srand((int)clock());
return static_cast <float> (rand()) / static_cast <float> (RAND_MAX);
}
// hacer funciones de cruza y mutacion
// regresa un individuo elegido por torneo binario
int crtournament(const vector<individuo>& parents){
// seleccionar dos al azar
srand((int)clock());
int comp1=random()%parents.size(),comp2=random()%parents.size();
// asegurarse que no sean iguales
while(comp1==comp2)
comp2=random()%parents.size();
// elegir al ganador
if(parents[comp1].front<parents[comp2].front)
return comp1;
if(parents[comp2].front<parents[comp1].front)
return comp2;
if(parents[comp2].crowddist<parents[comp1].crowddist)
return comp2;
return comp1;
}
// cruce por orden parcial
individuo porderx(const individuo& x,const individuo& y){
unsigned seed = chrono::system_clock::now().time_since_epoch().count();
mt19937 gen(seed);
uniform_int_distribution<int> dist(0,1);
int xcount,ycount,rand;
int jobid,xid,yid;
individuo hijo(x.njobs,x.nmaq);
for(int i=0;i<x.nmaq;i++){
// marca si el trabajo ya fue asignado
vector<bool> assigned(x.njobs,false);
xcount = 0,ycount =0;
for(int k = 0;k<x.njobs;k++){
// genera los posibles trabajos
// mientras alguno de los dos este asignado
do{
xid = x.plan[i*x.njobs+xcount].id;
yid = y.plan[i*y.njobs+ycount].id;
// avanza si ya esta asignado
xcount += assigned[xid/x.nmaq];
ycount += assigned[yid/y.nmaq];
}while(assigned[xid/x.nmaq] or assigned[yid/y.nmaq]);
// elegir alguno
rand = dist(gen);
jobid = rand*xid + (1-rand)*yid;
hijo.plan[i*hijo.njobs+k].id = jobid;
assigned[jobid/x.nmaq] = true;
xcount += (rand);
ycount += (1-rand);
}
}
// hay que asignar las jobsuc y jobdep
hijo.build_dep();
return hijo;
}
// mutacion por busqueda local iterada
void mutate(vector<individuo>& pop,jsp* problem){
for(auto& x: pop){
if(randomperc()<.2){
x.perturb();
//x = problem->ILS(x,make_n7,0);
x = problem->local_search(x,make_n7);
}
}
}
// cruza la poblacion
vector<individuo> cross(const vector<individuo>& parents){
vector<individuo> children(parents.size());
int pidx1,pidx2;
// escoger a los padres por crowding y eso
for(int i=0;i<parents.size()/2;i++){
pidx1 = crtournament(parents);
pidx2 = crtournament(parents);
// realcross(parents[pidx1],parents[pidx2],children[2*i],children[2*i+1]);
children[2*i]= porderx(parents[pidx1],parents[pidx2]);
children[2*i+1]= porderx(parents[pidx1],parents[pidx2]);
}
return children;
}
// selecciona de acuerdo con el crowd y con el frente
// asume que ya estan asigandos los frentes y la crowddist
vector<individuo> select(const vector<individuo>& pop){
vector<individuo> parents;
parents.reserve(pop.size()/2);
vector<individuo> current_front;
int upcut = pop.size()/2-1;
int lowcut = pop.size()/2-1;
int front = pop[upcut].front;
// encontrar los limites del ultimo frente que cabe
while(pop[upcut+1].front == front)
upcut+=1;
while(pop[lowcut-1].front == front)
lowcut-=1;
current_front.insert(current_front.end(),pop.begin()+lowcut,pop.begin()+upcut+1);
sort(current_front.begin(),current_front.end(),[](const individuo& a, const individuo& b)->bool
{
return a.crowddist > b.crowddist;
});
parents.insert(parents.end(),pop.begin(),pop.begin()+lowcut);
parents.insert(parents.end(),current_front.begin(),current_front.begin()+(pop.size()/2 - parents.size()));
return parents;
}
/*
// NSGA II
vector<individuo> nsga2(int popsize,int max_iter, int problem, int dim, int nobj){
// genera a los hjos y padres juntos en pop
vector<individuo> pop ;
pop.reserve(popsize*2);
vector<individuo> parents=initpop(dim,popsize) ,hijos= initpop(dim,popsize);
for(int i= 0;i<max_iter;i++){
// 1.0 combinar padres e hijos
pop.insert(pop.end(),parents.begin(),parents.end());
pop.insert(pop.end(),hijos.begin(),hijos.end());
// 1.1 evaluar
eval(pop,problem);
// 2 ordenar en frentes
ndsort(pop);
// 3.0 hallar la distancia de crowding
crowdsort(pop);
// 3.1 escoger padres
parents = select(pop);
// 4 generar hijos
hijos = cross(parents);
pop.clear();
}
// hallar a los no dominados
int cut=parents.size()/2;
int delta = cut/2;
while(delta>0){
cut = parents[cut].front==0?cut+delta:cut-delta;
delta/=2;
}
parents.resize(cut);
return parents;
}
*/
| [
"j.crabell62@gmail.com"
] | j.crabell62@gmail.com |
3a2fb33f4ee5e01b33021672bd61154a732a112c | b7395f57c25ba380d3c8b57ee489ff21807944d2 | /lab2sem3/testSeq.hpp | 9dbb058102605e3bf3139169ca866b9bfc22b7fb | [] | no_license | respair/3semlab2 | 91a59e0f4024a78f6cb4458246b9994455eb6bb1 | 4cff965b78be570fc6851007c4e2c41b37d91b08 | refs/heads/main | 2023-01-30T01:42:52.615368 | 2020-12-15T14:15:41 | 2020-12-15T14:15:41 | 318,294,563 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,386 | hpp | #pragma once
#include "ArraySequence.hpp"
#pragma once
#include "LinkedListSequence.hpp"
#include "ArraySequence.hpp"
#include "Sequence.hpp"
#include <cassert>
#include <iostream>
void TestGetSize() {
std::cout << "TEST: SEQUENCE:" << std::endl;
{
int arr[5] = { 1,0,2,3,-1 };
ArraySequence<int> test(arr, 5);
Sequence<int>* seq = &test;
assert(5 == seq->GetSize());
std::cout << "GET SIZE: 1 TEST: DONE!" << std::endl;
}
{
int arr[10] = { 1,0,2,3,-1,1,44,6,32,1 };
ArraySequence<int> test(arr, 10);
Sequence<int>* seq = &test;
assert(10 == seq->GetSize());
std::cout << "GET SIZE: 2 TEST: DONE!" << std::endl;
}
{
int arr[5] = { 1,0,2,3,-1 };
ListSequence<int> test(arr, 5);
Sequence<int>* seq = &test;
//Sequence<int>* seq1 = new ListSequence<int>(arr, 5);
assert(5 == seq->GetSize());
std::cout << "GET SIZE: 3 TEST: DONE!" << std::endl;
}
{
int arr[10] = { 1,0,2,3,-1,1,44,6,32,1 };
ListSequence<int> test(arr, 10);
Sequence<int>* seq = &test;
//Sequence<int>* seq1 = new ListSequence<int>(arr, 5);
assert(10 == seq->GetSize());
std::cout << "GET SIZE: 4 TEST: DONE!" << std::endl;
}
{
ArraySequence<int> test(50);
Sequence<int>* seq = &test;
//Sequence<int>* seq1 = new ListSequence<int>(arr, 5);
assert(50 == seq->GetSize());
std::cout << "GET SIZE: 5 TEST: DONE!" << std::endl;
}
std::cout << std::endl;
}
void TestGet() {
{
int arr[5] = { 1,0,2,3,-1 };
ArraySequence<int> testing(arr, 5);
Sequence<int>* seq = &testing;
//Sequence<int>* seq1 = new ListSequence<int>(arr, 5);
assert(0 == seq->Get(1));
assert(1 == seq->Get(0));
assert(2 == seq->Get(2));
std::cout << "GET: 1 TEST: DONE!" << std::endl;
}
{
int arr[5] = { 8899,-97665,0,998,-345 };
ArraySequence<int> testing(arr, 5);
Sequence<int>* seq2 = &testing;
//Sequence<int>* seq3 = new ListSequence<int>(arr, 5);
assert(998 == seq2->Get(3));
assert(-345 == seq2->Get(4));
assert(-97665 == seq2->Get(1));
std::cout << "GET: 2 TEST: DONE!" << std::endl;
}
{
int arr[5] = { 1,0,2,3,-1 };
ListSequence<int> testing(arr, 5);
Sequence<int>* seq4 = &testing;
//Sequence<int>* seq5 = new ListSequence<int>(arr, 5);
assert(0 == seq4->Get(1));
assert(1 == seq4->Get(0));
assert(2 == seq4->Get(2));
std::cout << "GET: 3 TEST: DONE!" << std::endl;
}
{
int arr[5] = { 8899,-97665,0,998,-345 };
ListSequence<int> testing(arr, 5);
Sequence<int>* seq6 = &testing;
//Sequence<int>* seq3 = new ListSequence<int>(arr, 5);
assert(998 == seq6->Get(3));
assert(-345 == seq6->Get(4));
assert(-97665 == seq6->Get(1));
std::cout << "GET: 4 TEST: DONE!" << std::endl;
}
std::cout << std::endl;
}
void TestSet() {
{
int arr[5] = { 1,0,2,3,-1 };
ArraySequence<int> testing(arr, 5);
Sequence<int>* seq = &testing;
seq->Set(1, 2);
assert(2 == seq->Get(1));
seq->Set(0, -2);
assert(-2 == seq->Get(0));
std::cout << "SET: 1 TEST: DONE!" << std::endl;
std::cout << "SET: 2 TEST: DONE!" << std::endl;
}
{
int arr[5] = { 8899,-97665,0,998,-345 };
ArraySequence<int> testing(arr, 5);
Sequence<int>* seq2 = &testing;
seq2->Set(4, 0);
assert(0 == seq2->Get(4));
std::cout << "SET: 3 TEST: DONE!" << std::endl;
}
{
int arr[5] = { 1,0,2,3,-1 };
ListSequence<int> testing(arr, 5);
Sequence<int>* seq4 = &testing;
seq4->Set(1, 2);
assert(2 == seq4->Get(1));
seq4->Set(0, -2);
assert(-2 == seq4->Get(0));
std::cout << "SET: 4 TEST: DONE!" << std::endl;
std::cout << "SET: 5 TEST: DONE!" << std::endl;
}
{
int arr[5] = { 8899,-97665,0,998,-345 };
ListSequence<int> testing(arr, 5);
Sequence<int>* seq6 = &testing;
seq6->Set(4, 0);
assert(0 == seq6->Get(4));
std::cout << "SET: 6 TEST: DONE!" << std::endl;
}
cout << std::endl;
}
| [
"senselessly@list.ru"
] | senselessly@list.ru |
1f88f336b73827aee70e3dda89c8ce9638f37da3 | 8e8f6ea9a3dfba0fe1b309d77b3887ca2c48f833 | /codeforces/1428/C.cpp | 9230f7fcf8385b586312ecd121c82a6d460642bf | [] | no_license | MahirSez/problem-solving | dcfa75a15a44eb32716b706324be5226334558f1 | 385a43a1354e64be82a15528ee2d52d7e93812f3 | refs/heads/master | 2023-03-21T10:53:30.135684 | 2021-02-21T13:25:00 | 2021-03-07T15:40:47 | 340,282,809 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,153 | cpp | #include <bits/stdc++.h>
#define ll long long int
#define uu first
#define vv second
#define pii pair<int,int>
#define pll pair<ll,ll>
#define tp tuple<int,int,int>
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
using namespace std;
const int INF = 1e9;
const ll MOD = 1e9 + 7;
const int N = 1e6 + 6;
int main() {
fastio;
int t;
cin>>t;
while(t--) {
string s;
cin>>s;
stack<int>st;
reverse(s.begin() , s.end());
for(auto x : s) {
if(x == 'B') st.push(2);
else {
if(st.empty() || st.top() == 1 ) st.push(1);
else if(st.top() == 2) st.pop();
else assert(0);
}
}
int ans = st.size();
while(!st.empty()) {
int top = st.top();
st.pop();
if(st.empty()) continue;
if(top == 2 && st.top() == 2) {
ans -= 2;
st.pop();
}
}
cout<<ans<<'\n';
}
return 0;
} | [
"mahirsezan@gmail.com"
] | mahirsezan@gmail.com |
5ac0068916b76d95689380d62dba6e3210fe88fa | 5fb564caaff280de17e8a111549621752b4d7741 | /CruiseControl/CruiseSpeed.cpp | cd6a3d7cd7db570090c853f2f06e5a9c16b49171 | [] | no_license | uzamakihina/CodingChallenges | b742c5841a79b5f31c372d78195cfcdb46fb37f9 | 485df78c6257b108cf81b22962ac3543bc931752 | refs/heads/master | 2020-05-28T05:56:44.793151 | 2019-05-30T19:50:09 | 2019-05-30T19:50:09 | 188,901,571 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 919 | cpp |
// Problem description link
//https://code.google.com/codejam/contest/8294486/dashboard
#include <iostream>
using namespace std;
void find_speed(FILE *fp, int trail);
FILE *rp;
int main(){
FILE *fp;
fp = fopen("SpeedStatsCases.txt", "r");
rp = fopen("CruiseSpeeds.txt", "w");
int cases;
fscanf(fp, "%d", &cases);
for(int i = 0 ; i < cases; i++){
find_speed(fp,i);
}
}
void find_speed(FILE *fp, int trail){
float distance, horses;
fscanf(fp,"%f %f", &distance, &horses);
float slowestTime;
float starting, speed, time;
fscanf(fp,"%f %f", &starting, &speed);
slowestTime = (distance - starting)/speed;
for(int i = 1 ; i < horses ; i++){
fscanf(fp,"%f %f", &starting, &speed);
time = (distance - starting)/speed;
if(time > slowestTime) slowestTime = time;
}
fprintf(rp, "Case %d: fastest cruise speed is %f \n",trail+1, distance/slowestTime);
}
| [
"jlx@ualberta.ca"
] | jlx@ualberta.ca |
a9f854a84c052f4d3e7d0e55b47de9f9693e2948 | a0129176f88da823d749ae28ba28d9c50932e07d | /2016.sp1/linux/devkit/plug-ins/fragmentDumper/fragmentDumper.cpp | b16cf66f62b2b68f50e08e23df8bdd2acf7a5515 | [] | no_license | lovejunjie1/mayaAPI | 02d06fcefdfff8264184aab4751eada23c7f9e62 | fd8dbd03467268c21b4b8aff720188d7287318d5 | refs/heads/master | 2020-06-07T01:39:27.640648 | 2016-09-20T12:51:42 | 2016-11-02T17:28:47 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,789 | cpp | //-
// ==========================================================================
// Copyright 2013 Autodesk, Inc. All rights reserved.
// Use of this software is subject to the terms of the Autodesk license agreement
// provided at the time of installation or download, or which otherwise
// accompanies this software in either electronic or hard copy form.
// ==========================================================================
//+
#include <maya/MFnPlugin.h>
#include <maya/MFragmentManager.h>
#include <maya/MSelectionList.h>
#include <maya/MItSelectionList.h>
#include <maya/MFnDependencyNode.h>
#include <maya/MViewport2Renderer.h>
#include <maya/MPxCommand.h>
#include <maya/MArgList.h>
#include <maya/MGlobal.h>
#include <iostream>
//
// dumpFragment
// Simple command to output the fragment XML code used to render a given
// shading node in Viewport 2.0. On success, code will be written to stderr.
// This demonstrates the usage of MFragmentManager::getFragmentXML().
//
// Flags:
// -iu/-includeUpstream
// If specified, dump the XML for the entire shading graph rooted
// at the given node, rather than just the graph for the given node
// -oc/-objectContext
// If specified, use the current selection as "object context" for
// when retrieving the XML
// Examples:
// dumpFragment -iu lambert1;
//
// dumpFragment checker1;
//
// polySphere -r 1 -sx 20 -sy 20 -ax 0 1 0 -cuv 2 -ch 1 pSphereShape1
// select pSphereShape1;
// dumpFragment -iu -oc lambert1
//
class dumpFragment : public MPxCommand
{
public:
static void* creator()
{
return new dumpFragment();
}
dumpFragment() : MPxCommand() {}
virtual ~dumpFragment() {}
virtual MStatus doIt(const MArgList& args)
{
// Get VP2 renderer
MHWRender::MRenderer* renderer = MHWRender::MRenderer::theRenderer();
if (!renderer) return MS::kFailure;
MHWRender::MFragmentManager* fragmentMgr =
renderer->getFragmentManager();
if (!fragmentMgr) return MS::kFailure;
// Parse args
bool includeUpstream = false;
bool useContext = false;
MString shaderName;
for (unsigned int i=0; i<args.length(); i++)
{
MString argStr = args.asString(i);
if (argStr == "-iu" || argStr == "-includeUpstream")
{
includeUpstream = true;
}
else if (argStr == "-oc" || argStr == "-objectContext")
{
useContext = true;
}
else
{
shaderName = argStr;
break;
}
}
// Get shader
MObject shaderObj;
if (shaderName.length() > 0)
{
MSelectionList list;
if (!list.add(shaderName))
{
displayError(shaderName + ": no such object");
return MS::kFailure;
}
MItSelectionList iter(list);
iter.getDependNode(shaderObj);
}
else
{
displayError("No shader specified");
return MS::kFailure;
}
// Get object context
MDagPath path;
if (useContext)
{
MSelectionList activeList;
MGlobal::getActiveSelectionList(activeList);
MItSelectionList iter(activeList);
if (iter.getDagPath(path) != MS::kSuccess ||
!path.isValid())
{
displayError(
"Object context requested but no DAG object selected");
return MS::kFailure;
}
path.extendToShape();
}
// Dump XML
MStatus status;
MFnDependencyNode node(shaderObj, &status);
if (status == MS::kSuccess)
{
MString buffer;
if (fragmentMgr->getFragmentXML(shaderObj, buffer, includeUpstream, useContext ? &path : NULL))
{
std::cerr << "##############################################################################" << std::endl;
std::cerr << "Fragment graph for shading network rooted at " << node.name().asChar();
std::cerr << "(type: " << node.typeName().asChar() << ")" << std::endl;
if (useContext)
{
std::cerr << "\tUsing object context: " << path.fullPathName().asChar() << std::endl;
}
std::cerr << "##############################################################################" << std::endl;
std::cerr << buffer.asChar() << std::endl;
std::cerr << "##############################################################################" << std::endl;
return MS::kSuccess;
}
else
{
displayError(
"Failed to get fragment graph XML for " + shaderName);
}
}
else
{
displayError(shaderName + " is not a dependency node");
}
return MS::kFailure;
}
};
MStatus initializePlugin(MObject obj)
{
MFnPlugin plugin(obj, PLUGIN_COMPANY, "1.0", "Any");
MStatus status = plugin.registerCommand(
"dumpFragment", dumpFragment::creator);
if (!status)
{
status.perror("registerCommand");
return status;
}
return status;
}
MStatus uninitializePlugin(MObject obj)
{
MFnPlugin plugin(obj);
MStatus status = plugin.deregisterCommand("dumpFragment");
if (!status)
{
status.perror("deregisterCommand");
return status;
}
return status;
}
| [
"faca@mikrosimage.eu"
] | faca@mikrosimage.eu |
f17001c59653755dc696fc938bd0392a0a586268 | 8fcb1c271da597ecc4aeb75855ff4b372b4bb05e | /COJ/CowArt.cpp | fd0e44b49435ba7f850bc0f975f0b9192c4196e6 | [
"Apache-2.0"
] | permissive | MartinAparicioPons/Competitive-Programming | 9c67c6e15a2ea0e2aa8d0ef79de6b4d1f16d3223 | 58151df0ed08a5e4e605abefdd69fef1ecc10fa0 | refs/heads/master | 2020-12-15T21:33:39.504595 | 2016-10-08T20:40:10 | 2016-10-08T20:40:10 | 20,273,032 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,147 | cpp | #include <cstdio>
#include <vector>
#include <set>
#include <queue>
#include <map>
#include <stack>
#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <cstdlib>
#define scd(x) scanf("%d", &x)
#define scc(x) scanf("%c", &x)
#define scd2(x,y) scanf("%d %d", &x, &y)
#define prd(x) printf("%d\n", x)
#define prd2(x,y) printf("%d %d\n", x,y)
#define prc(c) printf("%c\n", c)
#define fora(i,a,n) for(i = a; i < n; i++)
#define for0(i,n) for(i = 0; i < n; i++)
#define _F first
#define _S second
#define _MP make_pair
using namespace std;
typedef pair<int, int> ii;
int main(){
int k, i, j, n, x, y, count,
d1[4]={1, 0, -1, 0},
d2[4]={0, 1, 0, -1};
char a[110][110], aa[110][110], b;
bool vis[110][110]={false};
queue<ii> q;
ii m;
scanf("%d", &n);
for(i=0; i<n; i++){
scanf("%s", a[i]);
for(j = 0; j<n; j++){
if(a[i][j] == 'R')
aa[i][j] = 'G';
else
aa[i][j] = a[i][j];
}
}
for(count=0, k = 0; k < n; k++){
for(j = 0; j < n; j++){
if(vis[k][j]) continue;
q.push(_MP(k,j));
vis[k][j] = true;
count++;
while(!q.empty()){
m = q.front();
q.pop();
x = m._F;
y = m._S;
// printf("| %d %d \n", x, y);
b = a[x][y];
for(i=0; i<4; i++){
if((d2[i] + y >= 0) && (d2[i] + y < n) && (d1[i] + x >= 0)
&& (d1[i] + x < n) && !vis[d1[i]+x][d2[i]+y]){
if(b == a[d1[i]+x][d2[i]+y]){
q.push(_MP(d1[i]+x, d2[i]+y));
vis[d1[i]+x][d2[i]+y] = true;
}
}
}
}
}
}
printf("%d", count);
memset(vis, false, sizeof(vis));
for(count=0, k = 0; k < n; k++){
for(j = 0; j < n; j++){
if(vis[k][j]) continue;
q.push(_MP(k,j));
vis[k][j] = true;
count++;
while(!q.empty()){
m = q.front();
q.pop();
x = m._F;
y = m._S;
// printf("| %d %d \n", x, y);
b = aa[x][y];
for(i=0; i<4; i++){
if((d2[i] + y >= 0) && (d2[i] + y < n) && (d1[i] + x >= 0)
&& (d1[i] + x < n) && !vis[d1[i]+x][d2[i]+y]){
if(b == aa[d1[i]+x][d2[i]+y]){
q.push(_MP(d1[i]+x, d2[i]+y));
vis[d1[i]+x][d2[i]+y] = true;
}
}
}
}
}
}
printf(" %d\n", count);
}
| [
"martin.aparicio.pons@gmail.com"
] | martin.aparicio.pons@gmail.com |
92de3d457941760999d1e6e8390319fa73d080ad | 5d9db4867cc43829005288ad4b2e6441eab4ba94 | /KKT uni v 1.0/Kuvempu/NetravathiHelp.h | 290c5569767b826a4e40a99bf6a295ef4ce33aa4 | [] | no_license | MayuraVerma/KanKey-uni-1.0 | 52f54fb74409ffa1e45f31dc97953fd394c312d2 | 142d366483ae417a69a2eba75b1276f4a253a0e0 | refs/heads/master | 2020-04-24T16:32:05.349472 | 2018-06-25T19:22:59 | 2018-06-25T19:22:59 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,606 | h | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////AUTHOR : Sudheer HS sudheer316@gmail.com////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////DATE : 6-apr-2006 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////COMPANY : KanForge.,HASSAN - 573201 ,KARANATAKA, INDIA ////////////////////////////////////////////////////////////////
////////////////Compiler Used : Microsoft Visual C++ 6.0//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////// This has been done as a project for ,,INDIA ////////////////////////////////////////////////////////////////
//////////////// this is part of the free software KanForge,launched by ////////////////////////////////////////////////////////////////
//////////////// This code as is with out any kind of warranty ,Using or modifing the code or the library without ////////////////////////////////////////////////////////////////
//////////////// the written permission by the university is prohibited,Any such illegal activities is punishable offence as per ////////////////////////////////////////////////////////////////
//////////////// the copy rights ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*
*
*Modified Added New chars pha ph with dots
*Date 11/03/2009 1:44 AM
*Author Sudheer HS
*/
#if !defined(AFX_NETRAVATHIHELP_H__B452D48E_58C4_4A8B_81BC_EC524F9E6CB0__INCLUDED_)
#define AFX_NETRAVATHIHELP_H__B452D48E_58C4_4A8B_81BC_EC524F9E6CB0__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// NetravathiHelp.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// NetravathiHelp dialog
class NetravathiHelp : public CDialog
{
// Construction
public:
NetravathiHelp(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(NetravathiHelp)
enum { IDD = IDD_NETRAVATHI_HELP };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(NetravathiHelp)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(NetravathiHelp)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_NETRAVATHIHELP_H__B452D48E_58C4_4A8B_81BC_EC524F9E6CB0__INCLUDED_)
| [
"sudheer316@gmail.com"
] | sudheer316@gmail.com |
8edbb51f19a36fdf60910c84d237ceafd1b5cf61 | 0641d87fac176bab11c613e64050330246569e5c | /tags/milestone-4-1-5/source/test/intltest/dtfmtrtts.cpp | 0529c3ddb92b7f9e72d82e76f9cc2ab1a082c166 | [
"ICU",
"LicenseRef-scancode-unicode"
] | permissive | svn2github/libicu_full | ecf883cedfe024efa5aeda4c8527f227a9dbf100 | f1246dcb7fec5a23ebd6d36ff3515ff0395aeb29 | refs/heads/master | 2021-01-01T17:00:58.555108 | 2015-01-27T16:59:40 | 2015-01-27T16:59:40 | 9,308,333 | 0 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 20,588 | cpp | /***********************************************************************
* COPYRIGHT:
* Copyright (c) 1997-2009, International Business Machines Corporation
* and others. All Rights Reserved.
***********************************************************************/
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "unicode/datefmt.h"
#include "unicode/smpdtfmt.h"
#include "unicode/gregocal.h"
#include "dtfmtrtts.h"
#include "caltest.h"
#include <stdio.h>
#include <string.h>
// *****************************************************************************
// class DateFormatRoundTripTest
// *****************************************************************************
// Useful for turning up subtle bugs: Change the following to TRUE, recompile,
// and run while at lunch.
// Warning -- makes test run infinite loop!!!
#ifndef INFINITE
#define INFINITE 0
#endif
// Define this to test just a single locale
//#define TEST_ONE_LOC "cs_CZ"
// If SPARSENESS is > 0, we don't run each exhaustive possibility.
// There are 24 total possible tests per each locale. A SPARSENESS
// of 12 means we run half of them. A SPARSENESS of 23 means we run
// 1 of them. SPARSENESS _must_ be in the range 0..23.
int32_t DateFormatRoundTripTest::SPARSENESS = 0;
int32_t DateFormatRoundTripTest::TRIALS = 4;
int32_t DateFormatRoundTripTest::DEPTH = 5;
DateFormatRoundTripTest::DateFormatRoundTripTest() : dateFormat(0) {
}
DateFormatRoundTripTest::~DateFormatRoundTripTest() {
delete dateFormat;
}
#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break;
void
DateFormatRoundTripTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
{
optionv = (par && *par=='v');
switch (index) {
CASE(0,TestDateFormatRoundTrip)
CASE(1, TestCentury)
default: name = ""; break;
}
}
UBool
DateFormatRoundTripTest::failure(UErrorCode status, const char* msg)
{
if(U_FAILURE(status)) {
errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
return TRUE;
}
return FALSE;
}
UBool
DateFormatRoundTripTest::failure(UErrorCode status, const char* msg, const UnicodeString& str)
{
if(U_FAILURE(status)) {
UnicodeString escaped;
escape(str,escaped);
errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status) + ", str=" + escaped);
return TRUE;
}
return FALSE;
}
void DateFormatRoundTripTest::TestCentury()
{
UErrorCode status = U_ZERO_ERROR;
Locale locale("es_PA");
UnicodeString pattern = "MM/dd/yy hh:mm:ss a z";
SimpleDateFormat fmt(pattern, locale, status);
if(!assertSuccess("trying to construct", status))return;
UDate date[] = {-55018555891590.05, 0, 0};
UnicodeString result[2];
fmt.format(date[0], result[0]);
date[1] = fmt.parse(result[0], status);
fmt.format(date[1], result[1]);
date[2] = fmt.parse(result[1], status);
/* This test case worked OK by accident before. date[1] != date[0],
* because we use -80/+20 year window for 2-digit year parsing.
* (date[0] is in year 1926, date[1] is in year 2026.) result[1] set
* by the first format call returns "07/13/26 07:48:28 p.m. PST",
* which is correct, because DST was not used in year 1926 in zone
* America/Los_Angeles. When this is parsed, date[1] becomes a time
* in 2026, which is "07/13/26 08:48:28 p.m. PDT". There was a zone
* offset calculation bug that observed DST in 1926, which was resolved.
* Before the bug was resolved, result[0] == result[1] was true,
* but after the bug fix, the expected result is actually
* result[0] != result[1]. -Yoshito
*/
/* TODO: We need to review this code and clarify what we really
* want to test here.
*/
//if (date[1] != date[2] || result[0] != result[1]) {
if (date[1] != date[2]) {
errln("Round trip failure: \"%S\" (%f), \"%S\" (%f)", result[0].getBuffer(), date[1], result[1].getBuffer(), date[2]);
}
}
// ==
void DateFormatRoundTripTest::TestDateFormatRoundTrip()
{
UErrorCode status = U_ZERO_ERROR;
getFieldCal = Calendar::createInstance(status);
failure(status, "Calendar::createInstance");
if(!assertSuccess("trying to construct", status))return;
int32_t locCount = 0;
const Locale *avail = DateFormat::getAvailableLocales(locCount);
logln("DateFormat available locales: %d", locCount);
if(quick) {
SPARSENESS = 18;
logln("Quick mode: only testing SPARSENESS = 18");
}
TimeZone *tz = TimeZone::createDefault();
UnicodeString temp;
logln("Default TimeZone: " + tz->getID(temp));
delete tz;
#ifdef TEST_ONE_LOC // define this to just test ONE locale.
Locale loc(TEST_ONE_LOC);
test(loc);
#if INFINITE
for(;;) {
test(loc);
}
#endif
#else
# if INFINITE
// Special infinite loop test mode for finding hard to reproduce errors
Locale loc = Locale::getDefault();
logln("ENTERING INFINITE TEST LOOP FOR Locale: " + loc.getDisplayName(temp));
for(;;)
test(loc);
# else
test(Locale::getDefault());
#if 1
static const UVersionInfo ICU_416 = {4,1,6,0};
// installed locales
for (int i=0; i < locCount; ++i) {
// TIME BOMB for round trip test with Chinese & CLDR 1.7 data - Yoshito to investigate
// Skip the test if language is chinese and version < 4.1.6
if ( strcmp(avail[i].getLanguage(),"zh") || isICUVersionAtLeast(ICU_416)) {
test(avail[i]);
}
}
#endif
#if 1
// special locales
int32_t jCount = CalendarTest::testLocaleCount();
for (int32_t j=0; j < jCount; ++j) {
test(Locale(CalendarTest::testLocaleID(j)));
}
#endif
# endif
#endif
delete getFieldCal;
}
static const char *styleName(DateFormat::EStyle s)
{
switch(s)
{
case DateFormat::SHORT: return "SHORT";
case DateFormat::MEDIUM: return "MEDIUM";
case DateFormat::LONG: return "LONG";
case DateFormat::FULL: return "FULL";
// case DateFormat::DEFAULT: return "DEFAULT";
case DateFormat::DATE_OFFSET: return "DATE_OFFSET";
case DateFormat::NONE: return "NONE";
case DateFormat::DATE_TIME: return "DATE_TIME";
default: return "Unknown";
}
}
void DateFormatRoundTripTest::test(const Locale& loc)
{
UnicodeString temp;
#if !INFINITE
logln("Locale: " + loc.getDisplayName(temp));
#endif
// Total possibilities = 24
// 4 date
// 4 time
// 16 date-time
UBool TEST_TABLE [24];//= new boolean[24];
int32_t i = 0;
for(i = 0; i < 24; ++i)
TEST_TABLE[i] = TRUE;
// If we have some sparseness, implement it here. Sparseness decreases
// test time by eliminating some tests, up to 23.
for(i = 0; i < SPARSENESS; ) {
int random = (int)(randFraction() * 24);
if (random >= 0 && random < 24 && TEST_TABLE[i]) {
TEST_TABLE[i] = FALSE;
++i;
}
}
int32_t itable = 0;
int32_t style = 0;
for(style = DateFormat::FULL; style <= DateFormat::SHORT; ++style) {
if(TEST_TABLE[itable++]) {
logln("Testing style " + UnicodeString(styleName((DateFormat::EStyle)style)));
DateFormat *df = DateFormat::createDateInstance((DateFormat::EStyle)style, loc);
if(df == NULL) {
errln(UnicodeString("Could not DF::createDateInstance ") + UnicodeString(styleName((DateFormat::EStyle)style)) + " Locale: " + loc.getDisplayName(temp));
} else {
test(df, loc);
delete df;
}
}
}
for(style = DateFormat::FULL; style <= DateFormat::SHORT; ++style) {
if (TEST_TABLE[itable++]) {
logln("Testing style " + UnicodeString(styleName((DateFormat::EStyle)style)));
DateFormat *df = DateFormat::createTimeInstance((DateFormat::EStyle)style, loc);
if(df == NULL) {
errln(UnicodeString("Could not DF::createTimeInstance ") + UnicodeString(styleName((DateFormat::EStyle)style)) + " Locale: " + loc.getDisplayName(temp));
} else {
test(df, loc, TRUE);
delete df;
}
}
}
for(int32_t dstyle = DateFormat::FULL; dstyle <= DateFormat::SHORT; ++dstyle) {
for(int32_t tstyle = DateFormat::FULL; tstyle <= DateFormat::SHORT; ++tstyle) {
if(TEST_TABLE[itable++]) {
logln("Testing dstyle" + UnicodeString(styleName((DateFormat::EStyle)dstyle)) + ", tstyle" + UnicodeString(styleName((DateFormat::EStyle)tstyle)) );
DateFormat *df = DateFormat::createDateTimeInstance((DateFormat::EStyle)dstyle, (DateFormat::EStyle)tstyle, loc);
if(df == NULL) {
errln(UnicodeString("Could not DF::createDateTimeInstance ") + UnicodeString(styleName((DateFormat::EStyle)dstyle)) + ", tstyle" + UnicodeString(styleName((DateFormat::EStyle)tstyle)) + "Locale: " + loc.getDisplayName(temp));
} else {
test(df, loc);
delete df;
}
}
}
}
}
void DateFormatRoundTripTest::test(DateFormat *fmt, const Locale &origLocale, UBool timeOnly)
{
UnicodeString pat;
if(fmt->getDynamicClassID() != SimpleDateFormat::getStaticClassID()) {
errln("DateFormat wasn't a SimpleDateFormat");
return;
}
UBool isGregorian = FALSE;
UErrorCode minStatus = U_ZERO_ERROR;
UDate minDate = CalendarTest::minDateOfCalendar(*fmt->getCalendar(), isGregorian, minStatus);
if(U_FAILURE(minStatus)) {
errln((UnicodeString)"Failure getting min date for " + origLocale.getName());
return;
}
//logln(UnicodeString("Min date is ") + fullFormat(minDate) + " for " + origLocale.getName());
pat = ((SimpleDateFormat*)fmt)->toPattern(pat);
// NOTE TO MAINTAINER
// This indexOf check into the pattern needs to be refined to ignore
// quoted characters. Currently, this isn't a problem with the locale
// patterns we have, but it may be a problem later.
UBool hasEra = (pat.indexOf(UnicodeString("G")) != -1);
UBool hasZoneDisplayName = (pat.indexOf(UnicodeString("z")) != -1) || (pat.indexOf(UnicodeString("v")) != -1)
|| (pat.indexOf(UnicodeString("V")) != -1);
// Because patterns contain incomplete data representing the Date,
// we must be careful of how we do the roundtrip. We start with
// a randomly generated Date because they're easier to generate.
// From this we get a string. The string is our real starting point,
// because this string should parse the same way all the time. Note
// that it will not necessarily parse back to the original date because
// of incompleteness in patterns. For example, a time-only pattern won't
// parse back to the same date.
//try {
for(int i = 0; i < TRIALS; ++i) {
UDate *d = new UDate [DEPTH];
UnicodeString *s = new UnicodeString[DEPTH];
if(isGregorian == TRUE) {
d[0] = generateDate();
} else {
d[0] = generateDate(minDate);
}
UErrorCode status = U_ZERO_ERROR;
// We go through this loop until we achieve a match or until
// the maximum loop count is reached. We record the points at
// which the date and the string starts to match. Once matching
// starts, it should continue.
int loop;
int dmatch = 0; // d[dmatch].getTime() == d[dmatch-1].getTime()
int smatch = 0; // s[smatch].equals(s[smatch-1])
for(loop = 0; loop < DEPTH; ++loop) {
if (loop > 0) {
d[loop] = fmt->parse(s[loop-1], status);
failure(status, "fmt->parse", s[loop-1]+" in locale: " + origLocale.getName());
status = U_ZERO_ERROR; /* any error would have been reported */
}
s[loop] = fmt->format(d[loop], s[loop]);
// For displaying which date is being tested
//logln(s[loop] + " = " + fullFormat(d[loop]));
if(s[loop].length() == 0) {
errln("FAIL: fmt->format gave 0-length string in " + pat + " with number " + d[loop] + " in locale " + origLocale.getName());
}
if(loop > 0) {
if(smatch == 0) {
UBool match = s[loop] == s[loop-1];
if(smatch == 0) {
if(match)
smatch = loop;
}
else if( ! match)
errln("FAIL: String mismatch after match");
}
if(dmatch == 0) {
// {sfb} watch out here, this might not work
UBool match = d[loop]/*.getTime()*/ == d[loop-1]/*.getTime()*/;
if(dmatch == 0) {
if(match)
dmatch = loop;
}
else if( ! match)
errln("FAIL: Date mismatch after match");
}
if(smatch != 0 && dmatch != 0)
break;
}
}
// At this point loop == DEPTH if we've failed, otherwise loop is the
// max(smatch, dmatch), that is, the index at which we have string and
// date matching.
// Date usually matches in 2. Exceptions handled below.
int maxDmatch = 2;
int maxSmatch = 1;
if (dmatch > maxDmatch) {
// Time-only pattern with zone information and a starting date in PST.
if(timeOnly && hasZoneDisplayName
&& fmt->getTimeZone().inDaylightTime(d[0], status) && ! failure(status, "TimeZone::inDST()")) {
maxDmatch = 3;
maxSmatch = 2;
}
}
// String usually matches in 1. Exceptions are checked for here.
if(smatch > maxSmatch) { // Don't compute unless necessary
UBool in0;
// Starts in BC, with no era in pattern
if( ! hasEra && getField(d[0], UCAL_ERA) == GregorianCalendar::BC)
maxSmatch = 2;
// Starts in DST, no year in pattern
else if((in0=fmt->getTimeZone().inDaylightTime(d[0], status)) && ! failure(status, "gettingDaylightTime") &&
pat.indexOf(UnicodeString("yyyy")) == -1)
maxSmatch = 2;
// If we start not in DST, but transition into DST
else if (!in0 &&
fmt->getTimeZone().inDaylightTime(d[1], status) && !failure(status, "gettingDaylightTime"))
maxSmatch = 2;
// Two digit year with no time zone change,
// unless timezone isn't used or we aren't close to the DST changover
else if (pat.indexOf(UnicodeString("y")) != -1
&& pat.indexOf(UnicodeString("yyyy")) == -1
&& getField(d[0], UCAL_YEAR)
!= getField(d[dmatch], UCAL_YEAR)
&& !failure(status, "error status [smatch>maxSmatch]")
&& ((hasZoneDisplayName
&& (fmt->getTimeZone().inDaylightTime(d[0], status)
== fmt->getTimeZone().inDaylightTime(d[dmatch], status)
|| getField(d[0], UCAL_MONTH) == UCAL_APRIL
|| getField(d[0], UCAL_MONTH) == UCAL_OCTOBER))
|| !hasZoneDisplayName)
)
{
maxSmatch = 2;
}
// If zone display name is used, fallback format might be used before 1970
else if (hasZoneDisplayName && d[0] < 0) {
maxSmatch = 2;
}
}
if(dmatch > maxDmatch || smatch > maxSmatch) { // Special case for Japanese and Islamic (could have large negative years)
const char *type = fmt->getCalendar()->getType();
if(!strcmp(type,"japanese")) {
maxSmatch = 4;
maxDmatch = 4;
}
}
// Use @v to see verbose results on successful cases
UBool fail = (dmatch > maxDmatch || smatch > maxSmatch);
if (optionv || fail) {
if (fail) {
errln(UnicodeString("\nFAIL: Pattern: ") + pat +
" in Locale: " + origLocale.getName());
} else {
errln(UnicodeString("\nOk: Pattern: ") + pat +
" in Locale: " + origLocale.getName());
}
logln("Date iters until match=%d (max allowed=%d), string iters until match=%d (max allowed=%d)",
dmatch,maxDmatch, smatch, maxSmatch);
for(int j = 0; j <= loop && j < DEPTH; ++j) {
UnicodeString temp;
FieldPosition pos(FieldPosition::DONT_CARE);
errln((j>0?" P> ":" ") + fullFormat(d[j]) + " F> " +
escape(s[j], temp) + UnicodeString(" d=") + d[j] +
(j > 0 && d[j]/*.getTime()*/==d[j-1]/*.getTime()*/?" d==":"") +
(j > 0 && s[j] == s[j-1]?" s==":""));
}
}
delete[] d;
delete[] s;
}
/*}
catch (ParseException e) {
errln("Exception: " + e.getMessage());
logln(e.toString());
}*/
}
const UnicodeString& DateFormatRoundTripTest::fullFormat(UDate d) {
UErrorCode ec = U_ZERO_ERROR;
if (dateFormat == 0) {
dateFormat = new SimpleDateFormat((UnicodeString)"EEE MMM dd HH:mm:ss.SSS zzz yyyy G", ec);
if (U_FAILURE(ec) || dateFormat == 0) {
fgStr = "[FAIL: SimpleDateFormat constructor]";
delete dateFormat;
dateFormat = 0;
return fgStr;
}
}
fgStr.truncate(0);
dateFormat->format(d, fgStr);
return fgStr;
}
/**
* Return a field of the given date
*/
int32_t DateFormatRoundTripTest::getField(UDate d, int32_t f) {
// Should be synchronized, but we're single threaded so it's ok
UErrorCode status = U_ZERO_ERROR;
getFieldCal->setTime(d, status);
failure(status, "getfieldCal->setTime");
int32_t ret = getFieldCal->get((UCalendarDateFields)f, status);
failure(status, "getfieldCal->get");
return ret;
}
UnicodeString& DateFormatRoundTripTest::escape(const UnicodeString& src, UnicodeString& dst )
{
dst.remove();
for (int32_t i = 0; i < src.length(); ++i) {
UChar c = src[i];
if(c < 0x0080)
dst += c;
else {
dst += UnicodeString("[");
char buf [8];
sprintf(buf, "%#x", c);
dst += UnicodeString(buf);
dst += UnicodeString("]");
}
}
return dst;
}
#define U_MILLIS_PER_YEAR (365.25 * 24 * 60 * 60 * 1000)
UDate DateFormatRoundTripTest::generateDate(UDate minDate)
{
// Bring range in conformance to generateDate() below.
if(minDate < (U_MILLIS_PER_YEAR * -(4000-1970))) {
minDate = (U_MILLIS_PER_YEAR * -(4000-1970));
}
for(int i=0;i<8;i++) {
double a = randFraction();
// Range from (min) to (8000-1970) AD
double dateRange = (0.0 - minDate) + (U_MILLIS_PER_YEAR + (8000-1970));
a *= dateRange;
// Now offset from minDate
a += minDate;
// Last sanity check
if(a>=minDate) {
return a;
}
}
return minDate;
}
UDate DateFormatRoundTripTest::generateDate()
{
double a = randFraction();
// Now 'a' ranges from 0..1; scale it to range from 0 to 8000 years
a *= 8000;
// Range from (4000-1970) BC to (8000-1970) AD
a -= 4000;
// Now scale up to ms
a *= 365.25 * 24 * 60 * 60 * 1000;
//return new Date((long)a);
return a;
}
#endif /* #if !UCONFIG_NO_FORMATTING */
//eof
| [
"mow@251d0590-4201-4cf1-90de-194747b24ca1"
] | mow@251d0590-4201-4cf1-90de-194747b24ca1 |
d0466be656c92d2042e591bffd7cd4df013a8435 | 8e7fd94fabf66c143de0105d1007bac6b46105b5 | /src/c/arch/glfw/utils.cc | f751a1d053ddcb63681418d9e7011d9dd89e60a6 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"LicenseRef-scancode-public-domain"
] | permissive | davidgiven/wordgrinder | 9420fe20994294d6c6f3be6514e15719ed062420 | 62ec2319bb2e839df2f888ec2b49d645955d75ae | refs/heads/master | 2023-08-16T20:09:03.230267 | 2023-06-06T22:44:40 | 2023-06-06T22:44:40 | 37,010,967 | 830 | 79 | null | 2023-06-06T22:44:41 | 2015-06-07T09:27:07 | Lua | UTF-8 | C++ | false | false | 441 | cc | #include "globals.h"
#include "gui.h"
int get_ivar(const char* name)
{
lua_checkstack(L, 10);
lua_getglobal(L, "GlobalSettings");
lua_getfield(L, -1, "gui");
lua_getfield(L, -1, name);
return luaL_checkinteger(L, -1);
}
const char* get_svar(const char* name)
{
lua_checkstack(L, 10);
lua_getglobal(L, "GlobalSettings");
lua_getfield(L, -1, "gui");
lua_getfield(L, -1, name);
return lua_tostring(L, -1);
}
| [
"dg"
] | dg |
452e1b46542b361b60c24236c1019952258185a9 | 911c6c8da18d05d2cd8fefefdf57e2db7273ce3c | /TrenchCoatAdministrator-GUI/FileRepository.cpp | 15eca3ce50dd9e3a7744bfea75782d9278850928 | [] | no_license | ComanacDragos/Assembly-C-CPP-Projects | db1d34f05e4eaa9f978330503f81da0468682ce9 | 5aa306032319ae7840b30928b3268878b6e18869 | refs/heads/master | 2023-04-15T02:16:10.782569 | 2021-03-16T13:41:16 | 2021-03-16T13:41:16 | 261,495,900 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,362 | cpp | #include "FileRepository.h"
FileRepository::FileRepository(const std::string& filePath) :AbstractRepository()
{
this->filePath = filePath;
}
void FileRepository::storeCoat(const TrenchCoat& coat)
{
std::vector<TrenchCoat> coats = this->loadCoatsFromFile();
if (std::find(coats.begin(), coats.end(), coat) != coats.end())
throw ExistentTrenchCoat{ "Coat already exists\n" };
coats.push_back(coat);
this->storeCoatsToFile(coats);
}
void FileRepository::deleteCoat(const std::string& name)
{
std::vector<TrenchCoat> coats = this->loadCoatsFromFile();
auto iterator = find(coats.begin(), coats.end(), TrenchCoat(name, "size", "source", 0));
if (iterator == coats.end())
throw InexistentTrenchCoat{ "Coat doesn't exist\n" };
coats.erase(iterator);
this->storeCoatsToFile(coats);
}
void FileRepository::updateCoat(const TrenchCoat& coat)
{
std::vector<TrenchCoat> coats = this->loadCoatsFromFile();
auto iterator = find(coats.begin(), coats.end(), coat);
if (iterator == coats.end())
throw InexistentTrenchCoat{ "Coat doesn't exist\n" };
*iterator = coat;
this->storeCoatsToFile(coats);
}
TrenchCoat FileRepository::getCoatFromRepository(int position)
{
std::vector<TrenchCoat> coats = this->getAllCoats();
if (position < 0 || position >= (int)coats.size())
throw BadPosition{ "Invalid position\n" };
return *(coats.begin() + position);
}
TrenchCoat FileRepository::findCoatFromRepository(const std::string& name)
{
std::vector<TrenchCoat> coats = this->getAllCoats();
auto iterator = find(coats.begin(), coats.end(), TrenchCoat(name, "size", "source", 0));
if (iterator == coats.end())
throw InexistentTrenchCoat{ "Coat doesn't exist\n" };
return *iterator;
}
bool FileRepository::existentCoat(const std::string& name)
{
std::vector<TrenchCoat> coats = this->getAllCoats();
auto iterator = find(coats.begin(), coats.end(), TrenchCoat(name, "size", "source", 0));
if (iterator == coats.end())
return false;
return true;
}
int FileRepository::getRepositoryLength()
{
return this->loadCoatsFromFile().size();
}
std::vector<TrenchCoat> FileRepository::getAllCoats()
{
return this->loadCoatsFromFile();
}
void FileRepository::setPath(std::string filePath)
{
this->filePath = filePath;
//this->clearFile();
}
void FileRepository::clearFile()
{
std::ofstream fout(this->filePath);
fout.close();
}
void FileRepository::openFile()
{
system(this->filePath.c_str());
}
void CSVFileRepository::openFile()
{
ShellExecuteA(NULL, NULL, "notepad.exe", this->filePath.c_str(), NULL, SW_SHOWMAXIMIZED);
}
void CSVFileRepository::storeCoatsToFile(const std::vector<TrenchCoat>& coats)
{
std::ofstream fout (this->filePath, std::ios::trunc | std::ios::out);
for (const TrenchCoat& coat : coats)
fout << *(static_cast<const CSVTrenchCoat*>(&coat));
fout.close();
}
std::vector<TrenchCoat> CSVFileRepository::loadCoatsFromFile()
{
std::ifstream fin(this->filePath, std::ios::in);
std::vector<TrenchCoat> coats;
CSVTrenchCoat currentCoat;
while (fin >> currentCoat)
coats.push_back(currentCoat);
fin.close();
return coats;
}
void HTMLFileRepository::openFile()
{
ShellExecuteA(NULL, NULL, "chrome.exe", this->filePath.c_str(), NULL, SW_SHOWMAXIMIZED);
}
void HTMLFileRepository::storeCoatsToFile(const std::vector<TrenchCoat>& coats)
{
std::ofstream fout{ this->filePath };
fout << "<!DOCTYPE html>\n";
fout << "<html>\n";
fout << "<head>\n" << "<title>Coats</title>\n" << "</head>\n";
fout << "<body>\n" << "<table border=\"1\">\n";
fout << "<tr>\n";
fout << "<td>" << "Name" << "</td>\n";
fout << "<td>" << "Size" << "</td>\n";
fout << "<td>" << "Price" << "</td>\n";
fout << "<td>" << "Photograph Source" << "</td>\n";
fout << "</tr>\n";
for (const TrenchCoat& coat : coats)
fout << *(static_cast<const HTMLTrenchCoat*>(&coat));
fout << "</table>\n";
fout << "</body>\n";
fout << "</html>\n";
fout.close();
}
std::vector<TrenchCoat> HTMLFileRepository::loadCoatsFromFile()
{
std::ifstream fin{ this->filePath };
std::vector<TrenchCoat> coats;
std::string line;
HTMLTrenchCoat currentCoat;
int numberOfLinesToSkip = 13;
for (int i = 0; i < numberOfLinesToSkip; i++)
std::getline(fin, line);
while (fin >> currentCoat)
if (currentCoat.getName().size() != 0)
{
coats.push_back(currentCoat);
currentCoat = HTMLTrenchCoat{};
}
fin.close();
return coats;
}
| [
"46956225+WildUrti@users.noreply.github.com"
] | 46956225+WildUrti@users.noreply.github.com |
efd76b9d29258729c51ac26012ed0b6ec638e333 | c4f725909ca87714ec9bc924de50038478920528 | /LimeysSDR/Loggable.hpp | 140af05c189d6606bc286d713618374f21c52317 | [] | no_license | minkione/LimeysSDR | 5c22472d8cf330974d624b949d79eca392d68837 | 517f4907cf98737f34843ef905aaa19a0063adb6 | refs/heads/master | 2020-04-12T10:04:16.242449 | 2018-08-04T00:03:39 | 2018-08-04T00:04:52 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,542 | hpp | //
// Loggable.hpp
// LimeysSDR
//
// Created by Paul Ciarlo on 8/3/18.
// Copyright © 2018 Paul Ciarlo. All rights reserved.
//
#ifndef Loggable_hpp
#define Loggable_hpp
#include <cstdio>
#include <iostream>
#include "Util.hpp"
namespace io {
namespace github {
namespace paulyc {
// WARNING: Not currently thread-safe!
class Loggable
{
public:
enum Level { Trace=0, Debug, Info, Warning, Error, Critical };
static constexpr Level DefaultLevel = Debug;
Loggable() : _currentLevel(DefaultLevel), _prefix(nullptr), _cLogStream(stdout), _streamLogger(std::cout) {}
Loggable(const char *prefix) : Loggable() { _prefix = prefix; }
virtual ~Loggable() {}
Level GetCurrentLogLevel() const { return _currentLevel; }
void SetCurrentLogLevel(Level l) { _currentLevel = l; }
protected:
int Log(Level l, const char *fmtStr, ...);
int LogTimestamp(Level l, const char *logMsg);
// Not thread safe particularly with re: to log level being enabled
std::string FormatLogPrefix(Level l);
template <typename Stream_T>
class StreamLogger
{
public:
StreamLogger(Stream_T &logStream) : _enabled(true), _logStream(logStream) {}
template <typename T>
StreamLogger<Stream_T> &operator<<(const T &rhs) {
if (_enabled) {
_logStream << rhs;
}
return *this;
}
void SetEnabled(bool enabled) { _enabled = enabled; }
private:
bool _enabled;
Stream_T &_logStream;
};
typedef StreamLogger<std::ostream> DefaultStreamLogger;
FILE *GetCurrentCLogStream() const {
return _cLogStream;
}
DefaultStreamLogger &LogStream(Level l=Info) {
if (l >= _currentLevel) {
_streamLogger.SetEnabled(true);
_streamLogger << FormatLogPrefix(l) << ' ';
} else {
_streamLogger.SetEnabled(false);
}
return _streamLogger;
}
private:
static const char * LevelStrings[];
static constexpr const char * LogFmtStr = "[%s] [%s] %s";
static constexpr const char * LogFmtStrPrefix = "[%s] [%s] [%s] %s\n";
static constexpr const char * LogFmtNoPrefix = "[%s] [%s]";
static constexpr const char * LogFmtPrefix = "[%s] [%s] [%s]";
static constexpr const char * LogFmtPrefixStr = "%s %s\n";
Level _currentLevel;
const char *_prefix;
FILE *_cLogStream;
DefaultStreamLogger _streamLogger;
};
}
}
}
#endif /* Loggable_hpp */
| [
"paul.ciarlo@gmail.com"
] | paul.ciarlo@gmail.com |
328b2597e0e2110296e2e77b8ee80d591b30ba25 | 973cd49fbc173f5fd2b1a8575157f7ef91868a23 | /strategy/src/canvas.h | 0bb4eb547146ab91cbb4a00795442804c35ce999 | [] | no_license | Hopson97/design-patterns-explained | 6a4ed515baab0bd436046eb6983fd8b4597d1c44 | 1ff9da9aaeca8ad09bcc4ea524ea63d584544a17 | refs/heads/master | 2020-06-30T18:22:14.066429 | 2019-10-25T17:33:39 | 2019-10-25T17:33:39 | 200,909,650 | 7 | 3 | null | 2019-10-25T17:33:40 | 2019-08-06T19:10:45 | C++ | UTF-8 | C++ | false | false | 1,856 | h | #pragma once
#include <SFML/Graphics/Texture.hpp>
#include <SFML/Graphics/Image.hpp>
#include <SFML/Graphics/RectangleShape.hpp>
#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/Graphics/Color.hpp>
#include <optional>
/**
* @brief The class that holds information about the image
* the user is drawing onto
*
*/
class Canvas {
public:
/**
* @brief Construct a new Canvas object
* Initilizes data required for canvas to operate
* @param width The width of the canvas in pixels
* @param height The height of the canvas in pixels
*/
Canvas(unsigned width, unsigned height, unsigned x, unsigned y);
/**
* @brief Update the canvas image to display what has been drawn since last update
*
*/
void update();
/**
* @brief Render the canvas image onto the window
*
* @param window The window
*/
void render(sf::RenderWindow& window);
/**
* @brief Change the colour of a pixel
*
* @param x The x-coordinate to change
* @param y The y-coordinate to change
* @param color The colour to change the pixel colour to
*/
void changePixel(unsigned x, unsigned y, sf::Color color);
std::optional<sf::Color> getPixelColour(unsigned x, unsigned y) const;
/**
* @brief Erases a pixel from the canvas
*
* @param x The x-coordinate to erase
* @param y The y-coordinate to erase
*/
void erasePixel(unsigned x, unsigned y);
private:
bool isLocationInBounds(unsigned x, unsigned y) const;
sf::Image m_canvas;
sf::Texture m_canvasTexture;
sf::RectangleShape m_renderCanvas;
const sf::IntRect m_bounds;
}; | [
"mhopson@hotmail.co.uk"
] | mhopson@hotmail.co.uk |
d20c520afa6afba50ab60ff9766fd785a8c355f0 | 394baa93338a6510a34700a953d1119594efd36a | /B_Blocks_on_Grid.cpp | 8fb52a8d9297b7a1e6012d4c040f14a019504a7c | [] | no_license | anusjc/CPP | 43dfe1680a5b1a00d363bff56319549db1992d40 | e7b29634d2c36b8e28013d0f10c3ed47cb6a674f | refs/heads/master | 2023-06-24T15:24:41.929533 | 2021-07-26T15:35:43 | 2021-07-26T15:35:43 | 275,631,954 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 121 | cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
vector<vector<int>> ab;
} | [
"anuragmishrarp@gmail.com"
] | anuragmishrarp@gmail.com |
72947111a9908d371e61be48b9163c53ff142648 | 9ff8e317e7293033e3983c5e6660adc4eff75762 | /Source/input/SGF_Input.cpp | c980da4857bd0639a3e288b64a51a437694edfac | [] | no_license | rasputtim/SGF | b26fd29487b93c8e67c73f866635830796970116 | d8af92216bf4e86aeb452fda841c73932de09b65 | refs/heads/master | 2020-03-28T21:55:14.668643 | 2018-11-03T21:15:32 | 2018-11-03T21:15:32 | 147,579,544 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,342 | cpp | /*
SGF - Super Game Fabric Super Game Fabric
Copyright (C) 2010-2011 Rasputtim <raputtim@hotmail.com>
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.
*/
#include "input/SGF_Input.h"
using namespace std;
namespace SGF {
//Constructor
CInput::CInput()
{}
//Destructor
CInput::~CInput()
{}
/*
static CInput::GameKeys convertKey(const CConfiguration & configuration, const int facing, const int key){
if (key == configuration.getRight()){
switch (facing){
case CObject::FACING_LEFT : return CInput::Back;
case CObject::FACING_RIGHT : return CInput::Forward;
}
} else if (key == configuration.getLeft()){
switch (facing){
case CObject::FACING_LEFT : return CInput::Forward;
case CObject::FACING_RIGHT : return CInput::Back;
}
} else if (key == configuration.getButtonX()){ //jump
return CInput::ButtonX; //enum gameinput
} else if (key == configuration.getUp()){
return CInput::Up;
} else if (key == configuration.getDown()){
return CInput::Down;
} else if (key == configuration.getButtonA()){
return CInput::ButtonA;
} else if (key == configuration.getButtonB()){
return CInput::ButtonB;
} else if (key == configuration.getButtonC()){
return CInput::ButtonC;
}
return CInput::Unknown;
}
*/
//Process InputData
/*
void CInput::HandleKeyboardRepeating(KEYBOARDDATA *lpKeyBoard)
{
}
*/
/*
void CInput::HandleMouseMotion(){}
void CInput::HandleMouseSingle() {}
void CInput::HandleMouseRepeating(){}
void CInput::HandleInput() {}
void CInput::HandleKeySingle(SDL_KeyboardEvent key) {}
*/
} //end SGF | [
"rasputtim@hotmail.com"
] | rasputtim@hotmail.com |
1686e8109b2380eab2108629ca2560d0c184c951 | abff3f461cd7d740cfc1e675b23616ee638e3f1e | /opencascade/TDataXtd_Position.hxx | 405f9cabe7834beb4c5b23fd04d13138cfd6a2f1 | [
"Apache-2.0"
] | permissive | CadQuery/pywrap | 4f93a4191d3f033f67e1fc209038fc7f89d53a15 | f3bcde70fd66a2d884fa60a7a9d9f6aa7c3b6e16 | refs/heads/master | 2023-04-27T04:49:58.222609 | 2023-02-10T07:56:06 | 2023-02-10T07:56:06 | 146,502,084 | 22 | 25 | Apache-2.0 | 2023-05-01T12:14:52 | 2018-08-28T20:18:59 | C++ | UTF-8 | C++ | false | false | 3,176 | hxx | // Created on: 2009-04-06
// Created by: Sergey ZARITCHNY
// Copyright (c) 2009-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _TDataXtd_Position_HeaderFile
#define _TDataXtd_Position_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Pnt.hxx>
#include <TDF_Attribute.hxx>
#include <Standard_Boolean.hxx>
class TDF_Label;
class gp_Pnt;
class Standard_GUID;
class TDF_Attribute;
class TDF_RelocationTable;
class TDataXtd_Position;
DEFINE_STANDARD_HANDLE(TDataXtd_Position, TDF_Attribute)
//! Position of a Label
class TDataXtd_Position : public TDF_Attribute
{
public:
//! Create if not found the TDataXtd_Position attribute set its position to <aPos>
Standard_EXPORT static void Set (const TDF_Label& aLabel, const gp_Pnt& aPos);
//! Find an existing, or create an empty, Position.
//! the Position attribute is returned.
Standard_EXPORT static Handle(TDataXtd_Position) Set (const TDF_Label& aLabel);
//! Search label <aLabel) for the TDataXtd_Position attribute and get its position
//! if found returns True
Standard_EXPORT static Standard_Boolean Get (const TDF_Label& aLabel, gp_Pnt& aPos);
Standard_EXPORT TDataXtd_Position();
//! Returns the ID of the attribute.
Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
//! Returns the ID of the attribute.
Standard_EXPORT static const Standard_GUID& GetID();
//! Restores the contents from <anAttribute> into this
//! one. It is used when aborting a transaction.
Standard_EXPORT virtual void Restore (const Handle(TDF_Attribute)& anAttribute) Standard_OVERRIDE;
//! Returns an new empty attribute from the good end
//! type. It is used by the copy algorithm.
Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
//! This method is different from the "Copy" one,
//! because it is used when copying an attribute from
//! a source structure into a target structure. This
//! method pastes the current attribute to the label
//! corresponding to the insertor. The pasted
//! attribute may be a brand new one or a new version
//! of the previous one.
Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& intoAttribute, const Handle(TDF_RelocationTable)& aRelocTationable) const Standard_OVERRIDE;
Standard_EXPORT const gp_Pnt& GetPosition() const;
Standard_EXPORT void SetPosition (const gp_Pnt& aPos);
DEFINE_STANDARD_RTTIEXT(TDataXtd_Position,TDF_Attribute)
protected:
private:
gp_Pnt myPosition;
};
#endif // _TDataXtd_Position_HeaderFile
| [
"adam.jan.urbanczyk@gmail.com"
] | adam.jan.urbanczyk@gmail.com |
9ef75baf93a510e8f703b8f6fe363ac549618aa8 | ba98197d69bb4b9390a94750556d0bc07c163eae | /Source/Engine/Math/MathUtils.h | 80b24fcfe2fdd4b04a145934a3e71633f02d4851 | [
"MIT"
] | permissive | daiwei1999/AwayCPP | a229389369e01e1b80a27ff684723d234dbba030 | 095a994bdd85982ffffd99a9461cbefb57499ccb | refs/heads/master | 2023-07-20T19:42:32.741480 | 2023-07-05T09:10:26 | 2023-07-05T09:10:26 | 36,792,672 | 12 | 6 | null | null | null | null | UTF-8 | C++ | false | false | 245 | h | #pragma once
#include "Common.h"
AWAY_NAMESPACE_BEGIN
class MathUtils
{
public:
static int random(int min, int max);
static float random(float min, float max);
private:
static std::default_random_engine m_generator;
};
AWAY_NAMESPACE_END | [
"daiwei_1999_82@163.com"
] | daiwei_1999_82@163.com |
14e349c3edb8535c040c6dda9c805ac6d8d00945 | b78eabe7b0ac182c5e32f6e7bb381a0ded9fb48f | /HW6/src/shader.h | fd7dca9a4ad99c607baeab238e8f43e22f155203 | [] | no_license | NNNeil-C/Computer_Graphics | 9c29b7bd3d86d56d3a0fc02bd7161bbb564332fe | bc2aacdf3409b96af816b7f1dfb55af05e658ae7 | refs/heads/master | 2020-05-30T05:13:03.584862 | 2019-05-29T14:34:24 | 2019-05-29T14:34:24 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,935 | h | //
// shader.h
// Light
//
// Created by peiyu wang on 2019/5/4.
// Copyright © 2019 peiyu wang. All rights reserved.
//
#ifndef shader_h
#define shader_h
//system header
#include <glad/glad.h>
#include <GLFW/glfw3.h>
//standard header
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
using namespace std;
class Shader
{
public:
unsigned int ID;
// constructor generates the shader on the fly
// ------------------------------------------------------------------------
Shader(const char* vertexPath, const char* fragmentPath)
{
// 1. retrieve the vertex/fragment source code from filePath
std::string vertexCode;
std::string fragmentCode;
std::ifstream vShaderFile;
std::ifstream fShaderFile;
// ensure ifstream objects can throw exceptions:
vShaderFile.exceptions (std::ifstream::failbit | std::ifstream::badbit);
fShaderFile.exceptions (std::ifstream::failbit | std::ifstream::badbit);
try
{
// open files
vShaderFile.open(vertexPath);
fShaderFile.open(fragmentPath);
std::stringstream vShaderStream, fShaderStream;
// read file's buffer contents into streams
vShaderStream << vShaderFile.rdbuf();
fShaderStream << fShaderFile.rdbuf();
// close file handlers
vShaderFile.close();
fShaderFile.close();
// convert stream into string
vertexCode = vShaderStream.str();
fragmentCode = fShaderStream.str();
}
catch (std::ifstream::failure e)
{
std::cout << "ERROR::SHADER::FILE_NOT_SUCCESFULLY_READ" << std::endl;
}
const char* vShaderCode = vertexCode.c_str();
const char * fShaderCode = fragmentCode.c_str();
// 2. compile shaders
unsigned int vertex, fragment;
// vertex shader
// 创建shader程序对象
vertex = glCreateShader(GL_VERTEX_SHADER);
// 指定shader的源代码
glShaderSource(vertex, 1, &vShaderCode, NULL);
// 编译
glCompileShader(vertex);
// 调试
checkCompileErrors(vertex, "VERTEX");
// fragment Shader
fragment = glCreateShader(GL_FRAGMENT_SHADER);
glShaderSource(fragment, 1, &fShaderCode, NULL);
glCompileShader(fragment);
checkCompileErrors(fragment, "FRAGMENT");
// shader Program
ID = glCreateProgram();
// 将shader对象和shaders程序对象绑定
glAttachShader(ID, vertex);
glAttachShader(ID, fragment);
// 链接
glLinkProgram(ID);
// 检测链接时的错误
checkCompileErrors(ID, "PROGRAM");
// delete the shaders as they're linked into our program now and no longer necessery
// 释放中间shader对象
glDeleteShader(vertex);
glDeleteShader(fragment);
}
// activate the shader
// ------------------------------------------------------------------------
void use() const
{
glUseProgram(ID);
}
// utility uniform functions
// ------------------------------------------------------------------------
void setBool(const std::string &name, bool value) const
{
glUniform1i(glGetUniformLocation(ID, name.c_str()), (int)value);
}
// ------------------------------------------------------------------------
void setInt(const std::string &name, int value) const
{
glUniform1i(glGetUniformLocation(ID, name.c_str()), value);
}
// ------------------------------------------------------------------------
void setFloat(const std::string &name, float value) const
{
glUniform1f(glGetUniformLocation(ID, name.c_str()), value);
}
// ------------------------------------------------------------------------
void setVec2(const std::string &name, const glm::vec2 &value) const
{
glUniform2fv(glGetUniformLocation(ID, name.c_str()), 1, &value[0]);
}
void setVec2(const std::string &name, float x, float y) const
{
glUniform2f(glGetUniformLocation(ID, name.c_str()), x, y);
}
// ------------------------------------------------------------------------
void setVec3(const std::string &name, const glm::vec3 &value) const
{
glUniform3fv(glGetUniformLocation(ID, name.c_str()), 1, &value[0]);
}
void setVec3(const std::string &name, float x, float y, float z) const
{
glUniform3f(glGetUniformLocation(ID, name.c_str()), x, y, z);
}
// ------------------------------------------------------------------------
void setVec4(const std::string &name, const glm::vec4 &value) const
{
glUniform4fv(glGetUniformLocation(ID, name.c_str()), 1, &value[0]);
}
void setVec4(const std::string &name, float x, float y, float z, float w) const
{
glUniform4f(glGetUniformLocation(ID, name.c_str()), x, y, z, w);
}
// ------------------------------------------------------------------------
void setMat2(const std::string &name, const glm::mat2 &mat) const
{
glUniformMatrix2fv(glGetUniformLocation(ID, name.c_str()), 1, GL_FALSE, &mat[0][0]);
}
// ------------------------------------------------------------------------
void setMat3(const std::string &name, const glm::mat3 &mat) const
{
glUniformMatrix3fv(glGetUniformLocation(ID, name.c_str()), 1, GL_FALSE, &mat[0][0]);
}
// ------------------------------------------------------------------------
void setMat4(const std::string &name, const glm::mat4 &mat) const
{
glUniformMatrix4fv(glGetUniformLocation(ID, name.c_str()), 1, GL_FALSE, &mat[0][0]);
}
private:
// utility function for checking shader compilation/linking errors.
// ------------------------------------------------------------------------
void checkCompileErrors(GLuint shader, std::string type)
{
GLint success;
GLchar infoLog[1024];
if (type != "PROGRAM")
{
glGetShaderiv(shader, GL_COMPILE_STATUS, &success);
if (!success)
{
glGetShaderInfoLog(shader, 1024, NULL, infoLog);
std::cout << "ERROR::SHADER_COMPILATION_ERROR of type: " << type << "\n" << infoLog << "\n -- --------------------------------------------------- -- " << std::endl;
}
}
else
{
glGetProgramiv(shader, GL_LINK_STATUS, &success);
if (!success)
{
glGetProgramInfoLog(shader, 1024, NULL, infoLog);
std::cout << "ERROR::PROGRAM_LINKING_ERROR of type: " << type << "\n" << infoLog << "\n -- --------------------------------------------------- -- " << std::endl;
}
}
}
};
#endif /* shader_h */
| [
"wangpy6@mail2.sysu.edu.cn"
] | wangpy6@mail2.sysu.edu.cn |
2f92172825f6abd90df2cf8090b5f250e62962df | ab424667ea28737612a249f0442782e81e6f286b | /src/domain.cpp | dad2569b3b5c551786fb29aee11cb6464a213c2f | [] | no_license | phpisciuneri/tg | 9620575329512e2751f0fe8c6b3adc00381442ec | d33c31ab6c8a20019376bb070d4437783c09fe39 | refs/heads/master | 2021-01-15T08:50:05.615926 | 2016-08-17T05:15:27 | 2016-08-17T05:15:27 | 50,220,929 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 819 | cpp | #include "domain.hpp"
#include <cmath>
#include "diagnostic/tracer.hpp"
namespace iplmcfd {
// +----------------+
// | Domain::Domain |
// +----------------+
Domain::Domain( const simparam& param )
{
tracer::scope _("Domain::Domain");
m_periods = param.periods;
m_shape = param.ngrid;
m_xmin = param.xmin;
m_xmax = param.xmax;
// calculate dx
for (int i=0; i<NDIM; ++i)
{
if ( m_periods[i] )
m_dx[i] = ( m_xmax[i] - m_xmin[i] ) / m_shape[i];
else
m_dx[i] = ( m_xmax[i] - m_xmin[i] ) / ( m_shape[i] - 1 );
}
// 2D hard-coded here
//! \todo handle for the 3D case
m_dV = m_dx[XDIM] * m_dx[YDIM];
m_delta = 2 * std::sqrt( m_dV );
m_h = 1 / m_dx;
m_indsub.set_shape(m_shape);
}
} // namespace iplmcfd
| [
"phpisciuneri@gmail.com"
] | phpisciuneri@gmail.com |
b4351450b20e56051b92f3c76005551f3a511292 | b6a5c7389aeee278e65ca77b98e14b78a59da459 | /OrgreTemplateV2/OrgreTemplateV2/Ball.h | 9545e7af5e22f876ac47aaa0c45cee173fd27f15 | [] | no_license | SamCPollock/Pollock-Assignment1-EngineDevelopment-OgrePong | da583b6d70c0fcb9c33ca8f9d410b9edee05041c | c69c61d1eaa5cdded1fce96841249911f21166a6 | refs/heads/main | 2023-09-01T12:29:48.468136 | 2021-10-15T18:07:28 | 2021-10-15T18:07:28 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 549 | h | #pragma once
#include "GameObject.h"
#include "Ogre.h"
#include "CollisionManager.h"
#include "Paddle.h"
#include <iostream>
using namespace Ogre;
//using namespace OgreBites;
class Ball : public GameObject
{
private:
Paddle* paddleRef;
public:
float screenWidth;
float ballSpeed;
int ballScore;
int ballLives;
Ball(SceneManager* scnMgr, Ogre::SceneNode* ballNode, Paddle* paddleReference);
void BoundsChecking();
void HitBottom();
void ReboundPaddle();
void ReboundSides();
bool frameStarted(const Ogre::FrameEvent& evt);
};
| [
"samcpollock@gmail.com"
] | samcpollock@gmail.com |
92eaf5887ef5cc9a490280659660a76de5912e04 | 877fff5bb313ccd23d1d01bf23b1e1f2b13bb85a | /app/src/main/cpp/dir7941/dir22441/dir28114/dir28297/file28422.cpp | 82fceb64fd895f75630e292faad3ba474214dfb0 | [] | no_license | tgeng/HugeProject | 829c3bdfb7cbaf57727c41263212d4a67e3eb93d | 4488d3b765e8827636ce5e878baacdf388710ef2 | refs/heads/master | 2022-08-21T16:58:54.161627 | 2020-05-28T01:54:03 | 2020-05-28T01:54:03 | 267,468,475 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 115 | cpp | #ifndef file28422
#error "macro file28422 must be defined"
#endif
static const char* file28422String = "file28422"; | [
"tgeng@google.com"
] | tgeng@google.com |
ee0095b676961199eeca85a5a9d361f95b47741b | 942bc7a374ced8f96a139feac1a01148cc4e60d7 | /nautilus/ActiveX.h | 8ffc3cd4c2febf72f1a81b39a240aaa8beeb5f34 | [] | no_license | p-ameline/Episodus | 915b0dfa324a0b9374b887f0fc9fd74a599b9ae3 | 8bba0a26e267cff40a7669c6ae47647c68a30834 | refs/heads/master | 2022-04-07T12:39:09.224028 | 2020-03-06T09:20:03 | 2020-03-06T09:20:03 | 119,287,108 | 1 | 3 | null | null | null | null | ISO-8859-1 | C++ | false | false | 1,732 | h | //---------------------------------------------------------------------------
#ifndef ActiveXH
#define ActiveXH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "SHDocVw_OCX.h"
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include <OleCtrls.hpp>
class NSVisualView ;
//---------------------------------------------------------------------------
class TWebProxy : public TForm
{
__published: // Composants gérés par l'EDI
TWebBrowser* Control ;
void __fastcall FormMouseDown(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y) ;
void __fastcall ControlNavigateComplete2New(TObject *Sender,
LPDISPATCH pDisp, void* /* TVariant* */ URL) ;
void __fastcall NavigateError(TObject *Sender, LPDISPATCH pDisp,
TVariant *URL, TVariant *Frame, TVariant *StatusCode,
TOLEBOOL *Cancel);
void __fastcall ControlNavigateComplete2(TObject *Sender,
LPDISPATCH pDisp, TVariant *URL);
private: // Déclarations de l'utilisateur
public: // Déclarations de l'utilisateur
NSVisualView* _pView ;
__fastcall TWebProxy(TComponent* Owner) ;
TWebProxy(HWND Parent, NSVisualView* View) ;
void __fastcall RetrieveURL(AnsiString URL) ;
};
//---------------------------------------------------------------------------
extern PACKAGE TWebProxy *WebProxy;
//---------------------------------------------------------------------------
#endif
| [
"philippe.ameline@free.fr"
] | philippe.ameline@free.fr |
5a64e2bb59f3ed5c8395649847feccf8fbbbd7f3 | 16451b68e5a9da816e05a52465d8b0d118d7d40c | /data/tplcache/6bf98c2704735f2a167bb4f35a501247.inc | bb839f0cd51a97ac6e016414da765e27e3a0459a | [] | no_license | winter2012/tian_ya_tu_ku | 6e22517187ae47242d3fde16995f085a68c04280 | 82d2f8b73f6ed15686f59efa9a5ebb8117c18ae5 | refs/heads/master | 2020-06-20T17:42:14.565617 | 2019-07-16T12:02:09 | 2019-07-16T12:02:09 | 197,184,466 | 0 | 1 | null | null | null | null | GB18030 | C++ | false | false | 763 | inc | {dede:pagestyle maxwidth='800' ddmaxwidth='170' row='3' col='3' value='2'/}
{dede:comments}图集类型会采集时生成此配置是正常的,不过如果后面没有跟着img标记则表示规则无效{/dede:comments}
{dede:img ddimg='' text='图 1'}/uploads/allimg/c130311/13629A2W531P-25YQ.jpg{/dede:img}
{dede:img ddimg='' text='图 2'}/uploads/allimg/c130311/13629A2X0O40-2643M.jpg{/dede:img}
{dede:img ddimg='' text='图 3'}/uploads/allimg/c130311/13629A2X602F-2I223.jpg{/dede:img}
{dede:img ddimg='' text='图 4'}/uploads/allimg/c130311/13629A2X94040-2W252.jpg{/dede:img}
{dede:img ddimg='' text='图 5'}/uploads/allimg/c130311/13629A2Y40250-292A5.jpg{/dede:img}
{dede:img ddimg='' text='图 6'}/uploads/allimg/c130311/13629A2Y92K0-303193.jpg{/dede:img} | [
"winter2012102@gmail.com"
] | winter2012102@gmail.com |
4a956212b620292ab103844023cbb6f6639c2d4b | 556db265723b0cc30ad2917442ed6dad92fd9044 | /tensorflow/core/tpu/kernels/transfer_ops.h | 6a3662ad2035242281fbb95ba3f2bfc95bec2e95 | [
"MIT",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | graphcore/tensorflow | c1669b489be0e045b3ec856b311b3139858de196 | 085b20a4b6287eff8c0b792425d52422ab8cbab3 | refs/heads/r2.6/sdk-release-3.2 | 2023-07-06T06:23:53.857743 | 2023-03-14T13:04:04 | 2023-03-14T13:48:43 | 162,717,602 | 84 | 17 | Apache-2.0 | 2023-03-25T01:13:37 | 2018-12-21T13:30:38 | C++ | UTF-8 | C++ | false | false | 3,526 | h | /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_CORE_TPU_KERNELS_TRANSFER_OPS_H_
#define TENSORFLOW_CORE_TPU_KERNELS_TRANSFER_OPS_H_
#include "tensorflow/compiler/jit/xla_device.h"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/util/stream_executor_util.h"
#include "tensorflow/stream_executor/tpu/tpu_transfer_manager_interface.h"
namespace tensorflow {
// Base class providing common functionality for async ops that transfer from
// host to TPU.
class TpuTransferAsyncOpKernelBase : public AsyncOpKernel {
public:
explicit TpuTransferAsyncOpKernelBase(OpKernelConstruction* ctx,
const string& transfer_type,
int number_of_threads);
void ComputeAsync(OpKernelContext* ctx, DoneCallback done) override;
protected:
virtual Status DoWork(OpKernelContext* context,
xla::TpuTransferManagerInterface* transfer_manager,
stream_executor::StreamExecutor* stream_executor) = 0;
Status RunTransferWithOrdinal(OpKernelContext* ctx, int device_ordinal);
std::string transfer_type_;
private:
virtual Status RunTransfer(OpKernelContext* ctx) = 0;
void Cancel();
std::unique_ptr<thread::ThreadPool> thread_pool_;
mutex mu_;
// TpuTransferAsyncOpKernelBase is neither copyable nor movable.
TpuTransferAsyncOpKernelBase(const TpuTransferAsyncOpKernelBase&) = delete;
TpuTransferAsyncOpKernelBase& operator=(const TpuTransferAsyncOpKernelBase&) =
delete;
};
class TpuTransferAsyncOpKernel : public TpuTransferAsyncOpKernelBase {
public:
explicit TpuTransferAsyncOpKernel(OpKernelConstruction* ctx,
const string& transfer_type,
int number_of_threads);
private:
Status RunTransfer(OpKernelContext* ctx) override;
int device_ordinal_;
// TpuTransferAsyncOpKernel is neither copyable nor movable.
TpuTransferAsyncOpKernel(const TpuTransferAsyncOpKernel&) = delete;
TpuTransferAsyncOpKernel& operator=(const TpuTransferAsyncOpKernel&) = delete;
};
class TpuTransferAsyncDynamicOrdinalOpKernel
: public TpuTransferAsyncOpKernelBase {
public:
explicit TpuTransferAsyncDynamicOrdinalOpKernel(OpKernelConstruction* ctx,
const string& transfer_type,
int number_of_threads);
private:
Status RunTransfer(OpKernelContext* ctx) override;
// TpuTransferAsyncDynamicOpKernel is neither copyable nor movable.
TpuTransferAsyncDynamicOrdinalOpKernel(
const TpuTransferAsyncDynamicOrdinalOpKernel&) = delete;
TpuTransferAsyncDynamicOrdinalOpKernel& operator=(
const TpuTransferAsyncDynamicOrdinalOpKernel&) = delete;
};
} // namespace tensorflow
#endif // TENSORFLOW_CORE_TPU_KERNELS_TRANSFER_OPS_H_
| [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
baf3f6a8f30d7c62dd9e9a7f48f04499ec8fb37a | 90f9301da33fc1e5401ca5430a346610a9423877 | /300+/808_Soup_Servings.h | 36e8d9f220383bf8082712039124f735162f7cfe | [] | no_license | RiceReallyGood/Leetcode | ff19d101ca7555d0fa79ef746f41da2e5803e6f5 | dbc432aeeb7bbd4af30d4afa84acbf6b9f5a16b5 | refs/heads/master | 2021-01-25T22:58:56.601117 | 2020-04-10T06:27:31 | 2020-04-10T06:27:31 | 243,217,359 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,012 | h | #include <vector>
using namespace std;
class Solution {
public:
double soupServings(int N) {
if(N > 5000) return 1;
N = (N + 24) / 25;
int dim = max(4, N + 1);
vector<vector<double>> sametime(dim, vector<double>(dim, 0));
vector<vector<double>> Afirst(dim, vector<double>(dim, 0));
vector<pair<int, int>> op(4);
op[0] = {4, 0}, op[1] = {3, 1}, op[2] = {2, 2}, op[3] = {1, 3};
sametime[0][0] = 1;
for(int j = 1; j < dim; j++)
Afirst[0][j] = 1;
for(int i = 1; i < dim; i++){
for(int t = 0; t < 4; t++){
int Aleft = max(0, i - op[t].first);
for(int j = 1; j < dim; j++){
int Bleft = max(0, j - op[t].second);
Afirst[i][j] += 0.25 * Afirst[Aleft][Bleft];
sametime[i][j] += 0.25 * sametime[Aleft][Bleft];
}
}
}
return Afirst[N][N] + 0.5 * sametime[N][N];
}
}; | [
"1601110073@pku.edu.cn"
] | 1601110073@pku.edu.cn |
2dd86e789a13f0cb6511ef2383461c0b944b097b | 6e8a72562fe52455fa48f83df92952e2a4e04acb | /XORSubArrays.cpp | e35e4b095317a51ecfe163050ea6d07605f29a74 | [] | no_license | Ashish-Tutejaa/CB | 8fe23ded187389de4577a9a75c9092a97843b070 | 5e4ee1edf1475fc86e6c9fa805bb7187783b3871 | refs/heads/master | 2020-06-12T18:24:45.204754 | 2019-08-27T03:47:25 | 2019-08-27T03:47:25 | 194,386,919 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 382 | cpp | //XOR of all subarrays
#include<iostream>
using namespace std;
int main()
{
int arr[]={3,8,13};
int n = sizeof(arr)/sizeof(int);
int finalSum = 0;
int sum = 0;
for(int i=0;i<n;i++)
{
for(int j=i;j<=n;j++)
{
for(int k=i;k<j;k++)
{
sum^=arr[k];
}
finalSum+=sum;
sum=0;
}
}
cout<<finalSum<<endl;
} | [
"ashish.tutejaa@gmail.com"
] | ashish.tutejaa@gmail.com |
95a717297839d24978c7d5c10147564829bd8b1a | 5990d4faa44eb4010cb62b693eb2b777e02ff599 | /Les4/BiebZoalsHoort/BiebZoalsHoort/Bibliotheek.h | 2e2dc1fcfe8fa156cce89d2610a14cfcd03252de | [] | no_license | gijsoman/INOOP | bb75179709c63d2ace6cd8d1a8e10e740c9d188a | 046e2bfc4d845f595ade33f6430fe768dc89b635 | refs/heads/master | 2021-07-20T03:44:33.372575 | 2017-10-27T18:01:59 | 2017-10-27T18:01:59 | 103,014,695 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 199 | h | #pragma once
#include <string>
#include "Boek.h"
class Bibliotheek
{
public:
Bibliotheek();
~Bibliotheek();
void toon();
void voegToe(std::string name);
private:
Boek *boekje = new Boek();
};
| [
"gijsbakker1@hotmail.com"
] | gijsbakker1@hotmail.com |
31dd0cb3795dd34f2a5a34ed5c9cfe7f20a9a872 | c93d2a22f17b4017985acb6eaec046e7ddb99ccd | /Samples/Desktop/D3D12PipelineStateCache/src/MemoryMappedPipelineLibrary.h | 84b8b02ef57429bb5b9d46812291f560a6e003a3 | [
"MIT"
] | permissive | mvisic/DirectX-Graphics-Samples | 6318d636c2b7f8b60e93da68c81670fa295f16b4 | 5055b4f062bbc2e5f746cca377f5760c394bc2d6 | refs/heads/master | 2020-03-30T15:11:34.096065 | 2018-10-03T02:46:57 | 2018-10-03T02:46:57 | 151,352,244 | 0 | 0 | MIT | 2018-10-03T02:42:04 | 2018-10-03T02:42:03 | null | UTF-8 | C++ | false | false | 970 | h | //*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************
#pragma once
#include "MemoryMappedFile.h"
// Native, hardware-specific, PSO cache using a Pipeline Library.
// Pipeline Libraries allow applications to explicitly group PSOs which are expected to share data.
class MemoryMappedPipelineLibrary : public MemoryMappedFile
{
public:
bool Init(ID3D12Device* pDevice, std::wstring filename);
void Destroy(bool deleteFile);
ID3D12PipelineLibrary* GetPipelineLibrary() { return m_pipelineLibrary.Get(); }
private:
Microsoft::WRL::ComPtr<ID3D12PipelineLibrary> m_pipelineLibrary;
};
| [
"bobbrow@microsoft.com"
] | bobbrow@microsoft.com |
4e80b67ca4e5ce540aa935c069dfb5301d3c5d2a | fc0452cb2ac7eef1c83d1e86fda32a6873d97b60 | /net/TcpServer.cpp | 9e71d72633ffcb3de8f3f48f9ea2b3f71ce83b6e | [] | no_license | energystoryhhl/muduo_hhl | cc0827d962562537c5ca349f04cac618124c137f | 860443f520405d1fd05738bc6168a1b65a8f3dd4 | refs/heads/master | 2020-06-19T17:57:47.632518 | 2019-11-21T13:22:29 | 2019-11-21T13:22:29 | 196,811,778 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,561 | cpp | #include "net/TcpServer.h"
#include "net/Acceptor.h"
#include "net/EventLoopThreadPool.h"
#include "net/SocketOps.h"
using namespace hhl;
using namespace hhl::net;
TcpServer::TcpServer(EventLoop * loop,
const InetAddress & listenAddr,
const string & nameArg,
Option option)
:
loop_(loop),
ipPort_(listenAddr.tpIPPort()),
name_(nameArg),
accepter_(new Acceptor(loop, listenAddr, option == kReusePort)),
threadPool_(new EventLoopThreadPool(loop, name_)),
connectionCallback_(defaultConnectionCallback),
messageCallback_(defaultMessageCallback),
nextConnId_(1)
{
accepter_->setNewConnectionCallback(std::bind(&TcpServer::newConnection, this, \
std::placeholders::_1, std::placeholders::_2));
}
void TcpServer::newConnection(int sockfd, const InetAddress & peerAddr)
{
loop_->assertInLoopThread();
EventLoop* ioLoop = threadPool_->getNextLoop();
char buf[64];
snprintf(buf, sizeof buf, "-%s#%d", ipPort_.c_str(), nextConnId_);
++nextConnId_;
string connName = name_ + buf;
LOG_DEBUG << "TcpServer::newConnection [" << name_
<< "] - new connection [" << connName
<< "] from " << peerAddr.tpIPPort();
InetAddress localAddr(sockets::getLocalAddr(sockfd));
TcpConnectionPtr conn(new TcpConnection(ioLoop,
connName,
sockfd,
localAddr,
peerAddr
));
connections_[connName] = conn;
conn->setConnectionCallback(connectionCallback_);
conn->setMessageCallback(messageCallback_);
conn->setWriteCompleteCallback(writeCompleteCallback_);
conn->setCloseCallback(
std::bind(&TcpServer::removeConnection,this, std::placeholders::_1));
ioLoop->runInLoop(std::bind(&TcpConnection::connectEstablished, conn));
}
void hhl::net::TcpServer::setThreadNum(int numThreads)
{
assert(0 <= numThreads);
threadPool_->setThreadNum(numThreads);
}
void hhl::net::TcpServer::start()
{
if (started_.getAndSet(1) == 0)
{
threadPool_->start(threadInitCallback_);
assert(!accepter_->listenning());
loop_->runInLoop(
std::bind(&Acceptor::listen, get_pointer(accepter_)));
}
}
void TcpServer::removeConnection(const TcpConnectionPtr& conn)
{
// FIXME: unsafe
loop_->runInLoop(std::bind(&TcpServer::removeConnectionInLoop, this, conn));
}
void TcpServer::removeConnectionInLoop(const TcpConnectionPtr& conn)
{
loop_->assertInLoopThread();
LOG_DEBUG << "TcpServer::removeConnectionInLoop [" << name_
<< "] - connection " << conn->name();
size_t n = connections_.erase(conn->name());
(void)n;
assert(n == 1);
EventLoop* ioLoop = conn->getLoop();
ioLoop->queneInLoop(
std::bind(&TcpConnection::connectDestroyed, conn));
}
| [
"1248832396@qq.com"
] | 1248832396@qq.com |
ee762658b8319dd0be18e30ce0f60833bcca7abd | 8eec5d5e30e9294659801f0574798ef765111bc4 | /lab3/Basic/statement.h | ecffad5e1722813b22f96d946357cc70ea1b2f27 | [] | no_license | nullspace2017/SE106-Homeworks | aecb7bd402f37b1952a5e29e3d288dad1963a712 | caa289d28b98ac99774a8cc8a62f31d8cec7b0e2 | refs/heads/master | 2020-03-25T10:56:29.978247 | 2015-03-29T04:07:30 | 2015-03-29T04:07:30 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,579 | h | /*
* File: statement.h
* -----------------
* This file defines the StatementNode abstract type. In
* the finished version, this file will also specify subclasses
* for each of the statement types. As you design your own
* version of this class, you should pay careful attention to
* the exp.h interface specified in Chapter 14, which is an
* excellent model for the StmtNode class hierarchy.
*/
#ifndef _statement_h
#define _statement_h
#include "exp.h"
#include "../StanfordCPPLib/tokenscanner.h"
#include "parser.h"
#include "program.h"
#include "../StanfordCPPLib/simpio.h"
#include "statement.h"
#include "../StanfordCPPLib/vector.h"
#include <iostream>
#include "myhead.h"
/*
* For clients, the most important type exported by this interface
* is the statementT type, which is defined as a pointer to an
* StmtNode object. This is the type used by all other functions
* and methods in the BASIC application.
*/
class StmtNode;
typedef StmtNode *statementT;
/*
* Class: StmtNode
* ---------------
* This class is used to represent a statement in a program.
* StmtNode is an abstract class with subclasses for each of
* the statement types required for the BASIC interpreter.
*/
class StmtNode {
public:
/*
* Constructor: StmtNode
* ---------------------
* The base class constructor is empty. Each subclass must provide
* its own constructor.
*/
StmtNode();
/*
* Destructor: ~StmtNode
* Usage: delete stmt;
* -------------------
* The destructor deallocates the storage for this expression.
* It must be declared virtual to ensure that the correct subclass
* destructor is called when deleting a statement.
*/
virtual ~StmtNode();
/*
* Method: execute
* Usage: stmt->execute(state);
* ----------------------------
* This method executes a BASIC statement. Each of the subclasses
* defines its own execute method that implements the necessary
* operations. As was true for the expression evaluator, this
* method takes an EvalState object for looking up variables or
* controlling the operation of the interpreter.
*/
virtual void execute(EvalState & state) = 0;
};
StmtNode::StmtNode()
{
}
StmtNode::~StmtNode()
{
}
/*
* The remainder of this file must consists of subclass
* definitions for the individual statement forms. Each of
* those subclasses must define a constructor that parses a
* statement from a scanner and a method called execute,
* which executes that statement. If the private data for
* a subclass includes data allocated on the heap (such as
* an expressionT value), the class implementation must also
* specify its own destructor method to free that memory.
*/
class SequentialStatements :public StmtNode
{
public:
SequentialStatements(TokenScanner &scanner);
virtual void execute(EvalState & state);
/* data */
private:
TokenScanner myscanner;
};
SequentialStatements::SequentialStatements(TokenScanner &scanner)
:myscanner(scanner)
{
}
void SequentialStatements::execute(EvalState &state)
{
string token = myscanner.nextToken();
string hehe;
if (toBig(token) == "PRINT")
{
myscanner.ignoreWhitespace();
hehe = myscanner.nextToken();
if (hehe == "X")
myscanner.setInput("x");
else myscanner.saveToken(hehe);
expressionT exp = ParseExp(myscanner);
if (exp->eval(state) == -1)
return;
cout<<(exp->eval(state))<<endl;
}
else if (toBig(token) == "LET")
{
myscanner.ignoreWhitespace();
string var = myscanner.nextToken();
myscanner.nextToken();
//cout<<var<<endl;
expressionT exp = ParseExp(myscanner);
int val = exp->eval(state);
if (var[0] == 'X')
var[0] = 'x';
state.setValue(var,val);
}
else if (toBig(token) == "INPUT")
{
myscanner.ignoreWhitespace();
string var = myscanner.nextToken();
int val = -1;
char hehe;
string stringVal = "";
while (1)
{
cout<<" ? ";
getline(cin,stringVal);
//cout<<stringVal;
if (stringVal[1] == '.' || stringVal[1] == 'x' || stringVal[0] == 'h' || stringVal[2] == '+')
{
cout<<"INVALID NUMBER\n";
continue;
}
break;
}
state.setValue(var,StringToInteger(stringVal));
}
else if (toBig(token) == "REM")
{
return;
}
}
class ControlStatements :public StmtNode
{
public:
ControlStatements(TokenScanner &scanner);
virtual void execute(EvalState & state);
/* data */
private:
TokenScanner myscanner;
};
ControlStatements::ControlStatements(TokenScanner &scanner)
:myscanner(scanner)
{
}
void ControlStatements::execute(EvalState &state)
{
string token = myscanner.nextToken();
if (toBig(token) == "GOTO")
{
}
}
#endif
| [
"gaocegege@hotmail.com"
] | gaocegege@hotmail.com |
1833319ca9b605c03bbfc0d86def803c84b08e33 | 7ed7575afdc2c234f631bdf019549fa325408c7f | /Scaner/Scaner.h | ee4b07b59ab87d33dd4ed11a77f46ad9cace0eac | [] | no_license | rossi7962/Scaner | 4d543a1720db92c6c57c0a1bb76f900d4eedb5e3 | 7f566150541b0f985e5ae107633530a5676cbda0 | refs/heads/master | 2020-03-13T08:01:25.486188 | 2018-04-25T16:18:34 | 2018-04-25T16:18:34 | 131,035,985 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 474 | h |
// Scaner.h : main header file for the PROJECT_NAME application
//
#pragma once
#ifndef __AFXWIN_H__
#error "include 'stdafx.h' before including this file for PCH"
#endif
#include "resource.h" // main symbols
// CScanerApp:
// See Scaner.cpp for the implementation of this class
//
class CScanerApp : public CWinApp
{
public:
CScanerApp();
// Overrides
public:
virtual BOOL InitInstance();
// Implementation
DECLARE_MESSAGE_MAP()
};
extern CScanerApp theApp; | [
"dinh_01_1999@yahoo.com.vn"
] | dinh_01_1999@yahoo.com.vn |
99be4d5a8d12c2d2fe00077a8c92ede7dffec96e | 7e2930716b8d87c9758d918b2474536a923a9d3f | /AML/include/Camera.hh | 6978e6dd31fecf5c58eb673a65aad2a8196010dd | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | asmodehn/sdlut | 85749ae4463a0875e6783eaeb901c3dd2a3c1653 | c59b9f539dccb17781bb131050adbb38e6f854ed | refs/heads/master | 2023-07-09T15:54:06.740218 | 2013-10-17T14:23:14 | 2013-10-17T14:23:14 | 13,437,128 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 56 | hh | #ifndef AML_CAMERA_HH
#define AML_CAMERA_HH
#endif
| [
"asmodehn@gmail.com"
] | asmodehn@gmail.com |
97148e873e653c6944bea1969fcab15ff219cfdd | 05d0608385955b6d5782f91fc976aee430aadfe1 | /notes/day1/code/13-float-literals.cpp | d5eca97199bad86557347a1939b184f58fe23ac1 | [
"BSD-3-Clause",
"FreeBSD-DOC",
"BSD-2-Clause"
] | permissive | ajbennieston/cpp | 68a578c9aaa3162f6b0a374019086425bbb3031a | e43687b4289c2e07c0c9c87b4c0003abf4e2a054 | refs/heads/master | 2020-06-03T11:08:22.709114 | 2016-01-18T00:27:36 | 2016-01-18T00:27:36 | 6,890,513 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 324 | cpp | /*
* C++ Notes Accompanying Code
* Compile: Y
* Run: Y
* Compile Should Succeed: Y
* Run Should Succeed: Y
* Ignore Unused Variables: Y
*/
int main() {
// NOTES: BEGIN INCLUSION
double pi = 3.1415926535897931;
double c = 3e8;
double h = 6.63e-34;
double zero = 0.0;
// NOTES: END INCLUSION
return 0;
}
| [
"a.j.bennieston@gmail.com"
] | a.j.bennieston@gmail.com |
ebe64522508a54dc3b8a75430fac695e5d0c3415 | 4157a150ad4ba80e7e7c9d20a7787b65edbb074b | /Source/Laboratoare/Laborator3/Object2D.cpp | 4803e196ab301f7fb778aed30e3fdad6f0c83ffd | [] | no_license | Florin9/EGC_H2 | 81ba1ed57b40e86c857c3baf2ce8ab05ffefcc3c | 00fd7328b5852a841126ab730b4f29e2bcc45126 | refs/heads/master | 2022-10-11T18:03:34.487963 | 2020-06-11T13:01:18 | 2020-06-11T13:01:18 | 271,547,106 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,312 | cpp | #include "Object2D.h"
#include <Core/Engine.h>
Mesh* Object2D::CreateSquare(std::string name, glm::vec3 leftBottomCorner, float length, glm::vec3 color, bool fill)
{
glm::vec3 corner = leftBottomCorner;
std::vector<VertexFormat> vertices =
{
VertexFormat(corner, color),
VertexFormat(corner + glm::vec3(length, 0, 0), color),
VertexFormat(corner + glm::vec3(length, length, 0), color),
VertexFormat(corner + glm::vec3(0, length, 0), color)
};
Mesh* square = new Mesh(name);
std::vector<unsigned short> indices = { 0, 1, 2, 3 };
if (!fill) {
square->SetDrawMode(GL_LINE_LOOP);
}
else {
// draw 2 triangles. Add the remaining 2 indices
indices.push_back(0);
indices.push_back(2);
}
square->InitFromData(vertices, indices);
return square;
}
Mesh* Object2D::CreateTriangle(std::string name, glm::vec3 leftBottomCorner, float length, glm::vec3 color, bool fill)
{
glm::vec3 corner = leftBottomCorner;
std::vector<VertexFormat> vertices =
{
VertexFormat(corner, color),
VertexFormat(corner + glm::vec3(0,length, 0), color),
VertexFormat(corner + glm::vec3(length/1.5, length/2, 0), color),
};
Mesh* triangle = new Mesh(name);
std::vector<unsigned short> indices = { 2,1,0};
if (!fill) {
triangle->SetDrawMode(GL_LINE_LOOP);
}
else {
// draw 2 triangles. Add the remaining 2 indices
indices.push_back(0);
//indices.push_back(2);
}
triangle->InitFromData(vertices, indices);
return triangle;
}
Mesh* Object2D::CreateCircle(std::string name, int radius, float length, glm::vec3 color, bool fill)
{
//glm::vec3 corner = center;
int r = radius;
std::vector<VertexFormat> vertices =
{
};
std::vector<unsigned short> indices = {};
int j = 0;
int lineAmount = 50;
GLfloat twicePi = 2.0f * 3.14;
int x = 0;
int y = 0;
for (int i = 0; i <= lineAmount; i++) {
int a = r * cos(i * twicePi / lineAmount);
int b = r * sin(i * twicePi / lineAmount);
vertices.push_back(VertexFormat(glm::vec3(x+a, y+b, 0), color));
indices.push_back(i);
}
Mesh* circle = new Mesh(name);
if (!fill) {
circle->SetDrawMode(GL_LINE_LOOP);
}
else {
circle->SetDrawMode(GL_TRIANGLE_FAN);
// draw 2 triangles. Add the remaining 2 indices
//indices.push_back(0);
//indices.push_back(2);
}
circle->InitFromData(vertices, indices);
return circle;
} | [
"claudiu.dobos@stud.acs.pub.ro"
] | claudiu.dobos@stud.acs.pub.ro |
5a47416da22d5977775a2238aa810531726f59fd | 57d4aace96c425e9e0c0ec730ab3ba897b3d2fc3 | /MonoAlphabetic.cpp | d9b02c4ecd22a16367725b23e8ec23c64127da20 | [] | no_license | NoLayerCode/Algorithms | d6dc0f49a658568e17a2c278bed5e3cdf44031ed | 2774237afd5707cdfaa79afecf691bdc7ea31a89 | refs/heads/master | 2022-11-11T19:17:42.094731 | 2022-10-03T17:50:12 | 2022-10-03T17:50:12 | 144,144,218 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 998 | cpp | #include <iostream>
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#include <math.h>
#include <string>
using namespace std;
int main(){
vector <char> ip;
vector <char> alpha;
vector <char> encrypt;
char mono;
string text;
cout<<"Enter the string"<<endl;
cin>>text;
mono='a';
for (int i = 0; i < 26; ++i){
ip.push_back(mono);
mono++;
}
cout<<"Enter the character key\n";
cin>>mono;
for (int i = 0; i < 26; ++i){
if(mono == 'z'){
alpha.push_back(mono);
mono = 'a';
continue;
}
alpha.push_back(mono);
mono++;
}
for (int i = 0; i < text.size(); ++i){
for (int j = 0; j < 26; ++j){
if (text[i]==ip[j]){
encrypt.push_back(alpha[j]);
}
}
}
cout<<"Encrypted text: ";
for (int i = 0; i < encrypt.size(); ++i){
cout<<encrypt[i];
}
cout<<endl;
for (int i = 0; i < encrypt.size(); ++i){
for (int j = 0; j < 26; ++j){
if (encrypt[i]==alpha[j]){
text[i]=(ip[j]);
}
}
}
cout<<"Decrypted text: "<<text<<endl;
return 0;
} | [
"vyelhekar@gmail.com"
] | vyelhekar@gmail.com |
f8228e8def387c4af36cfe8bbc2250e1f47b5afc | c3424b5769113b394b721a86bbbdea758d848db9 | /debugger/dmdism/instruction.cpp | 001ab2b383008acf8f5d9d761c2c7b50d6be118e | [
"ISC"
] | permissive | PatapoIIIkaForAll/Lunar-Dreamland | e465706971086338a36be8b963c641180aa69351 | 92b9f3ed1c21c0ce3e46c7b352e703b6590e7cd7 | refs/heads/master | 2022-05-30T23:54:57.249039 | 2020-05-05T04:24:55 | 2020-05-05T04:24:55 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 573 | cpp |
#include "stdafx.h"
#include "instruction.h"
#include "helpers.h"
#include "context.h"
Instruction::Instruction(Bytecode op)
{
opcode_ = Opcode(op);
}
void Instruction::Disassemble(Context* context, Disassembler* dism)
{
for (unsigned int i = 0; i < arguments(); i++)
{
std::uint32_t val = context->eat_add();
}
}
std::string Instruction::bytes_str()
{
std::string result;
for (std::uint32_t b : bytes_)
{
result.append(tohex(b));
result.append(" ");
}
return result;
}
void Instruction::add_byte(std::uint32_t byte)
{
bytes_.emplace_back(byte);
}
| [
"lingbleed@gmail.com"
] | lingbleed@gmail.com |
2dfffe2b3b74c09b5f234a5abd148c2f736af2d0 | c8fecda179f37334ea89b81d67d21f551e574ead | /include/glow/Runtime/RequestData.h | 425bdc634b5d50b258adb479f86bb1ef9dd5ce0d | [
"Apache-2.0"
] | permissive | maxwillzq/glow | 3c743e8d1a90541e379a59bf2ff3dd9953b543f5 | f06a8589fb8a49b0521f42ec04562f94c38801bc | refs/heads/master | 2021-05-19T17:21:24.301684 | 2020-06-01T15:58:28 | 2020-06-01T15:58:28 | 252,045,408 | 0 | 0 | Apache-2.0 | 2020-06-01T15:58:29 | 2020-04-01T01:56:11 | C++ | UTF-8 | C++ | false | false | 1,481 | h | /**
* Copyright (c) Glow Contributors. See CONTRIBUTORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef GLOW_RUNTIME_REQUESTDATA_H
#define GLOW_RUNTIME_REQUESTDATA_H
#include "folly/io/async/Request.h"
namespace glow {
namespace runtime {
class RequestData : public folly::RequestData {
public:
int64_t appLevelRequestId{0};
static RequestData *get() {
auto data = dynamic_cast<RequestData *>(
folly::RequestContext::get()->getContextData(kContextDataName));
if (!data) {
return nullptr;
}
return data;
}
static void set(std::unique_ptr<RequestData> data) {
folly::RequestContext::get()->setContextData(kContextDataName,
std::move(data));
}
bool hasCallback() override { return false; }
private:
static constexpr const char *kContextDataName{"Glow request data"};
};
} // namespace runtime
} // namespace glow
#endif // GLOW_RUNTIME_REQUESTDATA_H
| [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
8b8fb120b0c1e81e1747b6fc9986b096714de867 | a12989fd8193891ad159b7480136d1dd327f0e81 | /optixHair/ProgramGroups.h | a8b45a412091b1dc7d92814a2356859d16bac581 | [] | no_license | memory-of-star/cg_light_tracing | 4c59333d1486f49c90963ff73b471f19c82395b3 | 5a7e782695a2fe88703095a23abd4861f1c7ed88 | refs/heads/master | 2023-05-31T21:41:55.660392 | 2021-07-03T07:29:40 | 2021-07-03T07:29:40 | 382,554,273 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,710 | h | //
// Copyright (c) 2020, NVIDIA CORPORATION. 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 NVIDIA CORPORATION 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 ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
#pragma once
#include <optix.h>
#include <map>
#include <string>
#include <vector>
class ProgramGroups
{
public:
const OptixProgramGroup* data() const;
unsigned int size() const;
const OptixProgramGroup& operator[]( const std::string& name ) const;
void add( const OptixProgramGroupDesc& programGroupDescriptor, const std::string& name );
protected:
ProgramGroups( const OptixDeviceContext context, OptixPipelineCompileOptions pipeOptions, OptixProgramGroupOptions programGroupOptions );
private:
const OptixDeviceContext m_context;
OptixPipelineCompileOptions m_pipeOptions;
OptixProgramGroupOptions m_programGroupOptions;
std::vector<OptixProgramGroup> m_programGroups;
std::map<std::string, unsigned int> m_nameToIndex;
};
class HairProgramGroups : public ProgramGroups
{
public:
HairProgramGroups( const OptixDeviceContext context, OptixPipelineCompileOptions pipeOptions );
OptixModule m_shadingModule;
OptixModule m_whittedModule;
OptixModule m_quadraticCurveModule;
OptixModule m_cubicCurveModule;
OptixModule m_linearCurveModule;
};
| [
"cyq102235499@163.com"
] | cyq102235499@163.com |
1d4db3507eef03b7a694eb3596ff0c8a39bab075 | e50ac350b6ea75ea728074e173a0450afda05318 | /ACM/Prictise/POJ/Toy Storage POJ - 2398(叉积计算+二分判断).cpp | 8c9966c33e1abc8491df5c332569e9efec6f9551 | [] | no_license | G-CR/acm-solution | 9cd95e4a6d6d25937a7295364e52fa70af4b3731 | 7026428ed5a2f7afd6785a922e1d8767226a05e8 | refs/heads/master | 2021-07-23T14:30:18.107128 | 2021-07-15T14:54:57 | 2021-07-15T14:54:57 | 226,522,759 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,601 | cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int n, m, x, y, x2, y2, a, b;
int num[5005], ans[5005];
struct Point {
int x,y;
Point(){}
Point(int _x,int _y) {
x = _x; y = _y;
}
Point operator + (const Point& b) const {
return Point(x + b.x,y + b.y);
}
Point operator - (const Point &b) const {
return Point(x - b.x,y - b.y);
}
int operator * (const Point &b) const {
return x*b.x + y*b.y;
}
int operator ^ (const Point &b) const {
return x*b.y - y*b.x;
}
};
struct Line {
Point s,e;
Line(){}
Line(Point _s,Point _e) {
s = _s;e = _e;
}
} line[5005];
int xmult(Point p0,Point p1,Point p2) {
return (p1-p0)^(p2-p0);
}
bool cmp(Line a, Line b) {
return a.s.x < b.s.x;
}
int main() {
while(~scanf("%d", &n) && n) {
memset(num, 0, sizeof num);
memset(ans, 0, sizeof ans);
scanf("%d %d %d %d %d", &m, &x, &y, &x2, &y2);
for(int i = 0;i < n; i++) {
scanf("%d %d", &a, &b);
line[i] = Line(Point(a, y), Point(b, y2));
}
line[n] = Line(Point(x2, y), Point(x2, y2));
sort(line, line+n, cmp);
while(m--) {
scanf("%d %d", &a, &b);
Point p = Point(a, b);
int l = 0, r = n, res = 0;
while(l <= r) {
int mid = (l + r) >> 1;
if(xmult(p, line[mid].s, line[mid].e) < 0) {
res = mid;
r = mid-1;
}
else {
l = mid+1;
}
}
num[res]++;
}
for(int i = 0;i <= n; i++) {
// printf("%d: %d\n", i, num[i]);
if(num[i]) ans[num[i]]++;
}
puts("Box");
for(int i = 1;i <= n; i++) {
if(ans[i]) {
printf("%d: %d\n", i, ans[i]);
}
}
}
} | [
"47514055+O-Bus@users.noreply.github.com"
] | 47514055+O-Bus@users.noreply.github.com |
6aedebe17d293fb8837f3ff868dea077b18997ca | 983c600b2bd596544fdcf4d64b989a9c71b6c498 | /func.cpp | aa64c501a626190556b2ee1eff145d3a2473b9a2 | [] | no_license | towfiq046/Practice | 6c203add38df4ea5f3ffe9bc4235450d56e64650 | ef43f327f4ddb0f5722280b244a72e84bc85be23 | refs/heads/master | 2020-03-22T18:32:22.692576 | 2018-07-10T17:28:14 | 2018-07-10T17:28:14 | 140,466,173 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 947 | cpp | #include <iostream>
using namespace std;
int myEncode(int q1Marks, int q2Marks);
int power(int base, int exponent);
int main() {
int numStudents, q1Marks, q2Marks, cipher;
int count, i, j, twoRaisedQ1, threeRaisedQ2;
cout << "Enter number of students: "; cin >> numStudents;
for(count = 1; count <= numStudents; count++) {
cout << "Enter quiz1 and quiz2 marks of student " << count << " : ";
cin >> q1Marks >> q2Marks;
cipher = myEncode(q1Marks, q2Marks);
}
cout << "Cipher: " << cipher;
return 0;
}
int myEncode(int q1Marks, int q2Marks) {
int i, j, twoRaisedQ1;
int threeRaisedQ2, cipher;
twoRaisedQ1 = power(2, q1Marks);
threeRaisedQ2 = power(3, q2Marks);
cipher = twoRaisedQ1 * threeRaisedQ2;
return cipher;
}
int power(int base, int exponent) {
int i, result;
for (i = 0, result = 1; i < exponent; i++, result *= base) { };
return result;
}
| [
"towfiqahmed046@gmail.com"
] | towfiqahmed046@gmail.com |
052d0a7f2f82de23d1ff40cda7d1fc130dc098b3 | e281e415d56392e84d317d7d55390d8c5eb0c483 | /Inheritance_Polymorphism_Json/JsonBuilder.hpp | d42bd0f18405c9241cf094b037d4632c7636a91c | [] | no_license | soheil647/Advance_Programming_Cpp | 9ce99203404377e40e1bc16333f0f9c2ea99fef6 | 231e5b42cfd75e04df474c931969e80b8622222b | refs/heads/master | 2020-12-28T15:15:08.717047 | 2020-08-19T14:41:54 | 2020-08-19T14:41:54 | 238,384,145 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,337 | hpp | #ifndef __JSON_BUILDER_H__
#define __JSON_BUILDER_H__
#include <string>
#include <vector>
#include <iostream>
#include <map>
#include "header/JsonElement.hpp"
#include "header/JsonString.hpp"
#include "header/JsonInt.hpp"
#include "header/JsonObject.hpp"
#include "header/JsonArray.hpp"
#include "header/duplicateKey.hpp"
#include "header/idException.hpp"
#include "header/undefinedType.hpp"
class JsonBuilder
{
private:
std::vector<JsonElement*> elements;
void checkParentId(int parentId);
int findChildIdContainer(int parentId, const std::string &key, const std::string &type);
int findChildIdInt(int parentId, const std::string &key, int value);
int findChildIdString(int parentId, const std::string &key, const std::string &value);
void checkDuplicateKey(const std::string &key);
public:
JsonBuilder() = default;
void addStringToObject(int parentId, const std::string& key, const std::string& value);
void addIntegerToObject(int parentId, const std::string& key, int value);
int addContainerToObject(int parentId, const std::string& key, const std::string& type);
void addStringToArray(int parentId, const std::string& value);
void addIntegerToArray(int parentId, int value);
int addContainerToArray(int parentId, const std::string& type);
void print(int id);
};
#endif | [
"shirvani.soheil647@gmail.com"
] | shirvani.soheil647@gmail.com |
277380fae9641104b71794fcc7a665625d981aae | 2fcc9ad89cf0c85d12fa549f969973b6f4c68fdc | /LibMathematics/Intersection/Wm5IntrSegment3Cylinder3.h | ade282177af00978e74c83ebd17a54131f5d40dc | [
"BSL-1.0"
] | permissive | nmnghjss/WildMagic | 9e111de0a23d736dc5b2eef944f143ca84e58bc0 | b1a7cc2140dde23d8d9a4ece52a07bd5ff938239 | refs/heads/master | 2022-04-22T09:01:12.909379 | 2013-05-13T21:28:18 | 2013-05-13T21:28:18 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,568 | h | // Geometric Tools, LLC
// Copyright (c) 1998-2012
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
//
// File Version: 5.0.1 (2010/10/01)
#ifndef WM5INTRSEGMENT3CYLINDER3_H
#define WM5INTRSEGMENT3CYLINDER3_H
#include "Wm5MathematicsLIB.h"
#include "Wm5Intersector.h"
#include "Wm5Segment3.h"
#include "Wm5Cylinder3.h"
namespace Wm5
{
template <typename Real>
class WM5_MATHEMATICS_ITEM IntrSegment3Cylinder3
: public Intersector<Real,Vector3<Real> >
{
public:
IntrSegment3Cylinder3 (const Segment3<Real>& segment,
const Cylinder3<Real>& cylinder);
// Object access.
const Segment3<Real>& GetSegment () const;
const Cylinder3<Real>& GetCylinder () const;
// Static intersection query.
virtual bool Find ();
// The intersection set.
int GetQuantity () const;
const Vector3<Real>& GetPoint (int i) const;
private:
using Intersector<Real,Vector3<Real> >::IT_EMPTY;
using Intersector<Real,Vector3<Real> >::IT_POINT;
using Intersector<Real,Vector3<Real> >::IT_SEGMENT;
using Intersector<Real,Vector3<Real> >::mIntersectionType;
// The objects to intersect.
const Segment3<Real>* mSegment;
const Cylinder3<Real>* mCylinder;
// Information about the intersection set.
int mQuantity;
Vector3<Real> mPoint[2];
};
typedef IntrSegment3Cylinder3<float> IntrSegment3Cylinder3f;
typedef IntrSegment3Cylinder3<double> IntrSegment3Cylinder3d;
}
#endif
| [
"bazhenovc@bazhenovc-laptop"
] | bazhenovc@bazhenovc-laptop |
d39cec3f5d5d584d479f3eabfbf5b3c44aa1f6f0 | 15e6480cbb51ff1aa704a1b217c0995e67ce9f5a | /DesignPattern/TransferObject.cpp | a53bf1a4ff61b5f410377ac2ce1d8ab794215f18 | [] | no_license | zhugp125/C_C_plus_plus | e70e9ef21a163e50d62276e6bd57018391708e93 | 174167881980436f13024fd3d951a15d3e42c7d9 | refs/heads/master | 2021-06-04T02:24:04.679663 | 2020-07-04T08:50:57 | 2020-07-04T08:50:57 | 132,251,905 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,937 | cpp | #include <iostream>
#include <map>
#include <vector>
using namespace std;
class StudentVO
{
public:
StudentVO(const string& name, int id) : m_id(id), m_name(name) {}
void setName(const string& name) { m_name = name; }
string getName() { return m_name; }
int getId() const { return m_id; }
private:
int m_id;
string m_name;
};
class StudentBO
{
public:
StudentBO()
{
{
StudentVO stu("liu", 1);
m_students[stu.getId()] = stu;
}
{
StudentVO stu("zhu", 2);
m_students[stu.getId()] = stu;
}
}
vector<StudentVO> getAllStudents()
{
vector<StudentVO> vec;
for(auto stu : m_students)
{
vec.push_back(stu.second);
}
return vec;
}
void updateStudent(const StudentVO& stu)
{
auto it = m_students.find(stu.getId());
if (it != m_students.cend())
{
m_students[stu.getId()] = stu;
}
}
void deleteStudent(int id)
{
auto it = m_students.find(id);
if (it != m_students.end())
{
m_students.erase(it);
}
}
void addStudent(const StudentVO& stu)
{
m_students[stu.getId()] = stu;
}
StudentVO getStudent(int id)
{
auto it = m_students.find(id);
if (it != m_students.end())
{
return m_students[id];
}
return StudentVO("", -1);
}
private:
map<int, StudentVO> m_students;
};
int main()
{
StudentBO studentBusinessObject;
for (auto stu : studentBusinessObject.getAllStudents())
{
cout << "[student info] id = " << stu.getId() << ", name = " << stu.getName() << endl;
}
StudentVO stu = studentBusinessObject.getStudent(0);
stu.setName("zhang");
studentBusinessObject.updateStudent(stu);
cout << "Hello World!" << endl;
return 0;
}
| [
"18811475054@163.com"
] | 18811475054@163.com |
bafcb36982b89660f53886b297db358a584deeae | 8e17fa2c9e7a9494d0648146bda7ee1355b21630 | /Ass2Sketch/Lighting.h | 67768c6e040959591a28ac547d666796d0a2ff69 | [] | no_license | raouldc/Sketch-based-Modelling-tool | e010ef832b7eb04193fdeb5f36b88e602ddc837f | de58bf234aa4e379518422ff1f631da229f156b6 | refs/heads/master | 2021-01-10T20:35:19.447730 | 2013-09-25T23:29:25 | 2013-09-25T23:29:25 | 13,108,056 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,003 | h | // Lighting.h: interface for the CLighting and CLight class.
// Copyright: (c) Burkhard Wuensche
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_LIGHTING_H__6012A8D5_A57B_4EE6_BB19_048164137FFB__INCLUDED_)
#define AFX_LIGHTING_H__6012A8D5_A57B_4EE6_BB19_048164137FFB__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <windows.h>
#include <gl/gl.h>
class CLight
{
public:
friend class CLighting;
CLight(int id);
virtual ~CLight(){}
void setPosition(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
void init();
private:
int glLightID;
GLfloat light_ambient[4];
GLfloat light_position[4];
GLfloat light_diffuse[4];
GLfloat light_specular[4];
};
class CLighting
{
public:
CLighting();
virtual ~CLighting(){ delete[] lights;}
void enable() const;
void disable() const;
void init() const;
private:
int numLights;
CLight **lights;
};
#endif // !defined(AFX_LIGHTING_H__6012A8D5_A57B_4EE6_BB19_048164137FFB__INCLUDED_)
| [
"raoul_dcunha@hotmail.com"
] | raoul_dcunha@hotmail.com |
2fe8ba64a1d3f2e0a3aedd924e748ffb08061250 | 5e639c15fd16ddd2b1bd97e9915bcd8da9b8602d | /Project2/源.cpp | 98251fb0cef2459c5c05a6d9d911ce605a205a3b | [] | no_license | ShadowDragon-Li/work-offer | 79bf972592bac469e1b7696e8e5dfb8f4eed9bed | 23a7676520b8240abe1c8c886fcad63c4f3371fe | refs/heads/master | 2021-08-18T18:33:11.813906 | 2017-11-23T14:18:20 | 2017-11-23T14:18:20 | 111,618,599 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,180 | cpp | #include<iostream>
#include<string>
#include<vector>
using namespace std;
void RectRever(vector<vector<int>> &arr);
int main()
{
vector<vector<int>> array;
vector<int> a = {1,2,3,4};
array.push_back(a);
a.clear();
a = { 5,6,7,8 };
array.push_back(a);
a.clear();
a = { 9,10,11,12 };
array.push_back(a);
a.clear();
for (int i=0;i < array.size();i++)
{
for (int j=0;j<array[i].size();j++)
{
cout << array[i][j] << " ";
}
cout << endl;
}
RectRever(array);
getchar();
}
void RectRever(vector<vector<int>> &arr)
{
if (arr.size() == 0)
{
return;
}
for (int i=0;i<arr[0].size();i++)
{
cout << arr[0][i] << " ";
}
vector<vector<int>>::iterator it = arr.begin();
arr.erase(it);
if (arr.size() == 0)
{
return;
}
vector<vector<int>> temp;
vector<int> a_temp;
for (int m=0;m<arr[0].size();m++)
{
for (int n=0;n<arr.size();n++)
{
// cout<< "n=" << n << endl;
// cout << "m=" << m << endl;
// cout << "arr[0].size()-m-1=" << arr[0].size() - m - 1 << endl;
a_temp.push_back(arr[n][arr[0].size()-m-1]);
}
temp.push_back(a_temp);
a_temp.clear();
}
if (arr.empty() == true)
{
return;
}
else
{
RectRever(temp);
}
} | [
"33801026+ShadowDragon-Li@users.noreply.github.com"
] | 33801026+ShadowDragon-Li@users.noreply.github.com |
4003fb1a1bb757436cf43705ccca1fd497ccc0f2 | 89f5e41f6c2636a2fca127d3cacde9471a7e0474 | /compressor/test/include/compressor/test/mock/task/decoder.h | 74fda640659cd2897ba8d293f36bd1bf72444e82 | [] | no_license | marksinkovics/compressor | fc56a8f33d7f555c564fcec7e08a18ac57d31bcf | 1507bcb88deb82b9da4cad62beb7439a7e3a9c54 | refs/heads/master | 2023-04-28T09:42:34.402911 | 2023-04-16T16:24:11 | 2023-04-16T16:24:11 | 168,981,554 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 867 | h | #ifndef MockIDecoderTask_h
#define MockIDecoderTask_h
#include <fstream>
#include <string>
#include <gmock/gmock.h>
#include <compressor/data/data.h>
#include <compressor/data/reader.h>
#include <compressor/data/writer.h>
#include <compressor/task/coder.h>
#include <compressor/task/decoder.h>
#include <compressor/engine/engine.h>
class MockIDecoderTask: public compressor::IDecoderTask {
public:
MOCK_METHOD(std::string, input_file, (), (override));
MOCK_METHOD(std::string, output_file, (), (override));
MOCK_METHOD(compressor::IEngine&, engine, (), (override));
MOCK_METHOD(compressor::EncodedData&, data, (), (override));
MOCK_METHOD(compressor::IDataReader<compressor::EncodedData>&, reader, (), (override));
MOCK_METHOD(compressor::IDataWriter<compressor::DecodedData>&, writer, (), (override));
};
#endif /* MockIDecoderTask_h */
| [
"sinkovics.mark@gmail.com"
] | sinkovics.mark@gmail.com |
f5ddd341cbc5dc7ffd6bedc349f9c7cc61568a0f | 74ef11065048fcf08ee5b9ef1c11c0ce10079301 | /expansion_js/src/nnport/table.h | 73d648e4478e3bf4b003414bbe57744875e34611 | [
"MIT"
] | permissive | kliment-olechnovic/voronota | fa2548c9ccc3dd6f5a10a054300aca8b6d31ecf4 | 52c2b0d55f2979d0eef478ed0be20376cb3d561a | refs/heads/master | 2023-09-04T05:09:11.275304 | 2023-08-30T07:59:07 | 2023-08-30T07:59:07 | 203,789,299 | 19 | 6 | MIT | 2023-07-04T06:25:54 | 2019-08-22T12:20:48 | C++ | UTF-8 | C++ | false | false | 3,585 | h | #ifndef NNPORT_TABLE_H_
#define NNPORT_TABLE_H_
#include <iostream>
#include <set>
#include <limits>
#include "read_vector.h"
namespace voronota
{
namespace nnport
{
class Table
{
public:
Table(std::istream& input, const std::size_t min_number_of_rows=1, const std::size_t max_number_of_rows=std::numeric_limits<std::size_t>::max())
{
read(input, min_number_of_rows, max_number_of_rows);
}
bool add_row(std::istream& input)
{
std::vector<std::string> row;
while(input.good() && row.empty())
{
row=read_vector<std::string>(input, header_.size());
}
if(!row.empty())
{
rows_.push_back(row);
return true;
}
return false;
}
void clear_rows()
{
rows_.clear();
}
const std::vector<std::string>& header() const
{
return header_;
}
const std::vector< std::vector<std::string> >& rows() const
{
return rows_;
}
std::size_t select_column(const std::string& column_name) const
{
for(std::size_t i=0;i<header_.size();i++)
{
if(header_[i]==column_name)
{
return i;
}
}
throw std::runtime_error(std::string("No column named '")+column_name+"'");
return header_.size();
}
std::vector<std::size_t> select_columns(const std::vector<std::string>& column_names) const
{
std::vector<std::size_t> column_ids;
column_ids.reserve(column_names.size());
for(std::size_t i=0;i<column_names.size();i++)
{
column_ids.push_back(select_column(column_names[i]));
}
return column_ids;
}
template<typename T>
T get_value(const std::size_t column_id, const std::size_t row_id) const
{
assert_column_id(column_id);
assert_row_id(row_id);
std::istringstream input(rows_[row_id][column_id]);
T value;
input >> value;
if(input.fail())
{
throw std::runtime_error(std::string("Failed to convert table value '")+rows_[row_id][column_id]+"'");
}
return value;
}
template<typename T>
std::vector<T> get_row_values(const std::vector<std::size_t>& column_ids, const std::size_t row_id) const
{
std::vector<T> row_values;
row_values.reserve(column_ids.size());
for(std::size_t i=0;i<column_ids.size();i++)
{
row_values.push_back(get_value<T>(column_ids[i], row_id));
}
return row_values;
}
private:
void read(std::istream& input, const std::size_t min_number_of_rows, const std::size_t max_number_of_rows)
{
header_=nnport::read_vector<std::string>(input);
assert_header();
while(input.good() && rows_.size()<max_number_of_rows)
{
const std::vector<std::string> row=nnport::read_vector<std::string>(input, header_.size());
if(!row.empty())
{
rows_.push_back(row);
}
}
if(rows_.size()<min_number_of_rows)
{
throw std::runtime_error(std::string("Number of rows is fewer than the requested minimum"));
}
}
void assert_header() const
{
if(header_.empty())
{
throw std::runtime_error(std::string("No table header"));
}
{
std::set<std::string> names;
for(std::size_t i=0;i<header_.size();i++)
{
if(names.count(header_[i])>0)
{
throw std::runtime_error(std::string("Table header has repeating names"));
}
names.insert(header_[i]);
}
}
}
void assert_column_id(const std::size_t column_id) const
{
if(column_id>=header_.size())
{
throw std::runtime_error(std::string("Invalid table column index"));
}
}
void assert_row_id(const std::size_t row_id) const
{
if(row_id>=rows_.size())
{
throw std::runtime_error(std::string("Invalid table row index"));
}
}
std::vector<std::string> header_;
std::vector< std::vector<std::string> > rows_;
};
}
}
#endif /* NNPORT_TABLE_H_ */
| [
"kliment.olechnovic@gmail.com"
] | kliment.olechnovic@gmail.com |
7b3ffe6bda36bd9d3b65469507668d6f4b9b57d3 | 31114a2d4bd4fd7e1d7fd5ed239253a1f558993f | /main.cpp | a2461483eb2e8b83f7e0c84276b45712c994a007 | [] | no_license | ezequielgarcia/qt-wheel-filter-test | 1c07406ec4a83ef0a226a5f4b5fa254816bb25d2 | 05e06e374f1b4ba59bea7eaf0e35b6106b63f92a | refs/heads/master | 2021-01-22T20:19:06.769534 | 2013-10-21T11:09:44 | 2013-10-21T11:09:44 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,636 | cpp | /****************************************************************************
**
** Copyright (C) Ezequiel Garcia
**
** Based in the dials example from the Qt 5.x.x distribution:
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "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 Digia Plc and its Subsidiary(-ies) nor the names
** of its contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QApplication>
#include <QWidget>
#include <QDial>
#include <QWheelEvent>
#include "ui_qtwheel.h"
class WheelFilter : public QObject
{
protected:
bool eventFilter(QObject *obj, QEvent *event);
void wheelFilter(QWidget *window, QWheelEvent *event);
};
bool WheelFilter::eventFilter(QObject *object, QEvent *event)
{
if (event->type() != QEvent::Wheel)
// standard event processing
return QObject::eventFilter(object, event);
QWheelEvent *wheelEvent = static_cast<QWheelEvent *>(event);
/* Cast safely to main window widget */
QWidget *owner = qobject_cast<QWidget *>(object);
if (!owner)
return true;
wheelFilter(owner, wheelEvent);
return true;
}
void WheelFilter::wheelFilter(QWidget *window, QWheelEvent *event)
{
/* Get the focused slider */
QAbstractSlider *slider = qobject_cast<QAbstractSlider *>(window->focusWidget());
if (!slider)
return;
int pos = slider->sliderPosition();
pos += (event->angleDelta().y() > 0) ? 1 : -1;
slider->setSliderPosition(pos);
}
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QWidget window;
Ui::Dials dialsUi;
dialsUi.setupUi(&window);
QList<QAbstractSlider *> sliders = window.findChildren<QAbstractSlider *>();
foreach (QAbstractSlider *slider, sliders) {
slider->setAttribute(Qt::WA_AcceptTouchEvents);
}
// We need to filter the wheel event, because it may be
// ill-prepared by the evdevmouse plugin
WheelFilter *filter = new WheelFilter();
window.installEventFilter(filter);
window.showMaximized();
return app.exec();
}
| [
"ezequiel@vanguardiasur.com.ar"
] | ezequiel@vanguardiasur.com.ar |
e776540daca908c54a8cb68da0bfa575d396f27a | e1b98cfaf77b7432421b5bac7bcc691b07ada7e2 | /GuoJunJiang/PAT_work_1/github1001.cpp | 3be516dc6824f102dcbef183fa450347b756cf7e | [] | no_license | aoshuai/Llxy_AlgorithmDesign_programming_test | cd16c6392afe34e5f4ea2b0edcc80fd280e5c106 | 641569a7023e41ba662f5ff08fc480f38f2b23a3 | refs/heads/master | 2020-03-12T04:02:21.539282 | 2018-04-20T14:49:31 | 2018-04-20T14:49:31 | 130,436,515 | 3 | 0 | null | 2018-04-21T03:30:15 | 2018-04-21T03:30:14 | null | UTF-8 | C++ | false | false | 173 | cpp | #include<stdio.h>
int main()
{
int a,b,cnt;
cnt=0;
scanf("%d",&a);
while(a!=1)
{
if(a%2==0)
a=a/2;
else
a=(3*a+1)/2.0;
cnt++;
}
printf("%d\n",cnt);
return 0;
} | [
"1040231235@qq.com"
] | 1040231235@qq.com |
5542d24b87508e2bf6b4c69890af9e8be39dd493 | e82a17a1eead55a42a3d5c46ca47cd58860f8a29 | /kabuki/toolkit/gui/t_popup.h | e001f25fa1df3b4d9ecf47a079623822a6121587 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | spurnaye/kabuki_toolkit | cea96ab050f809e62bef730b081b97ad98552c14 | 614cf9b0524acd646944a6afe2b077b8abc3bc39 | refs/heads/master | 2020-04-21T19:18:43.451120 | 2019-02-03T01:52:22 | 2019-02-03T01:52:22 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,968 | h | /*
/kabuki_toolkit/gui/popup.h -- Simple popup widget which is attached to another given
window (can be nested)
NanoGUI was developed by Wenzel Jakob <wenzel.jakob@epfl.ch>.
The widget drawing code is based on the NanoVG demo application
by Mikko Mononen.
All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE.txt file.
*/
#pragma once
#include <pch.h>
#include "t_window.h"
#include "t_theme.h"
#include "t_opengl.h"
#include "t_serializer.h"
namespace _ {
/*
* \class Popup popup.h /kabuki_toolkit/gui/popup.h
*
* @brief Popup window for combo boxes, popup buttons, nested dialogs etc.
*
* Usually the Popup instance is constructed by another widget (e.g. @ref PopupButton)
* and does not need to be created by hand.
*/
class SDK Popup : public Window {
public:
enum Side { Left = 0, Right };
// Create a new popup parented to a screen (first argument) and a parent window
Popup (Widget *parent, Window *parentWindow)
: Window (parent, ""), mParentWindow (parentWindow),
mAnchorPos (Vector2i::Zero ()), mAnchorHeight (30), mSide (Side::Right) {
}
// Return the anchor position in the parent window; the placement of the popup is relative to it
void setAnchorPos (const Vector2i &anchorPos) { mAnchorPos = anchorPos; }
// Set the anchor position in the parent window; the placement of the popup is relative to it
const Vector2i &anchorPos () const { return mAnchorPos; }
// Set the anchor height; this determines the vertical shift relative to the anchor position
void setAnchorHeight (int anchorHeight) { mAnchorHeight = anchorHeight; }
// Return the anchor height; this determines the vertical shift relative to the anchor position
int anchorHeight () const { return mAnchorHeight; }
// Set the side of the parent window at which popup will appear
void setSide (Side popupSide) { mSide = popupSide; }
// Return the side of the parent window at which popup will appear
Side side () const { return mSide; }
// Return the parent window of the popup
Window *parentWindow () { return mParentWindow; }
// Return the parent window of the popup
const Window *parentWindow () const { return mParentWindow; }
// Invoke the associated layout generator to properly place child widgets, if any
virtual void performLayout (NVGcontext *ctx) override {
if (mLayout || mChildren.size () != 1) {
Widget::performLayout (ctx);
} else {
mChildren[0]->setPosition (Vector2i::Zero ());
mChildren[0]->setSize (mSize);
mChildren[0]->performLayout (ctx);
}
if (mSide == Side::Left)
mAnchorPos[0] -= size ()[0];
}
// Draw the popup window
virtual void draw (NVGcontext* ctx) override {
refreshRelativePlacement ();
if (!mVisible)
return;
int ds = mTheme->mWindowDropShadowSize, cr = mTheme->mWindowCornerRadius;
nvgSave (ctx);
nvgResetScissor (ctx);
/* Draw a drop shadow */
NVGpaint shadowPaint = nvgBoxGradient (
ctx, mPos.x (), mPos.y (), mSize.x (), mSize.y (), cr * 2, ds * 2,
mTheme->mDropShadow, mTheme->mTransparent);
nvgBeginPath (ctx);
nvgRect (ctx, mPos.x () - ds, mPos.y () - ds, mSize.x () + 2 * ds, mSize.y () + 2 * ds);
nvgRoundedRect (ctx, mPos.x (), mPos.y (), mSize.x (), mSize.y (), cr);
nvgPathWinding (ctx, NVG_HOLE);
nvgFillPaint (ctx, shadowPaint);
nvgFill (ctx);
/* Draw window */
nvgBeginPath (ctx);
nvgRoundedRect (ctx, mPos.x (), mPos.y (), mSize.x (), mSize.y (), cr);
Vector2i base = mPos + Vector2i (0, mAnchorHeight);
int sign = -1;
if (mSide == Side::Left) {
base.x () += mSize.x ();
sign = 1;
}
nvgMoveTo (ctx, base.x () + 15 * sign, base.y ());
nvgLineTo (ctx, base.x () - 1 * sign, base.y () - 15);
nvgLineTo (ctx, base.x () - 1 * sign, base.y () + 15);
nvgFillColor (ctx, mTheme->mWindowPopup);
nvgFill (ctx);
nvgRestore (ctx);
Widget::draw (ctx);
}
virtual void save (Serializer &s) const override {
Window::save (s);
s.set ("anchorPos", mAnchorPos);
s.set ("anchorHeight", mAnchorHeight);
s.set ("side", mSide);
}
virtual bool load (Serializer &s) override {
if (!Window::load (s)) return false;
if (!s.get ("anchorPos", mAnchorPos)) return false;
if (!s.get ("anchorHeight", mAnchorHeight)) return false;
if (!s.get ("side", mSide)) return false;
return true;
}
protected:
// Internal helper function to maintain nested window position values
virtual void refreshRelativePlacement () override {
mParentWindow->refreshRelativePlacement ();
mVisible &= mParentWindow->visibleRecursive ();
mPos = mParentWindow->position () + mAnchorPos - Vector2i (0, mAnchorHeight);
}
protected:
Window *mParentWindow;
Vector2i mAnchorPos;
int mAnchorHeight;
Side mSide;
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};
} //< namespace _
| [
"you@example.com"
] | you@example.com |
4f5bc84cb37b2beb9de7b026d7e141c36b548b43 | 1c8ba1552b048305ffe91793c5ff243d12cd3478 | /hooks/functions/SetupBones.cpp | 898cef27513a93e36a3bbe37c415e5285c9576ba | [] | no_license | binkynz/fuck-csgo-hack | 81acf415ef8fa5f4bffb6c2fe7ba46342a62d33b | 799d2f569a07e3b02b79598b59bd846696e875e1 | refs/heads/master | 2020-12-07T18:25:08.440562 | 2020-01-09T23:29:18 | 2020-01-09T23:29:18 | 232,771,000 | 14 | 4 | null | null | null | null | UTF-8 | C++ | false | false | 1,635 | cpp | #include "../hooks.h"
#include "../../entities/animations/animations.h"
#include <string>
namespace n_hooks {
bool __fastcall n_functions::SetupBones( std::uintptr_t ecx, std::uintptr_t edx, void* bone_to_world_out, int max_bones, int bone_mask, float current_time ) {
C_CSPlayer* player = reinterpret_cast < C_CSPlayer* >( std::uintptr_t( ecx ) - 0x4 );
auto original_fn = g_animations.track[ player->networkable( )->ent_index( ) ].renderable->get_original_function< decltype( &SetupBones ) >( 13 );
if ( player && player->is_alive( ) ) {
//if ( bone_to_world_out != nullptr ) {
// static float last_real_time = 0.f;
// if ( n_interfaces::global_vars_base->real_time >= last_real_time + 1.f )
// last_real_time = n_interfaces::global_vars_base->real_time;
//}
//bone_mask = bone_mask | 0x80000;
//if ( *reinterpret_cast< std::uint32_t* >(reinterpret_cast< std::uint32_t >( ecx ) + 0x28B8 ) != -1 )
// return false;
//if ( bone_mask == -1 )
// bone_mask = *reinterpret_cast< std::uint32_t* >( reinterpret_cast< std::uint32_t >( ecx ) + 0x2698 ); // m_iPrevBoneMask
///*if ( ( void*** )dword_10D20F3C == &off_10D20F20 )
// v16 = ( unsigned int )&off_10D20F20 ^ dword_10D20F50;
//else
// v16 = (*(int (**)(void))(*( _DWORD* )dword_10D20F3C + 52))();*/
//bone_mask = bone_mask | 0xFFF00;
///*if ( !v16 )
// bone_mask_2 = bone_mask_1;*/
//if ( !*reinterpret_cast< std::uint32_t* >( reinterpret_cast< std::uint32_t >( ecx ) + 0x2698 ) )
// bone_mask = bone_mask;
}
return original_fn( ecx, edx, bone_to_world_out, max_bones, bone_mask, current_time );
}
} | [
"seancregister@gmail.com"
] | seancregister@gmail.com |
9782c664b57d8b487c84355caf87c12fb5058fe7 | 08b8cf38e1936e8cec27f84af0d3727321cec9c4 | /data/crawl/git/new_hunk_2973.cpp | c1db4c3fd93618caebb95331defdf67e1692b902 | [] | no_license | ccdxc/logSurvey | eaf28e9c2d6307140b17986d5c05106d1fd8e943 | 6b80226e1667c1e0760ab39160893ee19b0e9fb1 | refs/heads/master | 2022-01-07T21:31:55.446839 | 2018-04-21T14:12:43 | 2018-04-21T14:12:43 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 149 | cpp | case RESUME_RESOLVED:
am_resolve(&state);
break;
case RESUME_SKIP:
am_skip(&state);
break;
default:
die("BUG: invalid resume value");
} | [
"993273596@qq.com"
] | 993273596@qq.com |
c3b9e339f221663542599d310c54103366de6363 | e73f42c15aad6ccfb6818576d67e40877ede3d54 | /bin/geek/bin_tree/bin_tree.cpp | 36786ed6873a7efec74a8533263ed692111d38d0 | [] | no_license | debanjanxy/placements | be7ae776f2c81a20f164b8c6f4c214a3aa87af87 | 88c4446170636869b8844653f7fb639a3f8d8774 | refs/heads/master | 2020-03-16T18:33:08.828931 | 2018-07-10T14:56:59 | 2018-07-10T14:56:59 | 132,877,876 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,130 | cpp | #include <iostream>
#include <queue>
#include <stack>
#include <cmath>
using namespace std;
struct node
{
struct node *left;
int data;
struct node *right;
};
node *createNode(int data)
{
node *temp = new node;
temp->data = data;
temp->left = NULL;
temp->right = NULL;
}
void levelOrderTraversal(node *root)
{
queue<node *> q;
q.push(root);
while(!q.empty())
{
node *node1 = q.front();
cout << node1->data << " ";
q.pop();
if(node1->left) q.push(node1->left);
if(node1->right) q.push(node1->right);
}
}
void printLevelWise(node *root)
{
if(root){
queue<node *> q;
q.push(root);
int l = 0;
while(!q.empty())
{
int p = pow(2,l);
while(p--){
node *node1 = q.front();
cout << node1->data << " ";
q.pop();
if(node1->left) q.push(node1->left);
if(node1->right) q.push(node1->right);
}
cout << endl;
l++;
}
}
}
void inOrderwithoutRecursion(node *root)
{
stack<node *> st;
//st.push(root);
//st.pop();
node *temp = root;
label:while(temp)
{
st.push(temp);
temp = temp->left;
}
if(!temp && !st.empty())
{
node *popped_elem = new node;
popped_elem = st.top();
st.pop();
cout << popped_elem->data << " ";
temp = popped_elem->right;
goto label;
}
cout << endl;
}
void inOrder_without_recursion_and_stack(node *root)
{
node *curr = root;
while(curr)
{
if(!curr->left)
{
cout << curr->data << " ";
curr = curr->right;
}
else
{}
}
}
void preorder_without_recursion(node *root)
{
stack<node *> st;
//st.push(root);
//st.pop();
node *temp = root;
st.push(root);
while(!st.empty())
{
temp = st.top();
cout << temp->data << " ";
st.pop();
if(temp->right) st.push(temp->right);
if(temp->left) st.push(temp->left);
}
cout << endl;
}
int main()
{
node *root = createNode(1);
root->left = createNode(3);
root->right = createNode(4);
root->left->left = createNode(2);
//root->left->right = createNode(6);
root->right->left = createNode(7);
root->right->right = createNode(5);
levelOrderTraversal(root);
cout << endl;
printLevelWise(root);
inOrderwithoutRecursion(root);
preorder_without_recursion(root);
return 0;
}
| [
"programmer.debanjan@gmail.com"
] | programmer.debanjan@gmail.com |
1739174c152de280b45258724b084bfff4629fdb | 58f7b2f6aa1865ec2fb383b14606c7048eb26f50 | /Paddle Pong/Library/Il2cppBuildCache/Android/armeabi-v7a/il2cppOutput/System.Configuration.cpp | 591c554f20697f1f26c86e81ab76a9ede2c64ea5 | [] | no_license | connorjbryant/Paddle-Pong | d107d2402519f1f25dea9367f97b6b00df3dc870 | 42e602a0b16aaecab7fd17cb67884aacd5f321e4 | refs/heads/master | 2023-03-20T17:20:08.539748 | 2021-03-06T22:12:08 | 2021-03-06T22:12:08 | 345,202,168 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 76,587 | cpp | #include "pch-cpp.hpp"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <limits>
#include <stdint.h>
// System.Char[]
struct CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34;
// System.IntPtr[]
struct IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6;
// System.Diagnostics.StackTrace[]
struct StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971;
// System.String[]
struct StringU5BU5D_tACEBFEDE350025B554CD507C9AE8FFE49359549A;
// System.Type[]
struct TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755;
// System.Collections.ArrayList
struct ArrayList_t6C1A49839DC1F0D568E8E11FA1626FCF0EC06575;
// System.Reflection.Binder
struct Binder_t2BEE27FD84737D1E79BC47FD67F6D3DD2F2DDA30;
// System.Configuration.ConfigurationCollectionAttribute
struct ConfigurationCollectionAttribute_t354F77C0DE61B8BFEC17006B49F23D7F7C73C5D6;
// System.Configuration.ConfigurationElement
struct ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA;
// System.Configuration.ConfigurationElementCollection
struct ConfigurationElementCollection_t09097ED83C909F1481AEF6E4451CF7595AFA403E;
// System.Configuration.ConfigurationPropertyCollection
struct ConfigurationPropertyCollection_t8C098DB59DF7BA2C2A71369978F4225B92B2F59B;
// System.Configuration.ConfigurationSection
struct ConfigurationSection_t0D68AA1EA007506253A4935DB9F357AF9B50C683;
// System.Collections.Hashtable
struct Hashtable_t7565AB92A12227AD5BADD6911F10D87EE52509AC;
// System.Collections.IDictionary
struct IDictionary_t99871C56B8EC2452AC5C4CF3831695E617B89D3A;
// System.Collections.IEqualityComparer
struct IEqualityComparer_t6C4C1F04B21BDE1E4B84BD6EC7DE494C186D6C68;
// System.Configuration.IgnoreSection
struct IgnoreSection_t3A4A3C7B43334B7AC2E1E345001B3E38690E7F9F;
// System.Reflection.MemberFilter
struct MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81;
// System.Collections.Specialized.NameValueCollection
struct NameValueCollection_tE3BED11C58844E8A4D9A74F359692B9A51781B4D;
// System.PlatformNotSupportedException
struct PlatformNotSupportedException_t4F02BDC290520CA1A2452F51A8AC464F6D5E356E;
// System.Configuration.Provider.ProviderBase
struct ProviderBase_t75D5AF714666B4C010B8ED3B53ECB10D3171C148;
// System.Configuration.Provider.ProviderCollection
struct ProviderCollection_tB8CF526057310ED2BA947A8BAC189D547F8AB977;
// System.Runtime.Serialization.SafeSerializationManager
struct SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F;
// System.Runtime.Serialization.SerializationInfo
struct SerializationInfo_t097DA64D9DB49ED7F2458E964BE8CCCF63FC67C1;
// System.String
struct String_t;
// System.StringComparer
struct StringComparer_t69EC059128AD0CAE268CA1A1C33125DAC9D7F8D6;
// System.Type
struct Type_t;
// System.Void
struct Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5;
// System.Xml.XmlReader
struct XmlReader_tECCB3D8B757F8CE744EF0430F338BEF15E060138;
// System.Xml.XmlWriter
struct XmlWriter_t676293C138D2D0DAB9C1BC16A7BEE618391C5B2D;
// System.Collections.Specialized.NameObjectCollectionBase/KeysCollection
struct KeysCollection_t60228730FB4ED80EC56C3582716F0195A5BDA869;
// System.Collections.Specialized.NameObjectCollectionBase/NameObjectEntry
struct NameObjectEntry_tB3CCC5A6F04E0522370F45A92233E91A5B9F4C22;
IL2CPP_EXTERN_C RuntimeClass* PlatformNotSupportedException_t4F02BDC290520CA1A2452F51A8AC464F6D5E356E_il2cpp_TypeInfo_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationCollectionAttribute_set_AddItemName_m1F627818A85626EB77C06B931506C6B12D012CCD_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationCollectionAttribute_set_ClearItemsName_m46409CF33BD6E7E1558D5723AE6DD01AC633B702_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationCollectionAttribute_set_CollectionType_m69562D47B73EF95C9DB0801BD277728F5A77AB9A_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationCollectionAttribute_set_RemoveItemName_mAA645D7B841E3417B9AB5A96D803A7F38E613F48_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationElementCollection_get_CollectionType_m0096CC61DF6FAE8E6C9DC18FF2A583AADF0665F6_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationElementCollection_get_ElementName_mB4C5C9D2C66210B67836893755CD9EB1C15E46DB_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationElementCollection_get_ThrowOnDuplicate_mC37B95927D6EDD14E35D9EC8BC9DFBCA0813E608_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationElement_DeserializeElement_m4ECB46BD2AD94E797FDAFCF49264391687A29566_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationElement_InitializeDefault_m5635E1B839F939FB38E78DCDE1A8A773617A3BEA_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationElement_IsModified_mEBE1C1B7CBDE483BBD4D10CE356D5DAD5E91A760_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationElement_PostDeserialize_mD6DA5B4EA7D61D714AD1DD5EF0C7F191FF18D9EB_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationElement_ResetModified_m5C8C779356B852E71503BC907E0A870988B13792_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationElement_Reset_mBB5E07E68F8F5B8980BAD6FD48444FE0CB6CD852_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationElement_SerializeToXmlElement_m2992562C6DDBD3D4F21B2CE28DE1F57FA0345E22_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationElement_Unmerge_m30737C75F772A3D1C310B88F6E76B86F4A5A55D9_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationElement_get_Properties_m9BEF5154370B1E154727190595DF0B7E68F4AA35_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationSection_DeserializeSection_m1C615C8DFE790CC354FBBA7E24DC47D34FF35892_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationSection_IsModified_mE1B598DDAA4CB726AA146CA26FF50B08264C99CA_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationSection_ResetModified_m2E13CE65C1ACB85FAE901015FC7DF5ED93FC8BD9_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ConfigurationSection_SerializeSection_m02D8387BAC999E6DF264C895775FD5A2E20A78F2_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* IgnoreSection_DeserializeSection_mD8F2A20AC1A2B9E594D17A81D19414AB36F74A35_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* IgnoreSection_IsModified_mECA1267F687512A088A94149235591453E6E37FC_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* IgnoreSection_ResetModified_m194F47B7E5C45CC2341BF2729411FA9E6B814C36_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* IgnoreSection_Reset_m41C043D527066CDB0A8CE5659AE44979885F00B2_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* IgnoreSection_SerializeSection_mE2219D4373E65ADEFA760E951D87E8E151306E9E_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* IgnoreSection__ctor_m5D6F875ED441BB5BDBDC88367453018FD4ADAA21_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* IgnoreSection_get_Properties_m9DEFC7F18A9DD901D65941DF65150798D4A4D613_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ProviderBase_Initialize_m62A4FBBBE297EA0AAFFD5558FBC3187EC3B35CA4_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ProviderCollection_Add_mC5E7E0D4BD361A83C41EE3ED0B71190A6008D5D4_RuntimeMethod_var;
IL2CPP_EXTERN_C const RuntimeMethod* ThrowStub_ThrowNotSupportedException_m7D3AEF39540E1D8CFA631552E9D0116434E7A9ED_RuntimeMethod_var;
struct Exception_t_marshaled_com;
struct Exception_t_marshaled_pinvoke;
IL2CPP_EXTERN_C_BEGIN
IL2CPP_EXTERN_C_END
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <Module>
struct U3CModuleU3E_t8AE0B8E7C1A6013F055610BEBB9AA6FBE27BEC4B
{
public:
public:
};
// System.Object
struct Il2CppArrayBounds;
// System.Array
// System.Attribute
struct Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71 : public RuntimeObject
{
public:
public:
};
// System.Configuration.Configuration
struct Configuration_t2D6AF83B04651CA3592278913AAE0CBE02D7C380 : public RuntimeObject
{
public:
public:
};
// System.Configuration.ConfigurationElement
struct ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA : public RuntimeObject
{
public:
public:
};
// System.Configuration.ConfigurationPropertyCollection
struct ConfigurationPropertyCollection_t8C098DB59DF7BA2C2A71369978F4225B92B2F59B : public RuntimeObject
{
public:
public:
};
// System.Configuration.ConfigurationSectionGroup
struct ConfigurationSectionGroup_t296AB4B6FC2E1B9BEDFEEAC3DB0E24AE061D32CF : public RuntimeObject
{
public:
public:
};
// System.Reflection.MemberInfo
struct MemberInfo_t : public RuntimeObject
{
public:
public:
};
// System.Collections.Specialized.NameObjectCollectionBase
struct NameObjectCollectionBase_t1317925F87C5856FA09F855B2B03D838DDC88D29 : public RuntimeObject
{
public:
// System.Boolean System.Collections.Specialized.NameObjectCollectionBase::_readOnly
bool ____readOnly_8;
// System.Collections.ArrayList System.Collections.Specialized.NameObjectCollectionBase::_entriesArray
ArrayList_t6C1A49839DC1F0D568E8E11FA1626FCF0EC06575 * ____entriesArray_9;
// System.Collections.IEqualityComparer System.Collections.Specialized.NameObjectCollectionBase::_keyComparer
RuntimeObject* ____keyComparer_10;
// System.Collections.Hashtable modreq(System.Runtime.CompilerServices.IsVolatile) System.Collections.Specialized.NameObjectCollectionBase::_entriesTable
Hashtable_t7565AB92A12227AD5BADD6911F10D87EE52509AC * ____entriesTable_11;
// System.Collections.Specialized.NameObjectCollectionBase/NameObjectEntry modreq(System.Runtime.CompilerServices.IsVolatile) System.Collections.Specialized.NameObjectCollectionBase::_nullKeyEntry
NameObjectEntry_tB3CCC5A6F04E0522370F45A92233E91A5B9F4C22 * ____nullKeyEntry_12;
// System.Collections.Specialized.NameObjectCollectionBase/KeysCollection System.Collections.Specialized.NameObjectCollectionBase::_keys
KeysCollection_t60228730FB4ED80EC56C3582716F0195A5BDA869 * ____keys_13;
// System.Runtime.Serialization.SerializationInfo System.Collections.Specialized.NameObjectCollectionBase::_serializationInfo
SerializationInfo_t097DA64D9DB49ED7F2458E964BE8CCCF63FC67C1 * ____serializationInfo_14;
// System.Int32 System.Collections.Specialized.NameObjectCollectionBase::_version
int32_t ____version_15;
// System.Object System.Collections.Specialized.NameObjectCollectionBase::_syncRoot
RuntimeObject * ____syncRoot_16;
public:
inline static int32_t get_offset_of__readOnly_8() { return static_cast<int32_t>(offsetof(NameObjectCollectionBase_t1317925F87C5856FA09F855B2B03D838DDC88D29, ____readOnly_8)); }
inline bool get__readOnly_8() const { return ____readOnly_8; }
inline bool* get_address_of__readOnly_8() { return &____readOnly_8; }
inline void set__readOnly_8(bool value)
{
____readOnly_8 = value;
}
inline static int32_t get_offset_of__entriesArray_9() { return static_cast<int32_t>(offsetof(NameObjectCollectionBase_t1317925F87C5856FA09F855B2B03D838DDC88D29, ____entriesArray_9)); }
inline ArrayList_t6C1A49839DC1F0D568E8E11FA1626FCF0EC06575 * get__entriesArray_9() const { return ____entriesArray_9; }
inline ArrayList_t6C1A49839DC1F0D568E8E11FA1626FCF0EC06575 ** get_address_of__entriesArray_9() { return &____entriesArray_9; }
inline void set__entriesArray_9(ArrayList_t6C1A49839DC1F0D568E8E11FA1626FCF0EC06575 * value)
{
____entriesArray_9 = value;
Il2CppCodeGenWriteBarrier((void**)(&____entriesArray_9), (void*)value);
}
inline static int32_t get_offset_of__keyComparer_10() { return static_cast<int32_t>(offsetof(NameObjectCollectionBase_t1317925F87C5856FA09F855B2B03D838DDC88D29, ____keyComparer_10)); }
inline RuntimeObject* get__keyComparer_10() const { return ____keyComparer_10; }
inline RuntimeObject** get_address_of__keyComparer_10() { return &____keyComparer_10; }
inline void set__keyComparer_10(RuntimeObject* value)
{
____keyComparer_10 = value;
Il2CppCodeGenWriteBarrier((void**)(&____keyComparer_10), (void*)value);
}
inline static int32_t get_offset_of__entriesTable_11() { return static_cast<int32_t>(offsetof(NameObjectCollectionBase_t1317925F87C5856FA09F855B2B03D838DDC88D29, ____entriesTable_11)); }
inline Hashtable_t7565AB92A12227AD5BADD6911F10D87EE52509AC * get__entriesTable_11() const { return ____entriesTable_11; }
inline Hashtable_t7565AB92A12227AD5BADD6911F10D87EE52509AC ** get_address_of__entriesTable_11() { return &____entriesTable_11; }
inline void set__entriesTable_11(Hashtable_t7565AB92A12227AD5BADD6911F10D87EE52509AC * value)
{
____entriesTable_11 = value;
Il2CppCodeGenWriteBarrier((void**)(&____entriesTable_11), (void*)value);
}
inline static int32_t get_offset_of__nullKeyEntry_12() { return static_cast<int32_t>(offsetof(NameObjectCollectionBase_t1317925F87C5856FA09F855B2B03D838DDC88D29, ____nullKeyEntry_12)); }
inline NameObjectEntry_tB3CCC5A6F04E0522370F45A92233E91A5B9F4C22 * get__nullKeyEntry_12() const { return ____nullKeyEntry_12; }
inline NameObjectEntry_tB3CCC5A6F04E0522370F45A92233E91A5B9F4C22 ** get_address_of__nullKeyEntry_12() { return &____nullKeyEntry_12; }
inline void set__nullKeyEntry_12(NameObjectEntry_tB3CCC5A6F04E0522370F45A92233E91A5B9F4C22 * value)
{
____nullKeyEntry_12 = value;
Il2CppCodeGenWriteBarrier((void**)(&____nullKeyEntry_12), (void*)value);
}
inline static int32_t get_offset_of__keys_13() { return static_cast<int32_t>(offsetof(NameObjectCollectionBase_t1317925F87C5856FA09F855B2B03D838DDC88D29, ____keys_13)); }
inline KeysCollection_t60228730FB4ED80EC56C3582716F0195A5BDA869 * get__keys_13() const { return ____keys_13; }
inline KeysCollection_t60228730FB4ED80EC56C3582716F0195A5BDA869 ** get_address_of__keys_13() { return &____keys_13; }
inline void set__keys_13(KeysCollection_t60228730FB4ED80EC56C3582716F0195A5BDA869 * value)
{
____keys_13 = value;
Il2CppCodeGenWriteBarrier((void**)(&____keys_13), (void*)value);
}
inline static int32_t get_offset_of__serializationInfo_14() { return static_cast<int32_t>(offsetof(NameObjectCollectionBase_t1317925F87C5856FA09F855B2B03D838DDC88D29, ____serializationInfo_14)); }
inline SerializationInfo_t097DA64D9DB49ED7F2458E964BE8CCCF63FC67C1 * get__serializationInfo_14() const { return ____serializationInfo_14; }
inline SerializationInfo_t097DA64D9DB49ED7F2458E964BE8CCCF63FC67C1 ** get_address_of__serializationInfo_14() { return &____serializationInfo_14; }
inline void set__serializationInfo_14(SerializationInfo_t097DA64D9DB49ED7F2458E964BE8CCCF63FC67C1 * value)
{
____serializationInfo_14 = value;
Il2CppCodeGenWriteBarrier((void**)(&____serializationInfo_14), (void*)value);
}
inline static int32_t get_offset_of__version_15() { return static_cast<int32_t>(offsetof(NameObjectCollectionBase_t1317925F87C5856FA09F855B2B03D838DDC88D29, ____version_15)); }
inline int32_t get__version_15() const { return ____version_15; }
inline int32_t* get_address_of__version_15() { return &____version_15; }
inline void set__version_15(int32_t value)
{
____version_15 = value;
}
inline static int32_t get_offset_of__syncRoot_16() { return static_cast<int32_t>(offsetof(NameObjectCollectionBase_t1317925F87C5856FA09F855B2B03D838DDC88D29, ____syncRoot_16)); }
inline RuntimeObject * get__syncRoot_16() const { return ____syncRoot_16; }
inline RuntimeObject ** get_address_of__syncRoot_16() { return &____syncRoot_16; }
inline void set__syncRoot_16(RuntimeObject * value)
{
____syncRoot_16 = value;
Il2CppCodeGenWriteBarrier((void**)(&____syncRoot_16), (void*)value);
}
};
struct NameObjectCollectionBase_t1317925F87C5856FA09F855B2B03D838DDC88D29_StaticFields
{
public:
// System.StringComparer System.Collections.Specialized.NameObjectCollectionBase::defaultComparer
StringComparer_t69EC059128AD0CAE268CA1A1C33125DAC9D7F8D6 * ___defaultComparer_17;
public:
inline static int32_t get_offset_of_defaultComparer_17() { return static_cast<int32_t>(offsetof(NameObjectCollectionBase_t1317925F87C5856FA09F855B2B03D838DDC88D29_StaticFields, ___defaultComparer_17)); }
inline StringComparer_t69EC059128AD0CAE268CA1A1C33125DAC9D7F8D6 * get_defaultComparer_17() const { return ___defaultComparer_17; }
inline StringComparer_t69EC059128AD0CAE268CA1A1C33125DAC9D7F8D6 ** get_address_of_defaultComparer_17() { return &___defaultComparer_17; }
inline void set_defaultComparer_17(StringComparer_t69EC059128AD0CAE268CA1A1C33125DAC9D7F8D6 * value)
{
___defaultComparer_17 = value;
Il2CppCodeGenWriteBarrier((void**)(&___defaultComparer_17), (void*)value);
}
};
// System.Configuration.Provider.ProviderBase
struct ProviderBase_t75D5AF714666B4C010B8ED3B53ECB10D3171C148 : public RuntimeObject
{
public:
public:
};
// System.Configuration.Provider.ProviderCollection
struct ProviderCollection_tB8CF526057310ED2BA947A8BAC189D547F8AB977 : public RuntimeObject
{
public:
public:
};
// System.String
struct String_t : public RuntimeObject
{
public:
// System.Int32 System.String::m_stringLength
int32_t ___m_stringLength_0;
// System.Char System.String::m_firstChar
Il2CppChar ___m_firstChar_1;
public:
inline static int32_t get_offset_of_m_stringLength_0() { return static_cast<int32_t>(offsetof(String_t, ___m_stringLength_0)); }
inline int32_t get_m_stringLength_0() const { return ___m_stringLength_0; }
inline int32_t* get_address_of_m_stringLength_0() { return &___m_stringLength_0; }
inline void set_m_stringLength_0(int32_t value)
{
___m_stringLength_0 = value;
}
inline static int32_t get_offset_of_m_firstChar_1() { return static_cast<int32_t>(offsetof(String_t, ___m_firstChar_1)); }
inline Il2CppChar get_m_firstChar_1() const { return ___m_firstChar_1; }
inline Il2CppChar* get_address_of_m_firstChar_1() { return &___m_firstChar_1; }
inline void set_m_firstChar_1(Il2CppChar value)
{
___m_firstChar_1 = value;
}
};
struct String_t_StaticFields
{
public:
// System.String System.String::Empty
String_t* ___Empty_5;
public:
inline static int32_t get_offset_of_Empty_5() { return static_cast<int32_t>(offsetof(String_t_StaticFields, ___Empty_5)); }
inline String_t* get_Empty_5() const { return ___Empty_5; }
inline String_t** get_address_of_Empty_5() { return &___Empty_5; }
inline void set_Empty_5(String_t* value)
{
___Empty_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___Empty_5), (void*)value);
}
};
// System.ValueType
struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52 : public RuntimeObject
{
public:
public:
};
// Native definition for P/Invoke marshalling of System.ValueType
struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.ValueType
struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshaled_com
{
};
// System.Xml.XmlReader
struct XmlReader_tECCB3D8B757F8CE744EF0430F338BEF15E060138 : public RuntimeObject
{
public:
public:
};
struct XmlReader_tECCB3D8B757F8CE744EF0430F338BEF15E060138_StaticFields
{
public:
// System.UInt32 System.Xml.XmlReader::IsTextualNodeBitmap
uint32_t ___IsTextualNodeBitmap_0;
// System.UInt32 System.Xml.XmlReader::CanReadContentAsBitmap
uint32_t ___CanReadContentAsBitmap_1;
// System.UInt32 System.Xml.XmlReader::HasValueBitmap
uint32_t ___HasValueBitmap_2;
public:
inline static int32_t get_offset_of_IsTextualNodeBitmap_0() { return static_cast<int32_t>(offsetof(XmlReader_tECCB3D8B757F8CE744EF0430F338BEF15E060138_StaticFields, ___IsTextualNodeBitmap_0)); }
inline uint32_t get_IsTextualNodeBitmap_0() const { return ___IsTextualNodeBitmap_0; }
inline uint32_t* get_address_of_IsTextualNodeBitmap_0() { return &___IsTextualNodeBitmap_0; }
inline void set_IsTextualNodeBitmap_0(uint32_t value)
{
___IsTextualNodeBitmap_0 = value;
}
inline static int32_t get_offset_of_CanReadContentAsBitmap_1() { return static_cast<int32_t>(offsetof(XmlReader_tECCB3D8B757F8CE744EF0430F338BEF15E060138_StaticFields, ___CanReadContentAsBitmap_1)); }
inline uint32_t get_CanReadContentAsBitmap_1() const { return ___CanReadContentAsBitmap_1; }
inline uint32_t* get_address_of_CanReadContentAsBitmap_1() { return &___CanReadContentAsBitmap_1; }
inline void set_CanReadContentAsBitmap_1(uint32_t value)
{
___CanReadContentAsBitmap_1 = value;
}
inline static int32_t get_offset_of_HasValueBitmap_2() { return static_cast<int32_t>(offsetof(XmlReader_tECCB3D8B757F8CE744EF0430F338BEF15E060138_StaticFields, ___HasValueBitmap_2)); }
inline uint32_t get_HasValueBitmap_2() const { return ___HasValueBitmap_2; }
inline uint32_t* get_address_of_HasValueBitmap_2() { return &___HasValueBitmap_2; }
inline void set_HasValueBitmap_2(uint32_t value)
{
___HasValueBitmap_2 = value;
}
};
// System.Xml.XmlWriter
struct XmlWriter_t676293C138D2D0DAB9C1BC16A7BEE618391C5B2D : public RuntimeObject
{
public:
public:
};
// System.Boolean
struct Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37
{
public:
// System.Boolean System.Boolean::m_value
bool ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37, ___m_value_0)); }
inline bool get_m_value_0() const { return ___m_value_0; }
inline bool* get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(bool value)
{
___m_value_0 = value;
}
};
struct Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_StaticFields
{
public:
// System.String System.Boolean::TrueString
String_t* ___TrueString_5;
// System.String System.Boolean::FalseString
String_t* ___FalseString_6;
public:
inline static int32_t get_offset_of_TrueString_5() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_StaticFields, ___TrueString_5)); }
inline String_t* get_TrueString_5() const { return ___TrueString_5; }
inline String_t** get_address_of_TrueString_5() { return &___TrueString_5; }
inline void set_TrueString_5(String_t* value)
{
___TrueString_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___TrueString_5), (void*)value);
}
inline static int32_t get_offset_of_FalseString_6() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_StaticFields, ___FalseString_6)); }
inline String_t* get_FalseString_6() const { return ___FalseString_6; }
inline String_t** get_address_of_FalseString_6() { return &___FalseString_6; }
inline void set_FalseString_6(String_t* value)
{
___FalseString_6 = value;
Il2CppCodeGenWriteBarrier((void**)(&___FalseString_6), (void*)value);
}
};
// System.Configuration.ConfigurationCollectionAttribute
struct ConfigurationCollectionAttribute_t354F77C0DE61B8BFEC17006B49F23D7F7C73C5D6 : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71
{
public:
public:
};
// System.Configuration.ConfigurationElementCollection
struct ConfigurationElementCollection_t09097ED83C909F1481AEF6E4451CF7595AFA403E : public ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA
{
public:
public:
};
// System.Configuration.ConfigurationSection
struct ConfigurationSection_t0D68AA1EA007506253A4935DB9F357AF9B50C683 : public ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA
{
public:
public:
};
// System.Enum
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA : public ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52
{
public:
public:
};
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_StaticFields
{
public:
// System.Char[] System.Enum::enumSeperatorCharArray
CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* ___enumSeperatorCharArray_0;
public:
inline static int32_t get_offset_of_enumSeperatorCharArray_0() { return static_cast<int32_t>(offsetof(Enum_t23B90B40F60E677A8025267341651C94AE079CDA_StaticFields, ___enumSeperatorCharArray_0)); }
inline CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* get_enumSeperatorCharArray_0() const { return ___enumSeperatorCharArray_0; }
inline CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34** get_address_of_enumSeperatorCharArray_0() { return &___enumSeperatorCharArray_0; }
inline void set_enumSeperatorCharArray_0(CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* value)
{
___enumSeperatorCharArray_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___enumSeperatorCharArray_0), (void*)value);
}
};
// Native definition for P/Invoke marshalling of System.Enum
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.Enum
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshaled_com
{
};
// System.IntPtr
struct IntPtr_t
{
public:
// System.Void* System.IntPtr::m_value
void* ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(IntPtr_t, ___m_value_0)); }
inline void* get_m_value_0() const { return ___m_value_0; }
inline void** get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(void* value)
{
___m_value_0 = value;
}
};
struct IntPtr_t_StaticFields
{
public:
// System.IntPtr System.IntPtr::Zero
intptr_t ___Zero_1;
public:
inline static int32_t get_offset_of_Zero_1() { return static_cast<int32_t>(offsetof(IntPtr_t_StaticFields, ___Zero_1)); }
inline intptr_t get_Zero_1() const { return ___Zero_1; }
inline intptr_t* get_address_of_Zero_1() { return &___Zero_1; }
inline void set_Zero_1(intptr_t value)
{
___Zero_1 = value;
}
};
// System.Collections.Specialized.NameValueCollection
struct NameValueCollection_tE3BED11C58844E8A4D9A74F359692B9A51781B4D : public NameObjectCollectionBase_t1317925F87C5856FA09F855B2B03D838DDC88D29
{
public:
// System.String[] System.Collections.Specialized.NameValueCollection::_all
StringU5BU5D_tACEBFEDE350025B554CD507C9AE8FFE49359549A* ____all_18;
// System.String[] System.Collections.Specialized.NameValueCollection::_allKeys
StringU5BU5D_tACEBFEDE350025B554CD507C9AE8FFE49359549A* ____allKeys_19;
public:
inline static int32_t get_offset_of__all_18() { return static_cast<int32_t>(offsetof(NameValueCollection_tE3BED11C58844E8A4D9A74F359692B9A51781B4D, ____all_18)); }
inline StringU5BU5D_tACEBFEDE350025B554CD507C9AE8FFE49359549A* get__all_18() const { return ____all_18; }
inline StringU5BU5D_tACEBFEDE350025B554CD507C9AE8FFE49359549A** get_address_of__all_18() { return &____all_18; }
inline void set__all_18(StringU5BU5D_tACEBFEDE350025B554CD507C9AE8FFE49359549A* value)
{
____all_18 = value;
Il2CppCodeGenWriteBarrier((void**)(&____all_18), (void*)value);
}
inline static int32_t get_offset_of__allKeys_19() { return static_cast<int32_t>(offsetof(NameValueCollection_tE3BED11C58844E8A4D9A74F359692B9A51781B4D, ____allKeys_19)); }
inline StringU5BU5D_tACEBFEDE350025B554CD507C9AE8FFE49359549A* get__allKeys_19() const { return ____allKeys_19; }
inline StringU5BU5D_tACEBFEDE350025B554CD507C9AE8FFE49359549A** get_address_of__allKeys_19() { return &____allKeys_19; }
inline void set__allKeys_19(StringU5BU5D_tACEBFEDE350025B554CD507C9AE8FFE49359549A* value)
{
____allKeys_19 = value;
Il2CppCodeGenWriteBarrier((void**)(&____allKeys_19), (void*)value);
}
};
// System.Void
struct Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5
{
public:
union
{
struct
{
};
uint8_t Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5__padding[1];
};
public:
};
// System.Reflection.BindingFlags
struct BindingFlags_tAAAB07D9AC588F0D55D844E51D7035E96DF94733
{
public:
// System.Int32 System.Reflection.BindingFlags::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(BindingFlags_tAAAB07D9AC588F0D55D844E51D7035E96DF94733, ___value___2)); }
inline int32_t get_value___2() const { return ___value___2; }
inline int32_t* get_address_of_value___2() { return &___value___2; }
inline void set_value___2(int32_t value)
{
___value___2 = value;
}
};
// System.Configuration.ConfigurationElementCollectionType
struct ConfigurationElementCollectionType_t2D078FECB4C4DF1B5856061E8952CC344BA624A6
{
public:
// System.Int32 System.Configuration.ConfigurationElementCollectionType::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(ConfigurationElementCollectionType_t2D078FECB4C4DF1B5856061E8952CC344BA624A6, ___value___2)); }
inline int32_t get_value___2() const { return ___value___2; }
inline int32_t* get_address_of_value___2() { return &___value___2; }
inline void set_value___2(int32_t value)
{
___value___2 = value;
}
};
// System.Configuration.ConfigurationSaveMode
struct ConfigurationSaveMode_t098F10C5B94710A69F2D6F1176452DAEB38F46D3
{
public:
// System.Int32 System.Configuration.ConfigurationSaveMode::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(ConfigurationSaveMode_t098F10C5B94710A69F2D6F1176452DAEB38F46D3, ___value___2)); }
inline int32_t get_value___2() const { return ___value___2; }
inline int32_t* get_address_of_value___2() { return &___value___2; }
inline void set_value___2(int32_t value)
{
___value___2 = value;
}
};
// System.Exception
struct Exception_t : public RuntimeObject
{
public:
// System.String System.Exception::_className
String_t* ____className_1;
// System.String System.Exception::_message
String_t* ____message_2;
// System.Collections.IDictionary System.Exception::_data
RuntimeObject* ____data_3;
// System.Exception System.Exception::_innerException
Exception_t * ____innerException_4;
// System.String System.Exception::_helpURL
String_t* ____helpURL_5;
// System.Object System.Exception::_stackTrace
RuntimeObject * ____stackTrace_6;
// System.String System.Exception::_stackTraceString
String_t* ____stackTraceString_7;
// System.String System.Exception::_remoteStackTraceString
String_t* ____remoteStackTraceString_8;
// System.Int32 System.Exception::_remoteStackIndex
int32_t ____remoteStackIndex_9;
// System.Object System.Exception::_dynamicMethods
RuntimeObject * ____dynamicMethods_10;
// System.Int32 System.Exception::_HResult
int32_t ____HResult_11;
// System.String System.Exception::_source
String_t* ____source_12;
// System.Runtime.Serialization.SafeSerializationManager System.Exception::_safeSerializationManager
SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * ____safeSerializationManager_13;
// System.Diagnostics.StackTrace[] System.Exception::captured_traces
StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* ___captured_traces_14;
// System.IntPtr[] System.Exception::native_trace_ips
IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6* ___native_trace_ips_15;
public:
inline static int32_t get_offset_of__className_1() { return static_cast<int32_t>(offsetof(Exception_t, ____className_1)); }
inline String_t* get__className_1() const { return ____className_1; }
inline String_t** get_address_of__className_1() { return &____className_1; }
inline void set__className_1(String_t* value)
{
____className_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____className_1), (void*)value);
}
inline static int32_t get_offset_of__message_2() { return static_cast<int32_t>(offsetof(Exception_t, ____message_2)); }
inline String_t* get__message_2() const { return ____message_2; }
inline String_t** get_address_of__message_2() { return &____message_2; }
inline void set__message_2(String_t* value)
{
____message_2 = value;
Il2CppCodeGenWriteBarrier((void**)(&____message_2), (void*)value);
}
inline static int32_t get_offset_of__data_3() { return static_cast<int32_t>(offsetof(Exception_t, ____data_3)); }
inline RuntimeObject* get__data_3() const { return ____data_3; }
inline RuntimeObject** get_address_of__data_3() { return &____data_3; }
inline void set__data_3(RuntimeObject* value)
{
____data_3 = value;
Il2CppCodeGenWriteBarrier((void**)(&____data_3), (void*)value);
}
inline static int32_t get_offset_of__innerException_4() { return static_cast<int32_t>(offsetof(Exception_t, ____innerException_4)); }
inline Exception_t * get__innerException_4() const { return ____innerException_4; }
inline Exception_t ** get_address_of__innerException_4() { return &____innerException_4; }
inline void set__innerException_4(Exception_t * value)
{
____innerException_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____innerException_4), (void*)value);
}
inline static int32_t get_offset_of__helpURL_5() { return static_cast<int32_t>(offsetof(Exception_t, ____helpURL_5)); }
inline String_t* get__helpURL_5() const { return ____helpURL_5; }
inline String_t** get_address_of__helpURL_5() { return &____helpURL_5; }
inline void set__helpURL_5(String_t* value)
{
____helpURL_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____helpURL_5), (void*)value);
}
inline static int32_t get_offset_of__stackTrace_6() { return static_cast<int32_t>(offsetof(Exception_t, ____stackTrace_6)); }
inline RuntimeObject * get__stackTrace_6() const { return ____stackTrace_6; }
inline RuntimeObject ** get_address_of__stackTrace_6() { return &____stackTrace_6; }
inline void set__stackTrace_6(RuntimeObject * value)
{
____stackTrace_6 = value;
Il2CppCodeGenWriteBarrier((void**)(&____stackTrace_6), (void*)value);
}
inline static int32_t get_offset_of__stackTraceString_7() { return static_cast<int32_t>(offsetof(Exception_t, ____stackTraceString_7)); }
inline String_t* get__stackTraceString_7() const { return ____stackTraceString_7; }
inline String_t** get_address_of__stackTraceString_7() { return &____stackTraceString_7; }
inline void set__stackTraceString_7(String_t* value)
{
____stackTraceString_7 = value;
Il2CppCodeGenWriteBarrier((void**)(&____stackTraceString_7), (void*)value);
}
inline static int32_t get_offset_of__remoteStackTraceString_8() { return static_cast<int32_t>(offsetof(Exception_t, ____remoteStackTraceString_8)); }
inline String_t* get__remoteStackTraceString_8() const { return ____remoteStackTraceString_8; }
inline String_t** get_address_of__remoteStackTraceString_8() { return &____remoteStackTraceString_8; }
inline void set__remoteStackTraceString_8(String_t* value)
{
____remoteStackTraceString_8 = value;
Il2CppCodeGenWriteBarrier((void**)(&____remoteStackTraceString_8), (void*)value);
}
inline static int32_t get_offset_of__remoteStackIndex_9() { return static_cast<int32_t>(offsetof(Exception_t, ____remoteStackIndex_9)); }
inline int32_t get__remoteStackIndex_9() const { return ____remoteStackIndex_9; }
inline int32_t* get_address_of__remoteStackIndex_9() { return &____remoteStackIndex_9; }
inline void set__remoteStackIndex_9(int32_t value)
{
____remoteStackIndex_9 = value;
}
inline static int32_t get_offset_of__dynamicMethods_10() { return static_cast<int32_t>(offsetof(Exception_t, ____dynamicMethods_10)); }
inline RuntimeObject * get__dynamicMethods_10() const { return ____dynamicMethods_10; }
inline RuntimeObject ** get_address_of__dynamicMethods_10() { return &____dynamicMethods_10; }
inline void set__dynamicMethods_10(RuntimeObject * value)
{
____dynamicMethods_10 = value;
Il2CppCodeGenWriteBarrier((void**)(&____dynamicMethods_10), (void*)value);
}
inline static int32_t get_offset_of__HResult_11() { return static_cast<int32_t>(offsetof(Exception_t, ____HResult_11)); }
inline int32_t get__HResult_11() const { return ____HResult_11; }
inline int32_t* get_address_of__HResult_11() { return &____HResult_11; }
inline void set__HResult_11(int32_t value)
{
____HResult_11 = value;
}
inline static int32_t get_offset_of__source_12() { return static_cast<int32_t>(offsetof(Exception_t, ____source_12)); }
inline String_t* get__source_12() const { return ____source_12; }
inline String_t** get_address_of__source_12() { return &____source_12; }
inline void set__source_12(String_t* value)
{
____source_12 = value;
Il2CppCodeGenWriteBarrier((void**)(&____source_12), (void*)value);
}
inline static int32_t get_offset_of__safeSerializationManager_13() { return static_cast<int32_t>(offsetof(Exception_t, ____safeSerializationManager_13)); }
inline SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * get__safeSerializationManager_13() const { return ____safeSerializationManager_13; }
inline SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F ** get_address_of__safeSerializationManager_13() { return &____safeSerializationManager_13; }
inline void set__safeSerializationManager_13(SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * value)
{
____safeSerializationManager_13 = value;
Il2CppCodeGenWriteBarrier((void**)(&____safeSerializationManager_13), (void*)value);
}
inline static int32_t get_offset_of_captured_traces_14() { return static_cast<int32_t>(offsetof(Exception_t, ___captured_traces_14)); }
inline StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* get_captured_traces_14() const { return ___captured_traces_14; }
inline StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971** get_address_of_captured_traces_14() { return &___captured_traces_14; }
inline void set_captured_traces_14(StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* value)
{
___captured_traces_14 = value;
Il2CppCodeGenWriteBarrier((void**)(&___captured_traces_14), (void*)value);
}
inline static int32_t get_offset_of_native_trace_ips_15() { return static_cast<int32_t>(offsetof(Exception_t, ___native_trace_ips_15)); }
inline IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6* get_native_trace_ips_15() const { return ___native_trace_ips_15; }
inline IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6** get_address_of_native_trace_ips_15() { return &___native_trace_ips_15; }
inline void set_native_trace_ips_15(IntPtrU5BU5D_t27FC72B0409D75AAF33EC42498E8094E95FEE9A6* value)
{
___native_trace_ips_15 = value;
Il2CppCodeGenWriteBarrier((void**)(&___native_trace_ips_15), (void*)value);
}
};
struct Exception_t_StaticFields
{
public:
// System.Object System.Exception::s_EDILock
RuntimeObject * ___s_EDILock_0;
public:
inline static int32_t get_offset_of_s_EDILock_0() { return static_cast<int32_t>(offsetof(Exception_t_StaticFields, ___s_EDILock_0)); }
inline RuntimeObject * get_s_EDILock_0() const { return ___s_EDILock_0; }
inline RuntimeObject ** get_address_of_s_EDILock_0() { return &___s_EDILock_0; }
inline void set_s_EDILock_0(RuntimeObject * value)
{
___s_EDILock_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___s_EDILock_0), (void*)value);
}
};
// Native definition for P/Invoke marshalling of System.Exception
struct Exception_t_marshaled_pinvoke
{
char* ____className_1;
char* ____message_2;
RuntimeObject* ____data_3;
Exception_t_marshaled_pinvoke* ____innerException_4;
char* ____helpURL_5;
Il2CppIUnknown* ____stackTrace_6;
char* ____stackTraceString_7;
char* ____remoteStackTraceString_8;
int32_t ____remoteStackIndex_9;
Il2CppIUnknown* ____dynamicMethods_10;
int32_t ____HResult_11;
char* ____source_12;
SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * ____safeSerializationManager_13;
StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* ___captured_traces_14;
Il2CppSafeArray/*NONE*/* ___native_trace_ips_15;
};
// Native definition for COM marshalling of System.Exception
struct Exception_t_marshaled_com
{
Il2CppChar* ____className_1;
Il2CppChar* ____message_2;
RuntimeObject* ____data_3;
Exception_t_marshaled_com* ____innerException_4;
Il2CppChar* ____helpURL_5;
Il2CppIUnknown* ____stackTrace_6;
Il2CppChar* ____stackTraceString_7;
Il2CppChar* ____remoteStackTraceString_8;
int32_t ____remoteStackIndex_9;
Il2CppIUnknown* ____dynamicMethods_10;
int32_t ____HResult_11;
Il2CppChar* ____source_12;
SafeSerializationManager_tDE44F029589A028F8A3053C5C06153FAB4AAE29F * ____safeSerializationManager_13;
StackTraceU5BU5D_t4AD999C288CB6D1F38A299D12B1598D606588971* ___captured_traces_14;
Il2CppSafeArray/*NONE*/* ___native_trace_ips_15;
};
// System.Configuration.IgnoreSection
struct IgnoreSection_t3A4A3C7B43334B7AC2E1E345001B3E38690E7F9F : public ConfigurationSection_t0D68AA1EA007506253A4935DB9F357AF9B50C683
{
public:
public:
};
// System.RuntimeTypeHandle
struct RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9
{
public:
// System.IntPtr System.RuntimeTypeHandle::value
intptr_t ___value_0;
public:
inline static int32_t get_offset_of_value_0() { return static_cast<int32_t>(offsetof(RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9, ___value_0)); }
inline intptr_t get_value_0() const { return ___value_0; }
inline intptr_t* get_address_of_value_0() { return &___value_0; }
inline void set_value_0(intptr_t value)
{
___value_0 = value;
}
};
// System.SystemException
struct SystemException_tC551B4D6EE3772B5F32C71EE8C719F4B43ECCC62 : public Exception_t
{
public:
public:
};
// System.Type
struct Type_t : public MemberInfo_t
{
public:
// System.RuntimeTypeHandle System.Type::_impl
RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9 ____impl_9;
public:
inline static int32_t get_offset_of__impl_9() { return static_cast<int32_t>(offsetof(Type_t, ____impl_9)); }
inline RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9 get__impl_9() const { return ____impl_9; }
inline RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9 * get_address_of__impl_9() { return &____impl_9; }
inline void set__impl_9(RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9 value)
{
____impl_9 = value;
}
};
struct Type_t_StaticFields
{
public:
// System.Reflection.MemberFilter System.Type::FilterAttribute
MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * ___FilterAttribute_0;
// System.Reflection.MemberFilter System.Type::FilterName
MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * ___FilterName_1;
// System.Reflection.MemberFilter System.Type::FilterNameIgnoreCase
MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * ___FilterNameIgnoreCase_2;
// System.Object System.Type::Missing
RuntimeObject * ___Missing_3;
// System.Char System.Type::Delimiter
Il2CppChar ___Delimiter_4;
// System.Type[] System.Type::EmptyTypes
TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755* ___EmptyTypes_5;
// System.Reflection.Binder System.Type::defaultBinder
Binder_t2BEE27FD84737D1E79BC47FD67F6D3DD2F2DDA30 * ___defaultBinder_6;
public:
inline static int32_t get_offset_of_FilterAttribute_0() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterAttribute_0)); }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * get_FilterAttribute_0() const { return ___FilterAttribute_0; }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 ** get_address_of_FilterAttribute_0() { return &___FilterAttribute_0; }
inline void set_FilterAttribute_0(MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * value)
{
___FilterAttribute_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___FilterAttribute_0), (void*)value);
}
inline static int32_t get_offset_of_FilterName_1() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterName_1)); }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * get_FilterName_1() const { return ___FilterName_1; }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 ** get_address_of_FilterName_1() { return &___FilterName_1; }
inline void set_FilterName_1(MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * value)
{
___FilterName_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&___FilterName_1), (void*)value);
}
inline static int32_t get_offset_of_FilterNameIgnoreCase_2() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterNameIgnoreCase_2)); }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * get_FilterNameIgnoreCase_2() const { return ___FilterNameIgnoreCase_2; }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 ** get_address_of_FilterNameIgnoreCase_2() { return &___FilterNameIgnoreCase_2; }
inline void set_FilterNameIgnoreCase_2(MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * value)
{
___FilterNameIgnoreCase_2 = value;
Il2CppCodeGenWriteBarrier((void**)(&___FilterNameIgnoreCase_2), (void*)value);
}
inline static int32_t get_offset_of_Missing_3() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___Missing_3)); }
inline RuntimeObject * get_Missing_3() const { return ___Missing_3; }
inline RuntimeObject ** get_address_of_Missing_3() { return &___Missing_3; }
inline void set_Missing_3(RuntimeObject * value)
{
___Missing_3 = value;
Il2CppCodeGenWriteBarrier((void**)(&___Missing_3), (void*)value);
}
inline static int32_t get_offset_of_Delimiter_4() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___Delimiter_4)); }
inline Il2CppChar get_Delimiter_4() const { return ___Delimiter_4; }
inline Il2CppChar* get_address_of_Delimiter_4() { return &___Delimiter_4; }
inline void set_Delimiter_4(Il2CppChar value)
{
___Delimiter_4 = value;
}
inline static int32_t get_offset_of_EmptyTypes_5() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___EmptyTypes_5)); }
inline TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755* get_EmptyTypes_5() const { return ___EmptyTypes_5; }
inline TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755** get_address_of_EmptyTypes_5() { return &___EmptyTypes_5; }
inline void set_EmptyTypes_5(TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755* value)
{
___EmptyTypes_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___EmptyTypes_5), (void*)value);
}
inline static int32_t get_offset_of_defaultBinder_6() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___defaultBinder_6)); }
inline Binder_t2BEE27FD84737D1E79BC47FD67F6D3DD2F2DDA30 * get_defaultBinder_6() const { return ___defaultBinder_6; }
inline Binder_t2BEE27FD84737D1E79BC47FD67F6D3DD2F2DDA30 ** get_address_of_defaultBinder_6() { return &___defaultBinder_6; }
inline void set_defaultBinder_6(Binder_t2BEE27FD84737D1E79BC47FD67F6D3DD2F2DDA30 * value)
{
___defaultBinder_6 = value;
Il2CppCodeGenWriteBarrier((void**)(&___defaultBinder_6), (void*)value);
}
};
// System.InvalidOperationException
struct InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB : public SystemException_tC551B4D6EE3772B5F32C71EE8C719F4B43ECCC62
{
public:
public:
};
// System.NotSupportedException
struct NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339 : public SystemException_tC551B4D6EE3772B5F32C71EE8C719F4B43ECCC62
{
public:
public:
};
// System.ObjectDisposedException
struct ObjectDisposedException_t29EF6F519F16BA477EC682F23E8344BB1E9A958A : public InvalidOperationException_t10D3EE59AD28EC641ACEE05BCA4271A527E5ECAB
{
public:
// System.String System.ObjectDisposedException::objectName
String_t* ___objectName_17;
public:
inline static int32_t get_offset_of_objectName_17() { return static_cast<int32_t>(offsetof(ObjectDisposedException_t29EF6F519F16BA477EC682F23E8344BB1E9A958A, ___objectName_17)); }
inline String_t* get_objectName_17() const { return ___objectName_17; }
inline String_t** get_address_of_objectName_17() { return &___objectName_17; }
inline void set_objectName_17(String_t* value)
{
___objectName_17 = value;
Il2CppCodeGenWriteBarrier((void**)(&___objectName_17), (void*)value);
}
};
// System.PlatformNotSupportedException
struct PlatformNotSupportedException_t4F02BDC290520CA1A2452F51A8AC464F6D5E356E : public NotSupportedException_tB9D89F0E9470A2C423D239D7C68EE0CFD77F9339
{
public:
public:
};
// Unity.ThrowStub
struct ThrowStub_tFA2AE2FC1E743D20FD5269E7EC315E4B45595608 : public ObjectDisposedException_t29EF6F519F16BA477EC682F23E8344BB1E9A958A
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// System.Void System.PlatformNotSupportedException::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void PlatformNotSupportedException__ctor_mF4122BD5C9FF6CF441C2A4BCECF012EEF603AE05 (PlatformNotSupportedException_t4F02BDC290520CA1A2452F51A8AC464F6D5E356E * __this, const RuntimeMethod* method);
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void System.Configuration.ConfigurationCollectionAttribute::.ctor(System.Type)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ConfigurationCollectionAttribute__ctor_m89928B3545B1827E694566EC696326B4A3F85206 (ConfigurationCollectionAttribute_t354F77C0DE61B8BFEC17006B49F23D7F7C73C5D6 * __this, Type_t * ___itemType0, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void System.Configuration.ConfigurationCollectionAttribute::set_AddItemName(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ConfigurationCollectionAttribute_set_AddItemName_m1F627818A85626EB77C06B931506C6B12D012CCD (ConfigurationCollectionAttribute_t354F77C0DE61B8BFEC17006B49F23D7F7C73C5D6 * __this, String_t* ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationCollectionAttribute_set_AddItemName_m1F627818A85626EB77C06B931506C6B12D012CCD_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ConfigurationCollectionAttribute_set_AddItemName_m1F627818A85626EB77C06B931506C6B12D012CCD_RuntimeMethod_var);
return;
}
}
// System.Void System.Configuration.ConfigurationCollectionAttribute::set_ClearItemsName(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ConfigurationCollectionAttribute_set_ClearItemsName_m46409CF33BD6E7E1558D5723AE6DD01AC633B702 (ConfigurationCollectionAttribute_t354F77C0DE61B8BFEC17006B49F23D7F7C73C5D6 * __this, String_t* ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationCollectionAttribute_set_ClearItemsName_m46409CF33BD6E7E1558D5723AE6DD01AC633B702_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ConfigurationCollectionAttribute_set_ClearItemsName_m46409CF33BD6E7E1558D5723AE6DD01AC633B702_RuntimeMethod_var);
return;
}
}
// System.Void System.Configuration.ConfigurationCollectionAttribute::set_CollectionType(System.Configuration.ConfigurationElementCollectionType)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ConfigurationCollectionAttribute_set_CollectionType_m69562D47B73EF95C9DB0801BD277728F5A77AB9A (ConfigurationCollectionAttribute_t354F77C0DE61B8BFEC17006B49F23D7F7C73C5D6 * __this, int32_t ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationCollectionAttribute_set_CollectionType_m69562D47B73EF95C9DB0801BD277728F5A77AB9A_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ConfigurationCollectionAttribute_set_CollectionType_m69562D47B73EF95C9DB0801BD277728F5A77AB9A_RuntimeMethod_var);
return;
}
}
// System.Void System.Configuration.ConfigurationCollectionAttribute::set_RemoveItemName(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ConfigurationCollectionAttribute_set_RemoveItemName_mAA645D7B841E3417B9AB5A96D803A7F38E613F48 (ConfigurationCollectionAttribute_t354F77C0DE61B8BFEC17006B49F23D7F7C73C5D6 * __this, String_t* ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationCollectionAttribute_set_RemoveItemName_mAA645D7B841E3417B9AB5A96D803A7F38E613F48_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ConfigurationCollectionAttribute_set_RemoveItemName_mAA645D7B841E3417B9AB5A96D803A7F38E613F48_RuntimeMethod_var);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Configuration.ConfigurationPropertyCollection System.Configuration.ConfigurationElement::get_Properties()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR ConfigurationPropertyCollection_t8C098DB59DF7BA2C2A71369978F4225B92B2F59B * ConfigurationElement_get_Properties_m9BEF5154370B1E154727190595DF0B7E68F4AA35 (ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationElement_get_Properties_m9BEF5154370B1E154727190595DF0B7E68F4AA35_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ConfigurationElement_get_Properties_m9BEF5154370B1E154727190595DF0B7E68F4AA35_RuntimeMethod_var);
return (ConfigurationPropertyCollection_t8C098DB59DF7BA2C2A71369978F4225B92B2F59B *)NULL;
}
}
// System.Void System.Configuration.ConfigurationElement::DeserializeElement(System.Xml.XmlReader,System.Boolean)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ConfigurationElement_DeserializeElement_m4ECB46BD2AD94E797FDAFCF49264391687A29566 (ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA * __this, XmlReader_tECCB3D8B757F8CE744EF0430F338BEF15E060138 * ___reader0, bool ___serializeCollectionKey1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationElement_DeserializeElement_m4ECB46BD2AD94E797FDAFCF49264391687A29566_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ConfigurationElement_DeserializeElement_m4ECB46BD2AD94E797FDAFCF49264391687A29566_RuntimeMethod_var);
return;
}
}
// System.Void System.Configuration.ConfigurationElement::InitializeDefault()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ConfigurationElement_InitializeDefault_m5635E1B839F939FB38E78DCDE1A8A773617A3BEA (ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationElement_InitializeDefault_m5635E1B839F939FB38E78DCDE1A8A773617A3BEA_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ConfigurationElement_InitializeDefault_m5635E1B839F939FB38E78DCDE1A8A773617A3BEA_RuntimeMethod_var);
return;
}
}
// System.Boolean System.Configuration.ConfigurationElement::IsModified()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool ConfigurationElement_IsModified_mEBE1C1B7CBDE483BBD4D10CE356D5DAD5E91A760 (ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationElement_IsModified_mEBE1C1B7CBDE483BBD4D10CE356D5DAD5E91A760_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
il2cpp_codegen_raise_profile_exception(ConfigurationElement_IsModified_mEBE1C1B7CBDE483BBD4D10CE356D5DAD5E91A760_RuntimeMethod_var);
il2cpp_codegen_initobj((&V_0), sizeof(bool));
bool L_0 = V_0;
return L_0;
}
}
// System.Void System.Configuration.ConfigurationElement::PostDeserialize()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ConfigurationElement_PostDeserialize_mD6DA5B4EA7D61D714AD1DD5EF0C7F191FF18D9EB (ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationElement_PostDeserialize_mD6DA5B4EA7D61D714AD1DD5EF0C7F191FF18D9EB_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ConfigurationElement_PostDeserialize_mD6DA5B4EA7D61D714AD1DD5EF0C7F191FF18D9EB_RuntimeMethod_var);
return;
}
}
// System.Void System.Configuration.ConfigurationElement::Reset(System.Configuration.ConfigurationElement)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ConfigurationElement_Reset_mBB5E07E68F8F5B8980BAD6FD48444FE0CB6CD852 (ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA * __this, ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA * ___parentElement0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationElement_Reset_mBB5E07E68F8F5B8980BAD6FD48444FE0CB6CD852_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ConfigurationElement_Reset_mBB5E07E68F8F5B8980BAD6FD48444FE0CB6CD852_RuntimeMethod_var);
return;
}
}
// System.Void System.Configuration.ConfigurationElement::ResetModified()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ConfigurationElement_ResetModified_m5C8C779356B852E71503BC907E0A870988B13792 (ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationElement_ResetModified_m5C8C779356B852E71503BC907E0A870988B13792_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ConfigurationElement_ResetModified_m5C8C779356B852E71503BC907E0A870988B13792_RuntimeMethod_var);
return;
}
}
// System.Boolean System.Configuration.ConfigurationElement::SerializeToXmlElement(System.Xml.XmlWriter,System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool ConfigurationElement_SerializeToXmlElement_m2992562C6DDBD3D4F21B2CE28DE1F57FA0345E22 (ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA * __this, XmlWriter_t676293C138D2D0DAB9C1BC16A7BEE618391C5B2D * ___writer0, String_t* ___elementName1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationElement_SerializeToXmlElement_m2992562C6DDBD3D4F21B2CE28DE1F57FA0345E22_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
il2cpp_codegen_raise_profile_exception(ConfigurationElement_SerializeToXmlElement_m2992562C6DDBD3D4F21B2CE28DE1F57FA0345E22_RuntimeMethod_var);
il2cpp_codegen_initobj((&V_0), sizeof(bool));
bool L_0 = V_0;
return L_0;
}
}
// System.Void System.Configuration.ConfigurationElement::Unmerge(System.Configuration.ConfigurationElement,System.Configuration.ConfigurationElement,System.Configuration.ConfigurationSaveMode)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ConfigurationElement_Unmerge_m30737C75F772A3D1C310B88F6E76B86F4A5A55D9 (ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA * __this, ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA * ___sourceElement0, ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA * ___parentElement1, int32_t ___saveMode2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationElement_Unmerge_m30737C75F772A3D1C310B88F6E76B86F4A5A55D9_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ConfigurationElement_Unmerge_m30737C75F772A3D1C310B88F6E76B86F4A5A55D9_RuntimeMethod_var);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Configuration.ConfigurationElementCollectionType System.Configuration.ConfigurationElementCollection::get_CollectionType()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t ConfigurationElementCollection_get_CollectionType_m0096CC61DF6FAE8E6C9DC18FF2A583AADF0665F6 (ConfigurationElementCollection_t09097ED83C909F1481AEF6E4451CF7595AFA403E * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationElementCollection_get_CollectionType_m0096CC61DF6FAE8E6C9DC18FF2A583AADF0665F6_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
{
il2cpp_codegen_raise_profile_exception(ConfigurationElementCollection_get_CollectionType_m0096CC61DF6FAE8E6C9DC18FF2A583AADF0665F6_RuntimeMethod_var);
il2cpp_codegen_initobj((&V_0), sizeof(int32_t));
int32_t L_0 = V_0;
return L_0;
}
}
// System.String System.Configuration.ConfigurationElementCollection::get_ElementName()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* ConfigurationElementCollection_get_ElementName_mB4C5C9D2C66210B67836893755CD9EB1C15E46DB (ConfigurationElementCollection_t09097ED83C909F1481AEF6E4451CF7595AFA403E * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationElementCollection_get_ElementName_mB4C5C9D2C66210B67836893755CD9EB1C15E46DB_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ConfigurationElementCollection_get_ElementName_mB4C5C9D2C66210B67836893755CD9EB1C15E46DB_RuntimeMethod_var);
return (String_t*)NULL;
}
}
// System.Boolean System.Configuration.ConfigurationElementCollection::get_ThrowOnDuplicate()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool ConfigurationElementCollection_get_ThrowOnDuplicate_mC37B95927D6EDD14E35D9EC8BC9DFBCA0813E608 (ConfigurationElementCollection_t09097ED83C909F1481AEF6E4451CF7595AFA403E * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationElementCollection_get_ThrowOnDuplicate_mC37B95927D6EDD14E35D9EC8BC9DFBCA0813E608_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
il2cpp_codegen_raise_profile_exception(ConfigurationElementCollection_get_ThrowOnDuplicate_mC37B95927D6EDD14E35D9EC8BC9DFBCA0813E608_RuntimeMethod_var);
il2cpp_codegen_initobj((&V_0), sizeof(bool));
bool L_0 = V_0;
return L_0;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void System.Configuration.ConfigurationSection::DeserializeSection(System.Xml.XmlReader)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ConfigurationSection_DeserializeSection_m1C615C8DFE790CC354FBBA7E24DC47D34FF35892 (ConfigurationSection_t0D68AA1EA007506253A4935DB9F357AF9B50C683 * __this, XmlReader_tECCB3D8B757F8CE744EF0430F338BEF15E060138 * ___reader0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationSection_DeserializeSection_m1C615C8DFE790CC354FBBA7E24DC47D34FF35892_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ConfigurationSection_DeserializeSection_m1C615C8DFE790CC354FBBA7E24DC47D34FF35892_RuntimeMethod_var);
return;
}
}
// System.Boolean System.Configuration.ConfigurationSection::IsModified()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool ConfigurationSection_IsModified_mE1B598DDAA4CB726AA146CA26FF50B08264C99CA (ConfigurationSection_t0D68AA1EA007506253A4935DB9F357AF9B50C683 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationSection_IsModified_mE1B598DDAA4CB726AA146CA26FF50B08264C99CA_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
il2cpp_codegen_raise_profile_exception(ConfigurationSection_IsModified_mE1B598DDAA4CB726AA146CA26FF50B08264C99CA_RuntimeMethod_var);
il2cpp_codegen_initobj((&V_0), sizeof(bool));
bool L_0 = V_0;
return L_0;
}
}
// System.Void System.Configuration.ConfigurationSection::ResetModified()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ConfigurationSection_ResetModified_m2E13CE65C1ACB85FAE901015FC7DF5ED93FC8BD9 (ConfigurationSection_t0D68AA1EA007506253A4935DB9F357AF9B50C683 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationSection_ResetModified_m2E13CE65C1ACB85FAE901015FC7DF5ED93FC8BD9_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ConfigurationSection_ResetModified_m2E13CE65C1ACB85FAE901015FC7DF5ED93FC8BD9_RuntimeMethod_var);
return;
}
}
// System.String System.Configuration.ConfigurationSection::SerializeSection(System.Configuration.ConfigurationElement,System.String,System.Configuration.ConfigurationSaveMode)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* ConfigurationSection_SerializeSection_m02D8387BAC999E6DF264C895775FD5A2E20A78F2 (ConfigurationSection_t0D68AA1EA007506253A4935DB9F357AF9B50C683 * __this, ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA * ___parentElement0, String_t* ___name1, int32_t ___saveMode2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ConfigurationSection_SerializeSection_m02D8387BAC999E6DF264C895775FD5A2E20A78F2_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ConfigurationSection_SerializeSection_m02D8387BAC999E6DF264C895775FD5A2E20A78F2_RuntimeMethod_var);
return (String_t*)NULL;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void System.Configuration.IgnoreSection::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void IgnoreSection__ctor_m5D6F875ED441BB5BDBDC88367453018FD4ADAA21 (IgnoreSection_t3A4A3C7B43334B7AC2E1E345001B3E38690E7F9F * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&IgnoreSection__ctor_m5D6F875ED441BB5BDBDC88367453018FD4ADAA21_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(IgnoreSection__ctor_m5D6F875ED441BB5BDBDC88367453018FD4ADAA21_RuntimeMethod_var);
return;
}
}
// System.Configuration.ConfigurationPropertyCollection System.Configuration.IgnoreSection::get_Properties()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR ConfigurationPropertyCollection_t8C098DB59DF7BA2C2A71369978F4225B92B2F59B * IgnoreSection_get_Properties_m9DEFC7F18A9DD901D65941DF65150798D4A4D613 (IgnoreSection_t3A4A3C7B43334B7AC2E1E345001B3E38690E7F9F * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&IgnoreSection_get_Properties_m9DEFC7F18A9DD901D65941DF65150798D4A4D613_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(IgnoreSection_get_Properties_m9DEFC7F18A9DD901D65941DF65150798D4A4D613_RuntimeMethod_var);
return (ConfigurationPropertyCollection_t8C098DB59DF7BA2C2A71369978F4225B92B2F59B *)NULL;
}
}
// System.Void System.Configuration.IgnoreSection::DeserializeSection(System.Xml.XmlReader)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void IgnoreSection_DeserializeSection_mD8F2A20AC1A2B9E594D17A81D19414AB36F74A35 (IgnoreSection_t3A4A3C7B43334B7AC2E1E345001B3E38690E7F9F * __this, XmlReader_tECCB3D8B757F8CE744EF0430F338BEF15E060138 * ___xmlReader0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&IgnoreSection_DeserializeSection_mD8F2A20AC1A2B9E594D17A81D19414AB36F74A35_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(IgnoreSection_DeserializeSection_mD8F2A20AC1A2B9E594D17A81D19414AB36F74A35_RuntimeMethod_var);
return;
}
}
// System.Boolean System.Configuration.IgnoreSection::IsModified()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool IgnoreSection_IsModified_mECA1267F687512A088A94149235591453E6E37FC (IgnoreSection_t3A4A3C7B43334B7AC2E1E345001B3E38690E7F9F * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&IgnoreSection_IsModified_mECA1267F687512A088A94149235591453E6E37FC_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
{
il2cpp_codegen_raise_profile_exception(IgnoreSection_IsModified_mECA1267F687512A088A94149235591453E6E37FC_RuntimeMethod_var);
il2cpp_codegen_initobj((&V_0), sizeof(bool));
bool L_0 = V_0;
return L_0;
}
}
// System.Void System.Configuration.IgnoreSection::Reset(System.Configuration.ConfigurationElement)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void IgnoreSection_Reset_m41C043D527066CDB0A8CE5659AE44979885F00B2 (IgnoreSection_t3A4A3C7B43334B7AC2E1E345001B3E38690E7F9F * __this, ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA * ___parentSection0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&IgnoreSection_Reset_m41C043D527066CDB0A8CE5659AE44979885F00B2_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(IgnoreSection_Reset_m41C043D527066CDB0A8CE5659AE44979885F00B2_RuntimeMethod_var);
return;
}
}
// System.Void System.Configuration.IgnoreSection::ResetModified()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void IgnoreSection_ResetModified_m194F47B7E5C45CC2341BF2729411FA9E6B814C36 (IgnoreSection_t3A4A3C7B43334B7AC2E1E345001B3E38690E7F9F * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&IgnoreSection_ResetModified_m194F47B7E5C45CC2341BF2729411FA9E6B814C36_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(IgnoreSection_ResetModified_m194F47B7E5C45CC2341BF2729411FA9E6B814C36_RuntimeMethod_var);
return;
}
}
// System.String System.Configuration.IgnoreSection::SerializeSection(System.Configuration.ConfigurationElement,System.String,System.Configuration.ConfigurationSaveMode)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* IgnoreSection_SerializeSection_mE2219D4373E65ADEFA760E951D87E8E151306E9E (IgnoreSection_t3A4A3C7B43334B7AC2E1E345001B3E38690E7F9F * __this, ConfigurationElement_t571C446CFDFF39CF17130653C433786BEFF25DFA * ___parentSection0, String_t* ___name1, int32_t ___saveMode2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&IgnoreSection_SerializeSection_mE2219D4373E65ADEFA760E951D87E8E151306E9E_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(IgnoreSection_SerializeSection_mE2219D4373E65ADEFA760E951D87E8E151306E9E_RuntimeMethod_var);
return (String_t*)NULL;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void System.Configuration.Provider.ProviderBase::Initialize(System.String,System.Collections.Specialized.NameValueCollection)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ProviderBase_Initialize_m62A4FBBBE297EA0AAFFD5558FBC3187EC3B35CA4 (ProviderBase_t75D5AF714666B4C010B8ED3B53ECB10D3171C148 * __this, String_t* ___name0, NameValueCollection_tE3BED11C58844E8A4D9A74F359692B9A51781B4D * ___config1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ProviderBase_Initialize_m62A4FBBBE297EA0AAFFD5558FBC3187EC3B35CA4_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ProviderBase_Initialize_m62A4FBBBE297EA0AAFFD5558FBC3187EC3B35CA4_RuntimeMethod_var);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void System.Configuration.Provider.ProviderCollection::Add(System.Configuration.Provider.ProviderBase)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ProviderCollection_Add_mC5E7E0D4BD361A83C41EE3ED0B71190A6008D5D4 (ProviderCollection_tB8CF526057310ED2BA947A8BAC189D547F8AB977 * __this, ProviderBase_t75D5AF714666B4C010B8ED3B53ECB10D3171C148 * ___provider0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ProviderCollection_Add_mC5E7E0D4BD361A83C41EE3ED0B71190A6008D5D4_RuntimeMethod_var);
s_Il2CppMethodInitialized = true;
}
{
il2cpp_codegen_raise_profile_exception(ProviderCollection_Add_mC5E7E0D4BD361A83C41EE3ED0B71190A6008D5D4_RuntimeMethod_var);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Unity.ThrowStub::ThrowNotSupportedException()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ThrowStub_ThrowNotSupportedException_m7D3AEF39540E1D8CFA631552E9D0116434E7A9ED (const RuntimeMethod* method)
{
{
PlatformNotSupportedException_t4F02BDC290520CA1A2452F51A8AC464F6D5E356E * L_0 = (PlatformNotSupportedException_t4F02BDC290520CA1A2452F51A8AC464F6D5E356E *)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&PlatformNotSupportedException_t4F02BDC290520CA1A2452F51A8AC464F6D5E356E_il2cpp_TypeInfo_var)));
PlatformNotSupportedException__ctor_mF4122BD5C9FF6CF441C2A4BCECF012EEF603AE05(L_0, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_0, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&ThrowStub_ThrowNotSupportedException_m7D3AEF39540E1D8CFA631552E9D0116434E7A9ED_RuntimeMethod_var)));
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
| [
"connorjamesbryant7@gmail.com"
] | connorjamesbryant7@gmail.com |
79e0a9d5e13735f33e3c31b1027f0f6a12cd00a9 | b30114de4cd6b11822ce341dd00d3a449f08001c | /Plugins/VRExpansionPlugin/VRExpansionPlugin/Intermediate/Build/Win64/UE4Editor/Inc/VRExpansionPlugin/GripMotionControllerComponent.gen.cpp | 042a75c179abca1146296cbc90f579be1531cff7 | [
"MIT"
] | permissive | cafeoh/VREPSandbox | d438c0c297b0b4b1c802f9c4ada6939dbdb00f37 | 6f7a778c71de89bf890739469be7869e5eaf7f3c | refs/heads/master | 2021-07-17T20:55:37.883808 | 2017-10-25T10:58:02 | 2017-10-25T10:58:02 | 104,937,955 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 167,646 | cpp | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
===========================================================================*/
#include "GeneratedCppIncludes.h"
#include "Public/GripMotionControllerComponent.h"
PRAGMA_DISABLE_OPTIMIZATION
#ifdef _MSC_VER
#pragma warning (push)
#pragma warning (disable : 4883)
#endif
PRAGMA_DISABLE_DEPRECATION_WARNINGS
void EmptyLinkFunctionForGeneratedCodeGripMotionControllerComponent() {}
// Cross Module References
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_AddSecondaryAttachmentPoint();
VREXPANSIONPLUGIN_API UClass* Z_Construct_UClass_UGripMotionControllerComponent();
COREUOBJECT_API UScriptStruct* Z_Construct_UScriptStruct_FTransform();
ENGINE_API UClass* Z_Construct_UClass_USceneComponent_NoRegister();
COREUOBJECT_API UClass* Z_Construct_UClass_UObject_NoRegister();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_BP_HasGripAuthority();
VREXPANSIONPLUGIN_API UScriptStruct* Z_Construct_UScriptStruct_FBPActorGripInformation();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_BP_HasGripMovementAuthority();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_Client_NotifyInvalidLocalGrip();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_ConvertToControllerRelativeTransform();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_ConvertToGripRelativeTransform();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_CreateGripRelativeAdditionTransform_BP();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_DropActor();
COREUOBJECT_API UScriptStruct* Z_Construct_UScriptStruct_FVector();
ENGINE_API UClass* Z_Construct_UClass_AActor_NoRegister();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_DropComponent();
ENGINE_API UClass* Z_Construct_UClass_UPrimitiveComponent_NoRegister();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_DropGrip();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_DropObject();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_DropObjectByInterface();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetGripByActor();
VREXPANSIONPLUGIN_API UEnum* Z_Construct_UEnum_VRExpansionPlugin_EBPVRResultSwitch();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetGripByComponent();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetGripByObject();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetGrippedActors();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetGrippedComponents();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetGrippedObjects();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetIsComponentHeld();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetIsHeld();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetIsObjectHeld();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetIsSecondaryAttachment();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetPhysicsVelocities();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GripActor();
VREXPANSIONPLUGIN_API UEnum* Z_Construct_UEnum_VRExpansionPlugin_EGripMovementReplicationSettings();
VREXPANSIONPLUGIN_API UEnum* Z_Construct_UEnum_VRExpansionPlugin_EGripLateUpdateSettings();
VREXPANSIONPLUGIN_API UEnum* Z_Construct_UEnum_VRExpansionPlugin_EGripCollisionType();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GripComponent();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GripControllerIsTracked();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GripObject();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GripObjectByInterface();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_HasGrippedObjects();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_NotifyDrop();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_OnRep_GrippedActors();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_OnRep_LocallyGrippedActors();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_OnRep_ReplicatedControllerTransform();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_PostTeleportMoveGrippedActors();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_RemoveSecondaryAttachmentPoint();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_Server_NotifyLocalGripAddedOrChanged();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_Server_NotifyLocalGripRemoved();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_Server_NotifySecondaryAttachmentChanged();
VREXPANSIONPLUGIN_API UScriptStruct* Z_Construct_UScriptStruct_FBPSecondaryGripInfo();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_Server_SendControllerTransform();
VREXPANSIONPLUGIN_API UScriptStruct* Z_Construct_UScriptStruct_FBPVRComponentPosRep();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_SetGripAdditionTransform();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_SetGripCollisionType();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_SetGripLateUpdateSetting();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_SetGripRelativeTransform();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_SetGripStiffnessAndDamping();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_TeleportMoveGrip();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_TeleportMoveGrippedActor();
VREXPANSIONPLUGIN_API UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_TeleportMoveGrippedComponent();
VREXPANSIONPLUGIN_API UClass* Z_Construct_UClass_UGripMotionControllerComponent_NoRegister();
HEADMOUNTEDDISPLAY_API UClass* Z_Construct_UClass_UMotionControllerComponent();
UPackage* Z_Construct_UPackage__Script_VRExpansionPlugin();
// End Cross Module References
static FName NAME_UGripMotionControllerComponent_Client_NotifyInvalidLocalGrip = FName(TEXT("Client_NotifyInvalidLocalGrip"));
void UGripMotionControllerComponent::Client_NotifyInvalidLocalGrip(UObject* LocallyGrippedObject)
{
GripMotionControllerComponent_eventClient_NotifyInvalidLocalGrip_Parms Parms;
Parms.LocallyGrippedObject=LocallyGrippedObject;
ProcessEvent(FindFunctionChecked(NAME_UGripMotionControllerComponent_Client_NotifyInvalidLocalGrip),&Parms);
}
static FName NAME_UGripMotionControllerComponent_NotifyDrop = FName(TEXT("NotifyDrop"));
void UGripMotionControllerComponent::NotifyDrop(FBPActorGripInformation const& NewDrop, bool bSimulate)
{
GripMotionControllerComponent_eventNotifyDrop_Parms Parms;
Parms.NewDrop=NewDrop;
Parms.bSimulate=bSimulate ? true : false;
ProcessEvent(FindFunctionChecked(NAME_UGripMotionControllerComponent_NotifyDrop),&Parms);
}
static FName NAME_UGripMotionControllerComponent_Server_NotifyLocalGripAddedOrChanged = FName(TEXT("Server_NotifyLocalGripAddedOrChanged"));
void UGripMotionControllerComponent::Server_NotifyLocalGripAddedOrChanged(FBPActorGripInformation const& newGrip)
{
GripMotionControllerComponent_eventServer_NotifyLocalGripAddedOrChanged_Parms Parms;
Parms.newGrip=newGrip;
ProcessEvent(FindFunctionChecked(NAME_UGripMotionControllerComponent_Server_NotifyLocalGripAddedOrChanged),&Parms);
}
static FName NAME_UGripMotionControllerComponent_Server_NotifyLocalGripRemoved = FName(TEXT("Server_NotifyLocalGripRemoved"));
void UGripMotionControllerComponent::Server_NotifyLocalGripRemoved(FBPActorGripInformation const& removeGrip)
{
GripMotionControllerComponent_eventServer_NotifyLocalGripRemoved_Parms Parms;
Parms.removeGrip=removeGrip;
ProcessEvent(FindFunctionChecked(NAME_UGripMotionControllerComponent_Server_NotifyLocalGripRemoved),&Parms);
}
static FName NAME_UGripMotionControllerComponent_Server_NotifySecondaryAttachmentChanged = FName(TEXT("Server_NotifySecondaryAttachmentChanged"));
void UGripMotionControllerComponent::Server_NotifySecondaryAttachmentChanged(UObject* GrippedObject, FBPSecondaryGripInfo SecondaryGripInfo)
{
GripMotionControllerComponent_eventServer_NotifySecondaryAttachmentChanged_Parms Parms;
Parms.GrippedObject=GrippedObject;
Parms.SecondaryGripInfo=SecondaryGripInfo;
ProcessEvent(FindFunctionChecked(NAME_UGripMotionControllerComponent_Server_NotifySecondaryAttachmentChanged),&Parms);
}
static FName NAME_UGripMotionControllerComponent_Server_SendControllerTransform = FName(TEXT("Server_SendControllerTransform"));
void UGripMotionControllerComponent::Server_SendControllerTransform(FBPVRComponentPosRep NewTransform)
{
GripMotionControllerComponent_eventServer_SendControllerTransform_Parms Parms;
Parms.NewTransform=NewTransform;
ProcessEvent(FindFunctionChecked(NAME_UGripMotionControllerComponent_Server_SendControllerTransform),&Parms);
}
void UGripMotionControllerComponent::StaticRegisterNativesUGripMotionControllerComponent()
{
UClass* Class = UGripMotionControllerComponent::StaticClass();
static const TNameNativePtrPair<ANSICHAR> AnsiFuncs[] = {
{ "AddSecondaryAttachmentPoint", (Native)&UGripMotionControllerComponent::execAddSecondaryAttachmentPoint },
{ "BP_HasGripAuthority", (Native)&UGripMotionControllerComponent::execBP_HasGripAuthority },
{ "BP_HasGripMovementAuthority", (Native)&UGripMotionControllerComponent::execBP_HasGripMovementAuthority },
{ "Client_NotifyInvalidLocalGrip", (Native)&UGripMotionControllerComponent::execClient_NotifyInvalidLocalGrip },
{ "ConvertToControllerRelativeTransform", (Native)&UGripMotionControllerComponent::execConvertToControllerRelativeTransform },
{ "ConvertToGripRelativeTransform", (Native)&UGripMotionControllerComponent::execConvertToGripRelativeTransform },
{ "CreateGripRelativeAdditionTransform_BP", (Native)&UGripMotionControllerComponent::execCreateGripRelativeAdditionTransform_BP },
{ "DropActor", (Native)&UGripMotionControllerComponent::execDropActor },
{ "DropComponent", (Native)&UGripMotionControllerComponent::execDropComponent },
{ "DropGrip", (Native)&UGripMotionControllerComponent::execDropGrip },
{ "DropObject", (Native)&UGripMotionControllerComponent::execDropObject },
{ "DropObjectByInterface", (Native)&UGripMotionControllerComponent::execDropObjectByInterface },
{ "GetGripByActor", (Native)&UGripMotionControllerComponent::execGetGripByActor },
{ "GetGripByComponent", (Native)&UGripMotionControllerComponent::execGetGripByComponent },
{ "GetGripByObject", (Native)&UGripMotionControllerComponent::execGetGripByObject },
{ "GetGrippedActors", (Native)&UGripMotionControllerComponent::execGetGrippedActors },
{ "GetGrippedComponents", (Native)&UGripMotionControllerComponent::execGetGrippedComponents },
{ "GetGrippedObjects", (Native)&UGripMotionControllerComponent::execGetGrippedObjects },
{ "GetIsComponentHeld", (Native)&UGripMotionControllerComponent::execGetIsComponentHeld },
{ "GetIsHeld", (Native)&UGripMotionControllerComponent::execGetIsHeld },
{ "GetIsObjectHeld", (Native)&UGripMotionControllerComponent::execGetIsObjectHeld },
{ "GetIsSecondaryAttachment", (Native)&UGripMotionControllerComponent::execGetIsSecondaryAttachment },
{ "GetPhysicsVelocities", (Native)&UGripMotionControllerComponent::execGetPhysicsVelocities },
{ "GripActor", (Native)&UGripMotionControllerComponent::execGripActor },
{ "GripComponent", (Native)&UGripMotionControllerComponent::execGripComponent },
{ "GripControllerIsTracked", (Native)&UGripMotionControllerComponent::execGripControllerIsTracked },
{ "GripObject", (Native)&UGripMotionControllerComponent::execGripObject },
{ "GripObjectByInterface", (Native)&UGripMotionControllerComponent::execGripObjectByInterface },
{ "HasGrippedObjects", (Native)&UGripMotionControllerComponent::execHasGrippedObjects },
{ "NotifyDrop", (Native)&UGripMotionControllerComponent::execNotifyDrop },
{ "OnRep_GrippedActors", (Native)&UGripMotionControllerComponent::execOnRep_GrippedActors },
{ "OnRep_LocallyGrippedActors", (Native)&UGripMotionControllerComponent::execOnRep_LocallyGrippedActors },
{ "OnRep_ReplicatedControllerTransform", (Native)&UGripMotionControllerComponent::execOnRep_ReplicatedControllerTransform },
{ "PostTeleportMoveGrippedActors", (Native)&UGripMotionControllerComponent::execPostTeleportMoveGrippedActors },
{ "RemoveSecondaryAttachmentPoint", (Native)&UGripMotionControllerComponent::execRemoveSecondaryAttachmentPoint },
{ "Server_NotifyLocalGripAddedOrChanged", (Native)&UGripMotionControllerComponent::execServer_NotifyLocalGripAddedOrChanged },
{ "Server_NotifyLocalGripRemoved", (Native)&UGripMotionControllerComponent::execServer_NotifyLocalGripRemoved },
{ "Server_NotifySecondaryAttachmentChanged", (Native)&UGripMotionControllerComponent::execServer_NotifySecondaryAttachmentChanged },
{ "Server_SendControllerTransform", (Native)&UGripMotionControllerComponent::execServer_SendControllerTransform },
{ "SetGripAdditionTransform", (Native)&UGripMotionControllerComponent::execSetGripAdditionTransform },
{ "SetGripCollisionType", (Native)&UGripMotionControllerComponent::execSetGripCollisionType },
{ "SetGripLateUpdateSetting", (Native)&UGripMotionControllerComponent::execSetGripLateUpdateSetting },
{ "SetGripRelativeTransform", (Native)&UGripMotionControllerComponent::execSetGripRelativeTransform },
{ "SetGripStiffnessAndDamping", (Native)&UGripMotionControllerComponent::execSetGripStiffnessAndDamping },
{ "TeleportMoveGrip", (Native)&UGripMotionControllerComponent::execTeleportMoveGrip },
{ "TeleportMoveGrippedActor", (Native)&UGripMotionControllerComponent::execTeleportMoveGrippedActor },
{ "TeleportMoveGrippedComponent", (Native)&UGripMotionControllerComponent::execTeleportMoveGrippedComponent },
};
FNativeFunctionRegistrar::RegisterFunctions(Class, AnsiFuncs, ARRAY_COUNT(AnsiFuncs));
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_AddSecondaryAttachmentPoint()
{
struct GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms
{
UObject* GrippedObjectToAddAttachment;
USceneComponent* SecondaryPointComponent;
FTransform OriginalTransform;
bool bTransformIsAlreadyRelative;
float LerpToTime;
float SecondarySmoothingScaler;
bool bIsSlotGrip;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("AddSecondaryAttachmentPoint"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04C20401, 65535, sizeof(GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms), sizeof(bool), true);
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bIsSlotGrip, GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms);
UProperty* NewProp_bIsSlotGrip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bIsSlotGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bIsSlotGrip, GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bIsSlotGrip, GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms), sizeof(bool), true);
UProperty* NewProp_SecondarySmoothingScaler = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("SecondarySmoothingScaler"), RF_Public|RF_Transient|RF_MarkAsNative) UFloatProperty(CPP_PROPERTY_BASE(SecondarySmoothingScaler, GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms), 0x0010000000000080);
UProperty* NewProp_LerpToTime = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("LerpToTime"), RF_Public|RF_Transient|RF_MarkAsNative) UFloatProperty(CPP_PROPERTY_BASE(LerpToTime, GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms), 0x0010000000000080);
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bTransformIsAlreadyRelative, GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms);
UProperty* NewProp_bTransformIsAlreadyRelative = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bTransformIsAlreadyRelative"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bTransformIsAlreadyRelative, GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bTransformIsAlreadyRelative, GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms), sizeof(bool), true);
UProperty* NewProp_OriginalTransform = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OriginalTransform"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(OriginalTransform, GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms), 0x0010000008000182, Z_Construct_UScriptStruct_FTransform());
UProperty* NewProp_SecondaryPointComponent = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("SecondaryPointComponent"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(SecondaryPointComponent, GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms), 0x0010000000080080, Z_Construct_UClass_USceneComponent_NoRegister());
UProperty* NewProp_GrippedObjectToAddAttachment = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GrippedObjectToAddAttachment"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(GrippedObjectToAddAttachment, GripMotionControllerComponent_eventAddSecondaryAttachmentPoint_Parms), 0x0010000000000080, Z_Construct_UClass_UObject_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_bIsSlotGrip"), TEXT("false"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_bTransformIsAlreadyRelative"), TEXT("false"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_LerpToTime"), TEXT("0.250000"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_SecondarySmoothingScaler"), TEXT("1.000000"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Adds a secondary attachment point to the grip\nbUseLegacySecondaryLogic enables new singularity removal code, leave true to keep original behavior"));
MetaData->SetValue(NewProp_OriginalTransform, TEXT("NativeConst"), TEXT(""));
MetaData->SetValue(NewProp_SecondaryPointComponent, TEXT("EditInline"), TEXT("true"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_BP_HasGripAuthority()
{
struct GripMotionControllerComponent_eventBP_HasGripAuthority_Parms
{
FBPActorGripInformation Grip;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("BP_HasGripAuthority"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x14420401, 65535, sizeof(GripMotionControllerComponent_eventBP_HasGripAuthority_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventBP_HasGripAuthority_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventBP_HasGripAuthority_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventBP_HasGripAuthority_Parms), sizeof(bool), true);
UProperty* NewProp_Grip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Grip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(Grip, GripMotionControllerComponent_eventBP_HasGripAuthority_Parms), 0x0010008008000182, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("DisplayName"), TEXT("HasGripAuthority"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Returns if we have grip authority (can call drop / grip on this grip)"));
MetaData->SetValue(NewProp_Grip, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_BP_HasGripMovementAuthority()
{
struct GripMotionControllerComponent_eventBP_HasGripMovementAuthority_Parms
{
FBPActorGripInformation Grip;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("BP_HasGripMovementAuthority"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x14420401, 65535, sizeof(GripMotionControllerComponent_eventBP_HasGripMovementAuthority_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventBP_HasGripMovementAuthority_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventBP_HasGripMovementAuthority_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventBP_HasGripMovementAuthority_Parms), sizeof(bool), true);
UProperty* NewProp_Grip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Grip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(Grip, GripMotionControllerComponent_eventBP_HasGripMovementAuthority_Parms), 0x0010008008000182, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("DisplayName"), TEXT("HasGripMovementAuthority"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Returns if we have grip movement authority (we handle movement of the grip)"));
MetaData->SetValue(NewProp_Grip, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_Client_NotifyInvalidLocalGrip()
{
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("Client_NotifyInvalidLocalGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x85020CC0, 65535, sizeof(GripMotionControllerComponent_eventClient_NotifyInvalidLocalGrip_Parms));
UProperty* NewProp_LocallyGrippedObject = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("LocallyGrippedObject"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(LocallyGrippedObject, GripMotionControllerComponent_eventClient_NotifyInvalidLocalGrip_Parms), 0x0010000000000080, Z_Construct_UClass_UObject_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Notify a client that their local grip was bad"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_ConvertToControllerRelativeTransform()
{
struct GripMotionControllerComponent_eventConvertToControllerRelativeTransform_Parms
{
FTransform InTransform;
UObject* OptionalObjectToCheck;
FTransform ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("ConvertToControllerRelativeTransform"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x14C20401, 65535, sizeof(GripMotionControllerComponent_eventConvertToControllerRelativeTransform_Parms));
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(ReturnValue, GripMotionControllerComponent_eventConvertToControllerRelativeTransform_Parms), 0x0010000000000580, Z_Construct_UScriptStruct_FTransform());
UProperty* NewProp_OptionalObjectToCheck = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalObjectToCheck"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(OptionalObjectToCheck, GripMotionControllerComponent_eventConvertToControllerRelativeTransform_Parms), 0x0010000000000080, Z_Construct_UClass_UObject_NoRegister());
UProperty* NewProp_InTransform = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("InTransform"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(InTransform, GripMotionControllerComponent_eventConvertToControllerRelativeTransform_Parms), 0x0010000008000182, Z_Construct_UScriptStruct_FTransform());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Converts a worldspace transform into being relative to this motion controller, optionally can check interface settings for a given object as well to modify the given transform"));
MetaData->SetValue(NewProp_InTransform, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_ConvertToGripRelativeTransform()
{
struct GripMotionControllerComponent_eventConvertToGripRelativeTransform_Parms
{
FTransform GrippedActorTransform;
FTransform InTransform;
FTransform ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("ConvertToGripRelativeTransform"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x14C22401, 65535, sizeof(GripMotionControllerComponent_eventConvertToGripRelativeTransform_Parms));
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(ReturnValue, GripMotionControllerComponent_eventConvertToGripRelativeTransform_Parms), 0x0010000000000580, Z_Construct_UScriptStruct_FTransform());
UProperty* NewProp_InTransform = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("InTransform"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(InTransform, GripMotionControllerComponent_eventConvertToGripRelativeTransform_Parms), 0x0010000008000182, Z_Construct_UScriptStruct_FTransform());
UProperty* NewProp_GrippedActorTransform = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GrippedActorTransform"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(GrippedActorTransform, GripMotionControllerComponent_eventConvertToGripRelativeTransform_Parms), 0x0010000008000182, Z_Construct_UScriptStruct_FTransform());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Creates a secondary grip relative transform"));
MetaData->SetValue(NewProp_InTransform, TEXT("NativeConst"), TEXT(""));
MetaData->SetValue(NewProp_GrippedActorTransform, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_CreateGripRelativeAdditionTransform_BP()
{
struct GripMotionControllerComponent_eventCreateGripRelativeAdditionTransform_BP_Parms
{
FBPActorGripInformation GripToSample;
FTransform AdditionTransform;
bool bGripRelative;
FTransform ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("CreateGripRelativeAdditionTransform_BP"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x14C20401, 65535, sizeof(GripMotionControllerComponent_eventCreateGripRelativeAdditionTransform_BP_Parms));
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(ReturnValue, GripMotionControllerComponent_eventCreateGripRelativeAdditionTransform_BP_Parms), 0x0010000000000580, Z_Construct_UScriptStruct_FTransform());
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bGripRelative, GripMotionControllerComponent_eventCreateGripRelativeAdditionTransform_BP_Parms);
UProperty* NewProp_bGripRelative = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bGripRelative"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bGripRelative, GripMotionControllerComponent_eventCreateGripRelativeAdditionTransform_BP_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bGripRelative, GripMotionControllerComponent_eventCreateGripRelativeAdditionTransform_BP_Parms), sizeof(bool), true);
UProperty* NewProp_AdditionTransform = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("AdditionTransform"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(AdditionTransform, GripMotionControllerComponent_eventCreateGripRelativeAdditionTransform_BP_Parms), 0x0010000008000182, Z_Construct_UScriptStruct_FTransform());
UProperty* NewProp_GripToSample = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripToSample"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(GripToSample, GripMotionControllerComponent_eventCreateGripRelativeAdditionTransform_BP_Parms), 0x0010008008000182, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_bGripRelative"), TEXT("false"));
MetaData->SetValue(ReturnFunction, TEXT("DisplayName"), TEXT("CreateGripRelativeAdditionTransform"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Used to convert an offset transform to grip relative, useful for storing an initial offset and then lerping back to 0 without re-calculating every tick"));
MetaData->SetValue(NewProp_AdditionTransform, TEXT("NativeConst"), TEXT(""));
MetaData->SetValue(NewProp_GripToSample, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_DropActor()
{
struct GripMotionControllerComponent_eventDropActor_Parms
{
AActor* ActorToDrop;
bool bSimulate;
FVector OptionalAngularVelocity;
FVector OptionalLinearVelocity;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("DropActor"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04820401, 65535, sizeof(GripMotionControllerComponent_eventDropActor_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventDropActor_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventDropActor_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventDropActor_Parms), sizeof(bool), true);
UProperty* NewProp_OptionalLinearVelocity = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalLinearVelocity"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(OptionalLinearVelocity, GripMotionControllerComponent_eventDropActor_Parms), 0x0010000000000080, Z_Construct_UScriptStruct_FVector());
UProperty* NewProp_OptionalAngularVelocity = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalAngularVelocity"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(OptionalAngularVelocity, GripMotionControllerComponent_eventDropActor_Parms), 0x0010000000000080, Z_Construct_UScriptStruct_FVector());
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bSimulate, GripMotionControllerComponent_eventDropActor_Parms);
UProperty* NewProp_bSimulate = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bSimulate"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bSimulate, GripMotionControllerComponent_eventDropActor_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bSimulate, GripMotionControllerComponent_eventDropActor_Parms), sizeof(bool), true);
UProperty* NewProp_ActorToDrop = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ActorToDrop"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ActorToDrop, GripMotionControllerComponent_eventDropActor_Parms), 0x0010000000000080, Z_Construct_UClass_AActor_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Drop a gripped actor"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_DropComponent()
{
struct GripMotionControllerComponent_eventDropComponent_Parms
{
UPrimitiveComponent* ComponentToDrop;
bool bSimulate;
FVector OptionalAngularVelocity;
FVector OptionalLinearVelocity;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("DropComponent"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04820401, 65535, sizeof(GripMotionControllerComponent_eventDropComponent_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventDropComponent_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventDropComponent_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventDropComponent_Parms), sizeof(bool), true);
UProperty* NewProp_OptionalLinearVelocity = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalLinearVelocity"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(OptionalLinearVelocity, GripMotionControllerComponent_eventDropComponent_Parms), 0x0010000000000080, Z_Construct_UScriptStruct_FVector());
UProperty* NewProp_OptionalAngularVelocity = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalAngularVelocity"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(OptionalAngularVelocity, GripMotionControllerComponent_eventDropComponent_Parms), 0x0010000000000080, Z_Construct_UScriptStruct_FVector());
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bSimulate, GripMotionControllerComponent_eventDropComponent_Parms);
UProperty* NewProp_bSimulate = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bSimulate"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bSimulate, GripMotionControllerComponent_eventDropComponent_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bSimulate, GripMotionControllerComponent_eventDropComponent_Parms), sizeof(bool), true);
UProperty* NewProp_ComponentToDrop = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ComponentToDrop"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ComponentToDrop, GripMotionControllerComponent_eventDropComponent_Parms), 0x0010000000080080, Z_Construct_UClass_UPrimitiveComponent_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Drop a gripped component"));
MetaData->SetValue(NewProp_ComponentToDrop, TEXT("EditInline"), TEXT("true"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_DropGrip()
{
struct GripMotionControllerComponent_eventDropGrip_Parms
{
FBPActorGripInformation Grip;
bool bSimulate;
FVector OptionalAngularVelocity;
FVector OptionalLinearVelocity;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("DropGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04C20401, 65535, sizeof(GripMotionControllerComponent_eventDropGrip_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventDropGrip_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventDropGrip_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventDropGrip_Parms), sizeof(bool), true);
UProperty* NewProp_OptionalLinearVelocity = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalLinearVelocity"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(OptionalLinearVelocity, GripMotionControllerComponent_eventDropGrip_Parms), 0x0010000000000080, Z_Construct_UScriptStruct_FVector());
UProperty* NewProp_OptionalAngularVelocity = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalAngularVelocity"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(OptionalAngularVelocity, GripMotionControllerComponent_eventDropGrip_Parms), 0x0010000000000080, Z_Construct_UScriptStruct_FVector());
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bSimulate, GripMotionControllerComponent_eventDropGrip_Parms);
UProperty* NewProp_bSimulate = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bSimulate"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bSimulate, GripMotionControllerComponent_eventDropGrip_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bSimulate, GripMotionControllerComponent_eventDropGrip_Parms), sizeof(bool), true);
UProperty* NewProp_Grip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Grip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(Grip, GripMotionControllerComponent_eventDropGrip_Parms), 0x0010008008000182, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Master function for dropping a grip"));
MetaData->SetValue(NewProp_Grip, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_DropObject()
{
struct GripMotionControllerComponent_eventDropObject_Parms
{
UObject* ObjectToDrop;
bool bSimulate;
FVector OptionalAngularVelocity;
FVector OptionalLinearVelocity;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("DropObject"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04820401, 65535, sizeof(GripMotionControllerComponent_eventDropObject_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventDropObject_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventDropObject_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventDropObject_Parms), sizeof(bool), true);
UProperty* NewProp_OptionalLinearVelocity = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalLinearVelocity"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(OptionalLinearVelocity, GripMotionControllerComponent_eventDropObject_Parms), 0x0010000000000080, Z_Construct_UScriptStruct_FVector());
UProperty* NewProp_OptionalAngularVelocity = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalAngularVelocity"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(OptionalAngularVelocity, GripMotionControllerComponent_eventDropObject_Parms), 0x0010000000000080, Z_Construct_UScriptStruct_FVector());
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bSimulate, GripMotionControllerComponent_eventDropObject_Parms);
UProperty* NewProp_bSimulate = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bSimulate"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bSimulate, GripMotionControllerComponent_eventDropObject_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bSimulate, GripMotionControllerComponent_eventDropObject_Parms), sizeof(bool), true);
UProperty* NewProp_ObjectToDrop = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ObjectToDrop"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ObjectToDrop, GripMotionControllerComponent_eventDropObject_Parms), 0x0010000000000080, Z_Construct_UClass_UObject_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Auto drop any uobject that is/root is a primitive component and has the VR Grip Interface"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_DropObjectByInterface()
{
struct GripMotionControllerComponent_eventDropObjectByInterface_Parms
{
UObject* ObjectToDrop;
FVector OptionalAngularVelocity;
FVector OptionalLinearVelocity;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("DropObjectByInterface"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04820401, 65535, sizeof(GripMotionControllerComponent_eventDropObjectByInterface_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventDropObjectByInterface_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventDropObjectByInterface_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventDropObjectByInterface_Parms), sizeof(bool), true);
UProperty* NewProp_OptionalLinearVelocity = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalLinearVelocity"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(OptionalLinearVelocity, GripMotionControllerComponent_eventDropObjectByInterface_Parms), 0x0010000000000080, Z_Construct_UScriptStruct_FVector());
UProperty* NewProp_OptionalAngularVelocity = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalAngularVelocity"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(OptionalAngularVelocity, GripMotionControllerComponent_eventDropObjectByInterface_Parms), 0x0010000000000080, Z_Construct_UScriptStruct_FVector());
UProperty* NewProp_ObjectToDrop = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ObjectToDrop"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ObjectToDrop, GripMotionControllerComponent_eventDropObjectByInterface_Parms), 0x0010000000000080, Z_Construct_UClass_UObject_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Auto drop any uobject that is/root is a primitive component and has the VR Grip Interface"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetGripByActor()
{
struct GripMotionControllerComponent_eventGetGripByActor_Parms
{
FBPActorGripInformation Grip;
AActor* ActorToLookForGrip;
EBPVRResultSwitch Result;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GetGripByActor"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04420401, 65535, sizeof(GripMotionControllerComponent_eventGetGripByActor_Parms));
UProperty* NewProp_Result = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Result"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(Result, GripMotionControllerComponent_eventGetGripByActor_Parms), 0x0010000000000180, Z_Construct_UEnum_VRExpansionPlugin_EBPVRResultSwitch());
UProperty* NewProp_Result_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_Result, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_ActorToLookForGrip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ActorToLookForGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ActorToLookForGrip, GripMotionControllerComponent_eventGetGripByActor_Parms), 0x0010000000000080, Z_Construct_UClass_AActor_NoRegister());
UProperty* NewProp_Grip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Grip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(Grip, GripMotionControllerComponent_eventGetGripByActor_Parms), 0x0010008000000180, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ExpandEnumAsExecs"), TEXT("Result"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Get a grip by actor"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetGripByComponent()
{
struct GripMotionControllerComponent_eventGetGripByComponent_Parms
{
FBPActorGripInformation Grip;
UPrimitiveComponent* ComponentToLookForGrip;
EBPVRResultSwitch Result;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GetGripByComponent"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04420401, 65535, sizeof(GripMotionControllerComponent_eventGetGripByComponent_Parms));
UProperty* NewProp_Result = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Result"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(Result, GripMotionControllerComponent_eventGetGripByComponent_Parms), 0x0010000000000180, Z_Construct_UEnum_VRExpansionPlugin_EBPVRResultSwitch());
UProperty* NewProp_Result_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_Result, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_ComponentToLookForGrip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ComponentToLookForGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ComponentToLookForGrip, GripMotionControllerComponent_eventGetGripByComponent_Parms), 0x0010000000080080, Z_Construct_UClass_UPrimitiveComponent_NoRegister());
UProperty* NewProp_Grip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Grip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(Grip, GripMotionControllerComponent_eventGetGripByComponent_Parms), 0x0010008000000180, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ExpandEnumAsExecs"), TEXT("Result"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Get a grip by component"));
MetaData->SetValue(NewProp_ComponentToLookForGrip, TEXT("EditInline"), TEXT("true"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetGripByObject()
{
struct GripMotionControllerComponent_eventGetGripByObject_Parms
{
FBPActorGripInformation Grip;
UObject* ObjectToLookForGrip;
EBPVRResultSwitch Result;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GetGripByObject"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04420401, 65535, sizeof(GripMotionControllerComponent_eventGetGripByObject_Parms));
UProperty* NewProp_Result = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Result"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(Result, GripMotionControllerComponent_eventGetGripByObject_Parms), 0x0010000000000180, Z_Construct_UEnum_VRExpansionPlugin_EBPVRResultSwitch());
UProperty* NewProp_Result_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_Result, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_ObjectToLookForGrip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ObjectToLookForGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ObjectToLookForGrip, GripMotionControllerComponent_eventGetGripByObject_Parms), 0x0010000000000080, Z_Construct_UClass_UObject_NoRegister());
UProperty* NewProp_Grip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Grip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(Grip, GripMotionControllerComponent_eventGetGripByObject_Parms), 0x0010008000000180, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ExpandEnumAsExecs"), TEXT("Result"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Get a grip by component"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetGrippedActors()
{
struct GripMotionControllerComponent_eventGetGrippedActors_Parms
{
TArray<AActor*> GrippedActorsArray;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GetGrippedActors"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04420401, 65535, sizeof(GripMotionControllerComponent_eventGetGrippedActors_Parms));
UProperty* NewProp_GrippedActorsArray = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GrippedActorsArray"), RF_Public|RF_Transient|RF_MarkAsNative) UArrayProperty(CPP_PROPERTY_BASE(GrippedActorsArray, GripMotionControllerComponent_eventGetGrippedActors_Parms), 0x0010000000000180);
UProperty* NewProp_GrippedActorsArray_Inner = new(EC_InternalUseOnlyConstructor, NewProp_GrippedActorsArray, TEXT("GrippedActorsArray"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000, Z_Construct_UClass_AActor_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Get list of all gripped actors"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetGrippedComponents()
{
struct GripMotionControllerComponent_eventGetGrippedComponents_Parms
{
TArray<UPrimitiveComponent*> GrippedComponentsArray;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GetGrippedComponents"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04420401, 65535, sizeof(GripMotionControllerComponent_eventGetGrippedComponents_Parms));
UProperty* NewProp_GrippedComponentsArray = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GrippedComponentsArray"), RF_Public|RF_Transient|RF_MarkAsNative) UArrayProperty(CPP_PROPERTY_BASE(GrippedComponentsArray, GripMotionControllerComponent_eventGetGrippedComponents_Parms), 0x0010008000000180);
UProperty* NewProp_GrippedComponentsArray_Inner = new(EC_InternalUseOnlyConstructor, NewProp_GrippedComponentsArray, TEXT("GrippedComponentsArray"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000080000, Z_Construct_UClass_UPrimitiveComponent_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Get list of all gripped components"));
MetaData->SetValue(NewProp_GrippedComponentsArray, TEXT("EditInline"), TEXT("true"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetGrippedObjects()
{
struct GripMotionControllerComponent_eventGetGrippedObjects_Parms
{
TArray<UObject*> GrippedObjectsArray;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GetGrippedObjects"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04420401, 65535, sizeof(GripMotionControllerComponent_eventGetGrippedObjects_Parms));
UProperty* NewProp_GrippedObjectsArray = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GrippedObjectsArray"), RF_Public|RF_Transient|RF_MarkAsNative) UArrayProperty(CPP_PROPERTY_BASE(GrippedObjectsArray, GripMotionControllerComponent_eventGetGrippedObjects_Parms), 0x0010000000000180);
UProperty* NewProp_GrippedObjectsArray_Inner = new(EC_InternalUseOnlyConstructor, NewProp_GrippedObjectsArray, TEXT("GrippedObjectsArray"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000, Z_Construct_UClass_UObject_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Get list of all gripped actors"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetIsComponentHeld()
{
struct GripMotionControllerComponent_eventGetIsComponentHeld_Parms
{
const UPrimitiveComponent* ComponentToCheck;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GetIsComponentHeld"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x14020401, 65535, sizeof(GripMotionControllerComponent_eventGetIsComponentHeld_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventGetIsComponentHeld_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventGetIsComponentHeld_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventGetIsComponentHeld_Parms), sizeof(bool), true);
UProperty* NewProp_ComponentToCheck = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ComponentToCheck"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ComponentToCheck, GripMotionControllerComponent_eventGetIsComponentHeld_Parms), 0x0010000000080082, Z_Construct_UClass_UPrimitiveComponent_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Gets if the given Component is a secondary attach point to a gripped actor"));
MetaData->SetValue(NewProp_ComponentToCheck, TEXT("EditInline"), TEXT("true"));
MetaData->SetValue(NewProp_ComponentToCheck, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetIsHeld()
{
struct GripMotionControllerComponent_eventGetIsHeld_Parms
{
const AActor* ActorToCheck;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GetIsHeld"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x14020401, 65535, sizeof(GripMotionControllerComponent_eventGetIsHeld_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventGetIsHeld_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventGetIsHeld_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventGetIsHeld_Parms), sizeof(bool), true);
UProperty* NewProp_ActorToCheck = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ActorToCheck"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ActorToCheck, GripMotionControllerComponent_eventGetIsHeld_Parms), 0x0010000000000082, Z_Construct_UClass_AActor_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Gets if the given Component is a secondary attach point to a gripped actor"));
MetaData->SetValue(NewProp_ActorToCheck, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetIsObjectHeld()
{
struct GripMotionControllerComponent_eventGetIsObjectHeld_Parms
{
const UObject* ObjectToCheck;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GetIsObjectHeld"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x14020401, 65535, sizeof(GripMotionControllerComponent_eventGetIsObjectHeld_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventGetIsObjectHeld_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventGetIsObjectHeld_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventGetIsObjectHeld_Parms), sizeof(bool), true);
UProperty* NewProp_ObjectToCheck = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ObjectToCheck"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ObjectToCheck, GripMotionControllerComponent_eventGetIsObjectHeld_Parms), 0x0010000000000082, Z_Construct_UClass_UObject_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Gets if the given Component is a secondary attach point to a gripped actor"));
MetaData->SetValue(NewProp_ObjectToCheck, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetIsSecondaryAttachment()
{
struct GripMotionControllerComponent_eventGetIsSecondaryAttachment_Parms
{
const USceneComponent* ComponentToCheck;
FBPActorGripInformation Grip;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GetIsSecondaryAttachment"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x14420401, 65535, sizeof(GripMotionControllerComponent_eventGetIsSecondaryAttachment_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventGetIsSecondaryAttachment_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventGetIsSecondaryAttachment_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventGetIsSecondaryAttachment_Parms), sizeof(bool), true);
UProperty* NewProp_Grip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Grip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(Grip, GripMotionControllerComponent_eventGetIsSecondaryAttachment_Parms), 0x0010008000000180, Z_Construct_UScriptStruct_FBPActorGripInformation());
UProperty* NewProp_ComponentToCheck = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ComponentToCheck"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ComponentToCheck, GripMotionControllerComponent_eventGetIsSecondaryAttachment_Parms), 0x0010000000080082, Z_Construct_UClass_USceneComponent_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Gets if the given Component is a secondary attach point to a gripped actor"));
MetaData->SetValue(NewProp_ComponentToCheck, TEXT("EditInline"), TEXT("true"));
MetaData->SetValue(NewProp_ComponentToCheck, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GetPhysicsVelocities()
{
struct GripMotionControllerComponent_eventGetPhysicsVelocities_Parms
{
FBPActorGripInformation Grip;
FVector AngularVelocity;
FVector LinearVelocity;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GetPhysicsVelocities"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x14C20401, 65535, sizeof(GripMotionControllerComponent_eventGetPhysicsVelocities_Parms));
UProperty* NewProp_LinearVelocity = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("LinearVelocity"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(LinearVelocity, GripMotionControllerComponent_eventGetPhysicsVelocities_Parms), 0x0010000000000180, Z_Construct_UScriptStruct_FVector());
UProperty* NewProp_AngularVelocity = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("AngularVelocity"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(AngularVelocity, GripMotionControllerComponent_eventGetPhysicsVelocities_Parms), 0x0010000000000180, Z_Construct_UScriptStruct_FVector());
UProperty* NewProp_Grip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Grip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(Grip, GripMotionControllerComponent_eventGetPhysicsVelocities_Parms), 0x0010008008000182, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Get the physics velocities of a grip"));
MetaData->SetValue(NewProp_Grip, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GripActor()
{
struct GripMotionControllerComponent_eventGripActor_Parms
{
AActor* ActorToGrip;
FTransform WorldOffset;
bool bWorldOffsetIsRelative;
FName OptionalSnapToSocketName;
EGripCollisionType GripCollisionType;
EGripLateUpdateSettings GripLateUpdateSetting;
EGripMovementReplicationSettings GripMovementReplicationSetting;
float GripStiffness;
float GripDamping;
bool bIsSlotGrip;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GripActor"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04C20401, 65535, sizeof(GripMotionControllerComponent_eventGripActor_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventGripActor_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventGripActor_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventGripActor_Parms), sizeof(bool), true);
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bIsSlotGrip, GripMotionControllerComponent_eventGripActor_Parms);
UProperty* NewProp_bIsSlotGrip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bIsSlotGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bIsSlotGrip, GripMotionControllerComponent_eventGripActor_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bIsSlotGrip, GripMotionControllerComponent_eventGripActor_Parms), sizeof(bool), true);
UProperty* NewProp_GripDamping = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripDamping"), RF_Public|RF_Transient|RF_MarkAsNative) UFloatProperty(CPP_PROPERTY_BASE(GripDamping, GripMotionControllerComponent_eventGripActor_Parms), 0x0010000000000080);
UProperty* NewProp_GripStiffness = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripStiffness"), RF_Public|RF_Transient|RF_MarkAsNative) UFloatProperty(CPP_PROPERTY_BASE(GripStiffness, GripMotionControllerComponent_eventGripActor_Parms), 0x0010000000000080);
UProperty* NewProp_GripMovementReplicationSetting = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripMovementReplicationSetting"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(GripMovementReplicationSetting, GripMotionControllerComponent_eventGripActor_Parms), 0x0010000000000080, Z_Construct_UEnum_VRExpansionPlugin_EGripMovementReplicationSettings());
UProperty* NewProp_GripMovementReplicationSetting_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_GripMovementReplicationSetting, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_GripLateUpdateSetting = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripLateUpdateSetting"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(GripLateUpdateSetting, GripMotionControllerComponent_eventGripActor_Parms), 0x0010000000000080, Z_Construct_UEnum_VRExpansionPlugin_EGripLateUpdateSettings());
UProperty* NewProp_GripLateUpdateSetting_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_GripLateUpdateSetting, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_GripCollisionType = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripCollisionType"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(GripCollisionType, GripMotionControllerComponent_eventGripActor_Parms), 0x0010000000000080, Z_Construct_UEnum_VRExpansionPlugin_EGripCollisionType());
UProperty* NewProp_GripCollisionType_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_GripCollisionType, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_OptionalSnapToSocketName = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalSnapToSocketName"), RF_Public|RF_Transient|RF_MarkAsNative) UNameProperty(CPP_PROPERTY_BASE(OptionalSnapToSocketName, GripMotionControllerComponent_eventGripActor_Parms), 0x0010000000000080);
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bWorldOffsetIsRelative, GripMotionControllerComponent_eventGripActor_Parms);
UProperty* NewProp_bWorldOffsetIsRelative = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bWorldOffsetIsRelative"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bWorldOffsetIsRelative, GripMotionControllerComponent_eventGripActor_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bWorldOffsetIsRelative, GripMotionControllerComponent_eventGripActor_Parms), sizeof(bool), true);
UProperty* NewProp_WorldOffset = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("WorldOffset"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(WorldOffset, GripMotionControllerComponent_eventGripActor_Parms), 0x0010000008000182, Z_Construct_UScriptStruct_FTransform());
UProperty* NewProp_ActorToGrip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ActorToGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ActorToGrip, GripMotionControllerComponent_eventGripActor_Parms), 0x0010000000000080, Z_Construct_UClass_AActor_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_bIsSlotGrip"), TEXT("false"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_bWorldOffsetIsRelative"), TEXT("false"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_GripCollisionType"), TEXT("InteractiveCollisionWithPhysics"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_GripDamping"), TEXT("200.000000"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_GripLateUpdateSetting"), TEXT("NotWhenCollidingOrDoubleGripping"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_GripMovementReplicationSetting"), TEXT("ForceClientSideMovement"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_GripStiffness"), TEXT("1500.000000"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_OptionalSnapToSocketName"), TEXT("None"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Grip an actor, these are stored in a Tarray that will prevent destruction of the object, you MUST ungrip an actor if you want to kill it\n The WorldOffset is the transform that it will remain away from the controller, if you use the world position of the actor then it will grab\n at the point of intersection.\n\n If WorldOffsetIsRelative is true then it will not convert the transform from world space but will instead use that offset directly.\n You could pass in a socket relative transform with this set for snapping or an empty transform to snap the object at its 0,0,0 point.\n\n If you declare a valid OptionSnapToSocketName then it will instead snap the actor to the relative offset\n location that the socket is to its parent actor."));
MetaData->SetValue(NewProp_WorldOffset, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GripComponent()
{
struct GripMotionControllerComponent_eventGripComponent_Parms
{
UPrimitiveComponent* ComponentToGrip;
FTransform WorldOffset;
bool bWorldOffsetIsRelative;
FName OptionalSnapToSocketName;
EGripCollisionType GripCollisionType;
EGripLateUpdateSettings GripLateUpdateSetting;
EGripMovementReplicationSettings GripMovementReplicationSetting;
float GripStiffness;
float GripDamping;
bool bIsSlotGrip;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GripComponent"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04C20401, 65535, sizeof(GripMotionControllerComponent_eventGripComponent_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventGripComponent_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventGripComponent_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventGripComponent_Parms), sizeof(bool), true);
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bIsSlotGrip, GripMotionControllerComponent_eventGripComponent_Parms);
UProperty* NewProp_bIsSlotGrip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bIsSlotGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bIsSlotGrip, GripMotionControllerComponent_eventGripComponent_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bIsSlotGrip, GripMotionControllerComponent_eventGripComponent_Parms), sizeof(bool), true);
UProperty* NewProp_GripDamping = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripDamping"), RF_Public|RF_Transient|RF_MarkAsNative) UFloatProperty(CPP_PROPERTY_BASE(GripDamping, GripMotionControllerComponent_eventGripComponent_Parms), 0x0010000000000080);
UProperty* NewProp_GripStiffness = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripStiffness"), RF_Public|RF_Transient|RF_MarkAsNative) UFloatProperty(CPP_PROPERTY_BASE(GripStiffness, GripMotionControllerComponent_eventGripComponent_Parms), 0x0010000000000080);
UProperty* NewProp_GripMovementReplicationSetting = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripMovementReplicationSetting"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(GripMovementReplicationSetting, GripMotionControllerComponent_eventGripComponent_Parms), 0x0010000000000080, Z_Construct_UEnum_VRExpansionPlugin_EGripMovementReplicationSettings());
UProperty* NewProp_GripMovementReplicationSetting_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_GripMovementReplicationSetting, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_GripLateUpdateSetting = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripLateUpdateSetting"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(GripLateUpdateSetting, GripMotionControllerComponent_eventGripComponent_Parms), 0x0010000000000080, Z_Construct_UEnum_VRExpansionPlugin_EGripLateUpdateSettings());
UProperty* NewProp_GripLateUpdateSetting_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_GripLateUpdateSetting, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_GripCollisionType = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripCollisionType"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(GripCollisionType, GripMotionControllerComponent_eventGripComponent_Parms), 0x0010000000000080, Z_Construct_UEnum_VRExpansionPlugin_EGripCollisionType());
UProperty* NewProp_GripCollisionType_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_GripCollisionType, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_OptionalSnapToSocketName = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalSnapToSocketName"), RF_Public|RF_Transient|RF_MarkAsNative) UNameProperty(CPP_PROPERTY_BASE(OptionalSnapToSocketName, GripMotionControllerComponent_eventGripComponent_Parms), 0x0010000000000080);
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bWorldOffsetIsRelative, GripMotionControllerComponent_eventGripComponent_Parms);
UProperty* NewProp_bWorldOffsetIsRelative = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bWorldOffsetIsRelative"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bWorldOffsetIsRelative, GripMotionControllerComponent_eventGripComponent_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bWorldOffsetIsRelative, GripMotionControllerComponent_eventGripComponent_Parms), sizeof(bool), true);
UProperty* NewProp_WorldOffset = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("WorldOffset"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(WorldOffset, GripMotionControllerComponent_eventGripComponent_Parms), 0x0010000008000182, Z_Construct_UScriptStruct_FTransform());
UProperty* NewProp_ComponentToGrip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ComponentToGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ComponentToGrip, GripMotionControllerComponent_eventGripComponent_Parms), 0x0010000000080080, Z_Construct_UClass_UPrimitiveComponent_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_bIsSlotGrip"), TEXT("false"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_bWorldOffsetIsRelative"), TEXT("false"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_GripCollisionType"), TEXT("InteractiveCollisionWithPhysics"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_GripDamping"), TEXT("200.000000"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_GripLateUpdateSetting"), TEXT("NotWhenCollidingOrDoubleGripping"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_GripMovementReplicationSetting"), TEXT("ForceClientSideMovement"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_GripStiffness"), TEXT("1500.000000"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_OptionalSnapToSocketName"), TEXT("None"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Grip a component"));
MetaData->SetValue(NewProp_WorldOffset, TEXT("NativeConst"), TEXT(""));
MetaData->SetValue(NewProp_ComponentToGrip, TEXT("EditInline"), TEXT("true"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GripControllerIsTracked()
{
struct GripMotionControllerComponent_eventGripControllerIsTracked_Parms
{
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GripControllerIsTracked"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x54020401, 65535, sizeof(GripMotionControllerComponent_eventGripControllerIsTracked_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventGripControllerIsTracked_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventGripControllerIsTracked_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventGripControllerIsTracked_Parms), sizeof(bool), true);
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("GripMotionController"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Whether or not this component had a valid tracked device this frame\n\nUse this instead of the normal IsTracked() for the motion controller which will not return the correct information.\nThis is messy but I have no access to the various private memebers of the motion controller."));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GripObject()
{
struct GripMotionControllerComponent_eventGripObject_Parms
{
UObject* ObjectToGrip;
FTransform WorldOffset;
bool bWorldOffsetIsRelative;
FName OptionalSnapToSocketName;
EGripCollisionType GripCollisionType;
EGripLateUpdateSettings GripLateUpdateSetting;
EGripMovementReplicationSettings GripMovementReplicationSetting;
float GripStiffness;
float GripDamping;
bool bIsSlotGrip;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GripObject"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04C20401, 65535, sizeof(GripMotionControllerComponent_eventGripObject_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventGripObject_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventGripObject_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventGripObject_Parms), sizeof(bool), true);
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bIsSlotGrip, GripMotionControllerComponent_eventGripObject_Parms);
UProperty* NewProp_bIsSlotGrip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bIsSlotGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bIsSlotGrip, GripMotionControllerComponent_eventGripObject_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bIsSlotGrip, GripMotionControllerComponent_eventGripObject_Parms), sizeof(bool), true);
UProperty* NewProp_GripDamping = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripDamping"), RF_Public|RF_Transient|RF_MarkAsNative) UFloatProperty(CPP_PROPERTY_BASE(GripDamping, GripMotionControllerComponent_eventGripObject_Parms), 0x0010000000000080);
UProperty* NewProp_GripStiffness = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripStiffness"), RF_Public|RF_Transient|RF_MarkAsNative) UFloatProperty(CPP_PROPERTY_BASE(GripStiffness, GripMotionControllerComponent_eventGripObject_Parms), 0x0010000000000080);
UProperty* NewProp_GripMovementReplicationSetting = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripMovementReplicationSetting"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(GripMovementReplicationSetting, GripMotionControllerComponent_eventGripObject_Parms), 0x0010000000000080, Z_Construct_UEnum_VRExpansionPlugin_EGripMovementReplicationSettings());
UProperty* NewProp_GripMovementReplicationSetting_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_GripMovementReplicationSetting, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_GripLateUpdateSetting = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripLateUpdateSetting"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(GripLateUpdateSetting, GripMotionControllerComponent_eventGripObject_Parms), 0x0010000000000080, Z_Construct_UEnum_VRExpansionPlugin_EGripLateUpdateSettings());
UProperty* NewProp_GripLateUpdateSetting_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_GripLateUpdateSetting, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_GripCollisionType = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GripCollisionType"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(GripCollisionType, GripMotionControllerComponent_eventGripObject_Parms), 0x0010000000000080, Z_Construct_UEnum_VRExpansionPlugin_EGripCollisionType());
UProperty* NewProp_GripCollisionType_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_GripCollisionType, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_OptionalSnapToSocketName = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalSnapToSocketName"), RF_Public|RF_Transient|RF_MarkAsNative) UNameProperty(CPP_PROPERTY_BASE(OptionalSnapToSocketName, GripMotionControllerComponent_eventGripObject_Parms), 0x0010000000000080);
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bWorldOffsetIsRelative, GripMotionControllerComponent_eventGripObject_Parms);
UProperty* NewProp_bWorldOffsetIsRelative = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bWorldOffsetIsRelative"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bWorldOffsetIsRelative, GripMotionControllerComponent_eventGripObject_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bWorldOffsetIsRelative, GripMotionControllerComponent_eventGripObject_Parms), sizeof(bool), true);
UProperty* NewProp_WorldOffset = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("WorldOffset"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(WorldOffset, GripMotionControllerComponent_eventGripObject_Parms), 0x0010000008000182, Z_Construct_UScriptStruct_FTransform());
UProperty* NewProp_ObjectToGrip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ObjectToGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ObjectToGrip, GripMotionControllerComponent_eventGripObject_Parms), 0x0010000000000080, Z_Construct_UClass_UObject_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_bIsSlotGrip"), TEXT("false"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_bWorldOffsetIsRelative"), TEXT("false"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_GripCollisionType"), TEXT("InteractiveCollisionWithPhysics"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_GripDamping"), TEXT("200.000000"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_GripLateUpdateSetting"), TEXT("NotWhenCollidingOrDoubleGripping"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_GripMovementReplicationSetting"), TEXT("ForceClientSideMovement"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_GripStiffness"), TEXT("1500.000000"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_OptionalSnapToSocketName"), TEXT("None"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Auto grip any uobject that is/root is a primitive component and has the VR Grip Interface\n these are stored in a Tarray that will prevent destruction of the object, you MUST ungrip an actor if you want to kill it\n The WorldOffset is the transform that it will remain away from the controller, if you use the world position of the actor then it will grab\n at the point of intersection.\n\n If WorldOffsetIsRelative is true then it will not convert the transform from world space but will instead use that offset directly.\n You could pass in a socket relative transform with this set for snapping or an empty transform to snap the object at its 0,0,0 point.\n\n If you declare a valid OptionSnapToSocketName then it will instead snap the actor to the relative offset\n location that the socket is to its parent actor."));
MetaData->SetValue(NewProp_WorldOffset, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_GripObjectByInterface()
{
struct GripMotionControllerComponent_eventGripObjectByInterface_Parms
{
UObject* ObjectToGrip;
FTransform WorldOffset;
bool bWorldOffsetIsRelative;
bool bIsSlotGrip;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("GripObjectByInterface"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04C20401, 65535, sizeof(GripMotionControllerComponent_eventGripObjectByInterface_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventGripObjectByInterface_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventGripObjectByInterface_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventGripObjectByInterface_Parms), sizeof(bool), true);
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bIsSlotGrip, GripMotionControllerComponent_eventGripObjectByInterface_Parms);
UProperty* NewProp_bIsSlotGrip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bIsSlotGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bIsSlotGrip, GripMotionControllerComponent_eventGripObjectByInterface_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bIsSlotGrip, GripMotionControllerComponent_eventGripObjectByInterface_Parms), sizeof(bool), true);
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bWorldOffsetIsRelative, GripMotionControllerComponent_eventGripObjectByInterface_Parms);
UProperty* NewProp_bWorldOffsetIsRelative = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bWorldOffsetIsRelative"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bWorldOffsetIsRelative, GripMotionControllerComponent_eventGripObjectByInterface_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bWorldOffsetIsRelative, GripMotionControllerComponent_eventGripObjectByInterface_Parms), sizeof(bool), true);
UProperty* NewProp_WorldOffset = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("WorldOffset"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(WorldOffset, GripMotionControllerComponent_eventGripObjectByInterface_Parms), 0x0010000008000182, Z_Construct_UScriptStruct_FTransform());
UProperty* NewProp_ObjectToGrip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ObjectToGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ObjectToGrip, GripMotionControllerComponent_eventGripObjectByInterface_Parms), 0x0010000000000080, Z_Construct_UClass_UObject_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_bIsSlotGrip"), TEXT("false"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_bWorldOffsetIsRelative"), TEXT("false"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Auto grip any uobject that is/root is a primitive component"));
MetaData->SetValue(NewProp_WorldOffset, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_HasGrippedObjects()
{
struct GripMotionControllerComponent_eventHasGrippedObjects_Parms
{
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("HasGrippedObjects"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x14020401, 65535, sizeof(GripMotionControllerComponent_eventHasGrippedObjects_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventHasGrippedObjects_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventHasGrippedObjects_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventHasGrippedObjects_Parms), sizeof(bool), true);
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Get if we have gripped objects, local or replicated"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_NotifyDrop()
{
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("NotifyDrop"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x00024CC0, 65535, sizeof(GripMotionControllerComponent_eventNotifyDrop_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bSimulate, GripMotionControllerComponent_eventNotifyDrop_Parms);
UProperty* NewProp_bSimulate = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bSimulate"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bSimulate, GripMotionControllerComponent_eventNotifyDrop_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bSimulate, GripMotionControllerComponent_eventNotifyDrop_Parms), sizeof(bool), true);
UProperty* NewProp_NewDrop = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("NewDrop"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(NewDrop, GripMotionControllerComponent_eventNotifyDrop_Parms), 0x0010008008000082, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(NewProp_NewDrop, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_OnRep_GrippedActors()
{
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("OnRep_GrippedActors"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x00020400, 65535);
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("TArray<FBPActorGripInformation> OriginalArrayState// Original array state is useless without full serialize, it just hold last delta"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_OnRep_LocallyGrippedActors()
{
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("OnRep_LocallyGrippedActors"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x00020400, 65535);
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_OnRep_ReplicatedControllerTransform()
{
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("OnRep_ReplicatedControllerTransform"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x00020400, 65535);
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_PostTeleportMoveGrippedActors()
{
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("PostTeleportMoveGrippedActors"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04020401, 65535);
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("After teleporting a pawn you NEED to call this, otherwise gripped objects will travel with a sweeped move and can get caught on geometry"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_RemoveSecondaryAttachmentPoint()
{
struct GripMotionControllerComponent_eventRemoveSecondaryAttachmentPoint_Parms
{
UObject* GrippedObjectToRemoveAttachment;
float LerpToTime;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("RemoveSecondaryAttachmentPoint"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04020401, 65535, sizeof(GripMotionControllerComponent_eventRemoveSecondaryAttachmentPoint_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventRemoveSecondaryAttachmentPoint_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventRemoveSecondaryAttachmentPoint_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventRemoveSecondaryAttachmentPoint_Parms), sizeof(bool), true);
UProperty* NewProp_LerpToTime = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("LerpToTime"), RF_Public|RF_Transient|RF_MarkAsNative) UFloatProperty(CPP_PROPERTY_BASE(LerpToTime, GripMotionControllerComponent_eventRemoveSecondaryAttachmentPoint_Parms), 0x0010000000000080);
UProperty* NewProp_GrippedObjectToRemoveAttachment = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GrippedObjectToRemoveAttachment"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(GrippedObjectToRemoveAttachment, GripMotionControllerComponent_eventRemoveSecondaryAttachmentPoint_Parms), 0x0010000000000080, Z_Construct_UClass_UObject_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_LerpToTime"), TEXT("0.250000"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Removes a secondary attachment point from a grip"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_Server_NotifyLocalGripAddedOrChanged()
{
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("Server_NotifyLocalGripAddedOrChanged"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x84220CC0, 65535, sizeof(GripMotionControllerComponent_eventServer_NotifyLocalGripAddedOrChanged_Parms));
UProperty* NewProp_newGrip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("newGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(newGrip, GripMotionControllerComponent_eventServer_NotifyLocalGripAddedOrChanged_Parms), 0x0010008008000082, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Notify the server that we locally gripped something"));
MetaData->SetValue(NewProp_newGrip, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_Server_NotifyLocalGripRemoved()
{
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("Server_NotifyLocalGripRemoved"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x80220CC0, 65535, sizeof(GripMotionControllerComponent_eventServer_NotifyLocalGripRemoved_Parms));
UProperty* NewProp_removeGrip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("removeGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(removeGrip, GripMotionControllerComponent_eventServer_NotifyLocalGripRemoved_Parms), 0x0010008008000082, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Notify change on relative position editing as well, make RPCS callable in blueprint\nNotify the server that we locally gripped something"));
MetaData->SetValue(NewProp_removeGrip, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_Server_NotifySecondaryAttachmentChanged()
{
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("Server_NotifySecondaryAttachmentChanged"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x80220CC0, 65535, sizeof(GripMotionControllerComponent_eventServer_NotifySecondaryAttachmentChanged_Parms));
UProperty* NewProp_SecondaryGripInfo = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("SecondaryGripInfo"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(SecondaryGripInfo, GripMotionControllerComponent_eventServer_NotifySecondaryAttachmentChanged_Parms), 0x0010008000000080, Z_Construct_UScriptStruct_FBPSecondaryGripInfo());
UProperty* NewProp_GrippedObject = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GrippedObject"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(GrippedObject, GripMotionControllerComponent_eventServer_NotifySecondaryAttachmentChanged_Parms), 0x0010000000000080, Z_Construct_UClass_UObject_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Notify the server that we changed some secondary attachment information"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_Server_SendControllerTransform()
{
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("Server_SendControllerTransform"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x80220C40, 65535, sizeof(GripMotionControllerComponent_eventServer_SendControllerTransform_Parms));
UProperty* NewProp_NewTransform = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("NewTransform"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(NewTransform, GripMotionControllerComponent_eventServer_SendControllerTransform_Parms), 0x0010000000000080, Z_Construct_UScriptStruct_FBPVRComponentPosRep());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("I'm sending it unreliable because it is being resent pretty often"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_SetGripAdditionTransform()
{
struct GripMotionControllerComponent_eventSetGripAdditionTransform_Parms
{
FBPActorGripInformation Grip;
EBPVRResultSwitch Result;
FTransform NewAdditionTransform;
bool bMakeGripRelative;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("SetGripAdditionTransform"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04C20401, 65535, sizeof(GripMotionControllerComponent_eventSetGripAdditionTransform_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bMakeGripRelative, GripMotionControllerComponent_eventSetGripAdditionTransform_Parms);
UProperty* NewProp_bMakeGripRelative = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bMakeGripRelative"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bMakeGripRelative, GripMotionControllerComponent_eventSetGripAdditionTransform_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bMakeGripRelative, GripMotionControllerComponent_eventSetGripAdditionTransform_Parms), sizeof(bool), true);
UProperty* NewProp_NewAdditionTransform = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("NewAdditionTransform"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(NewAdditionTransform, GripMotionControllerComponent_eventSetGripAdditionTransform_Parms), 0x0010000008000182, Z_Construct_UScriptStruct_FTransform());
UProperty* NewProp_Result = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Result"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(Result, GripMotionControllerComponent_eventSetGripAdditionTransform_Parms), 0x0010000000000180, Z_Construct_UEnum_VRExpansionPlugin_EBPVRResultSwitch());
UProperty* NewProp_Result_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_Result, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_Grip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Grip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(Grip, GripMotionControllerComponent_eventSetGripAdditionTransform_Parms), 0x0010008008000182, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_bMakeGripRelative"), TEXT("false"));
MetaData->SetValue(ReturnFunction, TEXT("ExpandEnumAsExecs"), TEXT("Result"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Set the addition transform of a grip, call server side if not a local grip"));
MetaData->SetValue(NewProp_NewAdditionTransform, TEXT("NativeConst"), TEXT(""));
MetaData->SetValue(NewProp_Grip, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_SetGripCollisionType()
{
struct GripMotionControllerComponent_eventSetGripCollisionType_Parms
{
FBPActorGripInformation Grip;
EBPVRResultSwitch Result;
EGripCollisionType NewGripCollisionType;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("SetGripCollisionType"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04420401, 65535, sizeof(GripMotionControllerComponent_eventSetGripCollisionType_Parms));
UProperty* NewProp_NewGripCollisionType = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("NewGripCollisionType"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(NewGripCollisionType, GripMotionControllerComponent_eventSetGripCollisionType_Parms), 0x0010000000000080, Z_Construct_UEnum_VRExpansionPlugin_EGripCollisionType());
UProperty* NewProp_NewGripCollisionType_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_NewGripCollisionType, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_Result = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Result"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(Result, GripMotionControllerComponent_eventSetGripCollisionType_Parms), 0x0010000000000180, Z_Construct_UEnum_VRExpansionPlugin_EBPVRResultSwitch());
UProperty* NewProp_Result_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_Result, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_Grip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Grip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(Grip, GripMotionControllerComponent_eventSetGripCollisionType_Parms), 0x0010008008000182, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_NewGripCollisionType"), TEXT("InteractiveCollisionWithPhysics"));
MetaData->SetValue(ReturnFunction, TEXT("ExpandEnumAsExecs"), TEXT("Result"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Set the Grip Collision Type of a grip, call server side if not a local grip"));
MetaData->SetValue(NewProp_Grip, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_SetGripLateUpdateSetting()
{
struct GripMotionControllerComponent_eventSetGripLateUpdateSetting_Parms
{
FBPActorGripInformation Grip;
EBPVRResultSwitch Result;
EGripLateUpdateSettings NewGripLateUpdateSetting;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("SetGripLateUpdateSetting"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04420401, 65535, sizeof(GripMotionControllerComponent_eventSetGripLateUpdateSetting_Parms));
UProperty* NewProp_NewGripLateUpdateSetting = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("NewGripLateUpdateSetting"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(NewGripLateUpdateSetting, GripMotionControllerComponent_eventSetGripLateUpdateSetting_Parms), 0x0010000000000080, Z_Construct_UEnum_VRExpansionPlugin_EGripLateUpdateSettings());
UProperty* NewProp_NewGripLateUpdateSetting_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_NewGripLateUpdateSetting, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_Result = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Result"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(Result, GripMotionControllerComponent_eventSetGripLateUpdateSetting_Parms), 0x0010000000000180, Z_Construct_UEnum_VRExpansionPlugin_EBPVRResultSwitch());
UProperty* NewProp_Result_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_Result, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_Grip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Grip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(Grip, GripMotionControllerComponent_eventSetGripLateUpdateSetting_Parms), 0x0010008008000182, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_NewGripLateUpdateSetting"), TEXT("NotWhenCollidingOrDoubleGripping"));
MetaData->SetValue(ReturnFunction, TEXT("ExpandEnumAsExecs"), TEXT("Result"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Set the late update setting of a grip, call server side if not a local grip"));
MetaData->SetValue(NewProp_Grip, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_SetGripRelativeTransform()
{
struct GripMotionControllerComponent_eventSetGripRelativeTransform_Parms
{
FBPActorGripInformation Grip;
EBPVRResultSwitch Result;
FTransform NewRelativeTransform;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("SetGripRelativeTransform"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04C20401, 65535, sizeof(GripMotionControllerComponent_eventSetGripRelativeTransform_Parms));
UProperty* NewProp_NewRelativeTransform = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("NewRelativeTransform"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(NewRelativeTransform, GripMotionControllerComponent_eventSetGripRelativeTransform_Parms), 0x0010000008000182, Z_Construct_UScriptStruct_FTransform());
UProperty* NewProp_Result = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Result"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(Result, GripMotionControllerComponent_eventSetGripRelativeTransform_Parms), 0x0010000000000180, Z_Construct_UEnum_VRExpansionPlugin_EBPVRResultSwitch());
UProperty* NewProp_Result_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_Result, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_Grip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Grip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(Grip, GripMotionControllerComponent_eventSetGripRelativeTransform_Parms), 0x0010008008000182, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ExpandEnumAsExecs"), TEXT("Result"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Set the relative transform of a grip, call server side if not a local grip"));
MetaData->SetValue(NewProp_NewRelativeTransform, TEXT("NativeConst"), TEXT(""));
MetaData->SetValue(NewProp_Grip, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_SetGripStiffnessAndDamping()
{
struct GripMotionControllerComponent_eventSetGripStiffnessAndDamping_Parms
{
FBPActorGripInformation Grip;
EBPVRResultSwitch Result;
float NewStiffness;
float NewDamping;
bool bAlsoSetAngularValues;
float OptionalAngularStiffness;
float OptionalAngularDamping;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("SetGripStiffnessAndDamping"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04420401, 65535, sizeof(GripMotionControllerComponent_eventSetGripStiffnessAndDamping_Parms));
UProperty* NewProp_OptionalAngularDamping = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalAngularDamping"), RF_Public|RF_Transient|RF_MarkAsNative) UFloatProperty(CPP_PROPERTY_BASE(OptionalAngularDamping, GripMotionControllerComponent_eventSetGripStiffnessAndDamping_Parms), 0x0010000000000080);
UProperty* NewProp_OptionalAngularStiffness = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("OptionalAngularStiffness"), RF_Public|RF_Transient|RF_MarkAsNative) UFloatProperty(CPP_PROPERTY_BASE(OptionalAngularStiffness, GripMotionControllerComponent_eventSetGripStiffnessAndDamping_Parms), 0x0010000000000080);
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bAlsoSetAngularValues, GripMotionControllerComponent_eventSetGripStiffnessAndDamping_Parms);
UProperty* NewProp_bAlsoSetAngularValues = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bAlsoSetAngularValues"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bAlsoSetAngularValues, GripMotionControllerComponent_eventSetGripStiffnessAndDamping_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bAlsoSetAngularValues, GripMotionControllerComponent_eventSetGripStiffnessAndDamping_Parms), sizeof(bool), true);
UProperty* NewProp_NewDamping = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("NewDamping"), RF_Public|RF_Transient|RF_MarkAsNative) UFloatProperty(CPP_PROPERTY_BASE(NewDamping, GripMotionControllerComponent_eventSetGripStiffnessAndDamping_Parms), 0x0010000000000080);
UProperty* NewProp_NewStiffness = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("NewStiffness"), RF_Public|RF_Transient|RF_MarkAsNative) UFloatProperty(CPP_PROPERTY_BASE(NewStiffness, GripMotionControllerComponent_eventSetGripStiffnessAndDamping_Parms), 0x0010000000000080);
UProperty* NewProp_Result = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Result"), RF_Public|RF_Transient|RF_MarkAsNative) UEnumProperty(CPP_PROPERTY_BASE(Result, GripMotionControllerComponent_eventSetGripStiffnessAndDamping_Parms), 0x0010000000000180, Z_Construct_UEnum_VRExpansionPlugin_EBPVRResultSwitch());
UProperty* NewProp_Result_Underlying = new(EC_InternalUseOnlyConstructor, NewProp_Result, TEXT("UnderlyingType"), RF_Public|RF_Transient|RF_MarkAsNative) UByteProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000000000);
UProperty* NewProp_Grip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Grip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(Grip, GripMotionControllerComponent_eventSetGripStiffnessAndDamping_Parms), 0x0010008008000182, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_bAlsoSetAngularValues"), TEXT("false"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_OptionalAngularDamping"), TEXT("0.000000"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_OptionalAngularStiffness"), TEXT("0.000000"));
MetaData->SetValue(ReturnFunction, TEXT("ExpandEnumAsExecs"), TEXT("Result"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Set the constraint stiffness and dampening of a grip, call server side if not a local grip"));
MetaData->SetValue(NewProp_Grip, TEXT("NativeConst"), TEXT(""));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_TeleportMoveGrip()
{
struct GripMotionControllerComponent_eventTeleportMoveGrip_Parms
{
FBPActorGripInformation Grip;
bool bIsPostTeleport;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("TeleportMoveGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04420401, 65535, sizeof(GripMotionControllerComponent_eventTeleportMoveGrip_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventTeleportMoveGrip_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventTeleportMoveGrip_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventTeleportMoveGrip_Parms), sizeof(bool), true);
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bIsPostTeleport, GripMotionControllerComponent_eventTeleportMoveGrip_Parms);
UProperty* NewProp_bIsPostTeleport = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("bIsPostTeleport"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bIsPostTeleport, GripMotionControllerComponent_eventTeleportMoveGrip_Parms), 0x0010000000000080, CPP_BOOL_PROPERTY_BITMASK(bIsPostTeleport, GripMotionControllerComponent_eventTeleportMoveGrip_Parms), sizeof(bool), true);
UProperty* NewProp_Grip = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("Grip"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(Grip, GripMotionControllerComponent_eventTeleportMoveGrip_Parms), 0x0010008000000180, Z_Construct_UScriptStruct_FBPActorGripInformation());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("CPP_Default_bIsPostTeleport"), TEXT("false"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_TeleportMoveGrippedActor()
{
struct GripMotionControllerComponent_eventTeleportMoveGrippedActor_Parms
{
AActor* GrippedActorToMove;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("TeleportMoveGrippedActor"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04020401, 65535, sizeof(GripMotionControllerComponent_eventTeleportMoveGrippedActor_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventTeleportMoveGrippedActor_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventTeleportMoveGrippedActor_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventTeleportMoveGrippedActor_Parms), sizeof(bool), true);
UProperty* NewProp_GrippedActorToMove = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("GrippedActorToMove"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(GrippedActorToMove, GripMotionControllerComponent_eventTeleportMoveGrippedActor_Parms), 0x0010000000000080, Z_Construct_UClass_AActor_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Move a single gripped item back into position ignoring collision in the way"));
#endif
}
return ReturnFunction;
}
UFunction* Z_Construct_UFunction_UGripMotionControllerComponent_TeleportMoveGrippedComponent()
{
struct GripMotionControllerComponent_eventTeleportMoveGrippedComponent_Parms
{
UPrimitiveComponent* ComponentToMove;
bool ReturnValue;
};
UObject* Outer = Z_Construct_UClass_UGripMotionControllerComponent();
static UFunction* ReturnFunction = nullptr;
if (!ReturnFunction)
{
ReturnFunction = new(EC_InternalUseOnlyConstructor, Outer, TEXT("TeleportMoveGrippedComponent"), RF_Public|RF_Transient|RF_MarkAsNative) UFunction(FObjectInitializer(), nullptr, (EFunctionFlags)0x04020401, 65535, sizeof(GripMotionControllerComponent_eventTeleportMoveGrippedComponent_Parms));
CPP_BOOL_PROPERTY_BITMASK_STRUCT(ReturnValue, GripMotionControllerComponent_eventTeleportMoveGrippedComponent_Parms);
UProperty* NewProp_ReturnValue = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ReturnValue"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(ReturnValue, GripMotionControllerComponent_eventTeleportMoveGrippedComponent_Parms), 0x0010000000000580, CPP_BOOL_PROPERTY_BITMASK(ReturnValue, GripMotionControllerComponent_eventTeleportMoveGrippedComponent_Parms), sizeof(bool), true);
UProperty* NewProp_ComponentToMove = new(EC_InternalUseOnlyConstructor, ReturnFunction, TEXT("ComponentToMove"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(CPP_PROPERTY_BASE(ComponentToMove, GripMotionControllerComponent_eventTeleportMoveGrippedComponent_Parms), 0x0010000000080080, Z_Construct_UClass_UPrimitiveComponent_NoRegister());
ReturnFunction->Bind();
ReturnFunction->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = ReturnFunction->GetOutermost()->GetMetaData();
MetaData->SetValue(ReturnFunction, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(ReturnFunction, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(ReturnFunction, TEXT("ToolTip"), TEXT("Move a single gripped item back into position ignoring collision in the way"));
MetaData->SetValue(NewProp_ComponentToMove, TEXT("EditInline"), TEXT("true"));
#endif
}
return ReturnFunction;
}
UClass* Z_Construct_UClass_UGripMotionControllerComponent_NoRegister()
{
return UGripMotionControllerComponent::StaticClass();
}
UClass* Z_Construct_UClass_UGripMotionControllerComponent()
{
static UClass* OuterClass = NULL;
if (!OuterClass)
{
Z_Construct_UClass_UMotionControllerComponent();
Z_Construct_UPackage__Script_VRExpansionPlugin();
OuterClass = UGripMotionControllerComponent::StaticClass();
if (!(OuterClass->ClassFlags & CLASS_Constructed))
{
UObjectForceRegistration(OuterClass);
OuterClass->ClassFlags |= (EClassFlags)0x20B00080u;
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_AddSecondaryAttachmentPoint());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_BP_HasGripAuthority());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_BP_HasGripMovementAuthority());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_Client_NotifyInvalidLocalGrip());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_ConvertToControllerRelativeTransform());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_ConvertToGripRelativeTransform());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_CreateGripRelativeAdditionTransform_BP());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_DropActor());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_DropComponent());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_DropGrip());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_DropObject());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_DropObjectByInterface());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GetGripByActor());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GetGripByComponent());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GetGripByObject());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GetGrippedActors());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GetGrippedComponents());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GetGrippedObjects());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GetIsComponentHeld());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GetIsHeld());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GetIsObjectHeld());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GetIsSecondaryAttachment());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GetPhysicsVelocities());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GripActor());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GripComponent());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GripControllerIsTracked());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GripObject());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_GripObjectByInterface());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_HasGrippedObjects());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_NotifyDrop());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_OnRep_GrippedActors());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_OnRep_LocallyGrippedActors());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_OnRep_ReplicatedControllerTransform());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_PostTeleportMoveGrippedActors());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_RemoveSecondaryAttachmentPoint());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_Server_NotifyLocalGripAddedOrChanged());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_Server_NotifyLocalGripRemoved());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_Server_NotifySecondaryAttachmentChanged());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_Server_SendControllerTransform());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_SetGripAdditionTransform());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_SetGripCollisionType());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_SetGripLateUpdateSetting());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_SetGripRelativeTransform());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_SetGripStiffnessAndDamping());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_TeleportMoveGrip());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_TeleportMoveGrippedActor());
OuterClass->LinkChild(Z_Construct_UFunction_UGripMotionControllerComponent_TeleportMoveGrippedComponent());
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bUseWithoutTracking, UGripMotionControllerComponent);
UProperty* NewProp_bUseWithoutTracking = new(EC_InternalUseOnlyConstructor, OuterClass, TEXT("bUseWithoutTracking"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bUseWithoutTracking, UGripMotionControllerComponent), 0x0010000000000005, CPP_BOOL_PROPERTY_BITMASK(bUseWithoutTracking, UGripMotionControllerComponent), sizeof(bool), true);
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bReplicateWithoutTracking, UGripMotionControllerComponent);
UProperty* NewProp_bReplicateWithoutTracking = new(EC_InternalUseOnlyConstructor, OuterClass, TEXT("bReplicateWithoutTracking"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bReplicateWithoutTracking, UGripMotionControllerComponent), 0x0010000000000025, CPP_BOOL_PROPERTY_BITMASK(bReplicateWithoutTracking, UGripMotionControllerComponent), sizeof(bool), true);
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bSmoothReplicatedMotion, UGripMotionControllerComponent);
UProperty* NewProp_bSmoothReplicatedMotion = new(EC_InternalUseOnlyConstructor, OuterClass, TEXT("bSmoothReplicatedMotion"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bSmoothReplicatedMotion, UGripMotionControllerComponent), 0x0010000000000025, CPP_BOOL_PROPERTY_BITMASK(bSmoothReplicatedMotion, UGripMotionControllerComponent), sizeof(bool), true);
UProperty* NewProp_ControllerNetUpdateRate = new(EC_InternalUseOnlyConstructor, OuterClass, TEXT("ControllerNetUpdateRate"), RF_Public|RF_Transient|RF_MarkAsNative) UFloatProperty(CPP_PROPERTY_BASE(ControllerNetUpdateRate, UGripMotionControllerComponent), 0x0010000000000025);
UProperty* NewProp_ReplicatedControllerTransform = new(EC_InternalUseOnlyConstructor, OuterClass, TEXT("ReplicatedControllerTransform"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(CPP_PROPERTY_BASE(ReplicatedControllerTransform, UGripMotionControllerComponent), 0x0010000100010021, Z_Construct_UScriptStruct_FBPVRComponentPosRep());
NewProp_ReplicatedControllerTransform->RepNotifyFunc = FName(TEXT("OnRep_ReplicatedControllerTransform"));
UProperty* NewProp_AdditionalLateUpdateComponents = new(EC_InternalUseOnlyConstructor, OuterClass, TEXT("AdditionalLateUpdateComponents"), RF_Public|RF_Transient|RF_MarkAsNative) UArrayProperty(CPP_PROPERTY_BASE(AdditionalLateUpdateComponents, UGripMotionControllerComponent), 0x001000800000000c);
UProperty* NewProp_AdditionalLateUpdateComponents_Inner = new(EC_InternalUseOnlyConstructor, NewProp_AdditionalLateUpdateComponents, TEXT("AdditionalLateUpdateComponents"), RF_Public|RF_Transient|RF_MarkAsNative) UObjectProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000000000080008, Z_Construct_UClass_UPrimitiveComponent_NoRegister());
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bAlwaysSendTickGrip, UGripMotionControllerComponent);
UProperty* NewProp_bAlwaysSendTickGrip = new(EC_InternalUseOnlyConstructor, OuterClass, TEXT("bAlwaysSendTickGrip"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bAlwaysSendTickGrip, UGripMotionControllerComponent), 0x0010000000000005, CPP_BOOL_PROPERTY_BITMASK(bAlwaysSendTickGrip, UGripMotionControllerComponent), sizeof(bool), true);
UProperty* NewProp_LocallyGrippedActors = new(EC_InternalUseOnlyConstructor, OuterClass, TEXT("LocallyGrippedActors"), RF_Public|RF_Transient|RF_MarkAsNative) UArrayProperty(CPP_PROPERTY_BASE(LocallyGrippedActors, UGripMotionControllerComponent), 0x0010008100000034);
NewProp_LocallyGrippedActors->RepNotifyFunc = FName(TEXT("OnRep_LocallyGrippedActors"));
UProperty* NewProp_LocallyGrippedActors_Inner = new(EC_InternalUseOnlyConstructor, NewProp_LocallyGrippedActors, TEXT("LocallyGrippedActors"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000008000000000, Z_Construct_UScriptStruct_FBPActorGripInformation());
UProperty* NewProp_GrippedActors = new(EC_InternalUseOnlyConstructor, OuterClass, TEXT("GrippedActors"), RF_Public|RF_Transient|RF_MarkAsNative) UArrayProperty(CPP_PROPERTY_BASE(GrippedActors, UGripMotionControllerComponent), 0x0010008100000034);
NewProp_GrippedActors->RepNotifyFunc = FName(TEXT("OnRep_GrippedActors"));
UProperty* NewProp_GrippedActors_Inner = new(EC_InternalUseOnlyConstructor, NewProp_GrippedActors, TEXT("GrippedActors"), RF_Public|RF_Transient|RF_MarkAsNative) UStructProperty(FObjectInitializer(), EC_CppProperty, 0, 0x0000008000000000, Z_Construct_UScriptStruct_FBPActorGripInformation());
CPP_BOOL_PROPERTY_BITMASK_STRUCT(bOffsetByHMD, UGripMotionControllerComponent);
UProperty* NewProp_bOffsetByHMD = new(EC_InternalUseOnlyConstructor, OuterClass, TEXT("bOffsetByHMD"), RF_Public|RF_Transient|RF_MarkAsNative) UBoolProperty(FObjectInitializer(), EC_CppProperty, CPP_BOOL_PROPERTY_OFFSET(bOffsetByHMD, UGripMotionControllerComponent), 0x0010000000000005, CPP_BOOL_PROPERTY_BITMASK(bOffsetByHMD, UGripMotionControllerComponent), sizeof(bool), true);
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_AddSecondaryAttachmentPoint(), "AddSecondaryAttachmentPoint"); // 2119732178
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_BP_HasGripAuthority(), "BP_HasGripAuthority"); // 3463834309
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_BP_HasGripMovementAuthority(), "BP_HasGripMovementAuthority"); // 1411399899
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_Client_NotifyInvalidLocalGrip(), "Client_NotifyInvalidLocalGrip"); // 302537624
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_ConvertToControllerRelativeTransform(), "ConvertToControllerRelativeTransform"); // 430905144
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_ConvertToGripRelativeTransform(), "ConvertToGripRelativeTransform"); // 121541426
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_CreateGripRelativeAdditionTransform_BP(), "CreateGripRelativeAdditionTransform_BP"); // 2687983113
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_DropActor(), "DropActor"); // 3764909082
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_DropComponent(), "DropComponent"); // 1058990019
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_DropGrip(), "DropGrip"); // 2690232855
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_DropObject(), "DropObject"); // 3786976356
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_DropObjectByInterface(), "DropObjectByInterface"); // 1746068456
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GetGripByActor(), "GetGripByActor"); // 1439606889
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GetGripByComponent(), "GetGripByComponent"); // 2496761103
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GetGripByObject(), "GetGripByObject"); // 4063925848
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GetGrippedActors(), "GetGrippedActors"); // 2212887122
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GetGrippedComponents(), "GetGrippedComponents"); // 3035474630
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GetGrippedObjects(), "GetGrippedObjects"); // 522460720
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GetIsComponentHeld(), "GetIsComponentHeld"); // 547854404
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GetIsHeld(), "GetIsHeld"); // 914904810
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GetIsObjectHeld(), "GetIsObjectHeld"); // 2218086914
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GetIsSecondaryAttachment(), "GetIsSecondaryAttachment"); // 3992191653
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GetPhysicsVelocities(), "GetPhysicsVelocities"); // 3211348960
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GripActor(), "GripActor"); // 984752343
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GripComponent(), "GripComponent"); // 1772397702
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GripControllerIsTracked(), "GripControllerIsTracked"); // 2537497338
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GripObject(), "GripObject"); // 1145589451
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_GripObjectByInterface(), "GripObjectByInterface"); // 2916376796
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_HasGrippedObjects(), "HasGrippedObjects"); // 3044503948
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_NotifyDrop(), "NotifyDrop"); // 3501691924
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_OnRep_GrippedActors(), "OnRep_GrippedActors"); // 3118379370
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_OnRep_LocallyGrippedActors(), "OnRep_LocallyGrippedActors"); // 3564846030
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_OnRep_ReplicatedControllerTransform(), "OnRep_ReplicatedControllerTransform"); // 1160786787
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_PostTeleportMoveGrippedActors(), "PostTeleportMoveGrippedActors"); // 2158048609
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_RemoveSecondaryAttachmentPoint(), "RemoveSecondaryAttachmentPoint"); // 327996581
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_Server_NotifyLocalGripAddedOrChanged(), "Server_NotifyLocalGripAddedOrChanged"); // 1643476904
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_Server_NotifyLocalGripRemoved(), "Server_NotifyLocalGripRemoved"); // 89982430
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_Server_NotifySecondaryAttachmentChanged(), "Server_NotifySecondaryAttachmentChanged"); // 4003533083
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_Server_SendControllerTransform(), "Server_SendControllerTransform"); // 2508262977
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_SetGripAdditionTransform(), "SetGripAdditionTransform"); // 4009033099
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_SetGripCollisionType(), "SetGripCollisionType"); // 2129967905
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_SetGripLateUpdateSetting(), "SetGripLateUpdateSetting"); // 1701021301
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_SetGripRelativeTransform(), "SetGripRelativeTransform"); // 3985305929
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_SetGripStiffnessAndDamping(), "SetGripStiffnessAndDamping"); // 1454405387
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_TeleportMoveGrip(), "TeleportMoveGrip"); // 190280776
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_TeleportMoveGrippedActor(), "TeleportMoveGrippedActor"); // 3161976304
OuterClass->AddFunctionToFunctionMapWithOverriddenName(Z_Construct_UFunction_UGripMotionControllerComponent_TeleportMoveGrippedComponent(), "TeleportMoveGrippedComponent"); // 1077632328
static TCppClassTypeInfo<TCppClassTypeTraits<UGripMotionControllerComponent> > StaticCppClassTypeInfo;
OuterClass->SetCppTypeInfo(&StaticCppClassTypeInfo);
OuterClass->StaticLink();
#if WITH_METADATA
UMetaData* MetaData = OuterClass->GetOutermost()->GetMetaData();
MetaData->SetValue(OuterClass, TEXT("BlueprintSpawnableComponent"), TEXT(""));
MetaData->SetValue(OuterClass, TEXT("BlueprintType"), TEXT("true"));
MetaData->SetValue(OuterClass, TEXT("ClassGroupNames"), TEXT("MotionController"));
MetaData->SetValue(OuterClass, TEXT("HideCategories"), TEXT("Mobility Trigger"));
MetaData->SetValue(OuterClass, TEXT("IncludePath"), TEXT("GripMotionControllerComponent.h"));
MetaData->SetValue(OuterClass, TEXT("IsBlueprintBase"), TEXT("true"));
MetaData->SetValue(OuterClass, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(NewProp_bUseWithoutTracking, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(NewProp_bUseWithoutTracking, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(NewProp_bUseWithoutTracking, TEXT("ToolTip"), TEXT("This is for testing, setting it to true allows you to test grip with a non VR enabled pawn"));
MetaData->SetValue(NewProp_bReplicateWithoutTracking, TEXT("Category"), TEXT("GripMotionController|Networking"));
MetaData->SetValue(NewProp_bReplicateWithoutTracking, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(NewProp_bReplicateWithoutTracking, TEXT("ToolTip"), TEXT("Whether to replicate even if no tracking (FPS or test characters)"));
MetaData->SetValue(NewProp_bSmoothReplicatedMotion, TEXT("Category"), TEXT("GripMotionController|Networking"));
MetaData->SetValue(NewProp_bSmoothReplicatedMotion, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(NewProp_bSmoothReplicatedMotion, TEXT("ToolTip"), TEXT("Whether to smooth (lerp) between ticks for the replicated motion, DOES NOTHING if update rate is larger than FPS!"));
MetaData->SetValue(NewProp_ControllerNetUpdateRate, TEXT("Category"), TEXT("GripMotionController|Networking"));
MetaData->SetValue(NewProp_ControllerNetUpdateRate, TEXT("ClampMin"), TEXT("0"));
MetaData->SetValue(NewProp_ControllerNetUpdateRate, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(NewProp_ControllerNetUpdateRate, TEXT("ToolTip"), TEXT("Rate to update the position to the server, 100htz is default (same as replication rate, should also hit every tick)."));
MetaData->SetValue(NewProp_ControllerNetUpdateRate, TEXT("UIMin"), TEXT("0"));
MetaData->SetValue(NewProp_ReplicatedControllerTransform, TEXT("Category"), TEXT("GripMotionController|Networking"));
MetaData->SetValue(NewProp_ReplicatedControllerTransform, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(NewProp_ReplicatedControllerTransform, TEXT("ToolTip"), TEXT("Movement Replication\nActor needs to be replicated for this to work"));
MetaData->SetValue(NewProp_AdditionalLateUpdateComponents, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(NewProp_AdditionalLateUpdateComponents, TEXT("EditInline"), TEXT("true"));
MetaData->SetValue(NewProp_AdditionalLateUpdateComponents, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(NewProp_bAlwaysSendTickGrip, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(NewProp_bAlwaysSendTickGrip, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(NewProp_bAlwaysSendTickGrip, TEXT("ToolTip"), TEXT("Enable this to send the TickGrip event every tick even for non custom grip types - has a slight performance hit"));
MetaData->SetValue(NewProp_LocallyGrippedActors, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(NewProp_LocallyGrippedActors, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(NewProp_GrippedActors, TEXT("Category"), TEXT("VRGrip"));
MetaData->SetValue(NewProp_GrippedActors, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(NewProp_bOffsetByHMD, TEXT("Category"), TEXT("MotionController"));
MetaData->SetValue(NewProp_bOffsetByHMD, TEXT("ModuleRelativePath"), TEXT("Public/GripMotionControllerComponent.h"));
MetaData->SetValue(NewProp_bOffsetByHMD, TEXT("ToolTip"), TEXT("If true will subtract the HMD's location from the position, useful for if the actors base is set to the HMD location always (simple character)."));
#endif
}
}
check(OuterClass->GetClass());
return OuterClass;
}
IMPLEMENT_CLASS(UGripMotionControllerComponent, 3480728336);
static FCompiledInDefer Z_CompiledInDefer_UClass_UGripMotionControllerComponent(Z_Construct_UClass_UGripMotionControllerComponent, &UGripMotionControllerComponent::StaticClass, TEXT("/Script/VRExpansionPlugin"), TEXT("UGripMotionControllerComponent"), false, nullptr, nullptr, nullptr);
DEFINE_VTABLE_PTR_HELPER_CTOR(UGripMotionControllerComponent);
PRAGMA_ENABLE_DEPRECATION_WARNINGS
#ifdef _MSC_VER
#pragma warning (pop)
#endif
PRAGMA_ENABLE_OPTIMIZATION
| [
"cogney.maxime@gmail.com"
] | cogney.maxime@gmail.com |
17ef36a6d0acee0a8ca3889b6acb5d689172a13e | bbcda48854d6890ad029d5973e011d4784d248d2 | /trunk/win/Source/Includes/Novodex/Foundation/NxPool.h | 7f2f2faedb3fac390bee524e5c9e3efc970fd4ae | [
"MIT",
"curl",
"LGPL-2.1-or-later",
"BSD-3-Clause",
"BSL-1.0",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LGPL-2.1-only",
"Zlib",
"LicenseRef-scancode-unknown",
"LicenseRef-scancode-unknown-license-reference",
"MS-LPL"
] | permissive | dyzmapl/BumpTop | 9c396f876e6a9ace1099b3b32e45612a388943ff | 1329ea41411c7368516b942d19add694af3d602f | refs/heads/master | 2020-12-20T22:42:55.100473 | 2020-01-25T21:00:08 | 2020-01-25T21:00:08 | 236,229,087 | 0 | 0 | Apache-2.0 | 2020-01-25T20:58:59 | 2020-01-25T20:58:58 | null | UTF-8 | C++ | false | false | 3,241 | h | #ifndef NXPOOL_H
#define NXPOOL_H
/*----------------------------------------------------------------------------*\
|
| NovodeX Technology
|
| www.novodex.com
|
\*----------------------------------------------------------------------------*/
#include "NxArray.h"
template<class Element, int ElementSize>
class NxPool
{
typedef NxArraySDK<Element*> ElementPtrArray;
public:
NxPool(NxU32 initial, NxU32 increment = 0)
{
mIncrement = increment;
mCount = 0;
mCapacity = 0;
allocSlab(initial);
}
~NxPool()
{
for(NxU32 i=0;i<mSlabArray.size();i++)
nxFoundationSDKAllocator->free(mSlabArray[i]);
}
Element *get()
{
Element *element = 0;
if(mCount==mCapacity && mIncrement)
allocSlab(mIncrement);
if(mCount < mCapacity)
{
element = mContents[mCount];
mIDToContents[element->hwid] = mCount++;
}
printf("Acquired %lp\n",element);
return element;
}
void put(Element *element)
{
printf("Releasing %lp\n",element);
if(mIDToContents[element->hwid]!=0xffffffff)
{
NxU32 elementPos = mIDToContents[element->hwid];
/* swap the released element with the last element & decrement content counter */
Element *replacement = mContents[--mCount];
mContents[mCount] = element;
mContents[elementPos] = replacement;
/* update the ID to contents arrays */
mIDToContents[replacement->hwid] = elementPos;
mIDToContents[element->hwid] = 0xffffffff;
}
}
const NxArray<Element *> contents()
{
return mContents;
}
NxU32 count()
{
return mCount;
}
private:
void allocSlab(NxU32 count)
{
char *mem = (char *)
nxFoundationSDKAllocator->malloc(count * ElementSize);
if(!mem)
return;
mSlabArray.pushBack(mem);
mContents.reserve(mCapacity+count);
mIDToContents.reserve(mCapacity+count);
for(NxU32 i=0;i<count;i++)
{
Element *e = (Element *)(mem + i * ElementSize);
e->hwid = mCapacity+i;
mIDToContents.pushBack(0xffffffff);
mContents.pushBack(e);
}
mCapacity+=count;
}
NxU32 mIncrement; /* resize quantum */
NxU32 mCapacity; /* current size */
NxU32 mCount; /* current number of elements */
NxArraySDK<char *> mSlabArray; /* array of allocated slabs */
ElementPtrArray mContents; /* array of elements. The first mCount are in use,
the rest are free for allocation */
NxArraySDK<NxU32> mIDToContents; /* maps IDs to the mContents array in order to get O(1) removal.
Only required for things actually allocated, so use 0xffffffff
for 'not allocated' and thereby catch double-deletion. */
};
#endif
| [
"anandx@google.com"
] | anandx@google.com |
b77de6ce643236b409373fdd87a49d7a2bceb0cd | c5a19f699823b952afb37095e164e4fee3a7b1f1 | /grid.h | a149414ce1892a59182429b592d85e0301b22664 | [] | no_license | alen0216056/Image_search_by_sketch | 9885fd8162fdbb15bdea45a2e5cafb55b4b96835 | 6f9e6695d36ae50c7741a735b7e248383f01891a | refs/heads/master | 2021-01-10T14:24:35.105181 | 2016-05-02T05:53:49 | 2016-05-02T05:53:49 | 54,110,090 | 0 | 2 | null | 2016-03-17T11:54:33 | 2016-03-17T10:41:19 | C++ | UTF-8 | C++ | false | false | 6,117 | h | #ifndef __GRID_H__
#define __GRID_H__
#include <queue>
#include <cmath>
#include <vector>
using namespace std;
template<class T>
class grid
{
private:
int w,h,size;
vector<T> map;
public:
grid(int); //given size(default square)
grid(int,int); //given width & height
grid(const vector<T>&); //given vector
int width() const;
int height() const;
void set(int,T);
void set(int,int,T);
T get(int) const;
T get(int,int) const;
T& operator[](int);
T sum() const;
int findNearest(int,int,int) const;
bool operator<(const grid&) const;
bool operator==(const grid&) const;
bool legal(int,int) const;
bool border(int,int) const;
grid<T> mul(const grid<T>&) const;
grid<T> operator+(const grid<T>&) const;
grid<T> operator*(int) const;
grid<T> operator*(double) const;
T operator*(const grid<T>&) const;
void max(const grid<T>&);
void propagate(int, T[]);
void closedFill();
void save(ostream&) const;
};
template<class T>
ostream& operator<<(ostream &os, const grid<T> &rhs);
template<class T>
grid<T>::grid(int s) : size(s)
{
map = vector<T>(size, 0);
w = round(sqrt(size));
h = size / w;
}
template<class T>
grid<T>::grid(int height, int width) : w(width), h(height)
{
size = w*h;
map = vector<T>(size, 0);
}
template<class T>
grid<T>::grid(const vector<T>& vec)
{
map = vec;
size = vec.size();
w = sqrt(size);
h = size / w;
}
template<class T>
int grid<T>::width() const
{
return w;
}
template<class T>
int grid<T>::height() const
{
return h;
}
template<class T>
void grid<T>::set(int idx, T val)
{
map[idx] = val;
}
template<class T>
void grid<T>::set(int i, int j, T val)
{
map[i*w + j] = val;
}
template<class T>
T grid<T>::get(int idx) const
{
return map[idx];
}
template<class T>
T grid<T>::get(int i, int j) const
{
return map[i*w + j];
}
template<class T>
T& grid<T>::operator[](int idx)
{
return map[idx];
}
template<class T>
T grid<T>::sum() const
{
T res = 0;
for (int i = 0; i < size; i++)
res += map[i];
return res;
}
template<class T>
int grid<T>::findNearest(int x, int y, int limit) const
{
int res = limit + 1;
for (int nx = x - limit; nx <= x + limit; nx++)
{
int rem = limit - abs(nx - x);
for (int ny = y - rem; ny <= y + rem; ny++)
if (legal(nx, ny) && get(nx, ny) == 1)
res = min(res, abs(nx - x) + abs(ny - y));
}
return res;
}
template<class T>
bool grid<T>::operator<(const grid& rhs) const
{
if (w != rhs.w || h != rhs.h)
return false;
for (int i = 0; i < w; i++)
for (int j = 0; j < h; j++)
if (get(i, j) != rhs.get(i, j))
return get(i, j) < rhs.get(i, j);
return false;
}
template<class T>
bool grid<T>::operator==(const grid& rhs) const
{
if ( w != rhs.w || h != rhs.h )
return false;
for (int i = 0; i < w; i++)
for (int j = 0; j < h; j++)
if( get(i,j) != rhs.get(i,j) )
return false;
return true;
}
template<class T>
bool grid<T>::legal(int i, int j) const
{
return i < h && j < w && i >= 0 && j >= 0;
}
template<class T>
bool grid<T>::border(int i, int j) const
{
return i == 0 || i == h - 1 || j == 0 || j == w - 1;
}
template<class T>
grid<T> grid<T>::mul(const grid<T>& rhs) const
{
grid<T> res(map.size());
for (int i = 0; i < map.size(); i++)
res[i] = map[i] * rhs.get(i);
return res;
}
template<class T>
grid<T> grid<T>::operator+(const grid<T>& rhs) const
{
grid<T> res(map.size());
for (int i = 0; i < map.size(); i++)
res[i] = map[i] + rhs.get(i);
return res;
}
template<class T>
grid<T> grid<T>::operator*(int fac) const
{
grid<T> res(map.size());
for (int i = 0; i < map.size(); i++)
res[i] = map[i] * fac;
return res;
}
template<class T>
grid<T> grid<T>::operator*(double fac) const
{
grid<T> res(map.size());
for (int i = 0; i < map.size(); i++)
res[i] = map[i] * fac;
return res;
}
template<class T>
T grid<T>::operator*(const grid<T>& rhs) const
{
T res = 0;
for (int i = 0; i < size; i++)
res += map[i] * rhs.get(i);
return res;
}
template<class T>
void grid<T>::max(const grid<T>& rhs)
{
for (int i = 0; i < size; i++)
{
if (map[i] <= 0 && rhs.get(i) <= 0)
map[i] = map[i]<rhs.get(i)? map[i] : rhs.get(i);
else
map[i] = map[i]>rhs.get(i)? map[i] : rhs.get(i);
}
}
template<class T>
void grid<T>::propagate(int depth, T decay[])
{
grid<T> tmp = *this;
for (int i = 0; i < size; i++)
{
int cx = i / w;
int cy = i%w;
for (int x = cx - depth; x <= cx + depth; x++)
{
int rem = depth - abs(x - cx);
for (int y = cy - rem; y <= cy + rem; y++)
{
if (legal(x, y) && (tmp.get(x, y) < decay[abs(x - cx) + abs(y - cy)] * map[i]))
tmp.set(x, y, decay[abs(x - cx) + abs(y - cy)] * map[i]);
}
}
}
for (int i = 0; i < size; i++)
set(i, tmp[i]);
}
template<class T>
void grid<T>::closedFill()
{
const static int neiborX[] = { 1, -1, 0, 0 };
const static int neiborY[] = { 0, 0, 1, -1 };
vector<vector<bool>> visited(h, vector<bool>(w, false));
for (int i = 0; i < h; i++)
for (int j = 0; j < w; j++)
{
if (visited[i][j] || get(i,j) != 0)
continue;
bool needFill = !border(i,j);
T neiMin = 1;
queue<int> Q;
queue<int> fill;
fill.push(i*w+j);
Q.push(i*w + j);
while (!Q.empty())
{
int top = Q.front();
Q.pop();
visited[top/w][top%w] = true;
for (int k = 0; k < 4; k++)
{
int nx = top/w + neiborX[k], ny = top%w + neiborY[k];
if (legal(nx, ny))
{
if (get(nx,ny) != 0)
neiMin = min(neiMin,get(nx,ny));
else if (!visited[nx][ny])
{
Q.push(nx*w + ny);
if (needFill &= !border(nx, ny))
fill.push(nx*w + ny);
}
}
}
}
needFill &= neiMin >= 0.5;
if (needFill)
{
while (!fill.empty())
{
map[fill.front()] = 1;
fill.pop();
}
}
}
}
template<class T>
void grid<T>::save (ostream &file) const
{
for (int i = 0; i < size; i++)
file << setprecision(3) << get(i) << " ";
}
template<class T>
ostream& operator<< (ostream &out, const grid<T>& rhs)
{
for (int i = 0; i < rhs.height(); i++)
{
for (int j = 0; j < rhs.width(); j++)
out << setprecision(3) << rhs.get(i, j) << ",";
out << endl;
}
out << endl;
return out;
}
#endif | [
"abc831209@gmail.com"
] | abc831209@gmail.com |
b133661c648cc74de411e1bf9d94b0676e8741af | 352d65dab0cb0e59146d77dfb50f804c1378b553 | /COGSConverter/libs/include/Utils/IntrinsicParams.h | 25f4b2559cce9b7ba0624ddae974b574b07a82a6 | [] | no_license | gajdosech2/scan-filtering | fb760e552b5620627b16812f656df9b381304a39 | 5c15cb089ccb27e6e3a736d4f4848c6020fb35c8 | refs/heads/master | 2023-04-22T11:31:05.962532 | 2021-05-02T09:43:47 | 2021-05-02T09:43:47 | 206,130,685 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,226 | h | /*
Copyright (C) Skeletex Research, s.r.o. - All Rights Reserved
Unauthorized copying of this file, via any medium is strictly prohibited
Proprietary and confidential
*/
#ifndef UTILS_INTRINSIC_PARAMS_H
#define UTILS_INTRINSIC_PARAMS_H
#include <string>
#include <glm/common.hpp>
#include <glm/trigonometric.hpp>
#include <Utils/API.h>
#include <Utils/SerializableJson.h>
namespace utils
{
/*!
\brief Holds camera intrinsic projection parameters.
More information about intrinsic camera parameters can be found on Wikipedia
https://en.wikipedia.org/wiki/Camera_resectioning and distortion coefficients
at https://docs.opencv.org/2.4/doc/tutorials/calib3d/camera_calibration/camera_calibration.html
*/
struct UTILS_API IntrinsicParams : public utils::SerializableJson
{
//! Focal length in terms of pixels.
float fx{ 0.0f }, fy{ 0.0f };
//! Principal point coordinates. Ideally in the center of the image.
float cx{ 0.0f }, cy{ 0.0f };
IntrinsicParams() = default;
IntrinsicParams(float t_fx, float t_fy, float t_cx, float t_cy)
: fx(t_fx), fy(t_fy), cx(t_cx), cy(t_cy) {}
//! Calculates horizontal field of view. In radians.
float GetFovX() const
{
return 2.0f * glm::atan(cx / fx);
}
//! Calculates vertical field of view. In radians.
float GetFovY() const
{
return 2.0f * glm::atan(cy / fy);
}
//! Fill data of this to json node.
virtual void AddToJsonNode(nlohmann::json &node) const override;
//! \brief Read json node and initialize this.
//! \throws nlohmann::json::exception when required keys are missing.
virtual bool ReadFromJsonNode(const nlohmann::json &node) override;
};
//! Returns intrinsic cx, cy parameters for defined projection depth and field of view angles.
inline glm::vec2 GetPrincipalPoint(float focal_length, float fovx, float fovy)
{
return glm::vec2(
focal_length * glm::tan(0.5f * fovx),
focal_length * glm::tan(0.5f * fovy)
);
}
//! Calculates intrinsic projection parameters from resolution and field of view angles.
inline IntrinsicParams GetIntrinsicParamsFromResolution(const glm::uvec2 &resolution, float fovx, float fovy)
{
const auto cx = 0.5f * static_cast<float>(resolution.x);
const auto cy = 0.5f * static_cast<float>(resolution.y);
const auto fx = cx / glm::tan(0.5f * fovx);
const auto fy = cy / glm::tan(0.5f * fovy);
return IntrinsicParams(fx, fy, cx, cy);
}
//! Calculates intrinsic projection parameters from projection depth and field of view angles.
inline IntrinsicParams GetIntrinsicParamsFromDepth(float focal_length, float fovx, float fovy)
{
const auto c = GetPrincipalPoint(focal_length, fovx, fovy);
const auto fx = c.x / glm::tan(0.5f * fovx);
const auto fy = c.y / glm::tan(0.5f * fovy);
return IntrinsicParams(fx, fy, c.x, c.y);
}
//! Compare equality of two parameter structures.
UTILS_API bool operator==(const IntrinsicParams &p1, const IntrinsicParams &p2);
//! Compare unequality of two parameter structures.
UTILS_API bool operator!=(const IntrinsicParams &p1, const IntrinsicParams &p2);
}
#endif /* !UTILS_INTRINSIC_PARAMS_H */ | [
"l.gajdosech@gmail.com"
] | l.gajdosech@gmail.com |
db3d3a236eb40c65567adfefeb1ad3f64b3b9a8b | bb7645bab64acc5bc93429a6cdf43e1638237980 | /Official Windows Platform Sample/Windows 8.1 desktop samples/99647-Windows 8.1 desktop samples/Extract app bundle contents sample/C++/ExtractBundle.cpp | 6efa268fef73fb20f485a5e38aa6e70522c338a2 | [
"MIT"
] | permissive | Violet26/msdn-code-gallery-microsoft | 3b1d9cfb494dc06b0bd3d509b6b4762eae2e2312 | df0f5129fa839a6de8f0f7f7397a8b290c60ffbb | refs/heads/master | 2020-12-02T02:00:48.716941 | 2020-01-05T22:39:02 | 2020-01-05T22:39:02 | 230,851,047 | 1 | 0 | MIT | 2019-12-30T05:06:00 | 2019-12-30T05:05:59 | null | UTF-8 | C++ | false | false | 11,738 | cpp | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright (c) Microsoft Corporation. All rights reserved
// This is a simple application which uses the Appx Bundle APIs to read the
// contents of an Appx bundle, and extract its contents to a folder on disk.
#include <stdio.h>
#include <windows.h>
#include <strsafe.h>
#include <shlwapi.h>
#include <AppxPackaging.h> // For Appx Bundle APIs
#include "ExtractBundle.h"
// Types of footprint files in a bundle
const int FootprintFilesCount = 3;
const APPX_BUNDLE_FOOTPRINT_FILE_TYPE FootprintFilesType[FootprintFilesCount] = {
APPX_BUNDLE_FOOTPRINT_FILE_TYPE_MANIFEST,
APPX_BUNDLE_FOOTPRINT_FILE_TYPE_BLOCKMAP,
APPX_BUNDLE_FOOTPRINT_FILE_TYPE_SIGNATURE
};
const LPCWSTR FootprintFilesName[FootprintFilesCount] = {
L"manifest",
L"block map",
L"digital signature"
};
//
// Function to create a writable IStream over a file with the specified name
// under the specified path. This function will also create intermediate
// subdirectories if necessary. For simplicity, file names including path are
// assumed to be 200 characters or less. A real application should be able to
// handle longer names and allocate the necessary buffer dynamically.
//
// Parameters:
// path - Path of the folder containing the file to be opened. This should NOT
// end with a slash ('\') character.
// fileName - Name, not including path, of the file to be opened
// stream - Output parameter pointing to the created instance of IStream over
// the specified file when this function succeeds.
//
HRESULT GetOutputStream(
_In_ LPCWSTR path,
_In_ LPCWSTR fileName,
_Outptr_ IStream** stream)
{
HRESULT hr = S_OK;
const int MaxFileNameLength = 200;
WCHAR fullFileName[MaxFileNameLength + 1];
// Create full file name by concatenating path and fileName
hr = StringCchCopyW(fullFileName, MaxFileNameLength, path);
if (SUCCEEDED(hr))
{
hr = StringCchCat(fullFileName, MaxFileNameLength, L"\\");
}
if (SUCCEEDED(hr))
{
hr = StringCchCat(fullFileName, MaxFileNameLength, fileName);
}
// Search through fullFileName for the '\' character which denotes
// subdirectory and create each subdirectory in order of depth.
for (int i = 0; SUCCEEDED(hr) && (i < MaxFileNameLength); i++)
{
if (fullFileName[i] == L'\0')
{
break;
}
else if (fullFileName[i] == L'\\')
{
// Temporarily set string to terminate at the '\' character
// to obtain name of the subdirectory to create
fullFileName[i] = L'\0';
if (!CreateDirectory(fullFileName, NULL))
{
DWORD lastError = GetLastError();
// It is normal for CreateDirectory to fail if the subdirectory
// already exists. Other errors should not be ignored.
if (lastError != ERROR_ALREADY_EXISTS)
{
hr = HRESULT_FROM_WIN32(lastError);
}
}
// Restore original string
fullFileName[i] = L'\\';
}
}
// Create stream for writing the file
if (SUCCEEDED(hr))
{
hr = SHCreateStreamOnFileEx(
fullFileName,
STGM_CREATE | STGM_WRITE | STGM_SHARE_EXCLUSIVE,
0, // default file attributes
TRUE, // create new file if it does not exist
NULL, // no template
stream);
}
return hr;
}
//
// Function to print some basic information about an IAppxFile object, and
// write it to disk under the given path.
//
// Parameters:
// file - Instance of IAppxFile obtained from IAppxBundleReader representing
// a footprint file or payload package in the bundle.
// outputPath - Path of the folder where extracted files should be placed
//
HRESULT ExtractFile(
_In_ IAppxFile* file,
_In_ LPCWSTR outputPath)
{
HRESULT hr = S_OK;
LPWSTR fileName = NULL;
LPWSTR contentType = NULL;
UINT64 fileSize = 0;
IStream* fileStream = NULL;
IStream* outputStream = NULL;
ULARGE_INTEGER fileSizeLargeInteger = {0};
// Get basic information about the file
hr = file->GetName(&fileName);
if (SUCCEEDED(hr))
{
hr = file->GetContentType(&contentType);
}
if (SUCCEEDED(hr))
{
hr = file->GetSize(&fileSize);
fileSizeLargeInteger.QuadPart = fileSize;
}
if (SUCCEEDED(hr))
{
wprintf(L"\nFile name: %s\n", fileName);
wprintf(L"Content type: %s\n", contentType);
wprintf(L"Size: %llu bytes\n", fileSize);
}
// Write the file out to disk
if (SUCCEEDED(hr))
{
hr = file->GetStream(&fileStream);
}
if (SUCCEEDED(hr) && (fileName != NULL))
{
hr = GetOutputStream(outputPath, fileName, &outputStream);
}
if (SUCCEEDED(hr) && (outputStream != NULL))
{
hr = fileStream->CopyTo(outputStream, fileSizeLargeInteger, NULL, NULL);
}
// String buffers obtained from the bundle APIs must be freed
CoTaskMemFree(fileName);
CoTaskMemFree(contentType);
// Clean up other allocated resources
if (outputStream != NULL)
{
outputStream->Release();
outputStream = NULL;
}
if (fileStream != NULL)
{
fileStream->Release();
fileStream = NULL;
}
return hr;
}
//
// Function to extract all footprint files from a bundle reader.
//
// Parameters:
// bundleReader - Instance of IAppxBundleReader over the bundle whose footprint
// files are to be extracted.
// outputPath - Path of the folder where all extracted footprint files should
// be placed.
//
HRESULT ExtractFootprintFiles(
_In_ IAppxBundleReader* bundleReader,
_In_ LPCWSTR outputPath)
{
HRESULT hr = S_OK;
wprintf(L"\nExtracting footprint files from the bundle\n");
for (int i = 0; SUCCEEDED(hr) && (i < FootprintFilesCount); i++)
{
IAppxFile* footprintFile = NULL;
hr = bundleReader->GetFootprintFile(FootprintFilesType[i], &footprintFile);
if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND))
{
// Some footprint files are optional, it's normal for the GetFootprintFile
// call to fail when the file is not present.
wprintf(L"\nThe bundle doesn't contain a %s.\n", FootprintFilesName[i]);
hr = S_OK;
}
else if (SUCCEEDED(hr))
{
hr = ExtractFile(footprintFile, outputPath);
}
if (footprintFile != NULL)
{
footprintFile->Release();
footprintFile = NULL;
}
}
return hr;
}
//
// Function to extract all payload packages from a bundle reader.
//
// Parameters:
// bundleReader - Instance of IAppxBundleReader over the bundle whose payload
// packages are to be extracted.
// outputPath - Path of the folder where all extracted payload packages should
// be placed.
//
HRESULT ExtractPayloadPackages(
_In_ IAppxBundleReader* bundleReader,
_In_ LPCWSTR outputPath)
{
HRESULT hr = S_OK;
IAppxFilesEnumerator* payloadPackages = NULL;
wprintf(L"\nExtracting payload packages from the bundle\n");
// Get an enumerator of all payload packages from the bundle reader and
// iterate through all of them.
hr = bundleReader->GetPayloadPackages(&payloadPackages);
if (SUCCEEDED(hr))
{
BOOL hasCurrent = FALSE;
hr = payloadPackages->GetHasCurrent(&hasCurrent);
while (SUCCEEDED(hr) && hasCurrent)
{
IAppxFile* payloadPackage = NULL;
hr = payloadPackages->GetCurrent(&payloadPackage);
if (SUCCEEDED(hr))
{
hr = ExtractFile(payloadPackage, outputPath);
}
if (SUCCEEDED(hr))
{
hr = payloadPackages->MoveNext(&hasCurrent);
}
if (payloadPackage != NULL)
{
payloadPackage->Release();
payloadPackage = NULL;
}
}
}
if (payloadPackages != NULL)
{
payloadPackages->Release();
payloadPackages = NULL;
}
return hr;
}
//
// Function to create an Appx Bundle reader given the input file name.
//
// Parameters:
// inputFileName - Name including path to the bundle (.appxbundle file)
// to be opened.
// bundleReader - Output parameter pointing to the created instance of
// IAppxBundleReader when this function succeeds.
//
HRESULT GetBundleReader(
_In_ LPCWSTR inputFileName,
_Outptr_ IAppxBundleReader** bundleReader)
{
HRESULT hr = S_OK;
IAppxBundleFactory* appxBundleFactory = NULL;
IStream* inputStream = NULL;
// Create a new Appx bundle factory
hr = CoCreateInstance(
__uuidof(AppxBundleFactory),
NULL,
CLSCTX_INPROC_SERVER,
__uuidof(IAppxBundleFactory),
(LPVOID*)(&appxBundleFactory));
// Create a stream over the input Appx bundle
if (SUCCEEDED(hr))
{
hr = SHCreateStreamOnFileEx(
inputFileName,
STGM_READ | STGM_SHARE_EXCLUSIVE,
0, // default file attributes
FALSE, // do not create new file
NULL, // no template
&inputStream);
}
// Create a new bundle reader using the factory
if (SUCCEEDED(hr))
{
hr = appxBundleFactory->CreateBundleReader(
inputStream,
bundleReader);
}
// Clean up allocated resources
if (inputStream != NULL)
{
inputStream->Release();
inputStream = NULL;
}
if (appxBundleFactory != NULL)
{
appxBundleFactory->Release();
appxBundleFactory = NULL;
}
return hr;
}
//
// Main entry point of the sample
//
int wmain(
_In_ int argc,
_In_reads_(argc) wchar_t** argv)
{
wprintf(L"Copyright (c) Microsoft Corporation. All rights reserved.\n");
wprintf(L"ExtractBundle sample\n\n");
if (argc != 3)
{
wprintf(L"Usage: ExtractBundle.exe inputFile outputPath\n");
wprintf(L" inputFile: Path to the bundle to extract\n");
wprintf(L" outputPath: Path to the folder to store extracted contents\n");
return 2;
}
HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
if (SUCCEEDED(hr))
{
// Create a bundle reader using the file name given in command line
IAppxBundleReader* bundleReader = NULL;
hr = GetBundleReader(argv[1], &bundleReader);
// Print information about all footprint files, and extract them to disk
if (SUCCEEDED(hr))
{
hr = ExtractFootprintFiles(bundleReader, argv[2]);
}
// Print information about all payload files, and extract them to disk
if (SUCCEEDED(hr))
{
hr = ExtractPayloadPackages(bundleReader, argv[2]);
}
// Clean up allocated resources
if (bundleReader != NULL)
{
bundleReader->Release();
bundleReader = NULL;
}
CoUninitialize();
}
if (SUCCEEDED(hr))
{
wprintf(L"\nBundle extracted successfully.\n");
}
else
{
wprintf(L"\nBundle extraction failed with HRESULT 0x%08X.\n", hr);
}
return SUCCEEDED(hr) ? 0 : 1;
}
| [
"v-tiafe@microsoft.com"
] | v-tiafe@microsoft.com |
c8a9b3d64bac35fe8eda14567874c3287abc7f02 | a06515f4697a3dbcbae4e3c05de2f8632f8d5f46 | /corpus/taken_from_cppcheck_tests/stolen_9416.cpp | 1fcf71310c8bf55537e809d1300a2242e4ba85a5 | [] | no_license | pauldreik/fuzzcppcheck | 12d9c11bcc182cc1f1bb4893e0925dc05fcaf711 | 794ba352af45971ff1f76d665b52adeb42dcab5f | refs/heads/master | 2020-05-01T01:55:04.280076 | 2019-03-22T21:05:28 | 2019-03-22T21:05:28 | 177,206,313 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 58 | cpp | void foo(char *p) {
free(p);
getNext(&p);
free(p);
} | [
"github@pauldreik.se"
] | github@pauldreik.se |
95f15c364f328fafe9eef9e4194bc53d58f8ced3 | 51a05333af46c57c026b86e1c92bf9112c113dc7 | /RTCanvas.cpp | 6861bed970c8656a6716b6dece4769ac66e8a935 | [] | no_license | jkhust/Raytracing | 6f1ca5cb02a7265b45c182b62866ce50df843830 | ab8babd5324ccb89e008facb596fcd2b48ca6906 | refs/heads/master | 2016-09-05T21:01:20.653847 | 2014-05-15T13:19:22 | 2014-05-15T13:19:22 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,621 | cpp | //
// RTCanvas.cpp
// GL_Project4
//
// Created by Justin Hust on 4/19/13.
// Copyright (c) 2013 __MyCompanyName__. All rights reserved.
//
#include <iostream.h>
#include <stdlib.h>
#include <assert.h>
#include "RTCanvas.h"
#include "RTPrimitive.h"
const int RED_OFS = 0; /* offset to red byte */
const int GREEN_OFS = 1; /* offset to green byte */
const int BLUE_OFS = 2; /* offset to blue byte */
// ********************************************************
RTCanvas::RTCanvas(int iWidth_, int iHeight_) {
pixels = new GLubyte[iWidth_*iHeight_*3];
iWidth = iWidth_;
iHeight = iHeight_;
ClearToWhite();
}
// ********************************************************
RTCanvas::~RTCanvas(void) {
if(pixels != NULL)
delete[] pixels;
pixels = NULL;
}
// ************************************************************
int RTCanvas::GetWidth(void) {
return iWidth;
}
// ************************************************************
int RTCanvas::GetHeight(void) {
return iHeight;
}
// ************************************************************
void RTCanvas::SetCanvasProjection(void) {
// init openGL drawing mode to something the canvas can use.
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
}
// ************************************************************
void RTCanvas::ClearToWhite(void) {
// set every pixel to white
for(int i=0; i < iWidth*iHeight*3; i++) {
pixels[i] = 0xFF;
}
}
// ************************************************************
void RTCanvas::ClearToGray(void) {
// set every pixel to white
for(int i=0; i < iWidth*iHeight*3; i++) {
pixels[i] = 0x77;
}
}
// ************************************************************
void RTCanvas::PlotPixel(int x, int y, GLfloat r, GLfloat g, GLfloat b) {
assert(x >= 0 && x < iWidth);
assert(y >= 0 && y < iHeight);
int iPixelPos = 3*iWidth*y + 3*x;
char red = (char) (r*255);
char green = (char) (g*255);
char blue = (char) (b*255);
pixels[iPixelPos + RED_OFS] = red;
pixels[iPixelPos + GREEN_OFS] = green;
pixels[iPixelPos + BLUE_OFS] = blue;
}
// ************************************************************
void RTCanvas::PlotPixel(int x, int y, RTColor *c) {
PlotPixel(x, y, c->r(), c->g(), c->b());
}
// ************************************************************
void RTCanvas::SendToFrameBuffer(void) {
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glRasterPos3f(0.0,0.0,0.0);
glDrawPixels(iWidth,iHeight,GL_RGB,GL_UNSIGNED_BYTE,pixels);
} | [
"justin.hust@utexas.edu"
] | justin.hust@utexas.edu |
facac9f4440c88949a8aadbc4e3fd3e0a92183aa | f3f9d546f0ee9c532f9a8bed11f1770b6c1778a6 | /revision/icpc-map.cpp | 7a7e8fcc5dc00df9636277a8e1713545310860d1 | [] | no_license | rohit3463/data-structures | 20de7286fdc00387c57b231b7b8255589379b9c6 | ea2b0250821dcf9b713a57a4e57a2600d2d0ebd6 | refs/heads/master | 2020-03-19T23:51:03.172036 | 2019-10-23T04:52:34 | 2019-10-23T04:52:34 | 137,022,495 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,172 | cpp | #include <bits/stdc++.h>
#include <unordered_map>
using namespace std;
struct ct
{
long long my_count = 0;
long long x_1 = 0;
long long x_0 = 0;
};
int main() {
long long n,T;
cin>>T;
while(T--)
{
unordered_map <string, ct> hello;
long long total = 0;
cin>>n;
string st;
long long digit;
for(int i=0;i<n;i++)
{
cin>>st;
cin>>digit;
if(digit == 0)
{
hello[st].x_0 += 1;
total -= hello[st].my_count;
if(hello[st].x_0 > hello[st].x_1)
{
hello[st].my_count = hello[st].x_0;
}
total += hello[st].my_count;
}
else
{
hello[st].x_1 += 1;
total -= hello[st].my_count;
if(hello[st].x_1 > hello[st].x_0)
{
hello[st].my_count = hello[st].x_1;
}
total += hello[st].my_count;
}
}
cout<<total<<endl;
}
return 0;
}
| [
"rohit@vedalabs.in"
] | rohit@vedalabs.in |
d2f36a1d05c31e85260656bd63add977aee8f2a3 | d7a4aed6a36aa9891587305c8ef1ca3fda0ae831 | /helper/Random.h | 3e7958478a22236b6dec05005994f6062b71c7ef | [] | no_license | jokm1/Pokerbots | 81b0243c5eb6279509aa896c76a9b662e949a4ab | dca4164f64aedc99954c1122bd651829a1cdcaef | refs/heads/master | 2021-06-14T15:29:29.546436 | 2017-03-12T07:53:10 | 2017-03-12T07:53:10 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 789 | h | //
// Random.h
// Hearts
//
// Wrapper for a random number generator algorithm
//
// Created by Kundan Chintamaneni on 2/9/15.
// Copyright (c) 2015 Kundan Chintamaneni. All rights reserved.
//
#ifndef __Hearts__Random__
#define __Hearts__Random__
#include <random>
#include <map>
#include <utility>
#include <mutex>
class Random {
public:
static int integer(int min, int max);
static double real(int min, int max);
static void seed(unsigned int seed);
private:
using RNG = std::mt19937; //algorithm used for random number generation
using num_type = unsigned int; //numbertype used to store seed
static RNG& generator();
static RNG engine;
static bool seeded;
static std::mutex RNGmutex;
};
#endif /* defined(__Hearts__Random__) */
| [
"omnik116@gmail.com"
] | omnik116@gmail.com |
5d3f52a7e9d0b718cc633877befbe101fea11419 | 7eb891a2684ff688fde3889987c6dada5d8860d4 | /lab3/main.cpp | de87d53e5829ff44ad701562f15447a795352ca7 | [] | no_license | LeuKgeGne/SPO_VM | e3d978d11cad97c95d0456ce63a5d49e92868929 | 73a800586b1491efc253bd83c8e735f66196e54e | refs/heads/master | 2020-04-29T18:41:16.549830 | 2018-03-02T13:50:30 | 2018-03-02T13:50:30 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 776 | cpp | #include <iostream>
#include <string>
#include <clocale>
#include "Controller.h"
#include "exceptions/VA_Exception.h"
int main(int argc, char* argv[])
{
setlocale(LC_ALL, "");
try
{
if (argc <= 1)
{
SelectMode();
}
else if (argc == 2 && std::string("-p") == argv[1])
{
//new Person
WorkAsPerson();
}
else if (argc == 2 && std::string("-m") == argv[1])
{
//new Machine
WorkAsCoffeeMachine();
}
else
{
throw BadCommandLineArgumentsException();
}
}
catch (const int& eCode)
{
return eCode;
}
catch (VA_Exception& e)
{
std::cout << "Ошибка. " << e.what() << ". Для выхода введите любой символ" << std::endl;
std::cin.get();
return 2;
}
catch (...)
{
return 1;
}
return 0;
}
| [
"aleksandr9809@gmail.com"
] | aleksandr9809@gmail.com |
42022a96ba10d489706f921ce04aed4d61c37f8e | 89044f6606e3ccfbbca0b0dacc277497e735d5d4 | /lecture04/exercise04-B/solution.cpp | 227ae42bb3639389edd4bdf32815dba1fed7060a | [
"MIT"
] | permissive | nd-cse-34872-su21/cse-34872-su21-examples | 10595f1d53ad3a45fd5e293a8705aefd66bf65c9 | 0294bb0964b502bbb8541054977988c4a3b49dab | refs/heads/master | 2023-05-14T09:55:26.573462 | 2021-06-08T14:23:59 | 2021-06-08T14:23:59 | 370,460,163 | 0 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 980 | cpp | // happy_number.cpp
#include <iostream>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
using namespace std;
// Global variables
unordered_map<int, bool> IsHappy;
// Functions
bool is_happy_r(int n, unordered_set<int> &seen) {
if (seen.count(n)) { // Base case: cycles
return false;
}
if (n == 1) { // Base case: reaches 1
return true;
}
seen.insert(n); // Mark seen
if (!IsHappy.count(n)) { // Memoize recursive call
string s = to_string(n);
int squares = accumulate(s.begin(), s.end(), 0, [](int sum, char c) {
int d = (c - '0');
return sum + (d*d);
});
IsHappy[n] = is_happy_r(squares, seen);
}
return IsHappy[n];
}
bool is_happy(int n) {
unordered_set<int> seen;
return is_happy_r(n, seen);
}
// Main execution
int main(int argc, char *argv[]) {
int n;
while (cin >> n) {
cout << (is_happy(n) ? "Yes" : "No") << endl;
}
return 0;
}
| [
"pbui@nd.edu"
] | pbui@nd.edu |
07c7356790f7580bbbac0278fcf934ab3baf5f72 | 2de8f5ba729a846f8ad5630272dd5b1f3b7b6e44 | /src/server/gameserver/item/OustersWristlet.h | 43c4e0cce1618ef29ee822a2a13c7237c0998e15 | [] | no_license | najosky/darkeden-v2-serverfiles | dc0f90381404953e3716bf71320a619eb10c3825 | 6e0015f5b8b658697228128543ea145a1fc4c559 | refs/heads/master | 2021-10-09T13:01:42.843224 | 2018-12-24T15:01:52 | 2018-12-24T15:01:52 | null | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 8,127 | h | //////////////////////////////////////////////////////////////////////////////
// Filename : OustersWristlet.h
// Written By :
// Description :
//////////////////////////////////////////////////////////////////////////////
#ifndef __OUSTERS_WRISTLET_H__
#define __OUSTERS_WRISTLET_H__
#include "Item.h"
#include "ConcreteItem.h"
#include "ItemPolicies.h"
#include "ItemInfo.h"
#include "InfoClassManager.h"
#include "ItemFactory.h"
#include "ItemLoader.h"
#include "Mutex.h"
//////////////////////////////////////////////////////////////////////////////
// class OustersWristlet;
//////////////////////////////////////////////////////////////////////////////
class OustersWristlet : public ConcreteItem<Item::ITEM_CLASS_OUSTERS_WRISTLET, NoStack, HasDurability, HasOption, WeaponGrade, Weapon, NoEnchantLevel, HasOption2, HasHeroOption, HasHeroOptionAttr>
{
public:
OustersWristlet() throw();
OustersWristlet(ItemType_t itemType, const list<OptionType_t>& optionType) throw();
public:
virtual void create(const string & ownerID, Storage storage, StorageID_t storageID, BYTE x, BYTE y, ItemID_t itemID=0) throw(Error);
virtual void save(const string & ownerID, Storage storage, StorageID_t storageID, BYTE x, BYTE y) throw(Error);
void tinysave(const string & field) const throw (Error) { tinysave(field.c_str()); }
void tinysave(const char* field) const throw (Error);
virtual string toString() const throw();
static void initItemIDRegistry(void) throw();
public:
// virtual ItemClass getItemClass() const throw() { return Item::ITEM_CLASS_OUSTERS_WRISTLET; }
// virtual string getObjectTableName() const throw() { return "OustersWristletObject"; }
/* virtual ItemType_t getItemType() const throw() { return m_ItemType; }
virtual void setItemType(ItemType_t itemType) throw() { m_ItemType = itemType; }
virtual bool hasOptionType() const throw() { return !m_OptionType.empty(); }
virtual int getOptionTypeSize() const throw() { return m_OptionType.size(); }
virtual int getRandomOptionType() const throw() { if (m_OptionType.empty()) return 0; int pos = rand()%m_OptionType.size(); list<OptionType_t>::const_iterator itr = m_OptionType.begin(); for (int i=0; i<pos; i++) itr++; return *itr; }
virtual const list<OptionType_t>& getOptionTypeList() const throw() { return m_OptionType; }
virtual OptionType_t getFirstOptionType() const throw() { if (m_OptionType.empty()) return 0; return m_OptionType.front(); }
virtual void removeOptionType(OptionType_t OptionType) throw() { list<OptionType_t>::iterator itr = find(m_OptionType.begin(), m_OptionType.end(), OptionType); if (itr!=m_OptionType.end()) m_OptionType.erase(itr); }
virtual void changeOptionType(OptionType_t currentOptionType, OptionType_t newOptionType) throw() { list<OptionType_t>::iterator itr = find(m_OptionType.begin(), m_OptionType.end(), currentOptionType); if (itr!=m_OptionType.end()) *itr=newOptionType; }
virtual void addOptionType(OptionType_t OptionType) throw() { m_OptionType.push_back(OptionType); }
virtual void setOptionType(const list<OptionType_t>& OptionType) throw() { m_OptionType = OptionType; }
virtual VolumeWidth_t getVolumeWidth() const throw(Error);
virtual VolumeHeight_t getVolumeHeight() const throw(Error);
virtual Weight_t getWeight() const throw(Error);
virtual Durability_t getDurability() const throw(Error) { return m_Durability; }
void setDurability(Durability_t durability) throw(Error) { m_Durability = durability; }
virtual Damage_t getMinDamage() const throw(Error);
virtual Damage_t getMaxDamage() const throw(Error);
Damage_t getBonusDamage() const throw() { return m_BonusDamage;}
void setBonusDamage(Damage_t damage) throw() { m_BonusDamage = damage;}
*/
// virtual int getCriticalBonus(void) const throw();
virtual ElementalType getElementalType() const;
virtual Elemental_t getElemental() const;
private:
// ItemType_t m_ItemType;
// list<OptionType_t> m_OptionType;
// Durability_t m_Durability;
// BYTE m_BonusDamage;
static Mutex m_Mutex; // 아이템 ID 관련 락
static ItemID_t m_ItemIDRegistry; // 클래스별 고유 아이템 아이디 발급기
};
//////////////////////////////////////////////////////////////////////////////
// class OustersWristletInfo
//////////////////////////////////////////////////////////////////////////////
class OustersWristletInfo : public ItemInfo
{
public:
virtual Item::ItemClass getItemClass() const throw() { return Item::ITEM_CLASS_OUSTERS_WRISTLET; }
virtual Durability_t getDurability() const throw() { return m_Durability; }
virtual void setDurability(Durability_t durability) throw() { m_Durability = durability; }
virtual Damage_t getMinDamage() const throw() { return m_MinDamage; }
virtual void setMinDamage(Damage_t minDamage) throw() { m_MinDamage = minDamage; }
virtual Damage_t getMaxDamage() const throw() { return m_MaxDamage; }
virtual void setMaxDamage(Damage_t maxDamage) throw() { m_MaxDamage = maxDamage; }
Range_t getRange() const throw() { return m_Range; }
void setRange(Range_t range) throw() { m_Range = range; }
// ToHit_t getToHitBonus() const throw() { return m_ToHitBonus; }
// void setToHitBonus(ToHit_t tohit) throw() { m_ToHitBonus = tohit; }
virtual Speed_t getSpeed(void) const throw() { return m_Speed; }
virtual void setSpeed(Speed_t speed) throw() { m_Speed = speed; }
virtual uint getItemLevel(void) const throw() { return m_ItemLevel; }
virtual void setItemLevel(uint level) throw() { m_ItemLevel = level; }
virtual int getCriticalBonus(void) const throw() { return m_CriticalBonus; }
virtual void setCriticalBonus(int bonus) throw() { m_CriticalBonus = bonus; }
virtual ElementalType getElementalType() const { return m_ElementalType; }
void setElementalType( ElementalType elementalType ) { m_ElementalType = elementalType; }
virtual Elemental_t getElemental() const { return m_Elemental; }
void setElemental( Elemental_t elemental ) { m_Elemental = elemental; }
virtual string toString() const throw();
private:
Durability_t m_Durability;
Damage_t m_MinDamage;
Damage_t m_MaxDamage;
Range_t m_Range;
// ToHit_t m_ToHitBonus;
Speed_t m_Speed;
uint m_ItemLevel;
int m_CriticalBonus; // 아이템마다 다른 크리티컬 확률
ElementalType m_ElementalType;
Elemental_t m_Elemental;
};
//////////////////////////////////////////////////////////////////////////////
// class OustersWristletInfoManager;
//////////////////////////////////////////////////////////////////////////////
class OustersWristletInfoManager : public InfoClassManager
{
public:
virtual Item::ItemClass getItemClass() const throw() { return Item::ITEM_CLASS_OUSTERS_WRISTLET; }
virtual void load() throw(Error);
};
extern OustersWristletInfoManager* g_pOustersWristletInfoManager;
//////////////////////////////////////////////////////////////////////////////
// class OustersWristletFactory
//////////////////////////////////////////////////////////////////////////////
class OustersWristletFactory : public ItemFactory
{
public:
virtual Item::ItemClass getItemClass() const throw() { return Item::ITEM_CLASS_OUSTERS_WRISTLET; }
virtual string getItemClassName() const throw() { return "OustersWristlet"; }
public:
virtual Item* createItem(ItemType_t ItemType, const list<OptionType_t>& OptionType) throw() { return new OustersWristlet(ItemType,OptionType); }
};
//////////////////////////////////////////////////////////////////////////////
// class OustersWristletLoader;
//////////////////////////////////////////////////////////////////////////////
class OustersWristletLoader : public ItemLoader
{
public:
virtual Item::ItemClass getItemClass() const throw() { return Item::ITEM_CLASS_OUSTERS_WRISTLET; }
virtual string getItemClassName() const throw() { return "OustersWristlet"; }
public:
virtual void load(Creature* pCreature) throw(Error);
virtual void load(Zone* pZone) throw(Error);
virtual void load(StorageID_t storageID, Inventory* pInventory) throw(Error);
};
extern OustersWristletLoader* g_pOustersWristletLoader;
#endif
| [
"paulomatew@gmail.com"
] | paulomatew@gmail.com |
c6d64b1d782496e1fed37516181dc958ccd10387 | 46e9e81472047075b1705353d46844bed6bdc098 | /OJs/POJ/3641/10069266_AC_0MS_164K.cpp | d88ea3bd19e7dc85307e1d6e9eb78a8d90c6e3b0 | [] | no_license | WayneTimer/ACM | 983fcc9546ea3092c2d196af70cd303ff25d0e41 | 4bbc13734fd5b36441b172019a1864db18034c8b | refs/heads/master | 2021-05-16T02:05:18.486680 | 2018-08-12T15:11:44 | 2018-08-12T15:11:44 | 17,138,795 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,122 | cpp | #include <cstdio>
#include <cstring>
#include <cstdlib>
using namespace std;
long long miqumo(long long a,long long b,long long c)
{
int p[501];
int i,j;
long long ans;
i=-1;
ans=1;
while (b)
{
i++;
p[i]=b%2;
b=b>>1;
}
for (j=i;j>=0;j--)
{
ans=(ans*ans)%c;
if (p[j]==1) ans=(ans*a)%c;
}
return ans;
}
bool MR(long long n)
{
long long a,s;
a=rand()%(n-1)+1;
s=miqumo(a,n-1,n);
s=s%n;
if (s==1) return true;
return false;
}
bool check(long long n)
{
bool flag;
int times=30,i;
flag=true;
if (n<=1) flag=false;
else
if (n>3)
{
for (i=1;i<=times;i++)
if (!MR(n))
{
flag=false;
break;
}
}
return flag;
}
int main()
{
long long p,a,s;
scanf("%lld%lld",&p,&a);
while ((p!=0)&&(a!=0))
{
s=miqumo(a,p,p);
if (s==a)
{
if (!check(p))
printf("yes\n");
else printf("no\n");
}
else
printf("no\n");
scanf("%lld%lld",&p,&a);
}
return 0;
} | [
"ylinax@connect.ust.hk"
] | ylinax@connect.ust.hk |
5b53e54b99f16373a9b1ec3f83d87700f73884df | c26ef6e83789956e2124aab2ddca2d0a17d49983 | /Order.h | cd2eb394dfb0ef865ba66045b4550c81c1a332e3 | [] | no_license | AndreyGovnocoder/ExpertPrintOrders_project | 1c0360c51d684c792baa8529a25db3cd56271147 | acfba3cfb579173d2046163d9065e790c042a341 | refs/heads/master | 2023-06-22T18:38:03.833957 | 2021-07-27T03:38:01 | 2021-07-27T03:39:24 | 389,838,779 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,586 | h | #pragma once
#include <qdatetime.h>
class Order
{
public:
Order() = default;
Order(Order* order);
~Order() = default;
void set_id(int id) { _id = id; };
void set_date(const QDate& date) { _date = date; };
void set_client(int client) { _client = client; };
void set_productType(int productType) { _productType = productType; }
void set_manager(int manager) { _manager = manager; }
void set_designer(int designer) { _designer = designer; }
void set_productionTime(const QDate& productionTime) { _productionTime = productionTime; }
void set_status(int status) { _status = status; }
void set_mockUpTask(const QString& mockUpTask) { _mockUpTask = mockUpTask; }
void set_productionTask(const QString& productionTask) { _productionTask = productionTask; }
void set_isRead(bool isRead) { _isRead = isRead; }
int get_id() const { return _id; };
const QDate& get_date() const { return _date; };
int get_client() const { return _client; };
int get_productType() const { return _productType; }
int get_manager() const { return _manager; }
int get_designer() const { return _designer; }
const QDate& get_productionTime() const { return _productionTime; }
int get_status() const { return _status; }
const QString& get_mockUpTask() const { return _mockUpTask; }
const QString& get_productionTask() const { return _productionTask; }
bool isRead() const { return _isRead; }
private:
int _id;
QDate _date;
int _client;
int _productType;
int _manager;
int _designer;
QDate _productionTime;
int _status;
QString _mockUpTask;
QString _productionTask;
bool _isRead;
}; | [
"elizgerd@yandex.ru"
] | elizgerd@yandex.ru |
1299b23b79f7a03afde182e73a900733057b9505 | b18bb35192ba2e93685f754763872350fe2afbd5 | /4_3(析构函数)/4_3(析构函数).cpp | ed0599706e21888723aedfd770459945e3dee60e | [] | no_license | Shawn070/CPP | 4c890a5882af6aa190f6f30e42ccfa17c5109fb9 | 942096a9c78820987384df9ec0048b6fc552c06e | refs/heads/master | 2021-01-20T00:15:57.332018 | 2019-04-04T06:48:52 | 2019-04-04T06:48:52 | 101,275,015 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 1,580 | cpp | // 4_3(析构函数).cpp : 定义控制台应用程序的入口点。
// 游泳池改造预算,Cirle类。
// 一圆形游泳池,现在需在其周围建一圆形过道,并在
// 其四周围上栅栏。栅栏价格为35元/米,过道造价20元/
// 平方米。过道宽度为3米,游泳池半径由键盘输入。
// 要求编程计算并输出过道和栅栏的造价。
#include "stdafx.h"
#include <iostream>
using namespace std;
const float PI = 3.141593;
const float FENCE_PRICE = 35;
const float CONCRETE_PRICE = 20;
class Circle
{
public:
Circle(float r); //构造函数
float circumference(); //计算圆的周长
float area(); //计算圆的面积
private:
float radius; //圆半径
};
//类的实现
//构造函数初试换数据成员 radius
Circle::Circle(float r) {
radius = r;
}
//计算圆的周长
float Circle::circumference() {
return 2 * PI*radius;
}
//计算圆的面积
float Circle::area() {
return PI*radius*radius;
}
int main()
{
float radius;
cout << "Enter the radius of the pool:";
cin >> radius;
Circle pool(radius); //游泳池边界对象
Circle poolRim(radius + 3); //栅栏对象
//计算栅栏造价并输出
float fenceCost = poolRim.circumference()*FENCE_PRICE;
cout << "Fencing Cost is $ " << fenceCost << endl;
//计算过道造价并输出
float concereCost = (poolRim.area() - pool.area())*CONCRETE_PRICE;
cout << "Concrete Cost is $ " << concereCost << endl;
return 0;
}
/*
运行结果:
Enter the radius of the pool:10
Fencing Cost is $ 2858.85
Concrete Cost is $ 4335.4
*/
| [
"307882919@qq.com"
] | 307882919@qq.com |
fe5a137c6171e722abd586ca901e5f925046e874 | e7169e62f55299abe9d1699772843d88eb6bcdf5 | /core/SkRecorder.h | 9f8824f85aad4c6f4db77f89f1114d4e2e3b0c5f | [] | no_license | amendgit/skiasnapshot | eda8206290bbc9f9da0771e1b0da5d259d473e85 | 27da382c7d0ed2f3bac392f42b9a2757fb08cab1 | refs/heads/master | 2021-01-12T04:19:35.666192 | 2016-12-29T06:20:07 | 2016-12-29T06:20:07 | 77,588,169 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,216 | h | /*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkRecorder_DEFINED
#define SkRecorder_DEFINED
#include "SkBigPicture.h"
#include "SkCanvas.h"
#include "SkMiniRecorder.h"
#include "SkRecord.h"
#include "SkRecords.h"
#include "SkTDArray.h"
class SkBBHFactory;
class SkDrawableList : SkNoncopyable {
public:
SkDrawableList() {}
~SkDrawableList();
int count() const { return fArray.count(); }
SkDrawable* const* begin() const { return fArray.begin(); }
void append(SkDrawable* drawable);
// Return a new or ref'd array of pictures that were snapped from our drawables.
SkBigPicture::SnapshotArray* newDrawableSnapshot();
private:
SkTDArray<SkDrawable*> fArray;
};
// SkRecorder provides an SkCanvas interface for recording into an SkRecord.
class SkRecorder : public SkCanvas {
public:
// Does not take ownership of the SkRecord.
SkRecorder(SkRecord*, int width, int height, SkMiniRecorder* = nullptr); // legacy version
SkRecorder(SkRecord*, const SkRect& bounds, SkMiniRecorder* = nullptr);
enum DrawPictureMode { Record_DrawPictureMode, Playback_DrawPictureMode };
void reset(SkRecord*, const SkRect& bounds, DrawPictureMode, SkMiniRecorder* = nullptr);
size_t approxBytesUsedBySubPictures() const { return fApproxBytesUsedBySubPictures; }
SkDrawableList* getDrawableList() const { return fDrawableList.get(); }
SkDrawableList* detachDrawableList() { return fDrawableList.release(); }
// Make SkRecorder forget entirely about its SkRecord*; all calls to SkRecorder will fail.
void forgetRecord();
void willSave() override;
SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override;
void willRestore() override {}
void didRestore() override;
void didConcat(const SkMatrix&) override;
void didSetMatrix(const SkMatrix&) override;
void didTranslate(SkScalar, SkScalar) override;
#ifdef SK_EXPERIMENTAL_SHADOWING
void didTranslateZ(SkScalar) override;
#else
void didTranslateZ(SkScalar);
#endif
void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override;
void onDrawDrawable(SkDrawable*, const SkMatrix*) override;
void onDrawText(const void* text,
size_t byteLength,
SkScalar x,
SkScalar y,
const SkPaint& paint) override;
void onDrawPosText(const void* text,
size_t byteLength,
const SkPoint pos[],
const SkPaint& paint) override;
void onDrawPosTextH(const void* text,
size_t byteLength,
const SkScalar xpos[],
SkScalar constY,
const SkPaint& paint) override;
void onDrawTextOnPath(const void* text,
size_t byteLength,
const SkPath& path,
const SkMatrix* matrix,
const SkPaint& paint) override;
void onDrawTextRSXform(const void* text,
size_t byteLength,
const SkRSXform[],
const SkRect* cull,
const SkPaint& paint) override;
void onDrawTextBlob(const SkTextBlob* blob,
SkScalar x,
SkScalar y,
const SkPaint& paint) override;
void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
const SkPoint texCoords[4], SkXfermode* xmode,
const SkPaint& paint) override;
void onDrawPaint(const SkPaint&) override;
void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override;
void onDrawRect(const SkRect&, const SkPaint&) override;
void onDrawOval(const SkRect&, const SkPaint&) override;
void onDrawArc(const SkRect&, SkScalar, SkScalar, bool, const SkPaint&) override;
void onDrawRRect(const SkRRect&, const SkPaint&) override;
void onDrawPath(const SkPath&, const SkPaint&) override;
void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) override;
void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*,
SrcRectConstraint) override;
void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override;
void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst,
const SkPaint*, SrcRectConstraint) override;
void onDrawImageNine(const SkImage*, const SkIRect& center, const SkRect& dst,
const SkPaint*) override;
void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst,
const SkPaint*) override;
void onDrawImageLattice(const SkImage*, const Lattice& lattice, const SkRect& dst,
const SkPaint*) override;
void onDrawBitmapLattice(const SkBitmap&, const Lattice& lattice, const SkRect& dst,
const SkPaint*) override;
void onDrawVertices(VertexMode vmode, int vertexCount,
const SkPoint vertices[], const SkPoint texs[],
const SkColor colors[], SkXfermode* xmode,
const uint16_t indices[], int indexCount,
const SkPaint&) override;
void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[],
int count, SkXfermode::Mode, const SkRect* cull, const SkPaint*) override;
void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle) override;
void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeStyle) override;
void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle) override;
void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) override;
void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override;
#ifdef SK_EXPERIMENTAL_SHADOWING
void onDrawShadowedPicture(const SkPicture*,
const SkMatrix*,
const SkPaint*) override;
#else
void onDrawShadowedPicture(const SkPicture*,
const SkMatrix*,
const SkPaint*);
#endif
void onDrawAnnotation(const SkRect&, const char[], SkData*) override;
sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfaceProps&) override;
void flushMiniRecorder();
private:
template <typename T>
T* copy(const T*);
template <typename T>
T* copy(const T[], size_t count);
SkIRect devBounds() const {
SkIRect devBounds;
this->getClipDeviceBounds(&devBounds);
return devBounds;
}
DrawPictureMode fDrawPictureMode;
size_t fApproxBytesUsedBySubPictures;
SkRecord* fRecord;
SkAutoTDelete<SkDrawableList> fDrawableList;
SkMiniRecorder* fMiniRecorder;
};
#endif//SkRecorder_DEFINED
| [
"erxiangbo@wacai.com"
] | erxiangbo@wacai.com |
1bdd102c35b6b001e6dd913fb246b1a67dcbc35b | ca694a741d793939c23358898c611564447037d3 | /led_device.cpp | f4f3f6ec862bbaebc36580aa1a1616010eff8a83 | [] | no_license | edmund-huber/aspng | 391656a1994d081c2aa16f9868e16c4612b12abd | 0d0a81577cfed8270aff926a08159b0c4b60d485 | refs/heads/master | 2023-05-21T21:19:22.597978 | 2021-06-10T07:36:35 | 2021-06-12T22:58:35 | 198,335,975 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,957 | cpp | #include "device.h"
LEDDevice::LEDDevice(void) {
this->active = false;
}
std::string LEDDevice::name(void) {
return "LEDDevice";
}
Device *LEDDevice::create(void) {
return new LEDDevice();
}
std::string LEDDevice::prefix(void) {
return "led";
}
// A valid LEDDevice must be empty (black).
bool LEDDevice::sub_parse(AspngSurface *surface, int32_t min_x, int32_t min_y, int32_t max_x, int32_t max_y, std::string param) {
if (param != "") {
return false;
}
for (int32_t x = min_x; x <= max_x; x++) {
for (int32_t y = min_y; y <= max_y; y++) {
if (surface->get_pixel(x, y) != Rgb(0, 0, 0)) {
return false;
}
this->sub_patch.insert(Coord(x, y));
}
}
return true;
}
bool LEDDevice::link(void) {
return true;
}
std::list<std::shared_ptr<Port>> LEDDevice::propagate(std::shared_ptr<Port>) {
std::list<std::shared_ptr<Port>> empty;
return empty;
}
ElectricalValue LEDDevice::get_value_at_port(std::shared_ptr<Port>) {
return EmptyElectricalValue;
}
void LEDDevice::apply_new_value(std::shared_ptr<Port>, ElectricalValue v) {
switch (v) {
case HiElectricalValue:
case PullHiElectricalValue:
this->active = true;
break;
case LoElectricalValue:
case PullLoElectricalValue:
case EmptyElectricalValue:
this->active = false;
break;
}
}
std::list<Patch *> LEDDevice::sub_patches(void) {
std::list<Patch *> sub_patches;
sub_patches.push_back(&(this->sub_patch));
return sub_patches;
}
// Bright red if active, otherwise dark.
void LEDDevice::sub_draw(AspngSurface *surface, int32_t min_x, int32_t min_y, int32_t max_x, int32_t max_y) {
Rgb color = this->active ? Rgb(0xff, 0, 0) : Rgb(0x30, 0, 0);
for (int32_t x = min_x; x <= max_x; x++) {
for (int32_t y = min_y; y <= max_y; y++) {
surface->set_pixel(x, y, color);
}
}
}
| [
"me@ehuber.info"
] | me@ehuber.info |
5a90da50df20a301868f77a3edf2cd02dae47734 | 0d7cd016555e507e3bc2dd291cd861acfaee80d9 | /Gascoigne.hpp | 62a50dbd6cc42ac246e1b2f20da56de5959f0294 | [] | no_license | alaquitara/Hunter-sNightmare | 032050a74b8dd0ecbcb2fe9fec0d6795fc6702ec | c1c69d3b6aaa08f3e5ffc12990f6622cdfbf5e05 | refs/heads/master | 2021-01-10T14:58:32.033869 | 2016-03-19T20:55:12 | 2016-03-19T20:55:12 | 54,286,672 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 867 | hpp | //
// Gascoigne.hpp
// 162final
//
// Created by Alexander Laquitara on 3/15/16.
// Copyright © 2016 Alexander Laquitara. All rights reserved.
//
/*********************************************************************
** Program Filename: Gascoigne.cpp
** Author: Alexander Laquitara
** Date: 3/3/2016
** Description: Headerfile for Gascoigne class
** Input: Public Hunter
** Output: Gascoign object created
*********************************************************************/
#ifndef Gascoigne_hpp
#define Gascoigne_hpp
#include "Beasts.hpp"
#include <stdio.h>
class Gascoigne: public Beast
{
public:
bool transform;
Gascoigne() : Beast ("Father Gascoigne", 5, 35){transform = false;}
int attack();
int defend();
std::string getName();
bool musicBox();
void speak();
void transTest();
};
#endif /* Gascoigne_hpp */
| [
"alaquitara@gmail.com"
] | alaquitara@gmail.com |
ad8313919b25cd056efbe092ad1dc691c200f07b | e3aae98d9d671a836d102559520d12ecf71d680b | /code/MDA-GKNN/cython_utils.cpp | cbb88acf823740cd39d6b0310bc1db824afe2b76 | [] | no_license | a96123155/MDA-GCNFTG | 09b345e8dbd824a7c9eef79c16b7d086f56c0f11 | 9daa30016c4784e34bd47fdac1e38a28bedaae15 | refs/heads/main | 2023-03-19T23:56:25.062917 | 2021-03-04T10:53:18 | 2021-03-04T10:53:18 | 331,308,870 | 5 | 4 | null | null | null | null | UTF-8 | C++ | false | true | 400,720 | cpp | /* Generated by Cython 0.29.21 */
/* BEGIN: Cython Metadata
{
"distutils": {
"depends": [],
"extra_compile_args": [
"-fopenmp",
"-std=c++11"
],
"extra_link_args": [
"-fopenmp"
],
"language": "c++",
"name": "graphsaint.cython_utils",
"sources": [
"graphsaint/cython_utils.pyx"
]
},
"module_name": "graphsaint.cython_utils"
}
END: Cython Metadata */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_21"
#define CYTHON_HEX_VERSION 0x001D15F0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
#ifndef __stdcall
#define __stdcall
#endif
#ifndef __cdecl
#define __cdecl
#endif
#ifndef __fastcall
#define __fastcall
#endif
#endif
#ifndef DL_IMPORT
#define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
#define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
#if PY_VERSION_HEX >= 0x02070000
#define HAVE_LONG_LONG
#endif
#endif
#ifndef PY_LONG_LONG
#define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
#define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_PYSTON 0
#define CYTHON_COMPILING_IN_CPYTHON 0
#undef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 0
#undef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 0
#if PY_VERSION_HEX < 0x03050000
#undef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 0
#elif !defined(CYTHON_USE_ASYNC_SLOTS)
#define CYTHON_USE_ASYNC_SLOTS 1
#endif
#undef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 0
#undef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 0
#undef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
#undef CYTHON_USE_PYLONG_INTERNALS
#define CYTHON_USE_PYLONG_INTERNALS 0
#undef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 1
#undef CYTHON_ASSUME_SAFE_MACROS
#define CYTHON_ASSUME_SAFE_MACROS 0
#undef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 0
#undef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 0
#undef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 0
#undef CYTHON_PEP489_MULTI_PHASE_INIT
#define CYTHON_PEP489_MULTI_PHASE_INIT 0
#undef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE 0
#undef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS 0
#undef CYTHON_USE_EXC_INFO_STACK
#define CYTHON_USE_EXC_INFO_STACK 0
#elif defined(PYSTON_VERSION)
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_PYSTON 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#ifndef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 1
#endif
#undef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 0
#undef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 0
#undef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 0
#ifndef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 1
#endif
#undef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
#undef CYTHON_USE_PYLONG_INTERNALS
#define CYTHON_USE_PYLONG_INTERNALS 0
#ifndef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 0
#endif
#ifndef CYTHON_ASSUME_SAFE_MACROS
#define CYTHON_ASSUME_SAFE_MACROS 1
#endif
#ifndef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 1
#endif
#undef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 0
#undef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 0
#undef CYTHON_PEP489_MULTI_PHASE_INIT
#define CYTHON_PEP489_MULTI_PHASE_INIT 0
#undef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE 0
#undef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS 0
#undef CYTHON_USE_EXC_INFO_STACK
#define CYTHON_USE_EXC_INFO_STACK 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_PYSTON 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#ifndef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 1
#endif
#if PY_VERSION_HEX < 0x02070000
#undef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 0
#elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
#define CYTHON_USE_PYTYPE_LOOKUP 1
#endif
#if PY_MAJOR_VERSION < 3
#undef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 0
#elif !defined(CYTHON_USE_ASYNC_SLOTS)
#define CYTHON_USE_ASYNC_SLOTS 1
#endif
#if PY_VERSION_HEX < 0x02070000
#undef CYTHON_USE_PYLONG_INTERNALS
#define CYTHON_USE_PYLONG_INTERNALS 0
#elif !defined(CYTHON_USE_PYLONG_INTERNALS)
#define CYTHON_USE_PYLONG_INTERNALS 1
#endif
#ifndef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 1
#endif
#ifndef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 1
#endif
#if PY_VERSION_HEX < 0x030300F0
#undef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
#elif !defined(CYTHON_USE_UNICODE_WRITER)
#define CYTHON_USE_UNICODE_WRITER 1
#endif
#ifndef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 0
#endif
#ifndef CYTHON_ASSUME_SAFE_MACROS
#define CYTHON_ASSUME_SAFE_MACROS 1
#endif
#ifndef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 1
#endif
#ifndef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 1
#endif
#ifndef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 1
#endif
#ifndef CYTHON_PEP489_MULTI_PHASE_INIT
#define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
#endif
#ifndef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
#endif
#ifndef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
#endif
#ifndef CYTHON_USE_EXC_INFO_STACK
#define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
#endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#undef SHIFT
#undef BASE
#undef MASK
#ifdef SIZEOF_VOID_P
enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
#endif
#endif
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
#define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
#if defined(__GNUC__)
#define CYTHON_RESTRICT __restrict__
#elif defined(_MSC_VER) && _MSC_VER >= 1400
#define CYTHON_RESTRICT __restrict
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define CYTHON_RESTRICT restrict
#else
#define CYTHON_RESTRICT
#endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
# define CYTHON_UNUSED __attribute__ ((__unused__))
# else
# define CYTHON_UNUSED
# endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
# define CYTHON_UNUSED __attribute__ ((__unused__))
# else
# define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
# if defined(__cplusplus)
template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
# else
# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
# endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
# define CYTHON_NCP_UNUSED
# else
# define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
#ifndef _MSC_STDINT_H_
#if _MSC_VER < 1300
typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
#else
typedef unsigned __int8 uint8_t;
typedef unsigned __int32 uint32_t;
#endif
#endif
#else
#include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
#if defined(__cplusplus) && __cplusplus >= 201103L
#if __has_cpp_attribute(fallthrough)
#define CYTHON_FALLTHROUGH [[fallthrough]]
#elif __has_cpp_attribute(clang::fallthrough)
#define CYTHON_FALLTHROUGH [[clang::fallthrough]]
#elif __has_cpp_attribute(gnu::fallthrough)
#define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
#endif
#endif
#ifndef CYTHON_FALLTHROUGH
#if __has_attribute(fallthrough)
#define CYTHON_FALLTHROUGH __attribute__((fallthrough))
#else
#define CYTHON_FALLTHROUGH
#endif
#endif
#if defined(__clang__ ) && defined(__apple_build_version__)
#if __apple_build_version__ < 7000000
#undef CYTHON_FALLTHROUGH
#define CYTHON_FALLTHROUGH
#endif
#endif
#endif
#ifndef __cplusplus
#error "Cython files generated with the C++ option must be compiled with a C++ compiler."
#endif
#ifndef CYTHON_INLINE
#if defined(__clang__)
#define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
#else
#define CYTHON_INLINE inline
#endif
#endif
template<typename T>
void __Pyx_call_destructor(T& x) {
x.~T();
}
template<typename T>
class __Pyx_FakeReference {
public:
__Pyx_FakeReference() : ptr(NULL) { }
__Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
T *operator->() { return ptr; }
T *operator&() { return ptr; }
operator T&() { return *ptr; }
template<typename U> bool operator ==(U other) { return *ptr == other; }
template<typename U> bool operator !=(U other) { return *ptr != other; }
private:
T *ptr;
};
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
#define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
#define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
#define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
#define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
#define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
#ifndef METH_FASTCALL
#define METH_FASTCALL 0x80
#endif
typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
Py_ssize_t nargs, PyObject *kwnames);
#else
#define __Pyx_PyCFunctionFast _PyCFunctionFast
#define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
#define PyObject_Malloc(s) PyMem_Malloc(s)
#define PyObject_Free(p) PyMem_Free(p)
#define PyObject_Realloc(p) PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
#define PyMem_RawMalloc(n) PyMem_Malloc(n)
#define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
#define PyMem_RawFree(p) PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
#define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
#define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
#define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
#define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
#define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
#define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
*key = PyThread_create_key();
return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
*key = Py_tss_NEEDS_INIT;
return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
PyThread_delete_key(*key);
*key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n) PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
#else
#define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
#define CYTHON_PEP393_ENABLED 1
#define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
0 : _PyUnicode_Ready((PyObject *)(op)))
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
#define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
#define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
#define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
#define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
#if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
#endif
#else
#define CYTHON_PEP393_ENABLED 0
#define PyUnicode_1BYTE_KIND 1
#define PyUnicode_2BYTE_KIND 2
#define PyUnicode_4BYTE_KIND 4
#define __Pyx_PyUnicode_READY(op) (0)
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
#define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
#define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
#define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
#define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
#else
#define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
#define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
#define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
#define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
#define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
#else
#define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
#define PyObject_ASCII(o) PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
#define PyBaseString_Type PyUnicode_Type
#define PyStringObject PyUnicodeObject
#define PyString_Type PyUnicode_Type
#define PyString_Check PyUnicode_Check
#define PyString_CheckExact PyUnicode_CheckExact
#ifndef PyObject_Unicode
#define PyObject_Unicode PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
#define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
#define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
#define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
#define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
#define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
#define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
#define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
#define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
#define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
#else
#define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
#define PyIntObject PyLongObject
#define PyInt_Type PyLong_Type
#define PyInt_Check(op) PyLong_Check(op)
#define PyInt_CheckExact(op) PyLong_CheckExact(op)
#define PyInt_FromString PyLong_FromString
#define PyInt_FromUnicode PyLong_FromUnicode
#define PyInt_FromLong PyLong_FromLong
#define PyInt_FromSize_t PyLong_FromSize_t
#define PyInt_FromSsize_t PyLong_FromSsize_t
#define PyInt_AsLong PyLong_AsLong
#define PyInt_AS_LONG PyLong_AS_LONG
#define PyInt_AsSsize_t PyLong_AsSsize_t
#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#define PyNumber_Int PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
#define PyBoolObject PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
#ifndef PyUnicode_InternFromString
#define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
#endif
#endif
#if PY_VERSION_HEX < 0x030200A4
typedef long Py_hash_t;
#define __Pyx_PyInt_FromHash_t PyInt_FromLong
#define __Pyx_PyInt_AsHash_t PyInt_AsLong
#else
#define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
#define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
#else
#define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
#if PY_VERSION_HEX >= 0x030500B1
#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
#else
#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
#endif
#else
#define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
typedef struct {
unaryfunc am_await;
unaryfunc am_aiter;
unaryfunc am_anext;
} __Pyx_PyAsyncMethodsStruct;
#endif
#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
float value;
memset(&value, 0xFF, sizeof(value));
return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif
#define __PYX_MARK_ERR_POS(f_index, lineno) \
{ __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
{ __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
#ifndef __PYX_EXTERN_C
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
#endif
#define __PYX_HAVE__graphsaint__cython_utils
#define __PYX_HAVE_API__graphsaint__cython_utils
/* Early includes */
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#include <vector>
#include <string.h>
#include <stdio.h>
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
/* NumPy API declarations from "numpy/__init__.pxd" */
#include <utility>
#if __cplusplus > 199711L
#include <type_traits>
namespace cython_std {
template <typename T> typename std::remove_reference<T>::type&& move(T& t) noexcept { return std::move(t); }
template <typename T> typename std::remove_reference<T>::type&& move(T&& t) noexcept { return std::move(t); }
}
#endif
#include <map>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */
#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif
typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
(sizeof(type) < sizeof(Py_ssize_t)) ||\
(sizeof(type) > sizeof(Py_ssize_t) &&\
likely(v < (type)PY_SSIZE_T_MAX ||\
v == (type)PY_SSIZE_T_MAX) &&\
(!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
v == (type)PY_SSIZE_T_MIN))) ||\
(sizeof(type) == sizeof(Py_ssize_t) &&\
(is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
v == (type)PY_SSIZE_T_MAX))) )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
#include <cstdlib>
#define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
#define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
#define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
#define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
#define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
#define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
#define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
#define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
const Py_UNICODE *u_end = u;
while (*u_end++) ;
return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
(likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
PyObject* sys;
PyObject* default_encoding = NULL;
PyObject* ascii_chars_u = NULL;
PyObject* ascii_chars_b = NULL;
const char* default_encoding_c;
sys = PyImport_ImportModule("sys");
if (!sys) goto bad;
default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
Py_DECREF(sys);
if (!default_encoding) goto bad;
default_encoding_c = PyBytes_AsString(default_encoding);
if (!default_encoding_c) goto bad;
if (strcmp(default_encoding_c, "ascii") == 0) {
__Pyx_sys_getdefaultencoding_not_ascii = 0;
} else {
char ascii_chars[128];
int c;
for (c = 0; c < 128; c++) {
ascii_chars[c] = c;
}
__Pyx_sys_getdefaultencoding_not_ascii = 1;
ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
if (!ascii_chars_u) goto bad;
ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
PyErr_Format(
PyExc_ValueError,
"This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
default_encoding_c);
goto bad;
}
Py_DECREF(ascii_chars_u);
Py_DECREF(ascii_chars_b);
}
Py_DECREF(default_encoding);
return 0;
bad:
Py_XDECREF(default_encoding);
Py_XDECREF(ascii_chars_u);
Py_XDECREF(ascii_chars_b);
return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
PyObject* sys;
PyObject* default_encoding = NULL;
char* default_encoding_c;
sys = PyImport_ImportModule("sys");
if (!sys) goto bad;
default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
Py_DECREF(sys);
if (!default_encoding) goto bad;
default_encoding_c = PyBytes_AsString(default_encoding);
if (!default_encoding_c) goto bad;
__PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
Py_DECREF(default_encoding);
return 0;
bad:
Py_XDECREF(default_encoding);
return -1;
}
#endif
#endif
/* Test for GCC > 2.95 */
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
#define likely(x) (x)
#define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;
/* Header.proto */
#if !defined(CYTHON_CCOMPLEX)
#if defined(__cplusplus)
#define CYTHON_CCOMPLEX 1
#elif defined(_Complex_I)
#define CYTHON_CCOMPLEX 1
#else
#define CYTHON_CCOMPLEX 0
#endif
#endif
#if CYTHON_CCOMPLEX
#ifdef __cplusplus
#include <complex>
#else
#include <complex.h>
#endif
#endif
#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
#undef _Complex_I
#define _Complex_I 1.0fj
#endif
static const char *__pyx_f[] = {
"stringsource",
"__init__.pxd",
"graphsaint/cython_utils.pxd",
"graphsaint/cython_utils.pyx",
"type.pxd",
};
/* BufferFormatStructs.proto */
#define IS_UNSIGNED(type) (((type) -1) > 0)
struct __Pyx_StructField_;
#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
typedef struct {
const char* name;
struct __Pyx_StructField_* fields;
size_t size;
size_t arraysize[8];
int ndim;
char typegroup;
char is_unsigned;
int flags;
} __Pyx_TypeInfo;
typedef struct __Pyx_StructField_ {
__Pyx_TypeInfo* type;
const char* name;
size_t offset;
} __Pyx_StructField;
typedef struct {
__Pyx_StructField* field;
size_t parent_offset;
} __Pyx_BufFmt_StackElem;
typedef struct {
__Pyx_StructField root;
__Pyx_BufFmt_StackElem* head;
size_t fmt_offset;
size_t new_count, enc_count;
size_t struct_alignment;
int is_complex;
char enc_type;
char new_packmode;
char enc_packmode;
char is_valid_array;
} __Pyx_BufFmt_Context;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":689
* # in Cython to enable them only on the right systems.
*
* ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t
*/
typedef npy_int8 __pyx_t_5numpy_int8_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":690
*
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
* ctypedef npy_int32 int32_t
* ctypedef npy_int64 int64_t
*/
typedef npy_int16 __pyx_t_5numpy_int16_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":691
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
* ctypedef npy_int64 int64_t
* #ctypedef npy_int96 int96_t
*/
typedef npy_int32 __pyx_t_5numpy_int32_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":692
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t
* ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
* #ctypedef npy_int96 int96_t
* #ctypedef npy_int128 int128_t
*/
typedef npy_int64 __pyx_t_5numpy_int64_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":696
* #ctypedef npy_int128 int128_t
*
* ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t
*/
typedef npy_uint8 __pyx_t_5numpy_uint8_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":697
*
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
* ctypedef npy_uint32 uint32_t
* ctypedef npy_uint64 uint64_t
*/
typedef npy_uint16 __pyx_t_5numpy_uint16_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":698
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
* ctypedef npy_uint64 uint64_t
* #ctypedef npy_uint96 uint96_t
*/
typedef npy_uint32 __pyx_t_5numpy_uint32_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":699
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t
* ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
* #ctypedef npy_uint96 uint96_t
* #ctypedef npy_uint128 uint128_t
*/
typedef npy_uint64 __pyx_t_5numpy_uint64_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":703
* #ctypedef npy_uint128 uint128_t
*
* ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
* ctypedef npy_float64 float64_t
* #ctypedef npy_float80 float80_t
*/
typedef npy_float32 __pyx_t_5numpy_float32_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":704
*
* ctypedef npy_float32 float32_t
* ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
* #ctypedef npy_float80 float80_t
* #ctypedef npy_float128 float128_t
*/
typedef npy_float64 __pyx_t_5numpy_float64_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":713
* # The int types are mapped a bit surprising --
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t # <<<<<<<<<<<<<<
* ctypedef npy_longlong long_t
* ctypedef npy_longlong longlong_t
*/
typedef npy_long __pyx_t_5numpy_int_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":714
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
* ctypedef npy_longlong longlong_t
*
*/
typedef npy_longlong __pyx_t_5numpy_long_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":715
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t
* ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
*
* ctypedef npy_ulong uint_t
*/
typedef npy_longlong __pyx_t_5numpy_longlong_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":717
* ctypedef npy_longlong longlong_t
*
* ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
* ctypedef npy_ulonglong ulong_t
* ctypedef npy_ulonglong ulonglong_t
*/
typedef npy_ulong __pyx_t_5numpy_uint_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":718
*
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
* ctypedef npy_ulonglong ulonglong_t
*
*/
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":719
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t
* ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
*
* ctypedef npy_intp intp_t
*/
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":721
* ctypedef npy_ulonglong ulonglong_t
*
* ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
* ctypedef npy_uintp uintp_t
*
*/
typedef npy_intp __pyx_t_5numpy_intp_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":722
*
* ctypedef npy_intp intp_t
* ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
*
* ctypedef npy_double float_t
*/
typedef npy_uintp __pyx_t_5numpy_uintp_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":724
* ctypedef npy_uintp uintp_t
*
* ctypedef npy_double float_t # <<<<<<<<<<<<<<
* ctypedef npy_double double_t
* ctypedef npy_longdouble longdouble_t
*/
typedef npy_double __pyx_t_5numpy_float_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":725
*
* ctypedef npy_double float_t
* ctypedef npy_double double_t # <<<<<<<<<<<<<<
* ctypedef npy_longdouble longdouble_t
*
*/
typedef npy_double __pyx_t_5numpy_double_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":726
* ctypedef npy_double float_t
* ctypedef npy_double double_t
* ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
*
* ctypedef npy_cfloat cfloat_t
*/
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
/* Declarations.proto */
#if CYTHON_CCOMPLEX
#ifdef __cplusplus
typedef ::std::complex< float > __pyx_t_float_complex;
#else
typedef float _Complex __pyx_t_float_complex;
#endif
#else
typedef struct { float real, imag; } __pyx_t_float_complex;
#endif
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
/* Declarations.proto */
#if CYTHON_CCOMPLEX
#ifdef __cplusplus
typedef ::std::complex< double > __pyx_t_double_complex;
#else
typedef double _Complex __pyx_t_double_complex;
#endif
#else
typedef struct { double real, imag; } __pyx_t_double_complex;
#endif
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
/*--- Type declarations ---*/
struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float;
struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":728
* ctypedef npy_longdouble longdouble_t
*
* ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
* ctypedef npy_cdouble cdouble_t
* ctypedef npy_clongdouble clongdouble_t
*/
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":729
*
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
* ctypedef npy_clongdouble clongdouble_t
*
*/
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":730
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t
* ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
*
* ctypedef npy_cdouble complex_t
*/
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":732
* ctypedef npy_clongdouble clongdouble_t
*
* ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
*
* cdef inline object PyArray_MultiIterNew1(a):
*/
typedef npy_cdouble __pyx_t_5numpy_complex_t;
/* "graphsaint/cython_utils.pxd":16
*
*
* cdef class array_wrapper_float: # <<<<<<<<<<<<<<
* cdef vector[float] vec
* cdef Py_ssize_t shape[1]
*/
struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float {
PyObject_HEAD
struct __pyx_vtabstruct_10graphsaint_12cython_utils_array_wrapper_float *__pyx_vtab;
std::vector<float> vec;
Py_ssize_t shape[1];
Py_ssize_t strides[1];
};
/* "graphsaint/cython_utils.pxd":22
* cdef void set_data(self,vector[float]& data)
*
* cdef class array_wrapper_int: # <<<<<<<<<<<<<<
* cdef vector[int] vec
* cdef Py_ssize_t shape[1]
*/
struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int {
PyObject_HEAD
struct __pyx_vtabstruct_10graphsaint_12cython_utils_array_wrapper_int *__pyx_vtab;
std::vector<int> vec;
Py_ssize_t shape[1];
Py_ssize_t strides[1];
};
/* "graphsaint/cython_utils.pyx":18
*
* # reference: https://stackoverflow.com/questions/45133276/passing-c-vector-to-numpy-through-cython-without-copying-and-taking-care-of-me
* cdef class array_wrapper_float: # <<<<<<<<<<<<<<
*
* cdef void set_data(self, vector[float]& data):
*/
struct __pyx_vtabstruct_10graphsaint_12cython_utils_array_wrapper_float {
void (*set_data)(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *, std::vector<float> &);
};
static struct __pyx_vtabstruct_10graphsaint_12cython_utils_array_wrapper_float *__pyx_vtabptr_10graphsaint_12cython_utils_array_wrapper_float;
/* "graphsaint/cython_utils.pyx":46
*
*
* cdef class array_wrapper_int: # <<<<<<<<<<<<<<
*
* cdef void set_data(self, vector[int]& data):
*/
struct __pyx_vtabstruct_10graphsaint_12cython_utils_array_wrapper_int {
void (*set_data)(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *, std::vector<int> &);
};
static struct __pyx_vtabstruct_10graphsaint_12cython_utils_array_wrapper_int *__pyx_vtabptr_10graphsaint_12cython_utils_array_wrapper_int;
/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
#define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
typedef struct {
void (*INCREF)(void*, PyObject*, int);
void (*DECREF)(void*, PyObject*, int);
void (*GOTREF)(void*, PyObject*, int);
void (*GIVEREF)(void*, PyObject*, int);
void* (*SetupContext)(const char*, int, const char*);
void (*FinishContext)(void**);
} __Pyx_RefNannyAPIStruct;
static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
#define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
#define __Pyx_RefNannySetupContext(name, acquire_gil)\
if (acquire_gil) {\
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
PyGILState_Release(__pyx_gilstate_save);\
} else {\
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
}
#else
#define __Pyx_RefNannySetupContext(name, acquire_gil)\
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
#define __Pyx_RefNannyFinishContext()\
__Pyx_RefNanny->FinishContext(&__pyx_refnanny)
#define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
#define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
#define __Pyx_RefNannyDeclarations
#define __Pyx_RefNannySetupContext(name, acquire_gil)
#define __Pyx_RefNannyFinishContext()
#define __Pyx_INCREF(r) Py_INCREF(r)
#define __Pyx_DECREF(r) Py_DECREF(r)
#define __Pyx_GOTREF(r)
#define __Pyx_GIVEREF(r)
#define __Pyx_XINCREF(r) Py_XINCREF(r)
#define __Pyx_XDECREF(r) Py_XDECREF(r)
#define __Pyx_XGOTREF(r)
#define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
PyObject *tmp = (PyObject *) r;\
r = v; __Pyx_XDECREF(tmp);\
} while (0)
#define __Pyx_DECREF_SET(r, v) do {\
PyObject *tmp = (PyObject *) r;\
r = v; __Pyx_DECREF(tmp);\
} while (0)
#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
#endif
/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred() PyErr_Occurred()
#endif
/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
#endif
/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif
/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);
/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
(version_var) = __PYX_GET_DICT_VERSION(dict);\
(cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
static PY_UINT64_T __pyx_dict_version = 0;\
static PyObject *__pyx_dict_cached_value = NULL;\
if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
(VAR) = __pyx_dict_cached_value;\
} else {\
(VAR) = __pyx_dict_cached_value = (LOOKUP);\
__pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
}\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict) (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
#endif
/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name) {\
static PY_UINT64_T __pyx_dict_version = 0;\
static PyObject *__pyx_dict_cached_value = NULL;\
(var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
(likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
__Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
#define __Pyx_GetModuleGlobalNameUncached(var, name) {\
PY_UINT64_T __pyx_dict_version;\
PyObject *__pyx_dict_cached_value;\
(var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif
/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
const char* function_name);
/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
#endif
/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
__Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
(sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
static size_t __pyx_pyframe_localsplus_offset = 0;
#include "frameobject.h"
#define __Pxy_PyFrame_Initialize_Offsets()\
((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
(void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
#define __Pyx_PyFrame_GetLocalsplus(frame)\
(assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif
/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif
/* PyObjectCall2Args.proto */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif
/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
__Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
(is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
__Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
__Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
(PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
__Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
(PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
int is_list, int wraparound, int boundscheck);
/* IncludeStringH.proto */
#include <string.h>
/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif
/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
#endif
/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif
/* IsLittleEndian.proto */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
/* BufferFormatCheck.proto */
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
__Pyx_BufFmt_StackElem* stack,
__Pyx_TypeInfo* type);
/* BufferGetAndValidate.proto */
#define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\
((obj == Py_None || obj == NULL) ?\
(__Pyx_ZeroBuffer(buf), 0) :\
__Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack))
static int __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
__Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
static void __Pyx_ZeroBuffer(Py_buffer* buf);
static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 };
static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
/* BufferIndexError.proto */
static void __Pyx_RaiseBufferIndexError(int axis);
#define __Pyx_BufPtrCContig1d(type, buf, i0, s0) ((type)buf + i0)
/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
int lineno, const char *filename,
int full_traceback, int nogil);
/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
PyListObject* L = (PyListObject*) list;
Py_ssize_t len = Py_SIZE(list);
if (likely(L->allocated > len)) {
Py_INCREF(x);
PyList_SET_ITEM(list, len, x);
__Pyx_SET_SIZE(list, len + 1);
return 0;
}
return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif
/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif
/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif
/* SetVTable.proto */
static int __Pyx_SetVtable(PyObject *dict, void *vtable);
/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);
/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum __Pyx_ImportType_CheckSize {
__Pyx_ImportType_CheckSize_Error = 0,
__Pyx_ImportType_CheckSize_Warn = 1,
__Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
#endif
/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif
/* CodeObjectCache.proto */
typedef struct {
PyCodeObject* code_object;
int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
int count;
int max_count;
__Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
int py_line, const char *filename);
/* None.proto */
#include <new>
/* BufferStructDeclare.proto */
typedef struct {
Py_ssize_t shape, strides, suboffsets;
} __Pyx_Buf_DimInfo;
typedef struct {
size_t refcount;
Py_buffer pybuffer;
} __Pyx_Buffer;
typedef struct {
__Pyx_Buffer *rcbuffer;
char *data;
__Pyx_Buf_DimInfo diminfo[8];
} __Pyx_LocalBuf_ND;
#if PY_MAJOR_VERSION < 3
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
static void __Pyx_ReleaseBuffer(Py_buffer *view);
#else
#define __Pyx_GetBuffer PyObject_GetBuffer
#define __Pyx_ReleaseBuffer PyBuffer_Release
#endif
/* CppExceptionConversion.proto */
#ifndef __Pyx_CppExn2PyErr
#include <new>
#include <typeinfo>
#include <stdexcept>
#include <ios>
static void __Pyx_CppExn2PyErr() {
try {
if (PyErr_Occurred())
; // let the latest Python exn pass through and ignore the current one
else
throw;
} catch (const std::bad_alloc& exn) {
PyErr_SetString(PyExc_MemoryError, exn.what());
} catch (const std::bad_cast& exn) {
PyErr_SetString(PyExc_TypeError, exn.what());
} catch (const std::bad_typeid& exn) {
PyErr_SetString(PyExc_TypeError, exn.what());
} catch (const std::domain_error& exn) {
PyErr_SetString(PyExc_ValueError, exn.what());
} catch (const std::invalid_argument& exn) {
PyErr_SetString(PyExc_ValueError, exn.what());
} catch (const std::ios_base::failure& exn) {
PyErr_SetString(PyExc_IOError, exn.what());
} catch (const std::out_of_range& exn) {
PyErr_SetString(PyExc_IndexError, exn.what());
} catch (const std::overflow_error& exn) {
PyErr_SetString(PyExc_OverflowError, exn.what());
} catch (const std::range_error& exn) {
PyErr_SetString(PyExc_ArithmeticError, exn.what());
} catch (const std::underflow_error& exn) {
PyErr_SetString(PyExc_ArithmeticError, exn.what());
} catch (const std::exception& exn) {
PyErr_SetString(PyExc_RuntimeError, exn.what());
}
catch (...)
{
PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
}
}
#endif
/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
/* RealImag.proto */
#if CYTHON_CCOMPLEX
#ifdef __cplusplus
#define __Pyx_CREAL(z) ((z).real())
#define __Pyx_CIMAG(z) ((z).imag())
#else
#define __Pyx_CREAL(z) (__real__(z))
#define __Pyx_CIMAG(z) (__imag__(z))
#endif
#else
#define __Pyx_CREAL(z) ((z).real)
#define __Pyx_CIMAG(z) ((z).imag)
#endif
#if defined(__cplusplus) && CYTHON_CCOMPLEX\
&& (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
#define __Pyx_SET_CREAL(z,x) ((z).real(x))
#define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
#else
#define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
#define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
#endif
/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
#define __Pyx_c_eq_float(a, b) ((a)==(b))
#define __Pyx_c_sum_float(a, b) ((a)+(b))
#define __Pyx_c_diff_float(a, b) ((a)-(b))
#define __Pyx_c_prod_float(a, b) ((a)*(b))
#define __Pyx_c_quot_float(a, b) ((a)/(b))
#define __Pyx_c_neg_float(a) (-(a))
#ifdef __cplusplus
#define __Pyx_c_is_zero_float(z) ((z)==(float)0)
#define __Pyx_c_conj_float(z) (::std::conj(z))
#if 1
#define __Pyx_c_abs_float(z) (::std::abs(z))
#define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
#endif
#else
#define __Pyx_c_is_zero_float(z) ((z)==0)
#define __Pyx_c_conj_float(z) (conjf(z))
#if 1
#define __Pyx_c_abs_float(z) (cabsf(z))
#define __Pyx_c_pow_float(a, b) (cpowf(a, b))
#endif
#endif
#else
static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
#if 1
static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
#endif
#endif
/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
#define __Pyx_c_eq_double(a, b) ((a)==(b))
#define __Pyx_c_sum_double(a, b) ((a)+(b))
#define __Pyx_c_diff_double(a, b) ((a)-(b))
#define __Pyx_c_prod_double(a, b) ((a)*(b))
#define __Pyx_c_quot_double(a, b) ((a)/(b))
#define __Pyx_c_neg_double(a) (-(a))
#ifdef __cplusplus
#define __Pyx_c_is_zero_double(z) ((z)==(double)0)
#define __Pyx_c_conj_double(z) (::std::conj(z))
#if 1
#define __Pyx_c_abs_double(z) (::std::abs(z))
#define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
#endif
#else
#define __Pyx_c_is_zero_double(z) ((z)==0)
#define __Pyx_c_conj_double(z) (conj(z))
#if 1
#define __Pyx_c_abs_double(z) (cabs(z))
#define __Pyx_c_pow_double(a, b) (cpow(a, b))
#endif
#endif
#else
static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
#if 1
static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
#endif
#endif
/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
/* CIntFromPy.proto */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);
/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
static void __pyx_f_10graphsaint_12cython_utils_19array_wrapper_float_set_data(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *__pyx_v_self, std::vector<float> &__pyx_v_data); /* proto*/
static void __pyx_f_10graphsaint_12cython_utils_17array_wrapper_int_set_data(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *__pyx_v_self, std::vector<int> &__pyx_v_data); /* proto*/
/* Module declarations from 'libcpp.vector' */
/* Module declarations from 'cython' */
/* Module declarations from 'cpython.buffer' */
/* Module declarations from 'libc.string' */
/* Module declarations from 'libc.stdio' */
/* Module declarations from '__builtin__' */
/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
/* Module declarations from 'cpython' */
/* Module declarations from 'cpython.object' */
/* Module declarations from 'cpython.ref' */
/* Module declarations from 'cpython.mem' */
/* Module declarations from 'numpy' */
/* Module declarations from 'numpy' */
static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
/* Module declarations from 'libcpp.utility' */
/* Module declarations from 'libcpp.map' */
/* Module declarations from 'graphsaint.cython_utils' */
static PyTypeObject *__pyx_ptype_10graphsaint_12cython_utils_array_wrapper_float = 0;
static PyTypeObject *__pyx_ptype_10graphsaint_12cython_utils_array_wrapper_int = 0;
static PyObject *__pyx_f_10graphsaint_12cython_utils___pyx_unpickle_array_wrapper_float__set_state(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *, PyObject *); /*proto*/
static PyObject *__pyx_f_10graphsaint_12cython_utils___pyx_unpickle_array_wrapper_int__set_state(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_py_Py_ssize_t(Py_ssize_t *, Py_ssize_t); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_Py_ssize_t(Py_ssize_t *, Py_ssize_t); /*proto*/
static int __Pyx_carray_from_py_Py_ssize_t(PyObject *, Py_ssize_t *, Py_ssize_t); /*proto*/
static PyObject *__pyx_convert_vector_to_py_float(const std::vector<float> &); /*proto*/
static std::vector<float> __pyx_convert_vector_from_py_float(PyObject *); /*proto*/
static PyObject *__pyx_convert_vector_to_py_int(const std::vector<int> &); /*proto*/
static std::vector<int> __pyx_convert_vector_from_py_int(PyObject *); /*proto*/
static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_float = { "float", NULL, sizeof(float), { 0 }, 0, 'R', 0, 0 };
#define __Pyx_MODULE_NAME "graphsaint.cython_utils"
extern int __pyx_module_is_main_graphsaint__cython_utils;
int __pyx_module_is_main_graphsaint__cython_utils = 0;
/* Implementation of 'graphsaint.cython_utils' */
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_OverflowError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_IndexError;
static const char __pyx_k_np[] = "np";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_OverflowError[] = "OverflowError";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_array_wrapper_int[] = "array_wrapper_int";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_array_wrapper_float[] = "array_wrapper_float";
static const char __pyx_k_graphsaint_cython_utils[] = "graphsaint.cython_utils";
static const char __pyx_k_pyx_unpickle_array_wrapper_flo[] = "__pyx_unpickle_array_wrapper_float";
static const char __pyx_k_pyx_unpickle_array_wrapper_int[] = "__pyx_unpickle_array_wrapper_int";
static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
static const char __pyx_k_Incompatible_checksums_s_vs_0x7f[] = "Incompatible checksums (%s vs 0x7f2da05 = (shape, strides, vec))";
static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x7f;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_n_s_OverflowError;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_array_wrapper_float;
static PyObject *__pyx_n_s_array_wrapper_int;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_graphsaint_cython_utils;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_np;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_kp_u_numpy_core_multiarray_failed_to;
static PyObject *__pyx_kp_u_numpy_core_umath_failed_to_impor;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_array_wrapper_flo;
static PyObject *__pyx_n_s_pyx_unpickle_array_wrapper_int;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_time;
static PyObject *__pyx_n_s_update;
static int __pyx_pf_10graphsaint_12cython_utils_19array_wrapper_float___getbuffer__(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags); /* proto */
static void __pyx_pf_10graphsaint_12cython_utils_19array_wrapper_float_2__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer); /* proto */
static PyObject *__pyx_pf_10graphsaint_12cython_utils_19array_wrapper_float_4__reduce_cython__(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_10graphsaint_12cython_utils_19array_wrapper_float_6__setstate_cython__(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_10graphsaint_12cython_utils_17array_wrapper_int___getbuffer__(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags); /* proto */
static void __pyx_pf_10graphsaint_12cython_utils_17array_wrapper_int_2__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer); /* proto */
static PyObject *__pyx_pf_10graphsaint_12cython_utils_17array_wrapper_int_4__reduce_cython__(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_10graphsaint_12cython_utils_17array_wrapper_int_6__setstate_cython__(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_10graphsaint_12cython_utils___pyx_unpickle_array_wrapper_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_10graphsaint_12cython_utils_2__pyx_unpickle_array_wrapper_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_10graphsaint_12cython_utils_array_wrapper_float(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_10graphsaint_12cython_utils_array_wrapper_int(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_int_133356037;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_codeobj__4;
static PyObject *__pyx_codeobj__6;
/* Late includes */
/* "graphsaint/cython_utils.pyx":20
* cdef class array_wrapper_float:
*
* cdef void set_data(self, vector[float]& data): # <<<<<<<<<<<<<<
* self.vec = move(data)
*
*/
static void __pyx_f_10graphsaint_12cython_utils_19array_wrapper_float_set_data(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *__pyx_v_self, std::vector<float> &__pyx_v_data) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_data", 0);
/* "graphsaint/cython_utils.pyx":21
*
* cdef void set_data(self, vector[float]& data):
* self.vec = move(data) # <<<<<<<<<<<<<<
*
* # now implement the buffer protocol for the class
*/
__pyx_v_self->vec = std::move<std::vector<float> &>(__pyx_v_data);
/* "graphsaint/cython_utils.pyx":20
* cdef class array_wrapper_float:
*
* cdef void set_data(self, vector[float]& data): # <<<<<<<<<<<<<<
* self.vec = move(data)
*
*/
/* function exit code */
__Pyx_RefNannyFinishContext();
}
/* "graphsaint/cython_utils.pyx":25
* # now implement the buffer protocol for the class
* # which makes it generally useful to anything that expects an array
* def __getbuffer__(self, Py_buffer *buffer, int flags): # <<<<<<<<<<<<<<
* # relevant documentation http://cython.readthedocs.io/en/latest/src/userguide/buffer.html#a-matrix-class
* cdef Py_ssize_t itemsize = sizeof(self.vec[0])
*/
/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_10graphsaint_12cython_utils_19array_wrapper_float_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_10graphsaint_12cython_utils_19array_wrapper_float_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
__pyx_r = __pyx_pf_10graphsaint_12cython_utils_19array_wrapper_float___getbuffer__(((struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static int __pyx_pf_10graphsaint_12cython_utils_19array_wrapper_float___getbuffer__(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags) {
Py_ssize_t __pyx_v_itemsize;
int __pyx_r;
__Pyx_RefNannyDeclarations
Py_ssize_t *__pyx_t_1;
if (__pyx_v_buffer == NULL) {
PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
return -1;
}
__Pyx_RefNannySetupContext("__getbuffer__", 0);
__pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None);
__Pyx_GIVEREF(__pyx_v_buffer->obj);
/* "graphsaint/cython_utils.pyx":27
* def __getbuffer__(self, Py_buffer *buffer, int flags):
* # relevant documentation http://cython.readthedocs.io/en/latest/src/userguide/buffer.html#a-matrix-class
* cdef Py_ssize_t itemsize = sizeof(self.vec[0]) # <<<<<<<<<<<<<<
* self.shape[0] = self.vec.size()
* self.strides[0] = sizeof(float)
*/
__pyx_v_itemsize = (sizeof((__pyx_v_self->vec[0])));
/* "graphsaint/cython_utils.pyx":28
* # relevant documentation http://cython.readthedocs.io/en/latest/src/userguide/buffer.html#a-matrix-class
* cdef Py_ssize_t itemsize = sizeof(self.vec[0])
* self.shape[0] = self.vec.size() # <<<<<<<<<<<<<<
* self.strides[0] = sizeof(float)
* buffer.buf = <char *>&(self.vec[0])
*/
(__pyx_v_self->shape[0]) = __pyx_v_self->vec.size();
/* "graphsaint/cython_utils.pyx":29
* cdef Py_ssize_t itemsize = sizeof(self.vec[0])
* self.shape[0] = self.vec.size()
* self.strides[0] = sizeof(float) # <<<<<<<<<<<<<<
* buffer.buf = <char *>&(self.vec[0])
* buffer.format = 'f'
*/
(__pyx_v_self->strides[0]) = (sizeof(float));
/* "graphsaint/cython_utils.pyx":30
* self.shape[0] = self.vec.size()
* self.strides[0] = sizeof(float)
* buffer.buf = <char *>&(self.vec[0]) # <<<<<<<<<<<<<<
* buffer.format = 'f'
* buffer.internal = NULL
*/
__pyx_v_buffer->buf = ((char *)(&(__pyx_v_self->vec[0])));
/* "graphsaint/cython_utils.pyx":31
* self.strides[0] = sizeof(float)
* buffer.buf = <char *>&(self.vec[0])
* buffer.format = 'f' # <<<<<<<<<<<<<<
* buffer.internal = NULL
* buffer.itemsize = itemsize
*/
__pyx_v_buffer->format = ((char *)"f");
/* "graphsaint/cython_utils.pyx":32
* buffer.buf = <char *>&(self.vec[0])
* buffer.format = 'f'
* buffer.internal = NULL # <<<<<<<<<<<<<<
* buffer.itemsize = itemsize
* buffer.len = self.vec.size() * itemsize
*/
__pyx_v_buffer->internal = NULL;
/* "graphsaint/cython_utils.pyx":33
* buffer.format = 'f'
* buffer.internal = NULL
* buffer.itemsize = itemsize # <<<<<<<<<<<<<<
* buffer.len = self.vec.size() * itemsize
* buffer.ndim = 1
*/
__pyx_v_buffer->itemsize = __pyx_v_itemsize;
/* "graphsaint/cython_utils.pyx":34
* buffer.internal = NULL
* buffer.itemsize = itemsize
* buffer.len = self.vec.size() * itemsize # <<<<<<<<<<<<<<
* buffer.ndim = 1
* buffer.obj = self
*/
__pyx_v_buffer->len = (__pyx_v_self->vec.size() * __pyx_v_itemsize);
/* "graphsaint/cython_utils.pyx":35
* buffer.itemsize = itemsize
* buffer.len = self.vec.size() * itemsize
* buffer.ndim = 1 # <<<<<<<<<<<<<<
* buffer.obj = self
* buffer.readonly = 0
*/
__pyx_v_buffer->ndim = 1;
/* "graphsaint/cython_utils.pyx":36
* buffer.len = self.vec.size() * itemsize
* buffer.ndim = 1
* buffer.obj = self # <<<<<<<<<<<<<<
* buffer.readonly = 0
* buffer.shape = self.shape
*/
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
__Pyx_GOTREF(__pyx_v_buffer->obj);
__Pyx_DECREF(__pyx_v_buffer->obj);
__pyx_v_buffer->obj = ((PyObject *)__pyx_v_self);
/* "graphsaint/cython_utils.pyx":37
* buffer.ndim = 1
* buffer.obj = self
* buffer.readonly = 0 # <<<<<<<<<<<<<<
* buffer.shape = self.shape
* buffer.strides = self.strides
*/
__pyx_v_buffer->readonly = 0;
/* "graphsaint/cython_utils.pyx":38
* buffer.obj = self
* buffer.readonly = 0
* buffer.shape = self.shape # <<<<<<<<<<<<<<
* buffer.strides = self.strides
* buffer.suboffsets = NULL
*/
__pyx_t_1 = __pyx_v_self->shape;
__pyx_v_buffer->shape = __pyx_t_1;
/* "graphsaint/cython_utils.pyx":39
* buffer.readonly = 0
* buffer.shape = self.shape
* buffer.strides = self.strides # <<<<<<<<<<<<<<
* buffer.suboffsets = NULL
*
*/
__pyx_t_1 = __pyx_v_self->strides;
__pyx_v_buffer->strides = __pyx_t_1;
/* "graphsaint/cython_utils.pyx":40
* buffer.shape = self.shape
* buffer.strides = self.strides
* buffer.suboffsets = NULL # <<<<<<<<<<<<<<
*
* def __releasebuffer__(self,Py_buffer *buffer):
*/
__pyx_v_buffer->suboffsets = NULL;
/* "graphsaint/cython_utils.pyx":25
* # now implement the buffer protocol for the class
* # which makes it generally useful to anything that expects an array
* def __getbuffer__(self, Py_buffer *buffer, int flags): # <<<<<<<<<<<<<<
* # relevant documentation http://cython.readthedocs.io/en/latest/src/userguide/buffer.html#a-matrix-class
* cdef Py_ssize_t itemsize = sizeof(self.vec[0])
*/
/* function exit code */
__pyx_r = 0;
if (__pyx_v_buffer->obj == Py_None) {
__Pyx_GOTREF(__pyx_v_buffer->obj);
__Pyx_DECREF(__pyx_v_buffer->obj); __pyx_v_buffer->obj = 0;
}
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "graphsaint/cython_utils.pyx":42
* buffer.suboffsets = NULL
*
* def __releasebuffer__(self,Py_buffer *buffer): # <<<<<<<<<<<<<<
* pass
*
*/
/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_10graphsaint_12cython_utils_19array_wrapper_float_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer); /*proto*/
static CYTHON_UNUSED void __pyx_pw_10graphsaint_12cython_utils_19array_wrapper_float_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
__pyx_pf_10graphsaint_12cython_utils_19array_wrapper_float_2__releasebuffer__(((struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer));
/* function exit code */
__Pyx_RefNannyFinishContext();
}
static void __pyx_pf_10graphsaint_12cython_utils_19array_wrapper_float_2__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__releasebuffer__", 0);
/* function exit code */
__Pyx_RefNannyFinishContext();
}
/* "(tree fragment)":1
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
* cdef tuple state
* cdef object _dict
*/
/* Python wrapper */
static PyObject *__pyx_pw_10graphsaint_12cython_utils_19array_wrapper_float_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_10graphsaint_12cython_utils_19array_wrapper_float_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
__pyx_r = __pyx_pf_10graphsaint_12cython_utils_19array_wrapper_float_4__reduce_cython__(((struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_10graphsaint_12cython_utils_19array_wrapper_float_4__reduce_cython__(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *__pyx_v_self) {
PyObject *__pyx_v_state = 0;
PyObject *__pyx_v__dict = 0;
int __pyx_v_use_setstate;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
int __pyx_t_5;
int __pyx_t_6;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
/* "(tree fragment)":5
* cdef object _dict
* cdef bint use_setstate
* state = (self.shape, self.strides, self.vec) # <<<<<<<<<<<<<<
* _dict = getattr(self, '__dict__', None)
* if _dict is not None:
*/
__pyx_t_1 = __Pyx_carray_to_py_Py_ssize_t(__pyx_v_self->shape, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_carray_to_py_Py_ssize_t(__pyx_v_self->strides, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = __pyx_convert_vector_to_py_float(__pyx_v_self->vec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
__pyx_t_1 = 0;
__pyx_t_2 = 0;
__pyx_t_3 = 0;
__pyx_v_state = ((PyObject*)__pyx_t_4);
__pyx_t_4 = 0;
/* "(tree fragment)":6
* cdef bint use_setstate
* state = (self.shape, self.strides, self.vec)
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
* if _dict is not None:
* state += (_dict,)
*/
__pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_v__dict = __pyx_t_4;
__pyx_t_4 = 0;
/* "(tree fragment)":7
* state = (self.shape, self.strides, self.vec)
* _dict = getattr(self, '__dict__', None)
* if _dict is not None: # <<<<<<<<<<<<<<
* state += (_dict,)
* use_setstate = True
*/
__pyx_t_5 = (__pyx_v__dict != Py_None);
__pyx_t_6 = (__pyx_t_5 != 0);
if (__pyx_t_6) {
/* "(tree fragment)":8
* _dict = getattr(self, '__dict__', None)
* if _dict is not None:
* state += (_dict,) # <<<<<<<<<<<<<<
* use_setstate = True
* else:
*/
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v__dict);
__Pyx_GIVEREF(__pyx_v__dict);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict);
__pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
__pyx_t_3 = 0;
/* "(tree fragment)":9
* if _dict is not None:
* state += (_dict,)
* use_setstate = True # <<<<<<<<<<<<<<
* else:
* use_setstate = False
*/
__pyx_v_use_setstate = 1;
/* "(tree fragment)":7
* state = (self.shape, self.strides, self.vec)
* _dict = getattr(self, '__dict__', None)
* if _dict is not None: # <<<<<<<<<<<<<<
* state += (_dict,)
* use_setstate = True
*/
goto __pyx_L3;
}
/* "(tree fragment)":11
* use_setstate = True
* else:
* use_setstate = False # <<<<<<<<<<<<<<
* if use_setstate:
* return __pyx_unpickle_array_wrapper_float, (type(self), 0x7f2da05, None), state
*/
/*else*/ {
__pyx_v_use_setstate = 0;
}
__pyx_L3:;
/* "(tree fragment)":12
* else:
* use_setstate = False
* if use_setstate: # <<<<<<<<<<<<<<
* return __pyx_unpickle_array_wrapper_float, (type(self), 0x7f2da05, None), state
* else:
*/
__pyx_t_6 = (__pyx_v_use_setstate != 0);
if (__pyx_t_6) {
/* "(tree fragment)":13
* use_setstate = False
* if use_setstate:
* return __pyx_unpickle_array_wrapper_float, (type(self), 0x7f2da05, None), state # <<<<<<<<<<<<<<
* else:
* return __pyx_unpickle_array_wrapper_float, (type(self), 0x7f2da05, state)
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_array_wrapper_flo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
__Pyx_INCREF(__pyx_int_133356037);
__Pyx_GIVEREF(__pyx_int_133356037);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_133356037);
__Pyx_INCREF(Py_None);
__Pyx_GIVEREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
__Pyx_INCREF(__pyx_v_state);
__Pyx_GIVEREF(__pyx_v_state);
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
__pyx_t_3 = 0;
__pyx_t_4 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* "(tree fragment)":12
* else:
* use_setstate = False
* if use_setstate: # <<<<<<<<<<<<<<
* return __pyx_unpickle_array_wrapper_float, (type(self), 0x7f2da05, None), state
* else:
*/
}
/* "(tree fragment)":15
* return __pyx_unpickle_array_wrapper_float, (type(self), 0x7f2da05, None), state
* else:
* return __pyx_unpickle_array_wrapper_float, (type(self), 0x7f2da05, state) # <<<<<<<<<<<<<<
* def __setstate_cython__(self, __pyx_state):
* __pyx_unpickle_array_wrapper_float__set_state(self, __pyx_state)
*/
/*else*/ {
__Pyx_XDECREF(__pyx_r);
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_array_wrapper_flo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
__Pyx_INCREF(__pyx_int_133356037);
__Pyx_GIVEREF(__pyx_int_133356037);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_133356037);
__Pyx_INCREF(__pyx_v_state);
__Pyx_GIVEREF(__pyx_v_state);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
__pyx_t_2 = 0;
__pyx_t_4 = 0;
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
}
/* "(tree fragment)":1
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
* cdef tuple state
* cdef object _dict
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("graphsaint.cython_utils.array_wrapper_float.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_state);
__Pyx_XDECREF(__pyx_v__dict);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "(tree fragment)":16
* else:
* return __pyx_unpickle_array_wrapper_float, (type(self), 0x7f2da05, state)
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
* __pyx_unpickle_array_wrapper_float__set_state(self, __pyx_state)
*/
/* Python wrapper */
static PyObject *__pyx_pw_10graphsaint_12cython_utils_19array_wrapper_float_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_10graphsaint_12cython_utils_19array_wrapper_float_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
__pyx_r = __pyx_pf_10graphsaint_12cython_utils_19array_wrapper_float_6__setstate_cython__(((struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_10graphsaint_12cython_utils_19array_wrapper_float_6__setstate_cython__(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
/* "(tree fragment)":17
* return __pyx_unpickle_array_wrapper_float, (type(self), 0x7f2da05, state)
* def __setstate_cython__(self, __pyx_state):
* __pyx_unpickle_array_wrapper_float__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
*/
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(0, 17, __pyx_L1_error)
__pyx_t_1 = __pyx_f_10graphsaint_12cython_utils___pyx_unpickle_array_wrapper_float__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "(tree fragment)":16
* else:
* return __pyx_unpickle_array_wrapper_float, (type(self), 0x7f2da05, state)
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
* __pyx_unpickle_array_wrapper_float__set_state(self, __pyx_state)
*/
/* function exit code */
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("graphsaint.cython_utils.array_wrapper_float.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "graphsaint/cython_utils.pyx":48
* cdef class array_wrapper_int:
*
* cdef void set_data(self, vector[int]& data): # <<<<<<<<<<<<<<
* self.vec = move(data)
*
*/
static void __pyx_f_10graphsaint_12cython_utils_17array_wrapper_int_set_data(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *__pyx_v_self, std::vector<int> &__pyx_v_data) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_data", 0);
/* "graphsaint/cython_utils.pyx":49
*
* cdef void set_data(self, vector[int]& data):
* self.vec = move(data) # <<<<<<<<<<<<<<
*
* def __getbuffer__(self, Py_buffer *buffer, int flags):
*/
__pyx_v_self->vec = std::move<std::vector<int> &>(__pyx_v_data);
/* "graphsaint/cython_utils.pyx":48
* cdef class array_wrapper_int:
*
* cdef void set_data(self, vector[int]& data): # <<<<<<<<<<<<<<
* self.vec = move(data)
*
*/
/* function exit code */
__Pyx_RefNannyFinishContext();
}
/* "graphsaint/cython_utils.pyx":51
* self.vec = move(data)
*
* def __getbuffer__(self, Py_buffer *buffer, int flags): # <<<<<<<<<<<<<<
* # relevant documentation http://cython.readthedocs.io/en/latest/src/userguide/buffer.html#a-matrix-class
* cdef Py_ssize_t itemsize = sizeof(self.vec[0])
*/
/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_10graphsaint_12cython_utils_17array_wrapper_int_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_10graphsaint_12cython_utils_17array_wrapper_int_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
__pyx_r = __pyx_pf_10graphsaint_12cython_utils_17array_wrapper_int___getbuffer__(((struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static int __pyx_pf_10graphsaint_12cython_utils_17array_wrapper_int___getbuffer__(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags) {
Py_ssize_t __pyx_v_itemsize;
int __pyx_r;
__Pyx_RefNannyDeclarations
Py_ssize_t *__pyx_t_1;
if (__pyx_v_buffer == NULL) {
PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
return -1;
}
__Pyx_RefNannySetupContext("__getbuffer__", 0);
__pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None);
__Pyx_GIVEREF(__pyx_v_buffer->obj);
/* "graphsaint/cython_utils.pyx":53
* def __getbuffer__(self, Py_buffer *buffer, int flags):
* # relevant documentation http://cython.readthedocs.io/en/latest/src/userguide/buffer.html#a-matrix-class
* cdef Py_ssize_t itemsize = sizeof(self.vec[0]) # <<<<<<<<<<<<<<
* self.shape[0] = self.vec.size()
* self.strides[0] = sizeof(int)
*/
__pyx_v_itemsize = (sizeof((__pyx_v_self->vec[0])));
/* "graphsaint/cython_utils.pyx":54
* # relevant documentation http://cython.readthedocs.io/en/latest/src/userguide/buffer.html#a-matrix-class
* cdef Py_ssize_t itemsize = sizeof(self.vec[0])
* self.shape[0] = self.vec.size() # <<<<<<<<<<<<<<
* self.strides[0] = sizeof(int)
* buffer.buf = <char *>&(self.vec[0])
*/
(__pyx_v_self->shape[0]) = __pyx_v_self->vec.size();
/* "graphsaint/cython_utils.pyx":55
* cdef Py_ssize_t itemsize = sizeof(self.vec[0])
* self.shape[0] = self.vec.size()
* self.strides[0] = sizeof(int) # <<<<<<<<<<<<<<
* buffer.buf = <char *>&(self.vec[0])
* buffer.format = 'i'
*/
(__pyx_v_self->strides[0]) = (sizeof(int));
/* "graphsaint/cython_utils.pyx":56
* self.shape[0] = self.vec.size()
* self.strides[0] = sizeof(int)
* buffer.buf = <char *>&(self.vec[0]) # <<<<<<<<<<<<<<
* buffer.format = 'i'
* buffer.internal = NULL
*/
__pyx_v_buffer->buf = ((char *)(&(__pyx_v_self->vec[0])));
/* "graphsaint/cython_utils.pyx":57
* self.strides[0] = sizeof(int)
* buffer.buf = <char *>&(self.vec[0])
* buffer.format = 'i' # <<<<<<<<<<<<<<
* buffer.internal = NULL
* buffer.itemsize = itemsize
*/
__pyx_v_buffer->format = ((char *)"i");
/* "graphsaint/cython_utils.pyx":58
* buffer.buf = <char *>&(self.vec[0])
* buffer.format = 'i'
* buffer.internal = NULL # <<<<<<<<<<<<<<
* buffer.itemsize = itemsize
* buffer.len = self.vec.size() * itemsize
*/
__pyx_v_buffer->internal = NULL;
/* "graphsaint/cython_utils.pyx":59
* buffer.format = 'i'
* buffer.internal = NULL
* buffer.itemsize = itemsize # <<<<<<<<<<<<<<
* buffer.len = self.vec.size() * itemsize
* buffer.ndim = 1
*/
__pyx_v_buffer->itemsize = __pyx_v_itemsize;
/* "graphsaint/cython_utils.pyx":60
* buffer.internal = NULL
* buffer.itemsize = itemsize
* buffer.len = self.vec.size() * itemsize # <<<<<<<<<<<<<<
* buffer.ndim = 1
* buffer.obj = self
*/
__pyx_v_buffer->len = (__pyx_v_self->vec.size() * __pyx_v_itemsize);
/* "graphsaint/cython_utils.pyx":61
* buffer.itemsize = itemsize
* buffer.len = self.vec.size() * itemsize
* buffer.ndim = 1 # <<<<<<<<<<<<<<
* buffer.obj = self
* buffer.readonly = 0
*/
__pyx_v_buffer->ndim = 1;
/* "graphsaint/cython_utils.pyx":62
* buffer.len = self.vec.size() * itemsize
* buffer.ndim = 1
* buffer.obj = self # <<<<<<<<<<<<<<
* buffer.readonly = 0
* buffer.shape = self.shape
*/
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
__Pyx_GOTREF(__pyx_v_buffer->obj);
__Pyx_DECREF(__pyx_v_buffer->obj);
__pyx_v_buffer->obj = ((PyObject *)__pyx_v_self);
/* "graphsaint/cython_utils.pyx":63
* buffer.ndim = 1
* buffer.obj = self
* buffer.readonly = 0 # <<<<<<<<<<<<<<
* buffer.shape = self.shape
* buffer.strides = self.strides
*/
__pyx_v_buffer->readonly = 0;
/* "graphsaint/cython_utils.pyx":64
* buffer.obj = self
* buffer.readonly = 0
* buffer.shape = self.shape # <<<<<<<<<<<<<<
* buffer.strides = self.strides
* buffer.suboffsets = NULL
*/
__pyx_t_1 = __pyx_v_self->shape;
__pyx_v_buffer->shape = __pyx_t_1;
/* "graphsaint/cython_utils.pyx":65
* buffer.readonly = 0
* buffer.shape = self.shape
* buffer.strides = self.strides # <<<<<<<<<<<<<<
* buffer.suboffsets = NULL
*
*/
__pyx_t_1 = __pyx_v_self->strides;
__pyx_v_buffer->strides = __pyx_t_1;
/* "graphsaint/cython_utils.pyx":66
* buffer.shape = self.shape
* buffer.strides = self.strides
* buffer.suboffsets = NULL # <<<<<<<<<<<<<<
*
* def __releasebuffer__(self,Py_buffer *buffer):
*/
__pyx_v_buffer->suboffsets = NULL;
/* "graphsaint/cython_utils.pyx":51
* self.vec = move(data)
*
* def __getbuffer__(self, Py_buffer *buffer, int flags): # <<<<<<<<<<<<<<
* # relevant documentation http://cython.readthedocs.io/en/latest/src/userguide/buffer.html#a-matrix-class
* cdef Py_ssize_t itemsize = sizeof(self.vec[0])
*/
/* function exit code */
__pyx_r = 0;
if (__pyx_v_buffer->obj == Py_None) {
__Pyx_GOTREF(__pyx_v_buffer->obj);
__Pyx_DECREF(__pyx_v_buffer->obj); __pyx_v_buffer->obj = 0;
}
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "graphsaint/cython_utils.pyx":68
* buffer.suboffsets = NULL
*
* def __releasebuffer__(self,Py_buffer *buffer): # <<<<<<<<<<<<<<
* pass
*
*/
/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_10graphsaint_12cython_utils_17array_wrapper_int_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer); /*proto*/
static CYTHON_UNUSED void __pyx_pw_10graphsaint_12cython_utils_17array_wrapper_int_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
__pyx_pf_10graphsaint_12cython_utils_17array_wrapper_int_2__releasebuffer__(((struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer));
/* function exit code */
__Pyx_RefNannyFinishContext();
}
static void __pyx_pf_10graphsaint_12cython_utils_17array_wrapper_int_2__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__releasebuffer__", 0);
/* function exit code */
__Pyx_RefNannyFinishContext();
}
/* "(tree fragment)":1
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
* cdef tuple state
* cdef object _dict
*/
/* Python wrapper */
static PyObject *__pyx_pw_10graphsaint_12cython_utils_17array_wrapper_int_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_10graphsaint_12cython_utils_17array_wrapper_int_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
__pyx_r = __pyx_pf_10graphsaint_12cython_utils_17array_wrapper_int_4__reduce_cython__(((struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_10graphsaint_12cython_utils_17array_wrapper_int_4__reduce_cython__(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *__pyx_v_self) {
PyObject *__pyx_v_state = 0;
PyObject *__pyx_v__dict = 0;
int __pyx_v_use_setstate;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
int __pyx_t_5;
int __pyx_t_6;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
/* "(tree fragment)":5
* cdef object _dict
* cdef bint use_setstate
* state = (self.shape, self.strides, self.vec) # <<<<<<<<<<<<<<
* _dict = getattr(self, '__dict__', None)
* if _dict is not None:
*/
__pyx_t_1 = __Pyx_carray_to_py_Py_ssize_t(__pyx_v_self->shape, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_carray_to_py_Py_ssize_t(__pyx_v_self->strides, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = __pyx_convert_vector_to_py_int(__pyx_v_self->vec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
__pyx_t_1 = 0;
__pyx_t_2 = 0;
__pyx_t_3 = 0;
__pyx_v_state = ((PyObject*)__pyx_t_4);
__pyx_t_4 = 0;
/* "(tree fragment)":6
* cdef bint use_setstate
* state = (self.shape, self.strides, self.vec)
* _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
* if _dict is not None:
* state += (_dict,)
*/
__pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_v__dict = __pyx_t_4;
__pyx_t_4 = 0;
/* "(tree fragment)":7
* state = (self.shape, self.strides, self.vec)
* _dict = getattr(self, '__dict__', None)
* if _dict is not None: # <<<<<<<<<<<<<<
* state += (_dict,)
* use_setstate = True
*/
__pyx_t_5 = (__pyx_v__dict != Py_None);
__pyx_t_6 = (__pyx_t_5 != 0);
if (__pyx_t_6) {
/* "(tree fragment)":8
* _dict = getattr(self, '__dict__', None)
* if _dict is not None:
* state += (_dict,) # <<<<<<<<<<<<<<
* use_setstate = True
* else:
*/
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v__dict);
__Pyx_GIVEREF(__pyx_v__dict);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict);
__pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
__pyx_t_3 = 0;
/* "(tree fragment)":9
* if _dict is not None:
* state += (_dict,)
* use_setstate = True # <<<<<<<<<<<<<<
* else:
* use_setstate = False
*/
__pyx_v_use_setstate = 1;
/* "(tree fragment)":7
* state = (self.shape, self.strides, self.vec)
* _dict = getattr(self, '__dict__', None)
* if _dict is not None: # <<<<<<<<<<<<<<
* state += (_dict,)
* use_setstate = True
*/
goto __pyx_L3;
}
/* "(tree fragment)":11
* use_setstate = True
* else:
* use_setstate = False # <<<<<<<<<<<<<<
* if use_setstate:
* return __pyx_unpickle_array_wrapper_int, (type(self), 0x7f2da05, None), state
*/
/*else*/ {
__pyx_v_use_setstate = 0;
}
__pyx_L3:;
/* "(tree fragment)":12
* else:
* use_setstate = False
* if use_setstate: # <<<<<<<<<<<<<<
* return __pyx_unpickle_array_wrapper_int, (type(self), 0x7f2da05, None), state
* else:
*/
__pyx_t_6 = (__pyx_v_use_setstate != 0);
if (__pyx_t_6) {
/* "(tree fragment)":13
* use_setstate = False
* if use_setstate:
* return __pyx_unpickle_array_wrapper_int, (type(self), 0x7f2da05, None), state # <<<<<<<<<<<<<<
* else:
* return __pyx_unpickle_array_wrapper_int, (type(self), 0x7f2da05, state)
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_array_wrapper_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
__Pyx_INCREF(__pyx_int_133356037);
__Pyx_GIVEREF(__pyx_int_133356037);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_133356037);
__Pyx_INCREF(Py_None);
__Pyx_GIVEREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
__Pyx_INCREF(__pyx_v_state);
__Pyx_GIVEREF(__pyx_v_state);
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
__pyx_t_3 = 0;
__pyx_t_4 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* "(tree fragment)":12
* else:
* use_setstate = False
* if use_setstate: # <<<<<<<<<<<<<<
* return __pyx_unpickle_array_wrapper_int, (type(self), 0x7f2da05, None), state
* else:
*/
}
/* "(tree fragment)":15
* return __pyx_unpickle_array_wrapper_int, (type(self), 0x7f2da05, None), state
* else:
* return __pyx_unpickle_array_wrapper_int, (type(self), 0x7f2da05, state) # <<<<<<<<<<<<<<
* def __setstate_cython__(self, __pyx_state):
* __pyx_unpickle_array_wrapper_int__set_state(self, __pyx_state)
*/
/*else*/ {
__Pyx_XDECREF(__pyx_r);
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_array_wrapper_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
__Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
__Pyx_INCREF(__pyx_int_133356037);
__Pyx_GIVEREF(__pyx_int_133356037);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_133356037);
__Pyx_INCREF(__pyx_v_state);
__Pyx_GIVEREF(__pyx_v_state);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
__pyx_t_2 = 0;
__pyx_t_4 = 0;
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
}
/* "(tree fragment)":1
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
* cdef tuple state
* cdef object _dict
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("graphsaint.cython_utils.array_wrapper_int.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_state);
__Pyx_XDECREF(__pyx_v__dict);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "(tree fragment)":16
* else:
* return __pyx_unpickle_array_wrapper_int, (type(self), 0x7f2da05, state)
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
* __pyx_unpickle_array_wrapper_int__set_state(self, __pyx_state)
*/
/* Python wrapper */
static PyObject *__pyx_pw_10graphsaint_12cython_utils_17array_wrapper_int_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_10graphsaint_12cython_utils_17array_wrapper_int_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
__pyx_r = __pyx_pf_10graphsaint_12cython_utils_17array_wrapper_int_6__setstate_cython__(((struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_10graphsaint_12cython_utils_17array_wrapper_int_6__setstate_cython__(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
/* "(tree fragment)":17
* return __pyx_unpickle_array_wrapper_int, (type(self), 0x7f2da05, state)
* def __setstate_cython__(self, __pyx_state):
* __pyx_unpickle_array_wrapper_int__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
*/
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(0, 17, __pyx_L1_error)
__pyx_t_1 = __pyx_f_10graphsaint_12cython_utils___pyx_unpickle_array_wrapper_int__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "(tree fragment)":16
* else:
* return __pyx_unpickle_array_wrapper_int, (type(self), 0x7f2da05, state)
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
* __pyx_unpickle_array_wrapper_int__set_state(self, __pyx_state)
*/
/* function exit code */
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("graphsaint.cython_utils.array_wrapper_int.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "(tree fragment)":1
* def __pyx_unpickle_array_wrapper_float(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
* cdef object __pyx_PickleError
* cdef object __pyx_result
*/
/* Python wrapper */
static PyObject *__pyx_pw_10graphsaint_12cython_utils_1__pyx_unpickle_array_wrapper_float(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_10graphsaint_12cython_utils_1__pyx_unpickle_array_wrapper_float = {"__pyx_unpickle_array_wrapper_float", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10graphsaint_12cython_utils_1__pyx_unpickle_array_wrapper_float, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_10graphsaint_12cython_utils_1__pyx_unpickle_array_wrapper_float(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v___pyx_type = 0;
long __pyx_v___pyx_checksum;
PyObject *__pyx_v___pyx_state = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__pyx_unpickle_array_wrapper_float (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
PyObject* values[3] = {0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
CYTHON_FALLTHROUGH;
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_array_wrapper_float", 1, 3, 3, 1); __PYX_ERR(0, 1, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 2:
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_array_wrapper_float", 1, 3, 3, 2); __PYX_ERR(0, 1, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_array_wrapper_float") < 0)) __PYX_ERR(0, 1, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
}
__pyx_v___pyx_type = values[0];
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L3_error)
__pyx_v___pyx_state = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_array_wrapper_float", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("graphsaint.cython_utils.__pyx_unpickle_array_wrapper_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_10graphsaint_12cython_utils___pyx_unpickle_array_wrapper_float(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_10graphsaint_12cython_utils___pyx_unpickle_array_wrapper_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_v___pyx_PickleError = 0;
PyObject *__pyx_v___pyx_result = 0;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
int __pyx_t_6;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_unpickle_array_wrapper_float", 0);
/* "(tree fragment)":4
* cdef object __pyx_PickleError
* cdef object __pyx_result
* if __pyx_checksum != 0x7f2da05: # <<<<<<<<<<<<<<
* from pickle import PickleError as __pyx_PickleError
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f2da05 = (shape, strides, vec))" % __pyx_checksum)
*/
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x7f2da05) != 0);
if (__pyx_t_1) {
/* "(tree fragment)":5
* cdef object __pyx_result
* if __pyx_checksum != 0x7f2da05:
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f2da05 = (shape, strides, vec))" % __pyx_checksum)
* __pyx_result = array_wrapper_float.__new__(__pyx_type)
*/
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_n_s_PickleError);
__Pyx_GIVEREF(__pyx_n_s_PickleError);
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_t_2);
__pyx_v___pyx_PickleError = __pyx_t_2;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "(tree fragment)":6
* if __pyx_checksum != 0x7f2da05:
* from pickle import PickleError as __pyx_PickleError
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f2da05 = (shape, strides, vec))" % __pyx_checksum) # <<<<<<<<<<<<<<
* __pyx_result = array_wrapper_float.__new__(__pyx_type)
* if __pyx_state is not None:
*/
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x7f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v___pyx_PickleError);
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_2, function);
}
}
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(0, 6, __pyx_L1_error)
/* "(tree fragment)":4
* cdef object __pyx_PickleError
* cdef object __pyx_result
* if __pyx_checksum != 0x7f2da05: # <<<<<<<<<<<<<<
* from pickle import PickleError as __pyx_PickleError
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f2da05 = (shape, strides, vec))" % __pyx_checksum)
*/
}
/* "(tree fragment)":7
* from pickle import PickleError as __pyx_PickleError
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f2da05 = (shape, strides, vec))" % __pyx_checksum)
* __pyx_result = array_wrapper_float.__new__(__pyx_type) # <<<<<<<<<<<<<<
* if __pyx_state is not None:
* __pyx_unpickle_array_wrapper_float__set_state(<array_wrapper_float> __pyx_result, __pyx_state)
*/
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_10graphsaint_12cython_utils_array_wrapper_float), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
__Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_2, function);
}
}
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v___pyx_result = __pyx_t_3;
__pyx_t_3 = 0;
/* "(tree fragment)":8
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f2da05 = (shape, strides, vec))" % __pyx_checksum)
* __pyx_result = array_wrapper_float.__new__(__pyx_type)
* if __pyx_state is not None: # <<<<<<<<<<<<<<
* __pyx_unpickle_array_wrapper_float__set_state(<array_wrapper_float> __pyx_result, __pyx_state)
* return __pyx_result
*/
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
__pyx_t_6 = (__pyx_t_1 != 0);
if (__pyx_t_6) {
/* "(tree fragment)":9
* __pyx_result = array_wrapper_float.__new__(__pyx_type)
* if __pyx_state is not None:
* __pyx_unpickle_array_wrapper_float__set_state(<array_wrapper_float> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
* return __pyx_result
* cdef __pyx_unpickle_array_wrapper_float__set_state(array_wrapper_float __pyx_result, tuple __pyx_state):
*/
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(0, 9, __pyx_L1_error)
__pyx_t_3 = __pyx_f_10graphsaint_12cython_utils___pyx_unpickle_array_wrapper_float__set_state(((struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "(tree fragment)":8
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f2da05 = (shape, strides, vec))" % __pyx_checksum)
* __pyx_result = array_wrapper_float.__new__(__pyx_type)
* if __pyx_state is not None: # <<<<<<<<<<<<<<
* __pyx_unpickle_array_wrapper_float__set_state(<array_wrapper_float> __pyx_result, __pyx_state)
* return __pyx_result
*/
}
/* "(tree fragment)":10
* if __pyx_state is not None:
* __pyx_unpickle_array_wrapper_float__set_state(<array_wrapper_float> __pyx_result, __pyx_state)
* return __pyx_result # <<<<<<<<<<<<<<
* cdef __pyx_unpickle_array_wrapper_float__set_state(array_wrapper_float __pyx_result, tuple __pyx_state):
* __pyx_result.shape = __pyx_state[0]; __pyx_result.strides = __pyx_state[1]; __pyx_result.vec = __pyx_state[2]
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v___pyx_result);
__pyx_r = __pyx_v___pyx_result;
goto __pyx_L0;
/* "(tree fragment)":1
* def __pyx_unpickle_array_wrapper_float(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
* cdef object __pyx_PickleError
* cdef object __pyx_result
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_AddTraceback("graphsaint.cython_utils.__pyx_unpickle_array_wrapper_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
__Pyx_XDECREF(__pyx_v___pyx_result);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "(tree fragment)":11
* __pyx_unpickle_array_wrapper_float__set_state(<array_wrapper_float> __pyx_result, __pyx_state)
* return __pyx_result
* cdef __pyx_unpickle_array_wrapper_float__set_state(array_wrapper_float __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
* __pyx_result.shape = __pyx_state[0]; __pyx_result.strides = __pyx_state[1]; __pyx_result.vec = __pyx_state[2]
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
*/
static PyObject *__pyx_f_10graphsaint_12cython_utils___pyx_unpickle_array_wrapper_float__set_state(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2[1];
std::vector<float> __pyx_t_3;
int __pyx_t_4;
Py_ssize_t __pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
PyObject *__pyx_t_9 = NULL;
PyObject *__pyx_t_10 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_unpickle_array_wrapper_float__set_state", 0);
/* "(tree fragment)":12
* return __pyx_result
* cdef __pyx_unpickle_array_wrapper_float__set_state(array_wrapper_float __pyx_result, tuple __pyx_state):
* __pyx_result.shape = __pyx_state[0]; __pyx_result.strides = __pyx_state[1]; __pyx_result.vec = __pyx_state[2] # <<<<<<<<<<<<<<
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
* __pyx_result.__dict__.update(__pyx_state[3])
*/
if (unlikely(__pyx_v___pyx_state == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 12, __pyx_L1_error)
}
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (unlikely(__Pyx_carray_from_py_Py_ssize_t(__pyx_t_1, __pyx_t_2, 1) < 0)) __PYX_ERR(0, 12, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
memcpy(&(__pyx_v___pyx_result->shape[0]), __pyx_t_2, sizeof(__pyx_v___pyx_result->shape[0]) * (1));
if (unlikely(__pyx_v___pyx_state == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 12, __pyx_L1_error)
}
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (unlikely(__Pyx_carray_from_py_Py_ssize_t(__pyx_t_1, __pyx_t_2, 1) < 0)) __PYX_ERR(0, 12, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
memcpy(&(__pyx_v___pyx_result->strides[0]), __pyx_t_2, sizeof(__pyx_v___pyx_result->strides[0]) * (1));
if (unlikely(__pyx_v___pyx_state == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 12, __pyx_L1_error)
}
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = __pyx_convert_vector_from_py_float(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v___pyx_result->vec = __pyx_t_3;
/* "(tree fragment)":13
* cdef __pyx_unpickle_array_wrapper_float__set_state(array_wrapper_float __pyx_result, tuple __pyx_state):
* __pyx_result.shape = __pyx_state[0]; __pyx_result.strides = __pyx_state[1]; __pyx_result.vec = __pyx_state[2]
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
* __pyx_result.__dict__.update(__pyx_state[3])
*/
if (unlikely(__pyx_v___pyx_state == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
__PYX_ERR(0, 13, __pyx_L1_error)
}
__pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 13, __pyx_L1_error)
__pyx_t_6 = ((__pyx_t_5 > 3) != 0);
if (__pyx_t_6) {
} else {
__pyx_t_4 = __pyx_t_6;
goto __pyx_L4_bool_binop_done;
}
__pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 13, __pyx_L1_error)
__pyx_t_7 = (__pyx_t_6 != 0);
__pyx_t_4 = __pyx_t_7;
__pyx_L4_bool_binop_done:;
if (__pyx_t_4) {
/* "(tree fragment)":14
* __pyx_result.shape = __pyx_state[0]; __pyx_result.strides = __pyx_state[1]; __pyx_result.vec = __pyx_state[2]
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
* __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<<
*/
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 14, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (unlikely(__pyx_v___pyx_state == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 14, __pyx_L1_error)
}
__pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_10 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
__Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_9, function);
}
}
__pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8);
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "(tree fragment)":13
* cdef __pyx_unpickle_array_wrapper_float__set_state(array_wrapper_float __pyx_result, tuple __pyx_state):
* __pyx_result.shape = __pyx_state[0]; __pyx_result.strides = __pyx_state[1]; __pyx_result.vec = __pyx_state[2]
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
* __pyx_result.__dict__.update(__pyx_state[3])
*/
}
/* "(tree fragment)":11
* __pyx_unpickle_array_wrapper_float__set_state(<array_wrapper_float> __pyx_result, __pyx_state)
* return __pyx_result
* cdef __pyx_unpickle_array_wrapper_float__set_state(array_wrapper_float __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
* __pyx_result.shape = __pyx_state[0]; __pyx_result.strides = __pyx_state[1]; __pyx_result.vec = __pyx_state[2]
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
*/
/* function exit code */
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_AddTraceback("graphsaint.cython_utils.__pyx_unpickle_array_wrapper_float__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "(tree fragment)":1
* def __pyx_unpickle_array_wrapper_int(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
* cdef object __pyx_PickleError
* cdef object __pyx_result
*/
/* Python wrapper */
static PyObject *__pyx_pw_10graphsaint_12cython_utils_3__pyx_unpickle_array_wrapper_int(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_10graphsaint_12cython_utils_3__pyx_unpickle_array_wrapper_int = {"__pyx_unpickle_array_wrapper_int", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10graphsaint_12cython_utils_3__pyx_unpickle_array_wrapper_int, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_10graphsaint_12cython_utils_3__pyx_unpickle_array_wrapper_int(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v___pyx_type = 0;
long __pyx_v___pyx_checksum;
PyObject *__pyx_v___pyx_state = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__pyx_unpickle_array_wrapper_int (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
PyObject* values[3] = {0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
CYTHON_FALLTHROUGH;
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_array_wrapper_int", 1, 3, 3, 1); __PYX_ERR(0, 1, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 2:
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_array_wrapper_int", 1, 3, 3, 2); __PYX_ERR(0, 1, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_array_wrapper_int") < 0)) __PYX_ERR(0, 1, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
}
__pyx_v___pyx_type = values[0];
__pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L3_error)
__pyx_v___pyx_state = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__pyx_unpickle_array_wrapper_int", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("graphsaint.cython_utils.__pyx_unpickle_array_wrapper_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_10graphsaint_12cython_utils_2__pyx_unpickle_array_wrapper_int(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_10graphsaint_12cython_utils_2__pyx_unpickle_array_wrapper_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_v___pyx_PickleError = 0;
PyObject *__pyx_v___pyx_result = 0;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
int __pyx_t_6;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_unpickle_array_wrapper_int", 0);
/* "(tree fragment)":4
* cdef object __pyx_PickleError
* cdef object __pyx_result
* if __pyx_checksum != 0x7f2da05: # <<<<<<<<<<<<<<
* from pickle import PickleError as __pyx_PickleError
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f2da05 = (shape, strides, vec))" % __pyx_checksum)
*/
__pyx_t_1 = ((__pyx_v___pyx_checksum != 0x7f2da05) != 0);
if (__pyx_t_1) {
/* "(tree fragment)":5
* cdef object __pyx_result
* if __pyx_checksum != 0x7f2da05:
* from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f2da05 = (shape, strides, vec))" % __pyx_checksum)
* __pyx_result = array_wrapper_int.__new__(__pyx_type)
*/
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_n_s_PickleError);
__Pyx_GIVEREF(__pyx_n_s_PickleError);
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
__pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_t_2);
__pyx_v___pyx_PickleError = __pyx_t_2;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "(tree fragment)":6
* if __pyx_checksum != 0x7f2da05:
* from pickle import PickleError as __pyx_PickleError
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f2da05 = (shape, strides, vec))" % __pyx_checksum) # <<<<<<<<<<<<<<
* __pyx_result = array_wrapper_int.__new__(__pyx_type)
* if __pyx_state is not None:
*/
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x7f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v___pyx_PickleError);
__pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_2, function);
}
}
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(0, 6, __pyx_L1_error)
/* "(tree fragment)":4
* cdef object __pyx_PickleError
* cdef object __pyx_result
* if __pyx_checksum != 0x7f2da05: # <<<<<<<<<<<<<<
* from pickle import PickleError as __pyx_PickleError
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f2da05 = (shape, strides, vec))" % __pyx_checksum)
*/
}
/* "(tree fragment)":7
* from pickle import PickleError as __pyx_PickleError
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f2da05 = (shape, strides, vec))" % __pyx_checksum)
* __pyx_result = array_wrapper_int.__new__(__pyx_type) # <<<<<<<<<<<<<<
* if __pyx_state is not None:
* __pyx_unpickle_array_wrapper_int__set_state(<array_wrapper_int> __pyx_result, __pyx_state)
*/
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_10graphsaint_12cython_utils_array_wrapper_int), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
__Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_2, function);
}
}
__pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v___pyx_result = __pyx_t_3;
__pyx_t_3 = 0;
/* "(tree fragment)":8
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f2da05 = (shape, strides, vec))" % __pyx_checksum)
* __pyx_result = array_wrapper_int.__new__(__pyx_type)
* if __pyx_state is not None: # <<<<<<<<<<<<<<
* __pyx_unpickle_array_wrapper_int__set_state(<array_wrapper_int> __pyx_result, __pyx_state)
* return __pyx_result
*/
__pyx_t_1 = (__pyx_v___pyx_state != Py_None);
__pyx_t_6 = (__pyx_t_1 != 0);
if (__pyx_t_6) {
/* "(tree fragment)":9
* __pyx_result = array_wrapper_int.__new__(__pyx_type)
* if __pyx_state is not None:
* __pyx_unpickle_array_wrapper_int__set_state(<array_wrapper_int> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
* return __pyx_result
* cdef __pyx_unpickle_array_wrapper_int__set_state(array_wrapper_int __pyx_result, tuple __pyx_state):
*/
if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(0, 9, __pyx_L1_error)
__pyx_t_3 = __pyx_f_10graphsaint_12cython_utils___pyx_unpickle_array_wrapper_int__set_state(((struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "(tree fragment)":8
* raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f2da05 = (shape, strides, vec))" % __pyx_checksum)
* __pyx_result = array_wrapper_int.__new__(__pyx_type)
* if __pyx_state is not None: # <<<<<<<<<<<<<<
* __pyx_unpickle_array_wrapper_int__set_state(<array_wrapper_int> __pyx_result, __pyx_state)
* return __pyx_result
*/
}
/* "(tree fragment)":10
* if __pyx_state is not None:
* __pyx_unpickle_array_wrapper_int__set_state(<array_wrapper_int> __pyx_result, __pyx_state)
* return __pyx_result # <<<<<<<<<<<<<<
* cdef __pyx_unpickle_array_wrapper_int__set_state(array_wrapper_int __pyx_result, tuple __pyx_state):
* __pyx_result.shape = __pyx_state[0]; __pyx_result.strides = __pyx_state[1]; __pyx_result.vec = __pyx_state[2]
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v___pyx_result);
__pyx_r = __pyx_v___pyx_result;
goto __pyx_L0;
/* "(tree fragment)":1
* def __pyx_unpickle_array_wrapper_int(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
* cdef object __pyx_PickleError
* cdef object __pyx_result
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_AddTraceback("graphsaint.cython_utils.__pyx_unpickle_array_wrapper_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v___pyx_PickleError);
__Pyx_XDECREF(__pyx_v___pyx_result);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "(tree fragment)":11
* __pyx_unpickle_array_wrapper_int__set_state(<array_wrapper_int> __pyx_result, __pyx_state)
* return __pyx_result
* cdef __pyx_unpickle_array_wrapper_int__set_state(array_wrapper_int __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
* __pyx_result.shape = __pyx_state[0]; __pyx_result.strides = __pyx_state[1]; __pyx_result.vec = __pyx_state[2]
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
*/
static PyObject *__pyx_f_10graphsaint_12cython_utils___pyx_unpickle_array_wrapper_int__set_state(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2[1];
std::vector<int> __pyx_t_3;
int __pyx_t_4;
Py_ssize_t __pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
PyObject *__pyx_t_9 = NULL;
PyObject *__pyx_t_10 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_unpickle_array_wrapper_int__set_state", 0);
/* "(tree fragment)":12
* return __pyx_result
* cdef __pyx_unpickle_array_wrapper_int__set_state(array_wrapper_int __pyx_result, tuple __pyx_state):
* __pyx_result.shape = __pyx_state[0]; __pyx_result.strides = __pyx_state[1]; __pyx_result.vec = __pyx_state[2] # <<<<<<<<<<<<<<
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
* __pyx_result.__dict__.update(__pyx_state[3])
*/
if (unlikely(__pyx_v___pyx_state == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 12, __pyx_L1_error)
}
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (unlikely(__Pyx_carray_from_py_Py_ssize_t(__pyx_t_1, __pyx_t_2, 1) < 0)) __PYX_ERR(0, 12, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
memcpy(&(__pyx_v___pyx_result->shape[0]), __pyx_t_2, sizeof(__pyx_v___pyx_result->shape[0]) * (1));
if (unlikely(__pyx_v___pyx_state == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 12, __pyx_L1_error)
}
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (unlikely(__Pyx_carray_from_py_Py_ssize_t(__pyx_t_1, __pyx_t_2, 1) < 0)) __PYX_ERR(0, 12, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
memcpy(&(__pyx_v___pyx_result->strides[0]), __pyx_t_2, sizeof(__pyx_v___pyx_result->strides[0]) * (1));
if (unlikely(__pyx_v___pyx_state == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 12, __pyx_L1_error)
}
__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = __pyx_convert_vector_from_py_int(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v___pyx_result->vec = __pyx_t_3;
/* "(tree fragment)":13
* cdef __pyx_unpickle_array_wrapper_int__set_state(array_wrapper_int __pyx_result, tuple __pyx_state):
* __pyx_result.shape = __pyx_state[0]; __pyx_result.strides = __pyx_state[1]; __pyx_result.vec = __pyx_state[2]
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
* __pyx_result.__dict__.update(__pyx_state[3])
*/
if (unlikely(__pyx_v___pyx_state == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
__PYX_ERR(0, 13, __pyx_L1_error)
}
__pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 13, __pyx_L1_error)
__pyx_t_6 = ((__pyx_t_5 > 3) != 0);
if (__pyx_t_6) {
} else {
__pyx_t_4 = __pyx_t_6;
goto __pyx_L4_bool_binop_done;
}
__pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 13, __pyx_L1_error)
__pyx_t_7 = (__pyx_t_6 != 0);
__pyx_t_4 = __pyx_t_7;
__pyx_L4_bool_binop_done:;
if (__pyx_t_4) {
/* "(tree fragment)":14
* __pyx_result.shape = __pyx_state[0]; __pyx_result.strides = __pyx_state[1]; __pyx_result.vec = __pyx_state[2]
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
* __pyx_result.__dict__.update(__pyx_state[3]) # <<<<<<<<<<<<<<
*/
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 14, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (unlikely(__pyx_v___pyx_state == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 14, __pyx_L1_error)
}
__pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_10 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
__Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_9, function);
}
}
__pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8);
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "(tree fragment)":13
* cdef __pyx_unpickle_array_wrapper_int__set_state(array_wrapper_int __pyx_result, tuple __pyx_state):
* __pyx_result.shape = __pyx_state[0]; __pyx_result.strides = __pyx_state[1]; __pyx_result.vec = __pyx_state[2]
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
* __pyx_result.__dict__.update(__pyx_state[3])
*/
}
/* "(tree fragment)":11
* __pyx_unpickle_array_wrapper_int__set_state(<array_wrapper_int> __pyx_result, __pyx_state)
* return __pyx_result
* cdef __pyx_unpickle_array_wrapper_int__set_state(array_wrapper_int __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
* __pyx_result.shape = __pyx_state[0]; __pyx_result.strides = __pyx_state[1]; __pyx_result.vec = __pyx_state[2]
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
*/
/* function exit code */
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_AddTraceback("graphsaint.cython_utils.__pyx_unpickle_array_wrapper_int__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":734
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
* return PyArray_MultiIterNew(1, <void*>a)
*
*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":735
*
* cdef inline object PyArray_MultiIterNew1(a):
* return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
*
* cdef inline object PyArray_MultiIterNew2(a, b):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 735, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":734
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
* return PyArray_MultiIterNew(1, <void*>a)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":737
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":738
*
* cdef inline object PyArray_MultiIterNew2(a, b):
* return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
*
* cdef inline object PyArray_MultiIterNew3(a, b, c):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 738, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":737
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":740
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":741
*
* cdef inline object PyArray_MultiIterNew3(a, b, c):
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 741, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":740
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":743
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":744
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d):
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 744, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":743
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":746
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":747
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
*
* cdef inline tuple PyDataType_SHAPE(dtype d):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 747, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":746
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":749
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
* if PyDataType_HASSUBARRAY(d):
* return <tuple>d.subarray.shape
*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":750
*
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
* return <tuple>d.subarray.shape
* else:
*/
__pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
if (__pyx_t_1) {
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":751
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d):
* return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
* else:
* return ()
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
__pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
goto __pyx_L0;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":750
*
* cdef inline tuple PyDataType_SHAPE(dtype d):
* if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
* return <tuple>d.subarray.shape
* else:
*/
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":753
* return <tuple>d.subarray.shape
* else:
* return () # <<<<<<<<<<<<<<
*
*
*/
/*else*/ {
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_empty_tuple);
__pyx_r = __pyx_empty_tuple;
goto __pyx_L0;
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":749
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
*
* cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
* if PyDataType_HASSUBARRAY(d):
* return <tuple>d.subarray.shape
*/
/* function exit code */
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":868
* int _import_umath() except -1
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
* Py_INCREF(base) # important to do this before stealing the reference below!
* PyArray_SetBaseObject(arr, base)
*/
static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_array_base", 0);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":869
*
* cdef inline void set_array_base(ndarray arr, object base):
* Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
* PyArray_SetBaseObject(arr, base)
*
*/
Py_INCREF(__pyx_v_base);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":870
* cdef inline void set_array_base(ndarray arr, object base):
* Py_INCREF(base) # important to do this before stealing the reference below!
* PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
*
* cdef inline object get_array_base(ndarray arr):
*/
(void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":868
* int _import_umath() except -1
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
* Py_INCREF(base) # important to do this before stealing the reference below!
* PyArray_SetBaseObject(arr, base)
*/
/* function exit code */
__Pyx_RefNannyFinishContext();
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":872
* PyArray_SetBaseObject(arr, base)
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
* base = PyArray_BASE(arr)
* if base is NULL:
*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
PyObject *__pyx_v_base;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("get_array_base", 0);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":873
*
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
* if base is NULL:
* return None
*/
__pyx_v_base = PyArray_BASE(__pyx_v_arr);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":874
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr)
* if base is NULL: # <<<<<<<<<<<<<<
* return None
* return <object>base
*/
__pyx_t_1 = ((__pyx_v_base == NULL) != 0);
if (__pyx_t_1) {
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":875
* base = PyArray_BASE(arr)
* if base is NULL:
* return None # <<<<<<<<<<<<<<
* return <object>base
*
*/
__Pyx_XDECREF(__pyx_r);
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":874
* cdef inline object get_array_base(ndarray arr):
* base = PyArray_BASE(arr)
* if base is NULL: # <<<<<<<<<<<<<<
* return None
* return <object>base
*/
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":876
* if base is NULL:
* return None
* return <object>base # <<<<<<<<<<<<<<
*
* # Versions of the import_* functions which are more suitable for
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(((PyObject *)__pyx_v_base));
__pyx_r = ((PyObject *)__pyx_v_base);
goto __pyx_L0;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":872
* PyArray_SetBaseObject(arr, base)
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
* base = PyArray_BASE(arr)
* if base is NULL:
*/
/* function exit code */
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":880
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
* try:
* __pyx_import_array()
*/
static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
int __pyx_t_4;
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("import_array", 0);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":881
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
* __pyx_import_array()
* except Exception:
*/
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
__Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
__Pyx_XGOTREF(__pyx_t_1);
__Pyx_XGOTREF(__pyx_t_2);
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":882
* cdef inline int import_array() except -1:
* try:
* __pyx_import_array() # <<<<<<<<<<<<<<
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import")
*/
__pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 882, __pyx_L3_error)
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":881
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
* __pyx_import_array()
* except Exception:
*/
}
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L8_try_end;
__pyx_L3_error:;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":883
* try:
* __pyx_import_array()
* except Exception: # <<<<<<<<<<<<<<
* raise ImportError("numpy.core.multiarray failed to import")
*
*/
__pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
if (__pyx_t_4) {
__Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 883, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":884
* __pyx_import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
*
* cdef inline int import_umath() except -1:
*/
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 884, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__PYX_ERR(1, 884, __pyx_L5_except_error)
}
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":881
* # Cython code.
* cdef inline int import_array() except -1:
* try: # <<<<<<<<<<<<<<
* __pyx_import_array()
* except Exception:
*/
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
goto __pyx_L1_error;
__pyx_L8_try_end:;
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":880
* # Versions of the import_* functions which are more suitable for
* # Cython code.
* cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
* try:
* __pyx_import_array()
*/
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":886
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
* try:
* _import_umath()
*/
static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
int __pyx_t_4;
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("import_umath", 0);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":887
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
* _import_umath()
* except Exception:
*/
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
__Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
__Pyx_XGOTREF(__pyx_t_1);
__Pyx_XGOTREF(__pyx_t_2);
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":888
* cdef inline int import_umath() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
* except Exception:
* raise ImportError("numpy.core.umath failed to import")
*/
__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 888, __pyx_L3_error)
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":887
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
* _import_umath()
* except Exception:
*/
}
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L8_try_end;
__pyx_L3_error:;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":889
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
* raise ImportError("numpy.core.umath failed to import")
*
*/
__pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
if (__pyx_t_4) {
__Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 889, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":890
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
*
* cdef inline int import_ufunc() except -1:
*/
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 890, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__PYX_ERR(1, 890, __pyx_L5_except_error)
}
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":887
*
* cdef inline int import_umath() except -1:
* try: # <<<<<<<<<<<<<<
* _import_umath()
* except Exception:
*/
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
goto __pyx_L1_error;
__pyx_L8_try_end:;
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":886
* raise ImportError("numpy.core.multiarray failed to import")
*
* cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
* try:
* _import_umath()
*/
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":892
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
* try:
* _import_umath()
*/
static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
int __pyx_t_4;
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("import_ufunc", 0);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":893
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
* _import_umath()
* except Exception:
*/
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
__Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
__Pyx_XGOTREF(__pyx_t_1);
__Pyx_XGOTREF(__pyx_t_2);
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":894
* cdef inline int import_ufunc() except -1:
* try:
* _import_umath() # <<<<<<<<<<<<<<
* except Exception:
* raise ImportError("numpy.core.umath failed to import")
*/
__pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 894, __pyx_L3_error)
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":893
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
* _import_umath()
* except Exception:
*/
}
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L8_try_end;
__pyx_L3_error:;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":895
* try:
* _import_umath()
* except Exception: # <<<<<<<<<<<<<<
* raise ImportError("numpy.core.umath failed to import")
*
*/
__pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
if (__pyx_t_4) {
__Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 895, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":896
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
*
* cdef extern from *:
*/
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 896, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__PYX_ERR(1, 896, __pyx_L5_except_error)
}
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":893
*
* cdef inline int import_ufunc() except -1:
* try: # <<<<<<<<<<<<<<
* _import_umath()
* except Exception:
*/
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
goto __pyx_L1_error;
__pyx_L8_try_end:;
}
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":892
* raise ImportError("numpy.core.umath failed to import")
*
* cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
* try:
* _import_umath()
*/
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "graphsaint/cython_utils.pxd":28
* cdef void set_data(self,vector[int]& data)
*
* cdef inline void npy2vec_int(np.ndarray[int,ndim=1,mode='c'] nda, vector[int]& vec): # <<<<<<<<<<<<<<
* cdef int size = nda.size
* cdef int* vec_c = &(nda[0])
*/
static CYTHON_INLINE void __pyx_f_10graphsaint_12cython_utils_npy2vec_int(PyArrayObject *__pyx_v_nda, std::vector<int> &__pyx_v_vec) {
int __pyx_v_size;
int *__pyx_v_vec_c;
__Pyx_LocalBuf_ND __pyx_pybuffernd_nda;
__Pyx_Buffer __pyx_pybuffer_nda;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_t_2;
Py_ssize_t __pyx_t_3;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("npy2vec_int", 0);
__pyx_pybuffer_nda.pybuffer.buf = NULL;
__pyx_pybuffer_nda.refcount = 0;
__pyx_pybuffernd_nda.data = NULL;
__pyx_pybuffernd_nda.rcbuffer = &__pyx_pybuffer_nda;
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nda.rcbuffer->pybuffer, (PyObject*)__pyx_v_nda, &__Pyx_TypeInfo_int, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 28, __pyx_L1_error)
}
__pyx_pybuffernd_nda.diminfo[0].strides = __pyx_pybuffernd_nda.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nda.diminfo[0].shape = __pyx_pybuffernd_nda.rcbuffer->pybuffer.shape[0];
/* "graphsaint/cython_utils.pxd":29
*
* cdef inline void npy2vec_int(np.ndarray[int,ndim=1,mode='c'] nda, vector[int]& vec):
* cdef int size = nda.size # <<<<<<<<<<<<<<
* cdef int* vec_c = &(nda[0])
* vec.assign(vec_c,vec_c+size)
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_nda), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 29, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 29, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_size = __pyx_t_2;
/* "graphsaint/cython_utils.pxd":30
* cdef inline void npy2vec_int(np.ndarray[int,ndim=1,mode='c'] nda, vector[int]& vec):
* cdef int size = nda.size
* cdef int* vec_c = &(nda[0]) # <<<<<<<<<<<<<<
* vec.assign(vec_c,vec_c+size)
*
*/
__pyx_t_3 = 0;
__pyx_t_2 = -1;
if (__pyx_t_3 < 0) {
__pyx_t_3 += __pyx_pybuffernd_nda.diminfo[0].shape;
if (unlikely(__pyx_t_3 < 0)) __pyx_t_2 = 0;
} else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_nda.diminfo[0].shape)) __pyx_t_2 = 0;
if (unlikely(__pyx_t_2 != -1)) {
__Pyx_RaiseBufferIndexError(__pyx_t_2);
__PYX_ERR(2, 30, __pyx_L1_error)
}
__pyx_v_vec_c = (&(*__Pyx_BufPtrCContig1d(int *, __pyx_pybuffernd_nda.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_nda.diminfo[0].strides)));
/* "graphsaint/cython_utils.pxd":31
* cdef int size = nda.size
* cdef int* vec_c = &(nda[0])
* vec.assign(vec_c,vec_c+size) # <<<<<<<<<<<<<<
*
* cdef inline void npy2vec_float(np.ndarray[float,ndim=1,mode='c'] nda, vector[float]& vec):
*/
try {
__pyx_v_vec.assign(__pyx_v_vec_c, (__pyx_v_vec_c + __pyx_v_size));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(2, 31, __pyx_L1_error)
}
/* "graphsaint/cython_utils.pxd":28
* cdef void set_data(self,vector[int]& data)
*
* cdef inline void npy2vec_int(np.ndarray[int,ndim=1,mode='c'] nda, vector[int]& vec): # <<<<<<<<<<<<<<
* cdef int size = nda.size
* cdef int* vec_c = &(nda[0])
*/
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nda.rcbuffer->pybuffer);
__Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
__Pyx_WriteUnraisable("graphsaint.cython_utils.npy2vec_int", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
goto __pyx_L2;
__pyx_L0:;
__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nda.rcbuffer->pybuffer);
__pyx_L2:;
__Pyx_RefNannyFinishContext();
}
/* "graphsaint/cython_utils.pxd":33
* vec.assign(vec_c,vec_c+size)
*
* cdef inline void npy2vec_float(np.ndarray[float,ndim=1,mode='c'] nda, vector[float]& vec): # <<<<<<<<<<<<<<
* cdef int size = nda.size
* cdef float* vec_c = &(nda[0])
*/
static CYTHON_INLINE void __pyx_f_10graphsaint_12cython_utils_npy2vec_float(PyArrayObject *__pyx_v_nda, std::vector<float> &__pyx_v_vec) {
int __pyx_v_size;
float *__pyx_v_vec_c;
__Pyx_LocalBuf_ND __pyx_pybuffernd_nda;
__Pyx_Buffer __pyx_pybuffer_nda;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_t_2;
Py_ssize_t __pyx_t_3;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("npy2vec_float", 0);
__pyx_pybuffer_nda.pybuffer.buf = NULL;
__pyx_pybuffer_nda.refcount = 0;
__pyx_pybuffernd_nda.data = NULL;
__pyx_pybuffernd_nda.rcbuffer = &__pyx_pybuffer_nda;
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nda.rcbuffer->pybuffer, (PyObject*)__pyx_v_nda, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) __PYX_ERR(2, 33, __pyx_L1_error)
}
__pyx_pybuffernd_nda.diminfo[0].strides = __pyx_pybuffernd_nda.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nda.diminfo[0].shape = __pyx_pybuffernd_nda.rcbuffer->pybuffer.shape[0];
/* "graphsaint/cython_utils.pxd":34
*
* cdef inline void npy2vec_float(np.ndarray[float,ndim=1,mode='c'] nda, vector[float]& vec):
* cdef int size = nda.size # <<<<<<<<<<<<<<
* cdef float* vec_c = &(nda[0])
* vec.assign(vec_c,vec_c+size)
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_nda), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 34, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 34, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_size = __pyx_t_2;
/* "graphsaint/cython_utils.pxd":35
* cdef inline void npy2vec_float(np.ndarray[float,ndim=1,mode='c'] nda, vector[float]& vec):
* cdef int size = nda.size
* cdef float* vec_c = &(nda[0]) # <<<<<<<<<<<<<<
* vec.assign(vec_c,vec_c+size)
*
*/
__pyx_t_3 = 0;
__pyx_t_2 = -1;
if (__pyx_t_3 < 0) {
__pyx_t_3 += __pyx_pybuffernd_nda.diminfo[0].shape;
if (unlikely(__pyx_t_3 < 0)) __pyx_t_2 = 0;
} else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_nda.diminfo[0].shape)) __pyx_t_2 = 0;
if (unlikely(__pyx_t_2 != -1)) {
__Pyx_RaiseBufferIndexError(__pyx_t_2);
__PYX_ERR(2, 35, __pyx_L1_error)
}
__pyx_v_vec_c = (&(*__Pyx_BufPtrCContig1d(float *, __pyx_pybuffernd_nda.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_nda.diminfo[0].strides)));
/* "graphsaint/cython_utils.pxd":36
* cdef int size = nda.size
* cdef float* vec_c = &(nda[0])
* vec.assign(vec_c,vec_c+size) # <<<<<<<<<<<<<<
*
*/
try {
__pyx_v_vec.assign(__pyx_v_vec_c, (__pyx_v_vec_c + __pyx_v_size));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(2, 36, __pyx_L1_error)
}
/* "graphsaint/cython_utils.pxd":33
* vec.assign(vec_c,vec_c+size)
*
* cdef inline void npy2vec_float(np.ndarray[float,ndim=1,mode='c'] nda, vector[float]& vec): # <<<<<<<<<<<<<<
* cdef int size = nda.size
* cdef float* vec_c = &(nda[0])
*/
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nda.rcbuffer->pybuffer);
__Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
__Pyx_WriteUnraisable("graphsaint.cython_utils.npy2vec_float", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
goto __pyx_L2;
__pyx_L0:;
__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nda.rcbuffer->pybuffer);
__pyx_L2:;
__Pyx_RefNannyFinishContext();
}
/* "carray.to_py":112
*
* @cname("__Pyx_carray_to_py_Py_ssize_t")
* cdef inline list __Pyx_carray_to_py_Py_ssize_t(base_type *v, Py_ssize_t length): # <<<<<<<<<<<<<<
* cdef size_t i
* cdef object value
*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_py_Py_ssize_t(Py_ssize_t *__pyx_v_v, Py_ssize_t __pyx_v_length) {
size_t __pyx_v_i;
PyObject *__pyx_v_value = 0;
PyObject *__pyx_v_l = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
size_t __pyx_t_2;
size_t __pyx_t_3;
size_t __pyx_t_4;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__Pyx_carray_to_py_Py_ssize_t", 0);
/* "carray.to_py":115
* cdef size_t i
* cdef object value
* l = PyList_New(length) # <<<<<<<<<<<<<<
* for i in range(<size_t>length):
* value = v[i]
*/
__pyx_t_1 = PyList_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_l = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
/* "carray.to_py":116
* cdef object value
* l = PyList_New(length)
* for i in range(<size_t>length): # <<<<<<<<<<<<<<
* value = v[i]
* Py_INCREF(value)
*/
__pyx_t_2 = ((size_t)__pyx_v_length);
__pyx_t_3 = __pyx_t_2;
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_i = __pyx_t_4;
/* "carray.to_py":117
* l = PyList_New(length)
* for i in range(<size_t>length):
* value = v[i] # <<<<<<<<<<<<<<
* Py_INCREF(value)
* PyList_SET_ITEM(l, i, value)
*/
__pyx_t_1 = PyInt_FromSsize_t((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
__pyx_t_1 = 0;
/* "carray.to_py":118
* for i in range(<size_t>length):
* value = v[i]
* Py_INCREF(value) # <<<<<<<<<<<<<<
* PyList_SET_ITEM(l, i, value)
* return l
*/
Py_INCREF(__pyx_v_value);
/* "carray.to_py":119
* value = v[i]
* Py_INCREF(value)
* PyList_SET_ITEM(l, i, value) # <<<<<<<<<<<<<<
* return l
*
*/
PyList_SET_ITEM(__pyx_v_l, __pyx_v_i, __pyx_v_value);
}
/* "carray.to_py":120
* Py_INCREF(value)
* PyList_SET_ITEM(l, i, value)
* return l # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_l);
__pyx_r = __pyx_v_l;
goto __pyx_L0;
/* "carray.to_py":112
*
* @cname("__Pyx_carray_to_py_Py_ssize_t")
* cdef inline list __Pyx_carray_to_py_Py_ssize_t(base_type *v, Py_ssize_t length): # <<<<<<<<<<<<<<
* cdef size_t i
* cdef object value
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_py_Py_ssize_t", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_value);
__Pyx_XDECREF(__pyx_v_l);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "carray.to_py":124
*
* @cname("__Pyx_carray_to_tuple_Py_ssize_t")
* cdef inline tuple __Pyx_carray_to_tuple_Py_ssize_t(base_type *v, Py_ssize_t length): # <<<<<<<<<<<<<<
* cdef size_t i
* cdef object value
*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_Py_ssize_t(Py_ssize_t *__pyx_v_v, Py_ssize_t __pyx_v_length) {
size_t __pyx_v_i;
PyObject *__pyx_v_value = 0;
PyObject *__pyx_v_t = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
size_t __pyx_t_2;
size_t __pyx_t_3;
size_t __pyx_t_4;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__Pyx_carray_to_tuple_Py_ssize_t", 0);
/* "carray.to_py":127
* cdef size_t i
* cdef object value
* t = PyTuple_New(length) # <<<<<<<<<<<<<<
* for i in range(<size_t>length):
* value = v[i]
*/
__pyx_t_1 = PyTuple_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_t = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
/* "carray.to_py":128
* cdef object value
* t = PyTuple_New(length)
* for i in range(<size_t>length): # <<<<<<<<<<<<<<
* value = v[i]
* Py_INCREF(value)
*/
__pyx_t_2 = ((size_t)__pyx_v_length);
__pyx_t_3 = __pyx_t_2;
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_i = __pyx_t_4;
/* "carray.to_py":129
* t = PyTuple_New(length)
* for i in range(<size_t>length):
* value = v[i] # <<<<<<<<<<<<<<
* Py_INCREF(value)
* PyTuple_SET_ITEM(t, i, value)
*/
__pyx_t_1 = PyInt_FromSsize_t((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
__pyx_t_1 = 0;
/* "carray.to_py":130
* for i in range(<size_t>length):
* value = v[i]
* Py_INCREF(value) # <<<<<<<<<<<<<<
* PyTuple_SET_ITEM(t, i, value)
* return t
*/
Py_INCREF(__pyx_v_value);
/* "carray.to_py":131
* value = v[i]
* Py_INCREF(value)
* PyTuple_SET_ITEM(t, i, value) # <<<<<<<<<<<<<<
* return t
*/
PyTuple_SET_ITEM(__pyx_v_t, __pyx_v_i, __pyx_v_value);
}
/* "carray.to_py":132
* Py_INCREF(value)
* PyTuple_SET_ITEM(t, i, value)
* return t # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_t);
__pyx_r = __pyx_v_t;
goto __pyx_L0;
/* "carray.to_py":124
*
* @cname("__Pyx_carray_to_tuple_Py_ssize_t")
* cdef inline tuple __Pyx_carray_to_tuple_Py_ssize_t(base_type *v, Py_ssize_t length): # <<<<<<<<<<<<<<
* cdef size_t i
* cdef object value
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_tuple_Py_ssize_t", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_value);
__Pyx_XDECREF(__pyx_v_t);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "carray.from_py":77
*
* @cname("__Pyx_carray_from_py_Py_ssize_t")
* cdef int __Pyx_carray_from_py_Py_ssize_t(object o, base_type *v, Py_ssize_t length) except -1: # <<<<<<<<<<<<<<
* cdef Py_ssize_t i = length
* try:
*/
static int __Pyx_carray_from_py_Py_ssize_t(PyObject *__pyx_v_o, Py_ssize_t *__pyx_v_v, Py_ssize_t __pyx_v_length) {
Py_ssize_t __pyx_v_i;
PyObject *__pyx_v_item = NULL;
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
Py_ssize_t __pyx_t_4;
int __pyx_t_5;
int __pyx_t_6;
PyObject *__pyx_t_7 = NULL;
Py_ssize_t __pyx_t_8;
PyObject *(*__pyx_t_9)(PyObject *);
PyObject *__pyx_t_10 = NULL;
Py_ssize_t __pyx_t_11;
char const *__pyx_t_12;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__Pyx_carray_from_py_Py_ssize_t", 0);
/* "carray.from_py":78
* @cname("__Pyx_carray_from_py_Py_ssize_t")
* cdef int __Pyx_carray_from_py_Py_ssize_t(object o, base_type *v, Py_ssize_t length) except -1:
* cdef Py_ssize_t i = length # <<<<<<<<<<<<<<
* try:
* i = len(o)
*/
__pyx_v_i = __pyx_v_length;
/* "carray.from_py":79
* cdef int __Pyx_carray_from_py_Py_ssize_t(object o, base_type *v, Py_ssize_t length) except -1:
* cdef Py_ssize_t i = length
* try: # <<<<<<<<<<<<<<
* i = len(o)
* except (TypeError, OverflowError):
*/
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
__Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
__Pyx_XGOTREF(__pyx_t_1);
__Pyx_XGOTREF(__pyx_t_2);
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
/* "carray.from_py":80
* cdef Py_ssize_t i = length
* try:
* i = len(o) # <<<<<<<<<<<<<<
* except (TypeError, OverflowError):
* pass
*/
__pyx_t_4 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 80, __pyx_L3_error)
__pyx_v_i = __pyx_t_4;
/* "carray.from_py":79
* cdef int __Pyx_carray_from_py_Py_ssize_t(object o, base_type *v, Py_ssize_t length) except -1:
* cdef Py_ssize_t i = length
* try: # <<<<<<<<<<<<<<
* i = len(o)
* except (TypeError, OverflowError):
*/
}
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L8_try_end;
__pyx_L3_error:;
/* "carray.from_py":81
* try:
* i = len(o)
* except (TypeError, OverflowError): # <<<<<<<<<<<<<<
* pass
* if i == length:
*/
__pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
if (__pyx_t_5) {
__Pyx_ErrRestore(0,0,0);
goto __pyx_L4_exception_handled;
}
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
/* "carray.from_py":79
* cdef int __Pyx_carray_from_py_Py_ssize_t(object o, base_type *v, Py_ssize_t length) except -1:
* cdef Py_ssize_t i = length
* try: # <<<<<<<<<<<<<<
* i = len(o)
* except (TypeError, OverflowError):
*/
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
goto __pyx_L1_error;
__pyx_L4_exception_handled:;
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
__pyx_L8_try_end:;
}
/* "carray.from_py":83
* except (TypeError, OverflowError):
* pass
* if i == length: # <<<<<<<<<<<<<<
* for i, item in enumerate(o):
* if i >= length:
*/
__pyx_t_6 = ((__pyx_v_i == __pyx_v_length) != 0);
if (__pyx_t_6) {
/* "carray.from_py":84
* pass
* if i == length:
* for i, item in enumerate(o): # <<<<<<<<<<<<<<
* if i >= length:
* break
*/
__pyx_t_4 = 0;
if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
__pyx_t_7 = __pyx_v_o; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
__pyx_t_9 = NULL;
} else {
__pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 84, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 84, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_9)) {
if (likely(PyList_CheckExact(__pyx_t_7))) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 84, __pyx_L1_error)
#else
__pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 84, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
#endif
} else {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 84, __pyx_L1_error)
#else
__pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 84, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
#endif
}
} else {
__pyx_t_10 = __pyx_t_9(__pyx_t_7);
if (unlikely(!__pyx_t_10)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else __PYX_ERR(0, 84, __pyx_L1_error)
}
break;
}
__Pyx_GOTREF(__pyx_t_10);
}
__Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_10);
__pyx_t_10 = 0;
__pyx_v_i = __pyx_t_4;
__pyx_t_4 = (__pyx_t_4 + 1);
/* "carray.from_py":85
* if i == length:
* for i, item in enumerate(o):
* if i >= length: # <<<<<<<<<<<<<<
* break
* v[i] = item
*/
__pyx_t_6 = ((__pyx_v_i >= __pyx_v_length) != 0);
if (__pyx_t_6) {
/* "carray.from_py":86
* for i, item in enumerate(o):
* if i >= length:
* break # <<<<<<<<<<<<<<
* v[i] = item
* else:
*/
goto __pyx_L11_break;
/* "carray.from_py":85
* if i == length:
* for i, item in enumerate(o):
* if i >= length: # <<<<<<<<<<<<<<
* break
* v[i] = item
*/
}
/* "carray.from_py":87
* if i >= length:
* break
* v[i] = item # <<<<<<<<<<<<<<
* else:
* i += 1 # convert index to length
*/
__pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_item); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 87, __pyx_L1_error)
(__pyx_v_v[__pyx_v_i]) = __pyx_t_11;
/* "carray.from_py":84
* pass
* if i == length:
* for i, item in enumerate(o): # <<<<<<<<<<<<<<
* if i >= length:
* break
*/
}
/*else*/ {
/* "carray.from_py":89
* v[i] = item
* else:
* i += 1 # convert index to length # <<<<<<<<<<<<<<
* if i == length:
* return 0
*/
__pyx_v_i = (__pyx_v_i + 1);
/* "carray.from_py":90
* else:
* i += 1 # convert index to length
* if i == length: # <<<<<<<<<<<<<<
* return 0
*
*/
__pyx_t_6 = ((__pyx_v_i == __pyx_v_length) != 0);
if (__pyx_t_6) {
/* "carray.from_py":91
* i += 1 # convert index to length
* if i == length:
* return 0 # <<<<<<<<<<<<<<
*
* PyErr_Format(
*/
__pyx_r = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L0;
/* "carray.from_py":90
* else:
* i += 1 # convert index to length
* if i == length: # <<<<<<<<<<<<<<
* return 0
*
*/
}
}
/* "carray.from_py":84
* pass
* if i == length:
* for i, item in enumerate(o): # <<<<<<<<<<<<<<
* if i >= length:
* break
*/
__pyx_L11_break:;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
/* "carray.from_py":83
* except (TypeError, OverflowError):
* pass
* if i == length: # <<<<<<<<<<<<<<
* for i, item in enumerate(o):
* if i >= length:
*/
}
/* "carray.from_py":96
* IndexError,
* ("too many values found during array assignment, expected %zd"
* if i >= length else # <<<<<<<<<<<<<<
* "not enough values found during array assignment, expected %zd, got %zd"),
* length, i)
*/
if (((__pyx_v_i >= __pyx_v_length) != 0)) {
__pyx_t_12 = ((char const *)"too many values found during array assignment, expected %zd");
} else {
__pyx_t_12 = ((char const *)"not enough values found during array assignment, expected %zd, got %zd");
}
/* "carray.from_py":93
* return 0
*
* PyErr_Format( # <<<<<<<<<<<<<<
* IndexError,
* ("too many values found during array assignment, expected %zd"
*/
__pyx_t_7 = PyErr_Format(__pyx_builtin_IndexError, __pyx_t_12, __pyx_v_length, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 93, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
/* "carray.from_py":77
*
* @cname("__Pyx_carray_from_py_Py_ssize_t")
* cdef int __Pyx_carray_from_py_Py_ssize_t(object o, base_type *v, Py_ssize_t length) except -1: # <<<<<<<<<<<<<<
* cdef Py_ssize_t i = length
* try:
*/
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_AddTraceback("carray.from_py.__Pyx_carray_from_py_Py_ssize_t", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_item);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "vector.to_py":60
*
* @cname("__pyx_convert_vector_to_py_float")
* cdef object __pyx_convert_vector_to_py_float(vector[X]& v): # <<<<<<<<<<<<<<
* return [v[i] for i in range(v.size())]
*
*/
static PyObject *__pyx_convert_vector_to_py_float(const std::vector<float> &__pyx_v_v) {
size_t __pyx_v_i;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
size_t __pyx_t_2;
size_t __pyx_t_3;
size_t __pyx_t_4;
PyObject *__pyx_t_5 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_float", 0);
/* "vector.to_py":61
* @cname("__pyx_convert_vector_to_py_float")
* cdef object __pyx_convert_vector_to_py_float(vector[X]& v):
* return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __pyx_v_v.size();
__pyx_t_3 = __pyx_t_2;
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_i = __pyx_t_4;
__pyx_t_5 = PyFloat_FromDouble((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 61, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "vector.to_py":60
*
* @cname("__pyx_convert_vector_to_py_float")
* cdef object __pyx_convert_vector_to_py_float(vector[X]& v): # <<<<<<<<<<<<<<
* return [v[i] for i in range(v.size())]
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "vector.from_py":45
*
* @cname("__pyx_convert_vector_from_py_float")
* cdef vector[X] __pyx_convert_vector_from_py_float(object o) except *: # <<<<<<<<<<<<<<
* cdef vector[X] v
* for item in o:
*/
static std::vector<float> __pyx_convert_vector_from_py_float(PyObject *__pyx_v_o) {
std::vector<float> __pyx_v_v;
PyObject *__pyx_v_item = NULL;
std::vector<float> __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
PyObject *(*__pyx_t_3)(PyObject *);
PyObject *__pyx_t_4 = NULL;
float __pyx_t_5;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_float", 0);
/* "vector.from_py":47
* cdef vector[X] __pyx_convert_vector_from_py_float(object o) except *:
* cdef vector[X] v
* for item in o: # <<<<<<<<<<<<<<
* v.push_back(<X>item)
* return v
*/
if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
__pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_3 = NULL;
} else {
__pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_3)) {
if (likely(PyList_CheckExact(__pyx_t_1))) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else __PYX_ERR(0, 47, __pyx_L1_error)
}
break;
}
__Pyx_GOTREF(__pyx_t_4);
}
__Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
__pyx_t_4 = 0;
/* "vector.from_py":48
* cdef vector[X] v
* for item in o:
* v.push_back(<X>item) # <<<<<<<<<<<<<<
* return v
*
*/
__pyx_t_5 = __pyx_PyFloat_AsFloat(__pyx_v_item); if (unlikely((__pyx_t_5 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L1_error)
__pyx_v_v.push_back(((float)__pyx_t_5));
/* "vector.from_py":47
* cdef vector[X] __pyx_convert_vector_from_py_float(object o) except *:
* cdef vector[X] v
* for item in o: # <<<<<<<<<<<<<<
* v.push_back(<X>item)
* return v
*/
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "vector.from_py":49
* for item in o:
* v.push_back(<X>item)
* return v # <<<<<<<<<<<<<<
*
*
*/
__pyx_r = __pyx_v_v;
goto __pyx_L0;
/* "vector.from_py":45
*
* @cname("__pyx_convert_vector_from_py_float")
* cdef vector[X] __pyx_convert_vector_from_py_float(object o) except *: # <<<<<<<<<<<<<<
* cdef vector[X] v
* for item in o:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_pretend_to_initialize(&__pyx_r);
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_item);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "vector.to_py":60
*
* @cname("__pyx_convert_vector_to_py_int")
* cdef object __pyx_convert_vector_to_py_int(vector[X]& v): # <<<<<<<<<<<<<<
* return [v[i] for i in range(v.size())]
*
*/
static PyObject *__pyx_convert_vector_to_py_int(const std::vector<int> &__pyx_v_v) {
size_t __pyx_v_i;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
size_t __pyx_t_2;
size_t __pyx_t_3;
size_t __pyx_t_4;
PyObject *__pyx_t_5 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_int", 0);
/* "vector.to_py":61
* @cname("__pyx_convert_vector_to_py_int")
* cdef object __pyx_convert_vector_to_py_int(vector[X]& v):
* return [v[i] for i in range(v.size())] # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __pyx_v_v.size();
__pyx_t_3 = __pyx_t_2;
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_i = __pyx_t_4;
__pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 61, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "vector.to_py":60
*
* @cname("__pyx_convert_vector_to_py_int")
* cdef object __pyx_convert_vector_to_py_int(vector[X]& v): # <<<<<<<<<<<<<<
* return [v[i] for i in range(v.size())]
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "vector.from_py":45
*
* @cname("__pyx_convert_vector_from_py_int")
* cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *: # <<<<<<<<<<<<<<
* cdef vector[X] v
* for item in o:
*/
static std::vector<int> __pyx_convert_vector_from_py_int(PyObject *__pyx_v_o) {
std::vector<int> __pyx_v_v;
PyObject *__pyx_v_item = NULL;
std::vector<int> __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
PyObject *(*__pyx_t_3)(PyObject *);
PyObject *__pyx_t_4 = NULL;
int __pyx_t_5;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_int", 0);
/* "vector.from_py":47
* cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *:
* cdef vector[X] v
* for item in o: # <<<<<<<<<<<<<<
* v.push_back(<X>item)
* return v
*/
if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
__pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_3 = NULL;
} else {
__pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_3)) {
if (likely(PyList_CheckExact(__pyx_t_1))) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
__pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else __PYX_ERR(0, 47, __pyx_L1_error)
}
break;
}
__Pyx_GOTREF(__pyx_t_4);
}
__Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
__pyx_t_4 = 0;
/* "vector.from_py":48
* cdef vector[X] v
* for item in o:
* v.push_back(<X>item) # <<<<<<<<<<<<<<
* return v
*
*/
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_item); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L1_error)
__pyx_v_v.push_back(((int)__pyx_t_5));
/* "vector.from_py":47
* cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *:
* cdef vector[X] v
* for item in o: # <<<<<<<<<<<<<<
* v.push_back(<X>item)
* return v
*/
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "vector.from_py":49
* for item in o:
* v.push_back(<X>item)
* return v # <<<<<<<<<<<<<<
*
*
*/
__pyx_r = __pyx_v_v;
goto __pyx_L0;
/* "vector.from_py":45
*
* @cname("__pyx_convert_vector_from_py_int")
* cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *: # <<<<<<<<<<<<<<
* cdef vector[X] v
* for item in o:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_pretend_to_initialize(&__pyx_r);
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_item);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static struct __pyx_vtabstruct_10graphsaint_12cython_utils_array_wrapper_float __pyx_vtable_10graphsaint_12cython_utils_array_wrapper_float;
static PyObject *__pyx_tp_new_10graphsaint_12cython_utils_array_wrapper_float(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *p;
PyObject *o;
if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
o = (*t->tp_alloc)(t, 0);
} else {
o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
if (unlikely(!o)) return 0;
p = ((struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *)o);
p->__pyx_vtab = __pyx_vtabptr_10graphsaint_12cython_utils_array_wrapper_float;
new((void*)&(p->vec)) std::vector<float> ();
return o;
}
static void __pyx_tp_dealloc_10graphsaint_12cython_utils_array_wrapper_float(PyObject *o) {
struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *p = (struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *)o;
#if CYTHON_USE_TP_FINALIZE
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
__Pyx_call_destructor(p->vec);
(*Py_TYPE(o)->tp_free)(o);
}
static PyMethodDef __pyx_methods_10graphsaint_12cython_utils_array_wrapper_float[] = {
{"__reduce_cython__", (PyCFunction)__pyx_pw_10graphsaint_12cython_utils_19array_wrapper_float_5__reduce_cython__, METH_NOARGS, 0},
{"__setstate_cython__", (PyCFunction)__pyx_pw_10graphsaint_12cython_utils_19array_wrapper_float_7__setstate_cython__, METH_O, 0},
{0, 0, 0, 0}
};
static PyBufferProcs __pyx_tp_as_buffer_array_wrapper_float = {
#if PY_MAJOR_VERSION < 3
0, /*bf_getreadbuffer*/
#endif
#if PY_MAJOR_VERSION < 3
0, /*bf_getwritebuffer*/
#endif
#if PY_MAJOR_VERSION < 3
0, /*bf_getsegcount*/
#endif
#if PY_MAJOR_VERSION < 3
0, /*bf_getcharbuffer*/
#endif
__pyx_pw_10graphsaint_12cython_utils_19array_wrapper_float_1__getbuffer__, /*bf_getbuffer*/
__pyx_pw_10graphsaint_12cython_utils_19array_wrapper_float_3__releasebuffer__, /*bf_releasebuffer*/
};
static PyTypeObject __pyx_type_10graphsaint_12cython_utils_array_wrapper_float = {
PyVarObject_HEAD_INIT(0, 0)
"graphsaint.cython_utils.array_wrapper_float", /*tp_name*/
sizeof(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float), /*tp_basicsize*/
0, /*tp_itemsize*/
__pyx_tp_dealloc_10graphsaint_12cython_utils_array_wrapper_float, /*tp_dealloc*/
#if PY_VERSION_HEX < 0x030800b4
0, /*tp_print*/
#endif
#if PY_VERSION_HEX >= 0x030800b4
0, /*tp_vectorcall_offset*/
#endif
0, /*tp_getattr*/
0, /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
0, /*tp_compare*/
#endif
#if PY_MAJOR_VERSION >= 3
0, /*tp_as_async*/
#endif
0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
&__pyx_tp_as_buffer_array_wrapper_float, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
0, /*tp_doc*/
0, /*tp_traverse*/
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_methods_10graphsaint_12cython_utils_array_wrapper_float, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
__pyx_tp_new_10graphsaint_12cython_utils_array_wrapper_float, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_mro*/
0, /*tp_cache*/
0, /*tp_subclasses*/
0, /*tp_weaklist*/
0, /*tp_del*/
0, /*tp_version_tag*/
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
#if PY_VERSION_HEX >= 0x030800b1
0, /*tp_vectorcall*/
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0, /*tp_print*/
#endif
};
static struct __pyx_vtabstruct_10graphsaint_12cython_utils_array_wrapper_int __pyx_vtable_10graphsaint_12cython_utils_array_wrapper_int;
static PyObject *__pyx_tp_new_10graphsaint_12cython_utils_array_wrapper_int(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *p;
PyObject *o;
if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
o = (*t->tp_alloc)(t, 0);
} else {
o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
if (unlikely(!o)) return 0;
p = ((struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *)o);
p->__pyx_vtab = __pyx_vtabptr_10graphsaint_12cython_utils_array_wrapper_int;
new((void*)&(p->vec)) std::vector<int> ();
return o;
}
static void __pyx_tp_dealloc_10graphsaint_12cython_utils_array_wrapper_int(PyObject *o) {
struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *p = (struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *)o;
#if CYTHON_USE_TP_FINALIZE
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
__Pyx_call_destructor(p->vec);
(*Py_TYPE(o)->tp_free)(o);
}
static PyMethodDef __pyx_methods_10graphsaint_12cython_utils_array_wrapper_int[] = {
{"__reduce_cython__", (PyCFunction)__pyx_pw_10graphsaint_12cython_utils_17array_wrapper_int_5__reduce_cython__, METH_NOARGS, 0},
{"__setstate_cython__", (PyCFunction)__pyx_pw_10graphsaint_12cython_utils_17array_wrapper_int_7__setstate_cython__, METH_O, 0},
{0, 0, 0, 0}
};
static PyBufferProcs __pyx_tp_as_buffer_array_wrapper_int = {
#if PY_MAJOR_VERSION < 3
0, /*bf_getreadbuffer*/
#endif
#if PY_MAJOR_VERSION < 3
0, /*bf_getwritebuffer*/
#endif
#if PY_MAJOR_VERSION < 3
0, /*bf_getsegcount*/
#endif
#if PY_MAJOR_VERSION < 3
0, /*bf_getcharbuffer*/
#endif
__pyx_pw_10graphsaint_12cython_utils_17array_wrapper_int_1__getbuffer__, /*bf_getbuffer*/
__pyx_pw_10graphsaint_12cython_utils_17array_wrapper_int_3__releasebuffer__, /*bf_releasebuffer*/
};
static PyTypeObject __pyx_type_10graphsaint_12cython_utils_array_wrapper_int = {
PyVarObject_HEAD_INIT(0, 0)
"graphsaint.cython_utils.array_wrapper_int", /*tp_name*/
sizeof(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int), /*tp_basicsize*/
0, /*tp_itemsize*/
__pyx_tp_dealloc_10graphsaint_12cython_utils_array_wrapper_int, /*tp_dealloc*/
#if PY_VERSION_HEX < 0x030800b4
0, /*tp_print*/
#endif
#if PY_VERSION_HEX >= 0x030800b4
0, /*tp_vectorcall_offset*/
#endif
0, /*tp_getattr*/
0, /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
0, /*tp_compare*/
#endif
#if PY_MAJOR_VERSION >= 3
0, /*tp_as_async*/
#endif
0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
&__pyx_tp_as_buffer_array_wrapper_int, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
0, /*tp_doc*/
0, /*tp_traverse*/
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_methods_10graphsaint_12cython_utils_array_wrapper_int, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
__pyx_tp_new_10graphsaint_12cython_utils_array_wrapper_int, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_mro*/
0, /*tp_cache*/
0, /*tp_subclasses*/
0, /*tp_weaklist*/
0, /*tp_del*/
0, /*tp_version_tag*/
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#endif
#if PY_VERSION_HEX >= 0x030800b1
0, /*tp_vectorcall*/
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0, /*tp_print*/
#endif
};
static PyMethodDef __pyx_methods[] = {
{0, 0, 0, 0}
};
#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_cython_utils(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
{Py_mod_create, (void*)__pyx_pymod_create},
{Py_mod_exec, (void*)__pyx_pymod_exec_cython_utils},
{0, NULL}
};
#endif
static struct PyModuleDef __pyx_moduledef = {
PyModuleDef_HEAD_INIT,
"cython_utils",
0, /* m_doc */
#if CYTHON_PEP489_MULTI_PHASE_INIT
0, /* m_size */
#else
-1, /* m_size */
#endif
__pyx_methods /* m_methods */,
#if CYTHON_PEP489_MULTI_PHASE_INIT
__pyx_moduledef_slots, /* m_slots */
#else
NULL, /* m_reload */
#endif
NULL, /* m_traverse */
NULL, /* m_clear */
NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
#define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
#define CYTHON_SMALL_CODE __attribute__((cold))
#else
#define CYTHON_SMALL_CODE
#endif
#endif
static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
{&__pyx_kp_s_Incompatible_checksums_s_vs_0x7f, __pyx_k_Incompatible_checksums_s_vs_0x7f, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x7f), 0, 0, 1, 0},
{&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
{&__pyx_n_s_OverflowError, __pyx_k_OverflowError, sizeof(__pyx_k_OverflowError), 0, 0, 1, 1},
{&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
{&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
{&__pyx_n_s_array_wrapper_float, __pyx_k_array_wrapper_float, sizeof(__pyx_k_array_wrapper_float), 0, 0, 1, 1},
{&__pyx_n_s_array_wrapper_int, __pyx_k_array_wrapper_int, sizeof(__pyx_k_array_wrapper_int), 0, 0, 1, 1},
{&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
{&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
{&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
{&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
{&__pyx_n_s_graphsaint_cython_utils, __pyx_k_graphsaint_cython_utils, sizeof(__pyx_k_graphsaint_cython_utils), 0, 0, 1, 1},
{&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
{&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
{&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
{&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
{&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
{&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
{&__pyx_kp_u_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 1, 0, 0},
{&__pyx_kp_u_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 1, 0, 0},
{&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
{&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
{&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
{&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
{&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
{&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
{&__pyx_n_s_pyx_unpickle_array_wrapper_flo, __pyx_k_pyx_unpickle_array_wrapper_flo, sizeof(__pyx_k_pyx_unpickle_array_wrapper_flo), 0, 0, 1, 1},
{&__pyx_n_s_pyx_unpickle_array_wrapper_int, __pyx_k_pyx_unpickle_array_wrapper_int, sizeof(__pyx_k_pyx_unpickle_array_wrapper_int), 0, 0, 1, 1},
{&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
{&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
{&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
{&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
{&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
{&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
{&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
{&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
{&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
{&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
{&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
{&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
{0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
__pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 884, __pyx_L1_error)
__pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 116, __pyx_L1_error)
__pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 81, __pyx_L1_error)
__pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_n_s_OverflowError); if (!__pyx_builtin_OverflowError) __PYX_ERR(0, 81, __pyx_L1_error)
__pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 84, __pyx_L1_error)
__pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 94, __pyx_L1_error)
return 0;
__pyx_L1_error:;
return -1;
}
static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":884
* __pyx_import_array()
* except Exception:
* raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
*
* cdef inline int import_umath() except -1:
*/
__pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 884, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple_);
__Pyx_GIVEREF(__pyx_tuple_);
/* "../../anaconda3/envs/graphsaint_gpu/lib/python3.6/site-packages/numpy/__init__.pxd":890
* _import_umath()
* except Exception:
* raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
*
* cdef inline int import_ufunc() except -1:
*/
__pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 890, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__2);
__Pyx_GIVEREF(__pyx_tuple__2);
/* "(tree fragment)":1
* def __pyx_unpickle_array_wrapper_float(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
* cdef object __pyx_PickleError
* cdef object __pyx_result
*/
__pyx_tuple__3 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 1, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__3);
__Pyx_GIVEREF(__pyx_tuple__3);
__pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_array_wrapper_flo, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_tuple__5 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 1, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__5);
__Pyx_GIVEREF(__pyx_tuple__5);
__pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_array_wrapper_int, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 1, __pyx_L1_error)
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
__Pyx_RefNannyFinishContext();
return -1;
}
static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
/* InitThreads.init */
#ifdef WITH_THREAD
PyEval_InitThreads();
#endif
if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L1_error)
if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(3, 1, __pyx_L1_error);
__pyx_int_133356037 = PyInt_FromLong(133356037L); if (unlikely(!__pyx_int_133356037)) __PYX_ERR(3, 1, __pyx_L1_error)
return 0;
__pyx_L1_error:;
return -1;
}
static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
static int __Pyx_modinit_global_init_code(void) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
/*--- Global init code ---*/
__Pyx_RefNannyFinishContext();
return 0;
}
static int __Pyx_modinit_variable_export_code(void) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
/*--- Variable export code ---*/
__Pyx_RefNannyFinishContext();
return 0;
}
static int __Pyx_modinit_function_export_code(void) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
/*--- Function export code ---*/
__Pyx_RefNannyFinishContext();
return 0;
}
static int __Pyx_modinit_type_init_code(void) {
__Pyx_RefNannyDeclarations
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
/*--- Type init code ---*/
__pyx_vtabptr_10graphsaint_12cython_utils_array_wrapper_float = &__pyx_vtable_10graphsaint_12cython_utils_array_wrapper_float;
__pyx_vtable_10graphsaint_12cython_utils_array_wrapper_float.set_data = (void (*)(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_float *, std::vector<float> &))__pyx_f_10graphsaint_12cython_utils_19array_wrapper_float_set_data;
if (PyType_Ready(&__pyx_type_10graphsaint_12cython_utils_array_wrapper_float) < 0) __PYX_ERR(3, 18, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_10graphsaint_12cython_utils_array_wrapper_float.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10graphsaint_12cython_utils_array_wrapper_float.tp_dictoffset && __pyx_type_10graphsaint_12cython_utils_array_wrapper_float.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_10graphsaint_12cython_utils_array_wrapper_float.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
if (__Pyx_SetVtable(__pyx_type_10graphsaint_12cython_utils_array_wrapper_float.tp_dict, __pyx_vtabptr_10graphsaint_12cython_utils_array_wrapper_float) < 0) __PYX_ERR(3, 18, __pyx_L1_error)
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_array_wrapper_float, (PyObject *)&__pyx_type_10graphsaint_12cython_utils_array_wrapper_float) < 0) __PYX_ERR(3, 18, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_10graphsaint_12cython_utils_array_wrapper_float) < 0) __PYX_ERR(3, 18, __pyx_L1_error)
__pyx_ptype_10graphsaint_12cython_utils_array_wrapper_float = &__pyx_type_10graphsaint_12cython_utils_array_wrapper_float;
__pyx_vtabptr_10graphsaint_12cython_utils_array_wrapper_int = &__pyx_vtable_10graphsaint_12cython_utils_array_wrapper_int;
__pyx_vtable_10graphsaint_12cython_utils_array_wrapper_int.set_data = (void (*)(struct __pyx_obj_10graphsaint_12cython_utils_array_wrapper_int *, std::vector<int> &))__pyx_f_10graphsaint_12cython_utils_17array_wrapper_int_set_data;
if (PyType_Ready(&__pyx_type_10graphsaint_12cython_utils_array_wrapper_int) < 0) __PYX_ERR(3, 46, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_10graphsaint_12cython_utils_array_wrapper_int.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10graphsaint_12cython_utils_array_wrapper_int.tp_dictoffset && __pyx_type_10graphsaint_12cython_utils_array_wrapper_int.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_10graphsaint_12cython_utils_array_wrapper_int.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
if (__Pyx_SetVtable(__pyx_type_10graphsaint_12cython_utils_array_wrapper_int.tp_dict, __pyx_vtabptr_10graphsaint_12cython_utils_array_wrapper_int) < 0) __PYX_ERR(3, 46, __pyx_L1_error)
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_array_wrapper_int, (PyObject *)&__pyx_type_10graphsaint_12cython_utils_array_wrapper_int) < 0) __PYX_ERR(3, 46, __pyx_L1_error)
if (__Pyx_setup_reduce((PyObject*)&__pyx_type_10graphsaint_12cython_utils_array_wrapper_int) < 0) __PYX_ERR(3, 46, __pyx_L1_error)
__pyx_ptype_10graphsaint_12cython_utils_array_wrapper_int = &__pyx_type_10graphsaint_12cython_utils_array_wrapper_int;
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
__Pyx_RefNannyFinishContext();
return -1;
}
static int __Pyx_modinit_type_import_code(void) {
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
/*--- Type import code ---*/
__pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
#if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
sizeof(PyTypeObject),
#else
sizeof(PyHeapTypeObject),
#endif
__Pyx_ImportType_CheckSize_Warn);
if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 199, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 199, __pyx_L1_error)
__pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore);
if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 222, __pyx_L1_error)
__pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore);
if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 226, __pyx_L1_error)
__pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 238, __pyx_L1_error)
__pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore);
if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 764, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_RefNannyFinishContext();
return -1;
}
static int __Pyx_modinit_variable_import_code(void) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
/*--- Variable import code ---*/
__Pyx_RefNannyFinishContext();
return 0;
}
static int __Pyx_modinit_function_import_code(void) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
/*--- Function import code ---*/
__Pyx_RefNannyFinishContext();
return 0;
}
#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif
#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initcython_utils(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initcython_utils(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_cython_utils(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_cython_utils(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
#if PY_VERSION_HEX >= 0x030700A1
static PY_INT64_T main_interpreter_id = -1;
PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
if (main_interpreter_id == -1) {
main_interpreter_id = current_id;
return (unlikely(current_id == -1)) ? -1 : 0;
} else if (unlikely(main_interpreter_id != current_id))
#else
static PyInterpreterState *main_interpreter = NULL;
PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
if (!main_interpreter) {
main_interpreter = current_interpreter;
} else if (unlikely(main_interpreter != current_interpreter))
#endif
{
PyErr_SetString(
PyExc_ImportError,
"Interpreter change detected - this module can only be loaded into one interpreter per process.");
return -1;
}
return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
PyObject *value = PyObject_GetAttrString(spec, from_name);
int result = 0;
if (likely(value)) {
if (allow_none || value != Py_None) {
result = PyDict_SetItemString(moddict, to_name, value);
}
Py_DECREF(value);
} else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
PyErr_Clear();
} else {
result = -1;
}
return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
PyObject *module = NULL, *moddict, *modname;
if (__Pyx_check_single_interpreter())
return NULL;
if (__pyx_m)
return __Pyx_NewRef(__pyx_m);
modname = PyObject_GetAttrString(spec, "name");
if (unlikely(!modname)) goto bad;
module = PyModule_NewObject(modname);
Py_DECREF(modname);
if (unlikely(!module)) goto bad;
moddict = PyModule_GetDict(module);
if (unlikely(!moddict)) goto bad;
if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
return module;
bad:
Py_XDECREF(module);
return NULL;
}
static CYTHON_SMALL_CODE int __pyx_pymod_exec_cython_utils(PyObject *__pyx_pyinit_module)
#endif
#endif
{
PyObject *__pyx_t_1 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannyDeclarations
#if CYTHON_PEP489_MULTI_PHASE_INIT
if (__pyx_m) {
if (__pyx_m == __pyx_pyinit_module) return 0;
PyErr_SetString(PyExc_RuntimeError, "Module 'cython_utils' has already been imported. Re-initialisation is not supported.");
return -1;
}
#elif PY_MAJOR_VERSION >= 3
if (__pyx_m) return __Pyx_NewRef(__pyx_m);
#endif
#if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
PyErr_Clear();
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
if (!__Pyx_RefNanny)
Py_FatalError("failed to import 'refnanny' module");
}
#endif
__Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_cython_utils(void)", 0);
if (__Pyx_check_binary_version() < 0) __PYX_ERR(3, 1, __pyx_L1_error)
#ifdef __Pxy_PyFrame_Initialize_Offsets
__Pxy_PyFrame_Initialize_Offsets();
#endif
__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(3, 1, __pyx_L1_error)
__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(3, 1, __pyx_L1_error)
__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(3, 1, __pyx_L1_error)
#ifdef __Pyx_CyFunction_USED
if (__pyx_CyFunction_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error)
#endif
#ifdef __Pyx_FusedFunction_USED
if (__pyx_FusedFunction_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error)
#endif
#ifdef __Pyx_Coroutine_USED
if (__pyx_Coroutine_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error)
#endif
#ifdef __Pyx_Generator_USED
if (__pyx_Generator_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error)
#endif
#ifdef __Pyx_AsyncGen_USED
if (__pyx_AsyncGen_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error)
#endif
#ifdef __Pyx_StopAsyncIteration_USED
if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(3, 1, __pyx_L1_error)
#endif
/*--- Library function declarations ---*/
/*--- Threads initialization code ---*/
#if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
#ifdef WITH_THREAD /* Python build with threading support? */
PyEval_InitThreads();
#endif
#endif
/*--- Module creation code ---*/
#if CYTHON_PEP489_MULTI_PHASE_INIT
__pyx_m = __pyx_pyinit_module;
Py_INCREF(__pyx_m);
#else
#if PY_MAJOR_VERSION < 3
__pyx_m = Py_InitModule4("cython_utils", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
#else
__pyx_m = PyModule_Create(&__pyx_moduledef);
#endif
if (unlikely(!__pyx_m)) __PYX_ERR(3, 1, __pyx_L1_error)
#endif
__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(3, 1, __pyx_L1_error)
Py_INCREF(__pyx_d);
__pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(3, 1, __pyx_L1_error)
Py_INCREF(__pyx_b);
__pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(3, 1, __pyx_L1_error)
Py_INCREF(__pyx_cython_runtime);
if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(3, 1, __pyx_L1_error);
/*--- Initialize various global constants etc. ---*/
if (__Pyx_InitGlobals() < 0) __PYX_ERR(3, 1, __pyx_L1_error)
#if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(3, 1, __pyx_L1_error)
#endif
if (__pyx_module_is_main_graphsaint__cython_utils) {
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
}
#if PY_MAJOR_VERSION >= 3
{
PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(3, 1, __pyx_L1_error)
if (!PyDict_GetItemString(modules, "graphsaint.cython_utils")) {
if (unlikely(PyDict_SetItemString(modules, "graphsaint.cython_utils", __pyx_m) < 0)) __PYX_ERR(3, 1, __pyx_L1_error)
}
}
#endif
/*--- Builtin init code ---*/
if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(3, 1, __pyx_L1_error)
/*--- Constants init code ---*/
if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(3, 1, __pyx_L1_error)
/*--- Global type/function init code ---*/
(void)__Pyx_modinit_global_init_code();
(void)__Pyx_modinit_variable_export_code();
(void)__Pyx_modinit_function_export_code();
if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(3, 1, __pyx_L1_error)
if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(3, 1, __pyx_L1_error)
(void)__Pyx_modinit_variable_import_code();
(void)__Pyx_modinit_function_import_code();
/*--- Execution code ---*/
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
if (__Pyx_patch_abc() < 0) __PYX_ERR(3, 1, __pyx_L1_error)
#endif
/* "graphsaint/cython_utils.pyx":12
* from libcpp.map cimport map
* from libcpp.utility cimport pair
* import numpy as np # <<<<<<<<<<<<<<
* cimport numpy as np
* from libc.stdio cimport printf
*/
__pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(3, 12, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "graphsaint/cython_utils.pyx":15
* cimport numpy as np
* from libc.stdio cimport printf
* import time # <<<<<<<<<<<<<<
*
* # reference: https://stackoverflow.com/questions/45133276/passing-c-vector-to-numpy-through-cython-without-copying-and-taking-care-of-me
*/
__pyx_t_1 = __Pyx_Import(__pyx_n_s_time, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_1) < 0) __PYX_ERR(3, 15, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "(tree fragment)":1
* def __pyx_unpickle_array_wrapper_float(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
* cdef object __pyx_PickleError
* cdef object __pyx_result
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10graphsaint_12cython_utils_1__pyx_unpickle_array_wrapper_float, NULL, __pyx_n_s_graphsaint_cython_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_array_wrapper_flo, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "(tree fragment)":11
* __pyx_unpickle_array_wrapper_float__set_state(<array_wrapper_float> __pyx_result, __pyx_state)
* return __pyx_result
* cdef __pyx_unpickle_array_wrapper_float__set_state(array_wrapper_float __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
* __pyx_result.shape = __pyx_state[0]; __pyx_result.strides = __pyx_state[1]; __pyx_result.vec = __pyx_state[2]
* if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10graphsaint_12cython_utils_3__pyx_unpickle_array_wrapper_int, NULL, __pyx_n_s_graphsaint_cython_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_array_wrapper_int, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "graphsaint/cython_utils.pyx":1
* # cython: language_level=3 # <<<<<<<<<<<<<<
* # distutils: language=c++
* # distutils: extra_compile_args = -fopenmp -std=c++11
*/
__pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "vector.from_py":45
*
* @cname("__pyx_convert_vector_from_py_int")
* cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *: # <<<<<<<<<<<<<<
* cdef vector[X] v
* for item in o:
*/
/*--- Wrapped vars code ---*/
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
if (__pyx_m) {
if (__pyx_d) {
__Pyx_AddTraceback("init graphsaint.cython_utils", __pyx_clineno, __pyx_lineno, __pyx_filename);
}
Py_CLEAR(__pyx_m);
} else if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_ImportError, "init graphsaint.cython_utils");
}
__pyx_L0:;
__Pyx_RefNannyFinishContext();
#if CYTHON_PEP489_MULTI_PHASE_INIT
return (__pyx_m != NULL) ? 0 : -1;
#elif PY_MAJOR_VERSION >= 3
return __pyx_m;
#else
return;
#endif
}
/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
PyObject *m = NULL, *p = NULL;
void *r = NULL;
m = PyImport_ImportModule(modname);
if (!m) goto end;
p = PyObject_GetAttrString(m, "RefNannyAPI");
if (!p) goto end;
r = PyLong_AsVoidPtr(p);
end:
Py_XDECREF(p);
Py_XDECREF(m);
return (__Pyx_RefNannyAPIStruct *)r;
}
#endif
/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
Py_ssize_t i, n;
n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
for (i=0; i<n; i++) {
if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
}
#endif
for (i=0; i<n; i++) {
if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
}
return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
PyObject *exc_type = tstate->curexc_type;
if (exc_type == err) return 1;
if (unlikely(!exc_type)) return 0;
if (unlikely(PyTuple_Check(err)))
return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif
/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
PyObject *tmp_type, *tmp_value, *tmp_tb;
tmp_type = tstate->curexc_type;
tmp_value = tstate->curexc_value;
tmp_tb = tstate->curexc_traceback;
tstate->curexc_type = type;
tstate->curexc_value = value;
tstate->curexc_traceback = tb;
Py_XDECREF(tmp_type);
Py_XDECREF(tmp_value);
Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
*type = tstate->curexc_type;
*value = tstate->curexc_value;
*tb = tstate->curexc_traceback;
tstate->curexc_type = 0;
tstate->curexc_value = 0;
tstate->curexc_traceback = 0;
}
#endif
/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
PyTypeObject* tp = Py_TYPE(obj);
if (likely(tp->tp_getattro))
return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
if (likely(tp->tp_getattr))
return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
return PyObject_GetAttr(obj, attr_name);
}
#endif
/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
if (likely(PyUnicode_Check(n)))
#else
if (likely(PyString_Check(n)))
#endif
return __Pyx_PyObject_GetAttrStr(o, n);
#endif
return PyObject_GetAttr(o, n);
}
/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
return NULL;
__Pyx_PyErr_Clear();
Py_INCREF(d);
return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
PyObject *r = __Pyx_GetAttr(o, n);
return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}
/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
if (unlikely(!result)) {
PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
"name '%U' is not defined", name);
#else
"name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
}
return result;
}
/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
PyObject *dict = Py_TYPE(obj)->tp_dict;
return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
PyObject **dictptr = NULL;
Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
dictptr = _PyObject_GetDictPtr(obj);
#endif
}
return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
PyObject *dict = Py_TYPE(obj)->tp_dict;
if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
return 0;
return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif
/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
__PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
if (likely(result)) {
return __Pyx_NewRef(result);
} else if (unlikely(PyErr_Occurred())) {
return NULL;
}
#else
result = PyDict_GetItem(__pyx_d, name);
__PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
if (likely(result)) {
return __Pyx_NewRef(result);
}
#endif
#else
result = PyObject_GetItem(__pyx_d, name);
__PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
if (likely(result)) {
return __Pyx_NewRef(result);
}
PyErr_Clear();
#endif
return __Pyx_GetBuiltinName(name);
}
/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
const char* func_name,
int exact,
Py_ssize_t num_min,
Py_ssize_t num_max,
Py_ssize_t num_found)
{
Py_ssize_t num_expected;
const char *more_or_less;
if (num_found < num_min) {
num_expected = num_min;
more_or_less = "at least";
} else {
num_expected = num_max;
more_or_less = "at most";
}
if (exact) {
more_or_less = "exactly";
}
PyErr_Format(PyExc_TypeError,
"%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
func_name, more_or_less, num_expected,
(num_expected == 1) ? "" : "s", num_found);
}
/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name,
PyObject* kw_name)
{
PyErr_Format(PyExc_TypeError,
#if PY_MAJOR_VERSION >= 3
"%s() got multiple values for keyword argument '%U'", func_name, kw_name);
#else
"%s() got multiple values for keyword argument '%s'", func_name,
PyString_AsString(kw_name));
#endif
}
/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
PyObject *kwds,
PyObject **argnames[],
PyObject *kwds2,
PyObject *values[],
Py_ssize_t num_pos_args,
const char* function_name)
{
PyObject *key = 0, *value = 0;
Py_ssize_t pos = 0;
PyObject*** name;
PyObject*** first_kw_arg = argnames + num_pos_args;
while (PyDict_Next(kwds, &pos, &key, &value)) {
name = first_kw_arg;
while (*name && (**name != key)) name++;
if (*name) {
values[name-argnames] = value;
continue;
}
name = first_kw_arg;
#if PY_MAJOR_VERSION < 3
if (likely(PyString_Check(key))) {
while (*name) {
if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
&& _PyString_Eq(**name, key)) {
values[name-argnames] = value;
break;
}
name++;
}
if (*name) continue;
else {
PyObject*** argname = argnames;
while (argname != first_kw_arg) {
if ((**argname == key) || (
(CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
&& _PyString_Eq(**argname, key))) {
goto arg_passed_twice;
}
argname++;
}
}
} else
#endif
if (likely(PyUnicode_Check(key))) {
while (*name) {
int cmp = (**name == key) ? 0 :
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
(__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
#endif
PyUnicode_Compare(**name, key);
if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
if (cmp == 0) {
values[name-argnames] = value;
break;
}
name++;
}
if (*name) continue;
else {
PyObject*** argname = argnames;
while (argname != first_kw_arg) {
int cmp = (**argname == key) ? 0 :
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
(__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
#endif
PyUnicode_Compare(**argname, key);
if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
if (cmp == 0) goto arg_passed_twice;
argname++;
}
}
} else
goto invalid_keyword_type;
if (kwds2) {
if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
} else {
goto invalid_keyword;
}
}
return 0;
arg_passed_twice:
__Pyx_RaiseDoubleKeywordsError(function_name, key);
goto bad;
invalid_keyword_type:
PyErr_Format(PyExc_TypeError,
"%.200s() keywords must be strings", function_name);
goto bad;
invalid_keyword:
PyErr_Format(PyExc_TypeError,
#if PY_MAJOR_VERSION < 3
"%.200s() got an unexpected keyword argument '%.200s'",
function_name, PyString_AsString(key));
#else
"%s() got an unexpected keyword argument '%U'",
function_name, key);
#endif
bad:
return -1;
}
/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
PyObject *empty_list = 0;
PyObject *module = 0;
PyObject *global_dict = 0;
PyObject *empty_dict = 0;
PyObject *list;
#if PY_MAJOR_VERSION < 3
PyObject *py_import;
py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
if (!py_import)
goto bad;
#endif
if (from_list)
list = from_list;
else {
empty_list = PyList_New(0);
if (!empty_list)
goto bad;
list = empty_list;
}
global_dict = PyModule_GetDict(__pyx_m);
if (!global_dict)
goto bad;
empty_dict = PyDict_New();
if (!empty_dict)
goto bad;
{
#if PY_MAJOR_VERSION >= 3
if (level == -1) {
if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
module = PyImport_ImportModuleLevelObject(
name, global_dict, empty_dict, list, 1);
if (!module) {
if (!PyErr_ExceptionMatches(PyExc_ImportError))
goto bad;
PyErr_Clear();
}
}
level = 0;
}
#endif
if (!module) {
#if PY_MAJOR_VERSION < 3
PyObject *py_level = PyInt_FromLong(level);
if (!py_level)
goto bad;
module = PyObject_CallFunctionObjArgs(py_import,
name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
Py_DECREF(py_level);
#else
module = PyImport_ImportModuleLevelObject(
name, global_dict, empty_dict, list, level);
#endif
}
}
bad:
#if PY_MAJOR_VERSION < 3
Py_XDECREF(py_import);
#endif
Py_XDECREF(empty_list);
Py_XDECREF(empty_dict);
return module;
}
/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
PyErr_Format(PyExc_ImportError,
#if PY_MAJOR_VERSION < 3
"cannot import name %.230s", PyString_AS_STRING(name));
#else
"cannot import name %S", name);
#endif
}
return value;
}
/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
PyCFunction meth = PyCFunction_GET_FUNCTION(func);
PyObject *self = PyCFunction_GET_SELF(func);
int flags = PyCFunction_GET_FLAGS(func);
assert(PyCFunction_Check(func));
assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
assert(nargs >= 0);
assert(nargs == 0 || args != NULL);
/* _PyCFunction_FastCallDict() must not be called with an exception set,
because it may clear it (directly or indirectly) and so the
caller loses its exception */
assert(!PyErr_Occurred());
if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
} else {
return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
}
}
#endif
/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
PyObject *globals) {
PyFrameObject *f;
PyThreadState *tstate = __Pyx_PyThreadState_Current;
PyObject **fastlocals;
Py_ssize_t i;
PyObject *result;
assert(globals != NULL);
/* XXX Perhaps we should create a specialized
PyFrame_New() that doesn't take locals, but does
take builtins without sanity checking them.
*/
assert(tstate != NULL);
f = PyFrame_New(tstate, co, globals, NULL);
if (f == NULL) {
return NULL;
}
fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
for (i = 0; i < na; i++) {
Py_INCREF(*args);
fastlocals[i] = *args++;
}
result = PyEval_EvalFrameEx(f,0);
++tstate->recursion_depth;
Py_DECREF(f);
--tstate->recursion_depth;
return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
PyObject *globals = PyFunction_GET_GLOBALS(func);
PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
PyObject *closure;
#if PY_MAJOR_VERSION >= 3
PyObject *kwdefs;
#endif
PyObject *kwtuple, **k;
PyObject **d;
Py_ssize_t nd;
Py_ssize_t nk;
PyObject *result;
assert(kwargs == NULL || PyDict_Check(kwargs));
nk = kwargs ? PyDict_Size(kwargs) : 0;
if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
return NULL;
}
if (
#if PY_MAJOR_VERSION >= 3
co->co_kwonlyargcount == 0 &&
#endif
likely(kwargs == NULL || nk == 0) &&
co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
if (argdefs == NULL && co->co_argcount == nargs) {
result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
goto done;
}
else if (nargs == 0 && argdefs != NULL
&& co->co_argcount == Py_SIZE(argdefs)) {
/* function called with no arguments, but all parameters have
a default value: use default values as arguments .*/
args = &PyTuple_GET_ITEM(argdefs, 0);
result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
goto done;
}
}
if (kwargs != NULL) {
Py_ssize_t pos, i;
kwtuple = PyTuple_New(2 * nk);
if (kwtuple == NULL) {
result = NULL;
goto done;
}
k = &PyTuple_GET_ITEM(kwtuple, 0);
pos = i = 0;
while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
Py_INCREF(k[i]);
Py_INCREF(k[i+1]);
i += 2;
}
nk = i / 2;
}
else {
kwtuple = NULL;
k = NULL;
}
closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
if (argdefs != NULL) {
d = &PyTuple_GET_ITEM(argdefs, 0);
nd = Py_SIZE(argdefs);
}
else {
d = NULL;
nd = 0;
}
#if PY_MAJOR_VERSION >= 3
result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
args, (int)nargs,
k, (int)nk,
d, (int)nd, kwdefs, closure);
#else
result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
args, (int)nargs,
k, (int)nk,
d, (int)nd, closure);
#endif
Py_XDECREF(kwtuple);
done:
Py_LeaveRecursiveCall();
return result;
}
#endif
#endif
/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
PyObject *result;
ternaryfunc call = func->ob_type->tp_call;
if (unlikely(!call))
return PyObject_Call(func, arg, kw);
if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
return NULL;
result = (*call)(func, arg, kw);
Py_LeaveRecursiveCall();
if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
PyErr_SetString(
PyExc_SystemError,
"NULL result without error in PyObject_Call");
}
return result;
}
#endif
/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
PyObject *args, *result = NULL;
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(function)) {
PyObject *args[2] = {arg1, arg2};
return __Pyx_PyFunction_FastCall(function, args, 2);
}
#endif
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(function)) {
PyObject *args[2] = {arg1, arg2};
return __Pyx_PyCFunction_FastCall(function, args, 2);
}
#endif
args = PyTuple_New(2);
if (unlikely(!args)) goto done;
Py_INCREF(arg1);
PyTuple_SET_ITEM(args, 0, arg1);
Py_INCREF(arg2);
PyTuple_SET_ITEM(args, 1, arg2);
Py_INCREF(function);
result = __Pyx_PyObject_Call(function, args, NULL);
Py_DECREF(args);
Py_DECREF(function);
done:
return result;
}
/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
PyObject *self, *result;
PyCFunction cfunc;
cfunc = PyCFunction_GET_FUNCTION(func);
self = PyCFunction_GET_SELF(func);
if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
return NULL;
result = cfunc(self, arg);
Py_LeaveRecursiveCall();
if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
PyErr_SetString(
PyExc_SystemError,
"NULL result without error in PyObject_Call");
}
return result;
}
#endif
/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
PyObject *result;
PyObject *args = PyTuple_New(1);
if (unlikely(!args)) return NULL;
Py_INCREF(arg);
PyTuple_SET_ITEM(args, 0, arg);
result = __Pyx_PyObject_Call(func, args, NULL);
Py_DECREF(args);
return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(func)) {
return __Pyx_PyFunction_FastCall(func, &arg, 1);
}
#endif
if (likely(PyCFunction_Check(func))) {
if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
} else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
}
}
return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
PyObject *result;
PyObject *args = PyTuple_Pack(1, arg);
if (unlikely(!args)) return NULL;
result = __Pyx_PyObject_Call(func, args, NULL);
Py_DECREF(args);
return result;
}
#endif
/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
CYTHON_UNUSED PyObject *cause) {
__Pyx_PyThreadState_declare
Py_XINCREF(type);
if (!value || value == Py_None)
value = NULL;
else
Py_INCREF(value);
if (!tb || tb == Py_None)
tb = NULL;
else {
Py_INCREF(tb);
if (!PyTraceBack_Check(tb)) {
PyErr_SetString(PyExc_TypeError,
"raise: arg 3 must be a traceback or None");
goto raise_error;
}
}
if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
if (!value) {
Py_INCREF(Py_None);
value = Py_None;
}
#endif
PyErr_NormalizeException(&type, &value, &tb);
} else {
if (value) {
PyErr_SetString(PyExc_TypeError,
"instance exception may not have a separate value");
goto raise_error;
}
value = type;
type = (PyObject*) Py_TYPE(type);
Py_INCREF(type);
if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
PyErr_SetString(PyExc_TypeError,
"raise: exception class must be a subclass of BaseException");
goto raise_error;
}
}
__Pyx_PyThreadState_assign
__Pyx_ErrRestore(type, value, tb);
return;
raise_error:
Py_XDECREF(value);
Py_XDECREF(type);
Py_XDECREF(tb);
return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
PyObject* owned_instance = NULL;
if (tb == Py_None) {
tb = 0;
} else if (tb && !PyTraceBack_Check(tb)) {
PyErr_SetString(PyExc_TypeError,
"raise: arg 3 must be a traceback or None");
goto bad;
}
if (value == Py_None)
value = 0;
if (PyExceptionInstance_Check(type)) {
if (value) {
PyErr_SetString(PyExc_TypeError,
"instance exception may not have a separate value");
goto bad;
}
value = type;
type = (PyObject*) Py_TYPE(value);
} else if (PyExceptionClass_Check(type)) {
PyObject *instance_class = NULL;
if (value && PyExceptionInstance_Check(value)) {
instance_class = (PyObject*) Py_TYPE(value);
if (instance_class != type) {
int is_subclass = PyObject_IsSubclass(instance_class, type);
if (!is_subclass) {
instance_class = NULL;
} else if (unlikely(is_subclass == -1)) {
goto bad;
} else {
type = instance_class;
}
}
}
if (!instance_class) {
PyObject *args;
if (!value)
args = PyTuple_New(0);
else if (PyTuple_Check(value)) {
Py_INCREF(value);
args = value;
} else
args = PyTuple_Pack(1, value);
if (!args)
goto bad;
owned_instance = PyObject_Call(type, args, NULL);
Py_DECREF(args);
if (!owned_instance)
goto bad;
value = owned_instance;
if (!PyExceptionInstance_Check(value)) {
PyErr_Format(PyExc_TypeError,
"calling %R should have returned an instance of "
"BaseException, not %R",
type, Py_TYPE(value));
goto bad;
}
}
} else {
PyErr_SetString(PyExc_TypeError,
"raise: exception class must be a subclass of BaseException");
goto bad;
}
if (cause) {
PyObject *fixed_cause;
if (cause == Py_None) {
fixed_cause = NULL;
} else if (PyExceptionClass_Check(cause)) {
fixed_cause = PyObject_CallObject(cause, NULL);
if (fixed_cause == NULL)
goto bad;
} else if (PyExceptionInstance_Check(cause)) {
fixed_cause = cause;
Py_INCREF(fixed_cause);
} else {
PyErr_SetString(PyExc_TypeError,
"exception causes must derive from "
"BaseException");
goto bad;
}
PyException_SetCause(value, fixed_cause);
}
PyErr_SetObject(type, value);
if (tb) {
#if CYTHON_COMPILING_IN_PYPY
PyObject *tmp_type, *tmp_value, *tmp_tb;
PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
Py_INCREF(tb);
PyErr_Restore(tmp_type, tmp_value, tb);
Py_XDECREF(tmp_tb);
#else
PyThreadState *tstate = __Pyx_PyThreadState_Current;
PyObject* tmp_tb = tstate->curexc_traceback;
if (tb != tmp_tb) {
Py_INCREF(tb);
tstate->curexc_traceback = tb;
Py_XDECREF(tmp_tb);
}
#endif
}
bad:
Py_XDECREF(owned_instance);
return;
}
#endif
/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
PyObject *r;
if (!j) return NULL;
r = PyObject_GetItem(o, j);
Py_DECREF(j);
return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
CYTHON_NCP_UNUSED int wraparound,
CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
Py_ssize_t wrapped_i = i;
if (wraparound & unlikely(i < 0)) {
wrapped_i += PyList_GET_SIZE(o);
}
if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
PyObject *r = PyList_GET_ITEM(o, wrapped_i);
Py_INCREF(r);
return r;
}
return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
CYTHON_NCP_UNUSED int wraparound,
CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
Py_ssize_t wrapped_i = i;
if (wraparound & unlikely(i < 0)) {
wrapped_i += PyTuple_GET_SIZE(o);
}
if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
Py_INCREF(r);
return r;
}
return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
CYTHON_NCP_UNUSED int wraparound,
CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
if (is_list || PyList_CheckExact(o)) {
Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
PyObject *r = PyList_GET_ITEM(o, n);
Py_INCREF(r);
return r;
}
}
else if (PyTuple_CheckExact(o)) {
Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
PyObject *r = PyTuple_GET_ITEM(o, n);
Py_INCREF(r);
return r;
}
} else {
PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
if (likely(m && m->sq_item)) {
if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
Py_ssize_t l = m->sq_length(o);
if (likely(l >= 0)) {
i += l;
} else {
if (!PyErr_ExceptionMatches(PyExc_OverflowError))
return NULL;
PyErr_Clear();
}
}
return m->sq_item(o, i);
}
}
#else
if (is_list || PySequence_Check(o)) {
return PySequence_GetItem(o, i);
}
#endif
return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}
/* HasAttr */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
PyObject *r;
if (unlikely(!__Pyx_PyBaseString_Check(n))) {
PyErr_SetString(PyExc_TypeError,
"hasattr(): attribute name must be string");
return -1;
}
r = __Pyx_GetAttr(o, n);
if (unlikely(!r)) {
PyErr_Clear();
return 0;
} else {
Py_DECREF(r);
return 1;
}
}
/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
_PyErr_StackItem *exc_info = tstate->exc_info;
while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
exc_info->previous_item != NULL)
{
exc_info = exc_info->previous_item;
}
return exc_info;
}
#endif
/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_USE_EXC_INFO_STACK
_PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
*type = exc_info->exc_type;
*value = exc_info->exc_value;
*tb = exc_info->exc_traceback;
#else
*type = tstate->exc_type;
*value = tstate->exc_value;
*tb = tstate->exc_traceback;
#endif
Py_XINCREF(*type);
Py_XINCREF(*value);
Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
PyObject *tmp_type, *tmp_value, *tmp_tb;
#if CYTHON_USE_EXC_INFO_STACK
_PyErr_StackItem *exc_info = tstate->exc_info;
tmp_type = exc_info->exc_type;
tmp_value = exc_info->exc_value;
tmp_tb = exc_info->exc_traceback;
exc_info->exc_type = type;
exc_info->exc_value = value;
exc_info->exc_traceback = tb;
#else
tmp_type = tstate->exc_type;
tmp_value = tstate->exc_value;
tmp_tb = tstate->exc_traceback;
tstate->exc_type = type;
tstate->exc_value = value;
tstate->exc_traceback = tb;
#endif
Py_XDECREF(tmp_type);
Py_XDECREF(tmp_value);
Py_XDECREF(tmp_tb);
}
#endif
/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
PyObject *tmp_type, *tmp_value, *tmp_tb;
local_type = tstate->curexc_type;
local_value = tstate->curexc_value;
local_tb = tstate->curexc_traceback;
tstate->curexc_type = 0;
tstate->curexc_value = 0;
tstate->curexc_traceback = 0;
#else
PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
if (unlikely(tstate->curexc_type))
#else
if (unlikely(PyErr_Occurred()))
#endif
goto bad;
#if PY_MAJOR_VERSION >= 3
if (local_tb) {
if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
goto bad;
}
#endif
Py_XINCREF(local_tb);
Py_XINCREF(local_type);
Py_XINCREF(local_value);
*type = local_type;
*value = local_value;
*tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
#if CYTHON_USE_EXC_INFO_STACK
{
_PyErr_StackItem *exc_info = tstate->exc_info;
tmp_type = exc_info->exc_type;
tmp_value = exc_info->exc_value;
tmp_tb = exc_info->exc_traceback;
exc_info->exc_type = local_type;
exc_info->exc_value = local_value;
exc_info->exc_traceback = local_tb;
}
#else
tmp_type = tstate->exc_type;
tmp_value = tstate->exc_value;
tmp_tb = tstate->exc_traceback;
tstate->exc_type = local_type;
tstate->exc_value = local_value;
tstate->exc_traceback = local_tb;
#endif
Py_XDECREF(tmp_type);
Py_XDECREF(tmp_value);
Py_XDECREF(tmp_tb);
#else
PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
return 0;
bad:
*type = 0;
*value = 0;
*tb = 0;
Py_XDECREF(local_type);
Py_XDECREF(local_value);
Py_XDECREF(local_tb);
return -1;
}
/* IsLittleEndian */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
{
union {
uint32_t u32;
uint8_t u8[4];
} S;
S.u32 = 0x01020304;
return S.u8[0] == 4;
}
/* BufferFormatCheck */
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
__Pyx_BufFmt_StackElem* stack,
__Pyx_TypeInfo* type) {
stack[0].field = &ctx->root;
stack[0].parent_offset = 0;
ctx->root.type = type;
ctx->root.name = "buffer dtype";
ctx->root.offset = 0;
ctx->head = stack;
ctx->head->field = &ctx->root;
ctx->fmt_offset = 0;
ctx->head->parent_offset = 0;
ctx->new_packmode = '@';
ctx->enc_packmode = '@';
ctx->new_count = 1;
ctx->enc_count = 0;
ctx->enc_type = 0;
ctx->is_complex = 0;
ctx->is_valid_array = 0;
ctx->struct_alignment = 0;
while (type->typegroup == 'S') {
++ctx->head;
ctx->head->field = type->fields;
ctx->head->parent_offset = 0;
type = type->fields->type;
}
}
static int __Pyx_BufFmt_ParseNumber(const char** ts) {
int count;
const char* t = *ts;
if (*t < '0' || *t > '9') {
return -1;
} else {
count = *t++ - '0';
while (*t >= '0' && *t <= '9') {
count *= 10;
count += *t++ - '0';
}
}
*ts = t;
return count;
}
static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
int number = __Pyx_BufFmt_ParseNumber(ts);
if (number == -1)
PyErr_Format(PyExc_ValueError,\
"Does not understand character buffer dtype format string ('%c')", **ts);
return number;
}
static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
PyErr_Format(PyExc_ValueError,
"Unexpected format string character: '%c'", ch);
}
static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
switch (ch) {
case '?': return "'bool'";
case 'c': return "'char'";
case 'b': return "'signed char'";
case 'B': return "'unsigned char'";
case 'h': return "'short'";
case 'H': return "'unsigned short'";
case 'i': return "'int'";
case 'I': return "'unsigned int'";
case 'l': return "'long'";
case 'L': return "'unsigned long'";
case 'q': return "'long long'";
case 'Q': return "'unsigned long long'";
case 'f': return (is_complex ? "'complex float'" : "'float'");
case 'd': return (is_complex ? "'complex double'" : "'double'");
case 'g': return (is_complex ? "'complex long double'" : "'long double'");
case 'T': return "a struct";
case 'O': return "Python object";
case 'P': return "a pointer";
case 's': case 'p': return "a string";
case 0: return "end";
default: return "unparseable format string";
}
}
static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
switch (ch) {
case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
case 'h': case 'H': return 2;
case 'i': case 'I': case 'l': case 'L': return 4;
case 'q': case 'Q': return 8;
case 'f': return (is_complex ? 8 : 4);
case 'd': return (is_complex ? 16 : 8);
case 'g': {
PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
return 0;
}
case 'O': case 'P': return sizeof(void*);
default:
__Pyx_BufFmt_RaiseUnexpectedChar(ch);
return 0;
}
}
static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
switch (ch) {
case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
case 'h': case 'H': return sizeof(short);
case 'i': case 'I': return sizeof(int);
case 'l': case 'L': return sizeof(long);
#ifdef HAVE_LONG_LONG
case 'q': case 'Q': return sizeof(PY_LONG_LONG);
#endif
case 'f': return sizeof(float) * (is_complex ? 2 : 1);
case 'd': return sizeof(double) * (is_complex ? 2 : 1);
case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
case 'O': case 'P': return sizeof(void*);
default: {
__Pyx_BufFmt_RaiseUnexpectedChar(ch);
return 0;
}
}
}
typedef struct { char c; short x; } __Pyx_st_short;
typedef struct { char c; int x; } __Pyx_st_int;
typedef struct { char c; long x; } __Pyx_st_long;
typedef struct { char c; float x; } __Pyx_st_float;
typedef struct { char c; double x; } __Pyx_st_double;
typedef struct { char c; long double x; } __Pyx_st_longdouble;
typedef struct { char c; void *x; } __Pyx_st_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
switch (ch) {
case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
#endif
case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
default:
__Pyx_BufFmt_RaiseUnexpectedChar(ch);
return 0;
}
}
/* These are for computing the padding at the end of the struct to align
on the first member of the struct. This will probably the same as above,
but we don't have any guarantees.
*/
typedef struct { short x; char c; } __Pyx_pad_short;
typedef struct { int x; char c; } __Pyx_pad_int;
typedef struct { long x; char c; } __Pyx_pad_long;
typedef struct { float x; char c; } __Pyx_pad_float;
typedef struct { double x; char c; } __Pyx_pad_double;
typedef struct { long double x; char c; } __Pyx_pad_longdouble;
typedef struct { void *x; char c; } __Pyx_pad_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
switch (ch) {
case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
#endif
case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
default:
__Pyx_BufFmt_RaiseUnexpectedChar(ch);
return 0;
}
}
static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
switch (ch) {
case 'c':
return 'H';
case 'b': case 'h': case 'i':
case 'l': case 'q': case 's': case 'p':
return 'I';
case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
return 'U';
case 'f': case 'd': case 'g':
return (is_complex ? 'C' : 'R');
case 'O':
return 'O';
case 'P':
return 'P';
default: {
__Pyx_BufFmt_RaiseUnexpectedChar(ch);
return 0;
}
}
}
static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
if (ctx->head == NULL || ctx->head->field == &ctx->root) {
const char* expected;
const char* quote;
if (ctx->head == NULL) {
expected = "end";
quote = "";
} else {
expected = ctx->head->field->type->name;
quote = "'";
}
PyErr_Format(PyExc_ValueError,
"Buffer dtype mismatch, expected %s%s%s but got %s",
quote, expected, quote,
__Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
} else {
__Pyx_StructField* field = ctx->head->field;
__Pyx_StructField* parent = (ctx->head - 1)->field;
PyErr_Format(PyExc_ValueError,
"Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
parent->type->name, field->name);
}
}
static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
char group;
size_t size, offset, arraysize = 1;
if (ctx->enc_type == 0) return 0;
if (ctx->head->field->type->arraysize[0]) {
int i, ndim = 0;
if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
ctx->is_valid_array = ctx->head->field->type->ndim == 1;
ndim = 1;
if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
PyErr_Format(PyExc_ValueError,
"Expected a dimension of size %zu, got %zu",
ctx->head->field->type->arraysize[0], ctx->enc_count);
return -1;
}
}
if (!ctx->is_valid_array) {
PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
ctx->head->field->type->ndim, ndim);
return -1;
}
for (i = 0; i < ctx->head->field->type->ndim; i++) {
arraysize *= ctx->head->field->type->arraysize[i];
}
ctx->is_valid_array = 0;
ctx->enc_count = 1;
}
group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
do {
__Pyx_StructField* field = ctx->head->field;
__Pyx_TypeInfo* type = field->type;
if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
} else {
size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
}
if (ctx->enc_packmode == '@') {
size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
size_t align_mod_offset;
if (align_at == 0) return -1;
align_mod_offset = ctx->fmt_offset % align_at;
if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
if (ctx->struct_alignment == 0)
ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
ctx->is_complex);
}
if (type->size != size || type->typegroup != group) {
if (type->typegroup == 'C' && type->fields != NULL) {
size_t parent_offset = ctx->head->parent_offset + field->offset;
++ctx->head;
ctx->head->field = type->fields;
ctx->head->parent_offset = parent_offset;
continue;
}
if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
} else {
__Pyx_BufFmt_RaiseExpected(ctx);
return -1;
}
}
offset = ctx->head->parent_offset + field->offset;
if (ctx->fmt_offset != offset) {
PyErr_Format(PyExc_ValueError,
"Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
(Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
return -1;
}
ctx->fmt_offset += size;
if (arraysize)
ctx->fmt_offset += (arraysize - 1) * size;
--ctx->enc_count;
while (1) {
if (field == &ctx->root) {
ctx->head = NULL;
if (ctx->enc_count != 0) {
__Pyx_BufFmt_RaiseExpected(ctx);
return -1;
}
break;
}
ctx->head->field = ++field;
if (field->type == NULL) {
--ctx->head;
field = ctx->head->field;
continue;
} else if (field->type->typegroup == 'S') {
size_t parent_offset = ctx->head->parent_offset + field->offset;
if (field->type->fields->type == NULL) continue;
field = field->type->fields;
++ctx->head;
ctx->head->field = field;
ctx->head->parent_offset = parent_offset;
break;
} else {
break;
}
}
} while (ctx->enc_count);
ctx->enc_type = 0;
ctx->is_complex = 0;
return 0;
}
static PyObject *
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
{
const char *ts = *tsp;
int i = 0, number, ndim;
++ts;
if (ctx->new_count != 1) {
PyErr_SetString(PyExc_ValueError,
"Cannot handle repeated arrays in format string");
return NULL;
}
if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
ndim = ctx->head->field->type->ndim;
while (*ts && *ts != ')') {
switch (*ts) {
case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue;
default: break;
}
number = __Pyx_BufFmt_ExpectNumber(&ts);
if (number == -1) return NULL;
if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
return PyErr_Format(PyExc_ValueError,
"Expected a dimension of size %zu, got %d",
ctx->head->field->type->arraysize[i], number);
if (*ts != ',' && *ts != ')')
return PyErr_Format(PyExc_ValueError,
"Expected a comma in format string, got '%c'", *ts);
if (*ts == ',') ts++;
i++;
}
if (i != ndim)
return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
ctx->head->field->type->ndim, i);
if (!*ts) {
PyErr_SetString(PyExc_ValueError,
"Unexpected end of format string, expected ')'");
return NULL;
}
ctx->is_valid_array = 1;
ctx->new_count = 1;
*tsp = ++ts;
return Py_None;
}
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
int got_Z = 0;
while (1) {
switch(*ts) {
case 0:
if (ctx->enc_type != 0 && ctx->head == NULL) {
__Pyx_BufFmt_RaiseExpected(ctx);
return NULL;
}
if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
if (ctx->head != NULL) {
__Pyx_BufFmt_RaiseExpected(ctx);
return NULL;
}
return ts;
case ' ':
case '\r':
case '\n':
++ts;
break;
case '<':
if (!__Pyx_Is_Little_Endian()) {
PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
return NULL;
}
ctx->new_packmode = '=';
++ts;
break;
case '>':
case '!':
if (__Pyx_Is_Little_Endian()) {
PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
return NULL;
}
ctx->new_packmode = '=';
++ts;
break;
case '=':
case '@':
case '^':
ctx->new_packmode = *ts++;
break;
case 'T':
{
const char* ts_after_sub;
size_t i, struct_count = ctx->new_count;
size_t struct_alignment = ctx->struct_alignment;
ctx->new_count = 1;
++ts;
if (*ts != '{') {
PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
return NULL;
}
if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
ctx->enc_type = 0;
ctx->enc_count = 0;
ctx->struct_alignment = 0;
++ts;
ts_after_sub = ts;
for (i = 0; i != struct_count; ++i) {
ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
if (!ts_after_sub) return NULL;
}
ts = ts_after_sub;
if (struct_alignment) ctx->struct_alignment = struct_alignment;
}
break;
case '}':
{
size_t alignment = ctx->struct_alignment;
++ts;
if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
ctx->enc_type = 0;
if (alignment && ctx->fmt_offset % alignment) {
ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
}
}
return ts;
case 'x':
if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
ctx->fmt_offset += ctx->new_count;
ctx->new_count = 1;
ctx->enc_count = 0;
ctx->enc_type = 0;
ctx->enc_packmode = ctx->new_packmode;
++ts;
break;
case 'Z':
got_Z = 1;
++ts;
if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
__Pyx_BufFmt_RaiseUnexpectedChar('Z');
return NULL;
}
CYTHON_FALLTHROUGH;
case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
case 'l': case 'L': case 'q': case 'Q':
case 'f': case 'd': case 'g':
case 'O': case 'p':
if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
(ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
ctx->enc_count += ctx->new_count;
ctx->new_count = 1;
got_Z = 0;
++ts;
break;
}
CYTHON_FALLTHROUGH;
case 's':
if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
ctx->enc_count = ctx->new_count;
ctx->enc_packmode = ctx->new_packmode;
ctx->enc_type = *ts;
ctx->is_complex = got_Z;
++ts;
ctx->new_count = 1;
got_Z = 0;
break;
case ':':
++ts;
while(*ts != ':') ++ts;
++ts;
break;
case '(':
if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
break;
default:
{
int number = __Pyx_BufFmt_ExpectNumber(&ts);
if (number == -1) return NULL;
ctx->new_count = (size_t)number;
}
}
}
}
/* BufferGetAndValidate */
static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
if (unlikely(info->buf == NULL)) return;
if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
__Pyx_ReleaseBuffer(info);
}
static void __Pyx_ZeroBuffer(Py_buffer* buf) {
buf->buf = NULL;
buf->obj = NULL;
buf->strides = __Pyx_zeros;
buf->shape = __Pyx_zeros;
buf->suboffsets = __Pyx_minusones;
}
static int __Pyx__GetBufferAndValidate(
Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags,
int nd, int cast, __Pyx_BufFmt_StackElem* stack)
{
buf->buf = NULL;
if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) {
__Pyx_ZeroBuffer(buf);
return -1;
}
if (unlikely(buf->ndim != nd)) {
PyErr_Format(PyExc_ValueError,
"Buffer has wrong number of dimensions (expected %d, got %d)",
nd, buf->ndim);
goto fail;
}
if (!cast) {
__Pyx_BufFmt_Context ctx;
__Pyx_BufFmt_Init(&ctx, stack, dtype);
if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
}
if (unlikely((size_t)buf->itemsize != dtype->size)) {
PyErr_Format(PyExc_ValueError,
"Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)",
buf->itemsize, (buf->itemsize > 1) ? "s" : "",
dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
goto fail;
}
if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
return 0;
fail:;
__Pyx_SafeReleaseBuffer(buf);
return -1;
}
/* BufferIndexError */
static void __Pyx_RaiseBufferIndexError(int axis) {
PyErr_Format(PyExc_IndexError,
"Out of bounds on buffer access (axis %d)", axis);
}
/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
int full_traceback, CYTHON_UNUSED int nogil) {
PyObject *old_exc, *old_val, *old_tb;
PyObject *ctx;
__Pyx_PyThreadState_declare
#ifdef WITH_THREAD
PyGILState_STATE state;
if (nogil)
state = PyGILState_Ensure();
#ifdef _MSC_VER
else state = (PyGILState_STATE)-1;
#endif
#endif
__Pyx_PyThreadState_assign
__Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
if (full_traceback) {
Py_XINCREF(old_exc);
Py_XINCREF(old_val);
Py_XINCREF(old_tb);
__Pyx_ErrRestore(old_exc, old_val, old_tb);
PyErr_PrintEx(1);
}
#if PY_MAJOR_VERSION < 3
ctx = PyString_FromString(name);
#else
ctx = PyUnicode_FromString(name);
#endif
__Pyx_ErrRestore(old_exc, old_val, old_tb);
if (!ctx) {
PyErr_WriteUnraisable(Py_None);
} else {
PyErr_WriteUnraisable(ctx);
Py_DECREF(ctx);
}
#ifdef WITH_THREAD
if (nogil)
PyGILState_Release(state);
#endif
}
/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
"'%.50s' object has no attribute '%U'",
tp->tp_name, attr_name);
#else
"'%.50s' object has no attribute '%.400s'",
tp->tp_name, PyString_AS_STRING(attr_name));
#endif
return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
PyObject *descr;
PyTypeObject *tp = Py_TYPE(obj);
if (unlikely(!PyString_Check(attr_name))) {
return PyObject_GenericGetAttr(obj, attr_name);
}
assert(!tp->tp_dictoffset);
descr = _PyType_Lookup(tp, attr_name);
if (unlikely(!descr)) {
return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
}
Py_INCREF(descr);
#if PY_MAJOR_VERSION < 3
if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
#endif
{
descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
if (unlikely(f)) {
PyObject *res = f(descr, obj, (PyObject *)tp);
Py_DECREF(descr);
return res;
}
}
return descr;
}
#endif
/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
return PyObject_GenericGetAttr(obj, attr_name);
}
return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif
/* SetVTable */
static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
if (!ob)
goto bad;
if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
goto bad;
Py_DECREF(ob);
return 0;
bad:
Py_XDECREF(ob);
return -1;
}
/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
__Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
PyTypeObject* tp = Py_TYPE(obj);
if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
}
#endif
result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
if (unlikely(!result)) {
__Pyx_PyObject_GetAttrStr_ClearAttributeError();
}
return result;
}
/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
int ret;
PyObject *name_attr;
name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
if (likely(name_attr)) {
ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
} else {
ret = -1;
}
if (unlikely(ret < 0)) {
PyErr_Clear();
ret = 0;
}
Py_XDECREF(name_attr);
return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
int ret = 0;
PyObject *object_reduce = NULL;
PyObject *object_reduce_ex = NULL;
PyObject *reduce = NULL;
PyObject *reduce_ex = NULL;
PyObject *reduce_cython = NULL;
PyObject *setstate = NULL;
PyObject *setstate_cython = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#else
if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
if (likely(reduce_cython)) {
ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
} else if (reduce == object_reduce || PyErr_Occurred()) {
goto __PYX_BAD;
}
setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
if (!setstate) PyErr_Clear();
if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
if (likely(setstate_cython)) {
ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
} else if (!setstate || PyErr_Occurred()) {
goto __PYX_BAD;
}
}
PyType_Modified((PyTypeObject*)type_obj);
}
}
goto __PYX_GOOD;
__PYX_BAD:
if (!PyErr_Occurred())
PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
Py_XDECREF(object_reduce);
Py_XDECREF(object_reduce_ex);
#endif
Py_XDECREF(reduce);
Py_XDECREF(reduce_ex);
Py_XDECREF(reduce_cython);
Py_XDECREF(setstate);
Py_XDECREF(setstate_cython);
return ret;
}
/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
size_t size, enum __Pyx_ImportType_CheckSize check_size)
{
PyObject *result = 0;
char warning[200];
Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
PyObject *py_basicsize;
#endif
result = PyObject_GetAttrString(module, class_name);
if (!result)
goto bad;
if (!PyType_Check(result)) {
PyErr_Format(PyExc_TypeError,
"%.200s.%.200s is not a type object",
module_name, class_name);
goto bad;
}
#ifndef Py_LIMITED_API
basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
if (!py_basicsize)
goto bad;
basicsize = PyLong_AsSsize_t(py_basicsize);
Py_DECREF(py_basicsize);
py_basicsize = 0;
if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
goto bad;
#endif
if ((size_t)basicsize < size) {
PyErr_Format(PyExc_ValueError,
"%.200s.%.200s size changed, may indicate binary incompatibility. "
"Expected %zd from C header, got %zd from PyObject",
module_name, class_name, size, basicsize);
goto bad;
}
if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
PyErr_Format(PyExc_ValueError,
"%.200s.%.200s size changed, may indicate binary incompatibility. "
"Expected %zd from C header, got %zd from PyObject",
module_name, class_name, size, basicsize);
goto bad;
}
else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
PyOS_snprintf(warning, sizeof(warning),
"%s.%s size changed, may indicate binary incompatibility. "
"Expected %zd from C header, got %zd from PyObject",
module_name, class_name, size, basicsize);
if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
}
return (PyTypeObject *)result;
bad:
Py_XDECREF(result);
return NULL;
}
#endif
/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
PyObject *use_cline;
PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
PyObject **cython_runtime_dict;
#endif
if (unlikely(!__pyx_cython_runtime)) {
return c_line;
}
__Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
if (likely(cython_runtime_dict)) {
__PYX_PY_DICT_LOOKUP_IF_MODIFIED(
use_cline, *cython_runtime_dict,
__Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
} else
#endif
{
PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
if (use_cline_obj) {
use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
Py_DECREF(use_cline_obj);
} else {
PyErr_Clear();
use_cline = NULL;
}
}
if (!use_cline) {
c_line = 0;
PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
}
else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
c_line = 0;
}
__Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
return c_line;
}
#endif
/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
int start = 0, mid = 0, end = count - 1;
if (end >= 0 && code_line > entries[end].code_line) {
return count;
}
while (start < end) {
mid = start + (end - start) / 2;
if (code_line < entries[mid].code_line) {
end = mid;
} else if (code_line > entries[mid].code_line) {
start = mid + 1;
} else {
return mid;
}
}
if (code_line <= entries[mid].code_line) {
return mid;
} else {
return mid + 1;
}
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
PyCodeObject* code_object;
int pos;
if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
return NULL;
}
pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
return NULL;
}
code_object = __pyx_code_cache.entries[pos].code_object;
Py_INCREF(code_object);
return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
int pos, i;
__Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
if (unlikely(!code_line)) {
return;
}
if (unlikely(!entries)) {
entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
if (likely(entries)) {
__pyx_code_cache.entries = entries;
__pyx_code_cache.max_count = 64;
__pyx_code_cache.count = 1;
entries[0].code_line = code_line;
entries[0].code_object = code_object;
Py_INCREF(code_object);
}
return;
}
pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
PyCodeObject* tmp = entries[pos].code_object;
entries[pos].code_object = code_object;
Py_DECREF(tmp);
return;
}
if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
int new_max = __pyx_code_cache.max_count + 64;
entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
__pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
if (unlikely(!entries)) {
return;
}
__pyx_code_cache.entries = entries;
__pyx_code_cache.max_count = new_max;
}
for (i=__pyx_code_cache.count; i>pos; i--) {
entries[i] = entries[i-1];
}
entries[pos].code_line = code_line;
entries[pos].code_object = code_object;
__pyx_code_cache.count++;
Py_INCREF(code_object);
}
/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
const char *funcname, int c_line,
int py_line, const char *filename) {
PyCodeObject *py_code = 0;
PyObject *py_srcfile = 0;
PyObject *py_funcname = 0;
#if PY_MAJOR_VERSION < 3
py_srcfile = PyString_FromString(filename);
#else
py_srcfile = PyUnicode_FromString(filename);
#endif
if (!py_srcfile) goto bad;
if (c_line) {
#if PY_MAJOR_VERSION < 3
py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
#else
py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
#endif
}
else {
#if PY_MAJOR_VERSION < 3
py_funcname = PyString_FromString(funcname);
#else
py_funcname = PyUnicode_FromString(funcname);
#endif
}
if (!py_funcname) goto bad;
py_code = __Pyx_PyCode_New(
0,
0,
0,
0,
0,
__pyx_empty_bytes, /*PyObject *code,*/
__pyx_empty_tuple, /*PyObject *consts,*/
__pyx_empty_tuple, /*PyObject *names,*/
__pyx_empty_tuple, /*PyObject *varnames,*/
__pyx_empty_tuple, /*PyObject *freevars,*/
__pyx_empty_tuple, /*PyObject *cellvars,*/
py_srcfile, /*PyObject *filename,*/
py_funcname, /*PyObject *name,*/
py_line,
__pyx_empty_bytes /*PyObject *lnotab*/
);
Py_DECREF(py_srcfile);
Py_DECREF(py_funcname);
return py_code;
bad:
Py_XDECREF(py_srcfile);
Py_XDECREF(py_funcname);
return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
int py_line, const char *filename) {
PyCodeObject *py_code = 0;
PyFrameObject *py_frame = 0;
PyThreadState *tstate = __Pyx_PyThreadState_Current;
if (c_line) {
c_line = __Pyx_CLineForTraceback(tstate, c_line);
}
py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
if (!py_code) {
py_code = __Pyx_CreateCodeObjectForTraceback(
funcname, c_line, py_line, filename);
if (!py_code) goto bad;
__pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
}
py_frame = PyFrame_New(
tstate, /*PyThreadState *tstate,*/
py_code, /*PyCodeObject *code,*/
__pyx_d, /*PyObject *globals,*/
0 /*PyObject *locals*/
);
if (!py_frame) goto bad;
__Pyx_PyFrame_SetLineNumber(py_frame, py_line);
PyTraceBack_Here(py_frame);
bad:
Py_XDECREF(py_code);
Py_XDECREF(py_frame);
}
#if PY_MAJOR_VERSION < 3
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
if (__Pyx_TypeCheck(obj, __pyx_ptype_10graphsaint_12cython_utils_array_wrapper_float)) return __pyx_pw_10graphsaint_12cython_utils_19array_wrapper_float_1__getbuffer__(obj, view, flags);
if (__Pyx_TypeCheck(obj, __pyx_ptype_10graphsaint_12cython_utils_array_wrapper_int)) return __pyx_pw_10graphsaint_12cython_utils_17array_wrapper_int_1__getbuffer__(obj, view, flags);
PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
return -1;
}
static void __Pyx_ReleaseBuffer(Py_buffer *view) {
PyObject *obj = view->obj;
if (!obj) return;
if (PyObject_CheckBuffer(obj)) {
PyBuffer_Release(view);
return;
}
if ((0)) {}
else if (__Pyx_TypeCheck(obj, __pyx_ptype_10graphsaint_12cython_utils_array_wrapper_float)) __pyx_pw_10graphsaint_12cython_utils_19array_wrapper_float_3__releasebuffer__(obj, view);
else if (__Pyx_TypeCheck(obj, __pyx_ptype_10graphsaint_12cython_utils_array_wrapper_int)) __pyx_pw_10graphsaint_12cython_utils_17array_wrapper_int_3__releasebuffer__(obj, view);
view->obj = NULL;
Py_DECREF(obj);
}
#endif
/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
__PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
__PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
{\
func_type value = func_value;\
if (sizeof(target_type) < sizeof(func_type)) {\
if (unlikely(value != (func_type) (target_type) value)) {\
func_type zero = 0;\
if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
return (target_type) -1;\
if (is_unsigned && unlikely(value < zero))\
goto raise_neg_overflow;\
else\
goto raise_overflow;\
}\
}\
return (target_type) value;\
}
/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
const int is_unsigned = neg_one > const_zero;
if (is_unsigned) {
if (sizeof(int) < sizeof(long)) {
return PyInt_FromLong((long) value);
} else if (sizeof(int) <= sizeof(unsigned long)) {
return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
} else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
}
} else {
if (sizeof(int) <= sizeof(long)) {
return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
} else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
}
}
{
int one = 1; int little = (int)*(unsigned char *)&one;
unsigned char *bytes = (unsigned char *)&value;
return _PyLong_FromByteArray(bytes, sizeof(int),
little, !is_unsigned);
}
}
/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
const int is_unsigned = neg_one > const_zero;
if (is_unsigned) {
if (sizeof(long) < sizeof(long)) {
return PyInt_FromLong((long) value);
} else if (sizeof(long) <= sizeof(unsigned long)) {
return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
}
} else {
if (sizeof(long) <= sizeof(long)) {
return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
}
}
{
int one = 1; int little = (int)*(unsigned char *)&one;
unsigned char *bytes = (unsigned char *)&value;
return _PyLong_FromByteArray(bytes, sizeof(long),
little, !is_unsigned);
}
}
/* Declarations */
#if CYTHON_CCOMPLEX
#ifdef __cplusplus
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
return ::std::complex< float >(x, y);
}
#else
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
return x + y*(__pyx_t_float_complex)_Complex_I;
}
#endif
#else
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
__pyx_t_float_complex z;
z.real = x;
z.imag = y;
return z;
}
#endif
/* Arithmetic */
#if CYTHON_CCOMPLEX
#else
static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
return (a.real == b.real) && (a.imag == b.imag);
}
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
__pyx_t_float_complex z;
z.real = a.real + b.real;
z.imag = a.imag + b.imag;
return z;
}
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
__pyx_t_float_complex z;
z.real = a.real - b.real;
z.imag = a.imag - b.imag;
return z;
}
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
__pyx_t_float_complex z;
z.real = a.real * b.real - a.imag * b.imag;
z.imag = a.real * b.imag + a.imag * b.real;
return z;
}
#if 1
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
if (b.imag == 0) {
return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
} else if (fabsf(b.real) >= fabsf(b.imag)) {
if (b.real == 0 && b.imag == 0) {
return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
} else {
float r = b.imag / b.real;
float s = (float)(1.0) / (b.real + b.imag * r);
return __pyx_t_float_complex_from_parts(
(a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
}
} else {
float r = b.real / b.imag;
float s = (float)(1.0) / (b.imag + b.real * r);
return __pyx_t_float_complex_from_parts(
(a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
}
}
#else
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
if (b.imag == 0) {
return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
} else {
float denom = b.real * b.real + b.imag * b.imag;
return __pyx_t_float_complex_from_parts(
(a.real * b.real + a.imag * b.imag) / denom,
(a.imag * b.real - a.real * b.imag) / denom);
}
}
#endif
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
__pyx_t_float_complex z;
z.real = -a.real;
z.imag = -a.imag;
return z;
}
static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
return (a.real == 0) && (a.imag == 0);
}
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
__pyx_t_float_complex z;
z.real = a.real;
z.imag = -a.imag;
return z;
}
#if 1
static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
#if !defined(HAVE_HYPOT) || defined(_MSC_VER)
return sqrtf(z.real*z.real + z.imag*z.imag);
#else
return hypotf(z.real, z.imag);
#endif
}
static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
__pyx_t_float_complex z;
float r, lnr, theta, z_r, z_theta;
if (b.imag == 0 && b.real == (int)b.real) {
if (b.real < 0) {
float denom = a.real * a.real + a.imag * a.imag;
a.real = a.real / denom;
a.imag = -a.imag / denom;
b.real = -b.real;
}
switch ((int)b.real) {
case 0:
z.real = 1;
z.imag = 0;
return z;
case 1:
return a;
case 2:
return __Pyx_c_prod_float(a, a);
case 3:
z = __Pyx_c_prod_float(a, a);
return __Pyx_c_prod_float(z, a);
case 4:
z = __Pyx_c_prod_float(a, a);
return __Pyx_c_prod_float(z, z);
}
}
if (a.imag == 0) {
if (a.real == 0) {
return a;
} else if (b.imag == 0) {
z.real = powf(a.real, b.real);
z.imag = 0;
return z;
} else if (a.real > 0) {
r = a.real;
theta = 0;
} else {
r = -a.real;
theta = atan2f(0.0, -1.0);
}
} else {
r = __Pyx_c_abs_float(a);
theta = atan2f(a.imag, a.real);
}
lnr = logf(r);
z_r = expf(lnr * b.real - theta * b.imag);
z_theta = theta * b.real + lnr * b.imag;
z.real = z_r * cosf(z_theta);
z.imag = z_r * sinf(z_theta);
return z;
}
#endif
#endif
/* Declarations */
#if CYTHON_CCOMPLEX
#ifdef __cplusplus
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
return ::std::complex< double >(x, y);
}
#else
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
return x + y*(__pyx_t_double_complex)_Complex_I;
}
#endif
#else
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
__pyx_t_double_complex z;
z.real = x;
z.imag = y;
return z;
}
#endif
/* Arithmetic */
#if CYTHON_CCOMPLEX
#else
static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
return (a.real == b.real) && (a.imag == b.imag);
}
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
__pyx_t_double_complex z;
z.real = a.real + b.real;
z.imag = a.imag + b.imag;
return z;
}
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
__pyx_t_double_complex z;
z.real = a.real - b.real;
z.imag = a.imag - b.imag;
return z;
}
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
__pyx_t_double_complex z;
z.real = a.real * b.real - a.imag * b.imag;
z.imag = a.real * b.imag + a.imag * b.real;
return z;
}
#if 1
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
if (b.imag == 0) {
return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
} else if (fabs(b.real) >= fabs(b.imag)) {
if (b.real == 0 && b.imag == 0) {
return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
} else {
double r = b.imag / b.real;
double s = (double)(1.0) / (b.real + b.imag * r);
return __pyx_t_double_complex_from_parts(
(a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
}
} else {
double r = b.real / b.imag;
double s = (double)(1.0) / (b.imag + b.real * r);
return __pyx_t_double_complex_from_parts(
(a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
}
}
#else
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
if (b.imag == 0) {
return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
} else {
double denom = b.real * b.real + b.imag * b.imag;
return __pyx_t_double_complex_from_parts(
(a.real * b.real + a.imag * b.imag) / denom,
(a.imag * b.real - a.real * b.imag) / denom);
}
}
#endif
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
__pyx_t_double_complex z;
z.real = -a.real;
z.imag = -a.imag;
return z;
}
static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
return (a.real == 0) && (a.imag == 0);
}
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
__pyx_t_double_complex z;
z.real = a.real;
z.imag = -a.imag;
return z;
}
#if 1
static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
#if !defined(HAVE_HYPOT) || defined(_MSC_VER)
return sqrt(z.real*z.real + z.imag*z.imag);
#else
return hypot(z.real, z.imag);
#endif
}
static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
__pyx_t_double_complex z;
double r, lnr, theta, z_r, z_theta;
if (b.imag == 0 && b.real == (int)b.real) {
if (b.real < 0) {
double denom = a.real * a.real + a.imag * a.imag;
a.real = a.real / denom;
a.imag = -a.imag / denom;
b.real = -b.real;
}
switch ((int)b.real) {
case 0:
z.real = 1;
z.imag = 0;
return z;
case 1:
return a;
case 2:
return __Pyx_c_prod_double(a, a);
case 3:
z = __Pyx_c_prod_double(a, a);
return __Pyx_c_prod_double(z, a);
case 4:
z = __Pyx_c_prod_double(a, a);
return __Pyx_c_prod_double(z, z);
}
}
if (a.imag == 0) {
if (a.real == 0) {
return a;
} else if (b.imag == 0) {
z.real = pow(a.real, b.real);
z.imag = 0;
return z;
} else if (a.real > 0) {
r = a.real;
theta = 0;
} else {
r = -a.real;
theta = atan2(0.0, -1.0);
}
} else {
r = __Pyx_c_abs_double(a);
theta = atan2(a.imag, a.real);
}
lnr = log(r);
z_r = exp(lnr * b.real - theta * b.imag);
z_theta = theta * b.real + lnr * b.imag;
z.real = z_r * cos(z_theta);
z.imag = z_r * sin(z_theta);
return z;
}
#endif
#endif
/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_Check(x))) {
if (sizeof(int) < sizeof(long)) {
__PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
} else {
long val = PyInt_AS_LONG(x);
if (is_unsigned && unlikely(val < 0)) {
goto raise_neg_overflow;
}
return (int) val;
}
} else
#endif
if (likely(PyLong_Check(x))) {
if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
case 0: return (int) 0;
case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
case 2:
if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
}
}
break;
case 3:
if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
}
}
break;
case 4:
if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
}
}
break;
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON
if (unlikely(Py_SIZE(x) < 0)) {
goto raise_neg_overflow;
}
#else
{
int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
if (unlikely(result < 0))
return (int) -1;
if (unlikely(result == 1))
goto raise_neg_overflow;
}
#endif
if (sizeof(int) <= sizeof(unsigned long)) {
__PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
} else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
}
} else {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
case 0: return (int) 0;
case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
case -2:
if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
}
}
break;
case 2:
if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
}
}
break;
case -3:
if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
}
}
break;
case 3:
if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
}
}
break;
case -4:
if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
}
}
break;
case 4:
if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
}
}
break;
}
#endif
if (sizeof(int) <= sizeof(long)) {
__PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
} else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
}
}
{
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
PyErr_SetString(PyExc_RuntimeError,
"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
int val;
PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
if (likely(v) && !PyLong_Check(v)) {
PyObject *tmp = v;
v = PyNumber_Long(tmp);
Py_DECREF(tmp);
}
#endif
if (likely(v)) {
int one = 1; int is_little = (int)*(unsigned char *)&one;
unsigned char *bytes = (unsigned char *)&val;
int ret = _PyLong_AsByteArray((PyLongObject *)v,
bytes, sizeof(val),
is_little, !is_unsigned);
Py_DECREF(v);
if (likely(!ret))
return val;
}
#endif
return (int) -1;
}
} else {
int val;
PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
if (!tmp) return (int) -1;
val = __Pyx_PyInt_As_int(tmp);
Py_DECREF(tmp);
return val;
}
raise_overflow:
PyErr_SetString(PyExc_OverflowError,
"value too large to convert to int");
return (int) -1;
raise_neg_overflow:
PyErr_SetString(PyExc_OverflowError,
"can't convert negative value to int");
return (int) -1;
}
/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_Check(x))) {
if (sizeof(long) < sizeof(long)) {
__PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
} else {
long val = PyInt_AS_LONG(x);
if (is_unsigned && unlikely(val < 0)) {
goto raise_neg_overflow;
}
return (long) val;
}
} else
#endif
if (likely(PyLong_Check(x))) {
if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
case 0: return (long) 0;
case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
case 2:
if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
}
}
break;
case 3:
if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
}
}
break;
case 4:
if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
}
}
break;
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON
if (unlikely(Py_SIZE(x) < 0)) {
goto raise_neg_overflow;
}
#else
{
int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
if (unlikely(result < 0))
return (long) -1;
if (unlikely(result == 1))
goto raise_neg_overflow;
}
#endif
if (sizeof(long) <= sizeof(unsigned long)) {
__PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
}
} else {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
case 0: return (long) 0;
case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
case -2:
if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
case 2:
if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
case -3:
if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
case 3:
if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
case -4:
if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
case 4:
if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
}
}
break;
}
#endif
if (sizeof(long) <= sizeof(long)) {
__PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
}
}
{
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
PyErr_SetString(PyExc_RuntimeError,
"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
long val;
PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
if (likely(v) && !PyLong_Check(v)) {
PyObject *tmp = v;
v = PyNumber_Long(tmp);
Py_DECREF(tmp);
}
#endif
if (likely(v)) {
int one = 1; int is_little = (int)*(unsigned char *)&one;
unsigned char *bytes = (unsigned char *)&val;
int ret = _PyLong_AsByteArray((PyLongObject *)v,
bytes, sizeof(val),
is_little, !is_unsigned);
Py_DECREF(v);
if (likely(!ret))
return val;
}
#endif
return (long) -1;
}
} else {
long val;
PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
if (!tmp) return (long) -1;
val = __Pyx_PyInt_As_long(tmp);
Py_DECREF(tmp);
return val;
}
raise_overflow:
PyErr_SetString(PyExc_OverflowError,
"value too large to convert to long");
return (long) -1;
raise_neg_overflow:
PyErr_SetString(PyExc_OverflowError,
"can't convert negative value to long");
return (long) -1;
}
/* CIntFromPy */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
const size_t neg_one = (size_t) ((size_t) 0 - (size_t) 1), const_zero = (size_t) 0;
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_Check(x))) {
if (sizeof(size_t) < sizeof(long)) {
__PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
} else {
long val = PyInt_AS_LONG(x);
if (is_unsigned && unlikely(val < 0)) {
goto raise_neg_overflow;
}
return (size_t) val;
}
} else
#endif
if (likely(PyLong_Check(x))) {
if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
case 0: return (size_t) 0;
case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
case 2:
if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
}
break;
case 3:
if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
}
break;
case 4:
if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
}
break;
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON
if (unlikely(Py_SIZE(x) < 0)) {
goto raise_neg_overflow;
}
#else
{
int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
if (unlikely(result < 0))
return (size_t) -1;
if (unlikely(result == 1))
goto raise_neg_overflow;
}
#endif
if (sizeof(size_t) <= sizeof(unsigned long)) {
__PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
} else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
}
} else {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
case 0: return (size_t) 0;
case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0])
case -2:
if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
case 2:
if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
case -3:
if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
case 3:
if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
case -4:
if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
case 4:
if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
__PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
} else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
}
#endif
if (sizeof(size_t) <= sizeof(long)) {
__PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
} else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
}
}
{
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
PyErr_SetString(PyExc_RuntimeError,
"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
size_t val;
PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
if (likely(v) && !PyLong_Check(v)) {
PyObject *tmp = v;
v = PyNumber_Long(tmp);
Py_DECREF(tmp);
}
#endif
if (likely(v)) {
int one = 1; int is_little = (int)*(unsigned char *)&one;
unsigned char *bytes = (unsigned char *)&val;
int ret = _PyLong_AsByteArray((PyLongObject *)v,
bytes, sizeof(val),
is_little, !is_unsigned);
Py_DECREF(v);
if (likely(!ret))
return val;
}
#endif
return (size_t) -1;
}
} else {
size_t val;
PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
if (!tmp) return (size_t) -1;
val = __Pyx_PyInt_As_size_t(tmp);
Py_DECREF(tmp);
return val;
}
raise_overflow:
PyErr_SetString(PyExc_OverflowError,
"value too large to convert to size_t");
return (size_t) -1;
raise_neg_overflow:
PyErr_SetString(PyExc_OverflowError,
"can't convert negative value to size_t");
return (size_t) -1;
}
/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
while (a) {
a = a->tp_base;
if (a == b)
return 1;
}
return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
PyObject *mro;
if (a == b) return 1;
mro = a->tp_mro;
if (likely(mro)) {
Py_ssize_t i, n;
n = PyTuple_GET_SIZE(mro);
for (i = 0; i < n; i++) {
if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
return 1;
}
return 0;
}
return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
PyObject *exception, *value, *tb;
int res;
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
__Pyx_ErrFetch(&exception, &value, &tb);
res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
if (unlikely(res == -1)) {
PyErr_WriteUnraisable(err);
res = 0;
}
if (!res) {
res = PyObject_IsSubclass(err, exc_type2);
if (unlikely(res == -1)) {
PyErr_WriteUnraisable(err);
res = 0;
}
}
__Pyx_ErrRestore(exception, value, tb);
return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
if (!res) {
res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
}
return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
Py_ssize_t i, n;
assert(PyExceptionClass_Check(exc_type));
n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
for (i=0; i<n; i++) {
if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
}
#endif
for (i=0; i<n; i++) {
PyObject *t = PyTuple_GET_ITEM(tuple, i);
#if PY_MAJOR_VERSION < 3
if (likely(exc_type == t)) return 1;
#endif
if (likely(PyExceptionClass_Check(t))) {
if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
} else {
}
}
return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
if (likely(err == exc_type)) return 1;
if (likely(PyExceptionClass_Check(err))) {
if (likely(PyExceptionClass_Check(exc_type))) {
return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
} else if (likely(PyTuple_Check(exc_type))) {
return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
} else {
}
}
return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
assert(PyExceptionClass_Check(exc_type1));
assert(PyExceptionClass_Check(exc_type2));
if (likely(err == exc_type1 || err == exc_type2)) return 1;
if (likely(PyExceptionClass_Check(err))) {
return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
}
return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif
/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
char ctversion[4], rtversion[4];
PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
char message[200];
PyOS_snprintf(message, sizeof(message),
"compiletime version %s of module '%.100s' "
"does not match runtime version %s",
ctversion, __Pyx_MODULE_NAME, rtversion);
return PyErr_WarnEx(NULL, message, 1);
}
return 0;
}
/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
while (t->p) {
#if PY_MAJOR_VERSION < 3
if (t->is_unicode) {
*t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
} else if (t->intern) {
*t->p = PyString_InternFromString(t->s);
} else {
*t->p = PyString_FromStringAndSize(t->s, t->n - 1);
}
#else
if (t->is_unicode | t->is_str) {
if (t->intern) {
*t->p = PyUnicode_InternFromString(t->s);
} else if (t->encoding) {
*t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
} else {
*t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
}
} else {
*t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
}
#endif
if (!*t->p)
return -1;
if (PyObject_Hash(*t->p) == -1)
return -1;
++t;
}
return 0;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
Py_ssize_t ignore;
return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
char* defenc_c;
PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
if (!defenc) return NULL;
defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
{
char* end = defenc_c + PyBytes_GET_SIZE(defenc);
char* c;
for (c = defenc_c; c < end; c++) {
if ((unsigned char) (*c) >= 128) {
PyUnicode_AsASCIIString(o);
return NULL;
}
}
}
#endif
*length = PyBytes_GET_SIZE(defenc);
return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
if (likely(PyUnicode_IS_ASCII(o))) {
*length = PyUnicode_GET_LENGTH(o);
return PyUnicode_AsUTF8(o);
} else {
PyUnicode_AsASCIIString(o);
return NULL;
}
#else
return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
__Pyx_sys_getdefaultencoding_not_ascii &&
#endif
PyUnicode_Check(o)) {
return __Pyx_PyUnicode_AsStringAndSize(o, length);
} else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
if (PyByteArray_Check(o)) {
*length = PyByteArray_GET_SIZE(o);
return PyByteArray_AS_STRING(o);
} else
#endif
{
char* result;
int r = PyBytes_AsStringAndSize(o, &result, length);
if (unlikely(r < 0)) {
return NULL;
} else {
return result;
}
}
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
int is_true = x == Py_True;
if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
int retval;
if (unlikely(!x)) return -1;
retval = __Pyx_PyObject_IsTrue(x);
Py_DECREF(x);
return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
if (PyLong_Check(result)) {
if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
"__int__ returned non-int (type %.200s). "
"The ability to return an instance of a strict subclass of int "
"is deprecated, and may be removed in a future version of Python.",
Py_TYPE(result)->tp_name)) {
Py_DECREF(result);
return NULL;
}
return result;
}
#endif
PyErr_Format(PyExc_TypeError,
"__%.4s__ returned non-%.4s (type %.200s)",
type_name, type_name, Py_TYPE(result)->tp_name);
Py_DECREF(result);
return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
PyNumberMethods *m;
#endif
const char *name = NULL;
PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
if (likely(PyLong_Check(x)))
#endif
return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
m = Py_TYPE(x)->tp_as_number;
#if PY_MAJOR_VERSION < 3
if (m && m->nb_int) {
name = "int";
res = m->nb_int(x);
}
else if (m && m->nb_long) {
name = "long";
res = m->nb_long(x);
}
#else
if (likely(m && m->nb_int)) {
name = "int";
res = m->nb_int(x);
}
#endif
#else
if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
res = PyNumber_Int(x);
}
#endif
if (likely(res)) {
#if PY_MAJOR_VERSION < 3
if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
if (unlikely(!PyLong_CheckExact(res))) {
#endif
return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
}
}
else if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_TypeError,
"an integer is required");
}
return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
Py_ssize_t ival;
PyObject *x;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_CheckExact(b))) {
if (sizeof(Py_ssize_t) >= sizeof(long))
return PyInt_AS_LONG(b);
else
return PyInt_AsSsize_t(b);
}
#endif
if (likely(PyLong_CheckExact(b))) {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)b)->ob_digit;
const Py_ssize_t size = Py_SIZE(b);
if (likely(__Pyx_sst_abs(size) <= 1)) {
ival = likely(size) ? digits[0] : 0;
if (size == -1) ival = -ival;
return ival;
} else {
switch (size) {
case 2:
if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
break;
case -2:
if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
break;
case 3:
if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
break;
case -3:
if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
break;
case 4:
if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
break;
case -4:
if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
break;
}
}
#endif
return PyLong_AsSsize_t(b);
}
x = PyNumber_Index(b);
if (!x) return -1;
ival = PyInt_AsSsize_t(x);
Py_DECREF(x);
return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
return PyInt_FromSize_t(ival);
}
#endif /* Py_PYTHON_H */
| [
"a96123155@126.com"
] | a96123155@126.com |
5b4ad1cbd5d9ac15ba6e55f3d09601ea2602f50c | 07c9a6213d5dca2d68938aafddb0faad78321a1f | /Codes ESP+ Arduino/arduino following hand movement/Samples/Test_LED/Test_LED.ino | a506ad593ed52782f2b595563f1e3f80afb9845e | [] | no_license | Mariem23/Arm-Robotic-remote-controlling | 6891f0a5eaad4e5a317b5c0621776305b96e9cd0 | 5fa377549df2576890816b40d4e1a481bfbf7915 | refs/heads/master | 2020-04-09T03:49:29.223385 | 2018-12-23T21:45:23 | 2018-12-23T22:21:35 | 159,998,257 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 461 | ino | // program to test LED
// Mariem Fattoum
void setup() {
pinMode(2, INPUT); //pin d'entrée
pinMode(13, OUTPUT); //pin de sortie
}
void loop() {
int a; //déclaration de variable d'entrée
int b; //déclaration variable de sortie
a = digitalRead (2); // lecture de la valeur d'entrée
b = 1;
if (a==b)
{digitalWrite (13, HIGH); //si les deux valeurs sont égaux , on allume la LED
}
else
digitalWrite (13, LOW); // sinon on l'atteint
}
| [
"fattoummariem6@gmail.com"
] | fattoummariem6@gmail.com |
bccc303c37038071d86849a773c89742c95a1bc0 | 3438e8c139a5833836a91140af412311aebf9e86 | /third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h | 5cf5b13c01c9830398bd5f870edd2d071af66729 | [
"BSD-3-Clause",
"LGPL-2.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft",
"MIT",
"Apache-2.0"
] | permissive | Exstream-OpenSource/Chromium | 345b4336b2fbc1d5609ac5a67dbf361812b84f54 | 718ca933938a85c6d5548c5fad97ea7ca1128751 | refs/heads/master | 2022-12-21T20:07:40.786370 | 2016-10-18T04:53:43 | 2016-10-18T04:53:43 | 71,210,435 | 0 | 2 | BSD-3-Clause | 2022-12-18T12:14:22 | 2016-10-18T04:58:13 | null | UTF-8 | C++ | false | false | 7,603 | h | /*
* Copyright (C) 2014 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * 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 Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef TestingPlatformSupport_h
#define TestingPlatformSupport_h
#include "platform/PlatformExport.h"
#include "public/platform/Platform.h"
#include "public/platform/WebCompositorSupport.h"
#include "public/platform/WebScheduler.h"
#include "public/platform/WebThread.h"
#include "wtf/Vector.h"
#include <memory>
namespace base {
class SimpleTestTickClock;
class TestDiscardableMemoryAllocator;
}
namespace cc {
class OrderedSimpleTaskRunner;
}
namespace cc_blink {
class WebCompositorSupportImpl;
} // namespace cc_blink
namespace blink {
namespace scheduler {
class RendererScheduler;
class RendererSchedulerImpl;
}
class TestingPlatformMockWebTaskRunner;
class TestingPlatformMockWebThread;
class WebCompositorSupport;
class WebThread;
class TestingCompositorSupport : public WebCompositorSupport {
std::unique_ptr<WebLayer> createLayer() override;
std::unique_ptr<WebLayer> createLayerFromCCLayer(cc::Layer*) override;
std::unique_ptr<WebContentLayer> createContentLayer(
WebContentLayerClient*) override;
std::unique_ptr<WebExternalTextureLayer> createExternalTextureLayer(
cc::TextureLayerClient*) override;
std::unique_ptr<WebImageLayer> createImageLayer() override;
std::unique_ptr<WebScrollbarLayer> createScrollbarLayer(
std::unique_ptr<WebScrollbar>,
WebScrollbarThemePainter,
std::unique_ptr<WebScrollbarThemeGeometry>) override;
std::unique_ptr<WebScrollbarLayer> createSolidColorScrollbarLayer(
WebScrollbar::Orientation,
int thumbThickness,
int trackStart,
bool isLeftSideVerticalScrollbar) override;
};
class TestingPlatformMockScheduler : public WebScheduler {
WTF_MAKE_NONCOPYABLE(TestingPlatformMockScheduler);
public:
TestingPlatformMockScheduler();
~TestingPlatformMockScheduler() override;
void runSingleTask();
void runAllTasks();
// WebScheduler implementation:
WebTaskRunner* loadingTaskRunner() override;
WebTaskRunner* timerTaskRunner() override;
void shutdown() override {}
bool shouldYieldForHighPriorityWork() override { return false; }
bool canExceedIdleDeadlineIfRequired() override { return false; }
void postIdleTask(const WebTraceLocation&, WebThread::IdleTask*) override {}
void postNonNestableIdleTask(const WebTraceLocation&,
WebThread::IdleTask*) override {}
std::unique_ptr<WebViewScheduler> createWebViewScheduler(
InterventionReporter*) override {
return nullptr;
}
void suspendTimerQueue() override {}
void resumeTimerQueue() override {}
void addPendingNavigation(WebScheduler::NavigatingFrameType) override {}
void removePendingNavigation(WebScheduler::NavigatingFrameType) override {}
void onNavigationStarted() override {}
private:
WTF::Deque<std::unique_ptr<WebTaskRunner::Task>> m_tasks;
std::unique_ptr<TestingPlatformMockWebTaskRunner> m_mockWebTaskRunner;
};
class TestingPlatformSupport : public Platform {
WTF_MAKE_NONCOPYABLE(TestingPlatformSupport);
public:
struct Config {
WebCompositorSupport* compositorSupport = nullptr;
};
TestingPlatformSupport();
explicit TestingPlatformSupport(const Config&);
~TestingPlatformSupport() override;
// Platform:
WebString defaultLocale() override;
WebCompositorSupport* compositorSupport() override;
WebThread* currentThread() override;
WebBlobRegistry* getBlobRegistry() override;
WebClipboard* clipboard() override;
WebFileUtilities* fileUtilities() override;
WebIDBFactory* idbFactory() override;
WebMimeRegistry* mimeRegistry() override;
WebURLLoaderMockFactory* getURLLoaderMockFactory() override;
blink::WebURLLoader* createURLLoader() override;
WebData loadResource(const char* name) override;
WebURLError cancelledError(const WebURL&) const override;
protected:
const Config m_config;
Platform* const m_oldPlatform;
};
class TestingPlatformSupportWithMockScheduler : public TestingPlatformSupport {
WTF_MAKE_NONCOPYABLE(TestingPlatformSupportWithMockScheduler);
public:
TestingPlatformSupportWithMockScheduler();
explicit TestingPlatformSupportWithMockScheduler(const Config&);
~TestingPlatformSupportWithMockScheduler() override;
// Platform:
WebThread* currentThread() override;
// Runs a single task.
void runSingleTask();
// Runs all currently queued immediate tasks and delayed tasks whose delay has
// expired plus any immediate tasks that are posted as a result of running
// those tasks.
//
// This function ignores future delayed tasks when deciding if the system is
// idle. If you need to ensure delayed tasks run, try runForPeriodSeconds()
// instead.
void runUntilIdle();
// Runs for |seconds|. Note we use a testing clock rather than the wall clock
// here.
void runForPeriodSeconds(double seconds);
// Advances |m_clock| by |seconds|.
void advanceClockSeconds(double seconds);
scheduler::RendererScheduler* rendererScheduler() const;
// Controls the behavior of |m_mockTaskRunner| if true, then |m_clock| will
// be advanced to the next timer when there's no more immediate work to do.
void setAutoAdvanceNowToPendingTasks(bool);
protected:
static double getTestTime();
std::unique_ptr<base::SimpleTestTickClock> m_clock;
scoped_refptr<cc::OrderedSimpleTaskRunner> m_mockTaskRunner;
std::unique_ptr<scheduler::RendererSchedulerImpl> m_scheduler;
std::unique_ptr<WebThread> m_thread;
};
class ScopedUnittestsEnvironmentSetup {
WTF_MAKE_NONCOPYABLE(ScopedUnittestsEnvironmentSetup);
public:
ScopedUnittestsEnvironmentSetup(int argc, char** argv);
~ScopedUnittestsEnvironmentSetup();
private:
class DummyPlatform;
std::unique_ptr<base::TestDiscardableMemoryAllocator>
m_discardableMemoryAllocator;
std::unique_ptr<DummyPlatform> m_platform;
std::unique_ptr<cc_blink::WebCompositorSupportImpl> m_compositorSupport;
TestingPlatformSupport::Config m_testingPlatformConfig;
std::unique_ptr<TestingPlatformSupport> m_testingPlatformSupport;
};
} // namespace blink
#endif // TestingPlatformSupport_h
| [
"support@opentext.com"
] | support@opentext.com |
d83050b7435e2a4fc5cbcffbf5fc9b0f015f9d05 | aa89fd83bd86f6475c73d171d56a4de141877a6a | /MainSplitter.h | 69387daa109cb09ba97ed48d38cc35ff106fcbb6 | [] | no_license | afisher/miqrochat | a61cecade58075b7515dd7af0f0c033f15968759 | 7079503a43bd7ad2fb76ff455c215a6ed8066137 | refs/heads/master | 2021-01-20T18:20:13.750071 | 2012-05-24T23:31:05 | 2012-05-24T23:51:35 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 297 | h | #ifndef MAINSPLITTER_H
#define MAINSPLITTER_H
#include <QSplitter>
#include "FriendView.h"
#include "ChatArea.h"
class MainSplitter: public QSplitter {
Q_OBJECT
public:
explicit MainSplitter(QWidget *parent=0);
private:
FriendView *m_friendView;
ChatArea *m_chatArea;
};
#endif
| [
"mock.brian@gmail.com"
] | mock.brian@gmail.com |
fc4a3182e366325ccac0fa2efdd596fb43b439c1 | 90abceac35643d9d3e7ada80a91c23f2adc92127 | /Program1/Project1.cpp | e218fb7be1f60d6399059b5195ad3dc7a57618df | [] | no_license | ryank762/EE312 | 4eb52beb5b5c17484482fb6a38471f8cf2e9f637 | d8c6fca382163c818eb73af9ea6763cbd3d87165 | refs/heads/master | 2020-03-27T10:04:53.672688 | 2018-08-28T05:28:58 | 2018-08-28T05:28:58 | 146,393,553 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,398 | cpp | /*
* Project1.cpp
*
* Name: Ryan Kim
* EE312 Summer 2018
* SpellCheck
* Slip days used: <1> (I'm using a slip day on this assignment)
*/
#include <stdio.h> // provides declarations for printf and putchar
#include <stdint.h> // provides declarations for int32_t uint32_t and the other (new) standard C types
/* All of your code must be in this file. Please no #includes other than standard system headers (ie.., stdio.h, stdint.h)
*
* Many students find it helpful to declare global variables (often arrays). You are welcome to use
* globals if you find them helfpul. Global variables are by no means necessary for this project.
*/
/* You must write this function (spellCheck). Do not change the way the function is declared (i.e., it has
* exactly two parameters, each parameter is a standard (mundane) C string (see SpellCheck.pdf).
* You are expected to use reasonable programming style. I *insist* that you indent
* reasonably and consistently in your code. I strongly encourage you to avoid big functions
* So, plan on implementing spellCheck by writing two or three other "support functions" that
* help make the actual spell checking easier for you.
* There are no explicit restictions on using functions from the C standard library. However,
* for this project you should avoid using functionality from the C++ standard libary. You will
* almost certainly find it easiest to just write everything you need from scratch!
*/
int isInDictionary(char artWord[], char searchDict[]); // checks if artWord is in searchDict
int isALetter(char character); // checks if character is an alphabetical letter
int isSameLetter(char letter1, char letter2); // checks for capitalization
void spellCheck(char article[], char dictionary[]) {
int i, j,tempI, wordLength;
for (i = 0; article[i]; i++) {
wordLength = 0;
if (isALetter(article[i])) { // searches article for letter
for (tempI = i; isALetter(article[tempI]); tempI++) {
wordLength++; // find word length to allocate memory
}
if (wordLength == 1) {
continue;
}
char articleWord[wordLength + 1]; // allocate array (string)
for (j = 0; j < wordLength; j++) {
articleWord[j] = article[i];
i++;
}
articleWord[j] = 0;
if (!isInDictionary(articleWord, dictionary)) {
printf("%s\n", articleWord); // prints to console of word is not in dict
}
if (!article[i]) { // end for-loop if article ends
break;
}
}
}
}
int isInDictionary(char artWord[], char searchDict[]) { // return 1 if word is found in dictionary, 0 else
int i, j, iSave;
for (i = 0; searchDict[i]; i++) {
iSave = i;
j = 0;
if (isSameLetter(searchDict[i], artWord[j])) { // find first common letter
if (!iSave || searchDict[iSave-1] == '\n') {
iSave++; j++;
while (isSameLetter(searchDict[iSave], artWord[j])) { // do-while loop to navigate through dictionary
iSave++; j++;
}
if (!isALetter(artWord[j]) && (searchDict[iSave] == '\n') || (searchDict[iSave] == '\0')) {
return 1; // returns 1 if word in article ends, and word in dictionary ends
}
}
}
}
return 0; // not in dictionary
}
int isALetter(char character) { // return 1 if character is a letter, 0 else
if ((character >= 'a' && character <= 'z') || (character >= 'A' && character <= 'Z')) {
return 1;
}
else {
return 0;
}
}
int isSameLetter(char letter1, char letter2) { // return 1 if character is same (capital of another), 0 else
if (letter1 == 0 || letter2 == 0) {
return 0;
}
if (isALetter(letter1) && isALetter(letter2)) {
if (letter1 == letter2) { // same letter
return 1;
} else if (letter1 == letter2 - 32) { // lower case vs upper case
return 1;
} else if (letter1 == letter2 + 32) { // upper case vs lower case
return 1;
}
}
return 0;
}
| [
"ryank762@utexas.edu"
] | ryank762@utexas.edu |
4cf03f17ccef9b76962d823abe1e0b042da190a2 | 37137e3e5b5d739f911e1beb4d4cd6c485874256 | /codes/CppPrimer/ch16_Templates_and_GenericProgramming/example_SmartPointer/UniquePtr.h | b151f7700c6643b1905ffe7f310354e95f69e1e0 | [] | no_license | demon90s/CppStudy | 3710f6188d880ec1633df8be79f8025453103c94 | f3dc951b77bd031e7ffdef60218fe13fe34b7145 | refs/heads/master | 2021-12-01T14:42:34.162240 | 2021-11-27T16:10:21 | 2021-11-27T16:10:21 | 104,697,460 | 157 | 63 | null | null | null | null | UTF-8 | C++ | false | false | 554 | h | #ifndef UNIQUE_PTR_H
#define UNIQUE_PTR_H
class Delete
{
public:
template<typename T> void operator()(T *p) const { delete p; }
};
template<typename T, typename D = Delete>
class UniquePtr
{
public:
UniquePtr(T *p = nullptr, const D &d = D()) : m_p(p), m_del(d) {}
~UniquePtr()
{
if (m_p) {
m_del(m_p);
}
}
UniquePtr(const UniquePtr&) = delete;
UniquePtr& operator=(const UniquePtr&) = delete;
T& operator*() const { return *m_p; }
T* operator->() const { return &this->operator*(); }
private:
T *m_p = nullptr;
D m_del;
};
#endif
| [
"demon90s@163.com"
] | demon90s@163.com |
33e9e3cc396ad0e91235c5d365469a4cbcf0a957 | b93cebbaff40f91ceb472a3308d3169a9b51de62 | /mico_new/util/sharedptr.h | 297d58aca50a9d6d7468abfe498c6c880e710d42 | [] | no_license | coderbingcang2357/mico | 49e640b14bd223b4e795ecbcce6e83edeadc7c9e | c28c2f83165e43f0d568fd3047cecbc445a021c4 | refs/heads/master | 2023-03-03T17:55:38.145210 | 2021-02-01T03:33:08 | 2021-02-01T03:33:08 | 334,810,549 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,851 | h | #ifndef SHARED_PTR___H
#define SHARED_PTR___H
#include <memory>
#include <assert.h>
using std::shared_ptr;
using std::dynamic_pointer_cast;
using std::static_pointer_cast;
#if 0
template<typename T>
class shared_ptr
{
public:
explicit shared_ptr(T *p) : m_ref(new int(1)), m_ptr(p)
{}
shared_ptr(const shared_ptr<T> &ot)
: m_ref(ot.m_ref), m_ptr(ot.m_ptr)
{
incref();
}
//template<typename C>
//shared_ptr(const shared_ptr<C> &ptr)
//{
// T *tmp = dynamic_cast<T *>(ptr.ptr());
// if (this != &ptr && tmp != 0)
// {
// decref();
// m_ptr = ptr.m_ptr;
// m_ref = ptr.m_ref;
// incref();
// }
//}
shared_ptr<T> & operator = (const shared_ptr<T> &ot)
{
if (this != &ot)
{
decref();
m_ptr = ot.m_ptr;
m_ref = ot.m_ref;
incref();
}
return *this;
}
~shared_ptr()
{
decref();
}
T *ptr() const
{
return m_ptr;
}
T &operator * () const
{
return *m_ptr;
}
T *operator -> () const
{
return m_ptr;
}
operator bool ()
{
return m_ptr != 0;
}
private:
void decref()
{
(*m_ref)--;
if ((*m_ref) <= 0)
delete m_ptr;
}
void incref()
{
(*m_ref)++;
}
int *m_ref;
T *m_ptr;
template<typename A, typename C>
friend shared_ptr<A> dynamic_pointer_cast(const shared_ptr<C> &o);
};
template<typename A, typename C>
shared_ptr<A> dynamic_pointer_cast(const shared_ptr<C> &o)
{
A *tmp = dynamic_cast<A *>(o.ptr());
assert(tmp != 0);
shared_ptr<A> a(0);
delete a.m_ref;
a.m_ref = o.m_ref;
a.m_ptr = tmp;
a.incref();
return a;
}
#endif
#endif
| [
"bingcang2357@163.com"
] | bingcang2357@163.com |
d259e044310fab1186988c77943f4a65a8fb660f | 6ff225ced3f8ea771a0db118933907da4445690e | /logdevice/lib/test/findtimebenchmark/FindTimeBenchmark.cpp | ea56abcb8e572de9652f72af1a55b0e35ad4d611 | [
"BSD-3-Clause"
] | permissive | mickvav/LogDevice | c5680d76b5ebf8f96de0eca0ba5e52357408997a | 24a8b6abe4576418eceb72974083aa22d7844705 | refs/heads/master | 2020-04-03T22:33:29.633769 | 2018-11-07T12:17:25 | 2018-11-07T12:17:25 | 155,606,676 | 0 | 0 | NOASSERTION | 2018-10-31T18:39:23 | 2018-10-31T18:39:23 | null | UTF-8 | C++ | false | false | 15,109 | cpp | /**
* Copyright (c) 2017-present, Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <cstdlib>
#include <iostream>
#include <memory>
#include <random>
#include <unistd.h>
#include <folly/Memory.h>
#include <folly/Random.h>
#include <folly/Singleton.h>
#include "common/init/Init.h"
#include "logdevice/common/Checksum.h"
#include "logdevice/common/EpochMetaData.h"
#include "logdevice/common/ReaderImpl.h"
#include "logdevice/common/Semaphore.h"
#include "logdevice/common/Timer.h"
#include "logdevice/common/commandline_util.h"
#include "logdevice/common/commandline_util_chrono.h"
#include "logdevice/common/debug.h"
#include "logdevice/common/util.h"
#include "logdevice/include/Client.h"
#include "logdevice/include/Err.h"
#include "logdevice/include/Record.h"
#include "logdevice/include/types.h"
#include "logdevice/lib/ClientSettingsImpl.h"
using namespace facebook;
using namespace facebook::logdevice;
using std::make_unique;
using std::chrono::steady_clock;
namespace {
struct CommandLineSettings {
size_t parallel_findtime_batch = 2000;
std::chrono::milliseconds findtime_timeout{10000};
std::chrono::milliseconds since{24 * 60 * 60 * 1000};
std::string config_path;
std::vector<logid_t> log_ids;
uint64_t logs_limit = std::numeric_limits<uint64_t>::max();
boost::program_options::options_description desc;
};
} // namespace
static void parse_command_line(int argc,
const char* argv[],
CommandLineSettings& command_line_settings,
ClientSettingsImpl* client_settings) {
using boost::program_options::bool_switch;
using boost::program_options::value;
// clang-format off
command_line_settings.desc.add_options()
("help,h",
"produce this help message and exit")
("verbose,v",
"also include a description of all LogDevice Client settings in the help "
"message")
("config-path",
value<std::string>(&command_line_settings.config_path)
->required(),
"path to config file")
("logs-limit",
value<uint64_t>(&command_line_settings.logs_limit)
->default_value(command_line_settings.logs_limit),
"Limit of the logs number to be copyloaded."
"No limits by default")
("since",
chrono_value(&command_line_settings.since),
"Read records younger than a given duration value. Example values:"
"3min, 1hr, 3hrs, 1d, 2days, 1w, 2 weeks, ...")
("parallel-findtime-batch",
value<size_t>(&command_line_settings.parallel_findtime_batch)
->default_value(command_line_settings.parallel_findtime_batch),
"Specify how many simultaneous findTime() calles "
"can be executed on cluster")
("loglevel",
value<std::string>()
->default_value("info")
->notifier(dbg::parseLoglevelOption),
"One of the following: critical, error, warning, info, debug")
("findtime-timeout",
chrono_value(&command_line_settings.findtime_timeout)
->notifier([](std::chrono::milliseconds val) -> void {
if (val.count() < 0) {
throw boost::program_options::error("findtime-timeout must be > 0");
}
}),
"Timeout for calls to findTime")
;
// clang-format on
try {
auto fallback_fn = [&](int ac, const char* av[]) {
boost::program_options::variables_map parsed =
program_options_parse_no_positional(
ac, av, command_line_settings.desc);
// Check for --help before calling notify(), so that required options
// aren't required.
if (parsed.count("help")) {
std::cout
<< "Test application that connects to LogDevice and reads logs.\n\n"
<< command_line_settings.desc;
if (parsed.count("verbose")) {
std::cout << std::endl;
std::cout << "LogDevice Client settings:" << std::endl << std::endl;
std::cout << client_settings->getSettingsUpdater()->help(
SettingFlag::CLIENT);
}
exit(0);
}
// Surface any errors
boost::program_options::notify(parsed);
};
client_settings->getSettingsUpdater()->parseFromCLI(
argc, argv, &SettingsUpdater::mustBeClientOption, fallback_fn);
} catch (const boost::program_options::error& ex) {
std::cerr << argv[0] << ": " << ex.what() << '\n';
exit(1);
}
}
template <typename T>
std::string getStatisticString(std::vector<T> input) {
std::string results;
if (input.size() == 0) {
return results;
}
std::sort(input.begin(), input.end());
T avg_time = std::accumulate(input.begin(), input.end(), T(0)) / input.size();
int p50 = input.size() / 2;
int p99 = input.size() * 99 / 100;
ld_check(p50 >= 0 && p50 < input.size());
ld_check(p99 >= 0 && p99 < input.size());
results.append(" avg: ")
.append(std::to_string(avg_time))
.append(" p50: ")
.append(std::to_string(input[p50]))
.append(" p99: ")
.append(std::to_string(input[p99]))
.append("\n");
return results;
}
namespace {
struct FindTimeResult {
Status status;
int execution_time_ms;
lsn_t result_lsn;
};
} // namespace
std::string resultsToString(std::map<logid_t, FindTimeResult>& results) {
std::map<Status, size_t> status_map;
std::vector<int> execution_times;
for (auto& kv : results) {
++status_map[kv.second.status];
if (kv.second.status == E::OK) {
execution_times.push_back(kv.second.execution_time_ms);
}
}
std::string timing_results;
if (execution_times.size() != 0) {
std::sort(execution_times.begin(), execution_times.end());
timing_results.append("Among successful results time (in ms) was:")
.append(getStatisticString(execution_times));
}
std::string result;
result.append("All results count: ")
.append(std::to_string(results.size()))
.append(". Succeed: ")
.append(std::to_string(status_map[E::OK]))
.append(". Partial: ")
.append(std::to_string(status_map[E::PARTIAL]))
.append(". Failed: ")
.append(std::to_string(status_map[E::FAILED]))
.append("\n")
.append(timing_results);
return result;
}
std::string
getComparisonStatistics(const CommandLineSettings& settings,
const std::shared_ptr<Client> client,
std::map<logid_t, FindTimeResult> results_strict,
std::map<logid_t, FindTimeResult> results_approximate) {
auto reader = client->createReader(1);
reader->waitOnlyWhenNoData();
int failed_res = 0, partial_res = 0, strict_res_is_less = 0, equal_res = 0,
approx_less_results = 0;
std::vector<int> records_sizes, records_counts, records_time_diff;
for (int i = 0; i < settings.log_ids.size(); ++i) {
auto strict_res = results_strict[settings.log_ids[i]];
auto approx_res = results_approximate[settings.log_ids[i]];
if (strict_res.result_lsn == LSN_INVALID ||
approx_res.result_lsn == LSN_INVALID ||
strict_res.status == E::FAILED || approx_res.status == E::FAILED) {
failed_res++;
continue;
} else if (strict_res.status == E::PARTIAL ||
approx_res.status == E::PARTIAL) {
partial_res++;
continue;
} else if (strict_res.result_lsn < approx_res.result_lsn) {
strict_res_is_less++;
continue;
} else if (strict_res.result_lsn == approx_res.result_lsn) {
equal_res++;
continue;
}
approx_less_results++;
int rv = reader->startReading(
settings.log_ids[i], approx_res.result_lsn, strict_res.result_lsn);
size_t all_records_size = 0;
size_t all_records_count = 0;
std::chrono::milliseconds min_timestamp = std::chrono::milliseconds::max();
std::chrono::milliseconds max_timestamp = std::chrono::milliseconds::min();
std::vector<std::unique_ptr<DataRecord>> records;
GapRecord gap;
while (reader->isReading(settings.log_ids[i])) {
records.clear();
int nread = reader->read(100, &records, &gap);
if (records.size() != 0) {
min_timestamp = std::min(min_timestamp, records[0]->attrs.timestamp);
max_timestamp =
std::max(max_timestamp, records.back()->attrs.timestamp);
}
all_records_size +=
std::accumulate(std::begin(records),
std::end(records),
std::size_t(0),
[](size_t& sum, std::unique_ptr<DataRecord>& record) {
return sum + record->payload.size();
});
all_records_count += records.size();
}
records_sizes.push_back(all_records_size);
records_counts.push_back(all_records_count);
records_time_diff.push_back((max_timestamp - min_timestamp).count());
}
std::string result;
result.append("Results where at least one FindTime failed: ")
.append(std::to_string(failed_res))
.append("\n")
.append("Results where at least one FindTime was partial: ")
.append(std::to_string(partial_res))
.append("\n")
.append("Results where at strict result is earlier then approximate: ")
.append(std::to_string(strict_res_is_less))
.append("\n")
.append("Results where at strict lsn result is equal to approximate: ")
.append(std::to_string(equal_res))
.append("\n");
if (approx_less_results > 0) {
result.append("Results where Approximate version gave less lsn number: ")
.append(std::to_string(approx_less_results))
.append("\n")
.append("Approximate version was behind strict one by records size: ")
.append(getStatisticString(records_sizes))
.append("\n")
.append("Approximate version was behind strict one by records count: ")
.append(getStatisticString(records_counts))
.append("\n")
.append("Approximate version was behind strict one by time(ms) : ")
.append(getStatisticString(records_time_diff))
.append("\n");
}
return result;
}
void oneWaveFindTimeStatistics(const CommandLineSettings& settings,
std::shared_ptr<Client> client,
std::chrono::milliseconds timestamp,
bool is_approximate,
std::map<logid_t, FindTimeResult>& out_results) {
Semaphore sem(settings.parallel_findtime_batch);
std::queue<logid_t> logs_to_query;
for (int i = 0; i < settings.log_ids.size(); ++i) {
logs_to_query.push(settings.log_ids[i]);
}
std::set<logid_t> invalid_logs;
int invalid_results = 0;
// Multy thread mutex to make find time callbacks thread safe
std::mutex mutex;
while (1) {
if (logs_to_query.empty()) {
if (sem.value() == settings.parallel_findtime_batch) {
return;
}
std::this_thread::sleep_for(std::chrono::milliseconds(100));
continue;
}
sem.wait();
logid_t log_id = logs_to_query.front();
logs_to_query.pop();
auto time_begin = std::chrono::steady_clock::now();
auto cb = [log_id, &sem, &out_results, &logs_to_query, &mutex, &time_begin](
Status st, lsn_t result) {
std::lock_guard<std::mutex> guard(mutex);
auto time_elapsed = std::chrono::steady_clock::now() - time_begin;
int exec_time =
std::chrono::duration_cast<std::chrono::milliseconds>(time_elapsed)
.count();
FindTimeResult ft_result = {st, exec_time, result};
out_results[log_id] = ft_result;
sem.post();
};
client->findTime(log_id,
timestamp,
cb,
is_approximate ? FindKeyAccuracy::APPROXIMATE
: FindKeyAccuracy::STRICT);
}
}
int main(int argc, const char* argv[]) {
logdeviceInit();
CommandLineSettings command_line_settings;
std::unique_ptr<ClientSettingsImpl> clientSettings =
std::make_unique<ClientSettingsImpl>();
parse_command_line(argc, argv, command_line_settings, clientSettings.get());
std::shared_ptr<Client> logdevice_client =
Client::create("Test cluster",
command_line_settings.config_path,
"none",
command_line_settings.findtime_timeout,
std::move(clientSettings));
if (!logdevice_client) {
ld_error("Could not create client: %s", error_description(err));
return -1;
}
std::vector<logid_t> all_logs;
auto logs_map = logdevice_client->getLogRangesByNamespace("");
for (const auto& kv : logs_map) {
auto first_log = uint64_t(kv.second.first);
auto last_log = uint64_t(kv.second.second);
for (auto i = first_log; i <= last_log; ++i) {
all_logs.push_back(logid_t(i));
}
}
size_t left = all_logs.size();
int num_selected = 0;
int max_selected_size =
std::min(command_line_settings.logs_limit, all_logs.size());
while (num_selected < max_selected_size) {
int next = num_selected + (folly::Random::rand32() % left);
std::iter_swap(all_logs.begin() + num_selected, all_logs.begin() + next);
++num_selected;
--left;
}
std::copy(all_logs.begin(),
all_logs.begin() + max_selected_size,
std::back_inserter(command_line_settings.log_ids));
std::map<logid_t, FindTimeResult> approx_results, strict_results;
auto cur_timestamp = std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::high_resolution_clock::now().time_since_epoch());
auto timestamp = std::max(cur_timestamp - command_line_settings.since,
std::chrono::milliseconds{0});
auto time_begin = std::chrono::steady_clock::now();
oneWaveFindTimeStatistics(command_line_settings,
logdevice_client,
timestamp,
false,
strict_results);
auto time_elapsed_strict = std::chrono::steady_clock::now() - time_begin;
time_begin = std::chrono::steady_clock::now();
oneWaveFindTimeStatistics(
command_line_settings, logdevice_client, timestamp, true, approx_results);
auto time_elapsed_apporox = std::chrono::steady_clock::now() - time_begin;
std::string comparison_stat = getComparisonStatistics(
command_line_settings, logdevice_client, strict_results, approx_results);
ld_info(
"\n"
"Approximate findTime finished in %ld ms.\n"
"Strict findTime finished in %ld ms.\n\n"
"Apporoximate FindTime Statistics: \n%s\n"
"Strict FindTime Statistics: \n%s\n"
"Comparison Statistics: \n%s\n",
std::chrono::duration_cast<std::chrono::milliseconds>(
time_elapsed_apporox)
.count(),
std::chrono::duration_cast<std::chrono::milliseconds>(time_elapsed_strict)
.count(),
resultsToString(approx_results).c_str(),
resultsToString(strict_results).c_str(),
comparison_stat.c_str());
return 0;
}
| [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
2cac1d5a66ffd98db0947fd332c06d30dfdef9aa | 07fe910f4a2c7d14e67db40ab88a8c91d9406857 | /game/mga/interpreters/ExtensionClasses/Extension_Classes_Component_Module.cpp | 379ad7f310acab806e16d4d65e2be1f606dfc140 | [] | no_license | SEDS/GAME | e6d7f7a8bb034e421842007614d306b3a6321fde | 3e4621298624b9189b5b6b43ff002306fde23f08 | refs/heads/master | 2021-03-12T23:27:39.115003 | 2015-09-22T15:05:33 | 2015-09-22T15:05:33 | 20,278,561 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 414 | cpp | // $Id: Extension_Classes_Component_Module.cpp 2336 2010-07-08 00:11:22Z alhad $
#include "StdAfx.h"
#include "game/mga/component/Component_Module.h"
#include "Extension_Classes_Component_i.c"
DECLARE_COMPONENT_MODULE ("Extension Classes",
LIBID_Extension_Classes_Component,
1000,
"{E846F962-9A92-4ab4-A6D1-541B949F051C}");
| [
"hillj@cs.iupui.edu"
] | hillj@cs.iupui.edu |
44e908bc99289c63287e01eda7df44ac3e5dc9d4 | c118d1dfa88a44ce7acf3d2bae1549fa4d5b3c9e | /RPG/RPGDoc.cpp | a60578cfa2b60dc3f4f80424bf79e573e7ec96e2 | [] | no_license | harp3133t/Adventure_Of_Slime | 796bbfa88536bd83ab67bc515a49994c73bbe595 | 115ca06bc5411010aa99f4efe43ac1b7610a8970 | refs/heads/master | 2021-01-12T06:10:52.561126 | 2016-12-25T12:28:33 | 2016-12-25T12:28:33 | 77,324,337 | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 3,217 | cpp |
// RPGDoc.cpp : CRPGDoc 클래스의 구현
//
#include "stdafx.h"
// SHARED_HANDLERS는 미리 보기, 축소판 그림 및 검색 필터 처리기를 구현하는 ATL 프로젝트에서 정의할 수 있으며
// 해당 프로젝트와 문서 코드를 공유하도록 해 줍니다.
#ifndef SHARED_HANDLERS
#include "RPG.h"
#endif
#include "RPGDoc.h"
#include <propkey.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CRPGDoc
IMPLEMENT_DYNCREATE(CRPGDoc, CDocument)
BEGIN_MESSAGE_MAP(CRPGDoc, CDocument)
END_MESSAGE_MAP()
// CRPGDoc 생성/소멸
CRPGDoc::CRPGDoc()
{
// TODO: 여기에 일회성 생성 코드를 추가합니다.
ch_skillpoint=0;
battle_state=0;
pmap=3;
xPos=11;
yPos=11;
parrow=2;
pstate=2;
chating=0;
srand((unsigned)time(NULL));
for(int i=0;i<9;i++)card[i]=(rand()%5>1)?rand()%31/6:0;
ch_hp=165;
ch_maxhp=165;
ch_sp=80;
ch_maxsp=80;
ch_exp=0;
ch_maxexp=15;
ch_str=35;
ch_dex=35;
ch_money=2500;
hp_potion=5;
mp_potion=5;
ch_level=1;
mo_name=_T("슬라임");
mo_hp=30;
mo_maxhp=30;
mo_exp=50;
mo_money=100;
mo_str=20;
mo_dex=10;
mo_xsize=91;
mo_ysize=65;
mo_num=0;
}
CRPGDoc::~CRPGDoc()
{
}
BOOL CRPGDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: 여기에 재초기화 코드를 추가합니다.
// SDI 문서는 이 문서를 다시 사용합니다.
return TRUE;
}
// CRPGDoc serialization
void CRPGDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: 여기에 저장 코드를 추가합니다.
}
else
{
// TODO: 여기에 로딩 코드를 추가합니다.
}
}
#ifdef SHARED_HANDLERS
// 축소판 그림을 지원합니다.
void CRPGDoc::OnDrawThumbnail(CDC& dc, LPRECT lprcBounds)
{
// 문서의 데이터를 그리려면 이 코드를 수정하십시오.
dc.FillSolidRect(lprcBounds, RGB(255, 255, 255));
CString strText = _T("TODO: implement thumbnail drawing here");
LOGFONT lf;
CFont* pDefaultGUIFont = CFont::FromHandle((HFONT) GetStockObject(DEFAULT_GUI_FONT));
pDefaultGUIFont->GetLogFont(&lf);
lf.lfHeight = 36;
CFont fontDraw;
fontDraw.CreateFontIndirect(&lf);
CFont* pOldFont = dc.SelectObject(&fontDraw);
dc.DrawText(strText, lprcBounds, DT_CENTER | DT_WORDBREAK);
dc.SelectObject(pOldFont);
}
// 검색 처리기를 지원합니다.
void CRPGDoc::InitializeSearchContent()
{
CString strSearchContent;
// 문서의 데이터에서 검색 콘텐츠를 설정합니다.
// 콘텐츠 부분은 ";"로 구분되어야 합니다.
// 예: strSearchContent = _T("point;rectangle;circle;ole object;");
SetSearchContent(strSearchContent);
}
void CRPGDoc::SetSearchContent(const CString& value)
{
if (value.IsEmpty())
{
RemoveChunk(PKEY_Search_Contents.fmtid, PKEY_Search_Contents.pid);
}
else
{
CMFCFilterChunkValueImpl *pChunk = NULL;
ATLTRY(pChunk = new CMFCFilterChunkValueImpl);
if (pChunk != NULL)
{
pChunk->SetTextValue(PKEY_Search_Contents, value, CHUNK_TEXT);
SetChunkValue(pChunk);
}
}
}
#endif // SHARED_HANDLERS
// CRPGDoc 진단
#ifdef _DEBUG
void CRPGDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CRPGDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
// CRPGDoc 명령
| [
"harp3133t@gmail.com"
] | harp3133t@gmail.com |
399005bc23da9f907376d0429d15f8e065548e17 | b46390cd3ec4c3ade82f19abeb9e6c357fc1d7b3 | /src/c++ primer 5th/ch13-excercise/ch_13_ex_20.h | 425caa32b11bb43fe787f25871248cf1d42cf0a1 | [
"MIT"
] | permissive | thinkKundera/Eudemonia | 9bd5da1d68749b415b98caa949e61c95cccc7e7d | cb2d9cde5e9ab60a8f62747a9c48d7a44eabe8d1 | refs/heads/master | 2021-06-17T06:12:59.462110 | 2017-04-23T10:04:07 | 2017-04-23T10:04:07 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 838 | h | #ifndef CH_13_EX_20_H
#define CH_13_EX_20_H
#include <vector>
#include <iostream>
class QueryResult; //为了定义函数query的返回类型,这个定义是必须的
class TextQuery
{
public:
using line_no = std::vector<std::string>::size_type;
TextQuery(std::ifstreanm&);
QueryResult query(const std::string&) const;
TextQuery(const TextQuery&) = delete; //forbid copy constructor
TextQuery& operator=(const TextQuery) = delete; //forbid copy operator
private:
std::shared_ptr<std::vector<std::string>> file; //输入文件
//每个单词到它所在的行号的集合的映射
std::map<std::string,
std::shared_ptr<std::set<line_no>>> wm;
};
class QueryResult
{
public:
QueryResult(const QueryResult&) = delete; //forbid copy constructor
QueryResult& operator=(const QueryResult&) = delete; //forbid copy operator
};
| [
"air.petrichor@gmail.com"
] | air.petrichor@gmail.com |
acba51153690017f2da27d6830fd492189457b1f | d016de48181b5a21622f4146ed5fcb7dacfa70e5 | /src/pubsub.hpp | fc5516ce8ade4d389a5d65a056becfa2e95c25b2 | [] | no_license | bcharrow/ros2_proto | 87b7181a72f9c3fbb935e26661154ff8fde773cb | 275e53d55ed72475aa2c90b343810ffff3580abf | refs/heads/master | 2020-05-02T00:34:16.934192 | 2013-07-19T00:35:14 | 2013-07-19T00:35:14 | 11,516,966 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,185 | hpp | #ifndef PUBSUB_HPP
#define PUBSUB_HPP
#include "core.hpp"
#include <set>
#include <boost/scoped_ptr.hpp>
#include <boost/algorithm/string.hpp>
#include <ros/console.h>
namespace ros2 {
//=============================== Publication ===============================//
// Interface for publishing using a specific protocol (e.g., TCP, UDP, 0MQ pub)
class PublishTransport {
public:
virtual ~PublishTransport() {};
virtual void publish(const Message &msg) = 0;
virtual void shutdown() = 0;
virtual const char* protocol() const = 0;
virtual std::string endpoint() const = 0;
};
class PublishTransportFactory {
public:
virtual ~PublishTransportFactory() {}
virtual PublishTransport* CreatePubTransport() = 0;
};
class Publication {
public:
Publication(const std::string &topic)
: topic_(topic) {
}
void addTransport(PublishTransport *proto) {
protos_.push_back(boost::shared_ptr<PublishTransport>(proto));
}
void publish(const Message &msg) {
for (int i = 0; i < protos_.size(); ++i) {
protos_.at(i)->publish(msg);
}
}
void shutdown() {
for (std::vector<boost::shared_ptr<PublishTransport> >::iterator it = protos_.begin(); it != protos_.end(); ++it) {
(*it)->shutdown();
}
}
const std::string& topic() const { return topic_; }
typedef std::vector<boost::shared_ptr<PublishTransport> >::const_iterator const_iterator;
const_iterator begin() const { return protos_.begin(); }
const_iterator end() const { return protos_.end(); }
protected:
std::vector<boost::shared_ptr<PublishTransport> > protos_;
std::string topic_;
};
typedef boost::shared_ptr<Publication> PublicationPtr;
//============================== Subscription ===============================//
typedef boost::function<void(const Message&)> MessageCallback;
// Interface for subscribing using a specific protocol (e.g., TCP, UDP, 0MQ
// pub)
class SubscribeTransport {
public:
virtual ~SubscribeTransport() {};
virtual void onReceive(const MessageCallback &cb) = 0;
virtual void start(const std::string &endpoint) = 0;
virtual void shutdown() = 0;
virtual const char* protocol() const = 0;
};
class SubscribeTransportFactory {
public:
virtual ~SubscribeTransportFactory() {}
virtual SubscribeTransport* CreateSubTransport() = 0;
};
class Subscription {
public:
Subscription(const std::string &topic, const MessageCallback &cb)
: topic_(topic), cb_(cb) {
}
void addTransport(SubscribeTransport *transport) {
ROS_INFO("Adding transport %s for topic %s", transport->protocol(), topic_.c_str());
protos_.push_back(boost::shared_ptr<SubscribeTransport>(transport));
}
void foundPublisher(const std::vector<std::string> &uris) {
std::map<std::string, std::string> remote_proto_endpoint;
for (int i = 0; i < uris.size(); ++i) {
// split each into protocol://endpoint
const std::string &uri = uris.at(i);
std::string protocol = uri.substr(0, uri.find(':'));
std::string endpoint = uri.substr(uri.find("://") + 3);
remote_proto_endpoint[protocol] = endpoint;
ROS_INFO("Remote Protocol = %s Endpoint = %s",
protocol.c_str(), endpoint.c_str());
}
for (int i = 0; i < protos_.size(); ++i) {
boost::shared_ptr<SubscribeTransport> &proto = protos_.at(i);
std::map<std::string, std::string>::iterator it;
it = remote_proto_endpoint.find(std::string(proto->protocol()));
if (it != remote_proto_endpoint.end()) {
ROS_INFO("Using protocol %s w/ endpoint %s",
it->first.c_str(), it->second.c_str());
proto->onReceive(cb_);
proto->start(it->second);
return;
}
}
ROS_WARN("No match found for discovery");
}
void shutdown() {
for (std::vector<boost::shared_ptr<SubscribeTransport> >::iterator it = protos_.begin(); it != protos_.end(); ++it) {
(*it)->shutdown();
}
}
MessageCallback callback() {
return cb_;
}
protected:
boost::mutex callback_mutex_;
std::string topic_;
std::vector<boost::shared_ptr<SubscribeTransport> > protos_;
MessageCallback cb_;
};
typedef boost::shared_ptr<Subscription> SubscriptionPtr;
}
#endif
| [
"bcharrow@osrfoundation.org"
] | bcharrow@osrfoundation.org |
25730bb0ad92ab130a1040c79fcec8fc12c3dc79 | cd9450b1168397054e556ce6a326963ca84f6fff | /inc/Matrix3x3.h | 1ff55c1371542eac253fe8c41487089f55a7c2cf | [
"Unlicense"
] | permissive | ArturZiolkowski1999/zad5_3-ArturZiolkowski1999 | 39c5c0318f4ce4e94e0d4597cd392d8c21d7fdd9 | 1d2bfcbea0b4c086429f02809347f99569de3445 | refs/heads/main | 2023-05-31T23:30:32.520022 | 2021-06-14T19:07:03 | 2021-06-14T19:07:03 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 384 | h | //
// Created by artur on 5/6/21.
//
#ifndef ROTATION2D_MATRIX3X3_H
#define ROTATION2D_MATRIX3X3_H
#include "Matrix.h"
class Matrix3x3
: public Matrix<double, 3>{
public:
Matrix3x3();
Matrix3x3(double degree, char axis);
Matrix3x3& operator=(const Matrix3x3 matrix3x3);
Matrix3x3& operator=(const Matrix<double, 3> matrix3x3);
};
#endif //ROTATION2D_MATRIX3X3_H
| [
"aaartiii99@gmail.com"
] | aaartiii99@gmail.com |
1acb38d3bfa59ce45b2144c364e8493d19449aab | 4a2f0fb700b825a8856c981b60a7697ce65fc2a4 | /objects/conicmesh.h | 216be6c890ed8282032bf3747a549fa8a97a1290 | [] | no_license | shinhermit/projetISI | 74fb9f25307b8fa0135d4d6ce71634f604320bcc | 68c2811d9ca561f3bc2da033e263c1ea3164b47a | refs/heads/master | 2020-04-06T06:57:06.223888 | 2013-11-07T14:03:37 | 2013-11-07T14:03:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 967 | h | /**
* @author Josuah Aron
* @date Oct 2013
*
* An opened Cone
*
*
*/
#ifndef CONICMESH_H
#define CONICMESH_H
#include "parametricmesh.h"
#include "parametrics/conic.h"
namespace my{
class ConicMesh : public ParametricMesh
{
private:
float _height;
float _aperture;
int _nbSlices;
int _nbStacks;
/**
*@see my::ParametricMesh::_sampled
*/
my::Parameters _sampled(const int & i, const int & j)const throw(std::logic_error, std::invalid_argument);
/**
*@see my::ParametricMesh::_indiceOfSampled
*/
int _indiceOfSampled(const int & i, const int & j)const throw(std::logic_error, std::invalid_argument);
void _preConicMesh(const float & height, const float & aperture, const int & nbSlices, const int & nbStacks) throw(std::invalid_argument);
public:
ConicMesh(const float & height=1., const float & aperture=26.5, const int & nbSlices=10, const int & nbStacks=5);
};
}
#endif // CONICMESH_H
| [
"josuah@josuah-VirtualBox.(none)"
] | josuah@josuah-VirtualBox.(none) |
38106e64beca43fb1f93a2ea546307dcb3d5279a | 9704e020cc44275600a6c3fefae1f3fe6163e1f1 | /bluetooth.cpp | 4355d1d35c492145d3a744983ce35290b96931af | [] | no_license | wanpiqiu123/SJTU-EI228 | 45c16fffa25c791a7f6bf98d2ed87b0d0c436765 | 41c82150569ee5f3777ec7821ecebe9ebb769f76 | refs/heads/master | 2020-05-26T22:39:13.187210 | 2019-09-26T15:15:33 | 2019-09-26T15:15:33 | 188,401,785 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,536 | cpp | //
// Created by Leo on 2019/6/11.
//
#include "head.h"
/*********************************************************************/
int OpenDev(char *Dev)
{
int fd = open( Dev, O_RDWR | O_NOCTTY ); //| O_NOCTTY | O_NDELAY
if (-1 == fd)
{
perror("Can't Open Serial Port");
return -1;
}
else
return fd;
}
/**
*@brief 设置串口通信速率
*@param fd 类型 int 打开串口的文件句柄
*@param speed 类型 int 串口速度
*@return void
*/
int speed_arr[] = { B38400, B19200, B9600, B4800, B2400, B1200, B300,
B38400, B19200, B9600, B4800, B2400, B1200, B300, };
int name_arr[] = {38400, 19200, 9600, 4800, 2400, 1200, 300, 38400,
19200, 9600, 4800, 2400, 1200, 300, };
void set_speed(int fd, int speed)
{
int i;
int status;
struct termios Opt;
tcgetattr(fd, &Opt);
for ( i= 0; i < sizeof(speed_arr) / sizeof(int); i++) {
if (speed == name_arr[i]) {
tcflush(fd, TCIOFLUSH);
cfsetispeed(&Opt, speed_arr[i]);
cfsetospeed(&Opt, speed_arr[i]);
status = tcsetattr(fd, TCSANOW, &Opt);
if (status != 0) {
perror("tcsetattr fd1");
return;
}
tcflush(fd,TCIOFLUSH);
}
}
}
/**
*@brief 设置串口数据位,停止位和效验位
*@param fd 类型 int 打开的串口文件句柄
*@param databits 类型 int 数据位 取值 为 7 或者8
*@param stopbits 类型 int 停止位 取值为 1 或者2
*@param parity 类型 int 效验类型 取值为N,E,O,,S
*/
int set_Parity(int fd,int databits,int stopbits,int parity)
{
struct termios options;
options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); /*Input*/
options.c_oflag &= ~OPOST; /*Output*/
if ( tcgetattr( fd,&options) != 0) {
perror("SetupSerial 1");
return(FALSE);
}
options.c_cflag &= ~CSIZE;
switch (databits) /*设置数据位数*/
{
case 7:
options.c_cflag |= CS7;
break;
case 8:
options.c_cflag |= CS8;
break;
default:
fprintf(stderr,"Unsupported data size/n"); return (FALSE);
}
switch (parity)
{
case 'n':
case 'N':
options.c_cflag &= ~PARENB; /* Clear parity enable */
options.c_iflag &= ~INPCK; /* Enable parity checking */
break;
case 'o':
case 'O':
options.c_cflag |= (PARODD | PARENB); /* 设置为奇效验*/
options.c_iflag |= INPCK; /* Disnable parity checking */
break;
case 'e':
case 'E':
options.c_cflag |= PARENB; /* Enable parity */
options.c_cflag &= ~PARODD; /* 转换为偶效验*/
options.c_iflag |= INPCK; /* Disnable parity checking */
break;
case 'S':
case 's': /*as no parity*/
options.c_cflag &= ~PARENB;
options.c_cflag &= ~CSTOPB;break;
default:
fprintf(stderr,"Unsupported parity/n");
return (FALSE);
}
/* 设置停止位*/
switch (stopbits)
{
case 1:
options.c_cflag &= ~CSTOPB;
break;
case 2:
options.c_cflag |= CSTOPB;
break;
default:
fprintf(stderr,"Unsupported stop bits/n");
return (FALSE);
}
/* Set input parity option */
if (parity != 'n')
options.c_iflag |= INPCK;
tcflush(fd,TCIFLUSH);
options.c_cc[VTIME] = 150; /* 设置超时15 seconds*/
options.c_cc[VMIN] = 0; /* Update the options and do it NOW */
if (tcsetattr(fd,TCSANOW,&options) != 0)
{
perror("SetupSerial 3");
return (FALSE);
}
return (TRUE);
}
void signal(int nwrite, int fd, char ch){
for (int i = 0; i < 50; ++i) {
nwrite = write(fd, &ch, 1);
usleep(1000);
}
// nwrite = write(fd, &ch, 1);
printf("%c\t", ch);
sleep(1);
// usleep(100000);
char stop='i';
for (int i = 0; i < 50; ++i) {
nwrite = write(fd, &stop, 1);
usleep(1000);
}
// nwrite = write(fd, &stop, 1);
printf("%c\n", stop);
sleep(2);
// usleep(500000);
}
void loop(int nwrite, int nread, int fd){
char send,receive;
for (int i = 0; i < 5; ++i) {
send='a';
nwrite = write(fd, &send, 1);
printf("nwrite: %d\n write char: %c\n", nwrite, send);
nread = read(fd, &receive, 1);
printf("nread: %d\n read char: %c\n", nread, receive);
sleep(1);
send='i';
nwrite = write(fd, &send, 1);
printf("nwrite: %d\n write char: %c\n", nwrite, send);
nread = read(fd, &receive, 1);
printf("nread: %d\n read char: %c\n", nread, receive);
sleep(1);
send='c';
nwrite = write(fd, &send, 1);
printf("nwrite: %d\n write char: %c\n", nwrite, send);
nread = read(fd, &receive, 1);
printf("nread: %d\n read char: %c\n", nread, receive);
sleep(1);
send='i';
nwrite = write(fd, &send, 1);
printf("nwrite: %d\n write char: %c\n", nwrite, send);
nread = read(fd, &receive, 1);
printf("nread: %d\n read char: %c\n", nread, receive);
sleep(1);
}
}
//int main(int argc, char **argv)
//{
//
// int fd;
// int nread, nwrite;
// char buff[16];
// char buu = 'a';
// char buu2=' ';
// char *dev = "/dev/tty.BT04-A-Port"; //serial_port name
//// char *dev = "/dev/tty.HC-06-DevB";
// fd = OpenDev(dev);
// set_speed(fd,9600);
// if (set_Parity(fd,8,1,'N') == FALSE)
// {
// printf("Set Parity Error/n");
// exit (0);
// }
// sleep(2);
//// int count=0;
//// while (count++<=20){
//// signal(nwrite,fd,'e');
//// }
//
// while((read(fd, &buu2, 1))==1){
// printf("buff: %c\n",buu2);
//// sleep(1);
// }
// loop(nwrite,nread,fd);
//// while(buu!='q') {
//// printf("output\n");
//// usleep(10000);
//// nwrite = write(fd, &buu, 1);
//// //buff[nread+1] = '\0';
//// printf("nwrite: %d\n write char: %c\n", nwrite, buu);
////// sleep(1);
//// nread = read(fd, &buu2, 1);
//// printf("nread: %d\n read char: %c\n", nread, buu2);
//// std::cin>>buu;
//// }
// close(fd);
// //exit (0);
//}
//
| [
"46051943+wanpiqiu123@users.noreply.github.com"
] | 46051943+wanpiqiu123@users.noreply.github.com |
e3d856053b279ee3111a15ea28f9bd08074756a1 | e428638df7c259a9da2b4a8856008da8251aa388 | /Source/Graphics/GL4/GteGL4StructuredBuffer.cpp | 9f763a084def50bf3fa1c75ee824b462170d3b44 | [
"BSL-1.0"
] | permissive | vehsakul/gtl | 22a9ee057a282d3edbb99eaa30ad6e68773c768e | 498bb20947e9ff21c08dd5a884ac3dc6f8313bb9 | refs/heads/master | 2020-12-24T06:41:48.314735 | 2016-11-14T18:16:36 | 2016-11-14T18:16:36 | 73,462,121 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,701 | cpp | // David Eberly, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2016
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// File Version: 3.0.0 (2016/06/19)
#include <GTEnginePCH.h>
#include <LowLevel/GteLogger.h>
#include <Graphics/GL4/GteGL4StructuredBuffer.h>
#include <algorithm>
using namespace gte;
GL4StructuredBuffer::GL4StructuredBuffer(StructuredBuffer const* cbuffer)
:
GL4Buffer(cbuffer, GL_SHADER_STORAGE_BUFFER),
mCounterOffset(0)
{
Initialize();
}
std::shared_ptr<GEObject> GL4StructuredBuffer::Create(void*, GraphicsObject const* object)
{
if (object->GetType() == GT_STRUCTURED_BUFFER)
{
return std::make_shared<GL4StructuredBuffer>(
static_cast<StructuredBuffer const*>(object));
}
LogError("Invalid object type.");
return nullptr;
}
void GL4StructuredBuffer::AttachToUnit(GLint shaderStorageBufferUnit)
{
auto buffer = GetStructuredBuffer();
// Cannot use glBindBufferBase because if structured buffer has a counter
// associated with it, then there are extra bytes allocated in the buffer
// to store the counter value. The structured buffer data does start
// at offset=0, so all that is needed is the actual number of data bytes
// in the StructuredBuffer object.
glBindBufferRange(GL_SHADER_STORAGE_BUFFER, shaderStorageBufferUnit, mGLHandle, 0, buffer->GetNumBytes());
}
bool GL4StructuredBuffer::CopyCounterValueToBuffer(GL4Buffer* targetBuffer, GLint offset)
{
if (!targetBuffer)
{
return false;
}
auto buffer = GetStructuredBuffer();
if (StructuredBuffer::CT_NONE == buffer->GetCounterType())
{
return false;
}
glBindBuffer(GL_COPY_READ_BUFFER, mGLHandle);
glBindBuffer(GL_COPY_WRITE_BUFFER, targetBuffer->GetGLHandle());
glCopyBufferSubData(GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER, mCounterOffset, offset, 4);
return true;
}
bool GL4StructuredBuffer::CopyCounterValueFromBuffer(GL4Buffer* sourceBuffer, GLint offset)
{
if (!sourceBuffer)
{
return false;
}
auto buffer = GetStructuredBuffer();
if (StructuredBuffer::CT_NONE == buffer->GetCounterType())
{
return false;
}
glBindBuffer(GL_COPY_READ_BUFFER, sourceBuffer->GetGLHandle());
glBindBuffer(GL_COPY_WRITE_BUFFER, mGLHandle);
glCopyBufferSubData(GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER, offset, mCounterOffset, 4);
return true;
}
bool GL4StructuredBuffer::GetNumActiveElements()
{
auto buffer = GetStructuredBuffer();
if (StructuredBuffer::CT_NONE == buffer->GetCounterType())
{
return false;
}
// Read the count from the location in the buffer past the
// structured buffer data.
GLint count;
glBindBuffer(mType, mGLHandle);
glGetBufferSubData(mType, mCounterOffset, 4, &count);
glBindBuffer(mType, 0);
count = (std::max)(0, count);
buffer->SetNumActiveElements(count);
return true;
}
bool GL4StructuredBuffer::SetNumActiveElements()
{
auto buffer = GetStructuredBuffer();
if (StructuredBuffer::CT_NONE == buffer->GetCounterType())
{
return false;
}
// Get count from front end structured buffer object.
if (!buffer->GetKeepInternalCount())
{
GLint count = buffer->GetNumActiveElements();
glBindBuffer(mType, mGLHandle);
glBufferSubData(mType, mCounterOffset, 4, &count);
glBindBuffer(mType, 0);
}
return true;
}
bool GL4StructuredBuffer::CopyGpuToCpu()
{
auto buffer = GetStructuredBuffer();
// Need to read number of active elements first if there is
// a counter attached to this structured buffer.
if (StructuredBuffer::CT_NONE != buffer->GetCounterType())
{
if (!GetNumActiveElements())
{
return false;
}
}
return GL4Buffer::CopyGpuToCpu();
}
void GL4StructuredBuffer::Initialize()
{
auto buffer = GetStructuredBuffer();
// Regular structured buffer (no counter)?
if (StructuredBuffer::CT_NONE == buffer->GetCounterType())
{
GL4Buffer::Initialize();
}
// Structured buffer has a counter (any type)?
// Allocate extra bytes to store the counter value.
else
{
glBindBuffer(mType, mGLHandle);
// How many bytes are needed for the structured buffer data.
auto numBytes = buffer->GetNumBytes();
// Allocate extra bytes to align to 4 byte boundary for the offset.
// According to glBufferSubData:
// "Clients must align data elements consistent with the requirements
// of the client platform, with an additional base-level requirement
// that an offset within a buffer to a datum comprising N bytes be a
// multiple of N."
numBytes = ((numBytes + 3) / 4) * 4;
mCounterOffset = numBytes;
// Allocate 4 extra bytes for the counter itself.
numBytes += 4;
// Create a dynamic buffer that allows calls to glBufferSubData to
// update the buffer and the associated counter separately but within
// the same buffer contents.
glBufferData(mType, numBytes, nullptr, GL_DYNAMIC_DRAW);
// Initialize the GPU memory from the buffer.
auto data = buffer->GetData();
if (data)
{
glBufferSubData(mType, 0, buffer->GetNumBytes(), buffer->GetData());
}
// Initialize the count value.
GLint count = buffer->GetNumElements();
glBufferSubData(mType, mCounterOffset, 4, &count);
glBindBuffer(mType, 0);
}
}
| [
"lukashev.s@ya.ru"
] | lukashev.s@ya.ru |
102ed9af437884e95cde6ff3c6fdb2048c232d9c | e3e029a26f570e77926aa819ec7e09a6977aca6d | /src/main.cpp | 437e1f2533fb7e7e1e43fa1e0afe81bebd080b66 | [] | no_license | jvcleave/Box2dIssueExample | 2e2f5ccfdd748622f8de7655d32c7c5e82fd1d1c | 26f48b87aff6f7645d369bc910f118c3d5509205 | refs/heads/master | 2020-05-18T04:32:49.753586 | 2012-09-20T05:00:48 | 2012-09-20T05:00:48 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 192 | cpp | #include "ofMain.h"
#include "testApp.h"
#include "ofAppGlutWindow.h"
int main() {
ofAppGlutWindow window;
ofSetupOpenGL(&window, 1920, 1080, OF_WINDOW);
ofRunApp(new testApp());
}
| [
"jvcleave@gmail.com"
] | jvcleave@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.